/* ============================================================================
   WGU Proctored Exams — landing stylesheet (navy / light design system)
   Ported from the Faztech component library: same class names & components,
   dark-violet theme inverted to navy-blue-on-white for academic credibility.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --navy:        #0b2545;   /* primary — headings, nav, footer */
    --navy-2:      #13315c;   /* deep blue */
    --royal:       #1d4ed8;   /* royal blue — links, primary buttons */
    --royal-2:     #3b82f6;   /* bright royal — hovers, gradients */
    --sky:         #60a5fa;   /* light accent */
    --green:       #059669;   /* success / purchase accent */
    --green-deep:  #047857;
    --bg-0:        #ffffff;   /* page background */
    --bg-1:        #f5f7fb;   /* soft section background */
    --bg-2:        #e9eef7;   /* deeper soft background */
    --ink:         #0f172a;   /* body text */
    --muted:       #475569;
    --muted-2:     #64748b;
    --card:        #ffffff;
    --card-2:      #f8fafc;
    --line:        rgba(15, 23, 42, .08);
    --line-2:      rgba(15, 23, 42, .16);
    --radius:      14px;
    --radius-lg:   20px;
    --shadow:      0 1px 2px rgba(11, 37, 69, .06), 0 12px 32px -16px rgba(11, 37, 69, .18);
    --glow:        0 0 0 1px rgba(29, 78, 216, .22), 0 14px 44px -12px rgba(29, 78, 216, .28);
    --container:   1140px;
    --font:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --display:     "Space Grotesk", "Inter", sans-serif;
    /* Logo sizing — tune these two to fit the logo, nothing else needed. */
    --logo-h:      40px;
    --nav-h:       72px;
}

/* ---- reset / base -------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg-0);
    line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--royal-2); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.6vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

/* ---- layout -------------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--soft { background: var(--bg-1); }
.section__head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.eyebrow {
    display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--royal); margin-bottom: 10px;
}
.lead { font-size: 17.5px; color: var(--muted); }

/* ---- buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1;
    padding: 13px 22px; border-radius: 11px; border: 0; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: linear-gradient(135deg, var(--royal), var(--navy-2)); color: #fff; box-shadow: 0 10px 24px -10px rgba(29, 78, 216, .55); }
.btn--primary:hover { filter: brightness(1.08); color: #fff; }
.btn--navy { background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; box-shadow: 0 10px 24px -10px rgba(5, 150, 105, .5); }
.btn--navy:hover { filter: brightness(1.07); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--royal); color: var(--royal); }
.btn--ghost-light { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn--lg { padding: 16px 28px; font-size: 16.5px; border-radius: 13px; }

/* ---- header / nav -------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: var(--nav-h); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--navy); }
.nav__brand img, .nav__brand svg { height: var(--logo-h); width: auto; display: block; }
.nav__brand-text small { display: block; font-size: 11px; font-weight: 600; color: var(--muted-2); letter-spacing: .04em; }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink); font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--royal); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__login { font-weight: 600; color: var(--navy); }
.nav__m-only { display: none; }
.nav__toggle {
    display: none; background: none; border: 1.5px solid var(--line-2); border-radius: 9px;
    padding: 8px 10px; font-size: 18px; line-height: 1; color: var(--navy); cursor: pointer;
}
.nav__more { position: relative; }
.nav__more-btn { background: none; border: 0; font: inherit; font-weight: 500; font-size: 15px; color: var(--ink); cursor: pointer; padding: 0; }
.nav__more-btn:hover { color: var(--royal); }
.nav__drop {
    position: absolute; top: calc(100% + 12px); right: 0; min-width: 210px; display: none;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    padding: 8px; z-index: 60;
}
.nav__more.open .nav__drop { display: block; }
.nav__drop a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: 14.5px; }
.nav__drop a:hover { background: var(--bg-1); color: var(--royal); }

/* ---- hero ---------------------------------------------------------------- */
.hero { background:
    radial-gradient(900px 460px at 88% -10%, rgba(59, 130, 246, .14), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(11, 37, 69, .08), transparent 55%),
    linear-gradient(180deg, #f8fafd 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 72px 0 64px; }
.hero__inner h1 span { color: var(--royal); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; }
.hero__stat b { display: block; font-family: var(--display); font-size: 24px; color: var(--navy); }
.hero__stat span { font-size: 13.5px; color: var(--muted-2); }
.hero__art { text-align: center; }
.hero__art img { max-width: 420px; }

/* ---- hero photo slideshow (Saka pattern) ----------------------------------
   Injected by wgu-widgets.js when images exist at /static/images/hero/hero-N.jpg
   (or listed in WGUPE.heroImages). Without images the hero keeps its gradient. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero__slides { position: absolute; inset: 0; z-index: 0; background: #0b1120; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes heroKen {
    from { transform: scale(1.05) translate3d(0, 0, 0); }
    to   { transform: scale(1.16) translate3d(-1.6%, -1.2%, 0); }
}
.hero-slide.is-active img { animation: heroKen 22s ease-in-out infinite alternate; will-change: transform; }
/* navy scrim keeps text legible over any photo */
.hero__scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 15, 30, .62) 0%, rgba(8, 15, 30, .30) 40%, rgba(8, 15, 30, .55) 100%),
        linear-gradient(90deg, rgba(8, 15, 30, .55) 0%, rgba(8, 15, 30, .18) 55%, transparent 100%);
}
.hero__inner { position: relative; z-index: 2; }
.hero__dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px; display: flex; gap: 9px; justify-content: center; }
.hero__dots button {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .42); transition: background .2s ease, width .25s ease, border-radius .25s ease;
}
.hero__dots button:hover { background: rgba(255, 255, 255, .7); }
.hero__dots button.is-active { width: 26px; border-radius: 6px; background: #fff; }
/* photo mode: taller stage, vertically centered content */
.hero.has-slides { display: flex; align-items: center; min-height: clamp(600px, 68vh, 800px); }
.hero.has-slides > .hero__inner { width: 100%; }
/* photo mode: flip hero text to white (both themes) */
.hero.has-slides h1, .hero.has-slides h1 span { color: #fff; text-shadow: 0 2px 28px rgba(0, 0, 0, .5); }
.hero.has-slides h1 span { color: #93c5fd; }
.hero.has-slides .lead { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 14px rgba(0, 0, 0, .45); }
.hero.has-slides .hero__stat b { color: #fff; }
.hero.has-slides .hero__stat span { color: rgba(255, 255, 255, .78); }
.hero.has-slides .hero__art { display: none; }
.hero.has-slides .hero__inner { grid-template-columns: 1fr; }
.hero.has-slides .search__input { border-color: transparent; box-shadow: 0 10px 34px -8px rgba(0, 0, 0, .5); }
/* video mode: text left, showcase right (with or without photo slides) */
.hero__video:empty { display: none; }
.hero.has-video .hero__inner { grid-template-columns: 1.05fr .95fr; }
.hero.has-video .hero__art { display: none; }
.hero.has-video .hero__video { grid-column: 2; grid-row: 1; align-self: center; }
@media (max-width: 960px) {
    .hero.has-video .hero__inner { grid-template-columns: 1fr; }
    .hero.has-video .hero__video { grid-column: 1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
    .hero-slide.is-active img { animation: none; }
}

/* ---- video showcase (hero + exam pages) -----------------------------------
   Injected by wgu-widgets.js into [data-video-showcase] when videos exist at
   /static/videos/video-N.mp4. Glassy gradient frame, autoplay muted, prev/next,
   unmute, auto-advance + loop. */
.vshow {
    position: relative; padding: 10px; border-radius: 26px;
    background: linear-gradient(135deg, rgba(96, 165, 250, .55), rgba(29, 78, 216, .18) 45%, rgba(96, 165, 250, .38));
    box-shadow: 0 30px 70px -24px rgba(2, 8, 22, .75), 0 0 0 1px rgba(255, 255, 255, .12) inset;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vshow__stage { position: relative; border-radius: 18px; overflow: hidden; background: #020617; }
.vshow__stage video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vshow__label {
    position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: .02em; color: #fff;
    background: rgba(2, 6, 23, .55); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
    padding: 6px 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none;
}
.vshow__label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f87171;
    box-shadow: 0 0 0 0 rgba(248, 113, 113, .6); animation: vshowPulse 2s infinite; }
@keyframes vshowPulse { 70% { box-shadow: 0 0 0 7px rgba(248, 113, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); } }
.vshow__btn {
    position: absolute; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); cursor: pointer;
    background: rgba(2, 6, 23, .5); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background .15s, transform .15s; padding: 0;
}
.vshow__btn:hover { background: rgba(29, 78, 216, .75); transform: scale(1.07); }
.vshow__btn svg { width: 18px; height: 18px; }
.vshow__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.vshow__next { right: 12px; top: 50%; transform: translateY(-50%); }
.vshow__prev:hover, .vshow__next:hover { transform: translateY(-50%) scale(1.07); }
.vshow__mute { right: 12px; bottom: 14px; }
.vshow__count {
    position: absolute; left: 14px; bottom: 16px; z-index: 3; color: #fff; font-family: var(--display);
    font-weight: 600; font-size: 12px; background: rgba(2, 6, 23, .55); border-radius: 999px; padding: 4px 10px;
    pointer-events: none;
}
.vshow__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, .18); }
.vshow__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sky), #93c5fd); transition: width .25s linear; }
.vshow__expand { right: 12px; top: 12px; }
.vshow__stage video { cursor: zoom-in; }
/* non-hero placements (exam pages): give it breathing room */
.section .vshow, .post .vshow { max-width: 720px; margin: 0 auto; }

/* enlarged overlay (lightbox) mode */
.vshow-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; }
.vshow-overlay[hidden] { display: none; }
.vshow-overlay__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vshow-overlay__body { position: relative; z-index: 1; width: min(1100px, 92vw, calc(78vh * 16 / 9)); animation: vshowZoom .25s ease; }
@keyframes vshowZoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.vshow-overlay__close {
    position: absolute; top: 18px; right: 22px; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35); background: rgba(2, 6, 23, .55); color: #fff; font-size: 20px;
    cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .15s, transform .15s;
}
.vshow-overlay__close:hover { background: rgba(185, 28, 28, .8); transform: scale(1.07); }
.vshow--big .vshow__expand { display: none; }
.vshow--big .vshow__stage video { cursor: pointer; }
.vshow--big .vshow__btn { width: 48px; height: 48px; }
.vshow--big .vshow__btn svg { width: 21px; height: 21px; }
@media (prefers-reduced-motion: reduce) { .vshow-overlay__body { animation: none; } }

/* ---- search (exam finder) ------------------------------------------------ */
.search { position: relative; max-width: 560px; }
.search__input {
    width: 100%; padding: 15px 48px 15px 18px; font: inherit; font-size: 16px;
    color: var(--ink); background: #fff; border: 1.5px solid var(--line-2);
    border-radius: 13px; box-shadow: var(--shadow); outline: none;
}
.search__input:focus { border-color: var(--royal); box-shadow: var(--glow); }
.search__icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search__results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; display: none;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    max-height: 340px; overflow-y: auto; padding: 6px;
}
.search.open .search__results { display: block; }
.search__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: var(--ink); }
.search__item:hover, .search__item.active { background: var(--bg-1); color: var(--ink); }
.search__item .code {
    flex: 0 0 auto; font-family: var(--display); font-weight: 700; font-size: 12.5px;
    color: var(--royal); background: rgba(29, 78, 216, .08); border-radius: 7px; padding: 4px 8px;
}
.search__item .t { font-size: 14.5px; }
.search__empty { padding: 12px 14px; font-size: 14px; color: var(--muted-2); }

/* ---- cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(29, 78, 216, .35); box-shadow: var(--glow); }
.card__icon {
    width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
    font-size: 21px; border-radius: 12px; margin-bottom: 16px; color: #fff;
    background: linear-gradient(135deg, var(--royal), var(--navy-2));
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* exam card (featured / recent) */
.exam-card { display: flex; flex-direction: column; gap: 10px; }
.exam-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.exam-card .code { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--royal); background: rgba(29, 78, 216, .08); border-radius: 8px; padding: 5px 10px; }
.exam-card h3 { font-size: 16.5px; margin: 0; }
.exam-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-1); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.chip--easy { color: var(--green); background: rgba(5, 150, 105, .08); border-color: rgba(5, 150, 105, .2); }
.chip--medium { color: #b45309; background: rgba(180, 83, 9, .08); border-color: rgba(180, 83, 9, .2); }
.chip--hard { color: #b91c1c; background: rgba(185, 28, 28, .07); border-color: rgba(185, 28, 28, .2); }

/* ---- steps --------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 26px 26px 26px; box-shadow: var(--shadow); }
.step::before {
    counter-increment: step; content: counter(step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
    font-family: var(--display); font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--royal), var(--navy-2));
}
.step h3 { font-size: 17px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---- CTA band ------------------------------------------------------------ */
.cta-band {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--royal) 130%);
    border-radius: var(--radius-lg); padding: 52px 40px; text-align: center; color: #fff;
    box-shadow: 0 24px 60px -24px rgba(11, 37, 69, .55);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .82); max-width: 560px; margin: 0 auto 26px; }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; box-shadow: var(--shadow); }
.faq details[open] { border-color: rgba(29, 78, 216, .3); }
.faq summary {
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
    padding: 17px 0; font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 20px; color: var(--royal); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 14.5px; padding-bottom: 18px; margin: 0; }

/* ---- contact / forms ----------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line-2); border-radius: 10px; outline: none;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--royal); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }

/* ---- footer -------------------------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .78); margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; padding: 56px 0 40px; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img, .footer-brand svg { height: 34px; width: auto; }
.site-footer h4 { color: #fff; font-size: 14.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: rgba(255, 255, 255, .72); font-size: 14.5px; }
.footer-links a:hover { color: #fff; }
.footer-note { font-size: 13px; color: rgba(255, 255, 255, .55); max-width: 420px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: 13.5px; color: rgba(255, 255, 255, .55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---- reading progress / article layer (exam pages, Phase 2) -------------- */
.readbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 90; background: linear-gradient(90deg, var(--royal), var(--sky)); }
.post-wrap { background: var(--bg-0); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; padding: 40px 0 72px; }
.post { min-width: 0; }
.crumb { font-size: 13.5px; color: var(--muted-2); margin-bottom: 18px; }
.crumb a { color: var(--muted-2); }
.crumb a:hover { color: var(--royal); }
.post-cat { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); margin-bottom: 10px; }
.post-dek { font-size: 18px; color: var(--muted); margin: 6px 0 22px; }
.post-byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.byline-av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--royal), var(--navy-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display); }
.byline-meta { font-size: 13.5px; color: var(--muted-2); }
.byline-meta b { display: block; color: var(--navy); font-size: 14.5px; }
.post-share { display: flex; gap: 8px; margin-left: auto; }
.post-share a, .post-share button {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); cursor: pointer; font-size: 15px;
}
.post-share a:hover, .post-share button:hover { color: var(--royal); border-color: var(--royal); }
.post-share .copied { color: var(--green); border-color: var(--green); }
.post-hero { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 30px; background: linear-gradient(135deg, var(--navy), var(--royal)); }
.post-hero img { display: block; width: 100%; }
.prose { font-size: 16.5px; color: var(--ink); }
.prose h2 { margin: 1.6em 0 .6em; padding-top: .2em; }
.prose h3 { margin: 1.3em 0 .5em; }
.prose ul, .prose ol { padding-left: 24px; color: var(--ink); }
.prose li { margin-bottom: .45em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { border-left: 3px solid var(--royal); margin: 1.4em 0; padding: .2em 0 .2em 18px; color: var(--muted); }
.prose p.prose-key {
    background: rgba(29, 78, 216, .06); border: 1px solid rgba(29, 78, 216, .18);
    border-left: 4px solid var(--royal); border-radius: 10px; padding: 16px 18px; color: var(--ink);
}
.post-toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; }
.post-toc .toc-h { font-family: var(--display); font-weight: 700; color: var(--navy); margin-bottom: 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.post-toc a { display: block; color: var(--muted); padding: 5px 0; border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px; }
.post-toc a:hover { color: var(--royal); }
.post-toc a.active { color: var(--royal); border-left-color: var(--royal); font-weight: 600; }
.post-related { margin-top: 48px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column; }
.bcard:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.bcard-thumb { aspect-ratio: 1200/630; background: linear-gradient(135deg, var(--navy), var(--royal)); position: relative; }
.bcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bcard-body h3 { font-size: 16px; margin: 0; }
.bcard-body p { font-size: 14px; color: var(--muted); margin: 0; }
.bcard .more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--royal); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--ink); font-size: 14.5px;
}
.pagination a:hover { border-color: var(--royal); color: var(--royal); }
.pagination .is-current { background: var(--royal); border-color: var(--royal); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ---- page hero (inner pages) --------------------------------------------- */
.page-hero { background: linear-gradient(180deg, #f8fafd, #fff); border-bottom: 1px solid var(--line); padding: 52px 0 40px; }
.page-hero h1 { margin-bottom: 6px; }
.page-hero p { color: var(--muted); max-width: 640px; margin: 0; }

/* ---- theme toggle button -------------------------------------------------- */
.theme-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    background: transparent; border: 1.5px solid var(--line-2); color: var(--navy);
    transition: border-color .15s, color .15s, transform .15s;
}
.theme-btn:hover { border-color: var(--royal); color: var(--royal); transform: translateY(-1px); }
.theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-moon { display: block; }
html[data-theme="dark"] .theme-btn .i-sun { display: none; }

/* ---- dark theme ----------------------------------------------------------- */
html[data-theme="dark"] {
    --navy:        #dbe7ff;   /* headings flip to near-white blue */
    --navy-2:      #16294d;
    --royal:       #60a5fa;
    --royal-2:     #93c5fd;
    --sky:         #60a5fa;
    --bg-0:        #0b1120;
    --bg-1:        #0f1a30;
    --bg-2:        #16233d;
    --ink:         #e2e8f0;
    --muted:       #94a3b8;
    --muted-2:     #7c8aa0;
    --card:        #111d36;
    --card-2:      #0f1a30;
    --line:        rgba(148, 163, 184, .14);
    --line-2:      rgba(148, 163, 184, .28);
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -16px rgba(0, 0, 0, .55);
    --glow:        0 0 0 1px rgba(96, 165, 250, .3), 0 14px 44px -12px rgba(37, 99, 235, .35);
}
html[data-theme="dark"] body { background: var(--bg-0); }
html[data-theme="dark"] .site-header { background: rgba(11, 17, 32, .85); }
html[data-theme="dark"] .nav__drop,
html[data-theme="dark"] .search__input,
html[data-theme="dark"] .search__results { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .search__item:hover,
html[data-theme="dark"] .search__item.active { background: var(--bg-2); }
html[data-theme="dark"] .nav__drop a:hover { background: var(--bg-2); }
html[data-theme="dark"] .hero { background:
    radial-gradient(900px 460px at 88% -10%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(96, 165, 250, .07), transparent 55%),
    linear-gradient(180deg, #0d1526 0%, #0b1120 100%); }
html[data-theme="dark"] .page-hero { background: linear-gradient(180deg, #0d1526, #0b1120); }
html[data-theme="dark"] .hero__art svg rect[fill="#ffffff"] { fill: #111d36; }
html[data-theme="dark"] .post-share a, html[data-theme="dark"] .post-share button,
html[data-theme="dark"] .form-row input, html[data-theme="dark"] .form-row textarea,
html[data-theme="dark"] .form-row select { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .btn--ghost { color: var(--ink); }
html[data-theme="dark"] .exam-card .code,
html[data-theme="dark"] .search__item .code { background: rgba(96, 165, 250, .14); }
html[data-theme="dark"] .chip { background: var(--bg-2); }
html[data-theme="dark"] .chip--easy { color: #34d399; background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .25); }
html[data-theme="dark"] .chip--medium { color: #fbbf24; background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .25); }
html[data-theme="dark"] .chip--hard { color: #f87171; background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .25); }
html[data-theme="dark"] .site-footer { background: #0d1526; border-top: 1px solid var(--line); }
/* --navy flips light for headings in dark mode — components that used it as a
   BACKGROUND must pin the literal navy gradient instead */
html[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #0b2545 0%, #13315c 55%, #1d4ed8 130%); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .post-hero,
html[data-theme="dark"] .bcard-thumb { background: linear-gradient(135deg, #13315c, #1d4ed8); }
html[data-theme="dark"] .prose p.prose-key { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .25); border-left-color: var(--royal); }
html[data-theme="dark"] .byline-meta b { color: var(--ink); }
html[data-theme="dark"] .faq summary { color: var(--ink); }
html[data-theme="dark"] .nav__links { }
@media (max-width: 640px) {
    html[data-theme="dark"] .nav__links { background: var(--card); }
}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .hero__inner { grid-template-columns: 1fr; gap: 30px; padding: 52px 0 46px; }
    .hero__art { display: none; }
    .post-layout { grid-template-columns: 1fr; }
    .post-toc { position: static; order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    :root { --logo-h: 32px; --nav-h: 62px; }
    .section { padding: 52px 0; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .nav__links {
        display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 14px 14px;
    }
    .nav__links.is-open { display: flex; }
    .nav__links li { border-bottom: 1px solid var(--line); }
    .nav__links li:last-child { border-bottom: 0; }
    .nav__links a { display: block; padding: 13px 6px; }
    .nav__m-only { display: block; }
    .nav__toggle { display: block; }
    .nav__actions .btn { display: none; }
    .cta-band { padding: 40px 22px; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
