/* CityRP Academy Design System
   Replicates jevapi.pro neo-brutalist warm editorial palette tokens with zero hardcoded component colors.
   All foreground/background pairs exceed WCAG AA (>= 4.5:1) for low-vision & colorblind accessibility.
   Layout: 1440px viewport target, 1200px max content width, 8px spacing grid, 8px radius. */
html:root:not([data-theme=dark]) {
  --paper: #fffaf1;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --muted: #53534f;
  --accent: #b9382b;
  --accent-hover: #96271c;
  --highlight: #f5d65c;
  --line: #1c1c1e;
  --success: #24613d;
  --success-soft: #e6f4ec;
  --soft: #f0ece2;
  --radius: 8px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --space: 8px;
  --font-display: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pico-font-family: var(--font-body);
  --pico-font-size: 100%;
  --pico-background-color: var(--paper);
  --pico-color: var(--ink);
  --pico-muted-color: var(--muted);
  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent);
  --pico-primary-border: var(--ink);
  --pico-primary-hover: var(--accent-hover);
  --pico-primary-hover-background: var(--accent-hover);
  --pico-primary-focus: var(--highlight);
  --pico-border-radius: var(--radius);
  --pico-form-element-background-color: var(--surface);
  --pico-form-element-border-color: var(--ink);
  --pico-form-element-color: var(--ink);
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-focus-color: var(--highlight);
  --pico-card-background-color: var(--surface);
  --pico-card-border-color: var(--ink);
  --pico-h1-color: var(--ink);
  --pico-h2-color: var(--ink);
  --pico-h3-color: var(--ink);
  --pico-ins-color: var(--success);
  --pico-text-selection-color: var(--highlight);
  --pico-muted-border-color: var(--line);
  --pico-code-background-color: var(--soft);
  --pico-code-color: var(--ink);
  --pico-secondary-background: var(--muted);
  --pico-secondary-hover-background: var(--ink);
  --pico-spacing: 1rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3, h4, .brand { font-family: var(--font-display); color: var(--ink); }
a {
  color: var(--ink);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Buttons */
button, [type=submit], [type=button], [type=reset], [role=button], .button {
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 20px;
  min-height: 44px;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
  font-family: var(--font-display);
}
.button, button[type=submit].button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--surface);
  border-color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}
.button:hover, button[type=submit].button:hover:not(:disabled), button.button:hover:not(:disabled) {
  color: var(--surface);
  background: var(--accent-hover);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
button:disabled { cursor: not-allowed; opacity: .62; box-shadow: none; transform: none; }
.secondary, .secondary.outline, .button.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}
.secondary:hover:not(:disabled), .button.secondary:hover {
  background: var(--highlight);
  color: var(--ink);
}
.small-button { padding: 8px 16px; min-height: 44px; font-size: .875rem; }
.text-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0;
  background: none; color: var(--ink); box-shadow: none; margin: 0; font-size: .85rem;
  text-decoration: underline;
}
.text-button:hover { color: var(--accent); transform: none; box-shadow: none; }

/* Layout Shell */
.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.skip {
  position: fixed; left: 16px; top: -120px; z-index: 120;
  background: var(--highlight); color: var(--ink); padding: 12px 16px;
  border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 700;
}
.skip:focus { top: 16px; }
.site-header { border-bottom: 2px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--highlight); border: 2px solid var(--ink); border-radius: var(--radius);
  font-weight: 900; font-size: 1.15rem; box-shadow: 2px 2px 0 var(--ink);
}
.nav-links, .nav-account { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: .9rem; font-weight: 600; text-decoration: none; padding-block: 8px; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; color: var(--accent); }
.account-menu { position: relative; }
.account-menu > summary { cursor: pointer; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { content: " ▾"; font-size: .75rem; }
.account-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 210px;
  display: grid; gap: 4px; padding: 12px; border: 2px solid var(--ink);
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.account-menu-panel a, .account-menu-panel button {
  display: flex; align-items: center; min-height: 44px; width: 100%; padding: 8px 12px;
  border: 0; background: none; box-shadow: none; text-align: left; font-size: .875rem;
  font-weight: 600; color: var(--ink); text-decoration: none; justify-content: flex-start;
}
.account-menu-panel a:hover, .account-menu-panel button:hover {
  background: var(--highlight); color: var(--ink); transform: none; box-shadow: none;
}

/* Typography & Badges */
.eyebrow {
  display: inline-block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 800; margin-bottom: 12px; color: var(--ink);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--highlight);
  color: var(--ink); font-size: .75rem; font-weight: 800; letter-spacing: .04em;
}
.pill.soft { background: var(--soft); }
.pill.success { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.pill.accent { background: var(--accent); color: var(--surface); border-color: var(--ink); }
.lede { font-size: 1.125rem; color: var(--muted); line-height: 1.7; max-width: 760px; margin-top: 0; }
.small, small { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.error { color: var(--accent); font-weight: 700; font-size: .9rem; }
.notice {
  padding: 16px 20px; border: 2px solid var(--ink); background: var(--highlight);
  color: var(--ink); font-size: .9rem; border-radius: var(--radius); font-weight: 600;
}

/* Hero & Above-the-Fold Interactive Assessment */
.hero {
  padding-block: 48px 32px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.35rem, 4.2vw, 3.85rem);
  line-height: 1.07;
  letter-spacing: -.04em;
  margin: 0 0 16px;
  font-weight: 800;
}
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-block: 24px; }
.actions button, .actions .button { margin-bottom: 0; width: auto; }
.metrics-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px;
}
.metric-box {
  padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.metric-box strong { display: block; font-size: 1.4rem; line-height: 1.15; font-family: var(--font-display); }
.metric-box span { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* Benefit Contrast Strip (High-Conversion CRO) */
.contrast-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 40px;
}
.contrast-card {
  padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.contrast-card.after { background: var(--highlight); box-shadow: var(--shadow); }
.contrast-card h3 { margin-top: 0; font-size: 1.2rem; }
.contrast-card ul { margin: 12px 0 0; padding-left: 20px; }
.contrast-card li { margin-bottom: 8px; font-size: .95rem; }

/* Quiz Workbench (V2.0 Three-in-One) */
.quiz-shell {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-block: 16px 40px;
}
.quiz-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 2px solid var(--ink); background: var(--soft);
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.quiz-progress-track {
  width: 100%; height: 8px; background: var(--soft); border-bottom: 2px solid var(--ink);
}
.quiz-progress-fill {
  height: 100%; background: var(--accent); width: 6%; transition: width .2s ease;
}
.quiz-body { padding: 24px; }
.quiz-scenario-tag {
  display: inline-block; padding: 3px 10px; border: 2px solid var(--ink);
  border-radius: var(--radius); background: var(--highlight); font-size: .75rem;
  font-weight: 800; letter-spacing: .08em; margin-bottom: 12px;
}
.quiz-question {
  font-size: 1.25rem; line-height: 1.4; font-weight: 700; margin: 0 0 20px;
  font-family: var(--font-display);
}
.quiz-options { display: grid; gap: 12px; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; line-height: 1.45;
}
.quiz-option:hover:not(:disabled), .quiz-option[aria-checked="true"] {
  background: var(--highlight); color: var(--ink); transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.quiz-option-key {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--surface);
  font-weight: 800; font-size: .82rem; font-family: var(--font-display);
}
.quiz-option[aria-checked="true"] .quiz-option-key {
  background: var(--accent); color: var(--surface);
}
.quiz-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; border-top: 2px solid var(--ink); background: var(--soft);
}
.quiz-hint { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* Quiz Result Dashboard + Radar + Blurred Paywall */
.result-grid {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start;
}
.radar-card {
  padding: 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); text-align: center;
}
.radar-card svg { width: 100%; max-width: 320px; height: auto; display: block; margin-inline: auto; }
.score-bars { display: grid; gap: 10px; margin-top: 16px; }
.score-bar-row { display: grid; gap: 4px; }
.score-bar-head { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 700; }
.score-bar-track { height: 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--soft); overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--accent); }
.pro-lock-box {
  margin-top: 24px; padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--soft); position: relative;
}
.pro-blur-list {
  list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px;
}
.pro-blur-list li {
  padding: 12px 14px; border: 2px dashed var(--ink); border-radius: var(--radius);
  background: var(--surface); font-weight: 600; font-size: .9rem;
}
.exam-review-list { display: grid; gap: 12px; margin-top: 20px; }
.exam-review-item {
  padding: 16px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper);
}
.exam-review-item.correct { border-left: 8px solid var(--success); }
.exam-review-item.wrong { border-left: 8px solid var(--accent); }

/* Sections, Cards, Pricing, Articles */
.section { margin-block: 64px; }
.section-heading {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px;
}
.section h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -.035em; margin: 0 0 8px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card {
  margin: 0; border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
  border-radius: var(--radius); padding: 24px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.card h3 a { text-decoration: none; }
.card p { font-size: .92rem; color: var(--muted); margin: 0; }
.card .card-cta { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: .9rem; }

/* Pricing Ladder */
.plans {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-block: 32px;
}
.plan {
  border: 2px solid var(--ink); box-shadow: var(--shadow); border-radius: var(--radius);
  padding: 24px; background: var(--surface); display: flex; flex-direction: column;
}
.plan.featured { background: var(--highlight); }
.plan h2, .plan h3 { font-size: 1.35rem; margin: 8px 0; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin-block: 12px; }
.plan .price strong { font-size: 2.4rem; letter-spacing: -.05em; font-family: var(--font-display); }
.plan ul { padding-left: 18px; margin: 12px 0 24px; }
.plan li { font-size: .9rem; margin-bottom: 8px; }
.plan .button { margin-top: auto; width: 100%; }

/* Embedded Interactive Tool / AI Backstory Builder */
.tool-workbench {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; margin-block: 32px;
}
.tool-workbench-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 2px solid var(--ink); background: var(--soft);
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.tool-grid { display: grid; grid-template-columns: 1.05fr 1fr; }
.tool-form-pane { padding: 24px; }
.tool-output-pane {
  padding: 24px; background: var(--soft); border-left: 2px solid var(--ink);
  display: flex; flex-direction: column; gap: 12px;
}
.tool-output-box {
  padding: 18px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); white-space: pre-wrap; font-size: .92rem; line-height: 1.6;
}

/* Long-Form Editorial / SEO Guide Reading Layout */
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: var(--muted);
  margin-top: 20px; font-weight: 600;
}
.page-hero { padding-block: 36px 24px; max-width: 920px; }
.page-hero h1 { font-size: clamp(2rem, 3.8vw, 3.3rem); line-height: 1.1; letter-spacing: -.04em; margin: 8px 0 16px; }
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start;
}
.reading { min-width: 0; }
.reading section { margin-block: 36px; scroll-margin-top: 96px; }
.reading h2 { font-size: 1.65rem; letter-spacing: -.03em; margin-bottom: 12px; }
.reading h3 { font-size: 1.2rem; margin: 20px 0 8px; }
.reading p { color: var(--ink); font-size: 1rem; line-height: 1.75; }
.reading blockquote {
  margin: 20px 0; padding: 16px 20px; border-left: 6px solid var(--accent);
  border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  border-radius: var(--radius); background: var(--soft); font-weight: 600;
}
.article-toc {
  position: sticky; top: 100px; padding: 20px; border: 2px solid var(--ink);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
}
.article-toc h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.article-toc ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.article-toc a { font-size: .86rem; font-weight: 600; text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; margin-block: 20px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.table-scroll table { margin: 0; width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-scroll th { background: var(--soft); text-align: left; font-weight: 800; border-bottom: 2px solid var(--ink); padding: 12px 14px; }
.table-scroll td { border-bottom: 1px solid var(--line); padding: 12px 14px; vertical-align: top; }
.faq-list details {
  padding: 16px 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 12px;
}
.faq-list summary { font-weight: 700; cursor: pointer; font-family: var(--font-display); }
.faq-list p { margin: 12px 0 0; color: var(--muted); }

/* Auth / Account / Dialogs / Consent / Footer */
.auth-card {
  max-width: 540px; padding: 28px; border: 2px solid var(--ink);
  box-shadow: var(--shadow); background: var(--surface); border-radius: var(--radius);
  margin-block: 24px 64px;
}
dialog {
  display: block; width: min(560px, calc(100vw - 32px)); min-width: 0; height: fit-content;
  max-height: calc(100vh - 32px); margin: auto; overflow: auto; padding: 32px;
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper); border-radius: var(--radius);
}
dialog::backdrop { background: rgb(28 28 30 / .62); }
.consent-banner {
  position: fixed; bottom: 16px; left: 16px; max-width: 480px; padding: 16px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink);
  border-radius: var(--radius); z-index: 70; box-shadow: var(--shadow-sm);
  font-size: .88rem;
}
.consent-banner .actions { margin: 12px 0 0; }
.toast {
  position: fixed; right: 20px; bottom: 20px; padding: 12px 20px;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); z-index: 100; font-weight: 700; font-size: .9rem;
}
.site-footer {
  border-top: 2px solid var(--ink); padding-block: 48px 28px;
  background: var(--soft); margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-grid nav { display: grid; gap: 10px; align-content: start; }
.footer-grid nav a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.footer-grid nav a:hover { text-decoration: underline; }
.footer-disclaimer {
  margin-top: 24px; padding: 14px 16px; border: 2px solid var(--ink);
  border-radius: var(--radius); background: var(--paper); font-size: .82rem; color: var(--muted);
}
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; font-size: .84rem;
}

@media (max-width: 1024px) {
  .hero, .article-layout, .result-grid, .tool-grid { grid-template-columns: 1fr; }
  .tool-output-pane { border-left: 0; border-top: 2px solid var(--ink); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-toc { position: static; }
}
@media (max-width: 720px) {
  .container { padding-inline: 16px; }
  .site-nav { flex-wrap: wrap; padding-block: 12px; gap: 12px; min-height: auto; }
  .nav-links { width: 100%; overflow-x: auto; gap: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
  .nav-account { margin-left: auto; gap: 8px; }
  .metrics-strip, .contrast-grid, .plans, .cards, .cards-2, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 28px 20px; gap: 24px; }
  .quiz-body, .tool-form-pane, .tool-output-pane { padding: 18px; }
  .consent-banner { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
