/* =============================================================================
 * components.css — STATIC appearance of seeds, cards, drawer, legend (D1)
 * This file owns how things LOOK at rest. motion.css owns how they MOVE.
 * ============================================================================= */

/* ------------------------------------------------------------------ seeds */
.seed {
  position: absolute;
  left: 50%;
  top: var(--y);
  transform: translate3d(calc(var(--x) - 50%), 0, 0);
  display: grid; place-items: center;
  /* An invisible >=44x44 hit area, decoupled from the visual glyph size
   * (WCAG 2.5.8 asks 24px; a dense field of small dots deserves more). */
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--current);
}

.seed-glyph { overflow: visible; }
.seed-glyph path {
  fill: currentColor;
  /* The constant figure-ground token: without this halo a cyan science seed
   * dissolves into the surface-teal band at the top of the column. */
  stroke: var(--seed-halo);
  stroke-width: 3px;
  paint-order: stroke fill;
}

.seed.lane-science      { color: var(--lane-science); }
.seed.lane-culture      { color: var(--lane-culture); }
.seed.lane-exploitation { color: var(--lane-exploitation); }
.seed.lane-captivity    { color: var(--lane-captivity); }
.seed.lane-conservation { color: var(--lane-conservation); }

.seed::after {
  /* the luminous ring — separates the glyph from any background */
  content: '';
  position: absolute; inset: 50%;
  width: 26px; height: 26px; margin: -13px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 62%);
  opacity: 0.16;
  pointer-events: none;
}

.seed.is-marquee::before {
  content: '';
  position: absolute; inset: -6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.35;
}

.seed.is-fuzzy .seed-glyph { filter: blur(0.4px); opacity: 0.9; }

/* Precision → vertical extent. A node with a yearEnd draws the span it actually
 * covers, which for Twofold Bay (1844–1930) is thousands of pixels crossing
 * three era boxes. The bars therefore live in one overlay outside every .era —
 * an era carries content-visibility:auto, whose paint containment would clip
 * them. Without end-ticks a bar that long reads as a page rule rather than a
 * duration, so each gets a cap at both ends and a graduated fill. */
.spans {
  position: absolute;
  inset: 0 0 0 var(--field-left, 0px);
  pointer-events: none;
  z-index: 0;             /* under the seeds, above the water */
}
.span-bar {
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(calc(var(--x) - 1px));
  background: repeating-linear-gradient(
    180deg, currentColor 0 6px, transparent 6px 11px);
  opacity: 0.34;
}
.span-bar::before,
.span-bar::after {
  content: '';
  position: absolute; left: 50%;
  width: 9px; height: 1.5px; margin-left: -4.5px;
  background: currentColor;
}
.span-bar::before { top: 0; }
.span-bar::after  { bottom: 0; }

.span-bar.lane-science      { color: var(--lane-science); }
.span-bar.lane-culture      { color: var(--lane-culture); }
.span-bar.lane-exploitation { color: var(--lane-exploitation); }
.span-bar.lane-captivity    { color: var(--lane-captivity); }
.span-bar.lane-conservation { color: var(--lane-conservation); }
.span-bar.axis-kinship      { color: var(--kinship); }

/* Flag badges — each flag is a DISTINCT swatch (colour AND shape, never
 * colour-alone) kept clear of the warm kinship gold so the two channels never
 * blur. Co-present flags stack in the corner rather than one hiding another.
 * The same three classes render the legend swatches, so key and node match. */
.seed-badges {
  position: absolute; top: 3px; right: 3px;
  display: flex; flex-direction: row-reverse; gap: 2px;
  pointer-events: none;
}
.seed-badge, .legend-badge {
  width: 7px; height: 7px;
  border: 1px solid var(--seed-halo);
  border-radius: 50%;
  background: var(--whale-white);
}
.legend-badge { display: inline-block; }
/* milestone — a plain white disc: a turning point in the record */
.badge-milestone { background: var(--whale-white); border-radius: 50%; }
/* contested — a rust diamond: the reading is disputed */
.badge-disputed {
  background: var(--rust);
  border-radius: 1px;
  transform: rotate(45deg);
}
/* western projection — a hollow cyan ring: an image cast, not an observation */
.badge-projection {
  background: transparent;
  border: 1.5px solid var(--current);
  border-radius: 50%;
}

.seed.is-visited .seed-glyph path { stroke: var(--current); stroke-width: 1.5px; }
.seed.is-dimmed { opacity: 0.16; }
.seed.is-lit::after { opacity: 0.4; }
.seed.is-bloomed { z-index: 5; }
.seed.is-bloomed::after { opacity: 0.55; }

/* ------------------------------------------------- the kinship current
 * Ontological Indigenous kinship does not sit at the +1.0 end of the Western
 * monster→kin scale. Putting it there would make Western understanding the
 * measuring stick and Indigenous knowledge the destination of someone else's
 * journey. It runs beside the scale, in its own warm channel, coeval. (E3)
 * ------------------------------------------------------------------- */
.seed.axis-kinship { color: var(--kinship); }
.seed.axis-kinship .seed-glyph path { stroke-width: 3.5px; }
.seed.axis-kinship::before {
  content: '';
  position: absolute; inset: -5px;
  border: 1px solid var(--kinship);
  border-radius: 50%;
  opacity: 0.45;
}

.kin-ribbon {
  position: absolute; top: 0; bottom: 0;
  right: 0; width: var(--kin-width, 140px);
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--kinship) 12%, transparent) 38%, color-mix(in srgb, var(--kinship) 16%, transparent) 100%);
  border-left: 1px solid color-mix(in srgb, var(--kinship) 40%, transparent);
}

.stance-centerline {
  position: absolute; top: 0; bottom: 0;
  left: calc(50% - var(--kin-width, 140px) / 2);
  width: 1px;
  background: var(--hairline-soft);
  pointer-events: none;
}

/* -------------------------------------------------------- axis chrome */
.axis-chrome {
  position: fixed;
  left: calc(var(--hud-w) + var(--gauge-w));
  right: 0; bottom: 0;
  z-index: var(--z-haze);
  display: grid;
  grid-template-columns: 1fr auto 1fr var(--kin-width, 140px);
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  pointer-events: none;
  background: linear-gradient(0deg, var(--surface-panel), transparent);
  font-size: var(--step--1);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--whale-faint);
}
.axis-left  { justify-self: start; color: var(--rust); }
.axis-mid   { justify-self: center; }
.axis-right { justify-self: end; color: var(--current); }
.axis-kin-label { justify-self: center; color: var(--kinship); text-align: center; }

@media (max-width: 900px) {
  .axis-chrome { left: 0; grid-template-columns: 1fr 1fr; }
  .axis-mid { display: none; }
  .kin-ribbon, .stance-centerline { display: none; }
}
@media (max-width: 560px) { .axis-chrome { display: none; } }

/* ------------------------------------------------------------- bloom card */
.bloom-card {
  position: fixed; top: 0; left: 0;
  z-index: var(--z-card);
  width: min(30ch, 76vw);
  padding: 0.85rem 1rem 0.75rem;
  background: var(--surface-drawer);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--current);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}
.card-year {
  font-family: var(--font-mono); font-size: var(--step--1);
  font-variant-numeric: tabular-nums; color: var(--current);
}
.card-title { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.2; margin: 0.1rem 0 0.35rem; }
.card-dek { font-size: var(--step-0); color: var(--whale-dim); }
.card-cue {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-top: 0.6rem; padding-top: 0.5rem;
  border-top: 1px solid var(--hairline-soft);
  font-size: var(--step--1); color: var(--whale-faint);
}
.card-cue kbd {
  font-family: var(--font-mono); font-size: 0.72em;
  padding: 0.1rem 0.35rem; border: 1px solid var(--hairline); border-radius: 3px;
}

/* ----------------------------------------------------------- scrim/drawer */
.scrim {
  position: fixed; inset: 0; z-index: var(--z-scrim);
  /* A plain dark scrim. NEVER an animated backdrop-filter: blur() — it is a
   * reliable way to lose 60fps, especially in Safari from file://. */
  background: var(--midnight);
  opacity: 0.55;
}

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: var(--z-drawer);
  width: min(72ch, 100vw);
  background: var(--surface-drawer);
  border-left: 1px solid var(--hairline);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer-inner { padding: 2.4rem clamp(1.2rem, 3vw, 2.6rem) 5rem; position: relative; }

.drawer-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--whale-dim);
}

.dossier-year {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  color: var(--current); font-size: var(--step-0);
}
.dossier-title { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1.08; margin: 0.2rem 0 0.7rem; }
.dossier-lanes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.4rem; }

.lane-chip, .flag-chip {
  font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.18rem 0.5rem; border-radius: 999px;
  border: 1px solid currentColor;
}
.lane-chip.lane-science      { color: var(--lane-science); }
.lane-chip.lane-culture      { color: var(--lane-culture); }
.lane-chip.lane-exploitation { color: var(--lane-exploitation); }
.lane-chip.lane-captivity    { color: var(--lane-captivity); }
.lane-chip.lane-conservation { color: var(--lane-conservation); }
.flag-chip { color: var(--kelp-amber); text-transform: none; letter-spacing: 0; }
.kin-chip {
  font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.18rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--kinship); color: var(--kinship);
}
.kin-note {
  margin: 1.2rem 0; padding: 0.9rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--kinship) 45%, transparent);
  border-left: 2px solid var(--kinship);
  border-radius: 8px;
  background: color-mix(in srgb, var(--kinship) 8%, transparent);
  font-size: var(--step-0);
}
.kin-note strong { color: var(--kinship); }

.dossier-body { max-width: var(--measure); }
.body-p { margin-bottom: 1rem; }
.body-p:last-child { margin-bottom: 0; }

.xlink {
  color: var(--current); text-decoration: underline;
  text-underline-offset: 2px; padding: 0; font: inherit;
}
.xlink.ext::after { content: ' ↗'; font-size: 0.8em; opacity: 0.7; }

.pull-quote {
  margin: 1.6rem 0; padding: 1rem 1.2rem;
  border-left: 2px solid var(--current);
  font-family: var(--font-serif); font-size: var(--step-1);
  color: var(--whale-white);
}
.pull-quote cite { display: block; margin-top: 0.5rem; font-size: var(--step--1); font-style: normal; color: var(--whale-faint); }

/* "commonly believed X / actually Y" — the western-projection treatment */
.projection {
  margin: 1.4rem 0; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden;
}
.projection-myth, .projection-truth { padding: 0.8rem 1rem; }
.projection-myth { background: rgba(198, 91, 60, 0.10); border-bottom: 1px solid var(--hairline); }
.projection-myth strong { color: var(--rust); }
.projection-truth { background: rgba(57, 224, 208, 0.07); }
.projection-truth strong { color: var(--current); }

.dispute-note {
  margin: 1.2rem 0; padding: 0.8rem 1rem;
  border: 1px solid var(--kelp-amber); border-radius: 8px;
  background: rgba(230, 180, 92, 0.08);
  font-size: var(--step-0);
}
.dispute-note strong { color: var(--kelp-amber); }

.protocol {
  margin: 1.6rem 0; padding: 1rem 1.2rem;
  border: 1px solid var(--hairline); border-left: 2px solid var(--lane-conservation);
  border-radius: 8px; background: rgba(95, 191, 143, 0.06);
}
.protocol h3 { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lane-conservation); margin-bottom: 0.5rem; }
.protocol-nation { font-weight: 600; }
.protocol-holder, .protocol-note { font-size: var(--step-0); color: var(--whale-dim); margin-top: 0.3rem; }

.facts { margin: 1.6rem 0; display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; }
.facts dt { font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--whale-faint); }
.facts dd { color: var(--whale-white); }

.people { margin: 1.6rem 0; }
.people h3, .related h3, .sources h3 {
  font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--whale-faint); margin-bottom: 0.6rem;
}
.person { margin-bottom: 0.7rem; }
.person-name { font-weight: 600; }
.person-dates { color: var(--whale-faint); font-family: var(--font-mono); font-size: 0.85em; }
.person-blurb { color: var(--whale-dim); font-size: var(--step-0); }

.related ul, .sources ol { list-style: none; padding: 0; }
.related-link {
  display: grid; grid-template-columns: 7ch 1fr; gap: 0.8rem; align-items: baseline;
  width: 100%; text-align: left; padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--hairline-soft);
  min-height: 44px;
}
.related-link:hover .related-title { color: var(--current); }
.related-year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--whale-faint); }

.sources li { padding: 0.45rem 0; border-bottom: 1px solid var(--hairline-soft); font-size: var(--step-0); }
.sources a { color: var(--whale-white); }
.source-meta { color: var(--whale-faint); }
.source-tier {
  display: inline-block; margin-left: 0.5rem;
  font-size: 0.7em; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.08rem 0.4rem; border-radius: 999px; border: 1px solid var(--hairline);
  color: var(--whale-faint);
}
.tier-primary .source-tier, .tier-agency .source-tier { color: var(--current); border-color: var(--current); }

/* ------------------------------------------------------------------ figures */
.fig { margin: 1.6rem 0; }
.fig-frame {
  position: relative; width: 100%;
  border-radius: 8px; overflow: hidden;
  background-size: cover;
}
.fig-img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--dur-reveal) var(--ease-standard);
}
.fig.is-loaded .fig-img { opacity: 1; }
.fig-offline {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 0.4rem; justify-items: center;
  color: var(--whale-white);
  font-size: var(--step--1);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.fig-offline-icon { font-size: 1.6rem; opacity: 0.7; }
.fig-cap { margin-top: 0.5rem; font-size: var(--step--1); color: var(--whale-dim); }
.fig-credit { color: var(--whale-faint); }
.fig-credit a { color: inherit; }

/* ------------------------------------------------------------------ legend */
.legend-h, .lens-h {
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--whale-faint); margin-bottom: 0.5rem;
}
.legend-lanes { display: flex; flex-direction: column; gap: 0.1rem; }
.legend-row {
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.3rem; border-radius: 4px; min-height: 32px;
  text-align: left; font-size: var(--step--1);
}
.legend-row[aria-pressed="true"] { background: rgba(57, 224, 208, 0.1); }
.legend-glyph path { fill: currentColor; stroke: var(--seed-halo); stroke-width: 2.5px; paint-order: stroke fill; }
.legend-glyph.lane-science      { color: var(--lane-science); }
.legend-glyph.lane-culture      { color: var(--lane-culture); }
.legend-glyph.lane-exploitation { color: var(--lane-exploitation); }
.legend-glyph.lane-captivity    { color: var(--lane-captivity); }
.legend-glyph.lane-conservation { color: var(--lane-conservation); }
.legend-label { text-transform: capitalize; color: var(--whale-dim); }
.legend-count { font-family: var(--font-mono); font-size: 0.8em; color: var(--whale-faint); }

.legend-ramp { margin-top: 0.7rem; }
.legend-ramp-label { font-size: var(--step--1); color: var(--whale-faint); }
.legend-ramp-row { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.3rem; }

.legend-flags { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--hairline-soft); }
.legend-flag {
  display: grid; grid-template-columns: 12px 1fr; gap: 0.5rem;
  align-items: start;
  font-size: var(--step--1); color: var(--whale-dim); margin-bottom: 0.4rem;
  line-height: 1.4;
}
.legend-flag .legend-badge { margin-top: 0.34em; }
.legend-flag .badge-disputed { margin-top: 0.42em; }   /* the diamond rotates about its box */
.legend-flag-text { display: block; }
.legend-flag-label { color: var(--whale-white); }
.legend-flag-hint { display: block; color: var(--whale-faint); }

.legend-axis { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--hairline-soft); }
.axis-note {
  display: grid; grid-template-columns: 10px 1fr; gap: 0.5rem;
  align-items: start;
  font-size: var(--step--1); color: var(--whale-dim); margin-bottom: 0.5rem;
  line-height: 1.45;
}
.axis-note-text { display: block; }
.axis-note em { color: var(--whale-white); font-style: italic; }
.axis-swatch { width: 8px; height: 8px; border-radius: 2px; margin-top: 0.42em; }
.axis-swatch-rust    { background: var(--rust); }
.axis-swatch-current { background: var(--current); }
.axis-swatch-kin     { background: var(--kinship); }
.axis-count { font-size: var(--step--1); color: var(--kinship); margin-top: 0.2rem; }

.legend-lens { margin-top: 0.9rem; }
.lens-btn {
  display: block; width: 100%; text-align: left;
  padding: 0.4rem 0.5rem; border-radius: 4px; border: 1px solid transparent;
  min-height: 44px;
}
.lens-btn[aria-pressed="true"] { border-color: var(--current); background: rgba(57, 224, 208, 0.08); }
.lens-label { display: block; font-size: var(--step-0); }
.lens-hint { display: block; font-size: var(--step--1); color: var(--whale-faint); }
.lens-clear { min-height: 32px; color: var(--whale-faint); font-size: var(--step--1); }

.filter-count { margin-top: 0.6rem; font-size: var(--step--1); color: var(--whale-faint); }

/* ----------------------------------------------------------------- minimap */
.minimap-strip { position: absolute; inset: 0 auto 0 0; width: 22px; display: flex; flex-direction: column; }
.minimap-tick { flex: 1; background: var(--current); opacity: calc(0.12 + var(--w) * 0.7); transform-origin: left; transform: scaleX(var(--w)); }

.era-spine { position: absolute; inset: 0 0 0 30px; }
.spine-btn {
  position: absolute; top: var(--top); left: 0; right: 0;
  display: grid; grid-template-columns: 10px 1fr; gap: 0.5rem; align-items: center;
  text-align: left; min-height: 22px; font-size: 9.5px; line-height: 1.15;
  color: var(--whale-faint);
}
.spine-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spine-btn:hover .spine-label, .spine-btn:focus-visible .spine-label {
  white-space: normal; overflow: visible;
}
.spine-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.spine-btn:hover, .spine-btn:focus-visible { color: var(--current); }

/* ------------------------------------------------------------- chart / toc */
.toc-era { margin-bottom: 2.6rem; }
.toc-era-title { font-family: var(--font-serif); font-size: var(--step-2); }
.toc-era-zone { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.14em; color: var(--whale-faint); margin-bottom: 0.8rem; }
.toc-list { list-style: none; padding: 0; }
.toc-item {
  display: grid; grid-template-columns: 9ch 1fr; gap: 0.2rem 1rem;
  width: 100%; text-align: left; padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--hairline-soft);
  min-height: 44px;
}
.toc-year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--current); }
.toc-title { font-weight: 600; }
.toc-dek { grid-column: 2; color: var(--whale-faint); font-size: var(--step--1); }
.toc-item:hover { background: rgba(57, 224, 208, 0.06); }

/* -------------------------------------------------------------- hud button */
.hud-btn {
  font-size: var(--step--1);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--hairline); border-radius: 999px;
  color: var(--whale-dim);
  min-height: 32px;
}
.hud-btn[aria-pressed="true"] { border-color: var(--current); color: var(--current); }

/* ------------------------------------------------------------ debug panel */
.debug-panel {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 200;
  width: min(46ch, 90vw); max-height: 60vh; overflow: auto;
  padding: 1rem; border-radius: 8px;
  background: #0b0f14; border: 1px solid var(--kelp-amber);
  font-family: var(--font-mono); font-size: 11px;
}
.debug-panel h2 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kelp-amber); }
.debug-stats { margin: 0.4rem 0 0.8rem; color: var(--whale-dim); }
.debug-ok { color: var(--lane-conservation); }
.debug-panel summary { cursor: pointer; color: var(--kelp-amber); }
.debug-panel ul { margin: 0.4rem 0 0.8rem 1rem; color: var(--whale-dim); }
.debug-close { margin-top: 0.6rem; color: var(--whale-faint); text-decoration: underline; }

/* ----------------------------------------------- linearized / reflow mode
 * At 320px or 400% zoom, absolute positioning stops being a timeline and
 * starts being a trap. Fall back to the same single column the print and
 * reduced-motion paths use. (WCAG 1.4.10)
 * ------------------------------------------------------------------- */
@media (max-width: 560px) {
  .timeline { height: auto !important; }
  .era { position: relative; top: auto; height: auto; padding: 2rem 0; }
  .era-field { position: relative; inset: auto; display: flex; flex-direction: column; gap: 0.5rem; }

  /* Each node becomes a readable row: glyph, then year, title, hook.
   * `place-items: center` and a 24px grid column are a 44x44 dot's geometry,
   * not a row's — left over, they crushed the body text into a ~60px column. */
  /* Each node becomes a CARD with its own opaque surface. Without one, the
   * chips and glyphs sit directly on the era gradient — which in the light
   * theme's deep bands drops the teal stance cell to 1.3:1. A surface also
   * makes the feed legible as a feed rather than text on a photograph. */
  .seed {
    position: relative; left: auto; top: auto; transform: none;
    width: 100%; height: auto; min-height: 44px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas: "glyph year" "glyph title" "glyph dek";
    place-items: start;
    align-content: start;
    row-gap: 0.15rem; column-gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    text-align: left;
    background: var(--surface-drawer);
    border: 1px solid var(--hairline-soft);
    border-radius: 10px;
  }
  .seed .seed-glyph { grid-area: glyph; align-self: center; }

  /* Promote ONLY the three spans a reader should see. The stanceDescriptor is a
   * text equivalent of horizontal position for non-visual readers; on a phone
   * there is no horizontal position, and it must never render as prose. */
  /* .visually-hidden declares `position: absolute !important`, so undoing it
   * requires !important too. Without this the row stays 44px tall and the text
   * stacks on top of itself. */
  .seed .seed-year, .seed .seed-title, .seed .seed-dek {
    position: static !important;
    width: auto !important; height: auto !important;
    clip: auto !important; clip-path: none !important;
    white-space: normal !important;
    margin: 0 !important; overflow: visible !important;
  }
  .seed .seed-year  { grid-area: year;  font-family: var(--font-mono); font-size: var(--step--1);
                      font-variant-numeric: tabular-nums; color: var(--current); }
  .seed .seed-title { grid-area: title; font-family: var(--font-serif); font-size: var(--step-1);
                      line-height: 1.2; color: var(--whale-white); }
  .seed .seed-dek   { grid-area: dek;   font-size: var(--step-0); color: var(--whale-dim);
                      line-height: 1.45; margin-top: 0.15rem; }
  .seed .seed-sr-only { /* stays visually-hidden, keeps being announced */ }

  .seed.axis-kinship .seed-title { color: var(--kinship); }
  .seed.axis-kinship::before { display: none; }   /* the ring is a dot's affordance */

  .seed::after, .seed-badges { display: none; }
  .spans { display: none; }
  .bloom-card { display: none; }

  /* ---- P0 card decoders ------------------------------------------------
   * The axis, the ribbon and the legend are gone at this width. Each card
   * carries its own meaning instead of rendering an encoding with no key. */
  .seed-stance-chip,
  .seed-flags,
  .kin-decode { grid-column: 2; justify-self: start; }

  .seed-stance-chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    margin-top: 0.4rem;
  }
  .stance-name {
    font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--whale-dim);
  }
  /* Five discrete cells, ONE filled. Not a bar filled from the left — that
   * reads as "4 out of 5", a rating rather than a categorical position.
   *
   * The empty cells are hollow rather than tinted: a filled-vs-tinted pair only
   * reached 2.92:1, and the filled cell is a graphical object that carries
   * meaning (WCAG 1.4.11 wants 3:1). Hollow-vs-solid also survives forced
   * colours. The bin NAME sits beside it, so nothing here is colour-alone. */
  .stance-track { display: inline-flex; gap: 3px; }
  .stance-cell {
    width: 9px; height: 6px; border-radius: 1px;
    background: transparent;
    border: 1px solid var(--whale-faint);
  }
  .stance-cell.is-on {
    background: var(--current);
    border-color: var(--current);
  }

  .seed-flags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
  .seed-flag-chip {
    font-size: var(--step--1);
    padding: 0.1rem 0.42rem; border-radius: 999px;
    border: 1px solid currentColor;
  }
  .seed-flag-chip.flag-disputed { color: var(--rust); }
  .seed-flag-chip.flag-milestone { color: var(--whale-dim); }
  .seed-flag-chip.flag-western-projection { color: var(--kelp-amber); }

  /* ---- the kinship card decodes itself, in its own nation's terms ------ */
  .seed.axis-kinship {
    border-left: 3px solid var(--kinship);
    /* the gold wash sits ON the card surface, not on the era gradient */
    background: color-mix(in srgb, var(--kinship) 8%, var(--surface-drawer));
  }
  .kin-decode { margin-top: 0.45rem; }
  .kin-chip {
    display: inline-block;
    font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.12rem 0.45rem; border-radius: 999px;
    border: 1px solid var(--kinship); color: var(--kinship);
  }
  .kin-gloss {
    margin-top: 0.35rem;
    font-size: var(--step--1); line-height: 1.45;
    color: var(--whale-dim);
  }
  .kin-nation { color: var(--kinship); font-weight: 600; }
}

/* ---------------------------------------------------------- mobile decode
 * Shown wherever the legend, gauge, axis chrome and kinship ribbon are hidden.
 * That boundary is 900px, not 560px: between the two, the column is still a
 * scatter but has already lost its key. The gold must never be undecoded.
 * ------------------------------------------------------------------- */
.m-decode { display: none; }

@media (max-width: 900px) {
  .m-decode {
    display: block;
    flex: 1 1 100%;
    order: -1;                       /* first in reading order after the brand */
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--hairline);
    border-left: 2px solid var(--kinship);
    border-radius: 8px;
    /* opaque: a translucent key with the feed showing through is unreadable */
    background: var(--surface-drawer);
  }
  .m-decode-h {
    font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--whale-dim);            /* --whale-faint is 2.8:1 here (1.4.3) */
    cursor: pointer;
    min-height: 44px;                   /* our own target floor, not 2.5.8's 24px */
    display: flex; align-items: center;
  }
  .m-decode[open] .m-decode-h { margin-bottom: 0.5rem; }
  .m-decode-h::marker { color: var(--kinship); }
  .m-decode-p {
    font-size: var(--step-0); line-height: 1.5;
    color: var(--whale-dim); margin-bottom: 0.6rem;
  }
  .m-decode-p:last-child { margin-bottom: 0; }
  .m-decode-kin strong { color: var(--kinship); }
  .m-decode-swatch {
    display: inline-block; width: 10px; height: 10px; border-radius: 2px;
    background: var(--kinship); margin-right: 0.4rem;
  }
  .m-decode-retired { color: var(--whale-faint); font-size: var(--step--1); }
}
