/* ==========================================================================
   Spellworks · the console page, "the bench"
   One screen, as plain as a music app:
     bar        the title, how it answers (five modes), the voice, sound,
                Stop and show settings
     one line   what the chosen mode does, and a menu of shows to play
     outputs    the face and the sculpture, side by side, as big as the
                room allows
     caption    what just happened, in one sentence, with the ladder
                ("How it decided") folded away underneath
     drawer     the typewriter, pinned to the bottom of the window, with
                examples to try; it opens and closes
   Below the fold: how it listens, how we build it and every builder tool.
   ========================================================================== */

:root {
  --tbar-h: 3.35rem;
  --tdrawer-h: var(--tbar-h);
}

.con { padding-bottom: calc(var(--tdrawer-h) + clamp(32px, 4vw, 64px)); }
.con-muted { color: var(--fg-3); }

/* --------------------------------------------------------------------------
   the studio frame: exactly the window between the header and the drawer
   -------------------------------------------------------------------------- */
.studio__wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: calc(100svh - var(--header-h) - var(--tdrawer-h));
  min-height: 22rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

/* the bar */
.sbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem clamp(12px, 1.4vw, 24px);
  padding: clamp(6px, 0.9svh, 10px) 0 clamp(4px, 0.6svh, 8px);
  min-width: 0;
}
.sbar > .modes { justify-self: center; }
.sbar__id { display: inline-flex; align-items: baseline; gap: 0.6rem; min-width: 0; white-space: nowrap; }
.sbar__title {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  line-height: 1;
  font-weight: 380;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.sbar__title em { font-style: italic; }
.sbar__tools { justify-self: end; display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }
.sbar__stop { color: var(--alert-ink); border-color: color-mix(in srgb, var(--alert-ink) 55%, transparent); }
.sbar__stop:hover { background: var(--alert-wash); border-color: var(--alert-ink); color: var(--alert-ink); }
.sbar__stop-sq { display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.5em; border-radius: 2px; background: currentColor; vertical-align: -0.04em; }

/* the five modes: one segmented pill, like a transport bar */
.modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  border: 1px solid var(--hair);
  min-width: 0;
}
.mode {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.15rem;
  padding: 0.3rem 0.95rem 0.3rem 0.62rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-2);
  font-family: var(--f-body);
  font-variation-settings: "wdth" 108;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.22s var(--ease-soft), color 0.22s var(--ease-soft);
}
.mode:hover { color: var(--fg); background: var(--bg-3); }
.mode[aria-checked="true"] { background: var(--solid-bg); color: var(--solid-fg); }
.mode__ico { display: grid; place-items: center; width: 1.15rem; height: 1.15rem; }
.mode__ico svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mode__name { display: inline-block; }

/* the voice picker: a pill with a speaker */
.vpick {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0 1.7rem 0 0.62rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft);
}
.vpick:hover { border-color: var(--fg-2); }
.vpick:focus-within { outline: 2px solid var(--fg); outline-offset: 2px; }
.vpick::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  top: 50%;
  width: 0.36rem;
  height: 0.36rem;
  margin-top: -0.26rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.7;
}
.vpick__ico { width: 1.05rem; height: 1.05rem; margin-right: 0.38rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--fg-2); flex: 0 0 auto; }
.vpick__sel {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--f-body);
  font-variation-settings: "wdth" 108;
  font-weight: 600;
  font-size: 0.68rem;
  line-height: 1.9rem;
  padding: 0;
  cursor: pointer;
  outline: none;
}
.vpick__sel option { color: var(--fg); background: var(--bg-2); }

.icon-btn {
  width: 2.05rem;
  height: 2.05rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hair-2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background-color 0.2s var(--ease-soft);
}
.icon-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-btn:hover { border-color: var(--fg); background: var(--bg-3); }

/* one plain line: what the chosen mode does, and the shows menu */
.sline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  padding: 0 0 clamp(6px, 0.9svh, 10px);
  border-bottom: 1px solid var(--hair);
  min-width: 0;
}
.sline__about {
  margin: 0;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sline__about strong { color: var(--fg); font-weight: 600; }
.sline__tools { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }

.shows { position: relative; }
.shows__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.9rem;
  padding: 0.3rem 0.9rem 0.3rem 0.62rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  font-family: var(--f-body);
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background-color 0.2s var(--ease-soft);
}
.shows__btn svg { width: 0.95rem; height: 0.95rem; fill: currentColor; }
.shows__btn:hover, .shows__btn[aria-expanded="true"] { border-color: var(--fg); background: var(--bg-3); }
.shows__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  width: min(23rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r);
  background: var(--bg-2);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 26px 64px rgba(0, 0, 0, 0.62);
}
html[data-theme="paper"] .shows__menu { box-shadow: 0 1px 0 rgba(27, 23, 20, 0.06), 0 18px 44px rgba(27, 23, 20, 0.18); }
.shows__menu[hidden] { display: none; }
.show {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s var(--ease-soft);
}
.show:hover, .show:focus-visible { background: var(--bg-3); }
.show__n { font-size: 0.78rem; font-weight: 600; line-height: 1.2; }
.show__k { font-size: 0.66rem; line-height: 1.3; color: var(--fg-3); }

/* the two outputs */
.hero2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(12px, 1.3vw, 22px);
  min-height: 0;
  padding: clamp(8px, 1.1svh, 14px) 0 clamp(4px, 0.6svh, 8px);
}
.out {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: 0.35rem;
  min-width: 0;
  min-height: 0;
}
.out--live { grid-template-rows: minmax(0, 1fr) auto auto; }
.out__screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--hair-2);
  background: #070609;
}
.out__screen--tv.sw-tv--auto { height: 100%; aspect-ratio: auto; }
.out__screen--live { background: var(--bg-inset); }
.out__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem 0.8rem; min-height: 1.6rem; min-width: 0; }
.out__cap { display: inline-flex; align-items: baseline; gap: 0.55rem; margin: 0; font: inherit; min-width: 0; white-space: nowrap; overflow: hidden; }
.out__cap .t-label { font-size: 0.56rem; }
.out__sub { font-size: 0.72rem; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; }
.seg--xs > button { min-height: 1.55rem; padding: 0.2em 0.7em; font-size: 0.52rem; }

/* nine brass plates under the sculpture: pull a drawer */
.dplates { display: grid; grid-template-columns: repeat(9, auto); justify-content: space-between; gap: 0.2rem; }
.dplate {
  position: relative;
  min-width: 0;
  min-height: 1.55rem;
  padding: 0.18rem 0.4rem;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(180deg, #e7cd96 0%, #cfaa68 34%, #a9833f 72%, #c9a663 100%);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.55), inset 0 -1px 0 rgba(60, 38, 10, 0.3), 0 1px 2px rgba(0, 0, 0, 0.35);
  font-family: var(--f-body);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  font-size: 0.47rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #36260e;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease-soft), transform 0.15s var(--ease);
}
.dplate:hover { transform: translateY(-1px); }
.dplate:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(60, 38, 10, 0.55), 0 0 0 rgba(0, 0, 0, 0); }
.dplate[aria-pressed="true"] { box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.55), 0 0 0 2px var(--glow), 0 0 16px var(--glow-wash); }
.dplate.is-hinted { animation: dplate-hint 1.1s var(--ease-soft) 6; }
@keyframes dplate-hint { 50% { box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.55), 0 0 0 2px var(--glow), 0 0 22px var(--glow-wash); } }

/* the caption: what just happened, in one sentence */
.cap {
  display: flex;
  align-items: center;
  gap: 0.6rem 0.9rem;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.3rem 0;
  border-top: 1px solid var(--hair);
}
.cap__line {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cap__line .q { font-family: var(--f-mono); font-size: 0.84rem; color: var(--fg); }
.cap__line .k { color: var(--fg-3); }
.cap__line.is-warm { color: var(--glow-ink); }
.cap__line.is-alert { color: var(--alert-ink); }
.cap__now {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 22rem;
  padding: 0.22rem 0.7rem 0.22rem 0.55rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--signal-ink);
  background: var(--signal-wash);
  box-shadow: 0 0 14px color-mix(in srgb, var(--signal-ink) 22%, transparent);
  color: var(--signal-ink);
  font-family: var(--f-mono);
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cap__now[hidden] { display: none; }
.cap__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.72rem; }
.cap__eq i { width: 2px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: bottom; animation: cap-eq 0.9s var(--ease-soft) infinite; }
.cap__eq i:nth-child(2) { animation-delay: -0.3s; }
.cap__eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes cap-eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.cap__why {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.8rem;
  padding: 0.2rem 0.55rem 0.2rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-2);
  font-family: var(--f-body);
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}
.cap__why svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
.cap__why:hover { color: var(--fg); border-color: var(--hair-2); }
.cap__why[aria-expanded="true"] { color: var(--fg); }
.cap__why[aria-expanded="true"] svg { transform: rotate(180deg); }

/* how it decided: folded away until asked */
.why {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 0.5rem clamp(16px, 2vw, 32px);
  padding: 0.2rem 0 0.7rem;
  min-width: 0;
}
.why[hidden] { display: none; }
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-content: start; gap: 0.22rem; }
.ladder li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  padding: 0.18rem 0.6rem 0.2rem 0.5rem;
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  font-size: 0.66rem;
  line-height: 1.25;
  color: var(--fg-2);
  transition: background-color 0.18s var(--ease-soft), color 0.18s var(--ease-soft), border-color 0.18s var(--ease-soft);
}
.ladder__n { font-family: var(--f-mono); font-size: 0.58rem; color: var(--fg-3); }
.ladder__mark { display: none; }
.ladder li.is-pass { color: var(--fg-3); }
.ladder li.is-hit { color: var(--signal-ink); background: var(--signal-wash); border-color: color-mix(in srgb, var(--signal-ink) 55%, transparent); font-weight: 600; }
.ladder li.is-hit .ladder__n { color: var(--signal-ink); }
.ladder li.is-skip { opacity: 0.55; }
.did { margin: 0; display: grid; gap: 0.12rem; align-content: start; }
.did > div { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: 0.5rem; align-items: baseline; }
.did dt {
  font-variation-settings: "wdth" 120;
  font-weight: 600;
  font-size: 0.5rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.did dd { margin: 0; font-size: 0.7rem; line-height: 1.35; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.did dd.t-mono { font-size: 0.62rem; color: var(--signal-ink); }

.insp__link,
.con-quick__link {
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.54rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--fg-2);
  text-decoration: none;
  white-space: nowrap;
}
.insp__link:hover,
.con-quick__link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 0.22em; }
.con-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  line-height: 1.1;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   the typewriter drawer, pinned to the bottom of the window
   -------------------------------------------------------------------------- */
.tdrawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--bg-2);
  border-top: 1px solid var(--hair-2);
  border-radius: var(--r) var(--r) 0 0;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.38);
  transform: translateY(0);
  transition: transform 0.42s var(--ease);
}
html[data-theme="paper"] .tdrawer { box-shadow: 0 -12px 36px rgba(27, 23, 20, 0.12); }
.tdrawer[data-state="closed"] { transform: translateY(calc(100% - var(--tbar-h))); }
.tdrawer.is-dragging { transition: none; }
.tdrawer__bar {
  max-width: var(--max);
  height: var(--tbar-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  touch-action: none;
  cursor: grab;
}
.tdrawer.is-dragging .tdrawer__bar { cursor: grabbing; }
.tdrawer__pull {
  flex: 0 0 auto;
  min-height: 2.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.32rem 0.75rem 0.32rem 0.45rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-soft);
}
.tdrawer__pull:hover { background: var(--bg-3); }
.tdrawer__brass {
  width: 2.7rem;
  height: 0.62rem;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #ecd39c 0%, #cfaa68 42%, #a9833f 82%, #c9a663 100%);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, 0.55), inset 0 -1px 0 rgba(60, 38, 10, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.tdrawer__label {
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tdrawer__chev { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tdrawer[data-state="closed"] .tdrawer__chev { transform: rotate(180deg); }
.tdrawer__paper {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.42rem 0.95rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  background: var(--bg-inset);
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
}
.tdrawer__paper::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 1.02em;
  margin-left: 1px;
  vertical-align: -0.16em;
  background: var(--signal-ink);
  animation: tdr-blink 1.06s steps(1) infinite;
}
@keyframes tdr-blink { 50% { opacity: 0; } }
.tdrawer__hint { color: var(--fg-3); }
.tdrawer__kbd { margin-left: 0.35em; opacity: 0.72; }
.tdrawer__q {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.45em;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.95em;
  line-height: 1;
  letter-spacing: 0;
}
.tdrawer__body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(8px, 1.1svh, 14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  column-gap: clamp(16px, 2.2vw, 40px);
}
.tdrawer__side { display: grid; gap: 0.4rem; align-content: end; min-width: 0; padding-bottom: 0.5rem; }
.tdrawer__side--fun { justify-items: start; }
.tdrawer__note { margin: 0.15rem 0 0; font-size: 0.68rem; line-height: 1.4; color: var(--fg-3); max-width: 30ch; }
.tdrawer__note strong { color: var(--fg-2); font-family: var(--f-mono); font-weight: 400; }
.tdrawer__mode { color: var(--fg-3); letter-spacing: 0.08em; }
.tdrawer__tw { padding-left: 2.2rem; }
.tdrawer__tw .tw--compact {
  --tw-font: min(clamp(0.78rem, 0.46rem + 0.32vw, 0.88rem), 1.72svh);
  --tw-k: min(clamp(1.16rem, 0.74rem + 0.46vw, 1.3rem), 2.56svh);
  --tw-pitch: calc(var(--tw-k) * 1.24);
  --tw-rowh: calc(var(--tw-k) * 1.07);
}

/* example chips: they type the words for you, then cast */
.trychips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.trychip {
  min-height: 1.75rem;
  padding: 0.24rem 0.72rem 0.22rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background-color 0.2s var(--ease-soft);
}
.trychip:hover { border-color: var(--fg); background: var(--bg-3); }
.trychip--egg { border-style: dashed; }
.trychip--egg:hover { border-style: solid; }

/* the voice cards in show settings */
.vcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem; }
.vcard {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background-color 0.2s var(--ease-soft);
}
.vcard:hover { border-color: var(--fg-2); }
.vcard { position: relative; }
.vcard[aria-checked="true"] { border-color: var(--fg); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--fg); }
.vcard[aria-checked="true"]::after {
  content: "In use";
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  padding: 0.12rem 0.45rem 0.1rem;
  border-radius: var(--r-pill);
  background: var(--solid-bg);
  color: var(--solid-fg);
  font-variation-settings: "wdth" 118;
  font-weight: 700;
  font-size: 0.46rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.vcard__n { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.vcard__a { font-size: 0.66rem; line-height: 1.35; color: var(--fg-3); }
.sheet__more { border-top: 1px solid var(--hair); padding-top: 0.6rem; }
.sheet__more > summary { cursor: pointer; font-size: 0.72rem; color: var(--fg-2); }
.sheet__more[open] > summary { margin-bottom: 0.6rem; }
.sheet__more .field + .field, .sheet__more .sheet__pair { margin-top: 0.55rem; }

/* --------------------------------------------------------------------------
   show settings (a dialog, solid surface, no blur)
   -------------------------------------------------------------------------- */
.sheet {
  width: min(64rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - 3rem);
  padding: 0;
  border: 1px solid var(--hair-2);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 28px 72px rgba(0, 0, 0, 0.72);
}
html[data-theme="paper"] .sheet { box-shadow: var(--shadow-lift), 0 24px 60px rgba(27, 23, 20, 0.22); }
.sheet::backdrop { background: rgba(8, 6, 10, 0.62); }
html[data-theme="paper"] .sheet::backdrop { background: rgba(27, 23, 20, 0.36); }
.sheet__form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100svh - 3rem); }
.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding: 1.1rem 1.5rem 0.9rem;
  border-bottom: 1px solid var(--hair);
}
.sheet__title {
  margin-top: 0.2rem;
  font-family: var(--f-display);
  font-size: 1.6rem;
  line-height: 1.05;
  font-weight: 380;
  letter-spacing: -0.02em;
}
.sheet__title em { font-style: italic; }
.sheet__grid {
  overflow: auto;
  padding: 1.1rem 1.5rem 1.3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem clamp(24px, 3vw, 48px);
  scrollbar-width: thin;
}
.sheet__sec { display: grid; gap: 0.7rem; align-content: start; padding-top: 0.9rem; border-top: 1px solid var(--hair); }
.sheet__h {
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.field__k { font-size: 0.72rem; color: var(--fg-2); display: flex; justify-content: space-between; gap: 0.6rem; }
.field__k .t-mono { color: var(--signal-ink); }
.field--range input[type="range"] { width: 100%; accent-color: var(--signal-ink); }
.sheet__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.sheet__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.sheet__tip { font-size: 0.7rem; line-height: 1.45; color: var(--fg-3); }
.sheet__status { color: var(--fg-2); }
.sheet__status.is-ok { color: var(--signal-ink); }
.sheet__status.is-bad { color: var(--alert-ink); }
.sheet__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem 1rem;
  border-top: 1px solid var(--hair);
}

/* --------------------------------------------------------------------------
   how it listens (below the fold)
   -------------------------------------------------------------------------- */
.listen__cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 56px); align-items: start; }
.listen__h {
  margin-bottom: 0.8rem;
  font-family: var(--f-display);
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 420;
  letter-spacing: -0.01em;
}
.listen__h .t-mono { font-family: var(--f-mono); font-size: 0.72rem; color: var(--fg-3); letter-spacing: 0; }
.listen__steps { list-style: none; margin: 0; padding: 0; display: grid; }
.listen__steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.2rem 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--hair);
}
.listen__steps .n { grid-row: span 2; font-family: var(--f-mono); font-size: 0.74rem; color: var(--signal-ink); padding-top: 0.08rem; }
.listen__steps .l { font-weight: 600; font-size: 0.84rem; }
.listen__steps .a { font-size: 0.76rem; line-height: 1.45; color: var(--fg-2); }
.listen__modelist { display: grid; }
.listen__modelist li {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--hair);
}
.listen__modelist .mode__ico { grid-row: span 3; }
.listen__modelist .nm { font-family: var(--f-display); font-size: 1rem; font-weight: 420; }
.listen__modelist .nm span { margin-left: 0.5rem; font-family: var(--f-body); font-variation-settings: "wdth" 120; font-weight: 600; font-size: 0.5rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--fg-3); }
.listen__modelist .ab { font-size: 0.78rem; line-height: 1.45; color: var(--fg-2); }
.listen__modelist .wh { font-size: 0.72rem; line-height: 1.4; color: var(--fg-3); }
.listen__notes { display: grid; gap: 0.55rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--hair); }
.listen__notes p { font-size: 0.8rem; line-height: 1.55; color: var(--fg-2); max-width: 70ch; }
.listen__notes strong { color: var(--fg); font-weight: 600; }
.listen__eggs { margin-top: clamp(20px, 2.4vw, 36px); padding-top: 1.1rem; border-top: 1px solid var(--hair); }
.listen__eggs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.6rem 1.2rem; }
.eggs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(18px, 2vw, 36px); margin: 0; padding: 0; list-style: none; }
.egg { display: grid; gap: 0.2rem; align-content: start; padding: 0.65rem 0 0.75rem; border-top: 1px solid var(--hair); }
.egg__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.egg__name { font-weight: 600; font-size: 0.84rem; }
.egg__found {
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-ink);
}
.egg__phrase { font-family: var(--f-mono); font-size: 0.74rem; color: var(--signal-ink); }
.egg__phrase.is-masked { color: var(--fg-3); letter-spacing: 0.16em; }
.egg__about { font-size: 0.74rem; line-height: 1.45; color: var(--fg-2); }
.egg__try {
  justify-self: start;
  margin-top: 0.15rem;
  padding: 0;
  border: 0;
  background: none;
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.54rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
}
.egg__try:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 0.22em; }

/* ==========================================================================
   builder tools (below the fold)
   ========================================================================== */
/* --------------------------------------------------------------------------
   below-the-fold builder grid
   -------------------------------------------------------------------------- */
.con-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(24px, 2.8vw, 52px);
  grid-template-areas:
    "ls ls ls ls ls ls ls ls ls ls ls ls"
    "bd bd bd bd bd bd bd bd bd bd bd bd"
    "tl tl tl tl tl tl tl tl tl tl tl tl"
    "tr tr tr tr tr tr tr tr tr tr tr tr"
    "se se se se se se hw hw hw hw hw hw"
    "dg dg dg dg dg dg dg dg dg dg dg dg";
  align-items: start;
  margin-top: clamp(16px, 2vw, 28px);
}
.con-listen { grid-area: ls; }
.con-build { grid-area: bd; }
.con-sensors { grid-area: se; }
.con-timeline { grid-area: tl; }
.con-try { grid-area: tr; }
.con-hw { grid-area: hw; }
.con-diag { grid-area: dg; }

/* panels: headings on desktop, an accordion on phones */
.con-panel {
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.con-panel__sum {
  display: grid;
  gap: 0.3rem;
  padding: 0 0 0.9rem;
  list-style: none;
  cursor: default;
}
.con-panel__sum::-webkit-details-marker { display: none; }
.con-panel__sum::marker { content: ""; }
.con-panel__t {
  font-family: var(--f-body);
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 0.66rem;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}
.con-panel__n { font-size: 0.8rem; line-height: 1.45; color: var(--fg-2); max-width: 68ch; }
.con-panel__sum:focus-visible { outline-offset: 4px; }

.con-listen, .con-build, .con-sensors, .con-timeline, .con-try, .con-hw, .con-diag {
  padding-top: clamp(24px, 2.6vw, 36px);
  padding-bottom: clamp(24px, 2.6vw, 36px);
  border-top: 1px solid var(--hair);
}

/* --------------------------------------------------------------------------
   01 How we build this in real life (3 stages + 4 physical boxes)
   -------------------------------------------------------------------------- */
.build-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  padding-bottom: clamp(20px, 2.2vw, 28px);
  border-bottom: 1px solid var(--hair);
}
.build-stage {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}
.build-stage__step {
  font-size: 0.64rem;
  color: var(--signal-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.build-stage__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 420;
  color: var(--fg);
}
.build-stage__desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--fg-2);
}
.build-stage__desc a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.build-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 32px);
  padding-top: clamp(20px, 2.2vw, 28px);
}
.build-box {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: clamp(16px, 1.8vw, 24px);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-sm);
  background: var(--bg-inset);
}
.build-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.build-box__num {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glow-ink);
}
.build-box__tag {
  font-size: 0.62rem;
  color: var(--fg-3);
  padding: 0.14rem 0.5rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
}
.build-box__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.12rem, 1.4vw, 1.34rem);
  font-weight: 420;
  color: var(--fg);
}
.build-box__desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.52;
  color: var(--fg-2);
}
.build-box__specs {
  margin: 0.2rem 0 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  display: grid;
  gap: 0.28rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--fg-2);
}
.build-box__specs strong { color: var(--fg); }
.build-box__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  padding-top: 0.35rem;
}
.build-box__links a {
  font-family: var(--f-body);
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--signal-ink);
  text-decoration: none;
}
.build-box__links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

/* --------------------------------------------------------------------------
   02 14 ft sculpture & front elevation lighting plot (below the fold)
   -------------------------------------------------------------------------- */
.con-structure-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.2rem;
  padding-bottom: 0.85rem;
}
.con-structure__ctrls,
.con-structure__cues {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
}
.con-structure__ctrls > .t-label,
.con-structure__cues > .t-label { font-size: 0.56rem; }
.con-structure__ctrls .seg > button {
  min-height: 1.75rem;
  padding: 0.28em 0.72em;
  font-size: 0.56rem;
}
.con-structure__mount {
  position: relative;
  width: 100%;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #07070a;
  border: 1px solid var(--hair-2);
  transition: background-color 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft);
}
.con-structure__mount--wide {
  aspect-ratio: 16 / 9;
  max-height: 580px;
}
.con-structure__mount:has(.sw-structure[data-view="plot"]) {
  background: var(--bg-inset);
}

/* --------------------------------------------------------------------------
   sensors: brass plates like the ones on the drawers
   -------------------------------------------------------------------------- */
.con-drawers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
}
.plate {
  display: grid;
  gap: 0.3rem;
  justify-items: stretch;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  border-radius: 8px;
}
.plate__face {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.45rem;
  border-radius: 6px;
  background: linear-gradient(180deg, #e7cd96 0%, #cfaa68 34%, #a9833f 72%, #c9a663 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 220, 0.55),
    inset 0 -1px 0 rgba(60, 38, 10, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s var(--ease-soft), transform 0.15s var(--ease);
}
.plate__name {
  flex: 1;
  font-family: var(--f-body);
  font-variation-settings: "wdth" 118;
  font-weight: 700;
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #36260e;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plate__screw {
  position: relative;
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6e7c0, #8a6a33 80%);
  box-shadow: inset 0 0 0 0.5px rgba(50, 30, 8, 0.35);
}
.plate__screw::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  background: rgba(60, 40, 15, 0.65);
  transform: rotate(38deg);
}
.plate__state {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  line-height: 1;
  color: var(--fg-3);
}
.plate:hover .plate__face { transform: translateY(-1px); }
.plate:active .plate__face { transform: translateY(1px); }
.plate[aria-pressed="true"] .plate__face {
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 220, 0.6),
    inset 0 -1px 0 rgba(60, 38, 10, 0.3),
    0 0 0 2px var(--glow),
    0 0 1.1rem var(--glow-wash);
}
.plate[aria-pressed="true"] .plate__state { color: var(--glow-ink); }
.con-sensors__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding-top: 1rem;
}
.con-sensors__row--btns { padding-top: 0.75rem; gap: 0.5rem; }
.con-sensors__cm { font-size: 0.74rem; color: var(--fg-3); }
.con-sensors__note { min-height: 1.4em; margin-top: 0.6rem; color: var(--fg-2); }

/* --------------------------------------------------------------------------
   the cue timeline
   -------------------------------------------------------------------------- */
.tl { display: grid; }
.tl__empty { padding: 0.4rem 0 0.6rem; max-width: 58ch; }
.tl__empty-t { font-family: var(--f-display); font-size: 1.2rem; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 0.3rem; }
.tl__empty .t-small { color: var(--fg-2); }
.tl__run {
  --lane-n: 5.4rem;
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: 1.1rem clamp(18px, 2vw, 32px);
  padding: 1.15rem 0 1.25rem;
  border-top: 1px solid var(--hair);
}
.tl__run:first-child { border-top: 0; padding-top: 0.2rem; }
.tl__run:not(.is-live) { opacity: 0.72; transition: opacity 0.6s var(--ease-soft); }
.tl__run:first-child:not(.is-live) { opacity: 1; }
.tl__meta { display: grid; align-content: start; gap: 0.35rem; min-width: 0; }
.tl__title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.tl__name { font-family: var(--f-display); font-size: 1.16rem; line-height: 1.15; font-weight: 420; letter-spacing: -0.01em; }
.tl__line {
  font-family: var(--f-mono);
  font-size: 0.86rem;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.tl__line::before { content: "\201C"; color: var(--fg-3); }
.tl__line::after { content: "\201D"; color: var(--fg-3); }
.tl__explain { font-size: 0.8rem; line-height: 1.45; color: var(--fg-2); }
.tl__count { font-size: 0.7rem; color: var(--fg-3); }
.tl__lanes { position: relative; display: grid; gap: 2px; min-width: 0; align-content: start; }
.tl__lane { display: grid; grid-template-columns: var(--lane-n) minmax(0, 1fr); align-items: center; }
.tl__lane-n {
  font-family: var(--f-body);
  font-variation-settings: "wdth" 120;
  font-weight: 600;
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.tl__track {
  position: relative;
  height: calc(var(--rows, 1) * 1.42rem + 0.3rem);
  border-bottom: 1px solid var(--hair);
}
.tl__cue {
  position: absolute;
  top: calc(var(--row, 0) * 1.42rem + 0.18rem);
  height: 1.18rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--fg-2);
  transition: background-color 0.25s var(--ease-soft), color 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft);
}
.tl__cue-l {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl__cue.is-open { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dashed; }
.tl__cue::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: calc(var(--holdpx, 0) * 1px);
  height: 2px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: 0.35;
}
.tl__lane[data-lane="tv"] .tl__cue { border-color: color-mix(in srgb, var(--signal-ink) 55%, transparent); color: var(--signal-ink); background: var(--signal-wash); }
.tl__lane[data-lane="tv"] .tl__cue.is-fired { background: var(--signal); border-color: var(--signal); color: #0b0a0e; }
.tl__lane[data-lane="lights"] .tl__cue { border-color: color-mix(in srgb, var(--glow-ink) 55%, transparent); color: var(--glow-ink); background: var(--glow-wash); }
.tl__lane[data-lane="lights"] .tl__cue.is-fired { background: var(--glow); border-color: var(--glow); color: #120d06; }
.tl__lane[data-lane="sound"] .tl__cue { color: var(--fg); }
.tl__lane[data-lane="sound"] .tl__cue.is-fired { background: var(--fg-2); border-color: var(--fg-2); color: var(--bg); }
.tl__lane[data-lane="act"] .tl__cue { background: transparent; border-style: dashed; }
.tl__lane[data-lane="act"] .tl__cue.is-fired { background: var(--fg); border-color: var(--fg); border-style: solid; color: var(--bg); }
.tl__more { position: absolute; right: 0; bottom: 0.15rem; font-family: var(--f-mono); font-size: 0.62rem; color: var(--fg-3); }
.tl__axis { display: grid; grid-template-columns: var(--lane-n) minmax(0, 1fr); }
.tl__ticks { position: relative; height: 1.3rem; }
.tl__tick {
  position: absolute;
  top: 0.32rem;
  left: calc(var(--at) / var(--span) * 100%);
  font-family: var(--f-mono);
  font-size: 0.6rem;
  color: var(--fg-3);
  transform: translateX(-50%);
  white-space: nowrap;
}
.tl__tick:first-child { transform: none; }
.tl__playzone {
  position: absolute;
  left: var(--lane-n);
  right: 0;
  top: -0.25rem;
  bottom: 1.3rem;
  pointer-events: none;
}
.tl__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--p, 0) * 100%);
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
  transition: opacity 0.4s var(--ease-soft);
}
.tl__run:not(.is-live) .tl__playhead { opacity: 0; }
.tl__run.is-cut [data-tl-state] { color: var(--glow-ink); }

/* older runs fold into one line with a strip of cue dots */
.tl__mini { display: none; position: relative; height: 1.6rem; align-self: center; border-bottom: 1px solid var(--hair); }
.tl__dot {
  position: absolute;
  left: calc(var(--at) / var(--span) * 100%);
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  margin: -0.21rem 0 0 -0.21rem;
  border-radius: 50%;
  background: var(--fg-3);
}
.tl__dot[data-lane="tv"] { background: var(--signal); }
.tl__dot[data-lane="lights"] { background: var(--glow); }
.tl__dot[data-lane="sound"] { background: var(--fg-2); }
.tl__dot[data-lane="act"] { background: transparent; border: 1px solid var(--fg-2); }
.tl__mini .tl__playhead { top: -0.2rem; bottom: -0.2rem; }
.tl__run.is-compact { padding: 0.75rem 0; align-items: center; }
.tl__run.is-compact .tl__lanes { display: none; }
.tl__run.is-compact .tl__mini { display: block; margin-left: var(--lane-n); }
.tl__run.is-compact .tl__meta { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0.2rem 0.8rem; }
.tl__run.is-compact .tl__title { grid-column: 1; }
.tl__run.is-compact .tl__name { font-size: 1rem; }
.tl__run.is-compact .tl__line { grid-column: 2; font-size: 0.78rem; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl__run.is-compact .tl__explain,
.tl__run.is-compact .tl__count { display: none; }
.tl__run.is-compact .tag { font-size: 0.52rem; }

/* --------------------------------------------------------------------------
   try these
   -------------------------------------------------------------------------- */
.con-try__bar { display: flex; justify-content: flex-start; padding-bottom: 0.2rem; }
.con-try__groups { column-count: 3; column-gap: clamp(28px, 3vw, 56px); column-rule: 1px solid var(--hair); margin-top: 1.1rem; }
.con-try__groups[aria-busy="true"] { cursor: progress; }
.try__group { break-inside: avoid; padding: 0 0 1.6rem; }
.try__h { font-family: var(--f-display); font-size: 1.04rem; line-height: 1.2; font-weight: 440; letter-spacing: -0.01em; }
.try__note { margin: 0.2rem 0 0.7rem; font-size: 0.78rem; line-height: 1.45; color: var(--fg-2); }
.try__chips, .try__row { display: flex; flex-wrap: wrap; gap: 0.38rem; margin: 0; padding: 0; list-style: none; }
.try__row + .try__row { margin-top: 0.55rem; }
.try__chip {
  min-height: 2.05rem;
  padding: 0.38em 0.85em 0.34em;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}
.try__chip:hover { border-color: var(--fg); }
.try__chip[aria-pressed="true"] { background: var(--solid-bg); border-color: var(--solid-bg); color: var(--solid-fg); }
.try__chip[aria-disabled="true"] { color: var(--fg-3); border-style: dashed; cursor: default; }
.try__chip[aria-disabled="true"]:hover { border-color: var(--hair-2); }
.try__list { display: grid; margin: 0; padding: 0; list-style: none; }
.try__btn {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.15rem 0.9rem;
  width: 100%;
  padding: 0.55rem 0;
  border: 0;
  border-top: 1px solid var(--hair);
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.try__item:first-child .try__btn { border-top: 0; padding-top: 0.15rem; }
.try__word { font-family: var(--f-mono); font-size: 0.84rem; color: var(--fg); letter-spacing: 0.03em; }
.try__cap { font-size: 0.76rem; line-height: 1.4; color: var(--fg-2); justify-self: end; text-align: right; }
.try__btn:hover .try__word { text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 0.25em; }
.try__item.is-hidden .try__btn { grid-template-columns: minmax(0, 1fr); cursor: default; }
.try__item.is-hidden .try__btn:hover .try__word { text-decoration: none; }
.try__mask { color: var(--fg-3); letter-spacing: 0.18em; }
.try__item.is-hidden .try__cap { justify-self: start; text-align: left; font-style: italic; font-family: var(--f-display); font-size: 0.84rem; color: var(--fg-2); }

/* --------------------------------------------------------------------------
   hardware
   -------------------------------------------------------------------------- */
.hw__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.35rem 0; }
.hw__row > .t-label { min-width: 6.5rem; }
.hw__input { max-width: 19rem; min-height: 2.15rem; padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.hw__btns { padding-top: 0.6rem; gap: 0.5rem; }
.hw__support {
  margin: 0.5rem 0 0.2rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--hair-2);
  max-width: 56ch;
  color: var(--fg-2);
}
.hw__readout { display: grid; margin: 0.9rem 0 0; }
.hw__readout > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hair);
}
.hw__readout dt {
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 0.2rem;
}
.hw__readout dd {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
  color: var(--fg-2);
}
.hw__line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }

/* --------------------------------------------------------------------------
   diagnostics
   -------------------------------------------------------------------------- */
.con-stats .stat { padding-top: 1rem; padding-bottom: 1.1rem; }
.con-stats .stat__n { font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.con-stats .stat__l { font-size: 0.74rem; }
.con-diag__mods { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 1rem; }
.mod { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; color: var(--fg-2); }
.mod .live-dot { width: 0.42rem; height: 0.42rem; animation: none; box-shadow: none; }
.con-diag__cool { margin-top: 0.9rem; }
.con-diag__cool .t-label { margin-bottom: 0.4rem; }
.cool__list { display: grid; margin: 0; padding: 0; list-style: none; max-width: 32rem; }
.cool__list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.32rem 0; border-top: 1px solid var(--hair); font-size: 0.8rem; color: var(--fg-2); }
.con-diag__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(24px, 2.8vw, 52px);
  align-items: start;
}
.con-diag__loghead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--hair);
}
.con-diag__loghead .t-small { color: var(--fg-3); font-size: 0.74rem; }
.con-diag__btns { display: flex; gap: 0.2rem; margin-left: auto; }
.fam-log__list {
  max-height: 14.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  line-height: 1.35;
  scrollbar-width: thin;
}
.fam-log__row {
  display: grid;
  grid-template-columns: 4.4em 8.6em minmax(0, 1fr);
  gap: 0.9em;
  padding: 0.24rem 0;
  border-bottom: 1px solid var(--hair);
  color: var(--fg-2);
}
.fam-log__t { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.fam-log__type { color: var(--fg); }
.fam-log__d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-log__row[data-type="spell:result"] .fam-log__type,
.fam-log__row[data-type="line:cast"] .fam-log__type { color: var(--signal-ink); }
.fam-log__row[data-type="drawer"] .fam-log__type { color: var(--glow-ink); }

/* --------------------------------------------------------------------------
   wide, mid and short screens
   -------------------------------------------------------------------------- */
@media (min-width: 1500px) {
  .con-try__groups { column-count: 4; }
}
@media (max-width: 1560px) and (min-width: 901px) {
  .sbar__id .t-label { display: none; }
}
@media (max-width: 1320px) and (min-width: 901px) {
  .mode { padding-right: 0.8rem; padding-left: 0.55rem; font-size: 0.68rem; }
  .dplate { font-size: 0.42rem; letter-spacing: 0.04em; padding-left: 0.28rem; padding-right: 0.28rem; }
}
/* a narrower desktop: the modes get their own row under the title */
@media (max-width: 1180px) and (min-width: 901px) {
  .sbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id tools" "modes modes"; }
  .sbar__id { grid-area: id; }
  .sbar__tools { grid-area: tools; }
  .modes { grid-area: modes; justify-self: start; }
  .dplates { grid-template-columns: repeat(5, auto); justify-content: start; }
  .tdrawer__note { display: none; }
}
@media (max-height: 1000px) and (min-width: 901px) {
  .tdrawer__tw .tw__stage { display: none; }
  .tdrawer__tw .tw__body { margin-top: 0.9rem; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .sline__about { font-size: 0.76rem; }
  .dplates { display: none; }
  .out__foot { min-height: 1.5rem; }
}

/* --------------------------------------------------------------------------
   tablets and phones: one column, the drawer stays pinned (closed at first)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --tbar-h: 3.15rem; }
  .studio__wrap { height: auto; min-height: 0; display: block; }
  .sbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "id tools" "modes modes";
    padding: 0.55rem 0 0.5rem;
  }
  .sbar__id { grid-area: id; }
  .sbar__id .t-label { display: none; }
  .sbar__title { font-size: 1.15rem; }
  .sbar__tools { grid-area: tools; gap: 0.35rem; }
  .vpick { display: none; }
  .sbar > .modes,
  .modes {
    grid-area: modes;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
    mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  .modes::-webkit-scrollbar { display: none; }
  .mode { flex: 0 0 auto; }
  .sline { flex-wrap: wrap; align-items: flex-start; padding-bottom: 0.7rem; }
  .sline__about { white-space: normal; flex: 1 1 14rem; }

  .hero2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0 0.4rem; }
  .out { grid-template-rows: auto auto; }
  .out--live { grid-template-rows: auto auto auto; }
  .out__screen--tv,
  .out__screen--tv.sw-tv--auto { height: auto; aspect-ratio: 4 / 3; }
  .out__screen--live { height: auto; aspect-ratio: 1 / 1; }
  .dplates { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.45rem; }
  .dplate { min-height: 1.9rem; font-size: 0.5rem; }

  .out__foot { flex-wrap: wrap; }
  .out__cap { overflow: visible; }
  .out__sub { display: none; }
  .sbar__tools { gap: 0.45rem; }
  .cap { flex-wrap: wrap; }
  .cap__line { white-space: normal; flex-basis: 100%; }
  .why { grid-template-columns: minmax(0, 1fr); }

  .tdrawer__bar { gap: 0.4rem; }
  .tdrawer__label, .tdrawer__kbd, .tdrawer__clear { display: none; }
  .tdrawer__pull { padding: 0.3rem 0.45rem; }
  .tdrawer__paper { font-size: 0.78rem; padding: 0.36rem 0.75rem; }
  .tdrawer__help { padding-left: 0.6em; padding-right: 0.6em; font-size: 0; }
  .tdrawer__help .tdrawer__q { margin-right: 0; font-size: 0.72rem; width: 1.3rem; height: 1.3rem; }
  .tdrawer__body { display: block; padding: 0 var(--gutter) 0.55rem; }
  .tdrawer__side { display: none; }
  .tdrawer__tw { padding-left: 0; }
  .tdrawer__tw .tw { width: 100%; margin-left: 0; margin-right: 0; }

  .sheet__grid { grid-template-columns: minmax(0, 1fr); }
  .vcards { grid-template-columns: minmax(0, 1fr); }
  .listen__cols { grid-template-columns: minmax(0, 1fr); }
  .eggs { grid-template-columns: minmax(0, 1fr); }

  .build-stages,
  .build-boxes { grid-template-columns: minmax(0, 1fr); }

  .con-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "ls" "bd" "tl" "tr" "se" "hw" "dg";
    grid-template-rows: none;
    margin-top: 0.5rem;
  }
  .con-listen, .con-build, .con-sensors, .con-timeline, .con-try, .con-hw, .con-diag {
    padding: 0;
    border-top: 1px solid var(--hair);
  }
  .con-grid > .con-panel:last-child { border-bottom: 1px solid var(--hair); }
  .con-panel__sum {
    position: relative;
    padding: 1.05rem 2.4rem 1.05rem 0;
    cursor: pointer;
    min-height: 3.2rem;
  }
  .con-panel__sum::after {
    content: "";
    position: absolute;
    right: 0.4rem;
    top: 1.35rem;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid var(--fg-2);
    border-bottom: 1.5px solid var(--fg-2);
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease);
  }
  .con-panel[open] > .con-panel__sum::after { transform: rotate(-135deg); top: 1.6rem; }
  .con-panel__n { font-size: 0.78rem; }
  .con-panel__body { padding-bottom: 1.6rem; }
  .tl__run { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; --lane-n: 4.6rem; }
  .con-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .con-diag__body { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
  .con-try__groups { column-count: 1; column-rule: 0; margin-top: 0.6rem; }
  .try__group { padding: 1rem 0 1.2rem; border-top: 1px solid var(--hair); }
}

@media (max-width: 560px) {
  .sbar__stop { padding-left: 0.7em; padding-right: 0.7em; }
  .mode { padding: 0.28rem 0.75rem 0.28rem 0.5rem; }
  .con-drawers { gap: 0.5rem; }
  .try__btn { grid-template-columns: minmax(0, 1fr); }
  .try__cap { justify-self: start; text-align: left; }
  .hw__readout > div { grid-template-columns: 5.4rem minmax(0, 1fr); gap: 0.7rem; }
  .fam-log__row { grid-template-columns: 3.6em 7.4em minmax(0, 1fr); gap: 0.6em; }
}

@media (prefers-reduced-motion: reduce) {
  .tdrawer, .tdrawer__chev, .mode, .ladder li, .cap__why svg { transition: none; }
  .tdrawer__paper::after, .cap__eq i, .dplate.is-hinted { animation: none; }
}
html[data-reduce-motion] .tdrawer,
html[data-reduce-motion] .tdrawer__chev { transition: none; }
html[data-reduce-motion] .tdrawer__paper::after,
html[data-reduce-motion] .cap__eq i,
html[data-reduce-motion] .dplate.is-hinted { animation: none; }
