/* Content blocks. Each block type in content/*.json maps to one class here. */

.block + .block { margin-top: var(--s4); }

/* ---- Callouts: flat ash band with a phase-colored left rule ---- */
.callout {
  padding: var(--s3) var(--s3) var(--s3) calc(var(--s3) - 3px);
  background: var(--ash);
  border-left: 3px solid var(--ember);
}
.callout--diagnose { border-left-color: var(--slate); }
.callout--rebuild  { border-left-color: var(--sun); }
.callout__label {
  display: block;
  margin-bottom: var(--s1);
  font-weight: 700;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* ---- Pull line: a rule of thumb, set as display type ---- */
.pull {
  margin: var(--s5) 0;
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  font-size: var(--t-h1);
  line-height: 0.98;
  color: var(--ember);
}
.pull__sub { display: block; margin-top: var(--s1); font-size: var(--t-lead); font-stretch: 80%; font-weight: 600; color: var(--bone-dim); }

/* ---- Lists ---- */
.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding-left: 16px; }
.list li + li { margin-top: var(--s1); }
.list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 2px;
  background: var(--ember);
}

/* ---- Steps: a real sequence, so it gets numbers ---- */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  color: var(--ember);
}
.steps__dose {
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: var(--bone-dim);
}

/* ---- Figure slots (diagrams generated later) and photo placeholders ---- */
.figure {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: var(--s3);
  border: 1.5px dashed var(--slate);
  border-radius: 2px;
  color: var(--slate);
  font-size: var(--t-cap);
  line-height: 1.4;
  text-align: left;
}
.figure--tall { min-height: 260px; }
/* Generated art sits on pure black; `lighten` drops that black into the basalt ground,
   so no visible box appears even though the generator can't hit #1C1A18 exactly. */
.figure img { width: 100%; height: auto; display: block; mix-blend-mode: lighten; }
.figure--filled { border: 0; padding: 0; display: block; min-height: 0; position: relative; }
.figure__label { max-width: 32ch; }
.figure__label strong { display: block; color: var(--bone); font-size: 13px; }
/* Numbered dot labels (pages 7, 11). Covers the image's own dot; the 2px basalt ring is a
   surface gap, not a drop shadow. Archivo digits, so "10" doesn't get Atkinson's slashed zero. */
.figure__marker {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 2px var(--basalt);
  color: var(--basalt);
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

.photo-ph {
  display: flex;
  align-items: flex-end;
  padding: var(--s3);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgb(111 147 166 / 0.08) 11px 12px),
    var(--ash);
  border: 1.5px dashed var(--slate);
  color: var(--slate);
  font-size: var(--t-cap);
  line-height: 1.4;
}
.photo-ph strong { display: block; color: var(--bone); font-size: 13px; }
.photo-slot .photo-ph, .cover__hero .photo-ph { height: 100%; }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- QR slot ---- */
.qr {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2);
  background: var(--ash);
}
.qr__code { width: 88px; height: 88px; background: var(--bone); padding: 5px; }
.qr__code svg { width: 100%; height: 100%; display: block; }
.qr__code--ph {
  background: none;
  border: 1.5px dashed var(--slate);
  color: var(--slate);
  font-size: 10px;
  line-height: 1.2;
  display: grid;
  place-items: center;
  text-align: center;
}
.qr__text strong { display: block; font-size: 15px; }
.qr__text span { font-size: var(--t-cap); color: var(--bone-dim); }

/* ---- Inline sources line ---- */
.src {
  font-size: var(--t-cap);
  line-height: 1.5;
  color: var(--slate);
}
.src a { color: var(--slate); text-decoration-color: rgb(111 147 166 / 0.5); }

/* ---- Stacked table rows (tables reflow instead of squeezing columns) ---- */
.rows { margin: 0; padding: 0; list-style: none; }
.rows__item {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.rows__item:first-child { border-top: 1px solid var(--rule); }
.rows__head {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-bottom: 4px;
}
.rows__key {
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 750;
  font-size: 19px;
  line-height: 1.1;
}
.rows__val {
  margin-left: auto;
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  font-size: 19px;
  color: var(--bone); /* values wear text color; the ember mark beside them carries identity */
  white-space: nowrap;
}
.rows__marker {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--slate);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
}
.rows__line { display: block; }
.rows__line + .rows__line { margin-top: 3px; }
.rows__line--dim { color: var(--bone-dim); }
.rows__line--risk::before { content: ''; }
.rows .src { margin-top: 4px; }

/* ---- Thermal diagram (page 6): cold vs. warmed up. Colour is baked into the PNGs by
        `npm run art` (see scripts/analyze-art.mjs); black ground drops into basalt. ---- */
.thermal { margin: 0; }
.thermal__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding-inline: var(--s4); }
.thermal__col { display: grid; justify-items: center; gap: var(--s2); }
.thermal__img { display: block; width: 100%; height: auto; mix-blend-mode: lighten; }
.thermal__label {
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 750;
  font-size: 18px;
  line-height: 1.1;
  text-align: center;
}

/* ---- Range chart inside rows (page 10). One series, ember; axis and ticks recessive ---- */
.rows__axis { display: block; overflow: visible; margin-bottom: var(--s1); }
/* Archivo, not Atkinson: Atkinson's slashed zero reads as "Ø" on a numeric axis */
.rows__axis text { fill: var(--bone-dim); font-family: var(--f-display); font-stretch: 72%; font-size: 13px; font-weight: 700; }
.rows__track { display: block; overflow: visible; margin: 7px 0 5px; }
.rows__track .bg { fill: var(--ash); }
.rows__track .tk { stroke: var(--rule); stroke-width: 1; }
.rows__track .fill, .rows__track .pt { fill: var(--ember); }

/* ---- Method diagram (page 3): thermal bar, three phase nodes ---- */
.method { padding-block: var(--s2); }
.method__cols { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.method__top { margin-bottom: 6px; }
.method__here {
  display: inline-block;
  padding: 3px 7px;
  background: var(--ember);
  color: var(--basalt);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.method__bar { display: block; overflow: visible; }
.method__bar .bar { fill: url(#method-heat); }
.method__bar .s-d { stop-color: var(--slate); }
.method__bar .s-r { stop-color: var(--ember); }
.method__bar .s-b { stop-color: var(--sun); }
.method__bar .n-d { fill: var(--slate); }
.method__bar .n-r { fill: var(--ember); stroke: var(--basalt); stroke-width: 3; }
.method__bar .n-b { fill: var(--sun); }
.method__name {
  display: block;
  margin-top: var(--s2);
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
}
.method__desc { display: block; margin-top: 3px; padding-inline: 4px; font-size: 12px; line-height: 1.35; color: var(--bone-dim); }

/* ---- One row of track QRs (page 13) ---- */
.qrrow { padding: var(--s3) var(--s2); background: var(--ash); }
.qrrow__head { margin-bottom: var(--s2); }
.qrrow__head strong { display: block; font-size: 15px; }
.qrrow__head span { font-size: var(--t-cap); color: var(--bone-dim); }
.qrrow__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.qrrow__cell { display: grid; justify-items: center; gap: 4px; text-align: center; }
.qrrow__code { display: block; width: 58px; height: 58px; padding: 3px; background: var(--bone); }
.qrrow__code svg { display: block; width: 100%; height: 100%; }
.qrrow__code--ph {
  display: grid;
  place-items: center;
  background: none;
  border: 1.5px dashed var(--slate);
  color: var(--slate);
  font-size: 8.5px;
  line-height: 1.15;
}
.qrrow__label { font-size: 11px; line-height: 1.2; }

/* ---- RAMP: letters are the sequence markers ---- */
.ramp { margin: 0; padding: 0; list-style: none; }
.ramp__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.ramp__letter {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: var(--t-num);
  line-height: 0.82;
  color: var(--ember);
}
.ramp__name {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 750;
  font-size: 21px;
  line-height: 1.1;
}
.ramp__dur { margin-left: auto; font-size: 16px; color: var(--bone-dim); white-space: nowrap; }
.ramp__goal { margin: 3px 0 2px; }
.ramp__moves { font-size: 13.5px; color: var(--bone-dim); }

/* ---- Self-check scale (page 5) ---- */
.scale { margin: 0; padding: 0; list-style: none; }
.scale__row { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.scale__region { display: block; margin-bottom: var(--s2); font-weight: 700; }
.scale__line {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.scale__dot {
  display: grid;
  place-items: center;
  height: 34px;
  border: 1.5px solid var(--slate);
  border-radius: 2px;
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: 17px;
  color: var(--slate);
}
.scale__ends {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--bone-dim);
}
.scale__legend { display: flex; gap: var(--s4); margin-top: var(--s2); font-size: var(--t-cap); color: var(--bone-dim); }
.scale__legend b { font-weight: 700; color: var(--bone); }

/* ---- Don't / do pairs (not a sequence, so no numbers) ---- */
.pairs { margin: 0; padding: 0; list-style: none; }
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.pair + .pair { margin-top: 3px; }
.pair__dont, .pair__do { padding: var(--s2) var(--s2) var(--s2) var(--s3); background: var(--ash); font-size: 14px; line-height: 1.38; }
.pair__dont { color: var(--bone-dim); text-decoration: line-through; text-decoration-color: rgb(238 231 220 / 0.35); }
.pair__do { border-left: 3px solid var(--ember); padding-left: calc(var(--s3) - 3px); }
.pairs__head { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: var(--s1); font-size: var(--t-cap); font-weight: 700; color: var(--bone-dim); }

/* ---- Track selector (page 13) ---- */
.quiz { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.quiz__q { counter-increment: q; padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.quiz__q > strong { display: block; margin-bottom: var(--s2); }
.quiz__opts { display: flex; flex-wrap: wrap; gap: 5px; }
.quiz__opt {
  padding: 5px 9px;
  border: 1.5px solid var(--slate);
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.2;
}
.quiz__opt b { color: var(--ember); font-weight: 700; }

.tracks { margin: 0; padding: 0; list-style: none; }
.track { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.track__name {
  display: block;
  margin-bottom: 4px;
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.05;
}
.track__head { display: flex; align-items: center; gap: var(--s2); margin-bottom: 4px; }
.track__head .track__name { margin-bottom: 0; }
/* Decorative (the name beside it says it all); black icon ground drops into basalt. */
.track__icon { flex: none; width: 44px; height: 44px; mix-blend-mode: lighten; }
.track__why { margin-top: var(--s1); font-size: 13.5px; color: var(--bone-dim); }
.track .src { margin-top: 4px; }
.track .qr { margin-top: var(--s2); }

/* ---- Quotes (page 15) ---- */
.quote {
  margin: 0;
  padding: var(--s4) var(--s3);
  border: 1.5px dashed var(--slate);
  color: var(--slate);
}
.quote + .quote { margin-top: var(--s2); }
.quote__text { font-size: var(--t-lead); line-height: 1.35; }
.quote__who { display: block; margin-top: var(--s2); font-size: var(--t-cap); }
.quote--real { border: 0; border-left: 3px solid var(--sun); background: var(--ash); color: var(--bone); }

/* ---- Disclaimer ---- */
.legal { font-size: 14.5px; line-height: 1.55; }
.legal p { max-width: 50ch; }

/* ---- CTA (page 16, Rebuild gold) ---- */
.cta { margin-top: var(--s4); }
.cta__lead {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 850;
  font-size: var(--t-h1);
  line-height: 0.96;
  margin: 0 0 var(--s3);
}
.cta__btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s4);
  padding: var(--s3) var(--s3);
  background: var(--sun);
  color: var(--basalt);
  border-radius: 2px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16.5px;
  line-height: 1.25;
}
.cta__btn small { display: block; font-weight: 600; font-size: 12px; }
.cta__btn--ph { background: none; border: 1.5px dashed var(--sun); color: var(--sun); }
.cta__price {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 850;
  font-size: 20px;
  white-space: nowrap;
}

/* ---- Sources page ---- */
.srclist { margin: 0; padding: 0; list-style: none; }
.srclist li {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.4;
  break-inside: avoid;
}
.srclist b { font-weight: 700; }
.srclist a { display: block; color: var(--slate); font-size: 10.5px; word-break: break-all; text-decoration: none; }

/* ---- Cover ---- */
.page--cover { padding-top: 0; }
.cover__hero {
  position: relative;
  height: 400px;
  margin: 0 calc(-1 * (var(--gutter) + var(--strip-w))) var(--s4) calc(-1 * var(--gutter));
}
.cover__hero .photo-ph { height: 100%; border-width: 0 0 1.5px; }
.cover__badge {
  position: absolute;
  top: var(--top);
  right: calc(var(--gutter) + var(--strip-w));
  display: grid;
  gap: 3px;
  width: 104px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
.cover__badge span { padding: 5px 6px; border: 1.5px solid currentColor; border-radius: 2px; background: var(--basalt); }
.cover__badge .d { color: var(--slate); }
.cover__badge .r { color: var(--basalt); background: var(--ember); border-color: var(--ember); }
.cover__badge .b { color: var(--sun); }
.cover__title {
  margin: 0;
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 58px;
  line-height: 0.88;
  letter-spacing: -0.01em;
}
.cover__kicker {
  margin: var(--s3) 0 0;
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.08;
  color: var(--ember);
}
.cover__sub { margin: var(--s4) 0 0; font-size: 14px; color: var(--bone-dim); }
