/*
DIRECTION CONTRACT, "IB DP Theatre Companion"
THESIS: The site is the prompt corner of a theatre during the technical
rehearsal of a student's final season. The DP student no longer reads the
callboard; they call their own show. It refuses the category default, a
light docs site with cards, and the sibling's own device, paper on a wall.
OWN-WORLD: A dark house lit only where it matters. A followspot finds the
work; long reading happens on script paper under the desk lamp; mark bands
are light intensity on a fader bank; each component owns a lighting gel
(gold, rose, blue, red). Besley playbill display, Libre Franklin reading
text, Courier Prime for the cue sheet only. Light is the only ornament.
STORY: A student picks their component, reads exactly what the examiner
credits at each band, sees full-marks work with the evidence highlighted,
then reads the whole exemplar like an examiner.
FIRST VIEWPORT: Blackout. The followspot fades up on a performer reading a
script; the title steps into the light line by line; beneath it the four
components run as a season bill. Primary action: open your component.
FORM: Backstage cue grammar on a dark house; sister to The Callboard.
NAMING: Amy chose plain "IB DP Theatre" branding, credit "Created and
designed by Amy Garside"; no coined site name, no em dashes anywhere.
*/

/* ---------- fonts ---------- */
@font-face { font-family: 'Besley'; src: url('../fonts/besley-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Besley'; src: url('../fonts/besley-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Besley'; src: url('../fonts/besley-700italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('../fonts/librefranklin-400n.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('../fonts/librefranklin-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('../fonts/librefranklin-500n.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('../fonts/librefranklin-600n.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Libre Franklin'; src: url('../fonts/librefranklin-700n.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courierprime-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courierprime-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* Metric matched fallbacks: these hold the same space as the real faces while
   the woff2 files load, so nothing reflows when they swap in. Ratios measured
   against the real fonts in the browser. */
@font-face { font-family: 'Besley Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 120%; ascent-override: 92%; descent-override: 24%; }
@font-face { font-family: 'Franklin Fallback'; src: local('Helvetica Neue'), local('Arial'); size-adjust: 104.5%; ascent-override: 94%; descent-override: 24%; }
@font-face { font-family: 'Courier Fallback'; src: local('Courier New'); size-adjust: 100%; }

/* ---------- tokens ---------- */
:root {
  --house: #16110d;
  --house-deep: #0e0a07;
  --house-line: #2d251d;
  --house-text: #f1e9d8;
  --house-muted: #b9ad97;
  --spot: #f3c96b;
  --spot-hot: #ffe9bd;
  --page: #f8f4ea;
  --page-shade: #efe9da;
  --ink: #241d15;
  --ink-soft: #564e3e;
  --gel-gold: #e6b458;
  --gel-gold-deep: #6d5008;
  --gel-rose: #e08bab;
  --gel-rose-deep: #86294b;
  --gel-blue: #92a9e4;
  --gel-blue-deep: #2f4a85;
  --gel-red: #ef7460;
  --gel-red-deep: #96261a;
  --display: 'Besley', 'Besley Fallback', 'Iowan Old Style', Georgia, serif;
  --body: 'Libre Franklin', 'Franklin Fallback', 'Helvetica Neue', Arial, sans-serif;
  --cue: 'Courier Prime', 'Courier Fallback', 'Courier New', monospace;
  --sheet-max: 872px;
  --rail-w: 252px;
  --ease-up: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: calc(var(--header-h, 100px) + 4rem); }

body {
  overflow-x: clip;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--house-text);
  background:
    radial-gradient(1150px 520px at 22% -10%, rgba(243, 201, 107, 0.075), transparent 60%),
    var(--house);
  min-height: 100vh;
}

::selection { background: var(--spot); color: var(--house-deep); }

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

.skip {
  position: absolute; left: -999px; top: 0.6rem; z-index: 300;
  background: var(--spot); color: var(--house-deep);
  padding: 0.55rem 1rem; font-weight: 700; border-radius: 3px;
}
.skip:focus { left: 0.6rem; }

:focus-visible { outline: 2px solid var(--spot); outline-offset: 3px; }
.sheet :focus-visible, .paper :focus-visible { outline-color: var(--gel-blue-deep); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 120;
  background: rgba(14, 10, 7, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--house-line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 1.1rem;
  display: flex; align-items: center; gap: 1.3rem;
  min-height: 3.4rem;
}
.brand {
  display: flex; align-items: baseline; gap: 0.55rem;
  text-decoration: none; white-space: nowrap;
  min-height: 44px; align-items: center;
}
.brand .brand-dot {
  width: 10px; height: 10px; align-self: center;
  background: var(--spot); box-shadow: 0 0 10px 2px rgba(243, 201, 107, 0.55);
}
.brand .word {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  color: var(--house-text); letter-spacing: 0.01em;
}
.brand .sub {
  font-family: var(--cue); font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--house-muted); text-transform: uppercase;
}
.topnav {
  display: flex; align-items: center; gap: 0.1rem;
  margin-left: auto; flex-wrap: wrap; justify-content: flex-end;
}
.topnav a {
  text-decoration: none; font-size: 0.84rem; font-weight: 500;
  color: var(--house-muted); padding: 0.42rem 0.62rem; border-radius: 3px;
  white-space: nowrap; transition: color 160ms ease, background 160ms ease;
}
.topnav a:hover { color: var(--house-text); background: rgba(243, 201, 107, 0.08); }
.topnav a[aria-current="page"] { color: var(--spot); }

/* the four components, always fully visible */
.compnav {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--house-line);
  background: rgba(0, 0, 0, 0.28);
}
.compnav a {
  position: relative; text-decoration: none;
  padding: 0.6rem 1rem 0.62rem; display: block;
  border-left: 1px solid var(--house-line);
  transition: background 200ms ease;
}
.compnav a:first-child { border-left: none; }
.compnav a::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--gel); opacity: 0; transition: opacity 200ms ease;
}
.compnav a:hover { background: var(--gel-glow); }
.compnav a:hover::before { opacity: 0.55; }
.compnav a[aria-current="page"] { background: var(--gel-glow); }
.compnav a[aria-current="page"]::before { opacity: 1; box-shadow: 0 0 12px 1px var(--gel); }
.compnav a[aria-current="page"] .cn-name { color: var(--gel); }
.cn-name {
  display: block; font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  color: var(--house-text); line-height: 1.2; transition: color 200ms ease;
}
.cn-sub {
  display: block; font-family: var(--cue); font-size: 0.64rem; letter-spacing: 0.06em;
  color: var(--house-muted); margin-top: 0.16rem;
}

/* ---------- home hero ---------- */
.hero-house {
  position: relative; overflow: hidden;
  background: var(--house-deep);
  border-bottom: 1px solid var(--house-line);
}
.hero-house .art {
  position: absolute; inset: 0;
}
.hero-house .art img {
  width: 100%; height: 100%; object-fit: cover; object-position: 28% 30%;
}
.hero-house .beam {
  position: absolute; inset: -12%; z-index: 1; pointer-events: none;
  background: radial-gradient(38% 52% at 30% 42%, rgba(243, 201, 107, 0.14), transparent 70%);
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-house .beam { animation: beam-drift 13s ease-in-out infinite alternate; }
}
@keyframes beam-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); opacity: 0.85; }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.07); opacity: 1; }
}
.hero-house .art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 10, 7, 0.94) 0%, rgba(14, 10, 7, 0.72) 36%, rgba(14, 10, 7, 0.28) 62%, rgba(14, 10, 7, 0.55) 100%),
    linear-gradient(to top, rgba(14, 10, 7, 0.98) 0%, rgba(14, 10, 7, 0) 34%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(5rem, 13vh, 8.5rem) 1.1rem clamp(3.4rem, 9vh, 6rem);
}
.hero-call {
  font-family: var(--cue); font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--spot);
  margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.5rem, 7.2vw, 5.1rem);
  line-height: 1.02; letter-spacing: -0.015em;
  max-width: 13ch; text-wrap: balance;
}
.hero-title .lit { color: var(--spot-hot); }
.hero-lede {
  margin-top: 1.4rem; max-width: 34rem;
  font-size: clamp(1rem, 1.6vw, 1.13rem); line-height: 1.6;
  color: var(--house-text);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* staged fade-up: the light comes up, then the words step into it */
@media (prefers-reduced-motion: no-preference) {
  .hero-house .art { opacity: 0; animation: house-up 2s ease-out 0.15s forwards; }
  .hero-comp .art { opacity: 0; animation: house-up 1.4s ease-out 0.1s forwards; }
  .hero-call, .hero-title, .hero-lede, .hero-actions, .comp-meta {
    opacity: 0; transform: translateY(22px);
    animation: step-in 0.9s var(--ease-up) forwards;
  }
  .hero-comp .hero-call { animation-delay: 0.1s; animation-duration: 0.55s; }
  .hero-comp .hero-title { opacity: 1; animation: comp-lift 0.6s var(--ease-up) both; }
  .hero-comp .comp-meta { animation-delay: 0.26s; animation-duration: 0.55s; }
  .hero-comp .hero-lede { animation-delay: 0.34s; animation-duration: 0.55s; }
  .hero-house .hero-call { animation-delay: 0.9s; }
  .hero-house .hero-title { animation-delay: 1.05s; }
  .hero-house .hero-lede { animation-delay: 1.25s; }
  .hero-house .hero-actions { animation-delay: 1.4s; }
}
@keyframes house-up { from { opacity: 0; } to { opacity: 1; } }
@keyframes step-in { to { opacity: 1; transform: none; } }
/* the component hero title paints straight away and only lifts, so it can be
   the LCP element without waiting on a fade */
@keyframes comp-lift { from { transform: translateY(14px); } to { transform: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; font-weight: 600; font-size: 0.94rem;
  padding: 0.72rem 1.25rem; border-radius: 3px;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease-up), background 160ms ease, border-color 160ms ease, box-shadow 180ms ease;
}
.btn-go {
  background: var(--spot); color: var(--house-deep);
}
.btn-go:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(243, 201, 107, 0.55); }
.btn-house {
  border-color: var(--house-line); color: var(--house-text);
  background: rgba(241, 233, 216, 0.03);
}
.btn-house:hover { border-color: var(--house-muted); transform: translateY(-2px); }

/* ---------- the climb (command verbs grow with scroll) ---------- */
.climb { border-block: 1px solid var(--house-line); background: var(--house-deep); }
.climb-head { padding: clamp(2.6rem, 7vh, 4.2rem) 1.1rem 0.6rem; max-width: 1180px; }
.climb-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.01em;
}
.climb-head p { margin-top: 0.8rem; color: var(--house-muted); max-width: 58ch; }
.climb-track { height: 340vh; }
.climb-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.climb-spot {
  position: absolute; inset: -20%;
  background: radial-gradient(42% 56% at 38% 46%, rgba(243, 201, 107, calc(0.05 + var(--p, 0) * 0.22)), transparent 72%);
  mix-blend-mode: screen; transition: background 400ms ease;
}
.climb-inner {
  position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.1rem;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center;
}
.climb-words { position: relative; min-height: 16rem; }
.climb-word {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(34px) scale(0.96);
  transition: opacity 550ms ease, transform 650ms var(--ease-up);
  pointer-events: none;
}
.climb-word .cband {
  font-family: var(--cue); font-size: 0.8rem; letter-spacing: 0.22em; color: var(--house-muted);
}
.climb-word .cverb {
  font-family: var(--display); font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; margin-top: 0.4rem;
}
.climb-word .cdefn { margin-top: 1rem; color: var(--house-muted); max-width: 34rem; font-size: 1.02rem; }
.climb-word.s1 .cverb { font-size: clamp(2.6rem, 6vw, 4rem); color: #8f8270; }
.climb-word.s2 .cverb { font-size: clamp(3.2rem, 8vw, 5.4rem); color: #ab9c82; }
.climb-word.s3 .cverb { font-size: clamp(3.9rem, 10vw, 7rem); color: #d3c194; }
.climb-word.s4 .cverb {
  font-size: clamp(4.6rem, 12.5vw, 9rem); color: var(--spot-hot);
  text-shadow: 0 0 34px rgba(243, 201, 107, 0.55), 0 0 90px rgba(243, 201, 107, 0.3);
}
.climb-word.s4 .cdefn { color: var(--house-text); }
[data-stage="1"] .climb-word.s1, [data-stage="2"] .climb-word.s2,
[data-stage="3"] .climb-word.s3, [data-stage="4"] .climb-word.s4 {
  opacity: 1; transform: none;
}
[data-stage="2"] .climb-word.s1, [data-stage="3"] .climb-word.s2, [data-stage="4"] .climb-word.s3 {
  opacity: 0; transform: translateY(-30px) scale(1.02);
}
.climb-bank { display: flex; gap: 1rem; align-items: flex-end; height: 16rem; padding-bottom: 0.4rem; margin-right: clamp(0rem, 6vw, 6rem); }
.climb-bank .cfader {
  width: 20px; height: 100%; border-radius: 4px;
  background: rgba(241, 233, 216, 0.07); position: relative; overflow: hidden;
}
.climb-bank .cfader span {
  position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px;
  height: var(--h, 25%); background: #6d6250;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 700ms var(--ease-up), background 400ms ease, box-shadow 400ms ease;
}
.climb-bank .f1 span { --h: 25%; } .climb-bank .f2 span { --h: 50%; }
.climb-bank .f3 span { --h: 75%; } .climb-bank .f4 span { --h: 100%; }
[data-stage="1"] .f1 span { transform: scaleY(1); }
[data-stage="2"] .f1 span, [data-stage="2"] .f2 span { transform: scaleY(1); background: #93856c; }
[data-stage="3"] .f1 span, [data-stage="3"] .f2 span, [data-stage="3"] .f3 span { transform: scaleY(1); background: #c9b98f; }
[data-stage="4"] .f1 span, [data-stage="4"] .f2 span, [data-stage="4"] .f3 span, [data-stage="4"] .f4 span {
  transform: scaleY(1); background: var(--spot);
  box-shadow: 0 0 16px 2px rgba(243, 201, 107, 0.5);
}
.climb-fallback { padding: 1.6rem 1.1rem clamp(2.6rem, 7vh, 4rem); max-width: 1180px; }
.climb-fallback[hidden] { display: none; }
@media (max-width: 700px) {
  .climb-inner { grid-template-columns: minmax(0, 1fr); }
  .climb-words { padding-right: 3rem; }
  .climb-word.s3 .cverb { font-size: clamp(3.2rem, 15vw, 7rem); }
  .climb-word.s4 .cverb { font-size: clamp(3.6rem, 17vw, 9rem); }
  .climb-bank { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); height: 9rem; gap: 0.5rem; }
  .climb-bank .cfader { width: 9px; }
  .climb-word .cdefn { max-width: 24rem; padding-right: 3.4rem; }
}

/* ---------- section scaffolding on the dark house ---------- */
.house-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.1rem; }
.house-section { padding: clamp(3rem, 8vh, 5.2rem) 0; }
.house-head { margin-bottom: 2rem; max-width: 46rem; }
.cue-label {
  font-family: var(--cue); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gel, var(--spot));
  display: block; margin-bottom: 0.65rem;
}
.house-head h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.12;
  letter-spacing: -0.01em;
}
.house-head p { margin-top: 0.8rem; color: var(--house-muted); max-width: 60ch; }

/* ---------- the season bill (component index) ---------- */
.bill { border-top: 1px solid var(--house-line); }
.bill-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 1.4rem; align-items: center;
  padding: 1.55rem 0.8rem;
  border-bottom: 1px solid var(--house-line);
  text-decoration: none; position: relative;
  transition: background 220ms ease;
}
.bill-row::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(460px 150px at var(--mx, 18%) var(--my, 50%), var(--gel-glow, rgba(243, 201, 107, 0.12)), transparent 70%);
  opacity: 0; transition: opacity 300ms ease;
}
.bill-row:hover::before, .bill-row:focus-visible::before { opacity: 1; }
.bill-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.08;
  color: var(--house-text); display: flex; align-items: center; gap: 0.85rem;
  transition: color 220ms ease;
}
.bill-row:hover .bill-title { color: var(--gel, var(--spot-hot)); }
.bill-title .geldot { width: 11px; height: 11px; box-shadow: 0 0 12px 2px var(--dot); }
.bill-sub {
  margin-top: 0.35rem; font-family: var(--cue); font-size: 0.75rem;
  letter-spacing: 0.06em; color: var(--house-muted);
}
.bill-desc { font-size: 0.94rem; color: var(--house-muted); line-height: 1.55; }

/* ---------- reference / library strips on home ---------- */
.refgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}
.refcard {
  border: 1px solid var(--house-line); border-radius: 4px;
  padding: 1.5rem 1.4rem 1.4rem; text-decoration: none;
  background: rgba(241, 233, 216, 0.025);
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform 220ms var(--ease-up), border-color 200ms ease, background 200ms ease;
}
.refcard:hover { transform: translateY(-3px); border-color: var(--house-muted); background: rgba(241, 233, 216, 0.05); }
.refcard h3 { font-family: var(--display); font-weight: 700; font-size: 1.22rem; color: var(--house-text); }
.refcard p { font-size: 0.92rem; color: var(--house-muted); }
.refcard .cue-label { margin-bottom: 0.1rem; }

.librow {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.libcard {
  text-decoration: none; border: 1px solid var(--house-line); border-radius: 4px;
  overflow: hidden; background: var(--house-deep);
  transition: transform 220ms var(--ease-up), border-color 200ms ease;
}
.libcard:hover { transform: translateY(-3px); border-color: var(--gel, var(--spot)); }
.libcard .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #f4f0e6; }
.libcard .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.libcard .meta { padding: 0.85rem 0.95rem 1rem; }
.libcard .meta .cue-label { margin-bottom: 0.3rem; font-size: 0.62rem; }
.libcard h3 { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.25; color: var(--house-text); }
.libcard p { margin-top: 0.3rem; font-size: 0.8rem; color: var(--house-muted); }

/* ---------- component page hero ---------- */
.hero-comp {
  position: relative; overflow: hidden;
  background: var(--house-deep); border-bottom: 1px solid var(--house-line);
}
.hero-comp .art { position: absolute; inset: 0; }
.hero-comp .art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--art-pos, 50% 35%); }
.hero-comp .art-dim img { filter: brightness(0.62) saturate(0.82); }
.hero-comp .art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(14, 10, 7, 0.95) 8%, rgba(14, 10, 7, 0.7) 44%, rgba(14, 10, 7, 0.3) 78%),
    linear-gradient(to top, var(--house) 2%, rgba(14, 10, 7, 0) 40%);
}
.hero-comp .hero-inner { padding: clamp(4.2rem, 11vh, 7rem) 1.1rem clamp(2.8rem, 7vh, 4.6rem); }
.hero-comp .hero-title { font-size: clamp(2.2rem, 5.6vw, 4.1rem); max-width: 15ch; }
.comp-meta {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1.4rem; margin-top: 1.15rem;
  font-family: var(--cue); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--house-muted);
}
.comp-meta strong { color: var(--gel, var(--spot)); font-weight: 700; }
.hero-comp .hero-lede { max-width: 38rem; }

/* ---------- section rail across the top ---------- */
.runlayout {
  max-width: 1180px; margin: 0 auto; padding: 0 1.1rem;
}
.runrail {
  position: sticky; top: var(--header-h, 100px); z-index: 100;
  margin: 0 -1.1rem; padding: 0.5rem 1.1rem;
  background: rgba(14, 10, 7, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--house-line);
}
.runrail-box { position: relative; }
.runrail-title { display: none; }
.runrail ol {
  list-style: none; display: flex; gap: 0.3rem; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0.1rem 0;
}
.runrail ol::-webkit-scrollbar { display: none; }
.runrail li { flex: none; }
.runrail a {
  display: block; text-decoration: none; white-space: nowrap;
  font-size: 0.83rem; color: var(--house-muted);
  padding: 0.4rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--house-line);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.runrail a:hover, .runrail a:focus-visible {
  color: var(--gel, var(--spot));
  border-color: var(--gel, var(--spot));
  background: var(--gel-glow, rgba(243, 201, 107, 0.1));
  box-shadow: 0 0 16px -3px var(--gel, var(--spot)), inset 0 0 12px -8px var(--gel, var(--spot));
}
.runrail a.live {
  color: var(--house-deep); background: var(--gel, var(--spot));
  border-color: var(--gel, var(--spot)); font-weight: 600;
  box-shadow: 0 0 18px -4px var(--gel, var(--spot));
}
.runrail a.live:hover { color: var(--house-deep); box-shadow: 0 0 22px -3px var(--gel, var(--spot)); }
.runrail-standby { display: none; }
.runmain { min-width: 0; padding-bottom: 3rem; }

/* ---------- worked-example header ---------- */
.wehead {
  margin: 2.6rem 0 2.2rem;
  border: 1px solid var(--house-line); border-radius: 5px;
  background:
    radial-gradient(640px 240px at 12% 0%, var(--gel-glow, rgba(243, 201, 107, 0.1)), transparent 70%),
    var(--house-deep);
  padding: 1.9rem 1.9rem 1.75rem;
}
.wehead .cue-label { color: var(--gel, var(--spot)); }
.wehead h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.55rem, 3.4vw, 2.3rem); line-height: 1.12; letter-spacing: -0.01em;
}
.wehead .we-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 0.85rem;
  font-family: var(--cue); font-size: 0.76rem; color: var(--house-muted); letter-spacing: 0.05em;
}
.wehead .we-meta strong { color: var(--spot); font-weight: 700; }
.wehead .we-summary { margin-top: 1rem; color: var(--house-text); max-width: 62ch; }

/* ---------- criterion block ---------- */
.crit { margin: 3.4rem 0; }
.crit-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.3rem; }
.crit-tag {
  font-family: var(--cue); font-weight: 700; font-size: 0.95rem;
  color: var(--house-deep); background: var(--gel, var(--spot));
  border-radius: 3px; padding: 0.28rem 0.6rem; letter-spacing: 0.04em;
  flex: none;
}
.crit-head h3 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.2;
}

.lens {
  border: 1px solid var(--house-line); border-left: none; border-radius: 4px;
  background: rgba(241, 233, 216, 0.035);
  padding: 1.05rem 1.3rem; margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
}
.lens::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--gel, var(--spot)); box-shadow: 0 0 14px 1.5px var(--gel, var(--spot));
}
.lens .lens-tag {
  font-family: var(--cue); font-size: 0.64rem; letter-spacing: 0.2em;
  color: var(--gel, var(--spot)); display: block; margin-bottom: 0.35rem;
}
.lens p { color: var(--house-text); font-size: 0.99rem; }

/* steps: the coach voice, numbered because it is a sequence */
.steps { list-style: none; counter-reset: step; max-width: 46rem; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: 0.85rem; padding: 0.62rem 0; }
.steps > li + li { border-top: 1px solid rgba(45, 37, 29, 0.85); }
.steps > li::before {
  content: counter(step);
  font-family: var(--cue); font-weight: 700; font-size: 0.82rem;
  color: var(--gel, var(--spot));
  width: 1.75rem; height: 1.75rem; border: 1px solid var(--house-line);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-top: 0.1rem;
}
.steps .do { color: var(--house-text); font-size: 0.97rem; }
.steps .do b, .steps .do strong { color: var(--spot-hot); font-weight: 600; }

/* ---------- evidence: script pages under the lamp ---------- */
.evid-stack { display: grid; gap: 1.1rem; margin: 1.7rem 0 0; }
.evid {
  background: var(--page); color: var(--ink);
  border-radius: 3px; padding: 1.35rem 1.5rem 1.25rem;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.85), 0 3px 9px -4px rgba(0, 0, 0, 0.5);
  position: relative; overflow: hidden;
}
.evid::after { /* the light sweep as the page is found */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 233, 189, 0.5) 48%, transparent 62%);
  transform: translateX(-130%);
}
@media (prefers-reduced-motion: no-preference) {
  .risen .evid::after { animation: sweep 1.2s ease-out 0.25s 1; }
}
@keyframes sweep { to { transform: translateX(130%); } }
.evid-head {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: baseline;
  margin-bottom: 0.7rem;
}
.evid-tag {
  font-family: var(--cue); font-weight: 700; font-size: 0.66rem;
  letter-spacing: 0.14em; color: var(--page);
  background: var(--ink); padding: 0.2rem 0.5rem; border-radius: 2px;
}
.evid-src { font-family: var(--cue); font-size: 0.74rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.evid blockquote { font-size: 0.99rem; line-height: 1.66; color: var(--ink); }
.evid blockquote i, .evid blockquote em { font-style: italic; }
.evid blockquote b, .evid blockquote strong { font-weight: 700; }

/* mark callout: why this earned the band */
.markcall {
  margin-top: 1.4rem; display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem; align-items: start;
  border: 1px solid var(--house-line); border-radius: 4px;
  background: var(--house-deep); padding: 1.05rem 1.25rem;
}
.markcall .band {
  font-family: var(--cue); font-weight: 700; font-size: 0.8rem;
  color: var(--spot-hot); white-space: nowrap;
  text-shadow: 0 0 16px rgba(243, 201, 107, 0.5);
  padding-top: 0.1rem;
}
.markcall .why { color: var(--house-muted); font-size: 0.94rem; }
.markcall .why b, .markcall .why strong { color: var(--house-text); font-weight: 600; }
.markcall .why em, .markcall .why i { font-style: italic; color: var(--house-text); }

/* ---------- hard rules (cliff edges) ---------- */
.hardrules {
  margin: 2.6rem 0; border: 1px solid rgba(239, 116, 96, 0.35); border-radius: 5px;
  background:
    radial-gradient(620px 210px at 8% 0%, rgba(213, 72, 58, 0.14), transparent 70%),
    var(--house-deep);
  padding: 1.8rem 1.9rem 1.4rem;
}
.hardrules > .cue-label { color: var(--gel-red); }
.hardrules h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); }
.hardrules .hr-sub { color: var(--house-muted); margin-top: 0.55rem; max-width: 60ch; }
.hardrules ol { list-style: none; margin-top: 1.4rem; }
.hardrules li {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.9rem;
  padding: 1.05rem 0; border-top: 1px solid rgba(239, 116, 96, 0.18);
}
.hardrules li .n {
  font-family: var(--cue); font-weight: 700; color: var(--gel-red); font-size: 0.9rem;
}
.hardrules li h3 { font-size: 1.03rem; font-weight: 700; color: var(--house-text); line-height: 1.35; }
.hardrules li p { margin-top: 0.4rem; font-size: 0.92rem; color: var(--house-muted); }

/* ---------- the paper sheet (structure guides, long reading) ---------- */
.sheet {
  background: var(--page); color: var(--ink); border-radius: 4px;
  box-shadow: 0 22px 50px -24px rgba(0, 0, 0, 0.9), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  padding: clamp(1.6rem, 4vw, 2.9rem);
  margin: 2.4rem 0;
}
.sheet > .cue-label { color: var(--gel-deep, var(--gel-gold-deep)); }
.sheet h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.12; letter-spacing: -0.01em;
  color: var(--ink);
}
.sheet .sheet-intro { margin-top: 0.9rem; color: var(--ink-soft); max-width: 65ch; font-size: 1.02rem; }
.sheet h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.42rem;
  margin: 2.6rem 0 0.7rem; color: var(--ink); line-height: 1.2;
}
.sheet h4 { font-weight: 700; font-size: 1.02rem; margin: 1.6rem 0 0.5rem; }
.sheet p { max-width: 70ch; }
.sheet p + p { margin-top: 0.8rem; }
.sheet em { font-style: italic; }

.strand { border-top: 1px solid var(--page-shade); margin-top: 2.5rem; padding-top: 2.1rem; }
.strand-head { display: flex; align-items: baseline; gap: 0.8rem; }
.strand-tag {
  font-family: var(--cue); font-weight: 700; font-size: 0.85rem;
  color: var(--page); background: var(--gel-deep, var(--gel-gold-deep));
  border-radius: 3px; padding: 0.22rem 0.55rem; flex: none;
}
.strand-head h4 { margin: 0; font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.strand-q {
  margin: 1rem 0 0; font-style: italic; font-family: var(--display);
  font-weight: 700; font-size: 1.06rem; color: var(--gel-deep, var(--gel-gold-deep));
  max-width: 62ch; line-height: 1.5;
}
.strand-simple { margin-top: 0.7rem; color: var(--ink-soft); max-width: 65ch; }

.sheet .part-label {
  font-family: var(--cue); font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-soft);
  margin: 1.9rem 0 0.75rem; display: block;
}

.isnot { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--page-shade); border: 1px solid var(--page-shade); border-radius: 4px; overflow: hidden; }
.isnot > div { background: var(--page); padding: 1rem 1.15rem; }
.isnot .is-head { font-family: var(--cue); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; margin-bottom: 0.55rem; }
.isnot .yes .is-head { color: #2c5430; }
.isnot .no .is-head { color: var(--gel-red-deep); }
.isnot ul { list-style: none; }
.isnot li { padding: 0.32rem 0; font-size: 0.92rem; border-top: 1px solid var(--page-shade); }
.isnot li:first-child { border-top: none; }

.framework { border: 1px solid var(--page-shade); border-radius: 4px; padding: 1.15rem 1.3rem; background: rgba(238, 231, 218, 0.4); }
.framework .fw-title { font-weight: 700; font-size: 1rem; }
.framework .fw-body { margin-top: 0.5rem; font-size: 0.94rem; color: var(--ink-soft); }
.framework .fw-template {
  margin-top: 0.8rem; font-family: var(--cue); font-size: 0.88rem;
  background: var(--page); border: 1px dashed #c9bfa9; border-radius: 3px;
  padding: 0.8rem 1rem; color: var(--ink);
}
.framework .fw-note { margin-top: 0.7rem; font-size: 0.86rem; font-style: italic; color: var(--ink-soft); }
.fw-flow { margin-top: 0.9rem; display: grid; gap: 0.45rem; }
.fw-flow > div {
  font-size: 0.92rem; padding: 0.55rem 0.85rem; background: var(--page);
  border: 1px solid var(--page-shade); border-radius: 3px; position: relative;
}
.fw-pairs { margin-top: 0.9rem; display: grid; gap: 0.5rem; }
.fw-pairs > div { display: grid; grid-template-columns: minmax(6rem, auto) minmax(0, 1fr); gap: 0.9rem; font-size: 0.92rem; padding: 0.5rem 0; border-top: 1px solid var(--page-shade); }
.fw-pairs > div:first-child { border-top: none; }
.fw-pairs .k { font-weight: 700; color: var(--gel-deep, var(--gel-gold-deep)); }

.sheet .steps { max-width: none; }
.sheet .steps > li + li { border-top: 1px solid var(--page-shade); }
.sheet .steps > li::before { border-color: #d8cfba; color: var(--gel-deep, var(--gel-gold-deep)); }
.sheet .steps .t { font-weight: 700; color: var(--ink); }
.sheet .steps .do { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.15rem; }

.sheet-exemplar {
  border: 1px solid #d8cfba; border-radius: 4px; padding: 1.2rem 1.35rem;
  background: var(--page); position: relative;
  box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.35);
}
.sheet-exemplar .ex-label { font-family: var(--cue); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.14em; color: var(--gel-deep, var(--gel-gold-deep)); }
.sheet-exemplar blockquote { margin-top: 0.7rem; font-size: 0.97rem; line-height: 1.68; }
.sheet-exemplar .whyworks { margin-top: 0.95rem; }
.sheet-exemplar .whyworks .k { font-family: var(--cue); font-size: 0.66rem; letter-spacing: 0.16em; color: var(--ink-soft); }
.sheet-exemplar ul { list-style: none; margin-top: 0.45rem; }
.sheet-exemplar ul li { padding: 0.3rem 0 0.3rem 1.2rem; position: relative; font-size: 0.91rem; border-top: 1px solid var(--page-shade); }
.sheet-exemplar ul li::before { content: "→"; position: absolute; left: 0; color: var(--gel-deep, var(--gel-gold-deep)); font-size: 0.8rem; }

.starters { list-style: none; display: grid; gap: 0.45rem; }
.starters li {
  font-style: italic; font-size: 0.95rem; padding: 0.6rem 0.9rem;
  background: rgba(238, 231, 218, 0.55); border-radius: 3px;
}

/* ---------- the intensity ladder (mark bands as faders) ---------- */
.fader { display: grid; gap: 0.45rem; margin-top: 0.4rem; }
.fader-row {
  display: grid; grid-template-columns: 3.4rem 6.4rem minmax(0, 1fr);
  gap: 0.9rem; align-items: center;
  padding: 0.55rem 0.7rem; border-radius: 3px;
}
.fader-row .fband { font-family: var(--cue); font-weight: 700; font-size: 0.8rem; }
.fader-row .fverb { font-family: var(--display); font-weight: 700; font-size: 0.98rem; }
.fader-row .fdesc { font-size: 0.9rem; }
.fader-bar { grid-column: 1 / -1; height: 5px; border-radius: 2px; background: rgba(0, 0, 0, 0.14); overflow: hidden; margin-top: 0.25rem; }
.fader-bar span {
  display: block; height: 100%; width: var(--w, 25%);
  background: var(--fc, var(--spot)); border-radius: 2px;
  transform-origin: left; transform: scaleX(0);
  transition: transform 900ms var(--ease-up);
}
.risen .fader-bar span, .fader.lit .fader-bar span { transform: scaleX(1); }
.fader-row.t1 span { transition-delay: 0.05s; } .fader-row.t2 span { transition-delay: 0.2s; }
.fader-row.t3 span { transition-delay: 0.35s; } .fader-row.t4 span { transition-delay: 0.5s; }
/* on paper */
.sheet .fader-row { border: 1px solid var(--page-shade); background: var(--page); }
.sheet .fader-row.t1 { --fc: #b3a488; color: var(--ink-soft); }
.sheet .fader-row.t2 { --fc: #a08a55; color: var(--ink-soft); }
.sheet .fader-row.t3 { --fc: #8a6f2a; color: var(--ink); }
.sheet .fader-row.t4 { --fc: var(--gel-gold-deep); color: var(--ink); background: #fdf9ef; box-shadow: inset 0 0 0 1px #e3d5ae; }
.sheet .fader-row.t4 .fverb::after { content: " ★"; color: var(--gel-gold-deep); }
/* on house */
.house-fader .fader-row { border: 1px solid var(--house-line); background: var(--house-deep); }
.house-fader .fader-row .fdesc { color: var(--house-muted); }
.house-fader .fader-row.t1 { --fc: #55493a; }
.house-fader .fader-row.t2 { --fc: #7d6b4b; }
.house-fader .fader-row.t3 { --fc: #baa060; }
.house-fader .fader-row.t4 { --fc: var(--spot); box-shadow: inset 0 0 0 1px rgba(243, 201, 107, 0.35); }
.house-fader .fader-row.t4 .fverb { color: var(--spot-hot); text-shadow: 0 0 14px rgba(243, 201, 107, 0.5); }

/* ---------- checklist: prompt-desk checks ---------- */
.checks { border: 1px solid var(--page-shade); border-radius: 4px; overflow: hidden; }
.checks-head {
  display: flex; justify-content: space-between; align-items: baseline;
  background: rgba(238, 231, 218, 0.6); padding: 0.75rem 1.1rem;
  font-family: var(--cue); font-size: 0.74rem; letter-spacing: 0.12em;
}
.checks-head .count { color: var(--ink-soft); }
.checks label {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.8rem;
  padding: 0.72rem 1.1rem; border-top: 1px solid var(--page-shade);
  font-size: 0.94rem; cursor: pointer; align-items: start;
}
.checks label:hover { background: rgba(238, 231, 218, 0.35); }
.checks input {
  width: 1.15rem; height: 1.15rem; margin-top: 0.16rem;
  accent-color: var(--gel-deep, var(--gel-gold-deep)); cursor: pointer;
}
.checks input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(86, 78, 62, 0.5); }

/* ---------- exemplar link band on component pages ---------- */
.exband { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.exband .libcard { background: var(--house-deep); }

/* ---------- next steps footer band on component pages ---------- */
.nextband { border-top: 1px solid var(--house-line); margin-top: 3rem; padding-top: 1.9rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- exemplar reader ---------- */
.reader-head {
  background: var(--house-deep); border-bottom: 1px solid var(--house-line);
  padding: 3.2rem 0 2.2rem;
}
.reader-head .cue-label { color: var(--gel, var(--spot)); }
.reader-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.012em;
  max-width: 20ch;
}
.reader-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 0.95rem;
  font-family: var(--cue); font-size: 0.76rem; color: var(--house-muted); letter-spacing: 0.05em;
}
.reader-meta strong { color: var(--spot); font-weight: 700; }
.reader-note { margin-top: 1rem; color: var(--house-muted); max-width: 62ch; }
.reader-note em { color: var(--house-text); font-style: italic; }

.reader-body { display: block; }
.reader-pages { display: grid; gap: 1.6rem; padding: 2.2rem 0 3.4rem; min-width: 0; }
.reader-page { margin: 0; }
.reader-page a { display: block; }
.reader-page img {
  width: 100%; border-radius: 3px; background: #fff;
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.9), 0 4px 12px -6px rgba(0, 0, 0, 0.5);
}
.reader-page figcaption {
  font-family: var(--cue); font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--house-muted); margin-top: 0.55rem; text-transform: uppercase;
}
.reader-page.wide img { box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.9); }

/* Wilson text reader */
.reader-text { padding: 2.2rem 0 3.4rem; min-width: 0; }
.reader-text .sheet { margin: 0; }
.reader-text .sheet h3 { margin-top: 2.2rem; }
.reader-text .sheet h3:first-of-type { margin-top: 0; }
.reader-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: 1rem; }
.reader-figs figure { margin: 0; }
.reader-figs img { border-radius: 3px; border: 1px solid var(--page-shade); }
.reader-figs figcaption { font-family: var(--cue); font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* ---------- criteria reference page ---------- */
.crit-comp { margin: 3rem 0; }
.crit-comp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.4rem; margin-bottom: 0.4rem; }
.crit-comp-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.55rem, 3.2vw, 2.1rem); }
.crit-comp-head .sub { font-family: var(--cue); font-size: 0.76rem; color: var(--house-muted); letter-spacing: 0.06em; }
.crit-comp-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem; color: var(--house-muted); font-size: 0.88rem; margin-bottom: 1.4rem; }
.crit-comp-meta strong { color: var(--house-text); font-weight: 600; }
.critblock { border: 1px solid var(--house-line); border-radius: 5px; background: var(--house-deep); padding: 1.5rem 1.6rem 1.3rem; margin-top: 1.1rem; }
.critblock-head { display: flex; gap: 0.95rem; align-items: baseline; }
.critblock-head .crit-tag { font-size: 1.02rem; padding: 0.3rem 0.68rem; }
.critblock-head h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
.critblock-head .marks { margin-left: auto; font-family: var(--cue); font-size: 0.74rem; color: var(--house-muted); white-space: nowrap; }
.prompts { margin-top: 1.1rem; display: grid; gap: 0.6rem; }
.prompt { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.7rem; font-size: 0.94rem; color: var(--house-text); }
.prompt .ptag { font-family: var(--cue); font-weight: 700; font-size: 0.78rem; color: var(--gel, var(--spot)); padding-top: 0.14rem; }
.critblock .warn {
  margin-top: 1rem; border: 1px solid rgba(239, 116, 96, 0.4); border-radius: 3px;
  color: var(--gel-red); font-size: 0.9rem; padding: 0.7rem 0.95rem;
  background: rgba(213, 72, 58, 0.07);
}
.critblock .fader { margin-top: 1.3rem; }

/* ---------- lighting desk ---------- */
.lightdesk {
  border: 1px solid var(--house-line); border-radius: 6px;
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(243, 201, 107, 0.06), transparent 70%),
    var(--house-deep);
  padding: clamp(1.4rem, 3.5vw, 2.3rem); margin: 2.4rem 0;
}
.ld-stage {
  position: relative; height: 15rem;
  background: #0b0908;
  border: 1px solid #292219;
  overflow: hidden;
  margin: 1rem 0 1.3rem;
}
.ld-fixture {
  position: absolute; top: 0; left: 50%;
  width: 2.4rem; height: 1rem; transform: translateX(-50%);
  background: #060504; border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 14px 3px var(--ld-c, #f2952e);
  opacity: calc(var(--ld-a, 0.5) + 0.15);
  transition: box-shadow 0.35s ease, opacity 0.35s ease;
}
.ld-cone {
  position: absolute; top: 0.8rem; bottom: 0; left: 50%;
  width: 82%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--ld-c, #f2952e), transparent 92%);
  opacity: var(--ld-a, 0.5);
  clip-path: polygon(46% 0%, 54% 0%, 96% 100%, 4% 100%);
  filter: blur(10px);
  transition: background 0.35s ease, opacity 0.35s ease;
}
.ld-pool {
  position: absolute; bottom: -2.6rem; left: 50%;
  width: 78%; height: 5.5rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, var(--ld-c, #f2952e), transparent 72%);
  opacity: calc(var(--ld-a, 0.5) * 0.8);
  filter: blur(6px);
  transition: background 0.35s ease, opacity 0.35s ease;
}
.ld-light {
  /* --lit and --lit-soft are set from JS as rgba() so this works on older
     iOS Safari, which has no color-mix support. */
  --lit: rgba(242, 149, 46, 0.4);
  --lit-soft: rgba(242, 149, 46, 0.18);
}
.ld-figure {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  height: 12.4rem; aspect-ratio: 182 / 560;
  -webkit-mask-image: url('../img/figure.png');
  mask-image: url('../img/figure.png');
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: bottom center; mask-position: bottom center;
  background: #14100b;
  transition: background 0.35s ease, filter 0.35s ease;
}
.ld-light[data-dir="flat"] .ld-figure { background: linear-gradient(var(--lit-soft), var(--lit-soft)) #14100b; }
.ld-light[data-dir="f45"] .ld-figure { background: linear-gradient(133deg, var(--lit) 4%, transparent 62%) #14100b; }
.ld-light[data-dir="f4545"] .ld-figure { background: linear-gradient(133deg, var(--lit-soft) 8%, transparent 58%), linear-gradient(227deg, var(--lit-soft) 8%, transparent 58%) #14100b; }
.ld-light[data-dir="side"] .ld-figure { background: linear-gradient(90deg, var(--lit) 4%, var(--lit-soft) 32%, transparent 58%) #14100b; }
.ld-light[data-dir="top"] .ld-figure { background: linear-gradient(180deg, var(--lit) 0%, var(--lit-soft) 26%, transparent 55%) #14100b; }
.ld-light[data-dir="up"] .ld-figure { background: linear-gradient(0deg, var(--lit) 0%, var(--lit-soft) 34%, transparent 62%) #14100b; }
.ld-light[data-dir="back"] .ld-figure {
  background: #090705;
  filter: drop-shadow(0 -2px 9px var(--lit)) drop-shadow(0 0 3px var(--lit-soft));
}
.ld-cone2, .ld-fixture2 { display: none; }
.ld-light[data-dir="f45"] .ld-cone { left: 40%; transform: translateX(-50%) rotate(-13deg); }
.ld-light[data-dir="f45"] .ld-fixture { left: 40%; }
.ld-light[data-dir="f4545"] .ld-cone { display: inline-block; left: 36%; width: 58%; transform: translateX(-50%) rotate(-15deg); opacity: 0.85; }
.ld-light[data-dir="f4545"] .ld-cone2 { display: inline-block; left: 64%; transform: translateX(-50%) rotate(15deg); }
.ld-light[data-dir="f4545"] .ld-fixture { left: 36%; }
.ld-light[data-dir="f4545"] .ld-fixture2 { display: inline-block; left: 64%; }
.ld-light[data-dir="side"] .ld-cone {
  top: 14%; bottom: auto; left: 0; width: 76%; height: 58%;
  transform: none;
  background: linear-gradient(to right, var(--lit), transparent 92%);
  opacity: 1;
  clip-path: polygon(0% 44%, 0% 56%, 100% 100%, 100% 0%);
}
.ld-light[data-dir="side"] .ld-fixture {
  top: 36%; left: 0.4rem; width: 1rem; height: 2.2rem; transform: none;
  border-radius: 0 4px 4px 0;
}
.ld-light[data-dir="side"] .ld-pool { left: 38%; }
.ld-light[data-dir="back"] .ld-cone { opacity: calc(var(--ld-a, 0.5) * 0.55); width: 92%; }
.ld-light[data-dir="back"] .ld-pool { opacity: calc(var(--ld-a, 0.5) * 0.45); }
.ld-light[data-dir="up"] .ld-cone {
  top: auto; bottom: 0.7rem;
  background: linear-gradient(to top, var(--lit), transparent 88%);
  clip-path: polygon(46% 100%, 54% 100%, 96% 0%, 4% 0%);
}
.ld-light[data-dir="up"] .ld-fixture {
  top: auto; bottom: 0; border-radius: 5px 5px 0 0;
  box-shadow: 0 -2px 20px 5px var(--ld-c, #f2952e);
}
.ld-light[data-dir="up"] .ld-pool { bottom: -3.4rem; }
.ld-controls { display: grid; gap: 1.3rem; }
.ld-controls fieldset { border: none; }
.ld-controls legend {
  font-family: var(--cue); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--house-muted); margin-bottom: 0.6rem;
}
.ld-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ld-chip { position: relative; }
.ld-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ld-chip span {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.85rem; color: var(--house-muted);
  border: 1px solid var(--house-line); border-radius: 999px;
  padding: 0.42rem 0.9rem;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.ld-chip span::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--chip-c, transparent);
  box-shadow: 0 0 8px 1px var(--chip-c, transparent);
}
.ld-chip.plain span::before { display: none; }
.ld-chip:hover span { color: var(--house-text); border-color: var(--house-muted); }
.ld-chip input:checked + span {
  color: var(--house-text); border-color: var(--spot);
  background: rgba(243, 201, 107, 0.08);
}
.ld-chip input:focus-visible + span { outline: 2px solid var(--spot); outline-offset: 2px; }
.ld-intensity { max-width: 26rem; }
.ld-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--cue); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--house-muted); margin-bottom: 0.55rem;
}
.ld-label output { color: var(--spot); font-weight: 700; font-size: 0.85rem; }
input[type="range"]#ld-range {
  width: 100%; accent-color: var(--spot); height: 1.4rem; cursor: pointer;
}
.ld-read {
  margin-top: 1.3rem; border-top: 1px solid var(--house-line); padding-top: 1.1rem;
  color: var(--house-text); font-size: 0.97rem; max-width: 62ch; min-height: 3.2em;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--house-line); background: var(--house-deep);
  margin-top: 3rem;
}
.foot-inner {
  max-width: 1180px; margin: 0 auto; padding: 2.6rem 1.1rem 2.9rem;
  display: flex; flex-wrap: wrap; gap: 2rem 4rem; align-items: start;
}
.foot .fbrand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.foot .fbrand small { display: block; font-family: var(--cue); font-weight: 400; font-size: 0.64rem; letter-spacing: 0.16em; color: var(--house-muted); margin-top: 0.3rem; text-transform: uppercase; }
.foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 0.3rem 2.4rem; }
.foot nav a { text-decoration: none; font-size: 0.88rem; color: var(--house-muted); padding: 0.55rem 0; display: flex; align-items: center; min-height: 44px; }
.foot nav a:hover { color: var(--house-text); }
.foot .fnote { font-size: 0.8rem; color: var(--house-muted); max-width: 30rem; margin-left: auto; }

/* ---------- scroll reveals ---------- */
.rise { opacity: 0; transform: translateY(26px); transition: opacity 750ms ease, transform 750ms var(--ease-up); }
.rise.risen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .fader-bar span { transform: scaleX(1); transition: none; }
  .evid::after { display: none; }
  .hero-house .art, .hero-comp .art, .hero-call, .hero-title, .hero-lede, .hero-actions, .comp-meta { animation: none; opacity: 1; transform: none; }
  .btn, .refcard, .libcard { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .runrail { top: 0; }
  .runrail a { font-size: 0.8rem; padding: 0.66rem 0.85rem; min-height: 44px; display: flex; align-items: center; }
  [id] { scroll-margin-top: 4rem; }
  .bill-row { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 1.35rem 0.4rem; }
}
@media (max-width: 700px) {
  .topbar-inner { gap: 0.7rem; }
  .brand .sub { display: none; }
  .hero-house .art img { object-position: 34% 30%; }
  .isnot { grid-template-columns: 1fr; }
  .fader-row { grid-template-columns: 2.9rem 5.2rem minmax(0, 1fr); gap: 0.6rem; }
  .markcall { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .foot nav { grid-template-columns: 1fr; }
  .foot .fnote { margin-left: 0; }
  .crit-head { flex-direction: column; gap: 0.55rem; align-items: flex-start; }
  .critblock-head { flex-wrap: wrap; }
  .critblock-head .marks { margin-left: 0; width: 100%; }
}


/* ---------- multi-channel desk ---------- */
.ld-light { position: absolute; inset: 0; pointer-events: none; }
.ld-light[hidden] { display: none; }
.ld-channels { display: grid; gap: 0.4rem; }
.ld-ch {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) minmax(9rem, 13rem) 3.2rem;
  gap: 0.9rem; align-items: center;
  border: 1px solid var(--house-line); border-radius: 4px;
  padding: 0.55rem 0.9rem; transition: border-color 200ms ease, background 200ms ease;
}
.ld-ch.live { border-color: rgba(243, 201, 107, 0.45); background: rgba(243, 201, 107, 0.045); }
.ld-ch-on { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.9rem; color: var(--house-muted); }
.ld-ch.live .ld-ch-on { color: var(--house-text); }
.ld-ch-on input { width: 1.05rem; height: 1.05rem; accent-color: var(--spot); cursor: pointer; flex: none; }
.ld-swatches { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ld-swatch { position: relative; }
.ld-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ld-swatch span {
  display: block; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--chip-c); border: 2px solid transparent;
  opacity: 0.55; transition: opacity 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.ld-swatch:hover span { opacity: 0.85; }
.ld-swatch input:checked + span {
  opacity: 1; border-color: var(--house-text);
  box-shadow: 0 0 9px 1px var(--chip-c);
}
.ld-swatch input:focus-visible + span { outline: 2px solid var(--spot); outline-offset: 2px; }
.ld-ch-int { display: flex; align-items: center; }
.ld-ch-int input[type="range"] { width: 100%; accent-color: var(--spot); cursor: pointer; height: 1.2rem; }
.ld-ch output {
  font-family: var(--cue); font-weight: 700; font-size: 0.78rem;
  color: var(--house-muted); text-align: right;
}
.ld-ch.live output { color: var(--spot); }
.ld-read strong { color: var(--spot-hot); font-weight: 600; }
@media (max-width: 800px) {
  .ld-ch { grid-template-columns: minmax(0, 1fr) 3.2rem; row-gap: 0.5rem; }
  .ld-ch-on { grid-row: 1; grid-column: 1; }
  .ld-ch output { grid-row: 1; grid-column: 2; }
  .ld-swatches { grid-column: 1 / -1; }
  .ld-ch-int { grid-column: 1 / -1; }
}

/* ---------- second side light, from stage right ---------- */
.ld-light[data-dir="sider"] .ld-cone {
  top: 14%; bottom: auto; left: auto; right: 0; width: 76%; height: 58%;
  transform: none;
  background: linear-gradient(to left, var(--lit), transparent 92%);
  opacity: 1;
  clip-path: polygon(100% 44%, 100% 56%, 0% 100%, 0% 0%);
}
.ld-light[data-dir="sider"] .ld-fixture {
  top: 36%; left: auto; right: 0.4rem; width: 1rem; height: 2.2rem; transform: none;
  border-radius: 4px 0 0 4px;
}
.ld-light[data-dir="sider"] .ld-pool { left: 62%; }

/* ---------- desk beam retune: the light lands on the performer ---------- */
.ld-light[data-dir="f45"] .ld-cone {
  left: 0; width: 100%; transform: none;
  clip-path: polygon(38% 0%, 44% 0%, 62% 100%, 34% 100%);
}
.ld-light[data-dir="f45"] .ld-fixture { left: 41%; }
.ld-light[data-dir="f45"] .ld-pool { left: 50%; }
.ld-light[data-dir="f4545"] .ld-cone {
  display: inline-block; left: 0; width: 100%; transform: none; opacity: 0.85;
  clip-path: polygon(30% 0%, 36% 0%, 62% 100%, 34% 100%);
}
.ld-light[data-dir="f4545"] .ld-cone2 {
  display: inline-block; left: 0; width: 100%; transform: none; opacity: 0.85;
  clip-path: polygon(64% 0%, 70% 0%, 66% 100%, 38% 100%);
}
.ld-light[data-dir="f4545"] .ld-fixture { left: 33%; }
.ld-light[data-dir="f4545"] .ld-fixture2 { left: 67%; }

/* ---------- responsive round 2 ---------- */
@media (max-width: 980px) {
  .topbar { position: static; }
  .topbar-inner { flex-wrap: wrap; padding-top: 0.55rem; padding-bottom: 0.35rem; }
  .topnav { flex-wrap: wrap; margin-left: 0; width: 100%; gap: 0; justify-content: flex-start; }
  .topnav a { font-size: 0.84rem; padding: 0.62rem 0.6rem; margin-left: -0.6rem; min-height: 44px; display: flex; align-items: center; }
  .compnav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compnav a:nth-child(3), .compnav a:nth-child(4) { border-top: 1px solid var(--house-line); }
  .compnav a:nth-child(odd) { border-left: none; }
  .cn-name { font-size: 0.88rem; }

}
@media (max-width: 700px) {
  .fader-row { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; padding: 0.7rem 0.8rem; }
  .fader-row .fband { display: inline; }
  .fader-row .fverb { display: inline; margin-left: 0.55rem; }
  .fader-row .fdesc { margin-top: 0.15rem; }
  .critblock-head .marks { white-space: normal; }
  .hardrules li { grid-template-columns: 1.4rem minmax(0, 1fr); gap: 0.6rem; }
  .hardrules { padding: 1.4rem 1.2rem 1rem; }
  .ld-stage { position: sticky; top: 0.5rem; z-index: 5; height: 12rem;
              box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.85); }
}


/* ---------- stagecraft & vocabulary pages ---------- */
.defs { display: grid; gap: 0; }
.defs > div {
  display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
  gap: 1.2rem; padding: 0.72rem 0; border-top: 1px solid var(--page-shade);
}
.defs > div:first-child { border-top: none; }
.defs dt { font-weight: 700; color: var(--gel-deep, var(--gel-gold-deep)); }
.defs dd { color: var(--ink); font-size: 0.95rem; }
.defs .band-tag {
  display: block; margin-top: 0.3rem; font-family: var(--cue);
  font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-soft);
}
.shiftgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--page-shade); border: 1px solid var(--page-shade); border-radius: 4px; overflow: hidden; }
.shiftgrid > div { background: var(--page); padding: 1rem 1.1rem; }
.shiftgrid h4 { margin: 0 0 0.4rem; font-family: var(--display); font-size: 1.02rem; }
.shiftgrid p { font-size: 0.9rem; color: var(--ink-soft); }
.lanterns { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.lantern { border: 1px solid var(--page-shade); border-radius: 4px; padding: 1rem 1.1rem; background: rgba(238, 231, 218, 0.35); }
.lantern h4 { margin: 0 0 0.55rem; font-family: var(--display); font-size: 1.05rem; }
.lantern img { border-radius: 3px; margin-bottom: 0.6rem; width: 100%; height: auto; }
.lantern p { font-size: 0.88rem; color: var(--ink-soft); }
.sheet ul.plain { max-width: 70ch; padding-left: 1.2rem; }
.sheet ul.plain li { padding: 0.3rem 0; }
.callout {
  border: 1px solid #d8cfba; border-radius: 4px; background: var(--page);
  padding: 1.1rem 1.25rem; margin: 1.4rem 0;
  box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.3);
}
.callout .co-tag { font-family: var(--cue); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.14em; color: var(--gel-deep, var(--gel-gold-deep)); text-transform: uppercase; display: block; margin-bottom: 0.45rem; }
.callout p { font-size: 0.95rem; }
.drafts { display: grid; gap: 1rem; margin-top: 1.2rem; }
.draft { border: 1px solid var(--page-shade); border-radius: 4px; padding: 1.1rem 1.25rem; background: var(--page); }
.draft .draft-band { display: flex; justify-content: space-between; font-family: var(--cue); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.55rem; }
.draft .draft-verb { font-weight: 700; }
.draft blockquote { font-size: 0.96rem; line-height: 1.62; }
.draft .draft-note { margin-top: 0.55rem; font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }
.draft.d-top { background: #fdf9ef; box-shadow: inset 0 0 0 1px #e3d5ae; }
.draft.d-top .draft-band { color: var(--gel-gold-deep); }
@media (max-width: 700px) {
  .defs > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* hard rules panel inside a paper sheet keeps house colours */
.sheet .hardrules h2, .sheet .hardrules h3 { color: var(--house-text); }
.sheet .hardrules p { color: var(--house-muted); }
.sheet .hardrules p strong { color: var(--gel-red); }

.defs dt .mnem {
  color: var(--gel-rose-deep); font-weight: 800;
}


/* ---------- grade calculator ---------- */
.gradecalc {
  border: 1px solid var(--house-line); border-radius: 6px;
  background:
    radial-gradient(900px 320px at 50% 0%, rgba(243, 201, 107, 0.07), transparent 72%),
    linear-gradient(180deg, #1b1510, var(--house-deep));
  padding: clamp(1.4rem, 3.5vw, 2.3rem); margin: 2.2rem 0;
}
/* level switch */
.gc-levels { display: inline-flex; gap: 0.3rem; padding: 0.25rem; margin-bottom: 1.4rem;
  border: 1px solid var(--house-line); border-radius: 999px; background: rgba(0,0,0,0.3); }
.gc-level {
  border: none; background: none; color: var(--house-muted);
  font-family: var(--body); font-size: 0.88rem; font-weight: 600;
  padding: 0.62rem 1.1rem; min-height: 44px; border-radius: 999px;
  transition: background 180ms ease, color 180ms ease;
}
.gc-level:hover { color: var(--house-text); }
.gc-level.is-on { background: var(--spot); color: var(--house-deep); }

/* the readout */
.gc-result {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 2.6rem);
  align-items: center; padding: 1.3rem 1.4rem; margin-bottom: 1.5rem;
  border-radius: 6px; background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--house-line);
}
.gc-big { text-align: center; }
.gc-biggrade {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(4rem, 10vw, 6.2rem); line-height: 1; letter-spacing: -0.03em;
  transition: color 300ms ease, text-shadow 300ms ease;
}
/* grade ramp: cool and dim through to hot gold */
.gc-biggrade[data-g="1"] { color: #5f7fb5; text-shadow: 0 0 22px rgba(95, 127, 181, 0.35); }
.gc-biggrade[data-g="2"] { color: #7d86c6; text-shadow: 0 0 22px rgba(125, 134, 198, 0.35); }
.gc-biggrade[data-g="3"] { color: #b57bb0; text-shadow: 0 0 24px rgba(181, 123, 176, 0.35); }
.gc-biggrade[data-g="4"] { color: #e08bab; text-shadow: 0 0 26px rgba(224, 139, 171, 0.4); }
.gc-biggrade[data-g="5"] { color: #f0a35f; text-shadow: 0 0 28px rgba(240, 163, 95, 0.45); }
.gc-biggrade[data-g="6"] { color: #f3c96b; text-shadow: 0 0 32px rgba(243, 201, 107, 0.5); }
.gc-biggrade[data-g="7"] { color: #ffe9bd; text-shadow: 0 0 40px rgba(255, 233, 189, 0.75), 0 0 90px rgba(243, 201, 107, 0.4); }
.gc-biglabel {
  display: block; margin-top: 0.4rem; font-family: var(--cue);
  font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--house-muted);
}
.gc-pct { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--house-text); }
.gc-pct small {
  font-family: var(--cue); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--house-muted); margin-left: 0.55rem;
}
.gc-scale {
  position: relative; height: 14px; border-radius: 4px; margin: 0.6rem 0 0.55rem;
  background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.gc-scale-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #5f7fb5 0%, #b57bb0 28%, #e08bab 45%, #f0a35f 65%, #f3c96b 82%, #ffe9bd 100%);
  background-size: 100vw 100%;
  transition: width 340ms var(--ease-up);
  box-shadow: 0 0 18px rgba(243, 201, 107, 0.3);
}
.gc-scale-marks { position: absolute; inset: 0; }
.gc-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(14, 10, 7, 0.85); }
.gc-next { font-size: 0.92rem; color: var(--house-muted); }

/* component rows, each in its own gel */
.gc-rows { display: grid; gap: 0.55rem; }
.gc-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
  gap: 1.1rem; align-items: center;
  border: 1px solid var(--house-line); border-left: 3px solid var(--gel, var(--spot));
  border-radius: 4px; padding: 0.78rem 1rem;
  background: linear-gradient(90deg, var(--gel-glow, transparent), transparent 45%);
  transition: border-color 200ms ease;
}
.gc-head label { display: block; font-weight: 600; color: var(--house-text); font-size: 0.98rem; }
.gc-weight { font-family: var(--cue); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--gel, var(--house-muted)); }
.gc-control { display: flex; align-items: center; gap: 0.8rem; }
.gc-control input[type="range"] { flex: 1; accent-color: var(--gel, var(--spot)); cursor: pointer; height: 1.4rem; }
.gc-control input[type="number"] {
  width: 4.2rem; background: rgba(0,0,0,0.35); color: var(--house-text);
  border: 1px solid var(--house-line); border-radius: 3px; padding: 0.4rem 0.5rem;
  font-family: var(--cue); font-size: 0.95rem; text-align: center;
}
.gc-control input[type="number"]:focus { border-color: var(--gel, var(--spot)); outline: none; }
.gc-out { display: flex; align-items: center; gap: 0.7rem; justify-self: end; }
.gc-grade {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem;
  width: 2.3rem; height: 2.3rem; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--house-deep); background: var(--gel, var(--spot));
  transition: opacity 200ms ease;
}
.gc-grade[data-g="1"], .gc-grade[data-g="2"] { opacity: 0.35; }
.gc-grade[data-g="3"] { opacity: 0.5; }
.gc-grade[data-g="4"] { opacity: 0.68; }
.gc-grade[data-g="5"] { opacity: 0.84; }
.gc-contrib { font-family: var(--cue); font-size: 0.72rem; color: var(--house-muted); white-space: nowrap; }
.gc-done { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-family: var(--cue);
  font-size: 0.68rem; letter-spacing: 0.1em; color: var(--house-muted); text-transform: uppercase;
  min-height: 44px; padding: 0 0.2rem; }
.gc-done input { width: 1rem; height: 1rem; accent-color: var(--gel, var(--spot)); cursor: pointer; }
.gc-row.is-done { background: linear-gradient(90deg, var(--gel-glow, transparent), transparent 70%); }
.gc-row.is-done .gc-done { color: var(--gel, var(--spot)); }

/* target */
.gc-target { margin-top: 1.7rem; padding-top: 1.5rem; border-top: 1px solid var(--house-line); }
.gc-target-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.gc-target-head label { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--house-text); }
.gc-target-head select {
  background: rgba(0,0,0,0.35); color: var(--spot-hot); border: 1px solid var(--spot);
  border-radius: 4px; padding: 0.35rem 0.7rem; font-family: var(--display);
  font-weight: 800; font-size: 1.25rem; cursor: pointer;
}
.gc-hint { font-size: 0.88rem; color: var(--house-muted); margin-top: 0.75rem; max-width: 64ch; }
.gc-hint strong { color: var(--spot); font-weight: 600; }
.gc-advice { margin-top: 0.9rem; color: var(--house-text); max-width: 68ch; }
.gc-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.7rem; margin-top: 1.1rem; }
.gc-need {
  border: 1px solid var(--house-line); border-top: 2px solid var(--spot);
  border-radius: 4px; padding: 0.75rem 0.95rem; display: grid; gap: 0.25rem;
  background: rgba(243, 201, 107, 0.045);
}
.gc-need strong { font-size: 0.92rem; color: var(--house-text); font-weight: 600; }
.gc-need span { font-family: var(--cue); font-size: 0.86rem; color: var(--spot); }
.gc-need span em { color: var(--house-muted); font-style: normal; font-size: 0.78rem; }
.gc-need.impossible { border-top-color: var(--gel-red); background: rgba(213, 72, 58, 0.07); }
.gc-need.impossible span { color: var(--gel-red); font-family: var(--body); font-size: 0.85rem; }

/* boundary tables on paper */
.gc-tablepanel[hidden] { display: none; }
.gc-session { font-family: var(--cue); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gel-gold-deep); margin-bottom: 0.9rem; }
.gc-table-wrap { overflow-x: auto; }
.gc-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.gc-table th, .gc-table td { border: 1px solid var(--page-shade); padding: 0.5rem 0.7rem; text-align: center; }
.gc-table th { font-family: var(--cue); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 400; }
.gc-table td { color: var(--ink); font-family: var(--cue); }
.gc-table td:first-child { font-family: var(--display); font-weight: 800; color: var(--gel-gold-deep); font-size: 1.05rem; }
.gc-table tbody tr:first-child { background: #fdf9ef; }
.gc-table tbody tr:first-child td { box-shadow: inset 0 0 0 1px #e3d5ae; }
.gc-table .gc-final { font-weight: 700; }
.gc-tablenote { margin-top: 0.9rem; font-size: 0.86rem; color: var(--ink-soft); font-style: italic; max-width: 70ch; }
@media (max-width: 860px) {
  .gc-result { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .gc-row { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .gc-out { justify-self: start; }
}


/* ---------- criteria page: colour coded criterion blocks and sub strands ---------- */
.critblock { position: relative; overflow: hidden; }
.critblock::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--strand, var(--spot));
}
.critblock[data-strand="A"] { --strand: var(--gel-gold); }
.critblock[data-strand="B"] { --strand: var(--gel-rose); }
.critblock[data-strand="C"] { --strand: var(--gel-blue); }
.critblock .crit-tag { background: var(--strand, var(--spot)); }
.critblock-head h3 { color: var(--strand, var(--house-text)); }

/* each sub strand its own tinted box so the options are obvious */
.crit-comp .prompts { gap: 0.5rem; }
.crit-comp .prompt {
  align-items: start; gap: 0.85rem;
  border: 1px solid var(--house-line); border-left: 3px solid var(--pcol, var(--strand));
  border-radius: 5px; padding: 0.8rem 1rem;
  background: var(--pbg, rgba(241, 233, 216, 0.03));
}
.crit-comp .prompt.p1 { --pcol: var(--strand); --pbg: rgba(243, 201, 107, 0.05); }
.crit-comp .prompt.p2 { --pcol: var(--strand-soft, #f1cf9c); --pbg: rgba(241, 233, 216, 0.055); }
.critblock[data-strand="A"] { --strand-soft: #f1cf9c; }
.critblock[data-strand="B"] { --strand-soft: #eebfd0; }
.critblock[data-strand="C"] { --strand-soft: #bfcdee; }
.crit-comp .prompt .ptag {
  font-family: var(--cue); font-weight: 700; font-size: 0.8rem;
  color: var(--house-deep); background: var(--pcol, var(--strand));
  border-radius: 3px; padding: 0.18rem 0.42rem; text-align: center;
  min-width: 2.6rem; padding-top: 0.22rem;
}
