/* nabemall
   ---------------------------------------------------------------------------
   Direction: a spend statement lying on a dark desk. The product is knowledge
   extracted from a real generation invoice, so the page's signature element is
   the invoice itself -- cream paper, ruled rows, tabular figures -- and every
   other surface stays quiet around it.

   Colour carries meaning rather than decoration: amber is money that left,
   teal is money that stayed. Type pairs IBM Plex (an engineering family, for
   the measured half) with Fraunces (for the editorial half).
   --------------------------------------------------------------------------- */

:root {
  --slate: #0b1013;
  --slate-raised: #101a1e;
  --rule: #1e2b31;
  --rule-soft: #162126;
  --text: #e7edea;
  --muted: #8c9ea2;
  --faint: #61757a;

  --paper: #f3efe4;
  --paper-ink: #17140f;
  --paper-muted: #6d6659;
  --paper-rule: #d6cfbc;

  --spend: #d9a441;
  --saved: #57b9a6;

  --display: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --shell: 1180px;
  --measure: 66ch;
  --gap: clamp(3.5rem, 9vw, 7rem);
}

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

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

body {
  margin: 0;
  background: var(--slate);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--spend); color: var(--paper-ink); }

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

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.6rem clamp(1.15rem, 5vw, 2.5rem);
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.masthead-nav {
  display: flex;
  gap: 1.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.masthead-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.masthead-nav a:hover { color: var(--text); border-bottom-color: var(--spend); }

/* -------------------------------------------------------------- shared type */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spend);
  margin: 0 0 1.35rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.85rem;
}

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3.3vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 2.6rem;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  max-width: var(--measure);
  margin: 0 0 2.1rem;
}

.amount {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text);
}

.amount.is-free { color: var(--saved); }

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

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.83rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.78rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-solid {
  background: var(--spend);
  border-color: var(--spend);
  color: var(--paper-ink);
  font-weight: 500;
}

.btn-solid:hover { background: #eab857; border-color: #eab857; }

.btn-quiet { color: var(--muted); }
.btn-quiet:hover { color: var(--text); border-color: var(--faint); }

.link-arrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.link-arrow:hover { color: var(--spend); }
.link-arrow span { transition: transform 0.16s ease; display: inline-block; }
.link-arrow:hover span { transform: translateX(3px); }

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

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 2.5rem) var(--gap);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  margin: 0 0 1.5rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0; }

/* --------------------------------------------------- the statement (signature) */

.statement {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 2rem 1.9rem 1.7rem;
  border-radius: 2px;
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.9), 0 2px 0 rgba(255, 255, 255, 0.05);
  transform: rotate(-0.5deg);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}

.statement-head {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}

.statement-sub {
  color: var(--paper-muted);
  font-size: 0.74rem;
  margin: 0 0 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--paper-rule);
}

.statement-rows { margin: 0 0 1.1rem; }

.statement-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.32rem 0;
}

.statement-row dt { color: var(--paper-muted); }

/* Leader dots tie each label to its figure the way a printed statement does. */
.statement-row::after {
  content: "";
  flex: 1;
  order: 1;
  height: 0;
  border-bottom: 1px dotted var(--paper-rule);
  transform: translateY(-0.28em);
}

.statement-row dd { order: 2; margin: 0; }

.statement-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--paper-rule);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.statement-total strong {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--paper-ink);
  border-bottom: 3px solid var(--spend);
}

.statement-total.is-saved {
  border-top: 0;
  padding-top: 0.7rem;
}

.statement-total.is-saved strong {
  font-size: 1.05rem;
  border-bottom-color: var(--saved);
}

.statement-note {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--paper-rule);
  color: var(--paper-muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

/* -------------------------------------------------------------------- packs */

.packs, .method {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 5vw, 2.5rem) var(--gap);
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.pack {
  background: var(--slate);
  display: flex;
  flex-direction: column;
  transition: background 0.18s ease;
}

.pack:hover { background: var(--slate-raised); }

/* Covers arrive from Gumroad at whatever ratio was uploaded (two 16:9, one
   1:1) and they carry set copy, so they are letterboxed inside a fixed frame
   rather than cropped -- cropping ate the first word of the 16:9 covers. The
   frame owns its height and the image is taken out of flow to sit inside it. */
.pack-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--rule);
}

.pack-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.86) contrast(1.02);
  transition: filter 0.25s ease;
}

.pack:hover .pack-frame img { filter: none; }

.pack-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pack-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.9rem;
}

.pack-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.24;
  letter-spacing: -0.018em;
  margin: 0 0 0.7rem;
}

.pack-title a { text-decoration: none; }
.pack-title a:hover { color: var(--spend); }

.pack-summary {
  color: var(--muted);
  font-size: 0.91rem;
  margin: 0 0 1.6rem;
}

.pack-foot {
  margin: auto 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

/* ------------------------------------------------------------------- method */

.method-list {
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem 2.6rem;
}

.method-list li { border-top: 1px solid var(--rule); padding-top: 1.1rem; }

.method-key {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.method-list p + p { color: var(--muted); font-size: 0.93rem; margin: 0; }

.disclosure {
  color: var(--faint);
  font-size: 0.84rem;
  max-width: var(--measure);
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

/* -------------------------------------------------------------- product page */

.sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.15rem, 5vw, 2.5rem) var(--gap);
}

.back { text-decoration: none; color: var(--spend); }
.back:hover { text-decoration: underline; }

.sheet-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.95rem, 4.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.034em;
  margin: 0 0 1.35rem;
}

.offer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.6rem;
}

.offer .amount { font-size: 1.45rem; }

.offer-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
}

.offer-end { margin: 3rem 0 0; border-bottom: 0; }

.plate {
  margin: 0 0 2.8rem;
  background: #000;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

/* The cover is the seller's own artwork and usually carries a title line, so
   it is letterboxed rather than cropped. */
.plate img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  margin: 0 auto;
}

.prose { max-width: var(--measure); }

.prose p {
  color: #ccd6d3;
  margin: 0 0 1.05rem;
}

.prose-h {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--spend);
  margin: 2.6rem 0 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}

.prose-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.prose-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  color: #ccd6d3;
}

.prose-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--spend);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 2.4rem 0 0;
  margin: 0;
}

.tags li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.24rem 0.6rem;
}

/* ------------------------------------------------------------- proof band */

.proof-band {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 5vw, 2.5rem) var(--gap);
  display: flex;
  align-items: baseline;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.proof-figure {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--spend);
}

.proof-copy { flex: 1 1 18rem; }

.proof-line {
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  max-width: 44ch;
  margin: 0 0 0.7rem;
}

/* ------------------------------------------------------------------- board */

.board-head, .board {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 5vw, 2.5rem);
}

.board-head { padding-top: clamp(1.5rem, 4vw, 2.5rem); padding-bottom: 3rem; }

.board-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 1.4rem;
}

.legend {
  margin: 2.4rem 0 0;
  border-top: 1px solid var(--rule);
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.9rem;
}

.legend-row dt { flex: 0 0 12rem; font-weight: 600; }
.legend-row dd { margin: 0; color: var(--muted); }

.legend-lang {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--spend);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  margin-right: 0.7rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
  position: sticky;
  top: 0;
  background: var(--slate);
  padding: 0.9rem 0;
  z-index: 5;
}

.chip {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.chip span { color: var(--faint); margin-left: 0.35rem; }
.chip:hover { color: var(--text); border-color: var(--faint); }

.chip.is-on {
  color: var(--paper-ink);
  background: var(--spend);
  border-color: var(--spend);
}

.chip.is-on span { color: rgba(23, 20, 15, 0.6); }

.tiles {
  list-style: none;
  margin: 0;
  padding: 0 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.5rem 1.15rem;
}

.tile[hidden] { display: none; }

.tile-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.tile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: filter 0.2s ease, transform 0.3s ease;
}

.tile-frame:hover img { filter: none; transform: scale(1.03); }

/* A real iframe replaces the anchor on click and inherits the same box. */
iframe.tile-frame { border: 1px solid var(--rule); }

.tile-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: rgba(11, 16, 19, 0.72);
  border: 1px solid rgba(243, 239, 228, 0.35);
  transition: background 0.18s ease;
}

.tile-play::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-left: 12px solid var(--paper);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.tile-frame:hover .tile-play { background: var(--spend); }
.tile-frame:hover .tile-play::after { border-left-color: var(--paper-ink); }

.tile-title {
  margin: 0.65rem 0 0.2rem;
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-channel {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.board .disclosure { margin-bottom: var(--gap); }

/* ---------------------------------------------------------------- colophon */

.colophon {
  border-top: 1px solid var(--rule);
  padding: 3rem clamp(1.15rem, 5vw, 2.5rem);
}

.colophon-grid {
  max-width: var(--shell);
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.colophon-grid a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.colophon-grid a:hover { color: var(--spend); }

.colophon-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.colophon-line { color: var(--muted); font-size: 0.88rem; margin: 0; max-width: 34ch; }

.colophon-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.8rem;
}

.colophon-fine {
  max-width: var(--shell);
  margin: 0 auto;
  padding-top: 1.8rem;
  border-top: 1px solid var(--rule-soft);
  color: var(--faint);
  font-size: 0.79rem;
  line-height: 1.55;
}

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

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; }
  .statement { transform: none; max-width: 460px; }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .colophon-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .offer { gap: 0.8rem; }
  .offer-note { flex-basis: 100%; }
}

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

/* ------------------------------------------- production records & calculators
   Added for the programmatic page families: /case/, /channel/ and /tools/.
   These pages are read while something is failing on the reader's machine, so
   they favour a dense, tabular register over the editorial one used on the
   store pages -- the invoice voice, not the essay voice. */

.spec {
  margin: 1.6rem 0 2.6rem;
  border-top: 1px solid var(--rule);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(11rem, 34%) 1fr;
  gap: 1rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec-row dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.spec-row dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.case-player { margin: 2rem 0; }
.case-player figcaption {
  margin-top: 0.7rem;
  color: var(--faint);
  font-size: 0.8rem;
}

.case-note {
  margin: 2.2rem 0;
  padding: 1.3rem 1.5rem;
  background: var(--slate-raised);
  border-left: 3px solid var(--saved);
  border-radius: 0 5px 5px 0;
}

.case-note.is-warn { border-left-color: var(--spend); }

.case-note-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.case-note-body { margin: 0 0 0.7rem; font-size: 1.02rem; }

.case-note-fine {
  margin: 0;
  color: var(--faint);
  font-size: 0.83rem;
  line-height: 1.6;
}

.case-cta {
  margin: 3rem 0;
  padding: 1.8rem;
  background: var(--slate-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.case-cta-label {
  margin: 0 0 0.6rem;
  color: var(--spend);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.case-cta p { margin: 0 0 1.2rem; max-width: var(--measure); }

.beat-list { padding-left: 1.2rem; color: var(--text); }
.beat-list li { margin-bottom: 0.4rem; }

/* --------------------------------------------------------------- calculators */

.calc {
  margin: 2rem 0 2.6rem;
  padding: 1.6rem;
  background: var(--slate-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem 1.4rem;
}

.calc label,
.calc-area {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.calc input[type="number"],
.calc select,
.calc textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  background: var(--slate);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.92rem;
}

.calc textarea { font-family: var(--sans); line-height: 1.55; resize: vertical; }
.calc-area { margin-top: 1.2rem; }

.calc-q { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.86rem; }

.calc-checks {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.calc-checks label {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  color: var(--text);
  font-size: 0.93rem;
  cursor: pointer;
}

.calc-checks input { accent-color: var(--spend); }

.calc-out {
  display: block;
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
}

.calc-figure {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  color: var(--spend);
  line-height: 1.25;
}

.calc-break {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: var(--measure);
}

.calc-warn {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  background: rgba(217, 164, 65, 0.09);
  border-left: 3px solid var(--spend);
  border-radius: 0 4px 4px 0;
  color: var(--text);
  font-size: 0.88rem;
}

.rate-table {
  width: 100%;
  margin: 1.2rem 0 2rem;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.rate-table th {
  text-align: left;
  padding: 0.55rem 0.8rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.rate-table td {
  padding: 0.62rem 0.8rem 0.62rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}

.rate-table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Wide content must scroll inside itself rather than pushing the page sideways. */
.prose .rate-table { display: block; overflow-x: auto; white-space: nowrap; }
.prose .rate-table td:last-child { white-space: normal; min-width: 18rem; }

@media (max-width: 560px) {
  .spec-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ------------------------------------------------------- channels & tool band */

.channels, .tools-band {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem var(--gap);
}

.chan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.chan {
  display: block;
  padding: 1.4rem 1.5rem;
  background: var(--slate);
  text-decoration: none;
  transition: background 0.15s ease;
}

.chan:hover { background: var(--slate-raised); }

.chan-name {
  display: block;
  font-family: var(--display);
  font-size: 1.12rem;
  margin-bottom: 0.3rem;
}

.chan-blurb {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.chan-count {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--spend);
  font-variant-numeric: tabular-nums;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tool-chip {
  display: block;
  padding: 1.25rem 1.4rem;
  background: var(--slate-raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.tool-chip:hover { border-color: var(--spend); }
.tool-chip strong { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.tool-chip span { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.tile-rec { color: var(--spend); text-decoration: none; }
.tile-rec:hover { text-decoration: underline; }

/* A pack with no cover keeps the grid's rhythm without drawing a broken image. */
.pack-frame.is-blank {
  display: block;
  aspect-ratio: 670 / 376;
  background:
    linear-gradient(135deg, var(--slate-raised) 0%, var(--slate) 100%);
  border-bottom: 1px solid var(--rule);
}

/* ------------------------------------------------------------------- shop
   A grid stops reading as a shop somewhere past a dozen items. These aisles
   give the catalogue a shape a visitor can hold: five kinds of thing, each
   with a count, each one page deep. */

.aisle {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem var(--gap);
}

.aisle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.aisle-head .section-title { margin: 0 0 0.5rem; }
.aisle-head .section-title a { text-decoration: none; }
.aisle-head .section-title a:hover { color: var(--spend); }
.aisle-head .lede { margin: 0; max-width: var(--measure); }

.aisle-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.aisle-more { margin-top: 1.6rem; }

.pack[hidden] { display: none; }

@media (max-width: 700px) {
  .aisle-head { flex-direction: column; gap: 0.8rem; }
  .aisle-count { font-size: 1.6rem; }
}

/* Kind board — the front page
   ---------------------------------------------------------------------------
   Five tiles answering "what kinds of thing are on sale", replacing the grid
   that printed every product. A thumbnail cannot tell a $19 episode teardown
   from a $49 corpus, so the tile carries the count and the price range and the
   grid stays a fixed height however large the catalogue grows.
   --------------------------------------------------------------------------- */
.kind-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.kind {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem 1.4rem 1.3rem;
  background: var(--slate-raised);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.kind:hover { background: #142126; }
.kind-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.8rem; margin: 0;
}
.kind-head strong { font-family: var(--display); font-size: 1.24rem; font-weight: 600; }
.kind-n {
  font-family: var(--mono); font-size: 0.82rem; color: var(--spend);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.1rem 0.6rem;
}
.kind-blurb {
  margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; flex: 1;
}
.kind-foot {
  display: flex; align-items: baseline; gap: 0.7rem; margin: 0;
  padding-top: 0.75rem; border-top: 1px solid var(--rule-soft);
}
.kind-price { font-family: var(--mono); font-size: 0.95rem; color: var(--saved); }
.kind-lead {
  color: var(--faint); font-size: 0.8rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Shelf board — inside an oversized aisle
   Eighty-four teardowns are not a category, they are the scroll the categories
   were meant to end. Past SHELF_MAX the aisle leads with these, and each one
   is a real page: linkable, indexable, landable. */
.shelf-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.shelf {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--slate-raised); text-decoration: none; color: inherit;
  transition: border-color 0.15s ease;
}
.shelf:hover { border-color: var(--faint); }
.shelf strong { font-size: 1rem; font-weight: 600; }
.shelf-n { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.shelf-p { font-family: var(--mono); font-size: 0.85rem; color: var(--spend); }
.shelf-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.1rem; }

@media (max-width: 700px) {
  .kind { padding: 1.2rem 1.1rem; }
  .shelf-board { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
