/* =============================================================================
   elizamarin.com design system · components.css

   Rule: colours and radii come ONLY from component tokens (Layer 3).
   The shared scales (space, font, line height, letter spacing, border
   width, shadow, ease and duration, size, opacity, folder geometry) may be
   used from Layer 1 directly. No literals.

   Structural values are not style values and are allowed: display, flex,
   position, cursor, 0, 100%, 50%, auto, none, transparent, currentColor,
   a plain number multiplying a token inside calc(), an angle or scale
   inside a transform, opacity 0 or 1, z-index, and a breakpoint inside
   @media. check-literals.py enforces this list.

   Every component works without JavaScript; scripts only add to it.
   Every component honours prefers-reduced-motion and forced-colors.
   ============================================================================= */


/* ── Base ────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 112.5%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-5);
  line-height: var(--line-height-base);
  color: var(--page-text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
::selection { background: var(--page-selection); color: var(--page-text); }

.wrap {
  max-width: var(--size-page-max);
  margin: 0 auto;
  padding-left: var(--size-gutter);
  padding-right: var(--size-gutter);
}
.prose {
  max-width: var(--measure);
  font-size: var(--font-size-5);
  color: var(--page-text-muted);
}
.prose b { color: var(--page-text); font-weight: var(--font-weight-semibold); }
.prose + .prose { margin-top: var(--space-7); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* ── Skip link ───────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: var(--space-5);
  top: calc(-1 * var(--space-19));
  z-index: 100;
  padding: var(--space-4) var(--space-7);
  border-radius: var(--skip-radius);
  background: var(--skip-bg);
  color: var(--skip-text);
  font-size: var(--font-size-3);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-3);
  outline: var(--focus-ring-width) solid var(--skip-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}


/* ── Label (eyebrow, kicker, meta key) ───────────────────────────────────── */

.label {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--label-text);
}
.label--eyebrow {
  font-size: var(--font-size-2);
  letter-spacing: var(--letter-spacing-eyebrow);
  color: var(--label-eyebrow-text);
}
.label--kicker { color: var(--label-kicker-text); }


/* ── Heading ─────────────────────────────────────────────────────────────── */

/* Two families, declared. Folder pages (home, hubs, case studies) open on
   the display heading, huge and lowercase: the site's signature. Long
   text (essays, guides, cv) opens on the page heading, one step down.
   Whether essays keep lowercase is still open (audit, 20 Nov 2026), so
   .h-page leaves the case to the text as written. */
.h-display {
  max-width: 15ch;
  font-size: var(--font-size-d1);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
  text-transform: lowercase;
  color: var(--heading-text);
}
.h-page {
  max-width: var(--measure-heading);
  font-size: var(--font-size-d2);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-display);
  color: var(--heading-text);
}
.h-section {
  font-size: var(--font-size-6);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
  color: var(--heading-text);
}
.h-sub {
  margin-top: var(--space-5);
  max-width: var(--measure-narrow);
  font-size: var(--font-size-lede);
  line-height: var(--line-height-relaxed);
  color: var(--heading-muted-text);
}


/* ── Folder tab (navigation rail) ────────────────────────────────────────── */

.rank {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
}
.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  min-height: var(--size-target);
  margin-bottom: calc(-1 * var(--border-width-hairline));
  padding: var(--space-4) calc(var(--folder-shoulder) - var(--space-3)) var(--space-5) var(--space-8);
  background: var(--fill, var(--tab-bg));
  border: var(--border-width-hairline) solid var(--tab-border-color);
  border-right: none;
  border-bottom: none;
  border-radius: var(--tab-radius) 0 0 0;
  font-size: var(--font-size-2);
  color: var(--tab-text);
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--duration-base) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}
/* the shoulder: a skewed pseudo-element, because a clip-path cannot keep
   the rounded corner. z-index -1 puts it over the tab's fill and under
   its label, where a folder edge belongs. */
.tab::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--border-width-hairline));
  bottom: 0;
  right: calc(-1 * (var(--folder-shoulder) - var(--space-10)));
  width: var(--folder-shoulder);
  background: inherit;
  border: var(--border-width-hairline) solid var(--tab-border-color);
  border-left: none;
  border-bottom: none;
  border-radius: 0 var(--tab-radius) 0 0;
  transform: skewX(var(--folder-lean));
  transform-origin: bottom left;
}
.tab + .tab { margin-left: calc(-1 * var(--folder-tuck)); }
.rank .tab {
  --fill: color-mix(in srgb, var(--tab-bg-hover) calc(100% - var(--step, 0) * 14%), var(--tab-bg-back));
}
.rank .tab:hover { --fill: var(--tab-bg-hover); }

.tab .num {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  color: var(--tab-number);
}
.tab .lbl { position: relative; }
.tab .lbl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--space-1));
  height: var(--border-width-mark);
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.tab:hover,
.tab:focus-visible { color: var(--tab-text-hover); transform: translateY(var(--folder-lift)); }
.tab:hover .lbl::after,
.tab:focus-visible .lbl::after { transform: scaleX(1); }
.tab:focus-visible {
  outline: var(--focus-ring-width) solid var(--tab-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* the open folder joins the sheet below: its shadow paints over the
   sheet's top border. Chosenness is never colour alone: it bolds, it
   carries the bar, and aria-current says it to a screen reader. */
.tab[aria-current="page"],
.tab[aria-selected="true"] {
  --fill: var(--tab-bg-open);
  z-index: 40;
  color: var(--tab-text-open);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 var(--border-width-strong) 0 0 var(--tab-bg-open);
}
.tab[aria-current="page"]:hover,
.tab[aria-current="page"]:focus-visible,
.tab[aria-selected="true"]:hover,
.tab[aria-selected="true"]:focus-visible { transform: none; }
.tab[aria-current="page"] .lbl::after,
.tab[aria-selected="true"] .lbl::after,
.tab[data-section="current"] .lbl::after {
  background: var(--tab-mark);
  transform: scaleX(1);
}
.tab[data-section="current"] { color: var(--tab-text-open); }

@media (max-width: 860px) {
  .rank {
    --folder-shoulder: var(--folder-shoulder-sm);
    --folder-lean: var(--folder-lean-sm);
    --folder-tuck: var(--folder-tuck-sm);
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: var(--space-3);
  }
  .rank::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab, .tab .lbl::after { transition: none; }
  .tab:hover, .tab:focus-visible { transform: none; }
}


/* ── Folder menu ─────────────────────────────────────────────────────────── */

.tab-menu {
  position: absolute;
  top: 100%;
  z-index: 70;
  min-width: var(--size-menu-min);
  max-width: var(--size-menu-max);
  padding: var(--space-3);
  background: var(--menu-bg);
  border: var(--border-width-hairline) solid var(--menu-border-color);
  border-radius: 0 var(--menu-radius) var(--menu-radius) var(--menu-radius);
  box-shadow: var(--shadow-pop);
}
.tab-menu[hidden] { display: none; }
.tab-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--size-target);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--menu-row-radius);
  font-size: var(--font-size-3);
  color: var(--menu-row-text);
  text-decoration: none;
  text-transform: lowercase;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.tab-menu a:hover { background: var(--menu-row-bg-hover); color: var(--menu-row-title); }
.tab-menu a:focus-visible {
  outline: var(--focus-ring-width) solid var(--menu-focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
}
.tab-menu a[aria-current="true"] { color: var(--menu-row-title); font-weight: var(--font-weight-bold); }
.tab-menu .nm-t {
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-snug);
  color: var(--menu-row-title);
}
/* what can be read right now is a dot; the word stays for screen readers */
.tab-menu .nm-live {
  flex: none;
  width: var(--size-dot);
  height: var(--size-dot);
  border-radius: var(--radius-full);
  overflow: hidden;
  font-size: 0;
  color: transparent;
  background: var(--menu-live-dot);
}
/* without JS the menu cannot be positioned: it opens in flow under the
   rail when its folder takes focus */
html:not(.js) .tab-menu { position: static; }
html:not(.js) .tab[data-menu]:focus + .tab-menu,
html:not(.js) .tab-menu:focus-within { display: block; }

@media (max-width: 640px) {
  .tab-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    min-width: 0;
    max-width: none;
    padding: var(--space-4) var(--space-7) var(--space-7);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}


/* ── Button ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--size-target);
  padding: var(--space-3) var(--space-8);
  border: var(--border-width-hairline) solid transparent;
  border-radius: var(--button-radius);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-2);
  line-height: var(--line-height-heading);
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
.btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--button-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
.btn--lila {
  background: var(--button-lila-bg);
  color: var(--button-lila-text);
  border-color: var(--button-lila-border-color);
}
.btn--lila:hover { background: var(--button-lila-bg-hover); }

.btn--quiet {
  background: var(--button-quiet-bg);
  color: var(--button-quiet-text);
  border-color: var(--button-quiet-border-color);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  text-transform: none;
}
.btn--quiet:hover {
  background: var(--button-quiet-bg-hover);
  color: var(--button-quiet-text-hover);
  border-color: var(--button-quiet-border-color-hover);
}
.btn--solid {
  background: var(--button-solid-bg);
  color: var(--button-solid-text);
  border-color: var(--button-solid-border-color);
}
.btn--solid:hover {
  background: var(--button-solid-bg-hover);
  color: var(--button-solid-text-hover);
}
.btn .ico-go,
.btn .ico-ext { flex: none; }
@media (forced-colors: active) {
  .btn { border-color: ButtonText; }
}


/* ── Segmented control ───────────────────────────────────────────────────── */

.segmented {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  border: var(--border-width-hairline) solid var(--segmented-border-color);
  border-radius: var(--segmented-radius);
  background: var(--segmented-bg);
}
.segmented legend,
.segmented__label {
  float: left;
  padding: 0 var(--space-3) 0 var(--space-2);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--segmented-label-text);
}
.segmented__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--size-target) - 2 * var(--space-1));
  padding: 0 var(--space-6);
  border-radius: var(--segmented-option-radius);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  color: var(--segmented-option-text);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
/* the native radio covers its option: focusable, clickable, announced */
.segmented__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.segmented__option:hover { background: var(--segmented-option-bg-hover); }
.segmented__option:has(input:checked) {
  background: var(--segmented-selected-bg);
  color: var(--segmented-selected-text);
  font-weight: var(--font-weight-semibold);
}
.segmented__option:has(input:focus-visible) {
  outline: var(--focus-ring-width) solid var(--segmented-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
@media (forced-colors: active) {
  .segmented__option:has(input:checked) { outline: var(--border-width-strong) solid Highlight; }
}


/* ── Switch ──────────────────────────────────────────────────────────────── */

.switch {
  position: relative;
  flex: 0 0 auto;
  width: var(--size-switch-w);
  height: var(--size-switch-h);
  border: none;
  border-radius: var(--switch-radius);
  background: var(--switch-track);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.switch::after {
  content: "";
  position: absolute;
  top: calc((var(--size-switch-h) - var(--space-8)) / 2);
  left: calc((var(--size-switch-h) - var(--space-8)) / 2);
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--switch-radius);
  background: var(--switch-thumb);
  box-shadow: var(--shadow-sm);
  transition: left var(--duration-base) var(--ease-out);
}
.switch[aria-pressed="true"],
.switch[aria-checked="true"] { background: var(--switch-track-on); }
.switch[aria-pressed="true"]::after,
.switch[aria-checked="true"]::after {
  left: calc(var(--size-switch-w) - var(--space-8) - (var(--size-switch-h) - var(--space-8)) / 2);
}
.switch:focus-visible {
  outline: var(--focus-ring-width) solid var(--switch-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
@media (forced-colors: active) {
  .switch { border: var(--border-width-hairline) solid ButtonText; }
  .switch::after { background: ButtonText; }
}
@media (prefers-reduced-motion: reduce) {
  .switch, .switch::after { transition: none; }
}


/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-7);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-2);
  color: var(--crumb-text);
}
.crumb a {
  display: inline-block;
  min-height: var(--size-target-min);
  padding: var(--space-1) 0;
  color: var(--crumb-text);
  text-decoration: none;
}
.crumb a:hover { color: var(--crumb-current); }
.crumb a:focus-visible {
  outline: var(--focus-ring-width) solid var(--crumb-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
.crumb .sep { color: var(--crumb-separator); }
.crumb [aria-current="page"],
.crumb .cur { color: var(--crumb-current); font-weight: var(--font-weight-medium); }


/* ── Section rail ────────────────────────────────────────────────────────── */

.srail {
  --srail-top: var(--stick, var(--nav-h, var(--size-nav-h)));
  position: sticky;
  top: calc(var(--srail-top) + var(--space-7));
  align-self: start;
  max-height: calc(100vh - var(--srail-top) - var(--space-14));
  overflow: auto;
  padding-right: var(--space-2);
  font-size: var(--font-size-3);
}
.srail .rt {
  font-size: var(--font-size-5);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-heading);
  text-transform: lowercase;
  color: var(--rail-title);
}
.srail .rs {
  margin-top: var(--space-1);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  color: var(--rail-subtitle);
}
.srail .grp { margin-top: var(--space-10); }
.srail .grp:first-child { margin-top: 0; }
.srail .gl {
  padding: 0 0 var(--space-2) var(--space-6);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--rail-subtitle);
}
.srail a {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-6);
  border-radius: var(--rail-link-radius);
  line-height: var(--line-height-compact);
  color: var(--rail-link-text);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.srail a .n {
  min-width: 1.6em;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  color: var(--rail-link-number);
}
.srail a:hover { background: var(--rail-link-bg-hover); }
.srail a:focus-visible {
  outline: var(--focus-ring-width) solid var(--rail-focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
}
.srail a[aria-current="true"] {
  background: var(--rail-current-bg);
  color: var(--rail-current-text);
  font-weight: var(--font-weight-semibold);
}
.srail a[aria-current="true"] .n { color: var(--rail-current-number); }

/* under 1000px, and always on .srail.bar: a sticky row of chips */
@media (max-width: 1000px) {
  .srail {
    display: flex;
    gap: var(--space-2);
    max-height: none;
    margin: 0 calc(-1 * var(--space-7));
    padding: var(--space-3) var(--space-7);
    top: var(--srail-top);
    z-index: 20;
    overflow-x: auto;
    scrollbar-width: none;
    background: color-mix(in srgb, var(--rail-bar-bg) 92%, transparent);
    border-bottom: var(--border-width-hairline) solid var(--rail-bar-border-color);
  }
  .srail .rt, .srail .rs, .srail .gl { display: none; }
  .srail .grp { display: contents; }
}
.srail.bar {
  display: flex;
  gap: var(--space-2);
  max-height: none;
  padding: var(--space-3) var(--size-gutter);
  top: var(--srail-top);
  z-index: 20;
  overflow-x: auto;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--rail-bar-bg) 92%, transparent);
  border-bottom: var(--border-width-hairline) solid var(--rail-bar-border-color);
}
.srail.bar .grp { display: contents; }
@media (max-width: 1000px) {
  .srail a { flex: none; white-space: nowrap; border: var(--border-width-hairline) solid var(--rail-chip-border-color); background: var(--rail-chip-bg); }
}
.srail.bar a { flex: none; white-space: nowrap; border: var(--border-width-hairline) solid var(--rail-chip-border-color); background: var(--rail-chip-bg); }
.srail.bar a[aria-current="true"],
.srail a[aria-current="true"] { background: var(--rail-current-bg); }
@media (forced-colors: active) {
  .srail a[aria-current="true"] { outline: var(--border-width-strong) solid Highlight; }
}


/* ── Choice card (pick) ──────────────────────────────────────────────────── */

.picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
@media (max-width: 760px) { .picks { grid-template-columns: 1fr; } }
.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-12) var(--space-12) var(--space-10);
  border: var(--border-width-hairline) solid var(--pick-border-color);
  border-radius: var(--pick-radius);
  background: var(--pick-bg);
  color: var(--pick-text);
  text-decoration: none;
  transition:
    transform var(--duration-base) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}
.pick:hover,
.pick:focus-visible {
  transform: translateY(calc(-1 * var(--space-1)));
  border-color: var(--pick-border-color-hover);
  box-shadow: var(--shadow-lila);
}
.pick:focus-visible {
  outline: var(--focus-ring-width) solid var(--pick-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
.picks:has(.pick:hover) .pick:not(:hover) { opacity: var(--opacity-step-back); }
.pk-top { display: flex; align-items: center; gap: var(--space-5); }
.pk-radio {
  flex: none;
  width: var(--size-radio);
  height: var(--size-radio);
  border: var(--border-width-strong) solid var(--pick-radio-ring);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.pick:hover .pk-radio,
.pick:focus-visible .pk-radio {
  border-color: var(--pick-radio-ring-hover);
  background: radial-gradient(circle, var(--pick-radio-ring-hover) 0 var(--space-1), transparent calc(var(--space-1) + var(--border-width-hairline)));
}
.pk-tag {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--pick-tag-text);
}
.pick h3 {
  margin-top: var(--space-7);
  font-size: var(--font-size-6);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
}
.pick > p {
  margin-top: var(--space-4);
  font-size: var(--font-size-3);
  line-height: var(--line-height-relaxed);
  color: var(--pick-body-text);
}
.pk-peek {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  font-size: var(--font-size-2);
  color: var(--pick-peek-text);
}
.pick .btn { align-self: flex-start; margin-top: auto; }
.pick .chips + .btn,
.pick .pk-peek + .btn { margin-top: var(--space-10); }
.pick:hover .btn--quiet,
.pick:focus-visible .btn--quiet {
  background: var(--pick-go-bg-hover);
  color: var(--pick-text);
  border-color: var(--pick-border-color-hover);
}
@media (prefers-reduced-motion: reduce) {
  .pick, .pk-radio { transition: none; }
  .pick:hover, .pick:focus-visible { transform: none; }
}


/* ── Read-next card ──────────────────────────────────────────────────────── */

.next-read a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-8) var(--space-14);
  padding: var(--space-12) var(--space-14);
  border: var(--border-width-hairline) solid var(--next-border-color);
  border-top: var(--border-width-strong) solid var(--next-top-rule);
  border-radius: var(--next-radius);
  background: var(--next-bg);
  text-decoration: none;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.next-read a:hover { border-color: var(--next-border-color-hover); background: var(--next-bg-hover); }
.next-read a:focus-visible {
  outline: var(--focus-ring-width) solid var(--next-focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
.next-read .nr-k { display: block; margin-bottom: var(--space-4); color: var(--next-kicker-text); }
.next-read .nr-q {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--font-size-lede);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
  color: var(--next-title-text);
}
.next-read .nr-d {
  display: block;
  max-width: var(--measure);
  font-size: var(--font-size-3);
  line-height: var(--line-height-relaxed);
  color: var(--next-body-text);
}
.next-read a:hover .btn--quiet {
  background: var(--button-quiet-bg-hover);
  color: var(--button-quiet-text-hover);
  border-color: var(--button-quiet-border-color-hover);
}
@media (max-width: 760px) {
  .next-read a { grid-template-columns: 1fr; align-items: start; padding: var(--space-10); }
  .next-read .btn { justify-self: start; }
}


/* ── Chip ────────────────────────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  border: var(--border-width-hairline) solid var(--chip-border-color);
  border-radius: var(--chip-radius);
  background: var(--chip-bg);
  font-size: var(--font-size-2);
  color: var(--chip-text);
}


/* ── Field band ──────────────────────────────────────────────────────────── */

.field-band {
  padding: var(--space-17) var(--size-gutter);
  background: var(--field-band-bg);
  color: var(--field-band-text);
  border-block: var(--border-width-hairline) solid var(--field-band-border-color);
}
.field-band .label { color: var(--field-band-muted); }
.field-band__title {
  max-width: var(--measure-pull);
  margin: var(--space-3) 0 0;
  font-size: var(--font-size-d3);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
}
.field-band__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-15);
  margin: var(--space-11) 0 0;
  padding: 0;
  list-style: none;
}
.field-band__num {
  display: block;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-7);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-heading);
  color: var(--field-band-number);
}
.field-band__cap { font-size: var(--font-size-3); color: var(--field-band-muted); }


/* ── Meta strip ──────────────────────────────────────────────────────────── */

.metae {
  display: flex;
  flex-wrap: wrap;
  margin-top: var(--space-17);
  border-top: var(--border-width-hairline) solid var(--meta-border-color);
}
.metae .m {
  margin-right: var(--space-12);
  padding: var(--space-8) var(--space-12) var(--space-8) 0;
  border-right: var(--border-width-hairline) solid var(--meta-border-color);
}
.metae .m:last-child { border-right: none; }
.metae .mk { color: var(--meta-key-text); }
.metae .mv {
  margin-top: var(--space-1);
  font-size: var(--font-size-4);
  font-weight: var(--font-weight-semibold);
  color: var(--meta-value-text);
}


/* ── Term (toggletip) ────────────────────────────────────────────────────── */

.term {
  position: relative;
  margin: 0;
  padding: 0 var(--border-width-hairline);
  border: none;
  border-bottom: var(--border-width-mark) dotted var(--term-underline);
  background: none;
  font: inherit;
  color: inherit;
  cursor: help;
}
.term:hover,
.term:focus-visible { color: var(--term-text-hover); outline: none; }
.term > .def {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--space-4));
  z-index: 30;
  width: max-content;
  max-width: min(var(--size-tip-max), 74vw);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--term-tip-radius);
  background: var(--term-tip-bg);
  color: var(--term-tip-text);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-3);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-snug);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(var(--space-1));
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), visibility var(--duration-fast);
}
.term > .def::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: var(--space-2) solid transparent;
  border-top-color: var(--term-tip-bg);
}
.term:hover > .def,
.term:focus-visible > .def,
.term[aria-expanded="true"] > .def {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (forced-colors: active) {
  .term > .def { border: var(--border-width-hairline) solid CanvasText; }
}


/* ── Pull quote ──────────────────────────────────────────────────────────── */

.pull {
  max-width: var(--measure-pull);
  margin: var(--space-14) 0;
  font-size: var(--font-size-d3);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
  color: var(--pull-text);
}
.pull .accent {
  background-image: var(--pull-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.quote {
  font-family: var(--font-family-serif);
  font-style: italic;
  font-size: var(--font-size-lede);
  line-height: var(--line-height-snug);
  color: var(--pull-text);
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .pull .accent { background: none; -webkit-text-fill-color: currentColor; color: var(--pull-accent-fallback); }
}
@media (forced-colors: active) {
  .pull .accent { background: none; -webkit-text-fill-color: currentColor; color: CanvasText; }
}


/* ── Act heading ─────────────────────────────────────────────────────────── */

.act-h {
  padding-top: var(--space-19);
  border-top: var(--border-width-hairline) solid var(--act-rule);
  /* counted once, on .act-n, by each page's own style block (counting here too doubled the numbers) */
}
.act-n {
  display: flex;
  align-items: baseline;
  gap: var(--space-7);
  padding-top: var(--space-12);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-3);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--act-label-text);
}
.act-n::before {
  content: counter(act, decimal-leading-zero);
  font-size: var(--font-size-d2);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-number);
  letter-spacing: var(--letter-spacing-display);
  color: var(--act-number);
}
.act-h h2 {
  max-width: var(--measure-heading);
  margin-top: var(--space-8);
  font-size: var(--font-size-d2);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-display);
  line-height: var(--line-height-tight);
  text-transform: lowercase;
  color: var(--act-title-text);
}
html[data-density="skim"] .act-h { padding-top: var(--space-17); }


/* ── Callout ─────────────────────────────────────────────────────────────── */

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-7) var(--space-8);
  border-radius: var(--callout-radius);
  background: var(--callout-note-bg);
  color: var(--callout-body-text);
  font-size: var(--font-size-3);
  line-height: var(--line-height-snug);
}
.callout__tag {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-1);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--callout-note-text);
  padding-top: 0.15em;
}
.callout--ok   { background: var(--callout-ok-bg); }
.callout--ok   .callout__tag { color: var(--callout-ok-text); }
.callout--warn { background: var(--callout-warn-bg); }
.callout--warn .callout__tag { color: var(--callout-warn-text); }
.callout--bad  { background: var(--callout-bad-bg); }
.callout--bad  .callout__tag { color: var(--callout-bad-text); }
@media (forced-colors: active) {
  .callout { border: var(--border-width-hairline) solid CanvasText; }
}


/* ── Trust word ──────────────────────────────────────────────────────────── */

/* One word split into letters, each letter `.tltr.tg`. The gradient is carried
   by every letter, sized to the whole word and offset by where the letter
   sits (the script sets background-size and -position), so the word reads as
   one gradient. It cannot sit on the word itself: the letters are
   inline-blocks so they can rise, and a clip on the parent does not reach
   into them (the word went blank in Chrome). At rest a menu label keeps the
   row's colour and the gradient arrives with the cursor; `.tg--on` keeps it
   on at rest (the accent word of the home page). The rise is in em because
   the proportion is the behaviour, not the pixel count. */
.tw { white-space: nowrap; }
.tltr {
  display: inline-block;
  transform: translateY(calc(var(--f, 0) * -0.17em)) scale(calc(1 + var(--f, 0) * 0.035));
  transition: transform var(--duration-base) var(--ease-out);
}
.tg {
  background-image: var(--trust-fill-small);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: currentColor;
  transition: -webkit-text-fill-color var(--duration-base) var(--ease-out);
}
.tg--display { background-image: var(--trust-fill-display); }
.tg--on,
.tg[data-near],
[aria-current="true"] .tg,
[aria-selected="true"] .tg { -webkit-text-fill-color: transparent; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .tg { background: none; }
  .tg--on, .tg[data-near], [aria-current="true"] .tg, [aria-selected="true"] .tg { color: var(--trust-fallback); }
}
@media (forced-colors: active) {
  .tg { background: none; -webkit-text-fill-color: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  .tltr { transition: none; transform: none; }
}


/* ── Icons (drawn, never typed: no arrow glyph sits in the text) ─────────── */

.ico-go,
.ico-ext {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  vertical-align: -0.08em;
  background: currentColor;
}
.ico-go  { -webkit-mask: var(--ico-go) center / contain no-repeat;  mask: var(--ico-go) center / contain no-repeat; }
.ico-ext { -webkit-mask: var(--ico-ext) center / contain no-repeat; mask: var(--ico-ext) center / contain no-repeat; }
:root {
  --ico-go:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4.5 12 8l-3.5 3.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ico-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 11 11 5M6 5h5v5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}


/* ── Conversation turns (Opal, 25 Nov 2026) ──────────────────────────────── */
/* The page as one conversation. A turn is a block with one hue (--c, from --hw1..--hw7);
   the hue reaches past the block's edges, so it melts into the next. The wave is the map
   of the turns, the pause is the visitor's turn. Home and inner pages share these rules;
   inner pages get them from turns.js. Decision: 2_docs/design/Voce-vizuala-site.md. */
main { isolation: isolate; }

.turn { position: relative; }
.turn::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -200px -18vw;
  background: radial-gradient(46% 42% at var(--x, 30%) 50%, var(--c), transparent 74%);
  opacity: var(--hw-op); mix-blend-mode: var(--hw-blend);
}
.turn-k {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font-family: var(--mono); font-size: var(--fs-1); letter-spacing: .1em; text-transform: uppercase; color: var(--slate);
}
.turn-k i { width: 26px; height: 12px; border-radius: 50%; background: var(--c); filter: blur(1.5px); }

/* the wave is the map of the page */
.map { margin-top: 44px; max-width: 860px; }
.map-k { font-family: var(--mono); font-size: var(--fs-1); color: var(--slate); margin-bottom: 4px; }
.wave { display: flex; align-items: stretch; height: 120px; }
.wave a { position: relative; display: block; flex: var(--w) 0 0; margin-right: -5.5%; }
.wave a::before {
  content: ""; position: absolute; inset: 8% -6%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent); filter: blur(12px);
  opacity: calc(var(--hw-op) + .2); mix-blend-mode: var(--hw-blend); transform: scaleY(.85);
  transition: transform .4s var(--ease), filter .4s;
}
.wave a:hover::before, .wave a:focus-visible::before { transform: scaleY(1.08); filter: blur(6px); }
.wave a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 40px; }
.wave .gap { flex: 9 0 0; position: relative; }
.wave .gap::after, .yours span::before {
  content: ""; position: absolute; left: 30%; top: 36%; bottom: 36%; width: 2px; background: var(--ink);
  animation: hw-blink 1.1s steps(1) infinite;
}
.map-l { display: flex; flex-wrap: wrap; gap: 2px 16px; font-family: var(--mono); font-size: var(--fs-1); color: var(--slate); }
@keyframes hw-blink { 50% { opacity: 0; } }

/* the page ends on a pause */
.yours { display: flex; align-items: center; height: 80px; max-width: 640px; margin-top: 48px; }
.yours i {
  flex: 5 0 0; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, var(--hw1), transparent);
  filter: blur(12px); opacity: calc(var(--hw-op) + .2); mix-blend-mode: var(--hw-blend);
}
.yours span { position: relative; flex: 6 0 0; padding-left: 24px; font-family: var(--mono); font-size: var(--fs-2); color: var(--slate); }
.yours span::before { left: 10px; top: -6px; bottom: -6px; }
@media (prefers-reduced-motion: reduce) {
  .wave .gap::after, .yours span::before { animation: none; }
  .wave a::before { transition: none; }
}

/* inner pages: the chip that says which turn of the home page this page continues */
.from {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-5, 12px); padding: 4px 12px 4px 8px;
  border-radius: 99px; background: color-mix(in srgb, var(--paper) 60%, transparent);
  box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: var(--fs-1); line-height: 1.4;
}
.from i { width: 22px; height: 10px; border-radius: 50%; background: var(--c); filter: blur(1.5px); flex: none; }
.from:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.from:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* inner pages: a section heading is a turn; its patch sits behind it, a small one before the label */
.act-h.turn .act-n i { align-self: center; flex: none; width: 26px; height: 12px; border-radius: 50%; background: var(--c); filter: blur(1.5px); }
/* reading on scroll over the problem statement (turns.js); plain text without JS */
.js .act-h h2 .w { color: var(--slate); transition: color .35s var(--ease); }
.js .act-h h2 .w.lit { color: var(--act-title-text); }
@media (prefers-reduced-motion: reduce) { .js .act-h h2 .w { color: var(--act-title-text); transition: none; } }

/* inner pages: the closing turn, "your turn" */
.turn-end.turn { padding-top: var(--space-19, 64px); padding-bottom: var(--space-19, 64px); }
.turn-end .pause-row { display: flex; align-items: center; gap: 16px; height: 80px; max-width: 640px; }
.turn-end .pause {
  flex: 0 1 200px; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, var(--hw7), transparent);
  filter: blur(8px); opacity: calc(var(--hw-op) + .2); mix-blend-mode: var(--hw-blend);
}
.turn-end .cur { flex: none; width: 2px; height: 30px; background: var(--ink); animation: hw-blink 1.1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .turn-end .cur { animation: none; } }
.turn-end .end-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.turn-end button {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--trust-grad-small); color: var(--paper); font-family: var(--mono); font-size: var(--fs-2);
}
.turn-end button:hover { filter: brightness(1.08); }
.turn-end button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.turn-end .end-row a { font-family: var(--mono); font-size: var(--fs-2); color: var(--ink); }

/* Built items, icon + name (approved variant B): ink icon, name underneath, number only in the name when above 1 */
.bi-ico { display: block; width: 64px; height: 64px; margin-top: 14px; color: var(--ink); }
.bi-svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bi-svg .f { fill: var(--c, var(--hw5)); stroke: none; }
.bi-nm { display: block; margin-top: 12px; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-decoration: underline transparent; text-underline-offset: 6px; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s var(--ease); }
a:hover > .bi-nm { text-decoration-color: currentColor; }

/* inner pages: the wave map replaces nav.srail (turns.js hides the rail) and stays pinned, small.
   Lit patch = the section in view; the rest dim. Names show on hover and focus (12 px). */
nav.srail[hidden] { display: none !important; }
.wave.has-cur a:not([aria-current])::before { opacity: calc(var(--hw-op) * .55); }
.wave a[aria-current]::before { opacity: 1; }
.wave a[aria-current] {
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 18% 100% / 64% 2px;
}
.map-mini {
  position: fixed; z-index: 55; left: 0; right: 0; top: var(--stick, var(--nav-h, 63px));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  visibility: hidden; opacity: 0; transition: opacity .2s var(--ease), visibility 0s .2s;
}
.map-mini.on { visibility: visible; opacity: 1; transition: opacity .2s var(--ease); }
.map-mini .wave { height: 26px; }
.map-mini .wave a { margin-right: -4%; }
.map-mini .wave a::before { inset: 6px 3px 8px; border-radius: 99px; background: var(--c); filter: none; mix-blend-mode: normal; opacity: .5; transform: none; transition: none; }
.map-mini .wave.has-cur a:not([aria-current])::before { opacity: .38; }
.map-mini .wave a[aria-current]::before { opacity: 1; }
.map-mini .wave a:hover::before, .map-mini .wave a:focus-visible::before { opacity: 1; }
.map-mini .wave a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }
.map-mini .wave a::after {
  content: attr(aria-label); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none;
  opacity: 0; visibility: hidden;
}
.map-mini .wave a:hover::after, .map-mini .wave a:focus-visible::after { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .map-mini, .map-mini.on { transition: none; }
}
html[data-motion="reduce"] .map-mini, html[data-motion="reduce"] .map-mini.on { transition: none; }
