/* ============================================================================
   SAMPLE E — SIGNAL.  Prefixes: sg- page, sgc- chrome.

   ⚠ FLAT, PER-ELEMENT, FULLY SCOPED. No descendant or compound-descendant selectors
   anywhere: build-etch.mjs hoists each selector into its own style entry and SILENTLY
   DROPS anything nested, so `.sg-also .sg-m__t` would compile away without a warning.
   Where a parent state must reach a child it travels as an inherited custom property.
   At-rules inside a rule are fine and are hoisted per selector. → kit 01 §3, 03 §1

   ⚠ THE PALETTE'S RULES LIVE IN THE TOKEN NAMES, NOT IN THESE COMMENTS. A palette rule
   written in prose gets broken; on the Deck the same rule was written as a comment and
   then broken in nine places. So: --sg-deep is the azure that works ON PAPER and
   --sg-signal is the azure that works ON GRAPHITE, and reaching for the wrong one is a
   visible error at the point of use. → §6k rules 1 to 3, kit 03 §5d

   Measured with `node tools/contrast.mjs signal`: all used pairs pass, text floor
   4.80:1 (muted meta on sand), interface border solved at 3.02:1.
   ============================================================================ */

.sg-body {
  --sg-paper:  #F2F1EE;   /* base      45° / 13%  the locked soft neutral, warm       */
  --sg-ink:    #17191C;   /* neutral  216° / 10%  graphite: type, deep bands, the rail */
  --sg-deep:   #12688C;   /* primary  198° / 77%  azure as text and stroke ON PAPER    */
  --sg-signal: #3FB4E3;   /* accent   197° / 75%  azure as text and stroke ON GRAPHITE */
  --sg-sand:   #C9BFAE;   /* secondary 38° / 20%  the warm second field                */
  --sg-quiet:  #E6E4DE;   /* tertiary  45° / 14%  the card surface                     */

  /* Derived at point of use, never new colours. Each becomes a color-mix() against a
     token when ACSS lands, which is the kit's own rule. → §1b, kit 03 §2 */
  --sg-muted:      #666768;   /* ink at 64% over paper          5.02:1 */
  --sg-mutedquiet: #5D5E5E;   /* ink at 66% over the quiet card 5.12:1 */
  --sg-mutedsand:  #4C4B48;   /* ink at 70% over sand           4.80:1 ← the text floor */
  --sg-mutedink:   #ACACAB;   /* paper at 68% over graphite     7.75:1 */
  --sg-line:       #8B8B8B;   /* ink at 47% over paper          3.02:1, the 3:1 interface floor */

  /* The rail's real height, measured off the page rather than estimated, and used BOTH
     to size the rail and to pad the document so the last thing on it stays reachable.
     ⚠ Session 5's spine budget was reasoned out and written down as though it had been
     read off the page, and every number in it was wrong. → §6k, kit 07 §5i */
  --sg-railh: 4.25rem;

  --sg-measure: 74rem;
  --sg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  background: var(--sg-paper);
  color: var(--sg-ink);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  margin: 0;
  /* ⚠ The document must clear the fixed rail, or its last element is unreachable. */
  padding-bottom: var(--sg-railh);
  -webkit-font-smoothing: antialiased;
}

/* ⚠ THE GUTTER AND THE LOCK GO ON THE SAME ELEMENT, AND THEN YOU DO NOT COMPENSATE.
   `overflow` propagates from the body to the viewport but `scrollbar-gutter` does not,
   so on the body it computes on an element that never scrolls. Adding a measured
   padding-right on top double-counts it and slides every centred band by half a
   scrollbar. → kit 03 §5c */
html { scrollbar-gutter: stable; }
html[data-locked="true"] { overflow: hidden; }

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

img { max-width: 100%; }

/* ⚠ `height: auto` on EVERY rule that uses aspect-ratio. With both a width attribute
   and width:100% the HTML height attribute makes both dimensions definite, so
   aspect-ratio is silently ignored and a card image renders 248x800 instead of 248x165.
   It does not look like a CSS failure, it looks like a deliberate portrait crop.
   → HANDOFF §3.1 */

::selection { background: var(--sg-signal); color: var(--sg-ink); }

:focus-visible {
  outline: 2px solid var(--sg-deep);
  outline-offset: 2px;
}

.sgc-skip {
  position: fixed; top: 0; left: 0; z-index: 90;
  background: var(--sg-ink); color: var(--sg-paper);
  padding: 0.7rem 1.1rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 700;
  text-decoration: none;
  transform: translateY(-120%);
}
.sgc-skip:focus-visible { transform: translateY(0); }

/* ------------------------------------------------------------------- the icons --
   Hand-drawn inline SVG at 16x16, rendered at 1em on currentColor, so they never need
   a second colour value and never fall out of step with a type change. → §6f */
.sg-ico {
  width: 1em; height: 1em; flex: none;
  /* ⚠ The fill comes from an INHERITED custom property, never from a descendant
     selector. `.sg-bm[aria-pressed="true"] .sg-ico` is exactly what the generator drops
     silently, so the pressed state travels down as a value instead. → kit 03 §6c */
  fill: var(--sg-icofill, none);
  stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.13em;
}
/* ⚠ A meta row is laid out with INLINE FLOW, never flex: flex aligns boxes while type
   wants baselines, and one flex `gap` cannot tell "icon to its own value" from "one
   pair to the next", so every item sits the same distance apart and the pairs stop
   reading as pairs. vertical-align does the baseline work for free. → §6f-ii, rule 10 */
.sg-ico--meta { margin-right: 0.3rem; }

.sg-m {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sg-muted);
  margin: 0.7rem 0 0;
}
.sg-m--ondark { color: var(--sg-mutedink); }
/* ⚠ The meta row is the card's FOOT. With the cell a column flex container at
   height 100%, `margin-top: auto` puts every card's byline on one line however long the
   standfirst above it runs, so a row of parallel cards has topSpread AND bottomSpread of
   zero. Without it the tops align and the bottoms ladder, which reads as a broken grid.
   → §6f-v, §6g */
.sg-m--foot { margin-top: auto; padding-top: 0.7rem; }
/* On the quiet card surface the derived muted value is its own token at 5.12:1. The
   paper-ground value measures differently there, which is why this is a token and not a
   reuse. → kit 03 §5a */
.sg-m--onquiet { color: var(--sg-mutedquiet); }
.sg-m__t { color: inherit; margin-right: 0.9rem; }
.sg-m__t--who {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  margin-right: 0.9rem;
}
.sg-m__t--who:hover, .sg-m__t--who:focus-visible { text-decoration-style: solid; }

/* ------------------------------------------------------------- the bookmark --
   ⚠ IT SITS IN THE FLOW, as the last item of the meta row, and that is deliberate.
   B floats it in an image corner and C cut an inverted-radius notch for it; C's notch
   made the control protrude 9px, which then needed clearance in six container types,
   cross-axis padding on the scroller, a floor under five separate gaps and four rounds
   of review to settle. In the flow it cannot overlap text, cannot be clipped and needs
   no clearance anywhere, because nothing sticks out. → §6j, §6h-x, §6h-xi, §6h-xvii */
.sg-bm {
  appearance: none; -webkit-appearance: none;
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--sg-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  /* ⚠⚠ THE LAYOUT BOX MUST FIT THE LINE BOX, and getting this wrong is what made the
     "in the flow, so it cannot overlap text by construction" claim false. The meta row is
     13px at line-height 1.5, so its line box is 19.5px; a 30px inline-block protrudes
     about 10px beyond that whatever its vertical-align, and once the row wraps it lands on
     the adjacent line. `fit.mjs` caught it as a 30x15 overlap with sg-m__t at nine widths.
     So the DRAWN box matches the line box and the HIT AREA is expanded by a pseudo-element
     instead: 20px + 12px each side = 44px, which is the floor without a 44px icon.
     → kit 03 §8, §6a */
  display: inline-block;
  width: 20px; height: 20px;
  position: relative;
  vertical-align: middle;
}
.sg-bm::after {
  content: '';
  position: absolute; inset: -12px;
}
.sg-bm:hover { color: var(--sg-deep); }
.sg-bm[aria-pressed="true"] { color: var(--sg-deep); --sg-icofill: currentColor; }
/* ⚠ On the graphite band the bookmark DECLARES its colours rather than inheriting, and
   its pressed state takes the SIGNAL azure, which rule 3 permits only here. */
.sg-bm--ondark { color: var(--sg-mutedink); }
.sg-bm--ondark:hover { color: var(--sg-signal); }
.sg-bm--ondark[aria-pressed="true"] { color: var(--sg-signal); }

/* --------------------------------------------------------- the card contract --
   ⚠ A CARD IS NOT ONE LINK. The title goes to the article, the category pill to the
   category archive and the author to the author archive, so there are NO card hover
   animations: a whole-card lift is a promise that the whole rectangle is one target,
   and it stops being true the moment there are three. Each of the three carries its own
   affordance instead. → §6h-xii, kit 03 §5r */
.sg-cardtitle {
  color: inherit;
  text-decoration: none;
  --sg-u: 0%;
}
.sg-cardtitle:hover, .sg-cardtitle:focus-visible { --sg-u: 100%; }
.sg-cardtitle--ondark { color: var(--sg-paper); text-decoration: none; }
.sg-cardtitle--ondark:hover, .sg-cardtitle--ondark:focus-visible { --sg-u: 100%; }

/* ⚠ THE UNDERLINE IS A BACKGROUND ON AN INLINE CHILD, not text-decoration on the link.
   Only a background can animate from zero width, and only an INLINE child hugs the
   text: on a block link the gradient paints the full width of the cell whatever the
   headline says. `box-decoration-break: clone` is the load-bearing part, or the
   fragments of a wrapped line share one imaginary box and only the last line is
   painted, at the full column width. → §6h-xiii, kit 03 §5u */
.sg-cardline {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: var(--sg-u) 2px;
  transition: background-size 320ms var(--sg-ease);
}

.sg-cardchip {
  display: inline-block;
  /* ⚠ A flex or grid item STRETCHES on the cross axis by default, so inside the
     feature card (a column flex container) the chip painted its quiet ground right
     across the column and read as a band rather than a pill. align-self is inert in a
     block container, so one flat rule is correct in all seven card types. */
  align-self: start;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  background: var(--sg-quiet);
  color: var(--sg-deep);
  transition: background-color 200ms var(--sg-ease), color 200ms var(--sg-ease);
}
.sg-cardchip:hover, .sg-cardchip:focus-visible {
  background: var(--sg-ink);
  color: var(--sg-signal);
}
/* ⚠ On the graphite band the chip's rest state is the SIGNAL azure as a block carrying
   ink, which is rule 2, and its hover swaps to paper. Both pairs are in the matrix:
   ink on signal 7.42:1, deep on paper 5.49:1. */
.sg-cardchip--ondark {
  background: var(--sg-signal);
  color: var(--sg-ink);
}
.sg-cardchip--ondark:hover, .sg-cardchip--ondark:focus-visible {
  background: var(--sg-paper);
  color: var(--sg-deep);
}

/* ⚠ `display: contents` so the convenience link around an image adds NO box and no
   card's layout moves. tabindex -1 and aria-hidden in the markup keep it from being a
   second tab stop or a second announcement of the same headline. → §6h-xii */
.sg-imglink { display: contents; color: inherit; }

/* ------------------------------------------------------------------- reveals --
   ⚠ The armed state is added by JS, so a page with no JS has NO hidden state and is
   simply visible. The resting state is the bare base rule, so nothing depends on a
   transition finishing. → kit 03 §8, 08 §4 */
.sg-reveal[data-armed="true"] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--sg-ease), transform 620ms var(--sg-ease);
}
.sg-reveal[data-in="true"] { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════ THE MASTHEAD, IN FLOW ══ */

.sgc-mast {
  border-bottom: 1px solid var(--sg-line);
  background: var(--sg-paper);
}
.sgc-mast__inner {
  max-width: var(--sg-measure);
  margin-inline: auto;
  padding: 1.4rem 1.5rem 1.1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: center;
}
.sgc-mast__lockup { display: flex; align-items: center; gap: 0.8rem; }
/* ⚠ EXPLICIT SIZES, never align-self: stretch. Flexbox sizes the line from each item's
   HYPOTHETICAL cross size first, and for an img with height:auto that is its intrinsic
   height, so a 44px SVG becomes a FLOOR rather than being stretched to the text beside
   it. Both dimensions definite by design also means §3.1's aspect-ratio trap cannot
   apply. The width and height attributes stay on the element: they are what prevents
   layout shift before the SVG loads. → §6h-xvi, kit 03 §7e */
.sgc-mast__mark { flex: none; width: 2.75rem; height: 2.75rem; }
.sgc-mast__names { min-width: 0; }
.sgc-mast__word {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--sg-ink);
  margin: 0;
}
.sgc-mast__tag {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sg-deep);
  margin: 0.3rem 0 0;
}

.sgc-fmt { min-width: 0; }
.sgc-fmt__list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.sgc-fmt__item { min-width: 0; }
.sgc-fmt__link {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.9375rem; font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--sg-ink);
  text-decoration: none;
  padding: 0.55rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.sgc-fmt__link:hover, .sgc-fmt__link:focus-visible { border-bottom-color: var(--sg-deep); }
.sgc-fmt__link[aria-current="page"] { border-bottom-color: var(--sg-deep); }
/* The count is the honest half of "multi-format nav with counts": a real number, from
   the export, for a format that exists. → §6k */
.sgc-fmt__n {
  font-size: 0.75rem;
  color: var(--sg-muted);
  margin-left: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.sgc-mast__ctrls { display: flex; align-items: center; gap: 0.6rem; }
.sgc-mast__search {
  appearance: none; -webkit-appearance: none;
  background: none;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  width: 44px; height: 44px;
  font-size: 1.0625rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sgc-mast__search:hover { border-color: var(--sg-deep); color: var(--sg-deep); }

.sgc-nav__toggle {
  appearance: none; -webkit-appearance: none;
  background: var(--sg-ink);
  color: var(--sg-paper);
  border: 0;
  min-height: 44px;
  padding: 0.6rem 1rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.sgc-nav__toggle:hover { background: var(--sg-deep); }
.sgc-nav__toggleicon { font-size: 1rem; }
.sgc-nav__togglelabel { white-space: nowrap; }

@media (width >= 46rem) {
  .sgc-mast__inner {
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    padding-block: 1.8rem 1.5rem;
  }
  .sgc-fmt__list { justify-content: center; }
  .sgc-mast__mark { width: 3.25rem; height: 3.25rem; }
}

/* ══════════════════════════════════════════════════════════════ THE MEGA PANEL ══ */

.sgc-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: color-mix(in srgb, var(--sg-ink) 62%, transparent);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 260ms var(--sg-ease);
}
.sgc-scrim[data-open] { opacity: 1; }
/* ⚠ An author `display`/`position` rule does NOT defeat [hidden] on its own, but any
   author rule setting `display` does, so the pair is restated wherever display is set.
   Here position is set and display is not, so [hidden] still works; the rule is
   restated anyway so a later display declaration cannot silently break it.
   → kit 03 §7a */
.sgc-scrim[hidden] { display: none; }

.sgc-mega {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--sg-railh);
  z-index: 70;
  max-height: calc(100dvh - var(--sg-railh) - 1rem);
  overflow-y: auto;
  background: var(--sg-paper);
  border-top: 2px solid var(--sg-ink);
  /* ⚠ A TRANSFORM, not a clip-path wipe. A clip-path clips the element's OWN box-shadow,
     and that shadow is what makes a panel read as an overlay rather than as a new band,
     so a wipe would silently undo an earlier correction. → §6f-v */
  box-shadow: 0 -22px 46px -14px color-mix(in srgb, var(--sg-ink) 34%, transparent);
  transform: translateY(101%);
  /* Exit timing on the BASE rule, entrance timing on the open state, so the panel
     leaves at 65% of the speed it arrives with no JS and no second class. → §6f-v */
  transition: transform 190ms var(--sg-ease);
}
.sgc-mega[data-open] {
  transform: translateY(0);
  transition: transform 300ms var(--sg-ease);
}
.sgc-mega[hidden] { display: none; }

.sgc-mega__inner {
  max-width: var(--sg-measure);
  margin-inline: auto;
  padding: 2.4rem 1.5rem 2.6rem;
  display: grid;
  gap: 2rem;
  position: relative;
}
/* ⚠ THE PANEL CARRIES ITS OWN CLOSE. Session 5's worst finding was a mega panel that
   covered the control which opened it, leaving Escape and a strip of scrim as the only
   exits. Here the rail stays above the scrim as well, so there are two ways out. */
.sgc-mega__close {
  appearance: none; -webkit-appearance: none;
  position: absolute; top: 1rem; right: 1.5rem;
  background: none;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  width: 44px; height: 44px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sgc-mega__close:hover { border-color: var(--sg-deep); color: var(--sg-deep); }

.sgc-mega__cols { display: grid; grid-template-columns: 1fr; gap: 1.6rem 2rem; }
.sgc-mega__col { min-width: 0; }
.sgc-mega__grouptitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sg-deep);
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--sg-line);
}
.sgc-mega__list { list-style: none; margin: 0; padding: 0; }
.sgc-mega__link {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.9375rem;
  color: var(--sg-ink);
  text-decoration: none;
  padding: 0.42rem 0;
  min-height: 44px;
  align-items: center;
}
.sgc-mega__link:hover, .sgc-mega__link:focus-visible { color: var(--sg-deep); }
.sgc-mega__count {
  color: var(--sg-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.sgc-mega__side { display: grid; gap: 1.4rem; border-top: 1px solid var(--sg-line); padding-top: 1.4rem; }
.sgc-mega__issue { display: grid; gap: 0.8rem; }
/* ⚠ The real cover's own ratio, never 3/4 with object-fit: cover, which cropped about
   4% off a MAGAZINE COVER. → §6f-vii */
.sgc-mega__issueimg {
  width: 100%; height: auto;
  aspect-ratio: 866 / 1110;
  max-width: 13rem;
  border: 1px solid var(--sg-line);
}
.sgc-mega__issueline {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--sg-muted);
  margin: 0;
}
.sgc-mega__issuelinks { list-style: none; margin: 0; padding: 0; }
.sgc-mega__issuelink {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.9375rem; font-weight: 700;
  color: var(--sg-ink);
  text-decoration: none;
  padding: 0.5rem 0;
  min-height: 44px;
  white-space: nowrap;
}
.sgc-mega__issuelink:hover, .sgc-mega__issuelink:focus-visible { color: var(--sg-deep); }
/* The informational group is deliberately quiet, per the client's own wording: muted,
   not illegible, and it reaches full ink only on hover. → §6f-v */
.sgc-mega__about { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 1px solid var(--sg-line); }
.sgc-mega__aboutlink {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--sg-muted);
  text-decoration: none;
  padding: 0.4rem 0;
  min-height: 44px;
}
.sgc-mega__aboutlink:hover, .sgc-mega__aboutlink:focus-visible { color: var(--sg-ink); }

@media (width >= 40rem) {
  .sgc-mega__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (width >= 64rem) {
  .sgc-mega__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 3rem; }
  .sgc-mega__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sgc-mega__side { border-top: 0; border-left: 1px solid var(--sg-line); padding: 0 0 0 2.4rem; }
}

/* ═════════════════════════════════════════════════════════════════════ MAIN ══
   ⚠ overflow-x: clip WITH overflow-y: visible, which is the one pairing the spec
   permits. It bounds the full-bleed arcs without creating a scroll container, so
   nothing inside stops being sticky, and `hidden` would do the opposite.
   → kit 03 §5b, §5q-i */
.sg-main { overflow-x: clip; overflow-y: visible; }

.sg-band {
  position: relative;
  padding-inline: 1.5rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.sg-band__head {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  gap: 0.5rem 2rem;
  align-items: end;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.sg-band__title {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--sg-ink);
  margin: 0;
}
/* ⚠ EVERY text element on the graphite band DECLARES its colour. Colour inheritance
   passes the COMPUTED value, so an element with no colour of its own keeps whatever was
   resolved further up the tree and a re-pointed token never reaches it. That is how the
   largest type on a page went invisible once. → §6h-viii, kit 03 §5l */
.sg-band__title--ondark { color: var(--sg-paper); }
.sg-band__cats {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sg-muted);
  margin: 0;
}
.sg-band__cats--ondark { color: var(--sg-mutedink); }
.sg-band__all {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 700;
  color: var(--sg-deep);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px;
}
.sg-band__all:hover, .sg-band__all:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.sg-band__all--ondark { color: var(--sg-signal); }
.sg-band__all--ondark:hover, .sg-band__all--ondark:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

@media (width >= 46rem) {
  .sg-band__head { grid-template-columns: auto 1fr auto; }
}

/* ═════════════════════════════════════════════════════════════════ THE FRONT ══
   Skeleton 1 of 5. One article, one column, the largest type on the page. */
.sg-front {
  position: relative;
  padding-inline: 1.5rem;
  padding-block: clamp(2.4rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
}
/* ⚠ Its own wrapper at overflow: clip, never overflow on the section: `hidden` on an
   ancestor makes it a scroll container and kills position: sticky inside it, and
   overflow-x on a wide element is the other half of the trap that widens the document.
   → kit 03 §5b */
.sg-front__arcs {
  position: absolute;
  left: 50%; top: 0;
  width: 100vw; height: 100%;
  transform: translateX(-50%);
  overflow: clip;
  pointer-events: none;
}
.sg-front__arcsvg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  fill: none;
  /* ⚠ THE DEEP AZURE, because rule 3 forbids the signal on paper: it measures 2.10:1
     there, which fails even the 3:1 large floor. → §6k rule 3 */
  stroke: var(--sg-deep);
  stroke-width: 1.6;
  /* ⚠ non-scaling-stroke, or a 1.6px line becomes a 4px band on a wide monitor once
     preserveAspectRatio: none has stretched the viewBox. → kit 03 §5q */
  vector-effect: non-scaling-stroke;
  opacity: 0.42;
}
.sg-front__inner {
  position: relative;
  max-width: var(--sg-measure);
  margin-inline: auto;
}
.sg-front__title {
  /* ⚠ NO measure cap on a headline. Display type is short by nature and a cap invents a
     ragged edge unrelated to the column; one broke a hero headline after two words.
     → §6f-iii, §6g, kit 03 §7b */
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(2.4rem, 7.2vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--sg-ink);
  margin: 0.9rem 0 0;
  text-wrap: balance;
}
.sg-front__stand {
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: var(--sg-muted);
  /* A genuine measure cap on a box that really can run wide. The one legitimate kind.
     → kit 03 §7b */
  max-width: 48ch;
  margin: 1.1rem 0 0;
}
.sg-front__chip { margin-bottom: 0.2rem; }
.sg-front__meta { margin-top: 1.2rem; }
.sg-front__fig { margin: clamp(1.8rem, 4vw, 2.8rem) 0 0; }
.sg-front__img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  display: block;
}

@media (width >= 62rem) {
  .sg-front__img { aspect-ratio: 16 / 6.4; }
}

/* ══════════════════════════════════════════════════════════════ THE MAGAZINE ══
   Skeleton 2 of 5. An asymmetric pair: one tall feature against four dense rows. */
/* ⚠⚠ A BAND INSIDE .sg-zone MUST NOT PAINT ITS OWN GROUND. The arcs layer is first in
   the DOM inside the zone and positioned siblings with z-index auto paint in DOM order,
   so any opaque background on a later sibling covers it. Painting these two was a
   regression I introduced while giving the block classes a rule, and it destroyed the
   bridging signature outright: the arcs survived only in the gap between the bands.
   Fixing it with a z-index on the content was the wrong answer for the reason §6h-xxi
   already records, so the bands simply do not paint and the page ground shows through.
   The warm SAND field moved to the subscribe section, which is outside the zone.
   → §6h-xxi, kit 03 §7h */
.sg-mag { container: sg-mag / inline-size; }

.sg-mag__grid {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}
.sg-mag__feature { min-width: 0; display: flex; flex-direction: column; }
.sg-mag__featureimg {
  width: 100%; height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}
.sg-mag__featuretitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--sg-ink);
  margin: 0.7rem 0 0;
}
.sg-mag__featurestand {
  color: var(--sg-muted);
  margin: 0.7rem 0 0;
  font-size: 1rem;
}
.sg-mag__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  /* ⚠ ONE gap declaration in this block, and only one. Round 12's fix on the Deck was
     inserted at the top of a block and the original left four lines below it, so the
     later declaration won and the list shipped on the old value for two more review
     rounds while both the CSS comment and the handoff recorded the value that had been
     typed. `crosscheck.mjs` check 7 now scans for exactly this. → §6h-xvii, kit 07 §5d */
  gap: 1.6rem;
}
.sg-mag__row {
  min-width: 0;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--sg-line);
}
.sg-mag__rowtitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.16;
  color: var(--sg-ink);
  margin: 0.55rem 0 0;
}
.sg-mag__rowstand {
  color: var(--sg-muted);
  font-size: 0.9375rem;
  margin: 0.45rem 0 0;
}
/* The one row whose article has no standfirst in either store. It shows category, title
   and byline only, so its own spacing closes the gap the deck would have filled rather
   than leaving a hole that reads as a missing field. → kit 09 §1b */
.sg-mag__row--nostand { padding-bottom: 1.2rem; }

@media (width >= 62rem) {
  .sg-mag__grid { grid-template-columns: 1.35fr 1fr; gap: 3.2rem; align-items: stretch; }
  /* ⚠ The image absorbs the slack rather than the card growing a band of empty chalk
     between the standfirst and the byline. flex: 1 1 0 on a replaced element in a column
     flex container makes it the thing that grows, with object-fit: cover so growing
     re-crops instead of distorting, and the ratio released in this band because a ratio
     and a flexed height are two answers to the same question. → §6j */
  .sg-mag__featureimg { flex: 1 1 0; aspect-ratio: auto; min-height: 0; }
}

/* ═══════════════════════════════════════════════════════════════ THE AD SLOTS ══
   ⚠ The label is not optional, there is NO motion and no reveal class on an ad, and the
   slot is never numbered where the design numbers things. Copy and advertiser were
   supplied by the client. → §6c, carry-over rule 6 */
/* The section root's class IS the block, and the generator routes CSS to payloads by
   matching each selector's FIRST class against the section's owned prefixes, so a block
   or modifier class with no rule of its own is a layer with nothing attached to it in the
   client's Etch tree. → kit 03 §1, §6f-v */
.sg-ad--billboard { padding-block: clamp(2.2rem, 4.5vw, 3.4rem); }

.sg-ad {
  padding-inline: 1.5rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  background: var(--sg-quiet);
  border-block: 1px solid var(--sg-line);
}
.sg-ad__label {
  max-width: var(--sg-measure);
  margin: 0 auto 0.9rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sg-mutedquiet);
}
.sg-ad__inner {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: center;
}
.sg-ad__img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.sg-ad__copy { min-width: 0; }
.sg-ad__kicker {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sg-mutedquiet);
  margin: 0 0 0.4rem;
}
.sg-ad__head {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--sg-ink);
  margin: 0;
}
.sg-ad__sub { color: var(--sg-mutedquiet); margin: 0.55rem 0 0; font-size: 0.9375rem; }
.sg-ad__cta {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--sg-ink);
  color: var(--sg-paper);
  text-decoration: none;
  padding: 0.75rem 1.1rem;
  min-height: 44px;
}
.sg-ad__cta:hover, .sg-ad__cta:focus-visible { background: var(--sg-deep); }

@media (width >= 46rem) {
  .sg-ad__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.4rem; }
  .sg-ad--leader { padding-block: clamp(1.6rem, 3vw, 2.2rem); }
  .sg-ad__img--leader { aspect-ratio: 3 / 1; }
}

/* ══════════════════════════════════════════════════════════ THE BRIDGED ZONE ══
   ⚠ The wrapper is the DESIGN, not plumbing: it holds Thinking AND Living so the arcs
   cross the boundary and tie them together. A full-width horizontal element sitting in
   the gap between two sections IS a page split however it is drawn, which is why five
   seam devices were rejected before this shape. → §6h-xx, §6h-xxi, kit 03 §7h */
.sg-zone { position: relative; }
.sg-zone__arcs {
  position: absolute;
  left: 50%; top: 0;
  width: 100vw; height: 100%;
  transform: translateX(-50%);
  overflow: clip;
  pointer-events: none;
  /* ⚠ Fade it out at every edge. A field that stops abruptly draws a line where it
     stops, which reinvents the split the whole approach exists to avoid. The mask is
     keyed to the arcs' own centre so the reasoning stays visible. → kit 03 §7h */
  mask-image: radial-gradient(115% 125% at 8% 100%, #000 24%, transparent 84%);
  -webkit-mask-image: radial-gradient(115% 125% at 8% 100%, #000 24%, transparent 84%);
}
.sg-zone__arcsvg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--sg-deep);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  /* ⚠ A MEASURED CEILING, NOT A JUDGED ONE. A band title can sit exactly on a stroke, so
     the deciding pair is the title's own colour against the stroke composited over the
     ground: ink on a deep stroke over paper is 6.08:1 at 0.60, 5.04:1 at 0.70 and 4.16:1
     at 0.80, so 0.70 is the hard ceiling and these ship well under it. The muted meta
     colour fails on a stroke at ANY drawable opacity, which is why the cards in this zone
     paint their own ground. Both measurements are permanent rows in contrast.mjs.
     → §6h-xxi, §6k */
  opacity: 0.5;
}
.sg-zone__arcaccent { stroke: var(--sg-deep); opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════════════ THINKING ══
   Skeleton 3 of 5. A rail: a scroller below 78rem, a five-column grid above it. */
.sg-think { container: sg-think / inline-size; }
.sg-think__ctrls { display: flex; gap: 0.5rem; }
/* ⚠ A STATE THAT IS WRITTEN BUT NEVER READ IS A FEATURE THAT DOES NOT EXIST. The Deck's
   script wrote data-scrollable for eleven review rounds with a comment saying it hid the
   controls, and nothing in its stylesheet ever selected on it. → §6h-xv, kit 03 §7d */
.sg-think__ctrls[data-scrollable="false"] { display: none; }
.sg-think__arrow {
  appearance: none; -webkit-appearance: none;
  background: none;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  width: 44px; height: 44px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sg-think__arrow:hover { border-color: var(--sg-deep); color: var(--sg-deep); }
.sg-think__arrow:disabled { opacity: 0.32; cursor: default; }

.sg-think__track {
  max-width: var(--sg-measure);
  margin-inline: auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  /* ⚠ `proximity`, and the driver moves a WHOLE card step. Anything smaller than half a
     step is dragged back by snap, and a wheel handler that translated 120px notches
     deadlocked against exactly this and froze the page. → §6h-xviii, kit 08 §4a */
  scroll-snap-type: x proximity;
  scroll-padding-inline-start: 0;
  scrollbar-width: none;
}
.sg-think__track::-webkit-scrollbar { display: none; }
/* ⚠⚠ THE CARDS IN THE ZONE PAINT A GROUND, AND THAT IS A MEASURED DECISION rather than
   a styling one. The arcs pass behind these bands, and measured against a deep stroke
   composited over paper the ink title is safe to 0.70 opacity (5.04:1) while the MUTED
   meta colour fails at every opacity worth drawing: 2.75:1 even at 0.40. So dense muted
   text cannot sit over a stroke, and giving these cards the quiet surface is what keeps
   the arcs and the small type out of each other's way. It is also why D's arcs worked:
   its cards were opaque plates, so its strokes only ever crossed open ground.
   The arcs now read in the band heads, the outer margins and the gap the zone bridges,
   which is exactly where §6h-xxi put the Magazine's wave for the same reason. */
.sg-think__cell {
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--sg-quiet);
  padding: 0.9rem;
}
.sg-think__img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  /* bleeds to the card's own edge, against the cell's 0.9rem padding */
  margin: -0.9rem -0.9rem 0.9rem;
  max-width: calc(100% + 1.8rem);
}
.sg-think__title {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.14;
  color: var(--sg-ink);
  margin: 0.55rem 0 0;
}
.sg-think__stand {
  color: var(--sg-mutedquiet);
  font-size: 0.9375rem;
  margin: 0.45rem 0 0;
}

@media (width >= 40rem) { .sg-think__track { grid-auto-columns: 46%; } }
@media (width >= 62rem) { .sg-think__track { grid-auto-columns: 31%; } }
/* At this width the rail stops being a scroll container and becomes a real grid, which
   is what the driver reads off the computed overflow rather than guessing from
   scrollWidth. → kit 03 §7c */
@media (width >= 78rem) {
  .sg-think__track {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

/* ═════════════════════════════════════════════════════════════════════ LIVING ══
   Skeleton 4 of 5. A four-up grid on the SAND field, so the page has a third ground
   without needing a third hue. */
.sg-live { container: sg-live / inline-size; }
.sg-live__grid {
  max-width: var(--sg-measure);
  margin-inline: auto;
  list-style: none; margin-block: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 1.4rem;
}
.sg-live__cell {
  min-width: 0; display: flex; flex-direction: column; height: 100%;
  background: var(--sg-quiet);
  padding: 0.9rem;
}
.sg-live__img {
  width: 100%; height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  margin: -0.9rem -0.9rem 0.8rem;
  max-width: calc(100% + 1.8rem);
}
.sg-live__title {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.16;
  color: var(--sg-ink);
  margin: 0.5rem 0 0;
}
/* ⚠ On sand the muted value is its own derived token at 4.80:1, the tightest text pair
   in the palette. The paper-ground muted colour measures differently here, which is why
   this is a token rather than a reuse. */

@container sg-live (width >= 58rem) {
  .sg-live__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.8rem; }
}

/* ════════════════════════════════════════════════════════════════════ AND ALSO ══
   Skeleton 5 of 5, and the graphite band. ⚠ THE ONLY SURFACE WHERE RULE 3 PERMITS THE
   SIGNAL AZURE, so this is where the direction is loudest. Every text element here
   declares its own colour. */
.sg-also { background: var(--sg-ink); }
.sg-also__grid {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}
.sg-also__feature { min-width: 0; }
.sg-also__featureimg {
  width: 100%; height: auto;
  /* ⚠ 15/7 rather than 16/10, so the two columns come out near enough equal. A
     `space-between` list is stretched to the feature's height and every spare pixel is
     distributed INTO the gaps, so the gap is an OUTPUT and the lever is whatever makes
     the column tall. → §6h-xix, kit 03 §7g */
  aspect-ratio: 15 / 7;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}
.sg-also__featuretitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--sg-paper);
  margin: 0.7rem 0 0;
}
.sg-also__featurestand {
  color: var(--sg-mutedink);
  margin: 0.7rem 0 0;
  font-size: 1rem;
}
.sg-also__listen {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sg-signal);
  margin: 0.8rem 0 0;
}
.sg-also__listentext { color: var(--sg-signal); }
/* ⚠⚠ A `space-between` GAP IS AN OUTPUT, NOT A VALUE, so the lever is whatever makes the
   column tall. Stretched to the feature's height, every pixel the feature is taller than
   the rows need is distributed INTO the gaps: the three rows showed roughly 150px of air
   between them while the declared row-gap was 1.4rem, and it presents as a wide-screen
   problem because at narrower widths the slack vanishes and the gaps look correct.
   Capping the gap would only move the hole. What closed it was giving the three rows the
   STANDFIRSTS THEY ALREADY HAVE in the source, which fills the column with real content
   rather than with air, and a flat gap so nothing is distributed at all.
   → §6h-xix, kit 03 §7g */
.sg-also__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 1.4rem;
}
.sg-also__row {
  min-width: 0;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--sg-paper) 26%, transparent);
}
.sg-also__rowstand {
  color: var(--sg-mutedink);
  font-size: 0.9375rem;
  margin: 0.45rem 0 0;
}
.sg-also__rowtitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.16;
  color: var(--sg-paper);
  margin: 0.5rem 0 0;
}

@media (width >= 62rem) {
  .sg-also__grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════════════════ SUBSCRIBE ══ */
.sg-sub {
  padding-inline: 1.5rem;
  padding-block: clamp(3rem, 7vw, 5rem);
  /* The page's third ground, and the only warm surface in a cool palette. It lives here
     rather than on Living because Living sits inside the arcs' zone. */
  background: var(--sg-sand);
  border-top: 1px solid var(--sg-line);
}
.sg-sub__inner {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
}
.sg-sub__copy { min-width: 0; }
.sg-sub__title {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--sg-ink);
  margin: 0;
}
.sg-sub__lede {
  color: var(--sg-mutedsand);
  margin: 0.9rem 0 0;
  max-width: 52ch;
}
.sg-sub__form { margin-top: 1.4rem; }
.sg-sub__label {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sg-mutedsand);
  margin-bottom: 0.45rem;
}
.sg-sub__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sg-sub__input {
  flex: 1 1 14rem;
  min-width: 0;
  /* ⚠ 16px minimum, or iOS zooms the page on focus. → kit 03 §8 */
  font-size: max(1rem, 0.9375rem);
  font-family: inherit;
  color: var(--sg-ink);
  background: var(--sg-paper);
  border: 1px solid var(--sg-line);
  padding: 0.75rem 0.9rem;
  min-height: 48px;
}
.sg-sub__input:focus-visible { border-color: var(--sg-deep); }
.sg-sub__btn {
  appearance: none; -webkit-appearance: none;
  background: var(--sg-ink);
  color: var(--sg-paper);
  border: 0;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.4rem;
  min-height: 48px;
  cursor: pointer;
}
.sg-sub__btn:hover { background: var(--sg-deep); }
.sg-sub__gift {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 700;
  color: var(--sg-deep);
  min-height: 44px;
}
.sg-sub__quals {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.2rem;
  align-content: start;
}
.sg-sub__qual {
  border-top: 2px solid var(--sg-ink);
  padding-top: 0.7rem;
}
.sg-sub__quallead {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--sg-ink);
}
.sg-sub__quallabel {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sg-mutedsand);
  margin-top: 0.35rem;
}

@media (width >= 62rem) {
  .sg-sub__inner { grid-template-columns: 1.3fr 1fr; gap: 3.5rem; }
  .sg-sub__quals { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════ FOOTER ══ */
.sgc-foot {
  background: var(--sg-ink);
  color: var(--sg-mutedink);
  padding-inline: 1.5rem;
  padding-block: clamp(2.6rem, 5vw, 4rem) 1.6rem;
}
.sgc-foot__inner {
  max-width: var(--sg-measure);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.sgc-foot__brand { min-width: 0; }
.sgc-foot__word {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.375rem; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sg-paper);
  margin: 0;
}
.sgc-foot__tag {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sg-signal);
  margin: 0.35rem 0 0;
}
.sgc-foot__addr { color: var(--sg-mutedink); margin: 1rem 0 0; font-size: 0.9375rem; }
.sgc-foot__mail { margin: 0.5rem 0 0; font-size: 0.9375rem; }
.sgc-foot__maillink { color: var(--sg-signal); text-decoration: none; }
.sgc-foot__maillink:hover, .sgc-foot__maillink:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.sgc-foot__col { list-style: none; margin: 0; padding: 0; }
.sgc-foot__link {
  display: block;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.9375rem;
  color: var(--sg-mutedink);
  text-decoration: none;
  padding: 0.45rem 0;
  min-height: 44px;
}
.sgc-foot__link:hover, .sgc-foot__link:focus-visible { color: var(--sg-paper); }
/* Carry-over rule 4: the footer is a plain copyright and carries no data caveats. */
.sgc-foot__copy {
  max-width: var(--sg-measure);
  margin: 2.4rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, var(--sg-paper) 22%, transparent);
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--sg-mutedink);
}

@media (width >= 46rem) {
  .sgc-foot__inner { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
}

/* ═══════════════════════════════════════════════════════════════════════ THE RAIL ══
   The only fixed chrome on the page, and E's answer to carry-over rule 15. A full-bleed
   graphite band flush to the bottom edge, the same object at every width.

   ⚠ Its height is --sg-railh, and the SAME token pads the document, so the two can never
   drift apart. Measured off the page, never estimated. → kit 07 §5i */
.sgc-rail {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  min-height: var(--sg-railh);
  background: var(--sg-ink);
  color: var(--sg-paper);
  border-top: 1px solid color-mix(in srgb, var(--sg-paper) 24%, transparent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
}
.sgc-rail__audio { display: none; }
.sgc-rail__mark { flex: none; width: 1.625rem; height: 1.625rem; }
.sgc-rail__now { flex: 1 1 auto; min-width: 0; }
.sgc-rail__nowlabel {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.5625rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sg-signal);
  margin: 0;
}
.sgc-rail__nowtitle {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem; font-weight: 700;
  color: var(--sg-paper);
  margin: 0.1rem 0 0;
  white-space: nowrap;
  /* ⚠ overflow-x: clip WITH overflow-y: visible, the one pairing the spec permits.
     `overflow: hidden` clips BOTH axes, which on a text element slices descenders.
     The sideways clip is the half that matters and it is what text-overflow needs.
     → §6h-xvi, kit 03 §5q-i */
  overflow-x: clip;
  overflow-y: visible;
  text-overflow: ellipsis;
}

.sgc-rail__play {
  appearance: none; -webkit-appearance: none;
  flex: none;
  background: var(--sg-signal);
  color: var(--sg-ink);
  border: 0;
  width: 44px; height: 44px;
  font-size: 1.125rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sgc-rail__play:hover { background: var(--sg-paper); }
/* ⚠ The icon swaps by an inherited state on the button itself, not by a descendant
   selector, which the generator would drop silently. A flat attribute selector on the
   child reads the button's own aria-pressed through the same element it is set on, so
   both halves are declared on the child's own class. */
.sgc-rail__playicon { font-size: 1.125rem; }
.sgc-rail__playtri { fill: currentColor; stroke: none; }
.sgc-rail__pausebars { display: none; }
.sgc-rail__play[aria-pressed="true"] { background: var(--sg-paper); }

.sgc-rail__wave {
  flex: 2 1 6rem;
  min-width: 3rem;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  cursor: pointer;
}
/* ⚠ flex: none, or the bars SHRINK TO NOTHING. 64 bars at 2px with 1px gaps need about
   191px; in a flex row the default flex-shrink of 1 lets them collapse to sub-pixel widths
   instead of overflowing, so the waveform was present in the DOM, measured as present by
   every check, and simply invisible on a phone. Fewer bars is the answer at narrow widths,
   never thinner ones. */
.sgc-rail__bar {
  display: block;
  flex: none;
  width: 2px;
  min-height: 2px;
  background: var(--sg-mutedink);
  opacity: 0.42;
}
.sgc-rail__bar[data-on="true"] { background: var(--sg-signal); opacity: 1; }

.sgc-rail__time {
  flex: none;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--sg-mutedink);
  margin: 0;
  white-space: nowrap;
}
.sgc-rail__at { color: var(--sg-paper); }
.sgc-rail__sep { color: var(--sg-mutedink); }
.sgc-rail__dur { color: var(--sg-mutedink); }

.sgc-bar__toggle {
  appearance: none; -webkit-appearance: none;
  flex: none;
  background: none;
  border: 1px solid color-mix(in srgb, var(--sg-paper) 34%, transparent);
  color: var(--sg-paper);
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.sgc-bar__toggle:hover { border-color: var(--sg-signal); color: var(--sg-signal); }
.sgc-bar__togglelabel { white-space: nowrap; }

/* ⚠ THE RAIL STAYS ABOVE THE SCRIM, so the control that opened the menu is still the
   way out of it. Session 5 shipped a panel that covered its own toggle and left Escape
   as the only exit. The rail is opaque already, so unlike D's transparent spine it needs
   no second ground while the menu is open. */
.sgc-rail[data-menu="true"] { z-index: 80; }

/* The narrowest widths shed by NEED, and the order is a design decision rather than a
   convenience. ⚠ THE WAVEFORM IS THE SIGNATURE AND IT IS THE LAST THING TO GO. The first
   version dropped it below 26rem, which meant it was absent at 375px, the commonest phone
   width there is: the direction's one distinguishing device, gone exactly where most
   readers would meet it. The ladder now sheds the label, then the total, then the elapsed
   figure, and keeps the wave to the end, because the wave carries the same information the
   numbers do and the numbers do not carry the identity.
   The accessible name moves to aria-label in the markup rather than being lost, which is
   the same call §6k's spine made at 46rem of height. */
@media (width < 34rem) {
  .sgc-bar__togglelabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sgc-rail__sep, .sgc-rail__dur { display: none; }
}
/* ⚠ THE WAVEFORM THINS BY SAMPLING, so it keeps its full span and its real shape at every
   width instead of disappearing. Every second bar to 46rem (32 of them, about 95px) and
   every fourth below 30rem (16, about 47px). The two rules compose rather than fight: the
   first hides everything that is not a multiple of 2 and the second everything that is not
   a multiple of 4, so below 30rem exactly the multiples of 4 survive. The bars that remain
   are an even sample of the same envelope, so the lit proportion still reads true. */
@media (width < 46rem) {
  .sgc-rail__bar:not(:nth-child(2n)) { display: none; }
}
@media (width < 30rem) {
  .sgc-rail__bar:not(:nth-child(4n)) { display: none; }
  .sgc-rail__time { display: none; }
  .sgc-rail__wave { flex: 1 1 3rem; min-width: 3rem; }
  .sgc-rail__nowlabel { display: none; }
}

.sgc-top {
  appearance: none; -webkit-appearance: none;
  position: fixed;
  right: 1rem;
  /* Clear of the rail, from the same token, so the two cannot drift. */
  bottom: calc(var(--sg-railh) + 0.75rem);
  z-index: 75;
  width: 44px; height: 44px;
  background: var(--sg-paper);
  color: var(--sg-ink);
  border: 1px solid var(--sg-ink);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sgc-top:hover { background: var(--sg-signal); }
/* ⚠ Restated because this element declares `display`, which defeats [hidden] outright:
   specificity does not come into it, so el.hidden = true would change nothing and the
   button would be permanently visible. → kit 03 §7a */
.sgc-top[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════ REDUCED MOTION ══
   ⚠ Every transform suppressed, and the compound selectors are needed to out-specify
   the reveal's own [data-in] rule. Instant is not motion, so state changes still
   happen: only the movement goes. The player's progress is NOT suppressed, because a
   meter tracking real playback is information rather than decoration. */
@media (prefers-reduced-motion: reduce) {
  .sg-reveal[data-armed="true"] { transition: none; transform: none; opacity: 1; }
  .sg-reveal[data-in="true"] { transition: none; transform: none; }
  .sg-cardline { transition: none; }
  .sgc-mega { transition: none; }
  .sgc-mega[data-open] { transition: none; }
  .sgc-scrim { transition: none; }
  .sgc-skip { transition: none; }
  .sg-cardchip { transition: none; }
  .sg-think__track { scroll-behavior: auto; }
}
