/* ==========================================================================
   HUIT Learning v2 — Editorial Bento & Glass Design System
   3-Layer Tokens (Primitive -> Semantic -> Component)
   Typography: Be Vietnam Pro (UI) + JetBrains Mono (Timers / IDs / Code)
   ========================================================================== */

:root {
    /* ----------------------------------------------------------------------
       Layer 1: Primitive Tokens
       ---------------------------------------------------------------------- */
    --hl-ink: #0B192C;
    --hl-ink-800: #162942;
    --hl-ink-700: #293E58;
    --hl-ink-600: #475569;
    --hl-ink-500: #64748B;
    --hl-ink-400: #94A3B8;

    --hl-brand: #0F4C81;
    --hl-brand-vivid: #1D4ED8;
    --hl-brand-deep: #093257;
    --hl-brand-50: #EFF4FF;
    --hl-brand-100: #DBEAFE;
    --hl-brand-200: #BFDBFE;

    --hl-sky: #0EA5E9;
    --hl-sky-light: #38BDF8;
    --hl-sky-soft: #E0F2FE;

    --hl-cta: #F97316;
    --hl-cta-hover: #EA580C;
    --hl-cta-text: #C2410C;
    --hl-cta-deep: #9A3412;
    --hl-cta-soft: #FFF7ED;
    --hl-cta-100: #FFEDD5;
    --hl-cta-200: #FED7AA;

    --hl-success: #15803D;
    --hl-success-soft: #DCFCE7;
    --hl-warning: #B45309;
    --hl-warning-soft: #FEF3C7;
    --hl-danger: #B91C1C;
    --hl-danger-soft: #FEE2E2;

    --hl-canvas: #F5F7FB;
    --hl-surface: #FFFFFF;
    --hl-surface-tint: #EFF4FF;
    --hl-surface-muted: #F1F5F9;

    --hl-border: rgba(15, 23, 42, 0.08);
    --hl-border-strong: rgba(15, 23, 42, 0.14);
    --hl-border-brand: rgba(15, 76, 129, 0.22);

    /* ----------------------------------------------------------------------
       Layer 2: Semantic & Elevation Tokens
       ---------------------------------------------------------------------- */
    --hl-shadow-xs: 0 1px 2px rgba(11, 25, 44, 0.04), 0 1px 3px rgba(11, 25, 44, 0.03);
    --hl-shadow-sm: 0 2px 6px rgba(11, 25, 44, 0.04), 0 8px 20px rgba(11, 25, 44, 0.05);
    --hl-shadow-md: 0 4px 12px rgba(11, 25, 44, 0.05), 0 16px 36px rgba(15, 76, 129, 0.09);
    --hl-shadow-lg: 0 8px 24px rgba(11, 25, 44, 0.07), 0 24px 56px rgba(15, 76, 129, 0.13);
    --hl-shadow-cta: 0 6px 18px rgba(249, 115, 22, 0.28);
    --hl-shadow-brand: 0 6px 18px rgba(15, 76, 129, 0.24);

    --hl-radius-xs: 0.5rem;
    --hl-radius-sm: 0.75rem;
    --hl-radius-md: 1rem;
    --hl-radius-lg: 1.25rem;
    --hl-radius-xl: 1.65rem;
    --hl-radius-pill: 9999px;

    --hl-font-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --hl-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --hl-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --hl-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --hl-navbar-height: 74px;
    --hl-sidebar-width: 260px;

    --hl-z-nav: 1030;
    --hl-z-btt: 1034;
    --hl-z-bottom-nav: 1036;
    --hl-z-progress: 1050;

    /* ----------------------------------------------------------------------
       Backwards-Compatible Variable Aliases (v1 -> v2)
       ---------------------------------------------------------------------- */
    --huit-blue-50: var(--hl-brand-50);
    --huit-blue-100: var(--hl-brand-100);
    --huit-blue-200: var(--hl-brand-200);
    --huit-blue-500: var(--hl-brand-vivid);
    --huit-blue: var(--hl-brand);
    --huit-blue-dark: var(--hl-brand-deep);
    --huit-blue-950: var(--hl-ink);
    --huit-cyan: var(--hl-sky);
    --huit-cyan-light: var(--hl-sky-light);
    --huit-cyan-soft: var(--hl-sky-soft);

    --orange-50: var(--hl-cta-soft);
    --orange-100: var(--hl-cta-100);
    --orange-200: var(--hl-cta-200);
    --orange-400: #FB923C;
    --orange-500: var(--hl-cta);
    --orange-600: var(--hl-cta-hover);
    --orange-700: var(--hl-cta-text);

    --white: var(--hl-surface);
    --slate-50: #F8FAFC;
    --slate-100: var(--hl-surface-muted);
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-500: var(--hl-ink-500);
    --slate-600: var(--hl-ink-600);
    --slate-700: var(--hl-ink-700);
    --slate-800: var(--hl-ink-800);
    --slate-900: var(--hl-ink);

    --color-brand: var(--hl-brand);
    --color-brand-dark: var(--hl-brand-deep);
    --color-brand-soft: var(--hl-surface-tint);
    --color-primary: var(--hl-cta);
    --color-primary-accessible: var(--hl-cta-text);
    --color-primary-hover: var(--hl-cta-deep);
    --color-primary-soft: var(--hl-cta-soft);
    --color-primary-border: var(--hl-cta-200);
    --color-surface: var(--hl-surface);
    --color-canvas: var(--hl-canvas);
    --color-text: var(--hl-ink);
    --color-text-body: var(--hl-ink-700);
    --color-text-muted: var(--hl-ink-500);
    --color-border: var(--hl-border);

    --radius-xs: var(--hl-radius-xs);
    --radius-sm: var(--hl-radius-sm);
    --radius-md: var(--hl-radius-md);
    --radius-lg: var(--hl-radius-lg);
    --radius-xl: var(--hl-radius-xl);
    --shadow-xs: var(--hl-shadow-xs);
    --shadow-sm: var(--hl-shadow-sm);
    --shadow-md: var(--hl-shadow-md);
    --shadow-lg: var(--hl-shadow-lg);
    --ease-out-expo: var(--hl-ease-out);
    --navbar-height: var(--hl-navbar-height);
}

/* ==========================================================================
   1. View Transitions API (Cross-Document MPA & Same-Document SPA)
   ========================================================================== */
@view-transition {
    navigation: auto;
}

@keyframes hl-vt-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-6px) scale(0.995);
    }
}

@keyframes hl-vt-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.996);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

::view-transition-old(root) {
    animation: 190ms var(--hl-ease-out) both hl-vt-out;
}

::view-transition-new(root) {
    animation: 250ms var(--hl-ease-out) both hl-vt-in;
}

::view-transition-group(*) {
    animation-duration: 260ms;
    animation-timing-function: var(--hl-ease-out);
}

::view-transition-old(*),
::view-transition-new(*) {
    border-radius: inherit;
}

/* ==========================================================================
   2. Base Typography, Lenis Compatibility & Canvas Foundation
   ========================================================================== */
html {
    font-size: 16px;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: clip;
}

body {
    font-family: var(--hl-font-sans);
    background-color: var(--hl-canvas);
    background-image:
        radial-gradient(ellipse 65% 40% at 8% -5%, rgba(15, 76, 129, 0.065) 0%, transparent 60%),
        radial-gradient(ellipse 55% 38% at 92% 0%, rgba(249, 115, 22, 0.055) 0%, transparent 58%),
        radial-gradient(ellipse 45% 35% at 50% 100%, rgba(14, 165, 233, 0.045) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--hl-ink-700);
    line-height: 1.65;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--hl-ink);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.24;
    text-wrap: balance;
}

code, pre, kbd, samp,
.font-mono,
.hl-mono {
    font-family: var(--hl-font-mono);
    font-variant-numeric: tabular-nums;
}

.hl-tabular,
[data-count-to] {
    font-variant-numeric: tabular-nums;
}

a {
    color: var(--hl-brand);
    text-decoration: none;
    transition: color 0.16s ease;
}

a:hover {
    color: var(--hl-cta-text);
}

img, svg {
    max-width: 100%;
}

/* Skip Link for Keyboard Accessibility */
.hl-skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 1080;
    padding: 0.65rem 1.15rem;
    background: var(--hl-ink);
    color: var(--hl-surface) !important;
    border-radius: var(--hl-radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--hl-shadow-md);
    transition: top 0.18s var(--hl-ease-out);
}

.hl-skip-link:focus {
    top: 0.75rem;
    outline: 3px solid var(--hl-cta);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Scroll Progress Bar & Floating Back-to-Top Ring
   ========================================================================== */
.hl-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: var(--hl-z-progress);
    pointer-events: none;
    background: transparent;
}

.hl-scroll-progress__bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--hl-brand) 0%, var(--hl-sky) 52%, var(--hl-cta) 100%);
    transform-origin: left center;
    transform: scaleX(var(--hl-scroll-p, 0));
    will-change: transform;
}

.hl-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: var(--hl-z-btt);
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--hl-border-strong);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    color: var(--hl-brand);
    box-shadow: var(--hl-shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.92);
    transition:
        opacity 0.24s var(--hl-ease-out),
        transform 0.24s var(--hl-ease-out),
        visibility 0.24s,
        color 0.18s ease,
        background-color 0.18s ease;
    touch-action: manipulation;
}

.hl-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.hl-back-to-top:hover {
    background: var(--hl-surface);
    color: var(--hl-cta-hover);
    transform: translateY(-2px) scale(1.04);
}

.hl-back-to-top:active {
    transform: translateY(0) scale(0.96);
}

.hl-back-to-top__ring {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    transform: rotate(-90deg);
    pointer-events: none;
}

.hl-back-to-top__track {
    fill: none;
    stroke: rgba(15, 76, 129, 0.12);
    stroke-width: 2.5;
}

.hl-back-to-top__fill {
    fill: none;
    stroke: url(#hlBttGrad);
    stroke: var(--hl-cta);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 132;
    stroke-dashoffset: 132;
    transition: stroke-dashoffset 0.08s linear;
}

.hl-back-to-top i {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    line-height: 1;
}

/* ==========================================================================
   4. Brand Buttons, Badges & Editorial Typography Helpers
   ========================================================================== */
.btn {
    touch-action: manipulation;
    font-weight: 600;
}

.btn-orange {
    background: linear-gradient(135deg, var(--hl-cta) 0%, var(--hl-cta-hover) 100%);
    border: 1px solid var(--hl-cta-hover);
    color: var(--hl-surface) !important;
    font-weight: 600;
    border-radius: var(--hl-radius-sm);
    box-shadow: 0 3px 12px rgba(249, 115, 22, 0.24);
    transition: transform 0.2s var(--hl-ease-out), box-shadow 0.2s var(--hl-ease-out), background 0.18s ease;
}

.btn-orange:hover,
.btn-orange:focus {
    background: linear-gradient(135deg, var(--hl-cta-hover) 0%, var(--hl-cta-text) 100%);
    border-color: var(--hl-cta-text);
    color: var(--hl-surface) !important;
    transform: translateY(-1px);
    box-shadow: var(--hl-shadow-cta);
}

.btn-orange:active {
    transform: translateY(0) scale(0.985);
}

.btn-outline-orange {
    border: 1.5px solid var(--hl-cta-text);
    color: var(--hl-cta-text);
    background-color: var(--hl-surface);
    font-weight: 600;
    border-radius: var(--hl-radius-sm);
    transition: all 0.2s var(--hl-ease-out);
}

.btn-outline-orange:hover,
.btn-outline-orange:focus {
    background-color: var(--hl-cta-soft);
    color: var(--hl-cta-deep);
    border-color: var(--hl-cta-deep);
    transform: translateY(-1px);
}

.btn-huit {
    background: linear-gradient(135deg, var(--hl-brand) 0%, var(--hl-brand-deep) 100%);
    border: 1px solid var(--hl-brand-deep);
    color: var(--hl-surface) !important;
    font-weight: 600;
    border-radius: var(--hl-radius-sm);
    box-shadow: 0 3px 12px rgba(15, 76, 129, 0.22);
    transition: transform 0.2s var(--hl-ease-out), box-shadow 0.2s var(--hl-ease-out), background 0.18s ease;
}

.btn-huit:hover,
.btn-huit:focus {
    background: linear-gradient(135deg, var(--hl-brand-vivid) 0%, var(--hl-brand) 100%);
    border-color: var(--hl-brand);
    color: var(--hl-surface) !important;
    transform: translateY(-1px);
    box-shadow: var(--hl-shadow-brand);
}

.btn-huit:active {
    transform: translateY(0) scale(0.985);
}

.btn-outline-huit {
    border: 1.5px solid var(--hl-brand);
    color: var(--hl-brand);
    background-color: var(--hl-surface);
    font-weight: 600;
    border-radius: var(--hl-radius-sm);
    transition: all 0.2s var(--hl-ease-out);
}

.btn-outline-huit:hover,
.btn-outline-huit:focus {
    background-color: var(--hl-surface-tint);
    color: var(--hl-brand-deep);
    border-color: var(--hl-brand-deep);
    transform: translateY(-1px);
}

.text-orange {
    color: var(--hl-cta-text) !important;
}

.text-huit {
    color: var(--hl-brand) !important;
}

.text-ink {
    color: var(--hl-ink) !important;
}

.text-gradient-huit {
    background: linear-gradient(125deg, var(--hl-ink) 0%, var(--hl-brand) 38%, var(--hl-sky) 70%, var(--hl-cta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--hl-brand);
}

.bg-orange-soft {
    background-color: var(--hl-cta-soft) !important;
    color: var(--hl-cta-text) !important;
}

.bg-huit-soft {
    background-color: var(--hl-surface-tint) !important;
    color: var(--hl-brand-deep) !important;
}

.badge-orange {
    background-color: var(--hl-cta-100);
    color: var(--hl-cta-text);
    font-weight: 600;
    border: 1px solid var(--hl-cta-200);
    letter-spacing: 0.01em;
}

.badge-huit {
    background-color: var(--hl-surface-tint);
    color: var(--hl-brand-deep);
    font-weight: 600;
    border: 1px solid var(--hl-brand-200);
    letter-spacing: 0.01em;
}

.badge {
    padding: 0.42em 0.72em;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 0.5rem;
}

/* Bootstrap 5.2 / 5.3 compatibility utilities (project ships Bootstrap 5.1.0) */
.bg-warning-subtle {
    background-color: #FEF3C7 !important;
}

.text-warning-emphasis {
    color: #92400E !important;
}

.border-warning-subtle {
    border-color: #FDE68A !important;
}

.bg-success-subtle {
    background-color: #DCFCE7 !important;
}

.text-success-emphasis {
    color: #166534 !important;
}

.border-success-subtle {
    border-color: #BBF7D0 !important;
}

.bg-danger-subtle {
    background-color: #FEE2E2 !important;
}

.text-danger-emphasis {
    color: #991B1B !important;
}

.border-danger-subtle {
    border-color: #FECACA !important;
}

.bg-info-subtle {
    background-color: #E0F2FE !important;
}

.text-info-emphasis {
    color: #075985 !important;
}

.border-info-subtle {
    border-color: #BAE6FD !important;
}

.bg-primary-subtle {
    background-color: #EFF6FF !important;
}

.text-primary-emphasis {
    color: #1E3A8A !important;
}

.border-primary-subtle {
    border-color: #BFDBFE !important;
}

.bg-secondary-subtle {
    background-color: #F1F5F9 !important;
}

.text-secondary-emphasis {
    color: #334155 !important;
}

.border-secondary-subtle {
    border-color: #CBD5E1 !important;
}

.bg-light-subtle {
    background-color: #F8FAFC !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-5 {
    border-radius: 1.5rem !important;
}

.object-fit-cover {
    object-fit: cover !important;
}

.object-fit-contain {
    object-fit: contain !important;
}

/* ==========================================================================
   5. Editorial Bento & Glass v2 Primitives
   ========================================================================== */
.hl-section {
    padding-block: clamp(1.75rem, 3.6vw, 3.25rem);
    overflow-x: clip;
    position: relative;
}

.hl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 0.55rem;
    border-radius: var(--hl-radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--hl-surface-tint);
    color: var(--hl-brand);
    border: 1px solid var(--hl-brand-100);
}

.hl-eyebrow--cta {
    background: var(--hl-cta-soft);
    color: var(--hl-cta-text);
    border-color: var(--hl-cta-200);
}

.hl-bento-card {
    background: var(--hl-surface);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    box-shadow: var(--hl-shadow-sm);
    padding: clamp(1.15rem, 2.2vw, 1.65rem);
    position: relative;
    transition:
        transform 0.24s var(--hl-ease-out),
        box-shadow 0.24s var(--hl-ease-out),
        border-color 0.22s ease;
}

.hl-bento-card:hover {
    border-color: var(--hl-border-brand);
    box-shadow: var(--hl-shadow-md);
}

.hl-bento-card--tint {
    background: linear-gradient(145deg, var(--hl-surface) 0%, var(--hl-surface-tint) 100%);
}

.hl-bento-card--dark {
    background: linear-gradient(145deg, var(--hl-ink) 0%, #102A4C 100%);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.1);
}

.hl-pill-scroll {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.hl-pill-scroll::-webkit-scrollbar {
    display: none;
}

.hl-pill-scroll > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

@media (min-width: 992px) {
    .hl-pill-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

/* ==========================================================================
   6. Floating Frosted-Glass Navbar & Brand Mark
   ========================================================================== */
.hl-header-wrap {
    position: sticky;
    top: 0;
    z-index: var(--hl-z-nav);
    padding: 0;
    transition: padding 0.25s var(--hl-ease-out);
}

.app-navbar,
.hl-floating-nav {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid var(--hl-border);
    box-shadow: var(--hl-shadow-xs);
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s var(--hl-ease-out),
        border-color 0.25s ease,
        transform 0.25s var(--hl-ease-out);
}

.app-navbar.is-scrolled,
.hl-floating-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--hl-border-brand);
    box-shadow: 0 10px 30px rgba(11, 25, 44, 0.08);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--hl-ink) !important;
    letter-spacing: -0.03em;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-mark:hover {
    color: var(--hl-brand) !important;
}

.brand-mark .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--hl-brand) 0%, var(--hl-brand-vivid) 58%, var(--hl-cta) 100%);
    color: var(--hl-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.12rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 76, 129, 0.26);
}

.brand-mark .brand-text-sub {
    display: block;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hl-ink-500);
    line-height: 1;
    margin-top: 3px;
}

.app-navbar .nav-link {
    border-radius: var(--hl-radius-pill);
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hl-ink-700) !important;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
    background-color: var(--hl-surface-tint);
    color: var(--hl-brand) !important;
}

.navbar-search-form {
    width: auto;
    flex-shrink: 0;
}

.navbar-search-group {
    width: 220px;
    background: var(--hl-canvas);
    border: 1px solid var(--hl-border-strong);
    border-radius: var(--hl-radius-pill);
    padding: 2px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-navbar .nav-link {
        padding: 0.45rem 0.6rem;
        font-size: 0.85rem;
    }

    .navbar-search-group {
        width: 175px;
    }
}

@media (min-width: 1400px) {
    .navbar-search-group {
        width: 248px;
    }
}

.navbar-search-group:focus-within {
    background: var(--hl-surface);
    border-color: var(--hl-brand);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.navbar-search-group .form-control {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: var(--hl-radius-pill) 0 0 var(--hl-radius-pill);
    padding-left: 0.95rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.navbar-search-group .form-control:focus,
.navbar-search-group .form-control:focus-visible,
.hl-hero-search .form-control:focus,
.hl-hero-search .form-control:focus-visible,
.input-group.rounded-pill .form-control:focus,
.input-group.rounded-pill .form-control:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.input-group.rounded-pill {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-group.rounded-pill:focus-within {
    border-color: var(--hl-brand) !important;
    box-shadow: 0 0 0 3.5px rgba(15, 76, 129, 0.14) !important;
}

.navbar-search-group .btn {
    border-radius: var(--hl-radius-pill) !important;
    min-width: 38px;
    min-height: 36px;
    padding: 0 0.85rem;
    box-shadow: none;
}

.hl-nav-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--hl-radius-sm);
    border: 1px solid var(--hl-border-strong);
    background: var(--hl-surface);
    color: var(--hl-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.hl-nav-toggle i {
    font-size: 1.2rem;
    line-height: 1;
}

.hl-nav-toggle:hover {
    background: var(--hl-surface-tint);
    border-color: var(--hl-brand-200);
}

.hl-nav-icon-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    flex-shrink: 0;
}

.hl-nav-icon-btn i {
    font-size: 1.1rem;
    line-height: 1;
}

@media (min-width: 1400px) {
    .hl-nav-cart-btn {
        width: auto;
        padding: 0 0.85rem !important;
    }
}

.hl-nav-user-btn {
    height: 38px;
    max-width: 190px;
    padding: 2px 10px 2px 4px !important;
}

.hl-nav-user-btn .avatar-circle {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
}

.hl-nav-auth-btn {
    height: 36px;
    padding: 0 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
}

@media (max-width: 420px) {
    .hl-nav-auth-btn {
        height: 34px;
        padding: 0 0.72rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        margin-top: 0.75rem;
        padding: 1rem;
        background: var(--hl-surface);
        border: 1px solid var(--hl-border-strong);
        border-radius: var(--hl-radius-lg);
        box-shadow: var(--hl-shadow-lg);
    }

    .app-navbar .nav-link {
        width: 100%;
        min-height: 44px;
        border-radius: var(--hl-radius-sm);
    }

    .navbar-search-form,
    .navbar-search-group {
        width: 100%;
        min-width: 0;
    }

    .navbar-search-group .form-control {
        min-height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .brand-mark {
        font-size: 1.05rem;
        gap: 0.45rem;
    }

    .brand-mark .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   7. Mobile Bottom App Bar (< 992px)
   ========================================================================== */
.hl-mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    body.has-mobile-bottom-nav {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    }

    body.has-mobile-bottom-nav .hl-back-to-top {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
        right: 1rem;
    }

    .hl-mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--hl-z-bottom-nav);
        min-height: 62px;
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        border-top: 1px solid var(--hl-border-strong);
        box-shadow: 0 -8px 26px rgba(11, 25, 44, 0.08);
    }

    .hl-mobile-bottom-nav__item {
        flex: 1 1 0;
        min-width: 0;
        min-height: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.18rem;
        padding: 0.25rem 0.2rem;
        border-radius: var(--hl-radius-sm);
        color: var(--hl-ink-500);
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
        background: transparent;
        border: 0;
        position: relative;
        transition: color 0.16s ease, background-color 0.16s ease, transform 0.12s ease;
        touch-action: manipulation;
    }

    .hl-mobile-bottom-nav__item i {
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        line-height: 1;
    }

    .hl-mobile-bottom-nav__item span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .hl-mobile-bottom-nav__item.is-active,
    .hl-mobile-bottom-nav__item:hover {
        color: var(--hl-brand);
        background: var(--hl-surface-tint);
    }

    .hl-mobile-bottom-nav__item.is-active i {
        color: var(--hl-cta);
    }

    .hl-mobile-bottom-nav__item:active {
        transform: scale(0.95);
    }
}

/* ==========================================================================
   8. Hero Sections, Glass Surfaces & Three.js 3D Canvas
   ========================================================================== */
.hero-orange {
    background: linear-gradient(135deg, var(--hl-cta-soft) 0%, var(--hl-surface) 52%, var(--hl-surface-tint) 100%);
    border: 1px solid var(--hl-cta-200);
    border-radius: var(--hl-radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--hl-shadow-sm);
}

.hero-huit-3d {
    background:
        radial-gradient(circle at 84% 24%, rgba(14, 165, 233, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 76% 84%, rgba(249, 115, 22, 0.15) 0%, transparent 46%),
        radial-gradient(circle at 10% 16%, rgba(15, 76, 129, 0.11) 0%, transparent 48%),
        linear-gradient(135deg, #F4F8FF 0%, #FFFFFF 50%, #FFF9F3 100%);
    border: 1px solid var(--hl-border-brand);
    border-radius: var(--hl-radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--hl-shadow-lg);
}

.hero-huit-3d::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 76, 129, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 85%);
    pointer-events: none;
    z-index: 0;
}

.hero-huit-3d > * {
    position: relative;
    z-index: 1;
}

#huit-hero-3d-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    touch-action: pan-y;
    user-select: none;
}

#huit-hero-3d-canvas[data-webgl-fallback="true"] {
    background:
        radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.28), rgba(15, 76, 129, 0.16) 44%, transparent 72%),
        radial-gradient(circle at 62% 58%, rgba(249, 115, 22, 0.24), transparent 56%);
    border-radius: var(--hl-radius-lg);
}

.glass-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--hl-shadow-md);
    border-radius: var(--hl-radius-md);
}

/* ==========================================================================
   9. Editorial Cards, 16:9 Course Cards & 3D Tilt Specular Glare
   ========================================================================== */
.app-card {
    background-color: var(--hl-surface);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    box-shadow: var(--hl-shadow-sm);
    transition:
        transform 0.24s var(--hl-ease-out),
        box-shadow 0.24s var(--hl-ease-out),
        border-color 0.22s ease;
}

.app-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--hl-shadow-md);
    border-color: var(--hl-border-brand);
}

.hl-course-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hl-surface-tint), var(--hl-cta-soft));
    border-top-left-radius: calc(var(--hl-radius-lg) - 1px);
    border-top-right-radius: calc(var(--hl-radius-lg) - 1px);
}

.course-thumb {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    display: block;
    background-color: var(--hl-surface-tint);
    transition: transform 0.45s var(--hl-ease-out);
}

.app-card-hover:hover .course-thumb,
.hl-course-card:hover .course-thumb {
    transform: scale(1.05);
}

.course-card-badges {
    position: absolute;
    inset: 0.7rem 0.7rem auto 0.7rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    pointer-events: none;
}

.course-cat-glass {
    padding: 0.26rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--hl-radius-pill);
    background: rgba(255, 255, 255, 0.9);
    color: var(--hl-brand-deep);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 2px 8px rgba(11, 25, 44, 0.12);
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-level-chip {
    padding: 0.26rem 0.68rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--hl-radius-pill);
    background: rgba(11, 25, 44, 0.78);
    color: var(--hl-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    pointer-events: none;
    white-space: nowrap;
}

.hl-course-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.38;
    min-height: 2.76em;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--hl-ink);
}

.hl-course-card:hover .hl-course-title a {
    color: var(--hl-brand);
}

.hl-course-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--hl-radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--hl-surface-tint);
    color: var(--hl-brand);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--hl-ease-out);
}

.hl-course-card:hover .hl-course-cta-pill {
    background: var(--hl-cta);
    color: var(--hl-surface);
    transform: translateX(2px);
}

/* Mobile horizontal swipeable course row (< 768px) instead of tall vertical stack */
@media (max-width: 767.98px) {
    .hl-course-mobile-row {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.75rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hl-course-mobile-row::-webkit-scrollbar {
        display: none;
    }

    .hl-course-mobile-row > .col {
        flex: 0 0 82% !important;
        width: 82% !important;
        max-width: 315px !important;
        scroll-snap-align: start;
    }

    .hl-course-mobile-row .hl-course-card .card-body {
        padding: 0.9rem !important;
    }

    .hl-course-mobile-row .hl-course-title {
        font-size: 0.96rem;
    }
}

/* 3D Perspective Card Tilt */
[data-tilt-3d] {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.huit-tilt-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.25s ease;
    background: radial-gradient(
        circle at var(--glare-x, 50%) var(--glare-y, 50%),
        rgba(255, 255, 255, 0.42) 0%,
        rgba(14, 165, 233, 0.08) 38%,
        transparent 70%
    );
}

[data-tilt-3d].is-tilting .huit-tilt-glare {
    opacity: 1;
}

/* ==========================================================================
   10. Scroll Reveal Choreography (Progressive Enhancement via .js-motion-ready)
   ========================================================================== */
html.js-motion-ready [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transition:
        opacity 0.56s var(--hl-ease-out),
        transform 0.56s var(--hl-ease-out);
    will-change: opacity, transform;
}

html.js-motion-ready [data-reveal="up"]:not(.is-revealed),
html.js-motion-ready [data-reveal=""]:not(.is-revealed) {
    transform: translate3d(0, 22px, 0);
}

html.js-motion-ready [data-reveal="fade"]:not(.is-revealed) {
    transform: none;
}

html.js-motion-ready [data-reveal="scale"]:not(.is-revealed) {
    transform: scale(0.95);
}

html.js-motion-ready [data-reveal="left"]:not(.is-revealed) {
    transform: translate3d(-24px, 0, 0);
}

html.js-motion-ready [data-reveal="right"]:not(.is-revealed) {
    transform: translate3d(24px, 0, 0);
}

html.js-motion-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        opacity 0.56s var(--hl-ease-out),
        transform 0.56s var(--hl-ease-out);
}

/* ==========================================================================
   11. Progress Bars, Stat Cards, Video Frame & Avatars
   ========================================================================== */
.progress-orange {
    background-color: var(--hl-cta-100);
    border-radius: var(--hl-radius-pill);
    overflow: hidden;
}

.progress-orange .progress-bar {
    background: linear-gradient(90deg, var(--hl-brand) 0%, var(--hl-sky) 48%, var(--hl-cta) 100%);
}

.stat-card {
    background: var(--hl-surface);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--hl-shadow-sm);
    transition: transform 0.22s var(--hl-ease-out), box-shadow 0.22s var(--hl-ease-out), border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hl-shadow-md);
    border-color: var(--hl-border-brand);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--hl-cta-soft) 0%, var(--hl-surface-tint) 100%);
    color: var(--hl-cta-hover);
    border: 1px solid rgba(249, 115, 22, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.video-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--hl-ink);
    border-radius: var(--hl-radius-md);
    overflow: hidden;
    box-shadow: var(--hl-shadow-md);
}

.video-frame-wrapper iframe,
.video-frame-wrapper video {
    width: 100%;
    height: 100%;
    border: 0;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--hl-brand-100), var(--hl-cta-100));
    color: var(--hl-brand-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ==========================================================================
   12. Dashboard v2 App Shell (260px Sidebar + Tablet/Mobile Offcanvas)
   ========================================================================== */
.dashboard-shell {
    display: flex;
    min-height: calc(100dvh - var(--hl-navbar-height));
    position: relative;
}

.dashboard-sidebar {
    width: var(--hl-sidebar-width);
    flex-shrink: 0;
    background-color: var(--hl-surface);
    border-right: 1px solid var(--hl-border);
}

@media (min-width: 992px) {
    .dashboard-sidebar {
        position: sticky;
        top: var(--hl-navbar-height);
        height: calc(100dvh - var(--hl-navbar-height));
        overflow-y: auto;
    }
}

.dashboard-role-banner {
    background: linear-gradient(135deg, var(--hl-surface-tint) 0%, var(--hl-cta-soft) 100%);
    border: 1px solid var(--hl-brand-100);
    border-radius: var(--hl-radius-md);
    padding: 0.85rem 0.9rem;
    margin-bottom: 1.15rem;
}

.dashboard-nav .nav-link {
    color: var(--hl-ink-700);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--hl-radius-sm);
    padding: 0.65rem 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.dashboard-nav .nav-link i {
    font-size: 1.08rem;
    color: var(--hl-ink-500);
    transition: color 0.16s ease;
}

.dashboard-nav .nav-link:hover {
    background-color: var(--hl-surface-tint);
    color: var(--hl-brand);
}

.dashboard-nav .nav-link:hover i {
    color: var(--hl-brand);
}

.dashboard-nav .nav-link.active {
    background: linear-gradient(90deg, var(--hl-surface-tint) 0%, rgba(255, 247, 237, 0.8) 100%);
    color: var(--hl-brand-deep);
    font-weight: 700;
    border-left-color: var(--hl-cta);
}

.dashboard-nav .nav-link.active i {
    color: var(--hl-cta-hover);
}

.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2rem 2.5rem;
}

.dashboard-breadcrumb-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--hl-border);
}

@media (max-width: 1199.98px) {
    .dashboard-main {
        padding: 1.25rem 1.25rem 2.25rem;
    }
}

@media (max-width: 767.98px) {
    .dashboard-main {
        padding: 1rem 0.9rem 2rem;
    }
}

/* ==========================================================================
   13. Forms, Focus States & Editorial Footer
   ========================================================================== */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(15, 76, 129, 0.42);
    outline-offset: 2px;
    box-shadow: none;
}

.form-control,
.form-select {
    border-color: var(--hl-border-strong);
    border-radius: var(--hl-radius-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--hl-brand);
    box-shadow: 0 0 0 0.22rem rgba(15, 76, 129, 0.14);
}

@media (max-width: 767.98px) {
    .form-control,
    .form-select,
    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 38px;
    }
}

.app-footer {
    margin-top: auto;
    background: linear-gradient(180deg, var(--hl-surface) 0%, #EEF3FA 100%);
    border-top: 1px solid var(--hl-border-strong);
    color: var(--hl-ink-600);
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hl-ink);
    margin-bottom: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-links a {
    color: var(--hl-ink-600);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.16s ease, transform 0.16s ease;
}

.footer-links a:hover {
    color: var(--hl-cta-text);
    transform: translateX(3px);
}

.footer-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.78rem;
    border-radius: var(--hl-radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    background-color: var(--hl-surface);
    border: 1px solid var(--hl-border-strong);
    color: var(--hl-ink-700);
    box-shadow: var(--hl-shadow-xs);
}

/* Flex & text-clamping utilities (Bootstrap 5 does not ship .min-w-0) */
.min-w-0 {
    min-width: 0 !important;
}

.hl-line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

/* ==========================================================================
   13b. Editorial Spacious Form & Page Rhythm System (taste-skill + ux-pro-max)
   ========================================================================== */
@media (min-width: 1200px) {
    .dashboard-main {
        padding: 2.25rem 2.75rem !important;
    }
}

.hl-page-head {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.hl-form-surface {
    background: var(--hl-surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 12px 32px -18px rgba(11, 25, 44, 0.1);
}

@media (min-width: 768px) {
    .hl-form-surface {
        padding: 2.25rem 2.5rem;
    }
}

.hl-form-block {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hl-form-block:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.hl-form-block__head,
.hl-form-block-head {
    margin-bottom: 1.35rem;
}

.hl-form-block__title,
.hl-form-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hl-ink);
    letter-spacing: -0.015em;
    margin-bottom: 0.25rem;
}

.hl-form-block__desc,
.hl-form-block-desc {
    font-size: 0.85rem;
    color: var(--hl-ink-500);
    margin-bottom: 0;
    line-height: 1.55;
}

.hl-form-surface .form-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--hl-ink);
    margin-bottom: 0.5rem;
    display: block;
}

.hl-form-surface .form-control,
.hl-form-surface .form-select {
    min-height: 48px;
    padding: 0.72rem 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid rgba(15, 23, 42, 0.13);
    background-color: #fbfcfe;
    color: var(--hl-ink);
    font-size: 0.94rem;
    line-height: 1.5;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.hl-form-surface .form-control:hover,
.hl-form-surface .form-select:hover {
    border-color: rgba(15, 76, 129, 0.32);
    background-color: #ffffff;
}

.hl-form-surface .form-control:focus,
.hl-form-surface .form-select:focus {
    background-color: #ffffff;
    border-color: var(--hl-brand);
    box-shadow: 0 0 0 3.5px rgba(15, 76, 129, 0.12);
}

.hl-form-surface .form-control[readonly],
.hl-form-surface .form-control:disabled {
    background-color: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--hl-ink-500);
    cursor: not-allowed;
}

.hl-form-surface textarea.form-control {
    min-height: 128px;
    padding: 0.85rem 1rem;
    line-height: 1.65;
}

.hl-form-surface .form-text {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--hl-ink-500);
    line-height: 1.45;
}

.hl-file-zone {
    border: 1.5px dashed rgba(15, 76, 129, 0.24);
    border-radius: 0.95rem;
    background: #f8fafc;
    padding: 1.25rem 1.35rem;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.hl-file-zone:hover,
.hl-file-zone:focus-within {
    border-color: var(--hl-brand);
    background: #f1f6fc;
}

.hl-file-zone input[type="file"].form-control {
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.hl-file-zone input[type="file"]::file-selector-button {
    border: 0;
    border-radius: 0.5rem;
    background: var(--hl-surface-tint);
    color: var(--hl-brand);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.4rem 0.9rem;
    margin-right: 0.85rem;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.hl-file-zone input[type="file"]::file-selector-button:hover {
    background: #dbeafe;
}

.hl-check-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: 0.9rem;
    border: 1.5px solid rgba(15, 76, 129, 0.14);
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.hl-check-card:hover {
    border-color: rgba(15, 76, 129, 0.35);
    background: #f1f6fc;
}

.hl-check-card .form-check-input {
    margin-top: 0.25rem;
    margin-left: 0;
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
}

.hl-form-footer {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hl-form-footer .btn {
    min-height: 46px;
    padding-inline: 1.5rem;
    border-radius: 0.8rem;
}

/* ==========================================================================
   13c. Editorial Data Tables & Action Button Alignment
   ========================================================================== */
.hl-bento-card .table {
    --bs-table-hover-bg: #F8FAFC;
    --bs-table-bg: transparent;
    border-color: rgba(15, 23, 42, 0.08);
}

.hl-bento-card .table > thead > tr > th {
    background-color: #F8FAFC;
    color: var(--hl-ink-700);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.85rem 0.9rem;
    border-bottom: 1.5px solid rgba(15, 23, 42, 0.1);
    vertical-align: middle;
}

.hl-bento-card .table > tbody > tr > td {
    padding: 0.95rem 0.9rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.hl-bento-card .table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.hl-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.45rem;
    white-space: nowrap;
}

.hl-table-actions--start {
    justify-content: flex-start;
}

.hl-table-btn {
    min-height: 36px;
    padding: 0.38rem 0.82rem;
    font-size: 0.84rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.hl-table-btn--icon {
    min-width: 36px;
    padding: 0.38rem 0.55rem;
}

/* ==========================================================================
   13d. Instructor Master-Detail Course Rail (Questions & Quizzes)
   ========================================================================== */
.hl-master-detail {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1199.98px) {
    .hl-master-detail {
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 991.98px) {
    .hl-master-detail {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hl-course-rail {
    background: var(--hl-surface);
    border: 1px solid var(--hl-border);
    border-radius: var(--hl-radius-lg);
    box-shadow: var(--hl-shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hl-course-rail {
        position: sticky;
        top: 92px;
        max-height: calc(100vh - 116px);
    }
}

.hl-course-rail__head {
    padding: 1.1rem 1.15rem 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    background: #F8FAFC;
}

.hl-course-rail__search {
    position: relative;
    margin-top: 0.75rem;
}

.hl-course-rail__search i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hl-ink-500);
    font-size: 0.88rem;
    pointer-events: none;
}

.hl-course-rail__search input {
    width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.8rem 0.45rem 2.2rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #FFFFFF;
    font-size: 0.85rem;
    color: var(--hl-ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hl-course-rail__search input:focus {
    outline: none;
    border-color: var(--hl-brand);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.hl-course-rail__list {
    padding: 0.65rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

@media (max-width: 991.98px) {
    .hl-course-rail__list {
        max-height: 290px;
    }
}

.hl-course-rail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.72rem 0.78rem;
    border-radius: 0.8rem;
    border: 1px solid transparent;
    color: var(--hl-ink);
    text-decoration: none;
    position: relative;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.hl-course-rail-item:hover {
    background: #F8FAFC;
    border-color: rgba(15, 76, 129, 0.16);
    color: var(--hl-ink);
}

.hl-course-rail-item.is-active {
    background: #EFF6FF;
    border-color: rgba(15, 76, 129, 0.28);
    box-shadow: 0 6px 16px -12px rgba(15, 76, 129, 0.35);
}

.hl-course-rail-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3.5px;
    border-radius: 0 4px 4px 0;
    background: var(--hl-brand);
}

.hl-course-rail-item__thumb {
    width: 58px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.45rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.hl-course-rail-item__title {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.38;
    color: var(--hl-ink);
    margin-bottom: 0.32rem;
}

.hl-course-rail-item.is-active .hl-course-rail-item__title {
    color: var(--hl-brand-deep);
}

.hl-course-rail-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
}

.hl-rail-count {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    background: #F1F5F9;
    color: #64748B;
}

.hl-rail-count--has-items {
    background: var(--hl-cta-100);
    color: var(--hl-cta-text);
}

.hl-course-rail-item.is-active .hl-rail-count--has-items {
    background: var(--hl-brand);
    color: #FFFFFF;
}

.hl-detail-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.validation-summary-valid {
    display: none !important;
}

/* ==========================================================================
   14. Mandatory prefers-reduced-motion: reduce Contract
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }

    html.js-motion-ready [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
