:root {
  --paper: #EEF3F1; --ink: #0F2329; --petrol: #0E2A2F; --petrol-2: #14383E; --amber: #F5A700; --amber-soft: rgba(245, 167, 0, .16);
  --mint: #8FD6C0; --line: #C5D3CF; --muted: #44585B; --on-dark: #E6F0ED; --on-dark-muted: #A9C2BD; --bad: #FFB4A3; --bad-ink: #A12A12;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.125rem; line-height: 1.6; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: 3.4rem; font-size: clamp(2.5rem, 7vw, 4.6rem); max-width: 14ch; }
h2 { font-size: 2rem; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
p, ul, ol { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 9; }
.skip:focus { left: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.small { font-size: .95rem; color: var(--muted); }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 20px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; text-decoration: none; }
.mark__bars { fill: var(--ink); }
.mark__bars rect:nth-child(2) { fill: var(--amber); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.navlink { font-weight: 700; text-decoration: none; }
.navlink:hover, .navlink[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--amber); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--amber); border-radius: 999px; padding: .7em 1.5em; min-height: 52px; cursor: pointer; }
.btn:hover { background: #FFB92A; border-color: #FFB92A; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--small { min-height: 42px; padding: .35em 1.1em; }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark-muted); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--on-dark); }
.btn--ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost-dark:hover { background: rgba(15, 35, 41, .06); border-color: var(--ink); }

/* hero */
.hero { padding-top: clamp(20px, 5vw, 56px); }
.hero .lede { margin-top: 20px; }
.lede { font-size: 1.3rem; max-width: 56ch; }

/* studio */
.studio { margin-top: clamp(28px, 4vw, 44px); background: var(--petrol); color: var(--on-dark); border-radius: 28px; padding: clamp(20px, 4vw, 40px); }
.studio :focus-visible { outline-color: var(--amber); }
.studio__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-bottom: 26px; }
.studio h2 { color: #fff; }
.studio__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .studio__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; } }
.studio__col > * + * { margin-top: 22px; }
.studio fieldset { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.studio legend, .words__label { display: block; padding: 0; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; margin-bottom: 8px; color: #fff; }
.hint { font-size: .95rem; color: var(--on-dark-muted); }
.hint--row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.studio__col > .hint { margin-top: 12px; }

/* the keypad */
.keys__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.key { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--on-dark); background: var(--petrol-2); border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 12px 14px; min-height: 64px; cursor: pointer; }
.key b { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--amber); min-width: .7em; }
.key span { font-weight: 700; line-height: 1.2; }
.key:hover { border-color: rgba(255, 255, 255, .45); }
.key[aria-pressed="true"] { border-color: var(--amber); background: var(--amber-soft); }

/* voices and speed */
.voices__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.voice, .seg { position: relative; display: block; cursor: pointer; }
.voice input, .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.voice__b { display: block; background: var(--petrol-2); border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 10px 14px; height: 100%; }
.voice__b b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: #fff; }
.voice__b i { display: block; font-style: normal; font-size: .9rem; line-height: 1.3; color: var(--on-dark-muted); }
.voice:hover .voice__b { border-color: rgba(255, 255, 255, .45); }
.voice input:checked + .voice__b { border-color: var(--amber); background: var(--amber-soft); }
.voice input:focus-visible + .voice__b, .seg input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.speeds__row { display: flex; flex-wrap: wrap; gap: 10px; }
.seg span { display: block; font-weight: 700; background: var(--petrol-2); border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 8px 18px; min-height: 44px; line-height: 1.7; }
.seg input:checked + span { border-color: var(--amber); background: var(--amber-soft); color: #fff; }

/* words and actions */
#words { display: block; width: 100%; min-height: 15rem; resize: vertical; font: inherit; font-size: 1.125rem; line-height: 1.55; color: #fff; background: #0A2024; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: 16px 18px; }
#words:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-color: var(--amber); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.msg { min-height: 1.5em; font-size: 1rem; color: var(--mint); }
.msg--bad { color: var(--bad); font-weight: 700; }
.studio audio { display: block; width: 100%; margin-top: 8px; }

/* the waveform */
.wave { display: flex; align-items: center; gap: 4px; height: 52px; flex: 1 1 220px; max-width: 460px; }
.wave span { flex: 1 1 0; min-width: 3px; height: var(--h); background: var(--mint); border-radius: 3px; opacity: .55; transform-origin: center; }
.wave--on span { opacity: 1; background: var(--amber); animation: bar .9s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes bar { from { transform: scaleY(.35); } to { transform: scaleY(1.15); } }
@media (prefers-reduced-motion: reduce) { .wave--on span { animation: none; } html { scroll-behavior: auto; } }

/* sections */
.band { padding-block: clamp(52px, 8vw, 96px); }
.band--tight { padding-block: 0 clamp(52px, 8vw, 88px); }
.band--page { padding-block: clamp(28px, 5vw, 64px) clamp(52px, 8vw, 96px); }
.band--ink { background: var(--ink); color: var(--on-dark); }
.band--ink h2 { color: #fff; }
.band--ink .lede { margin-top: 14px; color: var(--on-dark); }
.band h2 + .lede { margin-top: 14px; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; } }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }
.steps p { margin-top: 8px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 800px) { .split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; } }
.plain { list-style: none; padding: 0; }
.plain li { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); font-weight: 700; }
.plain li:first-child { border-top: 1px solid rgba(255, 255, 255, .2); }
.plain--dash li { border-color: var(--line); }
.plain--dash li:first-child { border-top-color: var(--line); }

/* questions, legal pages, download page */
details { border-bottom: 1px solid var(--line); padding-block: 4px; }
details:first-of-type { margin-top: 28px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 16px; max-width: 62ch; color: var(--muted); }
.prose h2 { font-size: 1.5rem; margin-top: 32px; }
.prose p { margin-top: 10px; max-width: 66ch; }
.prose h1 + p { margin-top: 12px; }
.band--page h1 { max-width: none; }
.keep { margin-top: 18px; background: var(--amber-soft); border-left: 5px solid var(--amber); border-radius: 10px; padding: 14px 18px; max-width: 66ch; }
.files { margin-top: 28px; display: grid; gap: 16px; }
.file { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; display: grid; gap: 12px; }
.file audio { width: 100%; }
.file .btn { justify-self: start; }
.said { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; white-space: pre-wrap; }
.files + h2, .said + h2 { margin-top: 36px; }
.band--page h2 { margin-top: 36px; }
.band--page h2 + p { margin-top: 10px; max-width: 66ch; }

/* footer */
.foot { background: var(--ink); color: #BFD2CE; padding-block: 36px; font-size: 1rem; }
.foot .wrap > * + * { margin-top: 6px; }
.foot a { color: #fff; }

@media (max-width: 520px) {
  .voices__grid { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { width: 100%; }
}
