/* BidVariance public-site stylesheet — "Ledger" design system.
   Light enterprise instrument: paper ground, ink type, hairline rules,
   one navy accent, flat surfaces, tabular numerals. Shared by the landing
   page, the free-tools layer (/tools, calculators) and the explainer pages.
   Tokens here are the single source of truth for the whole public site.
   (The app restates them in app.css because the two never load together.) */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibmplexmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibmplexmono-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibmplexmono-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/ibmplexsans-var.woff2") format("woff2");
}
:root {
  /* ground + surfaces */
  --bg: #f6f5f1;
  --panel: #ffffff;
  --panel-2: #efede7; /* inset wells */
  --line: #e0ddd4;
  --line-strong: #c8c5bb;

  /* type */
  --ink: #191b1f;
  --ink-2: #3f434a;
  --muted: #565b62; /* secondary text — AA on paper and on --panel-2 */
  --subtle: #71767d; /* tertiary/hints — AA on --bg and --panel */

  /* one accent + strict semantics */
  --accent: #1f4e79; /* links / primary accent */
  --accent-strong: #163a5c;
  --accent-wash: #e9eef4; /* selected background wash */
  --btn: #191b1f; /* solid action = ink */
  --btn-hover: #000000;
  --accent-ink: #163a5c;
  --signal: #1e6e54; /* positive / probability data (deep viridian) */
  --violet: #5c6672; /* deprecated accent slot → steel */
  --coral: #a8552f; /* downside / risk cost (rust) */
  --gold: #8a6512; /* attention / commercial commitments (ochre) */
  --green: #1e6e54;
  --warn: #8a6512;
  --danger: #a83b2f; /* loss / over budget */
  --bad: #a83b2f;
  --ok: #1e6e54;
  --gray-data: #85898f; /* neutral chart series */

  --line-strong-text: #8f8c83;
  --radius: 6px;
  --radius-sm: 4px;
  --maxw: 66rem;
  --font:
    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  /* Plex Mono for instrument labels (eyebrows, indexes, figure captions):
     same family as the body face, so the pairing is one voice, two registers. */
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --mono-disp: "IBM Plex Sans", system-ui, sans-serif;
  /* The bid line: the one thing in a BidVariance chart that you move.
     Vermilion, reserved for it (and for the book that shares its mark). */
  --bid: #c8341d; /* 5.0:1 on --bg, 5.6:1 on white */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-feature-settings: "tnum" 0; /* numerals stay proportional in prose */
}

img,
svg {
  vertical-align: middle;
}

/* links: quiet until hovered; prose links carry a real underline */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover {
  color: var(--accent-strong);
  border-bottom-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: #1f4e79;
  color: #ffffff;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-variant-numeric: normal;
}

/* ------------------------------------------------------------------ header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.04rem;
  letter-spacing: -0.015em;
  border: 0;
}
.brand:hover {
  border: 0;
  color: var(--ink);
}
.brand svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 0.1rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 0.92rem;
  padding: 0.42rem 0.72rem;
  border-radius: 4px;
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--panel-2);
  border-color: transparent;
}
.nav-links a[aria-current="page"],
.nav-links a.current {
  color: var(--accent);
  background: var(--accent-wash);
  font-weight: 500;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.5rem;
  padding: 0.48rem 1rem;
  border-radius: 4px;
  background: var(--btn);
  color: #f6f5f1;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--btn);
}
.nav-cta:hover {
  background: var(--btn-hover);
  color: #ffffff;
  border-bottom-color: var(--btn);
}

/* ------------------------------------------------------------------ main */
main.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.8rem 1.25rem 3.5rem;
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.9rem;
  font-weight: 600;
}
h1 .tint {
  color: var(--accent);
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0 0 1.5rem;
}
.lede strong {
  color: var(--ink);
  font-weight: 600;
}

.answer-line {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0.1rem 0 1.4rem;
  max-width: 70ch;
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}
.answer-line strong {
  font-weight: 600;
}

/* ------------------------------------------------------------- prose / text */
.prose h2 {
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  margin: 2.2rem 0 0.7rem;
  line-height: 1.3;
  font-weight: 600;
}
.prose h3 {
  font-size: 1.06rem;
  margin: 1.7rem 0 0.5rem;
  font-weight: 600;
}
.prose p {
  max-width: 66ch;
  margin: 0 0 1rem;
}
.prose a {
  border-bottom-color: var(--line-strong);
}
.prose ul,
.prose ol {
  max-width: 66ch;
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}
.prose li {
  margin: 0.35rem 0;
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose code,
.prose kbd {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.06em 0.35em;
}
.prose table {
  font-size: 0.95rem;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.88rem;
}
.note {
  font-size: 0.85rem;
  color: var(--muted);
}
.term {
  color: var(--ink);
  font-weight: 600;
}
.qa p {
  margin: 0 0 1.4rem;
}

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 0 0 1.25rem;
}
.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.card > p {
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 66ch;
}
.card .card-hint {
  color: var(--muted);
}

/* buttons ------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--panel);
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    color 0.12s ease;
}
.button:hover {
  border-color: var(--line-strong-text);
  background: var(--bg);
  color: var(--ink);
  border-bottom-color: var(--line-strong-text);
}
.button.primary {
  background: var(--btn);
  border-color: var(--btn);
  color: #f6f5f1;
  font-weight: 500;
}
.button.primary:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: #ffffff;
}
.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* form ---------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.25rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field label,
.field .field-label {
  font-size: 0.84rem;
  color: var(--ink-2);
  font-weight: 500;
}
.field .hint {
  font-size: 0.74rem;
  color: var(--subtle);
}
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  width: 100%;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.12s ease;
}
.field input::placeholder {
  color: var(--subtle);
}
.field input:hover,
.field select:hover {
  border-color: var(--line-strong-text);
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field.inline-amount {
  flex-direction: row;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.field .num {
  font-variant-numeric: tabular-nums;
}

.currency-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.currency-row label {
  font-size: 0.84rem;
  color: var(--ink-2);
}
.currency-row input[type="text"] {
  width: 6rem;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
  font-variant-numeric: tabular-nums;
}
.currency-row input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* results / tables ------------------------------------------------------ */
.result-table-wrap {
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.tbl th,
.tbl td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl thead th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
}
.tbl tbody tr:hover td {
  background: var(--bg);
}
.tbl tbody tr:last-child th,
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl td.num,
.tbl th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tbl .metric {
  color: var(--muted);
}
.tbl .metric strong {
  color: var(--ink);
  font-weight: 600;
}
.tbl .highlight-row td {
  background: var(--accent-wash);
  color: var(--ink);
}
.risk-hi {
  color: var(--danger);
  font-weight: 600;
}
.risk-lo {
  color: var(--accent);
  font-weight: 600;
}
.tool-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.5rem 1.6rem 1.7rem;
  margin: 0 0 1.5rem;
}
.tool-panel h2 {
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.tool-panel h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.5rem;
  font-weight: 600;
}
.flat-stats {
  margin: 0.4rem 0 0.6rem;
  border-top: 1px solid var(--line);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.flat-stats .stat-row:last-child {
  border-bottom: none;
}
.stat-row .stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}
.stat-row .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.stat-row .stat-value small {
  font-size: 0.8rem;
  color: var(--subtle);
  font-weight: 400;
  font-family: var(--mono);
}
.stat-row .stat-value.hl {
  color: var(--accent);
}

/* formula -------------------------------------------------------------- */
.formula {
  border-left: 1px solid var(--line);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 70ch;
}
.formula code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ink);
}
.formula + .formula {
  margin-top: 0.5rem;
}

/* next step ------------------------------------------------------------- */
.tool-next {
  border-top: 1px solid var(--line);
  margin-top: 2.2rem;
  padding-top: 1.6rem;
}
.tool-next .button {
  margin-bottom: 1rem;
}
.tool-next .muted.small {
  margin: 0.35rem 0 0;
  max-width: 70ch;
}

/* pricing ---------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.1rem;
  margin: 2rem 0 0;
  align-items: stretch;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.6rem 1.5rem 1.7rem;
}
.pricing-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--line-strong);
}
.pricing-card h2 {
  margin: 0.3rem 0 0;
  font-size: 1.12rem;
  font-weight: 600;
}
.pricing-card .price {
  margin: 0;
}
.price-amount {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pricing-card.featured .price-amount {
  color: var(--accent);
}
.tier-audience {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.tier-list {
  list-style: none;
  margin: 0.4rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  flex: 1;
  align-content: start;
}
.tier-list li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.62rem;
  height: 0.36rem;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}
.pricing-card .button {
  width: 100%;
}
.tier-list li.note-first {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}
.tier-list li.note-first::before {
  content: none;
}
.pricing-card.featured {
  border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgba(25, 27, 31, 0.06);
}
.pricing-card.featured::before {
  background: var(--accent);
}
.pricing-flag {
  position: absolute;
  top: 0.85rem;
  right: 1.2rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid #ccd9e6;
  border-radius: 3px;
  padding: 0.14rem 0.45rem;
}

/* formula block --------------------------------------------------------- */
.formula-block {
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  padding: 0.85rem 1.1rem;
  margin: 0.4rem 0 1.2rem;
  overflow-x: auto;
}
.formula-block pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.75;
}
.formula-block code {
  font-family: var(--mono);
  color: var(--ink);
}

/* definition list ------------------------------------------------------- */
.def-list {
  margin: 1rem 0 1.2rem;
  display: grid;
  gap: 0.55rem;
}
.def-list dt {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.def-list dd {
  margin: 0 0 0.2rem;
  color: var(--muted);
  max-width: 70ch;
}
.def-list dd strong {
  color: var(--ink);
}

/* tool pages ------------------------------------------------------------ */
main.page > header.prose .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.result-grid .stat {
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.result-grid .stat:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.result-grid .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.result-grid .stat-value {
  color: var(--accent);
}
.tool-accent-teal .result-grid .stat-value,
.tool-accent-teal .stat-value {
  color: var(--signal);
}
.tool-accent-blue .result-grid .stat-value,
.tool-accent-blue .stat-value {
  color: var(--accent);
}
.tool-accent-violet .result-grid .stat-value,
.tool-accent-violet .stat-value {
  color: var(--ink);
}
.tool-accent-coral .result-grid .stat-value,
.tool-accent-coral .stat-value {
  color: var(--coral);
}
.tool-accent-gold .result-grid .stat-value,
.tool-accent-gold .stat-value {
  color: var(--gold);
}

/* upgrade the related/CTA block into a proper next-step panel */
.rel {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.6rem;
}
.rel .cta {
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--panel);
}

/* tools index ----------------------------------------------------------- */
.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: 0 2.6rem;
  margin: 1.5rem 0 0;
}
.tool-card {
  display: block;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.tool-card:hover {
  color: var(--accent);
  border-bottom-color: var(--line-strong);
}
.tool-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.tool-card h3::before {
  content: "→";
  color: var(--accent);
  font-weight: 400;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.tool-card:hover h3::before {
  opacity: 1;
  transform: none;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  width: 100%;
}
.site-footer .footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.2rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.8rem;
}
.footer-brand p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 30ch;
}
.footer-col h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 0.7rem;
}
.footer-col nav {
  display: grid;
  gap: 0.35rem;
}
.footer-col a {
  color: var(--ink-2);
  font-size: 0.9rem;
  width: fit-content;
}
.footer-col a:hover {
  color: var(--accent);
}
.site-footer .foot-line {
  margin: 0 0 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .foot-disclaimer {
  margin: 0;
  color: var(--subtle);
  font-size: 0.76rem;
  line-height: 1.6;
  max-width: 80ch;
}

/* misc ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--btn);
  color: #ffffff;
  padding: 0.6rem 0.9rem;
  border-radius: 0 0 6px 0;
  font-weight: 500;
  z-index: 20;
}
.skip-link:focus {
  left: 0;
}
.tabular {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- reduced */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 40rem) {
  main.page {
    padding-top: 1.9rem;
  }
  .site-nav {
    padding: 0.65rem 1rem 0.55rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    flex: 1 0 auto;
    text-align: center;
    white-space: nowrap;
  }
  .nav-cta {
    margin-left: auto;
    padding: 0.42rem 0.85rem;
    font-size: 0.88rem;
  }
  .card {
    padding: 1.1rem 1rem;
  }
  .tool-panel {
    padding: 1.15rem 1rem 1.3rem;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* ------------------------------------------------------------------ print */
@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }
  .site-header,
  .site-footer,
  .rel,
  .answer .ans-label {
    display: none;
  }
  main.page {
    max-width: none;
    padding: 0;
  }
  .card,
  .answer,
  .stat,
  .formula,
  .tool-panel,
  .formula-block {
    background: #fff;
    border-color: #ccc;
    color: #111;
    break-inside: avoid;
  }
  a {
    color: #111;
  }
  .tbl th {
    color: #333;
  }
  .tbl td.num,
  .tbl th.num,
  .stat-value,
  .stat .stat-value {
    color: #111;
  }
  .stat .stat-label,
  .muted,
  .note,
  .card > p {
    color: #444;
  }
}

/* How-it-works / after-checkout step strips (landing + pricing) */
.how-heading {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

.how-steps {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.how-steps li {
  color: var(--muted);
}

.how-steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

.how-steps strong {
  color: var(--ink);
}

/* blog post figures ----------------------------------------------------- */
.post-fig {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.2rem 1.3rem 1rem;
  margin: 1.6rem 0 1.5rem;
}
.post-fig svg {
  display: block;
  width: 100%;
  height: auto;
}
.post-fig figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ blog */
.post-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.post-card {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.post-card:hover h2 a {
  color: var(--accent);
}

.post-card h2 {
  font-size: 1.15rem;
  letter-spacing: -0.012em;
  margin: 0.2rem 0 0.45rem;
  line-height: 1.3;
  font-weight: 600;
}

.post-card h2 a {
  color: var(--ink);
}

.post-card h2 a:hover {
  color: var(--accent);
  border-bottom-color: transparent;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.02em;
}

.post-meta time {
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.08rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: 1px;
}

.post-cta {
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.1rem 1.3rem;
  margin: 2.2rem 0 1.5rem;
}

.post-cta p {
  margin: 0 0 0.9rem;
  max-width: 66ch;
}

.post-cta-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.post-nav {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.2rem;
  font-size: 0.92rem;
}

.post-nav p {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

/* ---------- spacing consistency + CTA icons (round-2 polish) -------------- */
/* One horizontal padding rhythm for primary containers. Most already sit at
   1.5rem; this pulls the two outliers (.tool-panel 1.6rem, .post-cta 1.3rem)
   onto the same scale. Desktop-only so the compact mobile paddings below the
   40rem breakpoint are preserved unchanged. */
@media (min-width: 40.0625rem) {
  .tool-panel,
  .post-cta {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* The two "next step / related" separators used to differ in top margin
   (2.2rem vs 2rem). Now they share one rhythm. */
.tool-next {
  margin-top: 2rem;
}

/* Inline SVG inside buttons/links: inherit color, sit on the text baseline. */
.svg-icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.12em;
}

/* =======================================================================
   ROUND-3 PUBLIC EDITORIAL PASS  (pricing + methodology)
   Appended block — nothing above this line is modified by it.
   Owns: .page-band .ledger-strip .sec-h .sec-note .tier-idx .tier-cmp
         .incl-grid .excl-list .faq-list .chain-index .fig-cap .spec-tbl
         .step-list .pipeline .vh
   No new colors, no new fonts, no gradients, no glows. Radius stays on
   the 4–6px scale; numerals use the existing mono tokens.
   ======================================================================= */

/* visually hidden, still available to screen readers */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* page masthead: a ruled band, not a floating paragraph -------------------- */
.page-band {
  border-top: 2px solid var(--ink);
  padding-top: 1.15rem;
  margin-bottom: 2.4rem;
}
.page-band .eyebrow {
  margin-bottom: 0.7rem;
}
.page-band h1 {
  font-weight: 650;
  letter-spacing: -0.032em;
}
.page-band .lede {
  margin-bottom: 1.15rem;
}
.page-band .answer-line:last-child {
  margin-bottom: 0;
}

/* the ledger strip: instrument facts, mono numerals, hairline cells --------- */
.ledger-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
}
.ledger-strip > div {
  padding: 0.7rem 0.95rem 0.8rem;
  border-left: 1px solid var(--line);
}
.ledger-strip > div:first-child {
  border-left: 0;
}
.ledger-strip dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
.ledger-strip dd {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ruled section header with a mono index (pricing + methodology) ----------- */
.sec-h {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.25;
  margin: 3rem 0 0.9rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: 4.5rem;
}
.sec-h .idx {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex: none;
}
.sec-note {
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 1.15rem;
}
.sec-note strong {
  color: var(--ink);
}

/* pricing ------------------------------------------------------------------ */
.tier-idx {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--subtle);
  margin: 0;
}
.pricing-card.featured .tier-idx {
  color: var(--accent);
}
/* Business is the recommended tier: hairline + accent rule + flat wash. */
.pricing-card.featured {
  border-color: var(--accent);
  background: var(--accent-wash);
  box-shadow: none;
}
.pricing-card.featured .price-amount {
  color: var(--accent-strong);
}
.pricing-card.featured .tier-list li.note-first {
  background: var(--panel);
}
.pricing-card.featured .button.primary {
  background: var(--accent);
  border-color: var(--accent);
}
.pricing-card.featured .button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

/* rights matrix: one .tbl, featured column carried by the accent wash ------ */
.tier-cmp {
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.tier-cmp th[scope="row"] {
  color: var(--ink);
  font-weight: 500;
  width: 40%;
}
.tier-cmp thead th {
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.tier-cmp td,
.tier-cmp thead th:not(:first-child) {
  text-align: center;
}
.tier-cmp .col-feat {
  background: var(--accent-wash);
  color: var(--ink);
}
.tier-cmp thead .col-feat {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}
.tier-cmp .yes {
  color: var(--signal);
  font-weight: 600;
}
/* Descriptive rows read as prose, not as centered glyphs. */
.tier-cmp .cmp-text {
  text-align: left;
  color: var(--muted);
  font-size: 0.88rem;
}
.tier-cmp .no {
  color: var(--line-strong-text);
}
.tier-cmp .cmp-price td,
.tier-cmp .cmp-price th {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}
.tier-cmp .cmp-price .col-feat {
  color: var(--accent-strong);
}

/* included / excluded: ruled rows, not decorative cards -------------------- */
.incl-grid {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  column-gap: 2rem;
  border-top: 1px solid var(--line);
}
.incl-grid li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}
.incl-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.6rem;
  height: 0.34rem;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}
.incl-grid code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--ink);
}
.excl-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: 74ch;
}
.excl-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}
.excl-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 0.62rem;
  height: 0;
  border-top: 2px solid var(--line-strong);
}

/* FAQ: native disclosure, hairline rows, mono marker — no JS --------------- */
.faq-list {
  border-top: 1px solid var(--line-strong);
  margin-bottom: 1.2rem;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.85rem 0;
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item summary:hover {
  color: var(--accent-strong);
}
.faq-item p {
  margin: 0 0 1rem;
  max-width: 70ch;
  color: var(--muted);
  font-size: 0.95rem;
}

/* methodology: chain index + figure + spec tables -------------------------- */
.chain-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0 1.75rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  margin: 0 0 2.2rem;
  padding: 0.35rem 0;
}
.chain-index a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.42rem 0;
  color: var(--ink);
  font-size: 0.92rem;
  border-bottom: 0;
}
.chain-index a:hover {
  color: var(--accent);
}
.chain-index .ci-n {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  flex: none;
}

.pipeline {
  margin: 0 0 1.4rem;
  padding: 1.1rem 1.15rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.fig-cap {
  margin: 0.7rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 70ch;
}

.spec-tbl {
  margin: 0.4rem 0 1.3rem;
  font-size: 0.92rem;
}
.spec-tbl td.num,
.spec-tbl th.num {
  font-family: var(--mono);
  font-size: 0.88rem;
  white-space: nowrap;
}
.spec-tbl tbody tr:last-child th,
.spec-tbl tbody tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.step-list {
  list-style: none;
  counter-reset: step;
  margin: 0.2rem 0 1.3rem;
  padding: 0;
  max-width: 74ch;
  border-top: 1px solid var(--line);
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0.6rem 0 0.6rem 2.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.72rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.step-list em,
.step-list strong {
  color: var(--ink);
}

/* narrow screens: recompose, don't shrink ---------------------------------- */
@media (max-width: 40rem) {
  .page-band {
    margin-bottom: 1.9rem;
  }
  .ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ledger-strip > div:nth-child(odd) {
    border-left: 0;
  }
  .ledger-strip > div {
    border-top: 1px solid var(--line);
  }
  .ledger-strip > div:nth-child(1),
  .ledger-strip > div:nth-child(2) {
    border-top: 0;
  }
  .sec-h {
    margin-top: 2.3rem;
    gap: 0.6rem;
  }
  .result-table-wrap {
    margin: 0 -1rem 1.2rem;
  }
  .tier-cmp {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    /* Fit the 382px scroll wrap: min-width:34rem leaked 50px past it into
       page scroll, and the .v1 export code token kept min-content wide. */
    min-width: 0;
  }
  .tier-cmp code {
    overflow-wrap: anywhere;
  }
  .tier-cmp th[scope="row"] {
    width: 34%;
  }
  /* Three-column spec tables stay on one line and scroll edge-to-edge. */
  .spec-tbl {
    min-width: 29rem;
  }
  .incl-grid {
    grid-template-columns: 1fr;
  }
  .chain-index {
    grid-template-columns: 1fr;
  }
}

/* Readable editorial type and restrained, consistent interaction feedback. */
.eyebrow, .ledger-strip dt, .tag, .pricing-flag {
  font-size: 0.75rem;
  letter-spacing: 0.065em;
}
.prose code, .prose kbd, .formula-block pre, .formula-block code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.answer-line { padding-left: 0; border-left: 0; }
.page-band { border-top-width: 1px; border-top-color: var(--line-strong); }
.formula-block { background: var(--panel); }
.pricing-card.featured { background: var(--panel); }
.pricing-flag { background: transparent; border: 0; }
.ledger-strip dd { font-size: 1.15rem; letter-spacing: -0.025em; }
.post-card h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
.post-card { padding: 1.35rem 0; }
.prose { overflow-wrap: break-word; }
:where(h2, h3, [id]) { scroll-margin-top: 7rem; }
.button, .nav-cta, .nav-links a, .tool-card, .faq-item summary {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.prose pre { max-width: 100%; overflow-x: auto; padding: 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.85rem; }
.chain-index > * { min-width: 0; }

[hidden] { display: none !important; }
/* Keep screen-reader labels inside horizontally scrollable comparison tables. */
.result-table-wrap { position: relative; }

/* Useful reading and sharing controls; no embedded social widgets. */
.article-contents { padding: 1.1rem 0; margin: 1.5rem 0 2rem; border-block: 1px solid var(--line); font-size: 0.92rem; }
.article-contents ol { margin: 0.65rem 0 0; }
.article-contents a { color: var(--ink-2); }
.share-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem 1.3rem; padding: 1.2rem 0; margin-top: 2rem; border-block: 1px solid var(--line); }
.share-tools strong { font-size: 0.92rem; }
.share-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-actions .button { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.share-fallback { flex-basis: 100%; }
.share-fallback input { width: 100%; }
.share-status:empty { display: none; }
@media print { .share-tools, .article-contents { display: none; } }

/* ------------------------------------------------- related posts (blog) */
.related-posts {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-strong);
}
.related-posts h2 {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.related-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.4rem 1.8rem;
}
.related-posts li {
  border-top: 2px solid var(--line-strong);
  padding-top: 0.7rem;
}
.related-posts a {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.4;
}
.related-posts a:hover {
  color: var(--accent);
}
.related-posts li > span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}
