body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8fafc;
    -webkit-tap-highlight-color: transparent;
    color: #1e293b;
    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(10, 37, 64, 0.92);
    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;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a2540;
}

.rich-text h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.rich-text h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    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: #0056b3;
    text-decoration: underline;
}

.rich-text strong,
.rich-text b {
    font-weight: 800;
    color: #0f172a;
}

.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: #0a2540;
    color: #fff;
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    border-radius: 999px;
    box-shadow: 0 18px 40px -12px rgba(10, 37, 64, 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: #bae6fd;
    font-weight: 700;
}

.assistant-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 2px solid rgba(56, 189, 248, 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, #7dd3fc 0%, #0284c7 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: #0a2540;
    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 #0a2540;
    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: #dcfce7;
    color: #166534;
    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: #22c55e;
    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(10, 37, 64, 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: 16rem;
    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;
    animation: assistant-bubble 0.28s ease both;
}

.assistant-bubble--bot {
    align-self: flex-start;
    background: #e0f2fe;
    color: #0f172a;
    border-radius: 1.1rem 1.1rem 1.1rem 0.25rem;
}

.assistant-bubble--user {
    align-self: flex-end;
    background: #0a2540;
    color: #fff;
    border-radius: 1.1rem 1.1rem 0.25rem 1.1rem;
}

.assistant-typing {
    display: inline-flex;
    gap: 0.28rem;
    align-self: flex-start;
    background: #e0f2fe;
    border-radius: 1rem;
    padding: 0.7rem 0.85rem;
}

.assistant-typing span {
    width: 0.38rem;
    height: 0.38rem;
    background: #0284c7;
    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: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 800;
    color: #0f172a;
    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: #eff6ff;
    border-color: #7dd3fc;
    transform: translateY(-1px);
}

@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; }
}

@media (prefers-reduced-motion: reduce) {
    .uthgra-assistant__panel,
    .uthgra-assistant__launcher,
    .assistant-bubble,
    .uthgra-assistant__option,
    .assistant-avatar__hand,
    .assistant-avatar__eye,
    .assistant-pulse,
    .assistant-online::before,
    .assistant-typing span {
        animation: none;
    }
}
