/* The claudius website: the palette, type and parts of the studio (crates/claudius-ui/src/theme.rs) on a web page */

@font-face {
  font-family: "Hack";
  src: url("/assets/fonts/hack-regular-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #101217;
  --panel: #171a20;
  --raised: #20242c;
  --raised-hi: #2a2f39;
  --well: #0b0d11;
  --line: #2e333e;
  --line-soft: #1f232b;
  --line-hi: #4e5666;
  --text: #dde1e8;
  --text-dim: #8f97a4;
  --text-faint: #7d8594;
  --accent: #ffa348;
  --accent-hi: #ffb86f;
  --good: #54d486;
  --warn: #f6c04a;
  --bad: #f05e56;
  --lcd: #090f11;
  --lcd-text: #84e8ff;
  --lcd-mid: #5fa7b8;
  --lcd-low: #4f8a98;
  --lcd-edge: rgba(132, 232, 255, 0.18);
  --playhead: #ffecd6;

  --r-kick: #ff5e5e;
  --r-snare: #ff9242;
  --r-ohat: #ffd86e;
  --r-hat: #ecc45c;
  --r-perc: #d4a468;
  --r-bass: #a474ff;
  --r-chords: #40d4c6;
  --r-pad: #589eff;
  --r-lead: #ff6cc4;
  --r-arp: #70e07c;

  --k-intro: #4a7aba;
  --k-groove: #2ea6a0;
  --k-build: #dea63e;
  --k-drop: #e8524e;
  --k-break: #8a68cc;
  --k-outro: #626e88;

  --t-comment: #7d8a80;
  --t-string: #a6d680;
  --t-number: #c896ff;
  --t-func: #ffc470;
  --t-method: #6ecdf0;
  --t-keyword: #ff78aa;
  --t-punct: #8c94a0;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --mono: "Hack", ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  --header: 64px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hi);
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.86em;
}

:not(pre) > code {
  padding: 0.08em 0.36em;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--well);
  color: #e6e9ee;
  white-space: nowrap;
}

/* paths and URLs that are longer than a phone is wide */
:not(pre) > code.long {
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

::selection {
  background: rgba(255, 163, 72, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button {
  font: inherit;
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #101217;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* one column by default; long code lines scroll inside their block instead of widening the page */
.hero-grid,
.tracks,
.chain,
.script-grid,
.notes,
.script-more,
.shots,
.clients,
.platforms,
.sound-kinds,
.foot-in,
.studio-cta,
.tools,
.renders,
.steps {
  grid-template-columns: minmax(0, 1fr);
}

/* header */

.top {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 18, 23, 0.92);
}

.top-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  min-height: var(--header);
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: block;
  margin-right: auto;
  border-radius: 6px;
}

.brand img {
  width: 128px;
  height: auto;
}

.nav ul,
.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a,
.top-links a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
}

.nav a:hover,
.top-links a:hover,
.nav a[aria-current="true"] {
  background: var(--raised);
  color: var(--text);
}

.top-links a {
  color: var(--text);
}

@media (max-width: 899px) {
  .nav {
    order: 3;
    width: 100%;
    margin: 2px -10px 0;
  }

  .nav a {
    padding: 4px 10px;
    font-size: 0.875rem;
  }
}

@media (min-width: 900px) {
  .top {
    position: sticky;
    top: 0;
    backdrop-filter: saturate(140%) blur(10px);
  }
}

/* sections */

.section {
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--line-soft);
}

.section-alt {
  background: var(--panel);
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 1.25rem + 1.9vw, 2.65rem);
  letter-spacing: -0.02em;
}

.section-head > p:not(.channel) {
  color: var(--text-dim);
  font-size: 1.08rem;
}

.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.channel span {
  padding: 5px 7px 4px;
  border: 1px solid var(--lcd-edge);
  border-radius: 4px;
  background: var(--lcd);
  color: var(--lcd-text);
  letter-spacing: 0.06em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  font-size: 0.95rem;
}

.links a::after {
  content: " →";
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--line-hi);
  background: var(--raised-hi);
  color: #fff;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #101217;
}

.btn-primary:hover {
  border-color: var(--accent-hi);
  background: var(--accent-hi);
  color: #101217;
}

/* hero */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 64px;
  }
}

.tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.chip {
  padding: 4px 8px 3px;
  border: 1px solid var(--lcd-edge);
  border-radius: 5px;
  background: var(--lcd);
  color: var(--lcd-text);
  font: 400 0.8rem/1.2 var(--mono);
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 26px;
  font-size: clamp(2.45rem, 1.35rem + 4.1vw, 4.6rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.032em;
}

.lede {
  max-width: 60ch;
  margin-bottom: 32px;
  color: #b9c0cb;
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* install box and commands */

.install {
  max-width: 600px;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: -1px;
}

.tabs [role="tab"] {
  position: relative;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: none;
  color: var(--text-dim);
  font-size: 0.86rem;
  cursor: pointer;
}

.tabs [role="tab"]:hover {
  color: var(--text);
}

.tabs [role="tab"][aria-selected="true"] {
  border-color: var(--line);
  background: var(--well);
  color: var(--text);
}

.tabs [role="tab"]:focus-visible {
  outline-offset: -2px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 0 10px 10px 10px;
  background: var(--well);
}

.cmd[hidden] {
  display: none;
}

.platform .cmd,
.cmd:only-child {
  border-radius: 10px;
}

.cmd pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 0;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre;
  scrollbar-width: thin;
}

.cmd code {
  color: var(--text);
}

.prompt {
  color: var(--text-faint);
  user-select: none;
}

.copy {
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--line-hi);
  background: var(--raised-hi);
}

.copy.is-done {
  border-color: rgba(84, 212, 134, 0.6);
  color: var(--good);
}

/* LCD readouts, like the studio's transport display */

.lcd {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  min-width: 0;
  padding: 7px 12px 6px;
  border: 1px solid var(--lcd-edge);
  border-radius: 6px;
  background: var(--lcd);
  color: var(--lcd-text);
  font-family: var(--mono);
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lcd-time {
  font-size: 1.2rem;
}

.lcd-dur {
  color: var(--lcd-low);
  font-size: 0.7rem;
}

.lcd-status {
  justify-self: end;
  color: var(--lcd-mid);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.lcd-status.is-play {
  color: var(--lcd-text);
}

.lcd-pos {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--lcd-mid);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
}

.lcd-sm .lcd-time {
  font-size: 1.02rem;
}

/* score badge, coloured like the studio's (green from 80) */

.score {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border: 2px solid var(--good);
  border-radius: 50%;
  color: var(--good);
  font: 400 0.95rem/1 var(--mono);
}

/* play buttons */

.play {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
}

.play:hover {
  border-color: var(--line-hi);
  background: var(--raised-hi);
}

.play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.play .i-pause,
.play[aria-pressed="true"] .i-play {
  display: none;
}

.play[aria-pressed="true"] .i-pause {
  display: block;
}

.play[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #101217;
}

.play-lg {
  width: 52px;
  height: 52px;
  border-radius: 11px;
}

.play-lg svg {
  width: 24px;
  height: 24px;
}

/* the hero unit: a strip of the studio */

.unit {
  margin: 0;
  padding: clamp(14px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #1a1d24, var(--panel) 30%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

.unit-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-top .lcd {
  flex: 1;
}

.unit-title {
  margin: 14px 0 16px;
  color: var(--text);
  font: 400 0.82rem/1.4 var(--mono);
}

.unit-title span {
  color: var(--text-dim);
}

.unit figcaption,
.steps-card figcaption {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* step grid */

.steps {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--well);
}

.lane,
.steps-ruler {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.steps-ruler {
  grid-template-columns: 52px repeat(4, minmax(0, 1fr));
  column-gap: 8px;
  color: var(--text-faint);
  font: 400 0.68rem/1 var(--mono);
}

.steps-ruler::before {
  content: "";
}

.lane-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--text-dim);
  font: 400 0.72rem/1 var(--mono);
  white-space: nowrap;
}

.lane-name::before {
  content: "";
  flex: none;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--c);
}

.lane[data-role="kick"] { --c: var(--r-kick); }
.lane[data-role="clap"],
.lane[data-role="snare"] { --c: var(--r-snare); }
.lane[data-role="hat"],
.lane[data-role="shaker"] { --c: var(--r-hat); }
.lane[data-role="ohat"] { --c: var(--r-ohat); }
.lane[data-role="perc"] { --c: var(--r-perc); }

.cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 24px;
}

.beat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.beat {
  --empty: #1b1f26;
}

.beat:nth-child(odd) {
  --empty: #20242c;
}

.cell {
  height: 24px;
  border-radius: 3px;
  background: var(--empty);
  transition: background-color 80ms linear, opacity 120ms linear;
}

.cell.v1 {
  background: color-mix(in srgb, var(--c) 42%, #20242c);
}

.cell.v2 {
  background: color-mix(in srgb, var(--c) 78%, #20242c);
}

.cell.v3 {
  background: var(--c);
}

.lane.is-out .cells {
  opacity: 0.28;
}

.lane.is-out .lane-name {
  color: var(--text-faint);
}

.cell.is-now {
  box-shadow: 0 0 0 1px var(--playhead) inset;
}

.cell.is-now.v1,
.cell.is-now.v2,
.cell.is-now.v3 {
  background: var(--playhead);
}

@media (prefers-reduced-motion: reduce) {
  .cell {
    transition: none;
  }
}

/* the song's form under the hero grid */

.form-strip {
  position: relative;
  display: grid;
  height: 22px;
  margin-top: 14px;
}

/* bars per section, so the excerpt window below lines up exactly */
.form-strip[data-form-for="golden-pulse"] {
  grid-template-columns: minmax(0, 16fr) minmax(0, 16fr) minmax(0, 24fr) minmax(0, 8fr) minmax(0, 32fr) minmax(0, 16fr);
}

.form-strip .sec {
  min-width: 0;
  overflow: hidden;
  padding: 5px 0 0 6px;
  background: color-mix(in srgb, var(--kc) 50%, #101217);
  box-shadow: inset -2px 0 0 var(--panel);
  color: #f2f4f7;
  font: 400 0.62rem/1 var(--mono);
  white-space: nowrap;
}

.form-strip .sec:first-child {
  border-radius: 4px 0 0 4px;
}

.form-strip .sec:nth-last-child(3) {
  border-radius: 0 4px 4px 0;
  box-shadow: none;
}

.form-strip .k-intro { --kc: var(--k-intro); }
.form-strip .k-groove { --kc: var(--k-groove); }
.form-strip .k-break { --kc: var(--k-break); }
.form-strip .k-build { --kc: var(--k-build); }
.form-strip .k-drop { --kc: var(--k-drop); }
.form-strip .k-outro { --kc: var(--k-outro); }

.form-window {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 55.357%;
  width: 18.75%;
  border: 1px solid var(--playhead);
  border-radius: 4px;
  pointer-events: none;
}

.form-head {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 55.357%;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--playhead);
  opacity: 0;
  pointer-events: none;
}

.form-head.is-on {
  opacity: 1;
}

.form-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text-faint);
  font: 400 0.68rem/1.3 var(--mono);
}

/* tracks */

.tracks {
  display: grid;
  gap: 16px;
}

.track {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.track.is-playing,
.track.is-selected {
  border-color: var(--line-hi);
}

.track-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "play name score"
    "lcd lcd lcd";
  align-items: center;
  gap: 12px 14px;
}

.track-row .play { grid-area: play; }
.track-row .track-name { grid-area: name; }
.track-row .lcd { grid-area: lcd; }
.track-row .score { grid-area: score; }

@media (min-width: 560px) {
  .track-row {
    grid-template-columns: auto minmax(0, 1fr) minmax(170px, auto) auto;
    grid-template-areas: "play name lcd score";
  }
}

.track-name {
  min-width: 0;
}

.track-name h3 {
  font-size: 1.12rem;
}

.track-name p {
  margin: 3px 0 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.wave {
  position: relative;
  height: 72px;
  margin-top: 14px;
  border-radius: 6px;
  background: var(--well);
  cursor: pointer;
  touch-action: none;
}

.wave:focus-visible {
  outline-offset: 2px;
}

.wave canvas {
  width: 100%;
  height: 100%;
}

.track audio {
  display: none;
}

.track-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 12px 0 0;
  font-size: 0.86rem;
}

.track-foot a {
  color: var(--text-dim);
}

.track-foot a:hover {
  color: var(--text);
}

.made-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-right: auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.made-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.made-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.made-toggle[aria-expanded="true"]::after {
  transform: translateY(1px) rotate(-135deg);
}

.made {
  display: none;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--well);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.made.is-open {
  display: block;
  margin-top: 8px;
}

.made h4 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.made > p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.code-label {
  margin: 18px 0 6px;
  color: var(--text-dim);
  font: 400 0.7rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-label span {
  letter-spacing: 0;
  text-transform: none;
}

.made .code {
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* desktop: tracks on the left, how each was made on the right */

@media (min-width: 1040px) {
  .tracks {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 28px;
  }

  .track-block {
    display: contents;
  }

  .track {
    grid-column: 1;
  }

  .track-block:nth-child(1) .track { grid-row: 1; }
  .track-block:nth-child(2) .track { grid-row: 2; }
  .track-block:nth-child(3) .track { grid-row: 3; }
  .track-block:nth-child(4) .track { grid-row: 4; }

  .made,
  .made.is-open {
    display: none;
    grid-column: 2;
    grid-row: 1 / span 4;
    margin: 0;
    overflow: auto;
    contain: size;
  }

  .made.is-active {
    display: block;
  }
}

.credits {
  max-width: 880px;
  margin-top: 40px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.credits h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.credits ul {
  margin: 0;
  padding-left: 1.1em;
}

.credits li + li {
  margin-top: 4px;
}

/* code */

.code {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--well);
  color: #d6dae2;
  font-size: 0.8rem;
  line-height: 1.65;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.code code {
  font-size: inherit;
}

.code-out {
  border-color: rgba(132, 232, 255, 0.12);
  background: var(--lcd);
  color: #9fdcea;
}

.t-c { color: var(--t-comment); font-style: italic; }
.t-s { color: var(--t-string); }
.t-n { color: var(--t-number); }
.t-f { color: var(--t-func); }
.t-m { color: var(--t-method); }
.t-k { color: var(--t-keyword); }
.t-p { color: var(--t-punct); }

.readout {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--lcd-edge);
  border-radius: 6px;
  background: var(--lcd);
  color: var(--lcd-text);
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* how it works: four modules in a chain */

.chain {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 720px) {
  .chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .chain {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.module h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.module-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font: 400 0.8rem/1 var(--mono);
}

.module > p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.module .readout {
  margin-top: auto;
}

.module > p + .readout {
  margin-top: 16px;
}

/* the patch cable between modules */
@media (min-width: 1140px) {
  .module:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 33px;
    right: -23px;
    width: 24px;
    height: 2px;
    background: var(--accent);
    opacity: 0.6;
  }

  .module:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 29px;
    left: -6px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
  }
}

.revise {
  margin-top: 40px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.revise h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.revise > p {
  color: var(--text-dim);
}

.renders {
  display: grid;
  gap: 22px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.renders li {
  position: relative;
  padding-left: 22px;
  border-left: 2px solid var(--line);
}

.renders li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-hi);
  border-radius: 50%;
  background: var(--bg);
}

.renders li:last-child::before {
  border-color: var(--good);
  background: var(--good);
}

.render-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 400 0.8rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.render-n {
  color: var(--text);
}

.render-score {
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 10px;
  letter-spacing: 0;
}

.score-mid {
  color: var(--warn);
}

.score-good {
  color: var(--good);
}

.renders .readout {
  margin-top: 10px;
}

.render-fix {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.aside {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* script */

.script-grid {
  display: grid;
  gap: 28px;
}

.code-main {
  font-size: 0.8rem;
}

.notes {
  display: grid;
  gap: 18px 28px;
  margin: 0;
}

@media (min-width: 720px) {
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notes div {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.notes dt {
  margin-bottom: 6px;
}

.notes dt code {
  white-space: normal;
  word-break: break-word;
}

.notes dd {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.script-more {
  display: grid;
  gap: 32px;
  margin-top: 48px;
}

@media (min-width: 1040px) {
  .script-more {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: start;
  }
}

.steps-card {
  margin: 0;
}

.script-run h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.script-run .code {
  margin-bottom: 18px;
}

.script-run p {
  color: var(--text-dim);
}

/* studio */

.shot {
  min-width: 0;
  margin: 0;
}

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.shot figcaption {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.shot figcaption strong {
  color: var(--text);
  font-weight: 600;
}

.shot-main img {
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.8);
}

.shots {
  display: grid;
  gap: 28px;
  margin-top: 40px;
}

/* the details at their own size, so the small type in them stays sharp */
.shots .shot img {
  width: auto;
  max-width: 100%;
}

@media (min-width: 900px) {
  .shots {
    grid-template-columns: 358px minmax(0, 1fr);
    grid-template-areas:
      "verdict mixer"
      "verdict harmony";
    gap: 32px 40px;
    align-items: start;
  }

  .shot-mixer { grid-area: mixer; }
  .shot-verdict { grid-area: verdict; }
  .shot-harmony { grid-area: harmony; }
}

.studio-cta {
  display: grid;
  gap: 16px;
  align-items: center;
  max-width: 900px;
  margin-top: 48px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.studio-cta p {
  margin: 0;
  color: var(--text-dim);
}

@media (min-width: 720px) {
  .studio-cta {
    grid-template-columns: auto 1fr;
    gap: 24px;
  }
}

/* assistants */

.clients {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 28px;
  }

  .client-wide h3,
  .client-wide > p:first-of-type {
    grid-column: 1;
  }

  .client-wide .code {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    margin: 0;
  }

  .client-wide > p:last-of-type {
    grid-column: 1;
  }
}

.client {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.client h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.client h3:not(:first-child) {
  margin-top: 22px;
}

.client p {
  color: var(--text-dim);
  font-size: 0.93rem;
}

.client .code {
  margin: 0 0 14px;
}

.tools {
  display: grid;
  gap: 18px;
  margin-top: 40px;
}

.tools-label {
  margin: 0;
  color: var(--text-dim);
  font: 400 0.72rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list code {
  display: block;
  padding: 5px 9px;
  border-color: var(--line);
  background: var(--raised);
  font-size: 0.8rem;
}

.prompt-example {
  max-width: 720px;
  margin: 10px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--panel);
}

.prompt-example p {
  font-size: 1.1rem;
}

.prompt-example footer {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* sounds */

.sound-kinds {
  display: grid;
  gap: 28px;
  margin-bottom: 40px;
}

.sound-kinds:last-of-type {
  margin: 40px 0 0;
}

@media (min-width: 800px) {
  .sound-kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }
}

.kind h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.kind p {
  color: var(--text-dim);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.packs {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.packs caption {
  padding: 14px 16px 12px;
  color: var(--text-dim);
  font: 400 0.72rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.packs th,
.packs td {
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.packs thead th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.82rem;
}

.packs tbody th {
  font-weight: 400;
  white-space: nowrap;
}

.packs td:last-child {
  white-space: nowrap;
}

.packs td:nth-child(2) {
  color: #c3c9d3;
}

/* phones: three narrow columns that wrap instead of a table that scrolls */
@media (max-width: 600px) {
  .packs {
    min-width: 0;
    font-size: 0.86rem;
  }

  .packs th,
  .packs td {
    padding: 9px 10px;
  }

  .packs td:last-child {
    white-space: normal;
  }
}

/* install */

.platforms {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-wide {
    grid-column: 1 / -1;
  }
}

.platform .platform-note:last-child {
  margin: 10px 0 0;
}

.platform {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.platform h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.platform .cmd pre {
  font-size: 0.8rem;
}

.platform-note {
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.first-steps {
  max-width: 900px;
  margin-top: 40px;
}

.first-steps h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.first-steps .code {
  margin-bottom: 18px;
}

.first-steps p {
  color: var(--text-dim);
}

/* footer */

.foot {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.foot-in {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .foot-in {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .foot-note {
    grid-column: 1 / -1;
  }
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-brand p {
  margin: 0;
  color: var(--text);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .foot-links {
    justify-content: flex-end;
  }
}

.foot-links a {
  color: var(--text);
}

.foot-note {
  max-width: 70ch;
  margin: 0;
  font-size: 0.85rem;
}

.foot-note a {
  color: var(--text-dim);
}

/* 404 */

.lost {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
  padding: 80px 0;
}

.lost-in {
  width: 100%;
  max-width: 560px;
}

.lost .lcd {
  margin-bottom: 28px;
}

.lost h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  letter-spacing: -0.02em;
}

.lost p {
  color: var(--text-dim);
}

.lost .hero-actions {
  margin-top: 28px;
}

@media (forced-colors: active) {
  .cell.v1,
  .cell.v2,
  .cell.v3 {
    background: CanvasText;
  }

  .play[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
}

@media print {
  .top,
  .hero-actions,
  .unit,
  .wave,
  .made-toggle {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
