/* ==========================================================================
   BecSpec — design system
   The interface is the identity. Restraint is the point: thin rules, real
   whitespace, typography doing the work, accent used as a signal not a mood.
   ========================================================================== */

:root {
  /* Surfaces — light-first, paper before white. */
  --paper:        #F8F8F5;
  --surface:      #FFFFFF;
  --surface-sunk: #F2F2EE;
  --navy:         #0E1A24;
  --navy-soft:    #16242F;

  /* Ink */
  --ink:    #10171E;
  --ink-2:  #4A5560;
  --ink-3:  #7C8792;
  --ink-4:  #A6AEB6;

  /* Rules — thin, and lighter than you think they should be. */
  --rule:        #E3E5E0;
  --rule-strong: #CDD0C9;

  /* Accent. Functional only: active state, confirmed match, primary action. */
  --accent:       #B7D335;
  --accent-deep:  #7E9A14;   /* accent legible as text on light surfaces */
  --accent-wash:  #F2F7DC;

  /* Verdict colours. Deliberately not red/green — nothing here is pass/fail. */
  --confirm:      #4F7A1F;
  --confirm-wash: #F1F6E4;
  --differ:       #9A6414;
  --differ-wash:  #FBF3E4;
  --verify:       #4A6478;
  --verify-wash:  #EDF2F6;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, "SF Mono", "Roboto Mono", Consolas, monospace;

  --maxw: 1440px;
  --gut: 32px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(16, 23, 30, .05), 0 8px 24px rgba(16, 23, 30, .04);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.021em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* Values, model numbers, codes — anything you'd read off a nameplate. */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Small caps section labels, the spine of the technical look. */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------------ header */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.masthead .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }

/* Brand lockup: mark + wordmark, sharing one link so they always move together. */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

/* Two overlapping requirement-boxes with the region that satisfies both picked
   out in the accent — literally what every selector's matching engine does. */
.brand__mark {
  width: 26px; height: 26px; flex: none;
  fill: none; stroke: var(--ink); stroke-width: 2.3;
}
.brand__m { stroke: none; fill: var(--accent-deep); }
.brand--foot .brand__mark { stroke: #fff; }
.brand--foot .brand__m { fill: var(--accent); }

.wordmark {
  font-size: 27px; font-weight: 700; letter-spacing: -.035em;
  text-decoration: none; white-space: nowrap;
}
.wordmark em { font-style: normal; color: var(--accent-deep); }
.tagline {
  font-size: 14px; color: var(--ink-2); border-left: 1px solid var(--rule);
  padding-left: 18px; margin-left: 2px;
}

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Selector menu — one control, so the header does not grow with the roadmap. */
.navmenu { position: relative; }
.navmenu > summary {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 7px 13px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  cursor: pointer; list-style: none; white-space: nowrap; background: var(--surface);
}
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary:hover { border-color: var(--ink-4); background: var(--surface-sunk); }
.navmenu > summary svg { color: var(--ink-3); transition: transform .14s ease; }
.navmenu[open] > summary { border-color: var(--ink-4); }
.navmenu[open] > summary svg { transform: rotate(180deg); }

.navmenu__panel {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 60;
  min-width: 310px; padding: 6px;
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); box-shadow: 0 4px 8px rgba(16,23,30,.06), 0 16px 40px rgba(16,23,30,.10);
  display: flex; flex-direction: column; gap: 2px;
}
.navmenu__panel a {
  display: block; padding: 10px 12px; border-radius: 4px;
  border-bottom: 0; text-decoration: none;
}
.navmenu__panel a:hover { background: var(--surface-sunk); border-bottom: 0; }
.navmenu__panel a[aria-current="page"] { background: var(--accent-wash); border-bottom: 0; }
.navmenu__name { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.navmenu__lede { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ button */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .13s ease, border-color .13s ease, color .13s ease;
}
.btn--primary { background: var(--accent); color: #1B2408; border-color: #A6C226; }
.btn--primary:hover { background: #C2DC48; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-soft); }
.btn--quiet { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn--quiet:hover { border-color: var(--ink-4); background: var(--surface-sunk); }
.btn--link {
  background: none; padding: 0; color: var(--ink-2); font-weight: 500;
  border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0;
}
.btn--link:hover { color: var(--ink); border-bottom-color: var(--accent); }
.btn:focus-visible, .field input:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--accent-deep); outline-offset: 2px;
}
/* A disabled action must not read as an available one. */
.btn:disabled {
  background: var(--surface-sunk); color: var(--ink-4);
  border-color: var(--rule); cursor: not-allowed;
}
.btn:disabled:hover { background: var(--surface-sunk); }

/* -------------------------------------------------------------------- hero */

.hero { background: var(--paper); border-bottom: 1px solid var(--rule); padding: 56px 0 44px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: 56px; align-items: start; }

.hero h1 { font-size: clamp(38px, 4vw, 55px); letter-spacing: -.032em; line-height: 1.04; }
.hero .lede { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 42ch; }
.hero .lede strong { color: var(--ink); font-weight: 600; }

/* Technical figure: product outline + dimension rules. Informative, not decorative. */
.figure {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--ink-3);
}

/* ------------------------------------------------------------------ search */

.searchcard {
  margin-top: 30px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.searchcard__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--rule); background: var(--surface);
}
.searchcard__body { padding: 20px; }

.fieldrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }

.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  padding: 9px 11px; background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.field input::placeholder { color: var(--ink-4); }
.field input:hover, .field select:hover { border-color: var(--ink-4); }

.fieldrow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.fieldgroup__hint { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }

.popular { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.popular .eyebrow { margin-right: 4px; }
.chip {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule-strong); color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }

/* Progressive disclosure — advanced specs stay out of the way until wanted. */
.advanced { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 16px; }
.advanced[hidden] { display: none; }
.advanced .fieldrow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.disclose {
  margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.disclose:hover { color: var(--ink); }
.disclose svg { transition: transform .15s ease; }
.disclose[aria-expanded="true"] svg { transform: rotate(90deg); }

/* ----------------------------------------------------------------- results */

.results { padding: 36px 0 56px; }
.results__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.count {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent-deep); border: 1px solid #DCE9AE;
}
.results__layout { display: grid; grid-template-columns: 232px minmax(0, 1fr) 268px; gap: 22px; align-items: start; }

.panel {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel__head {
  padding: 13px 16px; border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.panel__body { padding: 16px; }
.panel--sticky { position: sticky; top: 92px; }

.refine .field + .field { margin-top: 14px; }
.refine__reset {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
}

/* --- notices: unreadable criteria, and the exclusion account ------------- */

.notice {
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.notice--warn { border-left-color: var(--differ); background: var(--differ-wash); }
.notice h3 { font-size: 14px; margin-bottom: 7px; }
.notice ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.notice li, .notice p { font-size: 13px; color: var(--ink-2); }
.notice p { margin-top: 9px; }
.notice--quiet summary {
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2);
  list-style: none;
}
.notice--quiet summary::-webkit-details-marker { display: none; }
.notice--quiet summary::before { content: '▸ '; color: var(--ink-3); }
.notice--quiet[open] summary::before { content: '▾ '; }
.notice--quiet summary:hover { color: var(--ink); }
.notice--quiet ul { margin-top: 10px; }

/* --- tiers --------------------------------------------------------------- */

/* Results that are assessment-identical are grouped rather than numbered, so
   the interface never implies a ranking the assessments do not support. */
.tier + .tier { margin-top: 22px; }
.tier__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 0 2px 8px; margin-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.tier__label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.tier__count { font-size: 12px; color: var(--ink-3); }
.tier .result + .result { margin-top: 10px; }

/* --- result rows --------------------------------------------------------- */

.resultlist { display: flex; flex-direction: column; gap: 10px; }

.result {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.result--top { border-color: #C8DA84; }

.result__rank {
  padding: 16px 12px; text-align: center; border-right: 1px solid var(--rule);
  background: var(--surface-sunk);
}
.result--top .result__rank { background: var(--accent-wash); border-right-color: #DCE9AE; }
.result__rank .n { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.result__rank .conf { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); line-height: 1.2; }

.result__main { padding: 15px 18px; min-width: 0; }
.result__id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result__brand { font-size: 15px; font-weight: 650; }
.result__model { font-size: 13px; color: var(--ink-2); }

/* The specification strip: dense, aligned, scannable — the datasheet moment. */
.specstrip {
  margin-top: 12px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.specstrip div {
  padding: 8px 11px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.specstrip div:last-child { border-right: 0; }
.specstrip dt { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.specstrip dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
.specstrip dd.absent { color: var(--ink-4); font-weight: 500; font-style: italic; }

/* --- verdict chips ------------------------------------------------------- */

.verdicts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.vchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 9px;
  border-radius: 4px; border: 1px solid transparent; cursor: help;
}
.vchip--confirm { background: var(--confirm-wash); color: var(--confirm); border-color: #D8E6BD; }
.vchip--differ  { background: var(--differ-wash);  color: var(--differ);  border-color: #EEDDBB; }
.vchip--verify  { background: var(--verify-wash);  color: var(--verify);  border-color: #D5DFE7; }
.vchip--family  { background: var(--surface-sunk); color: var(--ink-2);   border-color: var(--rule-strong); }
.vchip__mark { font-size: 11px; }

.result__actions { margin-top: 13px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.result__actions .spacer { margin-left: auto; }

.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--accent-deep); margin: 0; }

/* --- inspectable reasoning ---------------------------------------------- */

.why { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 12px; }
.why[hidden] { display: none; }
.why h4 { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.why h4 + h4 { margin-top: 16px; }
.whylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.whylist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; font-size: 13px; line-height: 1.5; }
.whylist .mark { font-weight: 700; text-align: center; }
.whylist .mark--confirm { color: var(--confirm); }
.whylist .mark--differ  { color: var(--differ); }
.whylist .mark--verify  { color: var(--verify); }
.whylist b { font-weight: 650; }
.whylist span { color: var(--ink-2); }

/* --- compare tray -------------------------------------------------------- */

.compare__slots { display: flex; flex-direction: column; gap: 10px; }
.slot {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 11px 12px; position: relative; background: var(--surface);
}
.slot--empty {
  border-style: dashed; color: var(--ink-4); font-size: 13px;
  text-align: center; padding: 22px 12px;
}
.slot__brand { font-size: 13px; font-weight: 650; }
.slot__model { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.slot__remove {
  position: absolute; top: 7px; right: 7px; width: 20px; height: 20px;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--surface);
  color: var(--ink-3); cursor: pointer; line-height: 1; font-size: 13px; padding: 0;
}
.slot__remove:hover { color: var(--ink); border-color: var(--ink-4); }

.helpbox {
  margin-top: 18px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.helpbox h3 { font-size: 14px; }
.helpbox p { margin-top: 7px; font-size: 13px; color: var(--ink-2); }

.empty {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 44px 32px; text-align: center; box-shadow: var(--shadow);
}
.empty h3 { font-size: 17px; }
.empty p { margin-top: 8px; color: var(--ink-2); max-width: 52ch; margin-inline: auto; }

.loadmore { display: flex; justify-content: center; margin-top: 20px; }

/* --------------------------------------------------------------- supporting */

.supporting { border-top: 1px solid var(--rule); background: var(--surface); padding: 44px 0; }
.supporting .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.scard {
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px;
  background: var(--surface); display: flex; flex-direction: column; gap: 9px;
}
.scard h3 { font-size: 15px; }
.scard p { font-size: 13.5px; color: var(--ink-2); }
.scard a { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.scard a:hover { color: var(--accent-deep); }
.scard .ico { width: 34px; height: 34px; color: var(--ink-3); }

/* --------------------------------------------------------------- sub-nav */

/* Second level, shown only inside a selector. Keeps the global header short
   as categories are added, instead of growing one flat list forever. */
.subnav { background: var(--surface); border-bottom: 1px solid var(--rule); }
.subnav .wrap { display: flex; align-items: center; gap: 22px; height: 46px; }
.subnav__label { font-size: 13px; font-weight: 650; white-space: nowrap; }
.subnav__links { display: flex; gap: 20px; overflow-x: auto; }
.subnav__links a {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent;
}
.subnav__links a:hover { color: var(--ink); }
.subnav__links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* -------------------------------------------------------------- hub page */

.hubhero { padding: 64px 0 40px; border-bottom: 1px solid var(--rule); }
.hubhero h1 { font-size: clamp(34px, 4vw, 52px); max-width: 18ch; letter-spacing: -.032em; line-height: 1.05; }
.hubhero .lede { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 60ch; }

.hubtools { padding: 40px 0 8px; }
.hubtools .eyebrow { display: block; margin-bottom: 16px; }
.toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.tool {
  display: grid; grid-template-columns: 168px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  text-decoration: none; color: inherit; overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.tool:hover { border-color: var(--rule-strong); box-shadow: 0 2px 4px rgba(16,23,30,.06), 0 12px 32px rgba(16,23,30,.07); }
.tool:hover .tool__go { color: var(--accent-deep); }
.tool__art {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-sunk); border-right: 1px solid var(--rule); color: var(--ink-2); padding: 16px;
}
.tool__art svg { width: 100%; height: auto; }
.tool__body { padding: 20px; display: flex; flex-direction: column; gap: 7px; }
.tool__body h3 { font-size: 17px; }
.tool__body p { font-size: 14px; color: var(--ink-2); }
.tool__meta { font-size: 12px; color: var(--ink-3); }
.tool__go { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; }

.hubwhy { padding: 44px 0; }
.whygrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.whygrid h3 { font-size: 15px; margin-bottom: 7px; }
.whygrid p { font-size: 14px; color: var(--ink-2); }

.hubroadmap { padding: 40px 0 56px; border-top: 1px solid var(--rule); background: var(--surface); }
.hubroadmap .eyebrow { display: block; margin-bottom: 10px; }
.roadmap__intro { font-size: 14px; color: var(--ink-2); max-width: 62ch; margin-bottom: 22px; }
.roadgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.road {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius); padding: 15px 16px; background: var(--paper);
}
.road h3 { font-size: 14px; margin-bottom: 6px; }
.road p { font-size: 13px; color: var(--ink-2); }

@media (max-width: 980px) {
  .toolgrid, .whygrid { grid-template-columns: 1fr; }
  .roadgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tool { grid-template-columns: 1fr; }
  .tool__art { border-right: 0; border-bottom: 1px solid var(--rule); }
  .roadgrid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ prose pages */

.page { padding: 44px 0 64px; }
.page__head { max-width: 68ch; margin-bottom: 36px; }
.page__head h1 { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.03em; }
.page__head .lede { margin-top: 14px; font-size: 17px; color: var(--ink-2); }

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 16px; }
.prose h2 {
  font-size: 21px; margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.prose h3 { font-size: 16px; margin-top: 28px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--rule-strong); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code {
  font-family: var(--mono); font-size: .9em; background: var(--surface-sunk);
  border: 1px solid var(--rule); border-radius: 3px; padding: 1px 5px;
}

/* Callout for the things a buyer must not skim past. */
.note {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--radius); padding: 16px 18px;
}
.note--verify { border-left-color: var(--verify); }
.note--differ { border-left-color: var(--differ); }
.note h3 { margin: 0 0 6px; font-size: 14px; }
.note p { font-size: 14px; }

/* Definition/spec tables — the datasheet register. */
.spectable { width: 100%; border-collapse: collapse; font-size: 14px; }
.spectable caption { text-align: left; font-size: 12px; color: var(--ink-3); padding-bottom: 8px; }
.spectable th, .spectable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spectable thead th {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--rule-strong); font-weight: 700;
}
.spectable tbody th { font-weight: 600; color: var(--ink); width: 30%; }
.spectable td { color: var(--ink-2); }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.tablewrap .spectable th:first-child, .tablewrap .spectable td:first-child { padding-left: 16px; }

/* Origin badges — where a value came from, shown wherever a value is shown. */
.origin {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 3px; white-space: nowrap;
  border: 1px solid transparent;
}
.origin--source     { background: var(--confirm-wash); color: var(--confirm); border-color: #D8E6BD; }
.origin--normalised { background: var(--surface-sunk); color: var(--ink-2); border-color: var(--rule-strong); }
.origin--derived    { background: var(--verify-wash); color: var(--verify); border-color: #D5DFE7; }
.origin--absent     { background: var(--differ-wash); color: var(--differ); border-color: #EEDDBB; }

/* ------------------------------------------------------------------ footer */

.foot { background: var(--navy); color: #C4CDD4; padding: 44px 0 26px; }
.foot a { color: #C4CDD4; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.foot .wordmark { color: #fff; }
.foot .wordmark em { color: var(--accent); }
.foot__tag { font-size: 13px; color: #8D9AA4; margin-top: 6px; }
.foot h4 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8D9AA4; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.foot__base {
  margin-top: 32px; padding-top: 18px; border-top: 1px solid #22323E;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: #7C8A95;
}
.foot__base a { text-decoration: underline; text-underline-offset: 2px; }

/* Attribution is a licence obligation, so it lives in the markup, not a tooltip. */
.attribution { max-width: 62ch; line-height: 1.6; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .results__layout { grid-template-columns: 210px minmax(0, 1fr); }
  .compare { grid-column: 1 / -1; }
  .panel--sticky { position: static; }
}
@media (max-width: 980px) {
  :root { --gut: 20px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .fieldrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fieldrow .btn { grid-column: 1 / -1; }
  .advanced .fieldrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supporting .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .tagline { display: none; }
  .nav { gap: 18px; }
}
@media (max-width: 700px) {
  .results__layout { grid-template-columns: 1fr; }
  .result { grid-template-columns: 58px minmax(0, 1fr); }
  .supporting .grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero h1 { font-size: 34px; }
}

@media print {
  .masthead, .foot, .refine, .compare, .result__actions { display: none; }
  .result, .panel { box-shadow: none; break-inside: avoid; }
}
