body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f5f5f5;
    -webkit-tap-highlight-color: transparent;
    color: #4b507c;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Open Sans', sans-serif;
}

.text-scale-sm { font-size: 92%; }
.text-scale-md { font-size: 100%; }
.text-scale-lg { font-size: 110%; }
.text-scale-xl { font-size: 122%; }

.bg-grid-mesh {
    background-size: 24px 24px;
}

.active-press {
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease;
}

.active-press:active {
    transform: scale(0.98);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-navy {
    background: rgba(75, 80, 124, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.4; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.pulse-live {
    animation: pulse-ring 2.5s infinite ease-in-out;
}

.brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-height: 2rem;
    max-width: 10rem;
    object-fit: contain;
    object-position: left center;
}

.brand-logo--header {
    max-height: 2.05rem;
    max-width: min(10.75rem, calc(100vw - 14rem));
}

.brand-logo--footer {
    max-height: 2.3rem;
    max-width: 12.25rem;
    margin-inline: auto;
    object-position: center;
}

.brand-logo--cms {
    max-height: 1.85rem;
    max-width: 8.5rem;
}

@media (min-width: 640px) {
    .brand-logo {
        max-height: 2.75rem;
        max-width: 13rem;
    }

    .brand-logo--header {
        max-height: 3.1rem;
        max-width: 18.5rem;
    }

    .brand-logo--footer {
        max-height: 3.75rem;
        max-width: 20rem;
    }

    .brand-logo--cms {
        max-height: 2.15rem;
        max-width: 10rem;
    }
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.home-module {
    --module-color: #4A5283;
    border-top-width: 4px;
    border-top-style: solid;
    border-top-color: var(--module-color);
}

.home-module:hover {
    border-color: var(--module-color);
    background: color-mix(in srgb, var(--module-color) 7%, #fff);
}

.home-module-lockup {
    display: block;
    width: auto;
    height: auto;
    max-height: 3.9rem;
    max-width: min(100%, 19.75rem);
    object-fit: contain;
    object-position: left center;
}

.home-module-cta {
    color: var(--module-color);
}

@media (min-width: 640px) {
    .home-module-lockup {
        max-height: 4.1rem;
        max-width: min(100%, 20rem);
    }
}

.section-module {
    border-top-width: 4px;
    border-top-style: solid;
    border-top-color: var(--module-color);
}

.section-module-lockup {
    display: block;
    width: auto;
    height: auto;
    max-height: 3.9rem;
    max-width: min(100%, 19.75rem);
    object-fit: contain;
    object-position: left center;
}

@media (min-width: 640px) {
    .section-module-lockup {
        max-height: 3.35rem;
        max-width: min(100%, 18rem);
    }
}

.section-fg {
    color: var(--module-color);
}

.section-icon {
    color: var(--module-color);
}

.section-chip {
    background: color-mix(in srgb, var(--module-color) 12%, #fff);
    color: var(--module-color);
    border-color: color-mix(in srgb, var(--module-color) 28%, #fff);
}

.section-icon-box {
    background: color-mix(in srgb, var(--module-color) 14%, #fff);
    color: var(--module-color);
}

.section-soft {
    background: linear-gradient(to bottom right, color-mix(in srgb, var(--module-color) 10%, #fff), #f8fafc);
    border-color: color-mix(in srgb, var(--module-color) 30%, #fff);
}

/* Avisos de planilla salarial: colores fijos (no dependen del CDN de Tailwind). */
.salary-note {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid;
    padding: 0.75rem;
}

.salary-note--nota {
    color: #78350f;
    background: #fffbeb;
    border-color: #fcd34d;
}

.salary-note--aclaracion {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fdba74;
}

.salary-note--aviso {
    color: #0c4a6e;
    background: #f0f9ff;
    border-color: #7dd3fc;
}

.section-summary {
    background: color-mix(in srgb, var(--module-color) 10%, #fff);
}

.section-summary:hover {
    background: color-mix(in srgb, var(--module-color) 16%, #fff);
}

.section-field:focus {
    border-color: var(--module-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--module-color) 18%, transparent);
    outline: none;
}

.section-btn-primary {
    background: var(--module-color);
    color: #fff;
}

.section-btn-primary:hover {
    filter: brightness(0.92);
}

.section-btn-ghost:hover {
    background: color-mix(in srgb, var(--module-color) 10%, #fff);
    border-color: color-mix(in srgb, var(--module-color) 28%, #e2e8f0);
}

.section-btn-outline {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--module-color) 30%, #fff);
    color: var(--module-color);
}

.section-amount {
    color: var(--module-color);
}

.section-row:hover {
    background: color-mix(in srgb, var(--module-color) 8%, #fff);
}

.section-backbar-btn {
    background: var(--module-color, #1684bb);
}

.section-backbar-dot {
    background: var(--module-color, #34d399);
}

.section-backbar-title {
    color: color-mix(in srgb, var(--module-color, #1684bb) 70%, #fff);
}

@media (min-width: 640px) {
    .section-module-lockup {
        height: 4.6rem;
        max-width: min(100%, 24rem);
    }
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #1684bb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b507c;
}

.rich-text h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #4b507c;
    margin-bottom: 0.4rem;
}

.rich-text h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #4b507c;
    margin-bottom: 0.35rem;
}

.rich-text p {
    margin-bottom: 0.5rem;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.25rem 0;
}

.rich-text ol {
    list-style: decimal;
    padding-left: 1.25rem;
    margin: 0.25rem 0;
}

.rich-text a {
    color: #1684bb;
    text-decoration: underline;
}

.rich-text strong,
.rich-text b {
    font-weight: 800;
    color: #4b507c;
}

.rich-text {
    overflow-x: auto;
}

.rich-text table {
    max-width: 100%;
}

.yt-portrait {
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 220px;
    margin: 0.75rem auto 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
}

.yt-landscape {
    aspect-ratio: 16 / 9;
    width: 100%;
    margin: 0.75rem 0 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
}

.yt-portrait iframe,
.yt-landscape iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-rich p {
    margin: 0;
}

.hero-rich p + p {
    margin-top: 0.25rem;
}

.hero-rich strong,
.hero-rich b {
    font-weight: 800;
    color: #fff;
}

.hero-rich a {
    color: #fff;
    text-decoration: underline;
}

.hero-rich ul,
.hero-rich ol {
    list-style-position: inside;
    margin: 0.25rem 0;
}

.hero-rich ul {
    list-style-type: disc;
}

.hero-rich ol {
    list-style-type: decimal;
}

.faq-summary {
    list-style: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    transition: transform 0.2s ease;
}

details[open] > summary .faq-chevron {
    transform: rotate(180deg);
}

.uthgra-assistant[hidden] {
    display: none;
}

.uthgra-assistant {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    width: min(22.5rem, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.uthgra-assistant__launcher,
.uthgra-assistant__panel {
    pointer-events: auto;
}

.uthgra-assistant__launcher[hidden],
.uthgra-assistant__panel[hidden],
.uthgra-assistant__option[hidden] {
    display: none;
}

.uthgra-assistant__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    background: #4b507c;
    color: #fff;
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    border-radius: 999px;
    box-shadow: 0 18px 40px -12px rgba(75, 80, 124, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: assistant-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.uthgra-assistant__launcher-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    padding-right: 0.35rem;
}

.uthgra-assistant__launcher-copy strong {
    font-size: 0.85rem;
    font-weight: 800;
}

.uthgra-assistant__launcher-copy small {
    font-size: 0.68rem;
    color: #1897a7;
    font-weight: 700;
}

.assistant-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 2px solid rgba(24, 151, 167, 0.55);
    animation: assistant-ring 2s ease-out infinite;
    pointer-events: none;
}

.assistant-avatar {
    position: relative;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
}

.assistant-avatar--sm {
    width: 2.15rem;
    height: 2.15rem;
}

.assistant-avatar__face {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    background: linear-gradient(180deg, #1897a7 0%, #1684bb 100%);
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: inset 0 -8px 0 rgba(12, 74, 110, 0.12);
}

.assistant-avatar__eye {
    width: 0.28rem;
    height: 0.28rem;
    background: #4b507c;
    border-radius: 999px;
    animation: assistant-blink 4.5s infinite;
}

.assistant-avatar__smile {
    position: absolute;
    bottom: 0.42rem;
    width: 0.7rem;
    height: 0.35rem;
    border: 2px solid #4b507c;
    border-top: 0;
    border-radius: 0 0 1rem 1rem;
}

.assistant-avatar--sm .assistant-avatar__smile {
    bottom: 0.32rem;
    width: 0.55rem;
    height: 0.28rem;
}

.assistant-avatar__hand {
    position: absolute;
    right: -0.35rem;
    bottom: -0.1rem;
    font-size: 0.85rem;
    animation: assistant-wave 1.4s ease-in-out infinite;
    transform-origin: bottom left;
}

.assistant-online {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #e7f4fa;
    color: #4b507c;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.assistant-online::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #1897a7;
    animation: assistant-online 1.4s ease-in-out infinite;
}

.uthgra-assistant__panel {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.4rem;
    padding: 0.85rem;
    box-shadow: 0 25px 50px -12px rgba(75, 80, 124, 0.28);
    animation: assistant-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.uthgra-assistant__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.uthgra-assistant__chat {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: min(22rem, 52vh);
    overflow-y: auto;
    padding: 0.85rem 0.15rem;
}

.assistant-bubble {
    max-width: 88%;
    padding: 0.65rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    flex-shrink: 0;
    height: auto;
    animation: assistant-bubble 0.28s ease both;
}

.assistant-bubble--bot {
    align-self: flex-start;
    background: #e7f4fa;
    color: #4b507c;
    border-radius: 1.1rem 1.1rem 1.1rem 0.25rem;
}

.assistant-bubble--user {
    align-self: flex-end;
    background: #4b507c;
    color: #fff;
    border-radius: 1.1rem 1.1rem 0.25rem 1.1rem;
}

.assistant-bubble--rich {
    max-width: 94%;
    width: 94%;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.assistant-bubble--rich.rich-text {
    overflow-x: auto;
    overflow-y: visible;
}

.assistant-bubble--rich p,
.assistant-bubble--rich ul,
.assistant-bubble--rich ol {
    margin: 0 0 0.45rem;
}

.assistant-bubble--rich > :last-child {
    margin-bottom: 0;
}

.assistant-bubble--rich ul,
.assistant-bubble--rich ol {
    padding-left: 1.1rem;
}

.assistant-bubble--rich table {
    width: 100%;
    max-width: 100%;
    height: auto !important;
}

.assistant-bubble--rich img,
.assistant-bubble--rich video {
    max-width: 100%;
    height: auto;
}

.assistant-bubble--rich .yt-portrait,
.assistant-bubble--rich .yt-landscape {
    max-width: 100%;
}

.assistant-results {
    display: grid;
    gap: 0.45rem;
    width: 94%;
    flex-shrink: 0;
    animation: assistant-bubble 0.28s ease both;
}

.assistant-result {
    display: grid;
    gap: 0.15rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.6rem 0.75rem;
    color: #4b507c;
    font-size: 0.8rem;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.assistant-result:hover,
.assistant-result:focus-visible {
    border-color: #1684bb;
    background: #f5fbfe;
}

.assistant-result strong {
    font-weight: 800;
    color: #1e293b;
}

.assistant-result__category {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1684bb;
}

.assistant-result__excerpt {
    color: #64748b;
}

.assistant-result__meta {
    font-size: 0.72rem;
    font-weight: 700;
    color: #4b507c;
}

.uthgra-assistant__ask {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.15rem;
    animation: assistant-choice 0.3s ease both;
}

.uthgra-assistant__ask .uthgra-assistant__input {
    flex: 1;
    min-width: 0;
}

.uthgra-assistant__ask .uthgra-assistant__send {
    margin-left: 0;
    padding: 0.6rem 0.9rem;
}

.assistant-typing {
    display: inline-flex;
    gap: 0.28rem;
    align-self: flex-start;
    background: #e7f4fa;
    border-radius: 1rem;
    padding: 0.7rem 0.85rem;
}

.assistant-typing span {
    width: 0.38rem;
    height: 0.38rem;
    background: #1684bb;
    border-radius: 999px;
    animation: assistant-dots 1s infinite ease-in-out;
}

.assistant-typing span:nth-child(2) { animation-delay: 0.15s; }
.assistant-typing span:nth-child(3) { animation-delay: 0.3s; }

.uthgra-assistant__actions {
    display: grid;
    gap: 0.45rem;
}

.uthgra-assistant__option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    background: #f5f5f5;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 800;
    color: #4b507c;
    animation: assistant-choice 0.3s ease both;
}

.uthgra-assistant__emoji {
    width: 1.3rem;
    text-align: center;
}

.uthgra-assistant__option:hover,
.uthgra-assistant__option:focus-visible {
    background: #e7f4fa;
    border-color: #1684bb;
    transform: translateY(-1px);
}

.uthgra-assistant__form {
    display: grid;
    gap: 0.45rem;
    animation: assistant-choice 0.3s ease both;
}

.uthgra-assistant__input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    padding: 0.65rem 0.8rem;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
    resize: none;
}

.uthgra-assistant__input:focus {
    outline: none;
    border-color: #1684bb;
    box-shadow: 0 0 0 3px rgba(22, 132, 187, 0.18);
}

.uthgra-assistant__form-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.uthgra-assistant__send {
    margin-left: auto;
    background: #4b507c;
    color: #fff;
    font-weight: 800;
    font-size: 0.84rem;
    border-radius: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.uthgra-assistant__send:hover,
.uthgra-assistant__send:focus-visible {
    background: #1684bb;
}

.uthgra-assistant__link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: underline;
}

.uthgra-assistant__counter {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.uthgra-assistant__error {
    font-size: 0.76rem;
    font-weight: 700;
    color: #be123c;
}

.uthgra-assistant__error[hidden] {
    display: none;
}

.uthgra-assistant__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@keyframes assistant-in {
    from { opacity: 0; transform: translateY(1.4rem) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes assistant-pop {
    from { opacity: 0; transform: translateY(0.8rem) scale(0.8); }
    to { opacity: 1; transform: none; }
}

@keyframes assistant-bubble {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes assistant-choice {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes assistant-wave {
    0%, 70%, 100% { transform: rotate(0deg); }
    80% { transform: rotate(18deg); }
    90% { transform: rotate(-8deg); }
}

@keyframes assistant-blink {
    0%, 42%, 48%, 100% { transform: scaleY(1); }
    45% { transform: scaleY(0.1); }
}

@keyframes assistant-dots {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

@keyframes assistant-ring {
    0% { transform: scale(0.92); opacity: 0.7; }
    100% { transform: scale(1.18); opacity: 0; }
}

@keyframes assistant-online {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.pdf-viewer {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(6px);
}

.pdf-viewer[hidden] {
    display: none;
}

.pdf-viewer__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
}

.pdf-viewer__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-viewer__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #e2e8f0;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.pdf-viewer__status {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    padding: 2rem 1rem;
}

.pdf-viewer__status[hidden] {
    display: none;
}

.pdf-viewer__pages {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.pdf-viewer__page {
    width: 100%;
    max-width: 900px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.pdf-viewer__page canvas {
    display: block;
    width: 100%;
    height: auto;
}

.pdf-viewer__frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 70vh;
    border: 0;
    background: #fff;
}

.pdf-viewer__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.pdf-viewer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    font-size: 0.875rem;
    font-weight: 800;
    transition: background-color 0.15s ease;
}

.pdf-viewer__button--primary {
    background: #4b507c;
    color: #fff;
}

.pdf-viewer__button--primary:hover,
.pdf-viewer__button--primary:focus-visible {
    background: #1684bb;
}

.pdf-viewer__button--secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.pdf-viewer__button--secondary:hover,
.pdf-viewer__button--secondary:focus-visible {
    background: #e2e8f0;
}

body.pdf-viewer-open {
    overflow: hidden;
}

@media (min-width: 640px) {
    .pdf-viewer {
        padding: 1.5rem;
    }

    .pdf-viewer__panel {
        max-width: 56rem;
        height: 90vh;
        border-radius: 1rem;
        box-shadow: 0 25px 50px -12px rgba(75, 80, 124, 0.25);
    }
}

@media (prefers-reduced-motion: reduce) {
    .uthgra-assistant__panel,
    .uthgra-assistant__launcher,
    .assistant-bubble,
    .uthgra-assistant__option,
    .uthgra-assistant__form,
    .assistant-avatar__hand,
    .assistant-avatar__eye,
    .assistant-pulse,
    .assistant-online::before,
    .assistant-typing span {
        animation: none;
    }
}
