/* Soapbox — playbill / ticket-stub. Cream paper, ink, one vermilion. */
:root {
  --paper: #f3ead6;
  --paper-deep: #e9dcc0;
  --paper-edge: #d9c9a4;
  --ink: #17140f;
  --ink-soft: #4a433a;
  --ink-faint: #8a7f6d;
  --red: #d23a1c;
  --red-deep: #a82b12;
  --ok: #2f7a4a;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --radius: 6px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 0;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100dvh;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(210, 58, 28, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(23, 20, 15, 0.08), transparent 60%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  font-family: var(--mono); font-size: 0.68em; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px;
  opacity: 0.7; vertical-align: middle; margin-left: 6px; letter-spacing: 0.04em;
}
a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- masthead ---------- */
.masthead {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  padding: clamp(24px, 4vw, 48px) var(--gutter) 0;
  border-bottom: 2px solid var(--ink);
  margin: 0 var(--gutter);
  padding-left: 0; padding-right: 0;
}
.wordmark {
  margin: 0; font-weight: 900; font-size: clamp(64px, 11vw, 148px); line-height: 0.82; letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  padding-bottom: 0.14em; /* room for the p descender */
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.wordmark__box { font-style: italic; font-weight: 300; color: var(--red); }
.tagline {
  margin: 12px 0 14px; font-size: 1.05rem; color: var(--ink-soft); max-width: 44ch;
  animation: rise 0.9s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tagline em { color: var(--ink); }
.ledger {
  display: grid; grid-template-columns: repeat(5, auto); gap: 0 28px; margin: 0 0 16px; padding: 0;
  font-family: var(--mono); animation: rise 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ledger div { display: flex; flex-direction: column; }
.ledger dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }
.ledger dd { margin: 0; font-size: 1.6rem; font-family: var(--display); font-weight: 600; font-variation-settings: "opsz" 60; line-height: 1.1; }

/* ---------- stage ---------- */
.stage { position: relative; z-index: 1; padding: 0 var(--gutter) 40px; max-width: 1280px; margin: 0 auto; }

.booth { padding: 22px 0 18px; }
.booth__row { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.modes { display: flex; margin: 0; padding: 0; border: 0; gap: 0; }
.mode { position: relative; }
.mode input { position: absolute; opacity: 0; inset: 0; }
.mode span {
  display: inline-flex; align-items: center; height: 50px; padding: 0 18px; border: 2px solid var(--ink);
  margin-left: -2px; font-family: var(--mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em;
  background: transparent; transition: background 0.15s, color 0.15s; user-select: none;
}
.mode:first-child span { margin-left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.mode:last-child span { border-radius: 0 var(--radius) var(--radius) 0; }
.mode input:checked + span { background: var(--ink); color: var(--paper); }
.mode input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.select { display: flex; align-items: center; gap: 10px; flex: 2 1 200px; min-width: 0; border-bottom: 2px solid var(--ink); }
.select--depth { flex: 1 1 170px; }
.select__label { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.select select {
  flex: 1; min-width: 0; width: 100%; appearance: none; background: transparent; border: 0; font: inherit; font-size: 1.1rem; font-style: italic; color: var(--ink);
  padding: 8px 0; cursor: pointer; outline-offset: 4px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath d='M1 1l6 7 6-7' fill='none' stroke='%2317140f' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; padding-right: 26px;
}
.draw {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 26px; border: 0; border-radius: var(--radius);
  background: var(--red); color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  box-shadow: 0 2px 0 var(--red-deep), 0 10px 24px -10px rgba(210, 58, 28, 0.6);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.draw:hover { background: var(--red-deep); transform: translateY(-1px); }
.draw:active { transform: translateY(1px); box-shadow: 0 0 0 var(--red-deep); }
.draw[disabled] { opacity: 0.6; cursor: progress; }
.draw kbd { color: var(--paper); border-color: rgba(243, 234, 214, 0.6); }

/* ---------- ticket ---------- */
.ticket-wrap { padding: 6px 0 26px; perspective: 1400px; }
.ticket {
  position: relative; display: grid; grid-template-columns: 72px 1fr; min-height: 380px;
  background: #fbf6ea; color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--paper-edge), 0 30px 60px -30px rgba(23, 20, 15, 0.45), 0 2px 6px rgba(23, 20, 15, 0.08);
  transform-origin: 50% 0;
  animation: deal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ticket.is-dealing { animation: deal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ticket::before { /* perforation */
  content: ""; position: absolute; top: 0; bottom: 0; left: 72px; width: 0; border-left: 2px dashed var(--paper-edge);
}
.ticket::after, .ticket__stub::after { /* punched notches, top + bottom of the perforation */
  content: ""; position: absolute; left: 60px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); z-index: 1;
}
.ticket::after { top: -12px; }
.ticket__stub::after { bottom: -12px; }
.ticket__stub {
  position: static; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 20px 0;
  border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(180deg, #f7efdd, #efe3c9);
}
.stub__mode {
  writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.3em;
  font-size: 0.78rem; color: var(--red); font-weight: 500;
}
.stub__no { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); letter-spacing: 0.1em; }
.ticket__body { position: relative; padding: clamp(22px, 4vw, 44px) clamp(22px, 4vw, 48px); }
.ticket__empty { max-width: 48ch; color: var(--ink-soft); padding-top: 30px; }
.ticket__empty-title { font-size: 1.8rem; font-weight: 600; font-style: italic; color: var(--ink); margin: 0 0 8px; font-variation-settings: "opsz" 60, "SOFT" 100; }
.eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.eyebrow .dot { color: var(--red); margin: 0 4px; }
.topic {
  margin: 0; font-weight: 800; font-size: clamp(38px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1; text-wrap: balance;
}
/* scale the headline to its length so long research titles don't become four giant lines */
.topic[data-size="m"] { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.02; }
.topic[data-size="l"] { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.topic[data-size="xl"] { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; font-variation-settings: "opsz" 72, "SOFT" 40, "WONK" 0; }
/* text runs in word by word when a ticket is dealt */
.runin .w { display: inline-block; opacity: 0; transform: translateY(0.35em); animation: wordin 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: calc(var(--i) * 26ms); }
.runin strong .w, .runin em .w { display: inline-block; }
@keyframes wordin { to { opacity: 1; transform: none; } }
.topic.is-shuffling { color: var(--ink-faint); font-style: italic; font-weight: 500; }
.summary { margin: 14px 0 0; color: var(--ink-soft); font-style: italic; max-width: 64ch; text-wrap: pretty; }
.prompt { margin: 22px 0 0; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.4; max-width: 58ch; text-wrap: pretty; font-variation-settings: "opsz" 24; }
.prompt strong { font-weight: 700; background: linear-gradient(transparent 62%, rgba(210, 58, 28, 0.22) 62%); }
.twist { margin: 18px 0 0; padding: 10px 14px; border-left: 3px solid var(--red); background: rgba(210, 58, 28, 0.06); max-width: 58ch; font-style: italic; }
.twist__tag { font-family: var(--mono); font-style: normal; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--red); margin-right: 8px; }
.times { display: flex; gap: 24px; margin: 22px 0 0; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.times b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1.1; }

.lookups { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.lookups__label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin-right: 4px; }
.lookup { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-family: var(--mono); font-size: 0.74rem; text-decoration: none; transition: background 0.12s, color 0.12s; }
.lookup:hover { background: var(--ink); color: var(--paper); }
.lookup--hot { border-color: var(--red); color: var(--red); }
.lookup--hot:hover { background: var(--red); color: var(--paper); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; font-size: 0.66rem; letter-spacing: 0.1em; margin-left: 4px; vertical-align: 1px; }
.badge--easy { color: var(--ok); } .badge--deep { color: var(--red); } .badge--standard { color: var(--ink-faint); }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--paper-edge); }
.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: var(--radius); border: 2px solid var(--ink);
  background: transparent; font-weight: 600; transition: background 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--red); border-color: var(--red); }
.btn--ghost:hover { background: rgba(23, 20, 15, 0.06); }
.btn--small { height: 36px; padding: 0 14px; font-size: 0.92rem; }
.btn--ink kbd { color: var(--paper); border-color: rgba(243, 234, 214, 0.5); }
.rate { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.rate__label { font-style: italic; color: var(--ink-soft); margin-right: 4px; }
.rate__dot {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; font-family: var(--mono); font-size: 0.8rem;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.rate__dot:hover, .rate__dot.is-hot { background: var(--red); border-color: var(--red); color: var(--paper); transform: scale(1.08); }

/* ---------- timer ---------- */
.timer { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 300px; padding: 10px 0 0; }
.timer__phase { margin: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.3em; color: var(--red); font-size: 0.85rem; }
.timer__digits {
  margin: 4px 0 0; font-size: clamp(88px, 18vw, 200px); font-weight: 300; line-height: 1; letter-spacing: -0.05em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0; font-variant-numeric: tabular-nums; transition: color 0.3s;
}
.timer.is-urgent .timer__digits { color: var(--red); animation: pulse 1s ease-in-out infinite; }
.timer__topic { margin: 6px 0 0; font-style: italic; color: var(--ink-soft); font-size: 1.1rem; }
.timer__bar { width: min(560px, 100%); height: 4px; background: var(--paper-edge); margin: 26px 0 0; border-radius: 2px; overflow: hidden; }
.timer__fill { height: 100%; width: 0%; background: var(--ink); transition: width 0.25s linear; }
.timer.is-urgent .timer__fill { background: var(--red); }
.timer__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }

/* ---------- wings / panels ---------- */
.wings, .lobby { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-top: 6px; }
.wings:has(.panel--wide:only-child) { grid-template-columns: 1fr; }
.lobby { grid-template-columns: 1fr 1fr; margin-top: 22px; }
.panel { padding: 22px 24px; border: 1px solid var(--paper-edge); border-radius: var(--radius); background: rgba(251, 246, 234, 0.6); min-width: 0; }
.panel__title { margin: 0 0 12px; font-size: 1.15rem; font-weight: 700; font-style: italic; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel__hint { margin: 0; color: var(--ink-faint); font-style: italic; font-size: 0.95rem; }
.sources { margin: 0; padding: 0; list-style: none; counter-reset: src; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--paper-edge); }
.sources li::before { content: counter(src, decimal-leading-zero); font-family: var(--mono); font-size: 0.72rem; color: var(--red); padding-top: 4px; }
.sources a { font-weight: 600; display: block; }
.sources small { display: block; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.4; margin-top: 2px; }
.sources .host { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.related__label { width: 100%; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }
.chip {
  border: 1px solid var(--ink); border-radius: 999px; padding: 4px 12px; background: transparent; font-size: 0.9rem; font-style: italic;
  transition: background 0.12s, color 0.12s;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip--cat { font-style: normal; display: inline-flex; gap: 8px; align-items: baseline; }
.chip--cat small { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); }
.chip--cat:hover small { color: var(--paper-edge); }
.chip.is-active { background: var(--red); border-color: var(--red); color: var(--paper); }
.chip.is-active small { color: var(--paper); }
.chip--new::after { content: "new"; font-family: var(--mono); font-size: 0.6rem; color: var(--red); margin-left: 6px; letter-spacing: 0.1em; }
.chip.is-active.chip--new::after { color: var(--paper); }
#expand-topic, .job-note { margin-top: 14px; }
.job-note { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.68rem; font-style: normal; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.status.is-ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 122, 74, 0.18); }
.status.is-bad i { background: var(--red); }
.status.is-busy i { background: var(--red); animation: pulse 1s infinite; }
.fresh { margin: 0; padding: 0; list-style: none; }
.fresh li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--paper-edge); font-size: 0.95rem; }
.fresh li:first-child { border-top: 0; }
.fresh button { border: 0; background: none; padding: 0; text-align: left; font-style: italic; font-weight: 600; }
.fresh button:hover { color: var(--red); }
.fresh .meta { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); white-space: nowrap; padding-top: 5px; }
.worker-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.jobs { margin-top: 14px; font-family: var(--mono); font-size: 0.74rem; }
.jobs summary { cursor: pointer; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; }
.jobs ul { list-style: none; padding: 0; margin: 8px 0 0; max-height: 220px; overflow: auto; }
.jobs li { padding: 4px 0; border-top: 1px dashed var(--paper-edge); color: var(--ink-soft); display: flex; gap: 8px; }
.jobs .st { width: 58px; flex: none; }
.jobs .st.done { color: var(--ok); } .jobs .st.failed { color: var(--red); } .jobs .st.running { color: var(--red); } .jobs .st.queued { color: var(--ink-faint); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats__sub { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 2px 12px; border-left: 2px solid var(--red); margin-top: 4px; }
.cats__sub .chip { font-size: 0.84rem; padding: 3px 10px; }
.history { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.history td { padding: 8px 0; border-top: 1px solid var(--paper-edge); vertical-align: top; }
.history td:first-child { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); width: 64px; padding-top: 12px; }
.history .h-topic { font-weight: 600; font-style: italic; }
.history .h-fmt { color: var(--ink-soft); font-size: 0.85rem; }
.history .h-rate { text-align: right; font-family: var(--mono); font-size: 0.75rem; color: var(--red); white-space: nowrap; }
.history .h-rate.skipped { color: var(--ink-faint); }
.empty-row td { color: var(--ink-faint); font-style: italic; }

.colophon { position: relative; z-index: 1; padding: 18px var(--gutter) 36px; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); text-align: center; }
.colophon kbd { margin: 0 2px 0 6px; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes deal { from { opacity: 0; transform: rotateX(-10deg) translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .runin .w { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .wings, .lobby { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(3, auto); gap: 8px 24px; }
}
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket::before, .ticket::after, .ticket__stub::after { display: none; }
  .ticket__stub { flex-direction: row; padding: 10px 16px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 2px dashed var(--paper-edge); }
  .stub__mode { writing-mode: horizontal-tb; transform: none; }
  .booth__row { flex-direction: column; }
  .modes { width: 100%; }
  .mode { flex: 1; } .mode span { width: 100%; justify-content: center; padding: 0 8px; }
  .draw { justify-content: center; }
  .rate { margin-left: 0; }
}

/* ---------- v0.2: nav, daily, recording ---------- */
.topnav { display: flex; gap: 14px; align-items: center; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.topnav a { text-decoration: none; color: var(--ink-soft); } .topnav a:hover { color: var(--red); }
.topnav button { border: 0; background: none; padding: 0; font: inherit; color: var(--ink-faint); cursor: pointer; } .topnav button:hover { color: var(--red); }
.masthead { align-items: flex-end; }
.masthead > .topnav { order: 3; width: 100%; margin: 0 0 10px; justify-content: flex-end; }

.daily { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 18px; margin-top: 22px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: var(--radius); background: rgba(251, 246, 234, 0.7); }
.daily__stub { display: flex; flex-direction: column; border-right: 2px dashed var(--paper-edge); padding-right: 14px; }
.daily__label { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); }
.daily__date { font-weight: 700; font-size: 1.3rem; font-variation-settings: "opsz" 60; line-height: 1.1; }
.daily__body { min-width: 0; }
.daily__title { margin: 2px 0 0; font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.01em; font-variation-settings: "opsz" 60, "WONK" 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily__actions { display: flex; align-items: center; gap: 12px; }
.daily__state { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ok); }
.daily.is-done { border-style: dashed; }
.daily.is-done .daily__title { color: var(--ink-soft); }

.rec-toggle { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); cursor: pointer; }
.rec-toggle input { accent-color: var(--red); }
.rec-toggle__dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--red); display: inline-block; }
.rec-toggle input:checked ~ .rec-toggle__dot { background: var(--red); }
.rec-toggle select { font: inherit; font-size: 0.72rem; border: 0; border-bottom: 1px solid var(--ink-faint); background: transparent; color: var(--ink); padding: 2px 0; }
.rec-live { color: var(--red); animation: pulse 1s infinite; margin-left: 8px; }

.takes { margin-top: 16px; }
.takes-list { list-style: none; padding: 0; margin: 14px 0 0; }
.take { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--paper-edge); align-items: center; }
.take__meta { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.take__title { font-weight: 600; font-style: italic; }
.take__player { grid-column: 1 / -1; }
.take__player audio, .take__player video { width: 100%; max-height: 280px; border-radius: 6px; background: var(--ink); }
.take__actions { display: flex; gap: 10px; font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; }
.take__actions button { border: 0; background: none; padding: 0; color: var(--ink-soft); cursor: pointer; } .take__actions button:hover { color: var(--red); }
.take__note { grid-column: 1 / -1; width: 100%; font: inherit; font-size: 0.92rem; font-style: italic; border: 0; border-bottom: 1px dashed var(--paper-edge); background: transparent; padding: 4px 0; color: var(--ink); }

.upload { display: flex; flex-direction: column; gap: 8px; }
.upload input[type=file] { font-family: var(--mono); font-size: 0.78rem; }
.upload__opts { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--ink-soft); }
.upload__opts input { accent-color: var(--red); }
.upload__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload__bar { height: 4px; background: var(--paper-edge); border-radius: 2px; overflow: hidden; }
.upload__bar div { height: 100%; width: 0; background: var(--red); transition: width 0.3s; }
@media (max-width: 720px) { .daily { grid-template-columns: 1fr; } .daily__stub { border-right: 0; border-bottom: 2px dashed var(--paper-edge); padding: 0 0 8px; flex-direction: row; gap: 10px; align-items: baseline; } .daily__title { white-space: normal; } }

/* ---------- v0.3: close the loop, encore ---------- */
.predict { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--paper-edge); }
.predict__label { font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }
.predict__dots { display: inline-flex; gap: 5px; }
.rate__dot--sm { width: 30px; height: 30px; font-size: 0.7rem; }
.rate__dot.is-set { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.landing { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.landing__label { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); white-space: nowrap; }
.landing input { flex: 1; min-width: 0; font: inherit; font-style: italic; font-size: 1rem; border: 0; border-bottom: 1px dashed var(--paper-edge); background: transparent; padding: 4px 0; color: var(--ink); }
.landing input:focus { outline: none; border-bottom-color: var(--red); }
.finished { margin-top: 22px; padding: 16px 18px; border: 2px dashed var(--paper-edge); border-radius: var(--radius); background: rgba(47, 122, 74, 0.05); }
.finished__head { margin: 0; font-weight: 700; font-style: italic; font-size: 1.1rem; }
.finished__head b { color: var(--red); }
.finished__note { margin: 6px 0 0; color: var(--ink-soft); font-style: italic; }
.finished__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ticket.is-finished .actions, .ticket.is-finished .predict, .ticket.is-finished .landing, .ticket.is-finished .rec-toggle { display: none; }
.ticket.is-finished .ticket__stub { background: linear-gradient(180deg, #e7f0e6, #d9e6d6); }
.ticket.is-finished .stub__mode { color: var(--ok); }
.encore { margin: 0 0 12px; font-style: italic; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.encore__tag { font-family: var(--mono); font-style: normal; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--paper); background: var(--red); padding: 2px 8px; border-radius: 3px; }
.encore__toggle { border: 0; background: none; padding: 0; font: inherit; font-size: 0.9rem; color: var(--red); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.encore__prior { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--red); background: rgba(210, 58, 28, 0.05); font-size: 0.95rem; }
.encore__prior .take { border-top: 0; padding-top: 6px; }
.ticket.is-encore .ticket__stub { background: linear-gradient(180deg, #fbe9e2, #f4d6cb); }
.history .h-pred { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); margin-left: 6px; }
.history .h-note { display: block; font-style: italic; color: var(--ink-soft); font-size: 0.88rem; margin-top: 2px; }
.history .h-take { color: var(--red); margin-left: 4px; }
