/* Landing pages for SEO (exams/index.html and exams/<id>/index.html).
   Mirrors the main site palette and supports the shared dark theme
   (body.dark-mode, toggled by assets/js/legal-page.js). */
body.exam-landing {
  --primary: #0f766e;
  --primary-dark: #0b5d57;
  --accent: #2dd4bf;
  --ink: #1e293b;
  --muted: #5b6b7f;
  --card: #ffffff;
  --card-border: #e3e6ea;
  --shadow: 0 1px 2px rgba(31, 39, 51, 0.05);
  --page-bg: #f1f3f5;

  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-bg) fixed;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  line-height: 1.6;
}

body.exam-landing.dark-mode {
  --primary: #2bb3a3;
  --accent: #2dd4bf;
  --ink: #f1f5f9;
  --muted: #cbd5e1;
  --card: #1a212c;
  --card-border: #28303d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --page-bg: #10141b;
}

/* Topbar — shared control-room sticky bar (full-bleed graphite, dark in both themes),
   matching the home, roadmaps, editor and privacy pages. Self-contained: the landing
   pages load only this stylesheet, so the rail tokens are scoped to the bar here. */
.exam-landing .cr-topbar {
  --rail-bg: #1d232f;
  --rail-text: #aab2c0;
  --rail-text-strong: #e8ebf0;
  --rail-line: #313947;
  --accent-bright: #2dd4bf;
  --h-radius: 10px;

  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  margin-bottom: 18px;
  background: var(--rail-bg);
  color: var(--rail-text);
  border-bottom: 1px solid var(--rail-line);
}
.exam-landing.dark-mode .cr-topbar {
  --rail-bg: #161b24;
  --rail-line: #2b3340;
}
.exam-landing .cr-topnav {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0.6rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.exam-landing .cr-topnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.exam-landing .cr-topnav-brand .logo-img { width: 26px; height: auto; }
.exam-landing .cr-topnav-brand .cr-wordmark {
  color: var(--rail-text-strong);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.exam-landing .cr-topnav-brand .logo-accent { color: var(--accent-bright); }
.exam-landing .cr-topnav-brand:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }
.exam-landing .cr-topnav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
}
.exam-landing .cr-topnav-links > a {
  color: var(--rail-text);
  text-decoration: none;
  font-size: 0.8438rem;
  font-weight: 600;
  transition: color 0.15s;
}
.exam-landing .cr-topnav-links > a:hover { color: var(--rail-text-strong); }
.exam-landing .cr-topnav-links > a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.exam-landing .cr-topnav .theme-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.exam-landing .cr-topnav .theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: var(--h-radius);
  background: transparent;
  border: 1px solid var(--rail-line);
  color: var(--rail-text);
  box-shadow: none;
  font-size: 1rem;
  transition: color 0.15s, border-color 0.15s;
}
.exam-landing .cr-topnav .theme-toggle:hover { color: var(--accent-bright); border-color: var(--accent-bright); }
.exam-landing .cr-topnav .theme-toggle:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* Main column */
.exam-landing .landing-main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

/* Breadcrumb */
.exam-landing .breadcrumbs { font-size: 0.9rem; color: var(--muted); margin: 4px 0 16px; }
.exam-landing .breadcrumbs a { color: var(--primary); text-decoration: none; }
.exam-landing .breadcrumbs a:hover { text-decoration: underline; }

/* Hero (graphite control-room band, mirrors the homepage) */
.exam-landing .landing-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 36px;
  color: #aab2c0;
  background:
    radial-gradient(520px 240px at 80% 0%, rgba(45, 212, 191, 0.09), transparent 70%),
    #1d232f;
  border: 1px solid #313947;
  border-radius: 16px;
  box-shadow: none;
}
.exam-landing .landing-hero-grid { display: grid; gap: 28px; }
.exam-landing .landing-hero-featured .landing-hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  align-items: stretch;
}
.exam-landing .landing-hero-copy { min-width: 0; }
.exam-landing .landing-hero h1,
.exam-landing .landing-hero strong { color: #e8ebf0; }
.exam-landing .landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.exam-landing .landing-hero h1 { margin: 0 0 6px; font-size: 2rem; line-height: 1.15; }
.exam-landing .landing-subhead { margin: 0 0 14px; font-size: 1.15rem; opacity: 0.92; }
.exam-landing .landing-intro { margin: 0; max-width: 640px; font-size: 1.02rem; opacity: 0.94; }
.exam-landing .hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.exam-landing .landing-trust-line {
  margin: 16px 0 0;
  color: #c5ccd8;
  font-size: 0.78rem;
  font-family: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  letter-spacing: -0.01em;
}
.exam-landing .landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  background: #2dd4bf;
  color: #08312d;
  box-shadow: none;
  transition: filter .12s ease;
}
.exam-landing .landing-cta:hover { filter: brightness(1.08); }
.exam-landing .landing-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  color: #e8ebf0;
  background: transparent;
  border: 1px solid #313947;
  transition: border-color .12s ease;
}
.exam-landing .landing-cta-ghost:hover { border-color: #aab2c0; background: transparent; }

/* AI readiness trace: the public exam blueprint presented as a developer-facing
   evaluation panel, not a generic marketing-stat card. */
.exam-landing .readiness-trace {
  align-self: stretch;
  padding: 18px;
  color: #cbd5e1;
  background: #151b25;
  border: 1px solid #3a4658;
  border-radius: 12px;
  font-family: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  box-shadow: inset 3px 0 0 #9da8ff;
}
.exam-landing .readiness-trace-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2f3948;
  color: #9da8ff;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.exam-landing .readiness-trace-head strong { color: #74e7d7; font-size: inherit; }
.exam-landing .readiness-trace h2 {
  margin: 14px 0 3px;
  color: #f5f7fb;
  font-family: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.3;
}
.exam-landing .readiness-version,
.exam-landing .readiness-reviewed { margin: 0; color: #93a0b4; font-size: 0.69rem; }
.exam-landing .readiness-domains { list-style: none; margin: 14px 0; padding: 0; }
.exam-landing .readiness-domain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #283241;
  font-size: 0.72rem;
  line-height: 1.35;
}
.exam-landing .readiness-domain:first-child { border-top: 0; }
.exam-landing .readiness-domain span { color: #cbd5e1; }
.exam-landing .readiness-domain strong { color: #74e7d7; font-size: 0.69rem; white-space: nowrap; }

/* Section cards */
.exam-landing .exam-section {
  margin-top: 22px;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.exam-landing .exam-section h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.exam-landing .exam-section h2::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 4px;
  background: var(--primary);
}

/* Facts table */
.exam-landing .exam-facts {
  margin-top: 22px;
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.exam-landing .exam-facts caption {
  text-align: left;
  font-weight: 800;
  padding: 14px 18px;
  color: var(--ink);
  background: rgba(15, 118, 110, 0.06);
}
.exam-landing.dark-mode .exam-facts caption { background: rgba(43, 179, 163, 0.14); }
.exam-landing .exam-facts th,
.exam-landing .exam-facts td { text-align: left; padding: 11px 18px; border-top: 1px solid var(--card-border); }
.exam-landing .exam-facts th { width: 46%; color: var(--muted); font-weight: 600; }

/* Lists */
.exam-landing .exam-domains,
.exam-landing .exam-modules,
.exam-landing .exam-resources,
.exam-landing .exam-crosslinks { margin: 0; padding-left: 20px; }
.exam-landing .exam-domains li,
.exam-landing .exam-modules li,
.exam-landing .exam-resources li,
.exam-landing .exam-crosslinks li { margin: 7px 0; }
.exam-landing .exam-modules { columns: 2; column-gap: 28px; }
.exam-landing .domain-weight { color: var(--primary); font-weight: 700; }
.exam-landing a { color: var(--primary); }

/* Editorial field guides and their entry cards */
.exam-landing .guide-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.exam-landing .guide-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 18px 48px 18px 18px;
  color: var(--ink);
  background: rgba(157, 168, 255, 0.07);
  border: 1px solid rgba(111, 124, 225, 0.28);
  border-radius: 10px;
  text-decoration: none;
}
.exam-landing .guide-card:hover { border-color: #7b87e8; }
.exam-landing .guide-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.exam-landing .guide-card-label {
  color: #5662b8;
  font: 700 0.68rem/1.3 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.exam-landing.dark-mode .guide-card-label { color: #aeb6ff; }
.exam-landing .guide-card strong { font-size: 1rem; line-height: 1.35; }
.exam-landing .guide-card span:last-of-type { color: var(--muted); font-size: 0.84rem; }
.exam-landing .guide-card i { position: absolute; top: 20px; right: 18px; color: #7b87e8; }

.exam-landing .guide-article { max-width: 800px; margin: 0 auto; }
.exam-landing .guide-hero {
  margin-bottom: 22px;
  padding: 34px 36px;
  color: #cbd5e1;
  background: #1d232f;
  border: 1px solid #313947;
  border-radius: 16px;
  box-shadow: inset 4px 0 0 #9da8ff;
}
.exam-landing .guide-hero .landing-kicker { margin-bottom: 18px; color: #aeb6ff; border-color: rgba(157, 168, 255, 0.45); background: rgba(157, 168, 255, 0.08); }
.exam-landing .guide-hero h1 { margin: 0 0 14px; color: #f5f7fb; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.04; letter-spacing: -0.04em; }
.exam-landing .guide-hero p { margin: 0; max-width: 680px; font-size: 1.05rem; }
.exam-landing .guide-updated { margin-top: 16px; color: #9ca8ba; font: 0.72rem/1.4 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace; }
.exam-landing .guide-section {
  margin-top: 18px;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.exam-landing .guide-section h2 { margin: 0 0 12px; font-size: 1.4rem; line-height: 1.25; }
.exam-landing .guide-section h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.exam-landing .guide-section p { margin: 10px 0; }
.exam-landing .guide-section li { margin: 8px 0; }
.exam-landing .guide-verdict { border-left: 4px solid #9da8ff; }
.exam-landing .guide-verdict strong { color: #606dcc; }
.exam-landing.dark-mode .guide-verdict strong { color: #b9c0ff; }
.exam-landing .guide-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.exam-landing .guide-table th,
.exam-landing .guide-table td { padding: 11px 12px; text-align: left; vertical-align: top; border: 1px solid var(--card-border); }
.exam-landing .guide-table th { background: rgba(157, 168, 255, 0.08); }
.exam-landing .guide-step {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--card-border);
}
.exam-landing .guide-step:first-of-type { border-top: 0; }
.exam-landing .guide-step-label { color: #5662b8; font: 800 0.72rem/1.4 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace; text-transform: uppercase; }
.exam-landing.dark-mode .guide-step-label { color: #aeb6ff; }
.exam-landing .guide-step h3 { margin: 0 0 6px; }
.exam-landing .guide-cta-block { text-align: center; background: rgba(15, 118, 110, 0.06); }
.exam-landing .guide-cta-block p { max-width: 600px; margin: 0 auto 16px; }

/* FAQ */
.exam-landing .faq-item { border-top: 1px solid var(--card-border); padding: 12px 0; }
.exam-landing .faq-item:first-of-type { border-top: none; padding-top: 0; }
.exam-landing .faq-item summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.exam-landing .faq-item summary::-webkit-details-marker { display: none; }
.exam-landing .faq-item summary::before { content: "+ "; color: var(--accent); font-weight: 800; }
.exam-landing .faq-item[open] summary::before { content: "\2013 "; }
.exam-landing .faq-item p { margin: 8px 0 0; color: var(--muted); }

/* Pro upsell */
.exam-landing .exam-pro {
  margin-top: 22px;
  padding: 24px 26px;
  background: rgba(15, 118, 110, 0.05);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
}
.exam-landing.dark-mode .exam-pro {
  background: rgba(43, 179, 163, 0.08);
  border-color: rgba(43, 179, 163, 0.3);
}
.exam-landing .exam-pro h2 { margin-top: 0; }
.exam-landing .pro-price { font-weight: 800; color: var(--primary); }
.exam-landing .pro-offer {
  max-width: 520px;
  margin: 14px 0 16px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fdf6e7;
  border: 1px solid #ecdcb8;
  border-left: 4px solid #b07d2b;
  border-radius: 8px;
}
.exam-landing.dark-mode .pro-offer {
  background: #2e271a;
  border-color: #4a3e26;
  border-left-color: #d3aa64;
}
.exam-landing .pro-offer-top,
.exam-landing .pro-offer-prices { display: flex; align-items: baseline; }
.exam-landing .pro-offer-top { justify-content: space-between; gap: 14px; }
.exam-landing .pro-offer-top span {
  color: #9b6c23;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.exam-landing.dark-mode .pro-offer-top span { color: #d3aa64; }
.exam-landing .pro-offer-top strong { color: #9b6c23; }
.exam-landing.dark-mode .pro-offer-top strong { color: #d3aa64; }
.exam-landing .pro-offer-prices { gap: 9px; margin-top: 3px; }
.exam-landing .pro-offer-prices s { color: var(--muted); font-size: 0.85rem; }
.exam-landing .pro-offer-prices strong { font-size: 1.2rem; }
.exam-landing .pro-offer-meta { margin-top: 5px; color: var(--muted); font-size: 0.76rem; }
.exam-landing .pro-offer-meta code {
  color: #9b6c23;
  background: rgba(176, 125, 43, 0.1);
  border: 1px dashed #d7bd89;
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 800;
}
.exam-landing.dark-mode .pro-offer-meta code { color: #d3aa64; border-color: #4a3e26; }
.exam-landing .pro-highlights { margin: 12px 0 18px; padding-left: 20px; }
.exam-landing .pro-highlights li { margin: 6px 0; color: var(--muted); }
.exam-landing .pro-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  box-shadow: none;
  transition: filter .12s ease;
}
.exam-landing .pro-cta:hover { filter: brightness(1.1); }
.exam-landing.dark-mode .pro-cta { color: #0d1a18; }

/* Hub grid */
.exam-landing .hub-grid {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.exam-landing .hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.exam-landing .hub-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14); }
.exam-landing .hub-code { font-weight: 800; font-size: 1.1rem; color: var(--primary); }
.exam-landing .hub-name { font-size: 0.92rem; color: var(--muted); }
.exam-landing .hub-badge {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  background: rgba(15, 118, 110, 0.1);
}

/* Footer */
.exam-landing .landing-footer {
  width: min(960px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 22px 0 40px;
}
.exam-landing .landing-footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.exam-landing .landing-footer a { color: var(--muted); text-decoration: none; }
.exam-landing .landing-footer a:hover { color: var(--primary); }

.exam-landing .guide-community-cta {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 0.92rem;
}
.exam-landing .guide-community-cta a { color: var(--primary); font-weight: 700; }
.exam-landing .guide-community-cta a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }

/* Responsive */
@media (max-width: 640px) {
  .exam-landing .landing-hero { padding: 28px 22px; }
  .exam-landing .landing-hero h1 { font-size: 1.8rem; }
  .exam-landing .landing-hero-featured .landing-hero-grid { grid-template-columns: 1fr; }
  .exam-landing .exam-modules { columns: 1; }
  .exam-landing .guide-cards { grid-template-columns: 1fr; }
  .exam-landing .guide-hero { padding: 28px 22px; }
  .exam-landing .guide-step { grid-template-columns: 1fr; gap: 4px; }
  .exam-landing .guide-table { display: block; overflow-x: auto; }
}

@media (min-width: 641px) and (max-width: 860px) {
  .exam-landing .landing-hero-featured .landing-hero-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .exam-landing .landing-cta,
  .exam-landing .landing-cta-ghost { transition: none; }
}
