/* ═══════════════════════════════════════════════════════════════
   lalamelody — a composition plan is the asset
   Design system. "First Light": a document, with light coming
   through it. Dawn palette, never pink — that is Hana's.

   One typographic rule carries the whole argument and is applied
   without exception:

     · serif  = text a person wrote and can argue with (plans, prose)
     · mono   = anything measured, quoted, or identified
                (durations, credits, clause text, rule ids, markers)

   So a number set in mono is a claim that something measured it,
   and the page cannot quietly present an estimate as a reading.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Before dawn */
  --night: #0a0c12;
  --night-2: #12151f;
  --night-3: #1b1f2c;

  /* Paper */
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --paper-3: #e4dbcb;

  /* Ink */
  --ink: #191c26;
  --ink-2: #3c4152;
  --ink-soft: #626879;
  --ink-faint: #8a8f9e;

  /* First light */
  --amber: #e0a049;
  --amber-warm: #f0c684;
  --amber-deep: #b97c2c;
  --ember: #cb6a4c;

  /* The two surfaces, kept consistent everywhere they appear */
  --eleven: #5ea89b;
  --eleven-deep: #2f6d63;
  --flow: #8579b8;
  --flow-deep: #574b87;

  /* Verdicts */
  --refuse: #bb5341;
  --unknown: #9a8f7c;

  --line: rgba(25, 28, 38, 0.12);
  --line-strong: rgba(25, 28, 38, 0.22);
  --line-dark: rgba(247, 243, 236, 0.14);

  --shadow-sm: 0 2px 10px rgba(20, 18, 14, 0.06);
  --shadow: 0 12px 40px rgba(20, 18, 14, 0.10);
  --shadow-lg: 0 28px 70px rgba(10, 12, 18, 0.28);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --nav-h: 66px;
  --pad: clamp(20px, 5vw, 44px);
  --site-max: 1140px;
  --read-max: 68ch;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --cjk: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 0.32s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-lang="zh"] { font-family: var(--cjk); }
body[data-lang="zh"] .u-serif,
body[data-lang="zh"] h1, body[data-lang="zh"] h2, body[data-lang="zh"] h3 {
  font-family: "Noto Serif TC", var(--cjk), var(--serif);
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }

a { color: inherit; text-decoration: none; transition: color var(--t), opacity var(--t); }

::selection { background: var(--amber-warm); color: var(--night); }
:focus-visible { outline: 2.5px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; top: -60px; left: 12px; z-index: 200;
  background: var(--night); color: var(--paper); padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: 14px;
}
.skip:focus { top: 12px; }

/* ── language toggling ─────────────────────────────────────────
   Both languages ship in the markup. English is visible with no
   JavaScript at all, which is the state a search engine and a
   text browser see. */
[data-i18n] { display: none; }
[data-i18n="en"] { display: revert; }
body[data-lang="zh"] [data-i18n="en"] { display: none; }
body[data-lang="zh"] [data-i18n="zh"] { display: revert; }

/* ── layout ───────────────────────────────────────────────────── */

.wrap { width: min(var(--site-max), 100%); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { width: min(820px, 100%); }
.read { max-width: var(--read-max); }

.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

.section--night {
  background: var(--night);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.section--night h2, .section--night h3 { color: var(--paper); }
.section--paper-2 { background: var(--paper-2); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ── type scale ───────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 14px;
}
.section--night .eyebrow { color: var(--amber); }

h1, .h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 90;
}
h2, .h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 24, "opsz" 40;
}
h3, .h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.26;
  font-variation-settings: "SOFT" 20, "opsz" 20;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.1vw, 1.42rem);
  line-height: 1.52;
  color: var(--ink-2);
  font-variation-settings: "SOFT" 18, "opsz" 20;
}
.section--night .lede { color: rgba(247, 243, 236, 0.88); }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-soft); }
.section--night .muted { color: rgba(247, 243, 236, 0.6); }

strong { font-weight: 650; color: var(--ink); }
.section--night strong { color: #fff; }

/* Anything measured, identified or quoted. The rule that carries
   the argument — see the header of this file. */
.m { font-family: var(--mono); font-size: 0.92em; font-variant-numeric: tabular-nums; }
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── nav ──────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 22px; width: 100%; }
.nav__brand {
  font-family: var(--serif);
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  display: inline-flex; align-items: center; gap: 9px;
  margin-right: auto;
}
.nav__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--amber-warm), var(--amber-deep));
  box-shadow: 0 0 0 4px rgba(224, 160, 73, 0.16);
  flex: none;
}
.nav__links { display: flex; gap: 4px; align-items: center; }
.nav__link {
  font-size: 14px; padding: 7px 12px; border-radius: var(--radius-pill);
  color: var(--ink-soft);
}
.nav__link:hover { background: rgba(224, 160, 73, 0.14); color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); background: rgba(25, 28, 38, 0.06); }

.lang {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); overflow: hidden; flex: none;
}
.lang button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 6px 11px; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); transition: background var(--t), color var(--t);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .nav__links { gap: 0; }
  .nav__link { padding: 7px 9px; font-size: 13px; }
  .nav__brand span:last-child { display: none; }
}

/* ── hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--night);
  color: var(--paper);
  padding-block: clamp(70px, 12vw, 140px) clamp(54px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}
/* The light itself: a low sun under the horizon line of the section. */
.hero::before {
  content: "";
  position: absolute; inset: auto 0 -14% 0; height: 86%;
  background:
    radial-gradient(78% 108% at 50% 100%, rgba(224, 160, 73, 0.46) 0%, rgba(224, 160, 73, 0.17) 38%, rgba(224, 160, 73, 0.05) 62%, transparent 80%),
    radial-gradient(46% 80% at 20% 104%, rgba(203, 106, 76, 0.34) 0%, transparent 66%),
    radial-gradient(40% 66% at 84% 106%, rgba(133, 121, 184, 0.22) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}
/* The horizon: a hairline of light where the section ends, so the gradient
   reads as a sunrise rather than as a vignette. */
.hero__horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 198, 132, 0.55) 30%, rgba(240, 198, 132, 0.7) 50%, rgba(240, 198, 132, 0.55) 70%, transparent);
  z-index: 0; pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: 0.5; pointer-events: none;
  background-image: radial-gradient(rgba(247, 243, 236, 0.055) 1px, transparent 1px);
  background-size: 3px 3px;
}
.hero h1 { color: var(--paper); max-width: 22ch; }
.hero .lede { margin-top: 22px; max-width: 54ch; }
.hero__claim {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber);
  border: 1px solid rgba(224, 160, 73, 0.4);
  border-radius: var(--radius-pill); padding: 7px 16px; margin-bottom: 28px;
}
.hero__claim b { color: var(--paper); font-weight: 500; }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 550;
  padding: 12px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t), background var(--t), border-color var(--t), color var(--t);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--amber); color: var(--night); }
.btn--primary:hover { background: var(--amber-warm); }
.btn--ghost { border-color: rgba(247, 243, 236, 0.3); color: var(--paper); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--quiet { border-color: var(--line-strong); color: var(--ink-2); background: transparent; }
.btn--quiet:hover { border-color: var(--ink); }

/* ── the ribbon: the plan, and its renders, on one time axis ──── */

.ribbon { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ribbon__row { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; }
.ribbon__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  text-align: right; color: var(--ink-soft); line-height: 1.3;
}
.ribbon__label b { display: block; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.section--night .ribbon__label { color: rgba(247, 243, 236, 0.55); }
.section--night .ribbon__label b { color: var(--paper); }

.ribbon__track {
  position: relative; height: 44px; border-radius: 7px;
  background: rgba(25, 28, 38, 0.07);
}
.section--night .ribbon__track { background: rgba(247, 243, 236, 0.07); }

.ribbon__seg {
  position: absolute; top: 0; bottom: 0;
  border-radius: 5px;
  display: flex; align-items: center; padding-inline: 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--night);
  overflow: hidden; white-space: nowrap;
  border: 1px solid rgba(10, 12, 18, 0.16);
}
.ribbon__seg--plan { background: linear-gradient(180deg, var(--amber-warm), var(--amber)); }
.ribbon__seg--eleven { background: linear-gradient(180deg, #7cc0b3, var(--eleven)); }
.ribbon__seg--flow { background: linear-gradient(180deg, #9e93c9, var(--flow)); }
.ribbon__seg--over {
  background: repeating-linear-gradient(135deg,
    rgba(203, 106, 76, 0.92) 0 7px, rgba(187, 83, 65, 0.92) 7px 14px);
  color: #fff;
}

.ribbon__cue {
  position: absolute; top: -9px; bottom: -3px; width: 3px;
  background: var(--night); border-radius: 2px; cursor: pointer;
  border: 0; padding: 0;
  transition: transform var(--t), background var(--t);
}
.ribbon__cue::before {
  content: ""; position: absolute; top: -3px; left: 50%;
  width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: inherit;
}
.section--night .ribbon__cue { background: var(--paper); }
.ribbon__cue::after {
  content: ""; position: absolute; inset: -10px -9px;
}
.ribbon__cue:hover, .ribbon__cue[data-playing="true"] {
  background: var(--ember); transform: scaleX(1.9);
}

.ribbon__axis {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.05em; padding-top: 2px;
}
.section--night .ribbon__axis { color: rgba(247, 243, 236, 0.4); }

@media (max-width: 640px) {
  .ribbon__row { grid-template-columns: 1fr; gap: 5px; }
  .ribbon__label { text-align: left; }
}

/* ── cards & grids ────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}
.section--night .card {
  background: rgba(247, 243, 236, 0.045);
  border-color: var(--line-dark);
  box-shadow: none;
}
.card h3 { margin-bottom: 10px; }
.card__kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px;
}

/* A number that something measured, with the thing that measured it. */
.stat { display: grid; gap: 3px; }
.stat__value {
  font-family: var(--mono); font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
  line-height: 1.05; color: var(--ink);
}
.section--night .stat__value { color: var(--paper); }
.stat__unit { font-size: 0.5em; color: var(--ink-faint); letter-spacing: 0; }
.stat__label { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.section--night .stat__label { color: rgba(247, 243, 236, 0.6); }
.stat--measured .stat__value { color: var(--eleven-deep); }
.section--night .stat--measured .stat__value { color: #7cc0b3; }

/* ── the clause: quoted licence text, with where it came from ─── */

.clause {
  border-left: 3px solid var(--amber);
  background: rgba(224, 160, 73, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 18px 0;
}
.clause__text {
  font-family: var(--mono); font-size: 13px; line-height: 1.62;
  color: var(--ink-2);
}
.section--night .clause { background: rgba(224, 160, 73, 0.10); }
.section--night .clause__text { color: rgba(247, 243, 236, 0.86); }
.clause__src {
  margin-top: 10px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.05em; color: var(--ink-faint);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.clause__src a { color: var(--amber-deep); border-bottom: 1px solid rgba(185, 124, 44, 0.35); }
.section--night .clause__src a { color: var(--amber); }

/* ── a refusal, shown as the tool prints it ───────────────────── */

.terminal {
  background: var(--night-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
  box-shadow: var(--shadow-lg);
}
.terminal__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-dark);
  background: rgba(247, 243, 236, 0.035);
}
.terminal__dots { display: flex; gap: 6px; }
.terminal__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(247, 243, 236, 0.2); }
.terminal__cmd { font-size: 11.5px; color: rgba(247, 243, 236, 0.52); letter-spacing: 0.03em; }
.terminal__body {
  padding: 18px 20px; font-size: 12.6px; line-height: 1.72;
  color: rgba(247, 243, 236, 0.8); overflow-x: auto;
  white-space: pre-wrap; word-break: break-word;
}
.terminal__body .k { color: var(--refuse); font-weight: 600; }
.terminal__body .a { color: var(--amber); }
.terminal__body .g { color: #7cc0b3; }
.terminal__body .d { color: rgba(247, 243, 236, 0.42); }

/* ── the plan, typeset as the document it is ──────────────────── */

.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.plan__head {
  padding: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(224, 160, 73, 0.09), transparent 70%);
}
.plan__name { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-deep); }
.plan__title { margin: 6px 0 10px; }
.plan__meta { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); }
.plan__body { padding: clamp(20px, 3vw, 30px); display: grid; gap: 22px; }

.styleset { display: flex; gap: 7px; flex-wrap: wrap; }

.legend {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-faint); padding-bottom: 4px;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i {
  width: 20px; height: 10px; border-radius: var(--radius-pill);
  background: var(--paper-2); flex: none;
}
.legend i.is-inherited { opacity: 0.55; }
.legend i.is-avoid { background: transparent; border: 1px solid rgba(187, 83, 65, 0.5); }
.chip {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.3;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid transparent;
}
.chip--avoid {
  background: transparent; color: var(--refuse);
  border-color: rgba(187, 83, 65, 0.32);
  text-decoration: line-through;
  text-decoration-color: rgba(187, 83, 65, 0.45);
}
.chip--implied { opacity: 0.62; font-style: italic; text-decoration: none; }

.plan__section {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px;
  padding-top: 18px; border-top: 1px dashed var(--line);
}
.plan__section:first-of-type { border-top: 0; padding-top: 0; }
.plan__clock {
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; padding-top: 3px;
}
.plan__sname { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 9px; font-variation-settings: "SOFT" 20; }

@media (max-width: 560px) {
  .plan__section { grid-template-columns: 1fr; gap: 7px; }
}

/* ── the listening room ───────────────────────────────────────── */

.piece {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(18px, 2.6vw, 26px);
  box-shadow: var(--shadow-sm);
  display: grid; gap: 16px;
}
.piece__top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.piece__id { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.08em; }
.piece__name { font-family: var(--serif); font-size: 1.22rem; font-variation-settings: "SOFT" 22; }
.piece__tags { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }

.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em;
  padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  text-transform: uppercase;
}
.tag--eleven { border-color: rgba(94, 168, 155, 0.5); color: var(--eleven-deep); background: rgba(94, 168, 155, 0.1); }
.tag--flow { border-color: rgba(133, 121, 184, 0.5); color: var(--flow-deep); background: rgba(133, 121, 184, 0.1); }
.tag--warn { border-color: rgba(187, 83, 65, 0.45); color: var(--refuse); background: rgba(187, 83, 65, 0.08); }
.tag--unheard { border-color: rgba(154, 143, 124, 0.5); color: var(--unknown); }

.cues { display: grid; gap: 8px; }
.cue {
  display: grid; grid-template-columns: 42px 62px 1fr; gap: 12px; align-items: center;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 10px 12px;
  font: inherit; color: inherit;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.cue:hover { background: #fff; border-color: var(--line-strong); transform: translateX(2px); }
.cue[data-playing="true"] { background: #fff; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224, 160, 73, 0.16); }
.cue__play {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; flex: none;
  transition: background var(--t);
}
.cue[data-playing="true"] .cue__play { background: var(--amber); color: var(--night); }
.cue__at { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.cue__for { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

.piece__note {
  font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* Phone. The cue row's three fixed-ish columns leave too little for the
   sentence, which is the part being read, so the clock moves above it. */
@media (max-width: 540px) {
  .cue { grid-template-columns: 34px 1fr; gap: 10px; padding: 9px 10px; }
  .cue__at { grid-column: 2; margin-bottom: -4px; }
  .cue__for { grid-column: 2; font-size: 13px; }
  .piece__tags { margin-left: 0; width: 100%; }
  .rights__row { padding: 9px 11px; }
  .rights__q { font-size: 12.5px; }
  .plan__meta { gap: 10px; font-size: 11px; }
  .legend { gap: 10px; }
}

/* Very narrow. Nothing may push the page sideways. */
@media (max-width: 380px) {
  .nav__inner { gap: 10px; }
  .terminal__body { font-size: 11.5px; padding: 14px; }
}

.withheld {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: repeating-linear-gradient(135deg,
    rgba(154, 143, 124, 0.05) 0 10px, transparent 10px 20px);
  font-size: 13.5px; color: var(--ink-soft);
}

/* ── rights table ─────────────────────────────────────────────── */

.rights { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.rights__row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  background: #fff; padding: 10px 14px; align-items: center;
}
.rights__q { font-size: 13.5px; color: var(--ink-2); }
.rights__a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill);
}
.rights__a[data-state="allowed"] { background: rgba(94, 168, 155, 0.16); color: var(--eleven-deep); }
.rights__a[data-state="denied"] { background: rgba(187, 83, 65, 0.13); color: var(--refuse); }
.rights__a[data-state="unknown"] { background: rgba(154, 143, 124, 0.16); color: #6d6553; }

/* ── footer ───────────────────────────────────────────────────── */

.foot {
  background: var(--night); color: rgba(247, 243, 236, 0.62);
  padding-block: clamp(44px, 6vw, 72px);
  font-size: 14px;
}
.foot h3 { color: var(--paper); margin-bottom: 12px; }
.foot a { color: var(--amber); }
.foot a:hover { color: var(--amber-warm); }
.foot__grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot__bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  color: rgba(247, 243, 236, 0.42);
}

/* ── motion ───────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
