/**
 * ExamUttoron Clean Shell & Navigation Design System
 * Minimalist, high-legibility, fast-loading educational UI (LearnCBSE / Medium inspired)
 * Color Theme: Crisp White & Royal Blue (#1d4ed8) with Slate typography
 */

:root {
    --we-primary: #1d4ed8;
    --we-primary-dark: #1e40af;
    --we-primary-light: #eff6ff;
    --we-accent: #0284c7;
    --we-bg: #f8fafc;
    --we-surface: #ffffff;
    --we-text: #0f172a;
    --we-muted: #64748b;
    --we-border: #e2e8f0;
    --eu-primary: #1d4ed8;
    --eu-dark: #0f172a;
    --eu-muted: #64748b;
    --eu-bg: #f8fafc;
    --eu-border: #e2e8f0;
    --bs-primary: #1d4ed8;
    --bs-primary-rgb: 29, 78, 216;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--we-bg);
    color: var(--we-text);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    color: var(--we-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

body > main {
    min-height: 55vh;
}

/* =============================================================
   1. SITE HEADER & NAVIGATION
   ============================================================= */
.ut-site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid var(--we-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.ut-site-header .container,
.ut-site-footer .container {
    max-width: 1472px;
}

.ut-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}

/* Brand Identity */
.ut-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--we-text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-decoration: none;
}

.ut-brand:hover {
    color: var(--we-text);
}

.ut-brand-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: transparent;
    border-radius: 9px;
    font-size: 19px;
    transform: none;
    box-shadow: 0 2px 8px rgba(25, 23, 156, 0.28);
    flex-shrink: 0;
    overflow: hidden;
}

.ut-brand-mark img,
.ut-brand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9px;
    display: block;
}

.ut-brand > span > span {
    color: var(--we-primary);
}

.ut-brand small {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 1px;
}

/* Desktop Navigation */
.ut-desktop-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ut-desktop-nav > a {
    font-size: 15px;
    color: #475569;
    font-weight: 600;
    padding: 22px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ut-desktop-nav > a:hover,
.ut-desktop-nav > a.is-active {
    color: var(--we-primary);
}

.ut-desktop-nav > a.is-active:after {
    content: '';
    height: 2.5px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 3px 3px 0 0;
    background: var(--we-primary);
}

/* Nav Dropdown Trigger */
.ut-nav-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 22px 0;
    border: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    min-height: 44px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.ut-nav-trigger .bi-chevron-down {
    font-size: 13px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.ut-nav-trigger:hover,
.ut-nav-trigger.is-active,
.ut-nav-trigger[aria-expanded="true"] {
    color: var(--we-primary);
}

.ut-nav-trigger.is-active:after {
    content: '';
    height: 2.5px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 3px 3px 0 0;
    background: var(--we-primary);
}

/* Dropdown Menu Panel */
.ut-nav-panel {
    min-width: 300px;
    padding: 8px;
    border: 1px solid var(--we-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    margin-top: 4px;
}

.ut-nav-context {
    padding: 8px 12px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.ut-nav-panel .dropdown-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: #1e293b;
    white-space: normal;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ut-nav-panel .dropdown-item > i {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--we-primary-light);
    color: var(--we-primary);
    font-size: 17px;
}

.ut-nav-panel strong {
    display: block;
    font-size: 14px;
    font-weight: 650;
    color: #0f172a;
}

.ut-nav-panel small {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.ut-nav-panel .dropdown-item:hover,
.ut-nav-panel .dropdown-item:focus {
    background: #f1f5f9;
    color: var(--we-primary);
}

/* Header Actions */
.ut-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ut-icon-button {
    display: grid;
    place-items: center;
    border: 1px solid var(--we-border);
    background: #ffffff;
    color: #475569;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ut-icon-button:hover {
    background: #f8fafc;
    color: var(--we-primary);
    border-color: #cbd5e1;
}

.ut-header-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.ut-header-signin:hover {
    color: var(--we-primary);
    background: #f1f5f9;
}

.ut-header-account {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 8px;
    background: var(--we-primary);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    min-height: 40px;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.25);
    transition: all 0.15s ease;
}

.ut-header-account:hover {
    background: var(--we-primary-dark);
    box-shadow: 0 3px 8px rgba(29, 78, 216, 0.35);
}

.ut-menu-button {
    display: none;
}

/* Sub-Header Context Bar */
.ut-context-bar {
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.ut-context-bar > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    padding-top: 2px;
    padding-bottom: 2px;
    gap: 15px;
}

.ut-context-purpose {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.ut-context-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ut-context-actions button,
.ut-context-actions > a {
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: 0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ut-context-actions button {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: var(--we-primary);
}

.ut-context-actions button:hover {
    background: #dbeafe;
}

.ut-context-actions > a:hover {
    color: var(--we-primary);
}

/* Skip link */
.ut-skip {
    position: fixed;
    left: 10px;
    top: -70px;
    background: var(--we-primary);
    padding: 10px 16px;
    color: #fff;
    z-index: 1100;
    border-radius: 6px;
    font-weight: 600;
}

.ut-skip:focus {
    top: 10px;
    color: white;
}

/* =============================================================
   2. MOBILE DRAWER & MODALS
   ============================================================= */
.ut-drawer {
    max-width: 85vw;
    border: 0;
}

.ut-drawer .offcanvas-header {
    border-bottom: 1px solid var(--we-border);
    padding: 20px;
}

.ut-drawer h2 {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

.ut-drawer p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.ut-drawer-context {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--we-primary-light);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--we-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ut-drawer nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.ut-drawer nav a:hover {
    color: var(--we-primary);
}

.ut-drawer nav a.ut-drawer-updates {
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--site-line, #e2e8f0);
    border-radius: 12px;
    background: var(--site-soft, #f1f5f9);
    color: var(--site-ink, #172238);
}
.ut-drawer-updates-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--site-surface, #fff);
    color: var(--site-link, #1d4ed8);
    font-size: 19px;
}
.ut-drawer-updates strong,
.ut-drawer-updates small { display: block; }
.ut-drawer-updates strong { font-size: 15px; font-weight: 700; }
.ut-drawer-updates small { margin-top: 1px; font-size: 12px; color: var(--site-muted, #52647b); }
.ut-drawer nav a:focus-visible { outline: 2px solid var(--site-link, #1d4ed8); outline-offset: 3px; }

.ut-drawer nav a > i:last-child:not(:first-child) {
    margin-left: auto;
    color: #94a3b8;
    font-size: 13px;
}

.ut-drawer-section {
    margin-top: 18px;
}

.ut-drawer-section h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 6px;
}

/* State Picker Modal */
.ut-state-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ut-state-options > a {
    padding: 11px 14px;
    background: #f8fafc;
    border: 1px solid var(--we-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ut-state-options > a:hover {
    border-color: var(--we-primary);
    color: var(--we-primary);
    background: #ffffff;
}

.ut-state-options > a.is-active {
    background: var(--we-primary-light);
    border-color: var(--we-primary);
    color: var(--we-primary);
    font-weight: 700;
}

/* =============================================================
   3. CLEAN MINIMALIST FOOTER
   ============================================================= */
/* Mobile Navigation Dock - hidden by default on desktop */
.ut-mobile-dock {
    display: none;
}

.ut-site-footer {
    background: #ffffff;
    border-top: 1px solid var(--we-border);
    padding: 55px 0 25px;
    color: #475569;
    clear: both;
    width: 100%;
    position: relative;
    z-index: 10;
}


.ut-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
}

.ut-footer-grid p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 14px;
}

.ut-footer-grid h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f172a;
    margin: 0 0 16px;
}

.ut-footer-grid > div > a:not(.ut-brand) {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin: 10px 0;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ut-footer-grid > div > a:not(.ut-brand):hover {
    color: var(--we-primary);
}

.ut-footer-account {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ut-footer-account a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--we-primary);
    text-decoration: none;
}

.ut-footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #94a3b8;
}

/* Buttons */
.btn-primary {
    --bs-btn-bg: #1d4ed8;
    --bs-btn-border-color: #1d4ed8;
    --bs-btn-hover-bg: #1e40af;
    --bs-btn-hover-border-color: #1e40af;
    font-weight: 600;
}

/* Contest Banner */
.we-contest-banner {
    background: #0f172a !important;
}

/* =============================================================
   4. RESPONSIVE BREAKPOINTS
   ============================================================= */
@media (max-width: 1100px) {
    .ut-desktop-nav {
        gap: 14px;
    }
    .ut-header-row {
        gap: 14px;
    }
    .ut-desktop-nav > a,
    .ut-nav-trigger {
        font-size: 14px;
    }
}

@media (max-width: 991px) {
    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }
    .ut-header-row {
        min-height: 60px;
    }
    .ut-desktop-nav {
        display: none;
    }
    .ut-menu-button {
        display: grid;
    }
    .ut-site-header .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .ut-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .ut-site-footer {
        padding: 35px 16px calc(80px + env(safe-area-inset-bottom));
    }
    /* Mobile Navigation Dock */
    .ut-mobile-dock {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        min-height: 68px;
        padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        background: var(--site-surface, #fff);
        border-top: 1px solid var(--site-line, #e2e8f0);
        z-index: 1035;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    }
    .ut-mobile-dock > .ut-dock-item {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 2px 0;
        border: 0;
        background: transparent;
        color: var(--site-muted, #52647b);
        font-family: inherit;
        font-size: 11.5px;
        font-weight: 600;
        min-width: 0;
        min-height: 56px;
        border-radius: 10px;
        text-decoration: none;
        cursor: pointer;
        line-height: 16px;
        -webkit-tap-highlight-color: transparent;
    }
    .ut-dock-icon {
        display: grid;
        place-items: center;
        width: 40px;
        height: 30px;
        border-radius: 10px;
    }
    .ut-dock-icon svg { display: block; width: 22px; height: 22px; }
    .ut-dock-label { display: block; white-space: nowrap; letter-spacing: 0; }
    .ut-mobile-dock > .ut-dock-item:is(.is-active, :hover),
    body:has(#ut-menu.show) .ut-mobile-dock > .ut-dock-explore {
        color: var(--site-link, #1d4ed8);
    }
    .ut-mobile-dock > .ut-dock-item.is-active { font-weight: 750; }
    .ut-dock-store .ut-dock-icon,
    .ut-dock-item:is(.is-active, :hover) .ut-dock-icon,
    body:has(#ut-menu.show) .ut-dock-explore .ut-dock-icon {
        background: var(--we-primary-light, #eff6ff);
        color: var(--site-link, #1d4ed8);
    }
    .ut-mobile-dock > .ut-dock-item:focus-visible { outline: 2px solid var(--site-link, #1d4ed8); outline-offset: -2px; }
}

@media (max-width: 575px) {
    .ut-brand {
        font-size: 19px;
    }
    .ut-brand-mark {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .ut-header-signin {
        display: none;
    }
    .ut-header-account {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }
    .ut-account-wide {
        display: none;
    }
    .ut-account-compact {
        display: inline;
    }
    .ut-context-purpose {
        display: none;
    }
    .ut-context-actions {
        width: 100%;
        justify-content: space-between;
    }
    .ut-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .ut-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    .ut-state-options {
        grid-template-columns: 1fr;
    }
}
