/* ==========================================================================
   ExamPredictor.online — Global Stylesheet
   Vanilla CSS3. Mobile-first. Premium SaaS aesthetic.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --c-indigo-50: #eef2ff;
  --c-indigo-100: #e0e7ff;
  --c-indigo-200: #c7d2fe;
  --c-indigo-400: #818cf8;
  --c-indigo-500: #6366f1;
  --c-indigo-600: #4f46e5;
  --c-indigo-700: #4338ca;
  --c-blue-500: #3b82f6;
  --c-blue-600: #2563eb;
  --c-purple-500: #a855f7;
  --c-purple-600: #9333ea;

  --c-ink: #0f172a;        /* slate-900 */
  --c-ink-soft: #334155;   /* slate-700 */
  --c-muted: #64748b;      /* slate-500 */
  --c-line: #e2e8f0;       /* slate-200 */
  --c-line-soft: #f1f5f9;  /* slate-100 */
  --c-bg: #f8fafc;         /* slate-50  */
  --c-white: #ffffff;
  --c-success: #16a34a;
  --c-danger: #dc2626;

  --grad-hero: linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #9333ea 100%);
  --grad-card: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .05);
  --shadow-lg: 0 12px 32px rgba(79, 70, 229, .12), 0 4px 12px rgba(15, 23, 42, .06);
  --shadow-glow: 0 10px 40px rgba(99, 102, 241, .35);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --maxw: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-ink-soft);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-indigo-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
:focus-visible { outline: 3px solid var(--c-indigo-400); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section--tight { padding: clamp(1.5rem, 4vw, 3rem) 0; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-indigo-600); margin-bottom: .6rem;
}
.lead { font-size: 1.12rem; color: var(--c-muted); max-width: 640px; margin: 0 auto 1rem; }
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--c-indigo-600); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--c-ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad-card);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm); flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand b { color: var(--c-indigo-600); }

.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-toggle-sub {
  display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .8rem;
  border-radius: 10px; color: var(--c-ink-soft); font-weight: 600; font-size: .95rem;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-links a:hover, .nav-toggle-sub:hover { background: var(--c-indigo-50); color: var(--c-indigo-700); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--c-indigo-700); background: var(--c-indigo-50); }
.caret { width: 14px; height: 14px; transition: transform .2s ease; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 290px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease;
  max-height: 70vh; overflow-y: auto;
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown:hover .caret, .dropdown.open .caret { transform: rotate(180deg); }
.dropdown-menu a { display: block; padding: .5rem .7rem; border-radius: 8px; font-size: .9rem; font-weight: 500; }
.dropdown-group-label { padding: .6rem .7rem .3rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-muted); font-weight: 700; }

/* Mega menu — multi-column dropdown with a heading per category.
   The nav links are right-aligned, so the panel is anchored to the toggle's
   right edge and expands leftward to stay on screen. */
.dropdown-menu.mega-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(196px, 1fr));
  gap: .1rem 1.4rem;
  width: 660px;
  max-width: calc(100vw - 32px);
  padding: 1.3rem 1.4rem;
  left: auto;
  right: 0;
}
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-head {
  display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-indigo-600); font-weight: 800; padding: .1rem .6rem .55rem;
  margin-bottom: .3rem; border-bottom: 1px solid var(--c-line);
}
.mega-col a {
  display: block; padding: .5rem .6rem; border-radius: 8px; font-size: .9rem;
  font-weight: 500; color: var(--c-ink-soft);
}
.mega-col a:hover { background: var(--c-indigo-50); color: var(--c-indigo-700); text-decoration: none; }

/* Medium screens: drop to two columns so the panel stays on-screen */
@media (min-width: 761px) and (max-width: 1040px) {
  .dropdown-menu.mega-menu { grid-template-columns: repeat(2, minmax(170px, 1fr)); width: 420px; }
}

.nav-cta { background: var(--grad-card) !important; color: #fff !important; box-shadow: var(--shadow-sm); }
.nav-cta:hover { color: #fff !important; filter: brightness(1.05); }

.hamburger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--c-line); background: #fff;
  border-radius: 10px; cursor: pointer; padding: 0; place-items: center; color: var(--c-ink);
}
.hamburger svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 12px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad-card); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: #fff; color: var(--c-indigo-700); border-color: var(--c-line); box-shadow: var(--shadow-sm); }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-light:hover { color: #fff; background: rgba(255,255,255,.26); }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem .9rem; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-hero); color: #fff; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 85% 10%, rgba(255,255,255,.18), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(168,85,247,.35), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.15rem; max-width: 52ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0; }
.hero-badge { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Hero search */
.search {
  display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 14px;
  padding: .45rem .45rem .45rem .9rem; box-shadow: var(--shadow-lg); max-width: 520px;
}
.search svg { width: 20px; height: 20px; color: var(--c-muted); flex: none; }
.search input {
  flex: 1; border: 0; outline: 0; font-size: 1rem; font-family: inherit; color: var(--c-ink);
  background: transparent; min-width: 0;
}
.search-wrap { position: relative; max-width: 520px; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--c-line); border-radius: 14px; box-shadow: var(--shadow-lg);
  list-style: none; margin: 0; padding: .4rem; z-index: 30; display: none; max-height: 320px; overflow-y: auto;
}
.search-results.show { display: block; }
.search-results a { display: block; padding: .6rem .8rem; border-radius: 9px; color: var(--c-ink-soft); font-weight: 500; }
.search-results a:hover, .search-results a.active { background: var(--c-indigo-50); color: var(--c-indigo-700); text-decoration: none; }
.search-results .empty { padding: .8rem; color: var(--c-muted); font-size: .9rem; }

/* Hero illustration card */
.hero-illu { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-lg); backdrop-filter: blur(4px); }
.hero-illu .mini-card { background: #fff; border-radius: 14px; padding: 1rem 1.2rem; color: var(--c-ink);
  box-shadow: var(--shadow-md); margin-bottom: .8rem; display: flex; align-items: center; gap: .9rem; }
.hero-illu .mini-card:last-child { margin-bottom: 0; }
.hero-illu .mc-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.hero-illu .mc-num { font-weight: 800; font-size: 1.5rem; color: var(--c-ink); }
.hero-illu .mc-label { font-size: .85rem; color: var(--c-muted); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.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: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.calc-card, .post-card { position: relative; }
.calc-card:hover, .post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c-indigo-200); }
.card-link { position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.card-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .35rem; font-size: 1.18rem; }
.card p { color: var(--c-muted); font-size: .94rem; margin-bottom: 1rem; }
.card .card-foot { margin-top: auto; font-weight: 700; color: var(--c-indigo-600); font-size: .9rem;
  display: inline-flex; align-items: center; gap: .35rem; }
.card-tag { position: absolute; top: 1rem; right: 1rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: .25rem .55rem; border-radius: 999px; }
.tag-new { background: #dcfce7; color: #15803d; }
.tag-hot { background: #ffe4e6; color: #be123c; }

/* gradient icon backgrounds */
.bg-indigo { background: linear-gradient(135deg,#6366f1,#4f46e5); }
.bg-blue   { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.bg-purple { background: linear-gradient(135deg,#a855f7,#7c3aed); }
.bg-violet { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.bg-teal   { background: linear-gradient(135deg,#14b8a6,#0d9488); }
.bg-rose   { background: linear-gradient(135deg,#fb7185,#e11d48); }

/* feature list */
.feature { text-align: left; }
.feature .card-icon { margin-bottom: .9rem; }

/* ---------- Calculator widget ---------- */
.calc-shell { display: grid; grid-template-columns: 1.3fr .85fr; gap: 1.5rem; align-items: start; }
.panel {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow-md);
}
.panel h2, .panel h3 { margin-top: 0; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; color: var(--c-ink); margin-bottom: .4rem; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--c-muted); margin-top: .3rem; }
.input, select.input {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--c-line); border-radius: 11px;
  font-size: 1rem; font-family: inherit; color: var(--c-ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus { border-color: var(--c-indigo-500); box-shadow: 0 0 0 3px var(--c-indigo-100); outline: none; }
.input.invalid { border-color: var(--c-danger); box-shadow: 0 0 0 3px #fee2e2; }
.field-error { color: var(--c-danger); font-size: .82rem; margin-top: .3rem; display: none; }
.field-error.show { display: block; }
.grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* course rows table */
.rows-table { width: 100%; border-collapse: collapse; }
.rows-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-muted); font-weight: 700; padding: 0 .4rem .5rem; }
.rows-table td { padding: .3rem .4rem; vertical-align: middle; }
.rows-table .input { padding: .55rem .6rem; }
.row-del { background: #fff; border: 1.5px solid var(--c-line); border-radius: 9px; width: 38px; height: 38px;
  cursor: pointer; color: var(--c-muted); display: grid; place-items: center; }
.row-del:hover { border-color: var(--c-danger); color: var(--c-danger); }
.row-del svg { width: 16px; height: 16px; }
.col-grade { width: 34%; } .col-credit { width: 22%; } .col-name { width: auto; }
.add-row { margin-top: .9rem; }

.actions { display: flex; gap: .7rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* result panel */
.result-panel { background: var(--grad-soft); border: 1px solid var(--c-indigo-100); position: sticky; top: 88px; }
.result-big { text-align: center; padding: .5rem 0 1rem; }
.result-big .val { font-size: clamp(2.6rem, 8vw, 3.6rem); font-weight: 900; letter-spacing: -.03em;
  background: var(--grad-card); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.result-big .val.placeholder { background: none; color: var(--c-line); -webkit-text-fill-color: var(--c-line); }
.result-big .unit { color: var(--c-muted); font-weight: 600; margin-top: .4rem; }
.result-list { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px dashed var(--c-indigo-200); }
.result-list li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px dashed var(--c-indigo-200);
  font-size: .95rem; }
.result-list li span:first-child { color: var(--c-muted); }
.result-list li b { color: var(--c-ink); }
.result-grade-badge { display: inline-grid; place-items: center; min-width: 64px; padding: .35rem .9rem; border-radius: 999px;
  font-weight: 800; font-size: 1.3rem; background: #fff; color: var(--c-indigo-700); box-shadow: var(--shadow-sm); }

/* ---------- Content blocks ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--c-line); padding: .6rem .8rem; text-align: left; }
.prose th { background: var(--c-indigo-50); color: var(--c-ink); font-weight: 700; }
.prose tbody tr:nth-child(even) { background: var(--c-line-soft); }
.callout { background: var(--grad-soft); border: 1px solid var(--c-indigo-100); border-left: 4px solid var(--c-indigo-500);
  border-radius: 12px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.callout p:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: .2rem 0 1.1rem 3rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; background: var(--grad-card); color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow-sm); }

/* FAQ accordion */
.faq { border: 1px solid var(--c-line); border-radius: 12px; margin-bottom: .7rem; background: #fff; overflow: hidden; }
.faq summary { padding: 1rem 1.2rem; font-weight: 700; color: var(--c-ink); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--c-indigo-500); font-weight: 400; transition: transform .2s; }
.faq[open] summary::after { content: "\2212"; }
.faq .faq-body { padding: 0 1.2rem 1.1rem; color: var(--c-ink-soft); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* breadcrumbs */
.breadcrumb { font-size: .85rem; color: var(--c-muted); padding: 1rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumb li::after { content: "/"; margin-left: .4rem; color: var(--c-line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-indigo-600); }

/* page hero (interior) */
.page-hero { background: var(--grad-hero); color: #fff; position: relative; overflow: hidden; }
.page-hero::before { content:""; position:absolute; inset:0;
  background: radial-gradient(50% 80% at 90% 0%, rgba(255,255,255,.15), transparent 70%); }
.page-hero .container { position: relative; z-index: 1; padding: clamp(2rem,5vw,3.5rem) 0; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 60ch; font-size: 1.1rem; margin-bottom: 0; }
.page-hero .breadcrumb, .page-hero .breadcrumb a, .page-hero .breadcrumb li::after { color: rgba(255,255,255,.7); }
.page-hero .breadcrumb a:hover { color: #fff; }

/* disclaimer */
.disclaimer { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 1rem 1.2rem;
  font-size: .88rem; color: #9a3412; }
.disclaimer strong { color: #7c2d12; }

/* related calculators chips */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--c-line);
  border-radius: 999px; padding: .5rem .95rem; font-weight: 600; font-size: .9rem; color: var(--c-ink-soft); box-shadow: var(--shadow-sm); }
.chip:hover { border-color: var(--c-indigo-300); color: var(--c-indigo-700); text-decoration: none; transform: translateY(-1px); }

/* blog cards */
.post-card { padding: 0; overflow: hidden; }
.post-thumb { aspect-ratio: 16/9; background: var(--grad-card); display: grid; place-items: center; color: #fff; }
.post-thumb svg { width: 56px; height: 56px; opacity: .9; }
.post-thumb-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
/* Article feature image */
.post-feature { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); margin: 0 0 1.6rem; }
.post-body { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .8rem; color: var(--c-muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* TOC */
.toc { background: var(--c-line-soft); border: 1px solid var(--c-line); border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 1.5rem; }
.toc strong { display: block; margin-bottom: .5rem; color: var(--c-ink); }
.toc ol { margin: 0; }
.toc a { color: var(--c-ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: #cbd5e1; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #cbd5e1; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color: #fff; margin-bottom: .8rem; }
.footer-brand p { font-size: .9rem; color: #94a3b8; max-width: 40ch; }
.footer-disclaimer { border-top: 1px solid #1e293b; padding: 1.5rem 0; font-size: .82rem; color: #94a3b8; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 1.3rem 0; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem; font-size: .85rem; color: #94a3b8; }

/* ---------- Suggestion modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  position: relative; background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 450px; box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  transform: translateY(14px) scale(.97); transition: transform .22s ease;
  max-height: calc(100vh - 2rem); overflow-y: auto;
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: .85rem; right: .85rem; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--c-line); background: #fff; cursor: pointer;
  display: grid; place-items: center; color: var(--c-muted);
}
.modal-close:hover { color: var(--c-danger); border-color: var(--c-danger); }
.modal-close svg { width: 18px; height: 18px; }
.modal-icon {
  width: 56px; height: 56px; border-radius: 15px; background: var(--grad-card);
  display: grid; place-items: center; color: #fff; margin-bottom: 1.1rem; box-shadow: var(--shadow-glow);
}
.modal-icon svg { width: 28px; height: 28px; }
.modal h3 { margin: 0 0 .4rem; font-size: 1.4rem; }
.modal .lead { text-align: left; margin: 0 0 1.4rem; font-size: .98rem; max-width: none; }
.form-note { font-size: .84rem; color: var(--c-muted); margin: 1rem 0 0; text-align: center; }
.modal-success { text-align: center; }
.modal-success .lead { text-align: center; }
.modal-success .emoji { font-size: 3rem; line-height: 1; margin-bottom: .5rem; animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- 404 ---------- */
.fof { text-align: center; padding: clamp(3rem,10vw,7rem) 0; }
.fof .big { font-size: clamp(5rem, 18vw, 9rem); font-weight: 900; line-height: 1;
  background: var(--grad-card); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Utilities ---------- */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}
.hide{display:none !important}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform:none; } }
.reveal { opacity: 0; }
/* `.in` sets opacity directly so content is visible even when the entrance
   animation is disabled (e.g. prefers-reduced-motion). The animation only
   adds the motion. */
.reveal.in { opacity: 1; animation: fadeUp .6s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-illu { order: -1; max-width: 460px; }
  .calc-shell { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--c-line); padding: 1rem; gap: .2rem;
    box-shadow: var(--shadow-lg); transform: translateY(-130%); transition: transform .25s ease; max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a, .nav-toggle-sub { padding: .8rem .9rem; font-size: 1rem; width: 100%; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--c-line); border-radius: 0; margin: .2rem 0 .4rem 1rem;
    padding: 0; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .dropdown.open .dropdown-menu { max-height: 1400px; }
  .dropdown:hover .dropdown-menu { opacity:1; visibility:visible; } /* keep tap-driven on mobile */
  /* Mega menu collapses to a stacked accordion on mobile */
  .dropdown-menu.mega-menu { display: block; grid-template-columns: none; width: auto; max-width: none; padding: 0; }
  .mega-head { border-bottom: 0; color: var(--c-muted); padding: .7rem .9rem .15rem; margin: 0; }
  .mega-col a { padding: .65rem .9rem; }
  .hamburger { display: grid; }
  .nav-cta { margin-top: .4rem; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-fields { grid-template-columns: 1fr; }
  .col-name { display: none; } /* simplify course table on small screens */
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
