/* ==========================================================================
   JBM Tools — design system
   Tokens extracted from the live justbettermarketing.com global styles.
   Do not invent colours here. If you need a new one, add it to memory.md §2 first.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --canvas: #F8FAFC;
  --ink: #0F172A;
  --ink-soft: #334155;
  --ink-muted: #64748B;
  --red: #C8102E;
  --red-dark: #A50D26;
  --red-bright: #F25563;
  --tint: #FDECEF;
  --line: #E2E8F0;
  --good: #16A34A;
  --warn: #D97706;
  --bad: #C8102E;
  --neutral: #64748B;

  --surface: #FFFFFF;
  --surface-2: #F1F5F9;

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --font-data: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --r-sm: 0.25rem;
  --r: 0.4rem;
  --r-lg: 0.75rem;

  --container: 1280px;
  --measure: 760px;
  --wide: 1080px;
  --header-h: 4.75rem;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .10);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .16vw, 1.1rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--ink); line-height: 1.16; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--red); text-decoration-color: rgba(200, 16, 46, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
small { font-size: .85rem; }
code, kbd, samp, pre { font-family: var(--font-data); font-size: .875em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: var(--r-sm); }

/* ---------- layout ------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.measure { max-width: var(--measure); }
.wide { max-width: var(--wide); }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2.5rem; }
.muted { color: var(--ink-muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

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

.jbm-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 252, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.jbm-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.jbm-brand { display: inline-flex; align-items: center; text-decoration: none; }
.jbm-brand img { height: 26px; width: auto; display: block; }
.jbm-brand__tag {
  font-family: var(--font-data); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-muted);
  border-left: 1px solid var(--line); margin-left: .75rem; padding-left: .75rem;
}
.jbm-nav { display: flex; align-items: center; gap: 1.25rem; }
.jbm-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.jbm-nav a:hover { color: var(--red); }
@media (max-width: 780px) { .jbm-nav { display: none; } .jbm-nav--mobile { display: flex; } }

.jbm-burger {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--r);
  padding: .4rem .7rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
@media (max-width: 780px) { .jbm-burger { display: inline-flex; align-items: center; gap: .4rem; } }

.jbm-drawer { display: none; border-top: 1px solid var(--line); background: var(--surface); max-height: 70vh; overflow: auto; }
.jbm-drawer[data-open="true"] { display: block; }
.jbm-drawer__group { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.jbm-drawer__group:last-child { border-bottom: 0; }
.jbm-drawer__label {
  font-family: var(--font-data); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: .6rem;
}
.jbm-drawer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .3rem .9rem; }
.jbm-drawer__grid a { display: block; padding: .28rem 0; color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.jbm-drawer__grid a:hover { color: var(--red); }
.jbm-drawer__grid a .n { font-family: var(--font-data); font-size: .7rem; color: var(--ink-muted); margin-right: .4rem; }

/* ---------- buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.25rem; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
  line-height: 1.3;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-muted); color: var(--ink); }
.btn--quiet { background: var(--surface-2); color: var(--ink-soft); }
.btn--quiet:hover { background: var(--line); }
.btn--sm { padding: .45rem .8rem; font-size: .85rem; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- cards -------------------------------------------------------- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.4rem;
}
.card--flush { padding: 0; overflow: hidden; }
.card--accent { border-color: var(--red); }
.card--quiet { background: var(--surface-2); border-color: transparent; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.card h3 { margin-bottom: .3rem; }

.tile { display: flex; flex-direction: column; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; text-decoration: none; color: inherit; transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); }
.tile:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile__n { font-family: var(--font-data); font-size: .72rem; color: var(--ink-muted); letter-spacing: .06em; }
.tile h3 { font-size: 1.02rem; margin: 0; }
.tile p { font-size: .88rem; color: var(--ink-muted); margin: 0; }
.tile__meta { margin-top: auto; padding-top: .6rem; display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- chips / badges ---------------------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-data); font-size: .68rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .18rem .55rem;
}
.chip--red { color: var(--red); background: var(--tint); border-color: rgba(200, 16, 46, .18); }
.chip--good { color: var(--good); background: rgba(22, 163, 74, .08); border-color: rgba(22, 163, 74, .2); }
.chip--warn { color: var(--warn); background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .22); }
.chip--ink { color: var(--ink); background: var(--surface-2); }

/* ---------- epistemic labels (the brand's core discipline) --------------- */

.prov {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-data); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: var(--r-sm); border: 1px solid;
}
.prov--measured { color: var(--good); border-color: rgba(22,163,74,.3); background: rgba(22,163,74,.07); }
.prov--modelled { color: var(--warn); border-color: rgba(217,119,6,.3); background: rgba(217,119,6,.07); }
.prov--illustrative { color: var(--ink-muted); border-color: var(--line); background: var(--surface-2); }
.prov--selfreported { color: var(--red); border-color: rgba(200,16,46,.25); background: var(--tint); }
.prov::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.method {
  font-size: .82rem; color: var(--ink-muted); background: var(--surface-2);
  border-left: 2px solid var(--line); padding: .7rem .9rem; border-radius: 0 var(--r) var(--r) 0;
}
.method strong { color: var(--ink-soft); }

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

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.hero__eyebrow { font-family: var(--font-data); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: .9rem; }
.hero h1 { max-width: 20ch; }
.hero__lede { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-soft); max-width: 58ch; }
.hero__meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero__meta div { min-width: 110px; }
.hero__meta dt { font-family: var(--font-data); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-muted); }
.hero__meta dd { margin: .2rem 0 0; font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); font-weight: 600; }

/* ---------- section heads ------------------------------------------------ */

.sec { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.sec__head { max-width: 62ch; margin-bottom: 1.75rem; }
.sec__head h2 { margin-bottom: .4rem; }
.sec__head p { color: var(--ink-muted); margin: 0; }
.sec__num { font-family: var(--font-data); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: .5rem; }

/* ---------- forms -------------------------------------------------------- */

label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.hint { font-size: .8rem; color: var(--ink-muted); font-weight: 400; margin: 0 0 .5rem; }

input[type="text"], input[type="url"], input[type="email"], input[type="number"],
input[type="date"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: .6rem .75rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 16, 46, .1); }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field { margin-bottom: 1rem; }
.field--inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 400; font-size: .9rem; color: var(--ink-soft); margin-bottom: .4rem; }
.check input { width: auto; margin-top: .22rem; accent-color: var(--red); flex: none; }

fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin: 0 0 1rem; }
legend { font-size: .85rem; font-weight: 600; color: var(--ink); padding: 0 .4rem; }
fieldset p.hint { margin-top: -.2rem; }

/* multiple-choice option list (11 should-you-hire) */
.opts { display: grid; gap: .4rem; }
.opt {
  display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .5rem .65rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-weight: 400; font-size: .9rem; color: var(--ink-soft); cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.opt:hover { border-color: var(--ink-muted); background: var(--surface-2); }
.opt input { width: auto; margin: .18rem 0 0; accent-color: var(--red); flex: none; }
.opt:has(input:checked) { border-color: var(--red); background: var(--tint); color: var(--ink); }
.opt:has(input:focus-visible) { outline: none; box-shadow: 0 0 0 3px rgba(200, 16, 46, .15); }

/* repeating input group (12 one-fixed-thing rows) */
.stack-item { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--surface); }
.stack-item .field:last-child { margin-bottom: 0; }
.stack-item .field--inline .field { margin-bottom: .5rem; }

.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* ---------- gates (step-by-step tool flow) ------------------------------ */

.gate { display: none; }
.gate[data-active="true"] { display: block; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.gate__head { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.gate__step { font-family: var(--font-data); font-size: .72rem; color: var(--red); letter-spacing: .08em; }
.gate__title { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); font-weight: 600; margin: 0; }
.gate__why { font-size: .85rem; color: var(--ink-muted); margin: 0 0 1rem; max-width: 62ch; }

.gatebar { display: flex; gap: 4px; margin: 1.25rem 0; }
.gatebar span { height: 3px; flex: 1; background: var(--line); border-radius: 2px; }
.gatebar span[data-on="true"] { background: var(--red); }

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

.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.result__head { padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.result__body { padding: 1.5rem; }
.result__body > * + * { margin-top: 1.1rem; }
.result h3 { margin-bottom: .2rem; }

.verdict { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-radius: var(--r); border: 1px solid; }
.verdict--bad { background: var(--tint); border-color: rgba(200,16,46,.2); }
.verdict--warn { background: rgba(217,119,6,.07); border-color: rgba(217,119,6,.25); }
.verdict--good { background: rgba(22,163,74,.07); border-color: rgba(22,163,74,.25); }
.verdict--neutral { background: var(--surface-2); border-color: var(--line); }
.verdict__score { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; flex: none; }
.verdict__label { font-family: var(--font-data); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-top: .3rem; }
.verdict__text { font-size: .92rem; margin: 0; }

/* gauges */
.gauge { display: grid; gap: .35rem; }
.gauge__bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; position: relative; }
.gauge__fill { height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.gauge__fill--bad { background: var(--red); }
.gauge__fill--warn { background: var(--warn); }
.gauge__fill--good { background: var(--good); }
.gauge__mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .35; }
.gauge__legend { display: flex; justify-content: space-between; font-family: var(--font-data); font-size: .7rem; color: var(--ink-muted); }

/* stat tiles */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; }
.stat__k { font-family: var(--font-data); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); display: flex; align-items: center; gap: .35rem; }
.stat__v { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; color: var(--ink); line-height: 1.1; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.stat__n { font-size: .78rem; color: var(--ink-muted); margin-top: .2rem; }
.stat--alert { border-color: rgba(200,16,46,.3); background: linear-gradient(0deg, var(--tint), var(--tint)), var(--surface); }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-data); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl input, .tbl select, .tbl textarea { font-size: .85rem; padding: .35rem .5rem; }
.tbl td { padding: .4rem .5rem; }
.tbl--compact th, .tbl--compact td { padding: .45rem .6rem; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--bad { background: var(--red); } .dot--warn { background: var(--warn); } .dot--good { background: var(--good); } .dot--none { background: var(--line); }

/* progress bar — shown while a tool waits on a network read or a long
   calculation, so a slow result never looks like a broken page. */
.progress {
  height: 8px; border-radius: 999px; background: var(--line);
  overflow: hidden; position: relative;
}
.progress__bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  transition: width .5s ease;
}
/* Slight sheen so a static-width bar still reads as "working". */
.progress__bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: progressSheen 1.4s linear infinite;
}
@keyframes progressSheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .progress__bar { transition: none; }
  .progress__bar::after { animation: none; }
}

/* check list */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.checks li { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; font-size: .92rem; }
.checks li b { color: var(--ink); font-weight: 600; }
.checks .why { display: block; font-size: .82rem; color: var(--ink-muted); font-weight: 400; }

/* --------------------------------------------------------------------------
   Public page furniture.
   Every tool page is read by somebody who arrived from a search result or a
   social post, not by somebody browsing our catalogue. So each page carries
   the same five blocks in the same order, in plain language:

     what this is  ->  what to have ready  ->  how to use it
     ->  what you'll get  ->  questions

   .guide wraps them, .faq is the question list. Both print correctly and both
   collapse on a phone without any script.
   -------------------------------------------------------------------------- */

.guide { display: grid; gap: 1rem; margin-top: 1.5rem; }
.guide__block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; }
.guide__block > h2 { font-size: 1.15rem; margin-bottom: .7rem; }
.guide__block > h2 + p { color: var(--ink-soft); }
.guide__block > *:last-child { margin-bottom: 0; }
.guide__block p { font-size: .93rem; }

/* "What to have ready" reads as a list of inputs, not a form */
.reqs { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.reqs li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .7rem; align-items: start; font-size: .93rem; }
.reqs li::before { content: "✓"; color: var(--good); font-weight: 700; line-height: 1.5; }
.reqs b { color: var(--ink); font-weight: 600; }
.reqs .opt-note { display: block; font-size: .84rem; color: var(--ink-muted); font-weight: 400; }

/* numbered how-to */
.howto { counter-reset: h; list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.howto > li { counter-increment: h; display: grid; grid-template-columns: 2rem 1fr; gap: .85rem; align-items: start; font-size: .93rem; }
.howto > li::before {
  content: counter(h); width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-data); font-size: .8rem;
  display: grid; place-items: center;
}
.howto b { color: var(--ink); font-weight: 600; }

/* what you'll get — a short set of plain outcomes */
.outcomes { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.outcome { background: var(--surface-2); border-radius: var(--r); padding: .9rem 1rem; }
.outcome b { display: block; color: var(--ink); font-size: .92rem; margin-bottom: .2rem; }
.outcome span { font-size: .85rem; color: var(--ink-muted); }

/* questions */
.faq { display: grid; gap: .5rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.faq summary {
  cursor: pointer; list-style: none; padding: .85rem 2.4rem .85rem 1rem; position: relative;
  font-size: .93rem; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-data); font-size: 1.1rem; color: var(--red); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--red); }
.faq summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: var(--r); }
.faq__a { padding: 0 1rem 1rem; font-size: .9rem; color: var(--ink-soft); }
.faq__a > *:last-child { margin-bottom: 0; }
.faq__a p { font-size: .9rem; }

/* trust strip: short, factual, no jargon */
.trust { display: grid; gap: .6rem; margin-top: 1rem; }
.trust li { font-size: .87rem; color: var(--ink-muted); }
.trust { list-style: none; padding: 0; margin: 0; }
.trust li::before { content: "\2014"; color: var(--line); margin-right: .5rem; }

/* ranked list */
.rank { list-style: none; counter-reset: r; padding: 0; margin: 0; display: grid; gap: .7rem; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 1.9rem 1fr; gap: .8rem; align-items: start; }
.rank li::before { content: counter(r); font-family: var(--font-data); font-size: .78rem; color: #fff; background: var(--ink); width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; }
.rank b { color: var(--ink); }
.rank p { margin: .1rem 0 0; font-size: .88rem; color: var(--ink-muted); }

/* copy block */
.copybox { position: relative; }
.copybox pre {
  margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem; font-family: var(--font-data); font-size: .78rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; color: var(--ink-soft);
}
.copybox .btn { position: absolute; top: .5rem; right: .5rem; }

/* hidden interpretation panels (16 round table) */
.qmean { border-top: 1px dashed var(--line); padding-top: .7rem; margin-top: .7rem; }
.qmean[hidden] { display: none; }

/* letter / plain-prose preview (09 operator brief) */
.letter {
  margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem 1.25rem; font-family: var(--font-body); font-size: .92rem; line-height: 1.65;
  color: var(--ink-soft); white-space: pre-wrap; word-break: break-word;
}
.letter::first-line { color: var(--ink); }

/* code / prompt block */
.prompt { background: #0F172A; color: #E2E8F0; border-radius: var(--r); padding: 1.1rem 1.25rem; font-family: var(--font-data); font-size: .78rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 460px; overflow: auto; }
.prompt b { color: #fff; }

/* steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; font-size: .93rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--tint); color: var(--red); font-family: var(--font-data); font-size: .78rem; display: grid; place-items: center; font-weight: 500; }
.steps b { color: var(--ink); }

/* callout */
.note { border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; padding: .9rem 1.1rem; font-size: .9rem; }
.note--warn { border-left-color: var(--warn); }
.note--good { border-left-color: var(--good); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* timeline / calendar strip */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: 2px; align-items: end; height: 110px; }
.strip__col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 2px; }
.strip__bar { background: var(--red); border-radius: 1px 1px 0 0; min-height: 2px; transition: height .5s var(--ease); }
.strip__bar--recurring { background: var(--red-bright); }
.strip__labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: 2px; font-family: var(--font-data); font-size: .62rem; color: var(--ink-muted); text-align: center; margin-top: .3rem; }
.strip__labels span { overflow: hidden; }

/* bars (horizontal comparison) */
.hbar { display: grid; grid-template-columns: minmax(120px, 1.4fr) 1fr auto; gap: .75rem; align-items: center; font-size: .87rem; }
.hbar__track { height: 20px; background: var(--surface-2); border-radius: var(--r-sm); overflow: hidden; }
.hbar__fill { height: 100%; background: var(--red); border-radius: var(--r-sm); transition: width .5s var(--ease); }
.hbar__val { font-family: var(--font-data); font-size: .8rem; color: var(--ink); white-space: nowrap; }

/* CTA band */
.ctaband { background: var(--ink); color: #CBD5E1; border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }
.ctaband h2, .ctaband h3 { color: #fff; }
.ctaband p { color: #94A3B8; }
.ctaband .method { background: rgba(255,255,255,.05); color: #94A3B8; border-left-color: rgba(255,255,255,.2); }

/* footer */
.jbm-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 4rem; padding: 3rem 0 2.5rem; font-size: .88rem; }
.jbm-footer__top { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 2rem; }
.jbm-footer__top img { height: 24px; width: auto; }
.jbm-footer__tag { font-size: .85rem; color: var(--ink-muted); max-width: 34ch; margin: .6rem 0 0; }
.jbm-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem 2rem; margin-bottom: 2rem; }
.jbm-footer h4 { font-family: var(--font-data); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; margin-bottom: .7rem; }
.jbm-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .32rem; }
.jbm-footer a { color: var(--ink-soft); text-decoration: none; }
.jbm-footer a:hover { color: var(--red); }
.jbm-footer a .n { font-family: var(--font-data); font-size: .68rem; color: var(--ink-muted); margin-right: .35rem; }
.jbm-footer__bottom { border-top: 1px solid var(--line); padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--ink-muted); font-size: .8rem; }
.jbm-footer__bottom a { color: var(--ink-muted); text-decoration: underline; }

/* toast */
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translate(-50%, 130%);
  background: var(--ink); color: #fff; font-size: .88rem; padding: .65rem 1.1rem;
  border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 90;
  transition: transform .28s var(--ease); max-width: calc(100vw - 2rem); text-align: center;
}
.toast[data-show="true"] { transform: translate(-50%, 0); }

/* misc */
hr.dashed { border-top: 1px dashed var(--line); }
.tag-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-muted); font-size: .9rem; border: 1px dashed var(--line); border-radius: var(--r); }
.err { color: var(--red); font-size: .82rem; margin-top: .3rem; }
details.acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: .6rem; }
details.acc summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; color: var(--ink); font-size: .93rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-family: var(--font-data); color: var(--ink-muted); font-size: 1.1rem; flex: none; }
details.acc[open] summary::after { content: "\2013"; }
details.acc > div { padding: 0 1rem 1rem; font-size: .91rem; }
details.acc > div > *:last-child { margin-bottom: 0; }

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

@media (max-width: 640px) {
  .result__body, .card { padding: 1.1rem; }
  .jbm-brand__tag { display: none; }
  .hbar { grid-template-columns: 1fr; gap: .25rem; }
  .hbar__val { justify-self: end; margin-top: -.6rem; }
  .strip { height: 84px; }
}

/* ---------- print (the "forward this upward" assets) --------------------- */

@media print {
  .jbm-header, .jbm-footer, .jbm-burger, .jbm-drawer, .btn, .gatebar, .toast, .no-print, .guide { display: none !important; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; }
  .result, .card, .note { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .result__head { background: #f4f4f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { max-width: 100%; padding: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #666; }
  h1, h2, h3 { break-after: avoid; }
  .verdict, .stat, table { break-inside: avoid; }
  .prov { border: 1px solid #999; color: #333 !important; background: #fff !important; }
}

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