/* Riff tabletop. Karshu design system: black page, Jost, square corners,
   hairlines, one signal square per view (here: the live listening marker). */
@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap");

:root {
  --bg: #000000; --fg: #f5f5f3; --muted: #a3a3a0; --line: #2a2a2a; --field: #0d0d0d;
  --accent: #ffffff; --on-fg: #000000; --signal: #4bff00;
  --font-sans: "Futura PT", "Futura", "Jost", "Century Gothic", "Avenir Next", sans-serif;
  --space-8: 8px; --space-10: 10px; --space-14: 14px; --space-16: 16px; --space-22: 22px;
  --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-48: 48px; --space-64: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--space-24); }
@media (max-width: 760px) { .wrap { padding: 0 var(--space-16); } }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-16); padding: var(--space-24) 0; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--fg); font-weight: 500; font-size: 17.6px; letter-spacing: 0.42em; text-transform: uppercase; text-decoration: none; }
.code { font-size: 12.8px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.code b { color: var(--fg); font-weight: 500; }

/* Type */
.eyebrow, .label { margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.display { font-weight: 400; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.05; letter-spacing: -0.01em; max-width: 14ch; margin: var(--space-24) 0; }
.headline { font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 var(--space-24); }
.lead { font-weight: 300; font-size: 20.8px; color: var(--muted); max-width: 46ch; margin: 0 0 var(--space-40); }
.muted { color: var(--muted); }
.small { font-size: 13.6px; }

/* Buttons */
.btn { display: inline-block; font-family: var(--font-sans); font-size: 13.6px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; line-height: 1.2; padding: var(--space-16) var(--space-32); border: 1px solid var(--fg); border-radius: 0; cursor: pointer; transition: background .2s, color .2s; background: transparent; color: var(--fg); }
.btn:hover { background: var(--fg); color: var(--on-fg); }
.btn-solid { background: var(--fg); color: var(--on-fg); }
.btn-solid:hover { background: transparent; color: var(--fg); }
.btn-small { padding: var(--space-10) var(--space-16); font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-14); align-items: center; }

/* Fields */
.field { display: block; min-width: 0; }
.field label { display: block; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-8); }
.field input { width: 100%; background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 0; font-family: var(--font-sans); font-size: 16px; padding: var(--space-14) var(--space-16); }
.field input:focus { border-color: var(--fg); outline: none; }
.code-input { text-transform: uppercase; letter-spacing: 0.4em; }
.check { display: flex; gap: var(--space-14); align-items: flex-start; font-weight: 300; }
.check input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--fg); flex: none; }

/* Sections */
.section { border-top: 1px solid var(--line); padding: var(--space-40) 0; }
.section:first-of-type { border-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-48) var(--space-40); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: var(--space-22); }

/* Status bar: the one signal square lives here, only while a mic is live */
.status { display: flex; align-items: center; gap: var(--space-14); padding: var(--space-16) 0; border-bottom: 1px solid var(--line); font-size: 12.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.status .dot { width: 10px; height: 10px; border: 1px solid var(--muted); flex: none; }
.status.live { color: var(--fg); }
.status.live .dot { background: var(--signal); border-color: var(--signal); }
.status.paused .dot { border-style: dashed; }
@media (prefers-reduced-motion: no-preference) { .status.live .dot { animation: breathe 2.4s ease-in-out infinite; } }
@keyframes breathe { 50% { opacity: .45; } }

/* Dial */
.dial { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.dial button { font-family: var(--font-sans); background: transparent; color: var(--muted); border: 0; border-left: 1px solid var(--line); padding: var(--space-14) var(--space-8); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; }
.dial button:first-child { border-left: 0; }
.dial button[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.card { border-top: 1px solid var(--line); padding: var(--space-22) 0; display: grid; gap: var(--space-8); }
.card:first-child { border-top: 0; }
.card-meta { display: flex; justify-content: space-between; gap: var(--space-14); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; font-weight: 500; font-size: 20px; line-height: 1.3; }
.card p { margin: 0; font-weight: 300; color: var(--fg); }
.card .src { font-size: 13.6px; color: var(--muted); }
.card .x { background: none; border: 0; color: var(--muted); font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; padding: 0; }
.card.low h3::after { content: " (unsure)"; color: var(--muted); font-weight: 300; font-size: 14px; }
.empty { color: var(--muted); font-weight: 300; padding: var(--space-22) 0; }

/* Transcript */
.transcript { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; font-weight: 300; }
.transcript li { padding: var(--space-8) 0; border-top: 1px solid var(--line); }
.transcript li:first-child { border-top: 0; }
.transcript b { font-weight: 500; margin-right: var(--space-8); }
.transcript .interim { color: var(--muted); }

.notice { border: 1px solid var(--line); padding: var(--space-16); font-weight: 300; }
.error { color: var(--fg); border-color: var(--fg); }

/* Big screen */
.screen body, body.screen { overflow: hidden; }
.screen-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4vh 5vw 2vh; border-bottom: 1px solid var(--line); }
.screen-join { text-align: right; font-size: clamp(14px, 1.4vw, 20px); color: var(--muted); letter-spacing: 0.1em; }
.screen-join b { display: block; color: var(--fg); font-weight: 500; font-size: clamp(28px, 4vw, 64px); letter-spacing: 0.4em; }
.screen-cards { list-style: none; margin: 0; padding: 3vh 5vw; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 32vw), 1fr)); gap: 0 4vw; }
.screen-cards .card { padding: 3vh 0; }
.screen-cards .card h3 { font-size: clamp(22px, 2.4vw, 44px); line-height: 1.15; font-weight: 400; }
.screen-cards .card p { font-size: clamp(16px, 1.5vw, 26px); }
.screen-cards .card-meta, .screen-cards .card .src { font-size: clamp(11px, 0.9vw, 16px); }
.screen-idle { padding: 12vh 5vw; }
.screen-idle .display { max-width: 18ch; }
