/* =========================================================================
   templates.css — content page templates (best-of, guide, review, versus, hub, gifts, trust)
   Loads after tokens.css, base.css and sections.css. It adds parts; it never restyles the homepage.
   NEW TOKENS (2): --measure, --tap. Everything else comes from tokens.css.
   ========================================================================= */
:root {
  --measure: 31em;   /* long-form line length: about 79 characters at most (measured 2026-10-22). 68ch gave ~110 (ch = Commissioner's wide "0") */
  --tap: 2.75rem;    /* 44px tap target floor */
}

/* The header is fixed and gets its pill surface from JS. Without JS it stays at the top of the page. */
html:not(.tjs) .site-header { position: absolute; }
html:has(.stickybar) { scroll-padding-bottom: 5.5rem; }

.tpl-wrap {
  max-inline-size: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- inline markers for unknowns (same dashed tag as the TEMP wordmark) ---------- */
.todo {
  display: inline-block;
  padding: 0 0.35em;
  border: 1.5px dashed currentColor;
  border-radius: 4px;
  background: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: 0.15em;
}

/* ---------- text-link action: every money link that is not the one filled button ---------- */
.go {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-block-size: var(--tap);
  font-weight: 650;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.go svg { inline-size: 0.95rem; flex: none; }

/* =========================================================================
   TOP BAND — pillar colour, breadcrumb, h1, answer, disclosure, quick pick
   ========================================================================= */
.tband {
  position: relative;
  padding-block: calc(var(--header-h) + var(--space-xs)) calc(var(--space-l) + clamp(1.5rem, 3vw, 3rem));
  background: var(--mood);
  color: var(--ink);
}
.tband__grid { display: grid; gap: var(--space-m); }
.tband__wave {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  inline-size: 100%;
  block-size: clamp(1.5rem, 3vw, 3rem);
  fill: var(--paper);
  pointer-events: none;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-caption);
  font-weight: 600;
}
.crumb li { display: inline-flex; align-items: center; min-block-size: var(--tap); }
.crumb li + li::before { content: "/"; margin-inline: 0.5rem; }
.crumb a { display: inline-flex; align-items: center; min-block-size: var(--tap); text-underline-offset: 0.2em; }

.tpl-h1 {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.answer {
  max-inline-size: 60ch;
  margin-block-start: var(--space-xs);
  font-size: var(--text-body);
  line-height: 1.5;
}
/* header jump to the comparison + the size link beside the quick pick button (owner design note 2026-11-25) */
.tband__jump { margin-block-start: var(--space-xs); font-weight: 700; }
.tband__jump a, .prose .act .act__size { display: inline-flex; align-items: center; min-block-size: 44px; text-decoration: underline; text-underline-offset: 0.2em; }
.prose .act .act__size { font-weight: 650; }
#compare { scroll-margin-block-start: 5rem; }
.tpl-disclosure {
  margin-block-start: var(--space-xs);
  font-size: var(--text-ui);
  font-weight: 550;
  line-height: 1.4;
}
.tpl-disclosure a { font-weight: 700; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }

/* quick pick: a paper plate with the dashed offset outline from the guide cards */
.qpick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2xs);
  padding: var(--space-s) var(--space-m) var(--space-m);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-sticker);
}
.qpick-plate { position: relative; }
.qpick-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed var(--ink);
  border-radius: var(--radius-card);
  transform: translate(0.4rem, -0.4rem) rotate(1.2deg);
  pointer-events: none;
}
.qpick__label,
.prod__for {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  color: var(--mood-deep);
}
.qpick__name,
.prod__name {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.12;
}
.qpick__why { line-height: 1.4; }
.skip { font-size: var(--text-ui); line-height: 1.4; }
.skip a { font-weight: 650; text-underline-offset: 0.2em; }
/* links inside a sentence: inline padding grows the tap area to 44px and does not move the lines */
.tpl-disclosure a, .skip a, .prose a:not(.btn) { padding-block: calc((var(--tap) - 1.1em) / 2); }
.qpick .btn { margin-block-start: var(--space-2xs); }

@media (min-width: 60rem) {
  .tband__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--space-xl);
  }
  .answer { font-size: var(--text-lead); line-height: 1.4; }
  .tpl-disclosure { margin-block-start: var(--space-s); }
  .qpick-plate { rotate: 0.8deg; }
  .qpick { padding: var(--space-m) var(--space-l) var(--space-l); gap: var(--space-xs); }
  .qpick__name { font-size: var(--text-kicker); }
}

/* =========================================================================
   BODY — meta line, comparison table, table of contents, prose
   ========================================================================= */
.tbody {
  padding-block: var(--space-m) var(--space-2xl);
  background-image: var(--paws);
  background-size: clamp(18rem, 30vw, 26rem);
  background-position: 3rem 5rem;
}
.meta { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-s); font-size: var(--text-caption); color: var(--color-text-muted); }

.tpl-h2 {
  font-family: var(--font-display);
  font-size: var(--text-kicker);
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.cmp { margin-block-start: var(--space-xl); }
.cmp table {
  inline-size: 100%;
  margin-block-start: var(--space-s);
  border-collapse: collapse;
  text-align: start;
}
.cmp th, .cmp td {
  padding: var(--space-xs) var(--space-s) var(--space-xs) 0;
  text-align: start;
  vertical-align: middle;
}
.cmp thead th {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-text-muted);
}
.cmp tbody tr { border-block-start: 1.5px solid var(--color-line); }
.cmp tbody th {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.15;
}
.cmp tbody th a { display: inline-flex; align-items: center; min-block-size: var(--tap); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
.cmp td:last-child { padding-inline-end: 0; text-align: end; }
.cmp--plain td:last-child { text-align: start; } /* guide tables: the last column is text, not the shop link */

/* phones: each row becomes a card. The name and the action stay visible; the other cells get their column label. */
@media (max-width: 44rem) {
  .cmp thead {
    position: absolute;
    inline-size: 1px; block-size: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .cmp table, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; }
  .cmp tbody tr {
    padding: var(--space-xs) var(--space-s);
    border: 0;
    border-radius: var(--radius-s);
    background: var(--paper);
    box-shadow: inset 0 0 0 1.5px var(--color-line);
  }
  .cmp tbody tr + tr { margin-block-start: var(--space-xs); }
  .cmp th, .cmp td { padding: 0; }
  .cmp td[data-label]::before { content: attr(data-label) ": "; font-weight: 650; }
  .cmp td:last-child { text-align: start; }
}

.article { display: grid; gap: var(--space-l); margin-block-start: var(--space-xl); }
.toc {
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-bg-sunken);
}
.toc__head {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--color-text-muted);
}
summary.toc__head { line-height: var(--tap); cursor: pointer; } /* the toggle is a 44px tap target */
.toc a {
  display: flex;
  align-items: center;
  min-block-size: var(--tap);
  padding-block: var(--space-2xs);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.toc a[aria-current] { color: var(--mood-deep); box-shadow: inset 3px 0 0 var(--mood-deep); padding-inline-start: var(--space-xs); } /* section on screen (templates.js) */
@media (hover: hover) and (pointer: fine) {
  .toc a:hover, .related a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
}
/* guide pages: under 64rem the sidebar TOC gives way to the inline one rehype-guide.mjs puts after the quick pick,
   so the first filled button reaches the first phone screen (owner choice B, 2026-10-27) */
.prose > .toc--inline { margin-block: var(--space-m); }
@media (max-width: 63.99rem) {
  .article:has(.toc--inline) { margin-block-start: var(--space-2xs); }
  .article:has(.toc--inline) > .toc:not(.toc--inline) { display: none; }
  .tbody:has(.toc--inline) { padding-block-start: var(--space-2xs); }
  .prose > .note[data-quickpick] { margin-block: var(--space-s); padding-block: var(--space-xs); }
  .tband--solo { padding-block-end: calc(var(--space-2xs) + clamp(1.5rem, 3vw, 3rem)); }
  .tband--solo .tpl-h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.5rem); }
  .tband--solo .crumb li:last-child { display: none; } /* repeats the H1; JSON-LD keeps all 3 */
}
@media (min-width: 64rem) { .toc--inline { display: none; } }
@media (min-width: 64rem) {
  .article { grid-template-columns: minmax(0, 54rem) minmax(0, 16rem); justify-content: space-between; gap: var(--space-xl); align-items: start; }
  .article__body { grid-column: 1; grid-row: 1; }
  /* sticky under the fixed header (it never hides on content pages); a long list scrolls inside the box */
  .toc { grid-column: 2; grid-row: 1; position: sticky; inset-block-start: calc(var(--header-h) + 1rem); max-block-size: calc(100dvh - var(--header-h) - 2rem); overflow-y: auto; }
}
.prose table { inline-size: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: var(--space-2xs) var(--space-s) var(--space-2xs) 0; border-block-end: 1.5px solid var(--color-line); text-align: start; vertical-align: top; }
.prose img { inline-size: 100%; max-inline-size: 30rem; block-size: auto; } /* code-drawn charts: text stays 14px+ at 390px */
@media (hover: hover) and (pointer: fine) {
  .prose .btn--primary:hover { background: oklch(0.34 0.04 262); transform: translateY(-1px); } /* one step lighter than --ink */
}

.prose { max-inline-size: var(--measure); }
.prose > * + * { margin-block-start: var(--space-s); }
.prose > .tpl-h2 { margin-block-start: var(--space-xl); }
.prose > .tpl-h2:first-child { margin-block-start: 0; }
.prose ul { padding-inline-start: 1.25rem; list-style: disc; }
.prose li + li { margin-block-start: var(--space-3xs); }
.prose a:not(.btn) { font-weight: 600; text-underline-offset: 0.2em; }

/* =========================================================================
   PRODUCT BLOCK — tilted plate, best-for label, name, good points, skip line, the one button
   ========================================================================= */
.prods { margin-block-start: var(--space-xl); }
.prods__list { margin-block-start: var(--space-l); }
.prod {
  display: grid;
  gap: var(--space-m);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prod + .prod { margin-block-start: var(--space-2xl); }
/* guide pages (rehype-guide.mjs): a product section with no plate image; keeps the prose flow, only borrows the one-filled-button logic */
.prose .prod--text { display: block; }
.prose > .prod--text { margin-block-start: var(--space-xl); } /* same gap as a .tpl-h2 in the flow */
.prod--text > * + * { margin-block-start: var(--space-s); }   /* same rhythm as .prose > * + * */
.prose .act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); }
/* the affiliate line sits directly under the button, caption size (cta-and-hubs.md section 2) */
.prose .act .aff { flex-basis: 100%; font-size: 0.875rem; color: var(--color-text-muted); }
.plate { position: relative; max-inline-size: 22rem; }
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed var(--mood-deep);
  border-radius: 1.5rem;
  transform: translate(0.55rem, -0.45rem) rotate(2.4deg);
  pointer-events: none;
}
.plate__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--mood);
  transform: rotate(-1.4deg);
}
.prod:nth-child(even) .plate::before { transform: translate(-0.55rem, -0.45rem) rotate(-2.4deg); }
.prod:nth-child(even) .plate__img { transform: rotate(1.4deg); }
.plate__img img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 32%);
}
.plate__note {
  position: absolute;
  inset-block-end: var(--space-xs);
  inset-inline-start: var(--space-xs);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
}
.prod__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); max-inline-size: var(--measure); }
.prod__name { font-size: var(--text-kicker); }
.prod__good { padding-inline-start: 1.25rem; list-style: disc; }
.prod__good li + li { margin-block-start: var(--space-3xs); }
.prod__body .btn { margin-block-start: var(--space-2xs); }
/* guide product card (rehype-guide.mjs, designer brief 2026-10-27): photo panel | shop, name, key fact, button; "Best for" footer
   across the card. Every photo panel has the same height, so names and buttons line up card to card. Stacks under 40rem.
   Buttons stay filled; the scroll-driven fill swap was removed (owner 2026-10-27). */
.tpl-h2__n { color: var(--mood-deep); }
.prod--text > p > strong:first-child { font-weight: 650; color: var(--color-text); } /* lead-in label: "Sizes:", "Skip this if:" */
.pcard {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-s);
  background: #fff; /* same white as the old photo panel: the card reads as one object on the paw paper */
  box-shadow: var(--shadow-sticker);
}
.pcard__img { display: grid; place-items: center; block-size: 14rem; padding: var(--space-s); background: var(--paper-2); }
.prose .pcard__img img { inline-size: auto; max-inline-size: 100%; max-block-size: 12rem; object-fit: contain; mix-blend-mode: multiply; } /* the shop photos' white ground takes the panel tint */
.pcard__body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-2xs); padding: var(--space-s) var(--space-m) var(--space-m); }
.pcard__shop { font-size: var(--text-caption); font-weight: 700; color: var(--color-text-muted); }
.pcard__name { font-family: var(--font-display); font-size: var(--text-lead); font-weight: 700; line-height: 1.15; }
.pcard__fact { font-size: var(--text-caption); color: var(--color-text-muted); }
.pcard .act { margin-block-start: var(--space-2xs); }
.pcard__best { grid-column: 1 / -1; padding: var(--space-xs) var(--space-m); border-block-start: 1px solid var(--color-line); background: var(--paper); font-size: var(--text-caption); }
.pcard__tag { display: inline-block; margin-inline-end: var(--space-3xs); padding: 0.1rem 0.55rem; border-radius: var(--radius-pill); background: var(--mood-soft); font-weight: 700; }
@media (max-width: 39.99rem) {
  .pcard .act .btn { inline-size: 100%; min-block-size: var(--tap); justify-content: space-between; }
}
@media (min-width: 40rem) {
  .pcard { grid-template-columns: 17.5rem minmax(0, 1fr); }
}
@media (min-width: 64rem) {
  .prose .pcard { inline-size: calc(100% + 6rem); } /* card may run 6rem past the text measure; the 54rem article column has the room */
  /* the sticky TOC sits next to the card column instead of at the far right: no empty half-page; left edge stays on the hero's line */
  .article:has(.pcard) { grid-template-columns: minmax(0, calc(var(--measure) + 6rem)) minmax(0, 16rem); justify-content: start; gap: var(--space-2xl); }
}
@media (min-width: 48rem) {
  .prod:not(.prod--text) { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
  .plate__img { aspect-ratio: 4 / 4.6; }
}

/* =========================================================================
   RELATED — 3 links, descriptive anchors
   ========================================================================= */
.related { margin-block-start: var(--space-2xl); }
.related ul { display: grid; gap: var(--space-2xs); margin-block-start: var(--space-s); }
.related a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-block-size: var(--tap);
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.15;
  text-decoration: none;
}
.related .dot {
  flex: none;
  inline-size: 0.625rem;
  block-size: 0.625rem;
  border-radius: 50%;
  background: var(--mood-deep);
  box-shadow: 0 0 0 2px var(--mood);
}

/* =========================================================================
   STICKY ACTION — phones only, best-of and review only.
   templates.js shows it only when the quick pick has left the screen and no other filled button is on screen.
   ========================================================================= */
.stickybar {
  position: fixed;
  inset-inline: var(--gutter);
  inset-block-end: max(var(--space-xs), env(safe-area-inset-bottom));
  z-index: calc(var(--z-header) - 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 0.375rem 0.375rem 0.375rem var(--space-s);
  border-radius: var(--radius-pill);
  background: var(--paper);
  box-shadow: var(--shadow-float), inset 0 0 0 1.5px var(--color-line);
  transition: transform 240ms var(--ease-out), opacity 200ms ease, visibility 0s;
}
.stickybar[inert] {
  visibility: hidden;
  opacity: 0;
  transform: translateY(150%);
  transition: transform 200ms var(--ease-out), opacity 160ms ease, visibility 0s 200ms;
}
.stickybar__name {
  min-inline-size: 0;
  overflow: hidden;
  font-size: var(--text-caption);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stickybar .btn { flex: none; }
@media (min-width: 60rem) { .stickybar { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .stickybar, .stickybar[inert] { transform: none; transition: opacity 160ms ease, visibility 0s; }
}

/* =========================================================================
   PARTS FOR THE OTHER TEMPLATES (guide, review, versus, hub, gifts, trust)
   ========================================================================= */
/* band variants: one column (no quick pick), quiet (gifts), neutral (trust) */
.tband--solo .tband__grid { grid-template-columns: minmax(0, 52rem); }
.tband--soft  { background: var(--mood-soft); }
.tband--paper { background: var(--color-bg-sunken); }
.tband .chips { margin-block-start: var(--space-s); }
.tband .chip { background: var(--paper); }

/* /train/ hub (cta-and-hubs.md section 1): hero with a site picture, pills with counts, one wide newest card, card grid, closing CTA */
.hubhero { display: grid; gap: var(--space-m); align-items: center; }
.hubhero .plate { inline-size: min(100%, 16rem); justify-self: start; margin-inline-start: var(--space-3xs); }
.hubhero .btn { margin-block-start: var(--space-s); }
.hubhero .answer a { text-underline-offset: 0.2em; }
.hub .tpl-h2 { margin-block: var(--space-xl) var(--space-s); scroll-margin-top: calc(var(--header-h) + 1rem); }
.hub > .tpl-h2:first-child { margin-block-start: 0; }
.hubwide {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: var(--shadow-sticker);
  color: var(--ink);
  text-decoration: none;
}
.hubwide__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--mood); }
.hubwide__img img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 30%; }
.hubwide__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2xs); padding: var(--space-m); }
.hubwide__title { font-family: var(--font-display); font-size: var(--text-kicker); font-weight: 700; line-height: 1.1; text-wrap: balance; }
.hubwide__text { max-inline-size: 52ch; line-height: 1.5; }
.hubwide__go { display: inline-flex; align-items: center; gap: 0.4rem; min-block-size: var(--tap); font-weight: 700; color: var(--mood-deep); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.hubwide__go svg { inline-size: 1rem; }
@media (min-width: 48rem) {
  .hubwide { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .hubwide__img { aspect-ratio: auto; min-block-size: 16rem; }
  .hubwide__body { justify-content: center; padding: var(--space-l); }
}
@media (min-width: 60rem) {
  .hubhero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-xl); }
  .hubhero .plate { justify-self: end; margin-inline-end: var(--space-xs); }
}
.hubgrid { display: grid; gap: var(--space-xl) var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); padding: 0; list-style: none; }
.hubgrid .gcard { inline-size: auto; }
@media (max-width: 29.99rem) { .hubgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) var(--space-s); } .hubgrid .gcard__title { font-size: 1.0625rem; } }
.hubend { margin-block-start: var(--space-2xl); padding: var(--space-l) var(--space-m); border-radius: var(--radius-s); background: var(--mood-soft); }
.hubend .tpl-h2 { margin-block-start: 0; }
.hubend p { max-inline-size: 52ch; margin-block-end: var(--space-s); line-height: 1.5; }

/* guide: step label above a step heading */
.prose ol { padding-inline-start: 1.25rem; list-style: decimal; }
.step__n { /* display font, not the marker font: guides then load 2 font files, not 3 */
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--mood-deep);
}
.prose > .step__n { margin-block-start: var(--space-xl); }
.prose > .step__n + .tpl-h2 { margin-block-start: var(--space-3xs); }

/* note: a sunken box for a soft product note or an honest "we do not know yet" block */
.note {
  max-inline-size: var(--measure);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-bg-sunken);
}
.note > * + * { margin-block-start: var(--space-2xs); }
.note__head { font-weight: 700; }
.prose > .note { margin-block: var(--space-m); }

/* strip: the one money block on guide and hub (pillar colour plate + dashed outline) */
.strip { position: relative; max-inline-size: 54rem; margin-block-start: var(--space-2xl); }
.strip::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed var(--mood-deep);
  border-radius: var(--radius-card);
  transform: translate(0.4rem, -0.4rem) rotate(0.8deg);
  pointer-events: none;
}
.strip__in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-m);
  border-radius: var(--radius-card);
  background: var(--mood);
  color: var(--ink);
}
.strip .qpick__label { color: var(--ink); }
.strip__name {
  font-family: var(--font-display);
  font-size: var(--text-kicker);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.1;
}
.strip p { max-inline-size: 60ch; }
.strip .tpl-disclosure { margin-block-start: 0; }
@media (min-width: 48rem) { .strip__in { padding: var(--space-l); } }

/* review: suits / skip columns */
.fit { display: grid; gap: var(--space-l); margin-block-start: var(--space-xl); }
.fit ul { margin-block-start: var(--space-s); padding-inline-start: 1.25rem; list-style: disc; }
.fit li + li { margin-block-start: var(--space-2xs); }
.fit p { margin-block-start: var(--space-s); }
.fit a:not(.btn) { font-weight: 650; text-underline-offset: 0.2em; padding-block: calc((var(--tap) - 1.1em) / 2); }
@media (min-width: 44rem) { .fit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); max-inline-size: 54rem; } }

/* versus: two buy actions side by side, at every width */
.duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.duel__side {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-xs);
  border-radius: var(--radius-s);
  background: var(--paper);
  box-shadow: var(--shadow-sticker), inset 0 0 0 1.5px var(--color-line);
}
.duel__side .qpick__label { font-size: 1.25rem; }
.duel__name {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.1;
  overflow-wrap: break-word;
}
.duel__side p { font-size: var(--text-ui); line-height: 1.4; }
.duel .btn { inline-size: 100%; justify-content: center; margin-block-start: auto; padding-inline: var(--space-2xs); }
.duel--end { max-inline-size: 54rem; margin-block-start: var(--space-m); }
@media (min-width: 48rem) {
  .duel { gap: var(--space-m); }
  .duel__side { padding: var(--space-m); border-radius: var(--radius-card); gap: var(--space-xs); }
}

/* hub: guide cards in a grid (the homepage card, not in a rail), and link rows */
.hub-sec { margin-block-start: var(--space-2xl); scroll-margin-top: calc(var(--header-h) + 1rem); }
.hub-sec:first-of-type { margin-block-start: var(--space-xl); }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: var(--space-xl) var(--space-l);
  margin-block-start: var(--space-l);
}
.hub-grid .gcard { inline-size: auto; block-size: auto; user-select: auto; }
.rows { display: grid; gap: var(--space-2xs); margin-block-start: var(--space-s); }
.rows a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-block-size: var(--tap);
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.15;
  text-decoration: none;
}
.rows .dot { flex: none; inline-size: 0.625rem; block-size: 0.625rem; border-radius: 50%; background: var(--mood-deep); box-shadow: 0 0 0 2px var(--mood); }
@media (hover: hover) and (pointer: fine) {
  .rows a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
}

/* gifts: quiet. Straight plates, no dashed outline, a calm card grid. */
.plate--flat::before { display: none; }
.plate--flat .plate__img { transform: none; aspect-ratio: 4 / 3.4; }
.feature { display: grid; gap: var(--space-m); margin-block-start: var(--space-xl); }
.feature .plate { max-inline-size: 26rem; }
@media (min-width: 48rem) {
  .feature { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
}
.gifts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--space-xl) var(--space-l);
  margin-block-start: var(--space-l);
}
.gift { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
.gift .plate { inline-size: 100%; max-inline-size: none; margin-block-end: var(--space-2xs); }
.gift__name { font-family: var(--font-display); font-size: var(--text-lead); font-weight: 700; font-stretch: 88%; line-height: 1.15; }
.gift .go { margin-block-start: auto; }

/* trust: switch between the three trust pages */
.switch { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-m); margin-block-start: var(--space-s); }
.switch a { display: inline-flex; align-items: center; min-block-size: var(--tap); font-weight: 650; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.switch a[aria-current="page"] { text-decoration: none; }
.switch a[aria-current="page"]::before {
  content: "";
  inline-size: 0.625rem;
  block-size: 0.625rem;
  margin-inline-end: 0.5rem;
  border-radius: 50%;
  background: var(--ink);
}

/* print: the article only, with link addresses */
@media print {
  .site-header, header, nav, footer, .toc, .tband__wave, .stickybar, dialog { display: none !important; }
  .tband { padding-block: 0; background: none; }
  .tbody { background: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; font-weight: 400; overflow-wrap: anywhere; }
}

/* Plain pages (About, Disclosure, Privacy, Impressum, How we choose, Train hub) put .tpl-wrap straight in <main>: the header is fixed, so clear it, and give the text the same rhythm as .prose. */
main > .tpl-wrap { padding-block: calc(var(--header-h) + var(--space-m)) var(--space-xl); }
main > .tpl-wrap > * { max-inline-size: var(--measure); }
main > .tpl-wrap > * + * { margin-block-start: var(--space-s); }
main > .tpl-wrap > h2 { margin-block-start: var(--space-xl); }
main > .tpl-wrap ul { padding-inline-start: 1.25rem; list-style: disc; }
main > .tpl-wrap li + li { margin-block-start: var(--space-3xs); }
main > .tpl-wrap a:not(.btn) { font-weight: 600; text-underline-offset: 0.2em; }

/* =========================================================================
   POST DESIGN KIT (2026-11-24, skill reference/post-design.md) — "nose first": a dog follows its nose
   along a scent trail to the pick. Decoration = pillar colour + two drawn marks (nose, dotted trail),
   drawn as CSS masks so they take the page's pillar colour. Facts, buttons and the affiliate line stay plain.
   All marks are pseudo-elements: no extra .prose children, no text for screen readers, size reserved.
   ========================================================================= */
:root {
  --mark-nose: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 36'%3E%3Cpath fill-rule='evenodd' d='M24 3c12 0 21 4 21 12 0 7-6 11-12 13-3 1-5 5-9 5s-6-4-9-5C9 26 3 22 3 15 3 7 12 3 24 3Zm-9 9c-3 0-5 2-4 4s4 3 6 2 3-3 2-4-2-2-4-2Zm18 0c-2 0-3 1-4 2s0 3 2 4 5 0 6-2-1-4-4-4Z'/%3E%3C/svg%3E");
  --mark-trail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 40'%3E%3Cpath d='M6 30c30-22 52 14 84-4s48-16 78 2 32 2 42-6' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round' stroke-dasharray='0 13'/%3E%3C/svg%3E");
}
/* quick pick: pillar wash + edge drawn as an inset shadow (no width change, so no new line wraps) and a round
   nose badge on the box's top corner (outside the text box: the first button stays on the first phone screen) */
.prose > .note[data-quickpick] { position: relative; background: var(--mood-soft); box-shadow: inset 6px 0 0 var(--mood); }
.note[data-quickpick] > p:first-child > strong:first-child { color: var(--ink); }
.prose > .note[data-quickpick]::after {
  content: ""; position: absolute; inset-block-start: -1.35rem; inset-inline-end: var(--space-m);
  inline-size: 2rem; block-size: 2rem; border-radius: 50%;
  background: var(--paper); box-shadow: 0 0 0 2px var(--mood), var(--shadow-sticker); pointer-events: none;
}
.prose > .note[data-quickpick]::before {
  content: ""; position: absolute; z-index: 1; inset-block-start: -0.95rem; inset-inline-end: calc(var(--space-m) + 0.375rem);
  inline-size: 1.25rem; block-size: 1.25rem; background: var(--mood-deep);
  -webkit-mask: var(--mark-nose) center / contain no-repeat; pointer-events: none;
  mask: var(--mark-nose) center / contain no-repeat; pointer-events: none;
}
/* product card: pillar strip on top + dog-tag "Pick N of M" (text from rehype-guide.mjs) */
.pcard { border-block-start: 6px solid var(--mood); }
.pcard__n {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.15rem 0.7rem 0.15rem 0.45rem; border-radius: var(--radius-pill);
  background: var(--mood); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 0.9375rem; line-height: 1.3;
}
.pcard__n::before { /* the tag's ring hole */
  content: ""; inline-size: 0.55em; block-size: 0.55em; flex: none;
  border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--ink);
}
/* scent trail between two picks: the nose leads to the next one */
.prose > .prod--text + .prod--text::before {
  content: ""; display: block; inline-size: min(15rem, 70%); block-size: 2.5rem;
  margin: 0 auto var(--space-l);
  background: var(--mood-deep);
  -webkit-mask: var(--mark-nose) right center / 2.2rem 1.65rem no-repeat, var(--mark-trail) left center / calc(100% - 2.6rem) 100% no-repeat;
  mask: var(--mark-nose) right center / 2.2rem 1.65rem no-repeat, var(--mark-trail) left center / calc(100% - 2.6rem) 100% no-repeat;
}
/* each product's one button sits on a quiet panel: the place to act, after the "skip this if" line */
.prose .prod--text > .act {
  padding: var(--space-s) var(--space-m); border-radius: var(--radius-s);
  border-inline-start: 6px solid var(--mood); background: var(--paper-2);
}
/* how-to guides: "Step N" as the same dog tag */
.prose > .step__n {
  display: flex; align-items: center; gap: 0.4em; inline-size: fit-content;
  padding: 0.2rem 0.8rem 0.2rem 0.5rem; border-radius: var(--radius-pill);
  background: var(--mood); color: var(--ink);
}
.prose > .step__n::before {
  content: ""; inline-size: 0.5em; block-size: 0.5em; flex: none;
  border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--ink);
}
/* comparison table head: pillar wash (desktop; phones show rows as cards with labels) */
@media (min-width: 44.01rem) {
  .cmp thead th { background: var(--mood-soft); color: var(--ink); }
  .cmp thead th:first-child { padding-inline-start: var(--space-xs); border-start-start-radius: var(--radius-s); border-end-start-radius: var(--radius-s); }
  .cmp tbody th { padding-inline-start: var(--space-xs); }
  .cmp thead th:last-child { border-start-end-radius: var(--radius-s); border-end-end-radius: var(--radius-s); }
}
/* guide head, wide screens only: a nose on a scent trail in the free band margin, never over the title */
@media (min-width: 80rem) {
  .tband--guide::after {
    content: ""; position: absolute; inset-block-end: calc(clamp(1.5rem, 3vw, 3rem) + var(--space-m));
    inset-inline-end: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));
    inline-size: 17rem; block-size: 4rem; background: var(--ink); opacity: 0.85;
    -webkit-mask: var(--mark-nose) right center / 3.4rem 2.55rem no-repeat, var(--mark-trail) left center / calc(100% - 4rem) 100% no-repeat;
    mask: var(--mark-nose) right center / 3.4rem 2.55rem no-repeat, var(--mark-trail) left center / calc(100% - 4rem) 100% no-repeat;
    pointer-events: none;
  }
}
/* browsers without CSS masks would paint the marks as solid blocks: hide them there */
@supports not ((mask: url("")) or (-webkit-mask: url(""))) {
  .prose > .note[data-quickpick]::before, .prose > .note[data-quickpick]::after,
  .prose > .prod--text + .prod--text::before, .tband--guide::after { display: none; }
}
