:root {
  --ink: #171936;
  --ink-2: #34395f;
  --paper: #e8ecf5;
  --paper-2: #f5f7fb;
  --terracotta: #6555e8;
  --gold: #ff735f;
  --sage: #22bf9e;
  --line: #cbd2e2;
  --muted: #687086;
  --success: #087b65;
  --danger: #b52f4b;
  --lime: #d9f45c;
  --lavender: #e9e5ff;
  --sky: #dff4ff;
  --surface: #ffffff;
  --shadow: 0 18px 50px rgba(23, 25, 54, .10);
  --radius: 14px;
  --shell: min(1240px, calc(100% - 48px));
}

body {
  color: var(--ink);
  background-color: var(--paper-2);
  background-image:
    linear-gradient(rgba(23, 25, 54, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 54, .035) 1px, transparent 1px);
  background-size: 36px 36px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

main { overflow: clip; }
a { text-decoration-thickness: 1px; }
:focus-visible { outline-color: var(--gold); outline-width: 3px; }

h1, h2, h3 {
  font-family: "Trebuchet MS", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.045em;
}
h1 { font-size: clamp(2.75rem, 6.6vw, 6.4rem); line-height: .96; }
h2 { font-size: clamp(1.85rem, 3.4vw, 3.35rem); line-height: 1.02; }
h3 { line-height: 1.12; }

.kicker, .eyebrow {
  color: var(--terracotta);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .7rem;
  letter-spacing: .13em;
}

.site-header {
  padding-block: 10px;
  background: rgba(245, 247, 251, .82);
  border-bottom: 0;
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 62px;
  padding: 7px 9px 7px 16px;
  border: 1px solid #292c59;
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 10px 30px rgba(23, 25, 54, .16);
}
.brand { width: 136px; }
.primary-nav { gap: 2px; font-size: .8rem; }
.primary-nav a {
  padding: 10px 12px;
  color: #e5e8f4;
  border: 0;
  border-radius: 10px;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--ink);
  background: var(--lime);
}
.menu-toggle {
  color: white;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.skip-link { background: var(--gold); color: var(--ink); }

.breadcrumbs {
  padding-top: 24px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.breadcrumbs li:not(:last-child)::after { content: "↗"; color: var(--terracotta); }

.hero {
  position: relative;
  min-height: 540px;
  grid-template-columns: minmax(0, 1.32fr) minmax(360px, .68fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(42px, 5vw, 70px);
}
.hero::before {
  content: "VTR / 01";
  position: absolute;
  top: 58px;
  right: 0;
  color: var(--muted);
  font: 700 .68rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  left: -180px;
  bottom: 16px;
  border-radius: 50%;
  background: var(--lavender);
}
.hero-copy { position: relative; }
.hero-copy h1 { max-width: 11.5ch; }
.home .hero-copy h1 { font-size: clamp(2.4rem, 4.7vw, 4rem); max-width: 15ch; }
.home .hero-actions-first { margin-top: 20px; }
.home .hero-board { min-height: 400px; }
.topic-workshop { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 36px; border-top: 1px solid var(--line); }
.topic-workshop .prose { max-width: 70ch; }
.review-options { grid-column: 1 / -1; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); }
.review-options summary { cursor: pointer; font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.answer-summary { padding: 24px; background: var(--lavender); border-left: 4px solid var(--terracotta); }
.article-toc { padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.longform-guide section, #fontes-e-revisao, #geradores-rapidos { scroll-margin-top: 100px; }
@media (max-width: 680px) {
  .topic-workshop, .review-grid { grid-template-columns: 1fr; }
  .home .hero { padding-block: 42px; }
  .home .hero::before { display: none; }
}
.hero-copy .lede { max-width: 54ch; margin-top: 28px; }
.hero-actions { margin-top: 34px; }
.trust-list {
  max-width: 620px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .72rem;
}
.trust-list li::before { content: "●"; color: var(--sage); font-size: .7em; }

.button {
  min-height: 48px;
  padding-inline: 20px;
  border-radius: 10px;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.button.primary { background: var(--ink); }
.button.primary:hover { background: var(--terracotta); }
.button.secondary { background: white; }
.button.ghost { background: rgba(255,255,255,.44); }

.hero-board {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 48px);
  color: white;
  border: 0;
  border-radius: 32px 8px 32px 8px;
  background: var(--ink);
  box-shadow: 18px 18px 0 var(--lime);
  transform: none;
}
.hero-board::before {
  inset: 14px;
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 24px 4px 24px 4px;
}
.specimen-head { color: #bfc4da; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.specimen-word {
  margin: auto 0;
  color: var(--lime);
  font-family: "Trebuchet MS", ui-sans-serif, sans-serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 800;
}
.hero-board dl div { border-color: rgba(255,255,255,.22); }
.hero-board dt, .hero-board > p { color: #c5cadc; }
.meter { background: rgba(255,255,255,.16); }
.meter span { background: var(--gold); }

.band { color: var(--ink); background: var(--lime); }
.process { gap: 0; }
.process > div {
  min-height: 170px;
  padding: 34px 28px;
  border-color: rgba(23,25,54,.16);
}
.process > div:last-child { border-color: rgba(23,25,54,.16); }
.process span { color: var(--terracotta); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.process h2 { font-size: 1.6rem; }
.process p { color: var(--ink-2); }

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 124px);
  border-top: 1px solid rgba(203,210,226,.75);
}
.section-heading { align-items: start; }
.section-heading > div { max-width: 720px; }
.text-link { color: var(--terracotta); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.value-strip { grid-template-columns: .9fr 1.1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.value-strip article {
  min-height: 250px;
  padding: 30px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
.value-strip article:nth-child(2) { background: var(--lavender); }
.value-strip article:last-child { border-right: 0; background: var(--sky); }
.value-strip strong {
  border-radius: 9px;
  color: var(--ink);
  background: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.card-grid { grid-template-columns: repeat(12, 1fr); gap: 14px; }
.card {
  grid-column: span 3;
  min-height: 280px;
  padding: 26px;
  border-radius: 10px;
  border-color: var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: none;
}
.card::before { content: ""; width: 42px; height: 5px; margin-bottom: 24px; background: var(--terracotta); }
.card:nth-child(3n + 2)::before { background: var(--sage); }
.card:nth-child(3n)::before { background: var(--gold); }
.card:hover { transform: translateY(-3px); box-shadow: 8px 8px 0 var(--lavender); }
.card h3 { font-size: 1.45rem; }
.card p:not(.eyebrow) { color: var(--muted); }

.topic-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.topic-card {
  grid-column: span 4;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.topic-card:nth-child(1) { grid-column: span 7; min-height: 270px; background: var(--lavender); }
.topic-card:nth-child(2) { grid-column: span 5; min-height: 270px; background: var(--sky); }
.topic-card:nth-child(6) { grid-column: span 12; min-height: 180px; background: var(--lime); }
.topic-card:hover { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); transform: translate(-2px, -2px); }
.topic-card span { color: var(--terracotta); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.topic-card strong { font-family: "Trebuchet MS", ui-sans-serif, sans-serif; font-size: 1.65rem; }

/* Editorial collection entrances: every link has a specific destination. */
.collection-grid .collection-card:nth-child(n) { grid-column: span 6; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.collection-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
.collection-card h3 { margin: .6rem 0 1rem; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; }
.collection-card h3 a { color: var(--ink); text-decoration: none; }
.collection-card h3 a:hover { text-decoration: underline; }
.collection-card > p:not(.kicker) { margin: 0 0 1rem; font-size: .96rem; line-height: 1.7; max-width: 65ch; color: var(--ink-2); }
.collection-scenario { margin: .25rem 0 1.2rem; padding: .9rem 1rem; border-left: 3px solid var(--terracotta); background: rgb(255 255 255 / .55); }
.collection-scenario p { margin: 0; font-size: .92rem; line-height: 1.65; }
.collection-scenario .kicker { margin-bottom: .45rem; font-size: .65rem; }
.collection-card nav { margin-top: auto; }
.collection-card nav ul { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .3rem 0 1rem; list-style: none; }
.collection-card nav a { display: inline-block; padding-block: .35rem; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.collection-card > .text-link { align-self: flex-start; }
.candidate-reading { max-width: 78ch; margin-top: 1.3rem; }
.candidate-reading h4, .analysis-grid h4 { margin: 0 0 .45rem; font-size: .97rem; color: var(--ink); }
.candidate-reading p, .analysis-grid p { margin: 0; font-size: .95rem; line-height: 1.75; }
.candidate-analysis { margin-top: 1rem; border-block: 1px solid var(--line); }
.candidate-analysis summary { padding: .9rem 0; cursor: pointer; color: var(--terracotta); font-weight: 600; }
.analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; padding: .5rem 0 1.5rem; }
.analysis-grid section:last-child { grid-column: 1 / -1; max-width: 78ch; }
.candidate-copy { margin-top: .8rem; padding: .4rem 0; text-align: left; background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; }
.candidate-reading, .analysis-grid { overflow-wrap: anywhere; }
.saved-report { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-width: 78ch; }
[data-compare-favorite] { width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; margin: 0 .5rem 0 0; flex: 0 0 auto; }
.result-item label:has([data-compare-favorite]) { display: flex; align-items: center; gap: .4rem; padding: .7rem 0; }
button[data-edit-favorite] { background: none; border: 0; padding: .6rem .8rem .6rem 0; cursor: pointer; }
.decision-options { border-left: 3px solid var(--terracotta); padding-left: 1.2rem; }
.decision-options dt { font-size: .85rem; color: var(--muted); }
.decision-options dd { margin: .3rem 0 1.2rem; font-size: 1.2rem; font-weight: 600; }
@media (max-width: 760px) {
  .collection-grid .collection-card:nth-child(n) { grid-column: 1 / -1; padding: 22px; }
  .analysis-grid { grid-template-columns: 1fr; gap: 1.1rem; }
}

.split-feature { grid-template-columns: .72fr 1.28fr; }
.note-stack { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.note-stack a {
  min-height: 95px;
  padding: 22px 26px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
}
.note-stack a:last-child { border-bottom: 0; }
.note-stack a:hover { color: white; background: var(--ink); }
.note-stack span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.source-callout {
  grid-template-columns: 1.25fr .85fr .65fr;
  gap: 32px;
  padding-inline: clamp(26px, 4vw, 52px);
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--ink);
}
.source-callout h2, .source-callout .text-link { color: var(--lime); }
.source-callout p { color: #cbd0e3; }
.source-callout .collection-scenario { grid-column: 1 / -1; background: #2b2e4f; margin: 0; }
.source-callout .collection-scenario p { color: #f1f3fc; }
.source-callout .collection-scenario .kicker { color: var(--lime); }
.generator-family-page .source-callout { grid-template-columns: 1fr 1.2fr; }
.generator-family-page .source-callout > .text-link { grid-column: 1 / -1; }
@media (max-width: 680px) {
  .generator-family-page .source-callout { grid-template-columns: 1fr; }
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(120px, .28fr) minmax(0, 1fr);
  column-gap: clamp(26px, 6vw, 86px);
  max-width: none;
  padding-block: clamp(72px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
}
.page-hero > .kicker { grid-column: 1; grid-row: 1 / span 4; padding-top: 10px; }
.page-hero > h1, .page-hero > .lede, .page-hero > .byline, .page-hero > .hero-actions { grid-column: 2; }
.page-hero h1 { max-width: 13ch; }
.page-hero .lede { margin-bottom: 0; }
.hub-page .page-hero { border-bottom-color: var(--line); }

.filter-bar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.filter-bar input { border-radius: 8px; background: var(--paper-2); }

.tool-layout {
  grid-template-columns: minmax(320px, .76fr) minmax(0, 1.24fr);
  gap: 16px;
  padding-top: 28px;
}
.tool-panel, .result-panel,
.data-query-panel, .data-results,
.lab-output, .lab-step {
  border-radius: 12px;
  box-shadow: none;
}
.tool-panel { border-color: #d4cff9; background: var(--lavender); }
.result-panel { border-color: #292c59; background: white; }
.generator-layout { display: block; padding-top: 28px; }
.generator-layout .tool-panel { padding: clamp(24px, 4vw, 42px); border-left: 8px solid var(--terracotta); background: white; }
.generator-layout #tool-form { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.generator-layout #tool-form .form-actions,
.generator-layout #tool-form .form-message { grid-column: 1 / -1; }
.generator-layout #tool-form .form-actions { align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.generator-layout .result-panel { position: static; margin-top: 24px; overflow: visible; }
.generator-layout .result-head { min-height: 96px; }
.generator-layout #tool-result { min-height: 220px; }
.result-head {
  min-height: 116px;
  padding: 26px 30px;
  color: white;
  border-bottom: 0;
  background: var(--ink);
}
.result-head .eyebrow { color: var(--lime); }
.result-head .icon-button { color: white; border-color: rgba(255,255,255,.3); }
.result-actions { background: var(--paper-2); }
.result-item { border: 1px solid var(--line); border-radius: 8px; background: white; }
.result-item strong { font-family: "Trebuchet MS", ui-sans-serif, sans-serif; }

input, textarea, select {
  min-height: 48px;
  border-color: #aeb7cb;
  border-radius: 8px;
  background: white;
}
input:focus, textarea:focus, select:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(101,85,232,.12); }

.article-layout {
  grid-template-columns: minmax(230px, 300px) minmax(0, 760px);
  justify-content: start;
  gap: clamp(42px, 8vw, 110px);
  padding-top: clamp(42px, 6vw, 78px);
}
.article-layout > article { grid-column: 2; grid-row: 1; }
.article-layout > .side-note { grid-column: 1; grid-row: 1; }
.prose { font-size: 1.075rem; }
.prose h2 { padding-top: .35em; }
.side-note {
  top: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 10px;
  background: var(--sky);
}
.side-note::before {
  content: "CONTEXTO / NOTA";
  display: block;
  margin: -24px -24px 22px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  font: 700 .64rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}
.steps li::before { color: var(--terracotta); border-color: var(--sage); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.worked-example, .notice, .data-disclosure { border: 0; border-left: 6px solid var(--gold); border-radius: 0 10px 10px 0; background: #fff0ed; }
.guide-workbook, .flagship-section { border-radius: 10px; box-shadow: none; }
.guide-workbook { border-color: #d4cff9; background: var(--lavender); }
.flagship-section { border: 0; border-left: 8px solid var(--terracotta); background: white; box-shadow: var(--shadow); }
.flagship-summary { font-family: "Trebuchet MS", ui-sans-serif, sans-serif; }
.deliverable { border-radius: 8px; background: var(--ink); }

.faq-list { grid-template-columns: 1fr; max-width: 920px; }
.faq-list details { padding: 22px 24px; border-radius: 9px; background: white; }
.faq-list details[open] { border-color: var(--terracotta); box-shadow: 5px 5px 0 var(--lavender); }

.lab-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
.lab-layout .lab-output { position: static; width: 100%; min-width: 0; }
.lab-layout .lab-report { max-height: none; overflow: visible; }
.lab-step { border-color: var(--line); background: white; }
.lab-step:nth-child(2) { background: var(--lavender); }
.lab-step:nth-child(3) { background: var(--sky); }
.step-marker { border-radius: 9px; background: var(--terracotta); }
.lab-output { border-color: #292c59; }
.local-badge, .source-badge { color: var(--ink); background: var(--lime); }
.candidate-matrix article { background: white; }

.data-layout { grid-template-columns: minmax(310px, .65fr) minmax(0, 1.35fr); gap: 16px; padding-top: 28px; }
.data-query-panel { border-color: #d4cff9; background: var(--lavender); }
.data-results { border-color: #292c59; }
.data-disclosure { background: white; }
.name-data-card { border-radius: 9px; }
.name-data-card > header { color: white; background: var(--ink); }
.name-data-card > header .eyebrow { color: var(--lime); }
.metric-grid div:nth-child(2) { background: var(--lavender); }
.metric-grid div:nth-child(3) { background: var(--sky); }
.decade-row i { background: var(--terracotta); }
.sex-bars i { background: var(--sage); }

.search-shell { padding-top: 36px; }
.site-search { border-radius: 10px; background: var(--lavender); }
.search-results article { border-radius: 9px; }

.generator-shortcuts .section-heading p:last-child { max-width: 58ch; color: var(--muted); }
.shortcut-directory { border-top: 2px solid var(--ink); }
.shortcut-group {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(0, 1.4fr) auto;
  gap: clamp(20px, 4vw, 54px);
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.shortcut-group header span { color: var(--terracotta); font-size: .75rem; font-weight: 750; }
.shortcut-group h3 { max-width: 18ch; margin: .3rem 0 0; font-size: 1.3rem; letter-spacing: -.025em; }
.home .hero-intro { max-width: 62ch; margin: 1rem 0 1.5rem; color: var(--ink-2); font-size: 1rem; line-height: 1.75; }
.home .section-heading > div > p:not(.kicker) { max-width: 72ch; line-height: 1.75; }
.shortcut-context { max-width: 46ch; margin: .8rem 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.7; }
.home-scenario { display: grid; grid-template-columns: minmax(200px, .65fr) minmax(0, 1.35fr); gap: clamp(1.5rem, 5vw, 4.5rem); padding: 2.5rem 0; border-top: 1px solid var(--line); }
.home-scenario h3 { max-width: 22ch; margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; }
.home-scenario-copy { max-width: 70ch; font-size: 1rem; line-height: 1.8; }
.home-scenario-copy > p:first-child { margin-top: 0; }
.home-practice { padding: 1rem 1.2rem; border-left: 3px solid var(--terracotta); background: var(--lavender); }
.home-faq-list { max-width: 900px; }
.home-faq-list details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.home-faq-list summary { cursor: pointer; padding: .35rem 0; font-weight: 700; color: var(--ink); }
.home-faq-list p { max-width: 74ch; margin: .8rem 0 .5rem; line-height: 1.8; }
@media (max-width: 680px) {
  .home-scenario { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; }
  .home-scenario h3 { max-width: 28ch; }
}
.shortcut-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.shortcut-group li { border-bottom: 1px dotted var(--line); }
.shortcut-group li a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; }
.shortcut-group li a:hover { color: var(--terracotta); }
.shortcut-more { align-self: center; color: var(--ink-2); font-size: .8rem; font-weight: 750; white-space: nowrap; }

.site-footer {
  padding-top: 78px;
  color: white;
  background: var(--ink);
  border-top: 10px solid var(--lime);
}
.site-footer img { filter: none; }
.footer-grid { grid-template-columns: 1.2fr .8fr .8fr; }
.footer-grid h2 { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.footer-grid p { color: #cbd0e3; }
.footer-grid a { color: #eef0fb; }
.footer-grid a:hover { color: var(--lime); }

@media (max-width: 1080px) {
  .primary-nav { gap: 0; }
  .primary-nav a { padding-inline: 9px; }
  .card { grid-column: span 6; min-height: 230px; }
  .tool-layout, .data-layout, .lab-layout { grid-template-columns: 1fr; }
  .result-panel, .lab-output { position: static; }
  .source-callout { grid-template-columns: 1fr 1fr; }
  .source-callout > :last-child { grid-column: 1 / -1; }
  .generator-layout #tool-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shortcut-group { grid-template-columns: minmax(170px, .7fr) 1.3fr; }
  .shortcut-more { grid-column: 2; }
}

@media (max-width: 960px) {
  .primary-nav {
    top: 76px;
    left: 24px;
    right: 24px;
    padding: 10px;
    border-color: #292c59;
    border-radius: 14px;
    background: var(--ink);
  }
  .primary-nav a { color: white; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-board { min-height: 420px; max-width: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-layout > article, .article-layout > .side-note { grid-column: 1; grid-row: auto; }
  .article-layout > .side-note { order: -1; }
  .topic-card:nth-child(n) { grid-column: span 6; min-height: 220px; }
}

@media (max-width: 680px) {
  :root { --shell: min(100% - 28px, 1240px); }
  body { background-size: 28px 28px; }
  .site-header { padding-block: 7px; }
  .header-inner { min-height: 56px; border-radius: 14px; }
  .brand { width: 122px; }
  h1 { font-size: clamp(2.6rem, 14vw, 4.2rem); }
  .hero { padding-block: 72px 92px; }
  .hero::before { top: 34px; }
  .hero-board { min-height: 390px; padding: 26px; box-shadow: 10px 10px 0 var(--lime); }
  .specimen-word { font-size: 2.8rem; }
  .process, .value-strip, .source-callout, .footer-grid { grid-template-columns: 1fr; }
  .process > div, .value-strip article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(23,25,54,.15); }
  .process > div:last-child, .value-strip article:last-child { border-bottom: 0; }
  .card { grid-column: 1 / -1; min-height: 230px; }
  .topic-card:nth-child(n) { grid-column: 1 / -1; min-height: 200px; }
  .page-hero { display: block; padding-block: 58px 44px; }
  .page-hero > .kicker { margin-bottom: 18px; padding: 0; }
  .page-hero h1 { max-width: none; }
  .tool-layout, .data-layout, .lab-layout { padding-top: 16px; }
  .tool-panel, .data-query-panel { padding: 20px; }
  .result-head { min-height: 96px; padding: 22px; }
  #tool-result { padding: 20px; }
  .source-callout > :last-child { grid-column: auto; }
  .footer-grid { gap: 34px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .generator-layout #tool-form { grid-template-columns: 1fr; }
  .generator-layout #tool-form label,
  .generator-layout #tool-form .form-actions,
  .generator-layout #tool-form .form-message { grid-column: 1; }
  .shortcut-group { display: block; padding: 22px 0; }
  .shortcut-group ul { grid-template-columns: 1fr; margin: 14px 0 16px; }
  .shortcut-more { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .topic-card, .button { transition: none; }
}

.result-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.4rem 0 .35rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result-toolbar p { max-width: 42ch; margin: 0; color: var(--muted); font-size: .86rem; }
.result-toolbar label { min-width: 190px; }
.result-toolbar label span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .72rem; }
.result-toolbar select { width: 100%; min-height: 40px; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }

.candidate-ledger { border-bottom: 1px solid var(--line); }
.candidate-row {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.2fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.candidate-row:last-child { border-bottom: 0; }
.candidate-identity h3 { margin: .35rem 0 .5rem; color: var(--ink); font-size: 1.35rem; letter-spacing: -.025em; }
.candidate-identity p { margin: 0 0 .65rem; color: var(--muted); font-size: .8rem; }
.candidate-identity small { display: block; color: var(--ink-2); line-height: 1.5; }
.candidate-route { color: var(--terracotta); font-size: .72rem; font-weight: 700; }
.candidate-score-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.candidate-score-head span { color: var(--muted); font-size: .75rem; }
.candidate-score-head strong { color: var(--terracotta); font-size: 1.1rem; }
.candidate-evidence dl { display: grid; gap: 0; margin: .5rem 0 .9rem; }
.candidate-evidence dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; border-bottom: 1px dotted var(--line); }
.candidate-evidence dt, .candidate-evidence dd { margin: 0; font-size: .78rem; }
.candidate-evidence dt { display: grid; gap: .1rem; }
.candidate-evidence dt small { max-width: 46ch; color: var(--muted); font-size: .68rem; font-weight: 450; line-height: 1.35; }
.candidate-evidence dd { color: var(--success); font-weight: 750; }
.candidate-evidence .icon-button { min-height: 38px; }
.naming-candidate { display: block; padding: 1.5rem 0 1.75rem; }
.naming-candidate .candidate-identity { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.naming-candidate .candidate-identity h3 { max-width: 40ch; font-size: clamp(1.35rem, 2.4vw, 1.8rem); overflow-wrap: anywhere; }
.naming-candidate .candidate-identity button { flex-shrink: 0; }
.candidate-construction { max-width: 76ch; margin: .5rem 0 1rem; color: var(--ink-2); }
.candidate-preview { max-width: 76ch; margin: 0 0 1rem; padding: .8rem 1rem; border-left: 3px solid var(--terracotta); background: var(--paper-2); color: var(--ink); font-size: 1.02rem; overflow-wrap: anywhere; }

.tier-notice, .flagship-tool, .flagship-result { border: 1px solid var(--line); background: var(--paper-2); }
.tier-notice { max-width: 1120px; margin: 24px auto; padding: clamp(22px, 4vw, 38px); }
.tier-notice h2 { margin: .25rem 0 .7rem; }
.flagship-tool { margin-top: 28px; padding: clamp(24px, 5vw, 48px); border-left: 6px solid var(--terracotta); }
.flagship-tool .steps { max-width: 78ch; }
.flagship-result { margin-bottom: 26px; padding: 22px; border-top: 5px solid var(--sage); }
.flagship-result h3 { max-width: 34ch; }
.flagship-result dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.flagship-result dl div { padding: 12px; background: white; }
.flagship-result dt { font-weight: 800; }
.supporting-scenarios ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.supporting-scenarios li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.supporting-scenarios li:nth-child(odd) { padding-right: 24px; }
.supporting-scenarios li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.supporting-scenarios span { color: var(--muted); }
@media (max-width: 700px) {
  .flagship-result dl, .supporting-scenarios ul { grid-template-columns: 1fr; }
  .supporting-scenarios li:nth-child(odd), .supporting-scenarios li:nth-child(even) { padding: 14px 0; border-left: 0; }
}
.candidate-facts { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .8rem; }
.candidate-notes { margin-top: .8rem; max-width: 76ch; font-size: .9rem; }
.candidate-notes summary, .result-method summary { cursor: pointer; color: var(--ink-2); padding-block: .35rem; }
.candidate-notes p { margin: .6rem 0; }
.candidate-ledger + .result-method { margin-top: 1.5rem; }
@media (max-width: 560px) {
  .naming-candidate .candidate-identity { flex-wrap: wrap; gap: .5rem; }
  .candidate-preview { padding: .7rem .8rem; }
}
.result-method { padding: 1rem 1.1rem; border-left: 4px solid var(--gold); background: rgba(101,85,232,.06); }
.tool-depth .article-layout { margin-top: 2rem; }
.tool-related-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.longform-guide > section { margin-top: 3.4rem; }
.longform-guide > section h2 { max-width: 22ch; }
.page-specific-depth { border-top: 1px solid var(--line); }
.depth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--paper); }
.depth-grid > article { min-width: 0; padding: clamp(20px, 3vw, 34px); border-bottom: 1px solid var(--line); }
.depth-grid > article:nth-child(odd) { border-right: 1px solid var(--line); }
.depth-grid > article:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.depth-grid h3 { margin-top: 0; max-width: 24ch; }
.depth-grid p:last-child { margin-bottom: 0; }
.depth-grid ol { padding-left: 1.25rem; }
.depth-grid li + li { margin-top: .65rem; }
.hub-depth .side-note ol { display: grid; gap: 1rem; padding: 0; list-style: none; }
.hub-depth .side-note li { display: grid; grid-template-columns: 2rem 1fr; align-items: start; gap: .6rem; }
.hub-depth .side-note li span { color: var(--accent); font: 700 .75rem/1.8 var(--mono); letter-spacing: .08em; }
.case-depth > h2[data-depth] { margin-top: 3.2rem; }

@media (max-width: 680px) {
  .result-toolbar { display: block; }
  .result-toolbar label { display: block; margin-top: .85rem; }
  .candidate-row { grid-template-columns: 1fr; gap: 1rem; }
  .tool-related-list { grid-template-columns: 1fr; }
  .depth-grid { grid-template-columns: 1fr; }
  .depth-grid > article, .depth-grid > article:nth-child(odd), .depth-grid > article:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .depth-grid > article:last-child { border-bottom: 0; }
}
