/* ToughCrowd: a dark stage, warm spotlight, cream type. */

:root {
  --bg: #111114;
  --bg-2: #17171c;
  --surface: #1d1d23;
  --surface-2: #26262e;
  --line: #34343e;
  --text: #f4ecdc;
  --muted: #a8a194;
  --faint: #6f6a62;
  --amber: #f2b45a;
  --amber-soft: rgba(242, 180, 90, 0.14);
  --red: #ff5f4f;
  --red-soft: rgba(255, 95, 79, 0.14);
  --green: #9be27a;
  --green-soft: rgba(155, 226, 122, 0.13);
  --yellow: #f4d35e;
  --yellow-soft: rgba(244, 211, 94, 0.13);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 45% at 50% -8%, rgba(242, 180, 90, 0.16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

a {
  color: var(--amber);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.hint {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Top bar ---------- */

.mock-banner {
  padding: 8px 16px;
  background: var(--yellow);
  color: #1b1600;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.mock-banner a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #ffe3b0, var(--amber) 45%, #b06f1d);
  box-shadow: 0 0 18px rgba(242, 180, 90, 0.55);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:hover {
  border-color: var(--faint);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1d1305;
}
.btn-primary:hover {
  background: #f7c57a;
  border-color: #f7c57a;
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 14px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 18px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--faint);
}
.link-btn:hover {
  color: var(--text);
}
.link-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Segmented control */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
}
.seg button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}
.seg button[aria-selected='true'],
.seg button[aria-pressed='true'],
.seg button[aria-checked='true'] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg.small button {
  padding: 6px 13px;
  font-size: 14px;
}

/* ---------- Setup ---------- */

.hero {
  max-width: 720px;
  padding: 40px 0 36px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 62px);
  letter-spacing: -0.02em;
}
.hero h1 em {
  color: var(--amber);
}
.lede {
  margin: 18px 0 0;
  max-width: 560px;
  font-size: 18px;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.step-head h2 {
  font-size: 24px;
}
.step-hint {
  margin: -8px 0 16px;
}
.seg-wrap {
  flex-wrap: wrap;
  border-radius: 22px;
}

#source-voice,
#source-form {
  margin-top: 16px;
}
.explain {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.explain-result {
  margin-top: 16px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-wide {
  grid-column: 1 / -1;
}
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.field .field-label {
  margin-bottom: 0;
}
.field-label em {
  margin-left: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: var(--amber);
}
input[type='text'],
.field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
input[type='text']:focus,
.field input:focus {
  outline: none;
  border-color: var(--amber);
}
input[type='text']::placeholder,
.field input::placeholder {
  color: var(--faint);
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font: 600 14px var(--mono);
}

#source-pdf,
#source-text {
  margin-top: 16px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 38px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--amber);
  background: var(--amber-soft);
}
.dz-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dz-title {
  font-weight: 600;
}
.dz-title u {
  text-decoration-color: var(--amber);
  text-underline-offset: 3px;
}
.dz-hint {
  font-size: 14px;
  color: var(--muted);
}

.slides-status {
  margin-top: 14px;
}
.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.thumbs canvas,
.thumbs img {
  flex: none;
  width: 132px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  animation: pop 0.3s ease-out;
}
.thumbs.reading canvas {
  animation: pop 0.3s ease-out, scan 1.6s ease-in-out infinite;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
}
@keyframes scan {
  50% {
    opacity: 0.55;
  }
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
}
.status-line.ok {
  color: var(--green);
}
.status-line.bad {
  color: var(--red);
}

textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  line-height: 1.55;
  resize: vertical;
}
textarea:focus {
  outline: none;
  border-color: var(--amber);
}
textarea::placeholder {
  color: var(--faint);
}

.summary-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.summary-box summary {
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
}
.summary-box textarea {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px;
  background: var(--bg);
  font-size: 14px;
}
.summary-box .hint {
  padding: 0 16px 14px;
}

/* Judge picker */
.judge-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.judge-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.judge-pick:hover {
  transform: translateY(-2px);
}
.judge-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.judge-pick img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(0.85) brightness(0.6);
  transition: filter 0.25s;
}
.judge-pick .jp-body {
  padding: 14px 16px 16px;
}
.judge-pick strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.judge-pick .jp-role {
  font-size: 13px;
  color: var(--muted);
}
.judge-pick q {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}
.judge-pick .jp-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
}
.judge-pick .jp-check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #1d1305;
  stroke-width: 3;
  opacity: 0;
}
.judge-pick:has(input:checked) {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), var(--shadow);
}
.judge-pick:has(input:checked) img {
  filter: none;
}
.judge-pick:has(input:checked) .jp-check {
  border-color: var(--amber);
  background: var(--amber);
}
.judge-pick:has(input:checked) .jp-check svg {
  opacity: 1;
}
.judge-pick:has(input:focus-visible) {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Your own judges, and the card that makes one */
.judge-pick .jp-remove {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.judge-pick .jp-remove:hover {
  border-color: var(--red);
  color: var(--red);
}
.judge-add {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.judge-add:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.judge-add .plus {
  font: 300 28px/1 var(--sans);
}
.custom-judge {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: var(--amber-soft);
}
.custom-judge h3 {
  font-size: 20px;
}
.custom-judge .hint {
  margin: 4px 0 14px;
}
.custom-judge .answer-row {
  margin-top: 14px;
}
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
}
select:focus {
  outline: none;
  border-color: var(--amber);
}

/* Set the scene */
.scene {
  display: grid;
  gap: 22px;
}
.scene-row .setting-label {
  display: block;
  margin-bottom: 10px;
}
#occasion-picks {
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
#occasion-picks button {
  border: 1px solid var(--line);
  background: var(--bg-2);
}
#occasion-picks button[aria-checked='true'] {
  border-color: var(--amber);
  background: var(--amber-soft);
  box-shadow: none;
}
.occasion-custom {
  max-width: 560px;
  margin-top: 12px;
}
.occasion-custom .hint {
  margin-top: 6px;
}
.difficulty {
  max-width: 560px;
}
.difficulty input {
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}
.difficulty input:active {
  cursor: grabbing;
}
.difficulty input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--amber) 50%, var(--red));
}
.difficulty input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s;
}
.difficulty input:active::-webkit-slider-thumb {
  transform: scale(1.15);
}
.difficulty input:focus-visible {
  outline: none;
}
.difficulty input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--amber);
}
.difficulty-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
}
.difficulty-now {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.difficulty-now strong {
  margin-right: 6px;
  color: var(--amber);
}

/* Pitch and Q&A lengths for the full run-through */
.lengths {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.lengths input {
  width: 64px;
  margin: 0 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  font: 500 15px var(--mono);
  text-align: center;
}
.lengths input:focus {
  outline: none;
  border-color: var(--amber);
}
.lengths .hint {
  margin: 0;
  font-weight: 400;
}

/* Your progress */
.history {
  margin-top: 40px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-head h2 {
  font-size: 24px;
}
.history-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.history-list li {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.history-score {
  font: 700 24px var(--serif);
  text-align: center;
}
.history-score.good {
  color: var(--green);
}
.history-score.ok {
  color: var(--yellow);
}
.history-score.bad {
  color: var(--red);
}
.history-what {
  font-size: 15px;
}
.history-what small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.history-stats {
  font: 500 13px var(--mono);
  color: var(--muted);
  text-align: right;
}

/* Format */
.format-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.format {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
}
.format input {
  accent-color: var(--amber);
  margin-top: 4px;
}
.format-body strong {
  display: block;
  font-size: 17px;
}
.format-body span {
  font-size: 14px;
  color: var(--muted);
}
.format:has(input:checked) {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.setting {
  display: flex;
  align-items: center;
  gap: 12px;
}
.setting-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.settings .hint {
  flex-basis: 100%;
  margin: 0;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}
.cta-row .hint {
  margin: 0;
}

/* ---------- Pitch ---------- */

.pitch {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
  padding-top: 12px;
}
.pitch-slide {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.pitch-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.pitch-slide .no-slides {
  max-width: 360px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}
.pitch-slide .slide-count {
  position: absolute;
}
.pitch-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.clock {
  font: 500 76px/1 var(--mono);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock.warn {
  color: var(--yellow);
}
.clock.over {
  color: var(--red);
}

.bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}
.bar-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(1);
  background: var(--amber);
  transition: transform 0.25s linear;
}
.bar-fill.warn {
  background: var(--yellow);
}
.bar-fill.over {
  background: var(--red);
}


.pitch-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}
.rec-dot-sm {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------- The judging table ---------- */

.panel {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 26px;
}

.seat {
  position: relative;
  width: 200px;
  text-align: center;
  opacity: 0.45;
  filter: grayscale(0.7);
  transform: scale(0.92);
  transition: opacity 0.35s, filter 0.35s, transform 0.35s;
}
.seat.active {
  opacity: 1;
  filter: none;
  transform: scale(1);
}
.seat-portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.seat-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  transform: scale(1.12);
}
.seat.active .seat-portrait {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 0 50px -10px rgba(242, 180, 90, 0.6);
}
.seat[data-state='speaking'] .seat-portrait {
  animation: speak 1.1s ease-in-out infinite;
}
.seat[data-state='listening'].recording .seat-portrait {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 50px -10px rgba(255, 95, 79, 0.6);
}
@keyframes speak {
  50% {
    box-shadow: 0 0 0 4px var(--amber), 0 0 70px -6px rgba(242, 180, 90, 0.8);
  }
}
.seat-name {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 18px;
}
.seat-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}
.seat:not(.active) .seat-state {
  visibility: hidden;
}

.dots {
  display: inline-flex;
  gap: 3px;
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: dot 1.2s infinite ease-in-out;
}
.dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.qa-timer {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto 20px;
}
.qa-timer .bar {
  flex: 1;
}
.qa-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.clock-sm {
  font: 500 18px var(--mono);
  font-variant-numeric: tabular-nums;
}
.clock-sm.over {
  color: var(--red);
}

.table-main {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.question-card {
  position: relative;
  padding: 26px 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
  animation: rise 0.35s ease-out;
}
.question-card::before {
  content: '';
  position: absolute;
  left: 52px;
  top: -8px;
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.q-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
#q-who {
  font-weight: 600;
  color: var(--amber);
}
.q-follow {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.voice-error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--yellow-soft);
  color: var(--yellow);
  font-size: 14px;
}
.q-text {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
}

.interjection {
  padding: 16px 22px;
  border: 1px solid rgba(255, 95, 79, 0.45);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
  animation: rise 0.25s ease-out;
}
.interjection span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.interjection q {
  font-family: var(--serif);
  font-size: 20px;
}
.cut-chip {
  display: inline-block;
  margin-top: 12px;
  margin-right: 8px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--red-soft);
  color: var(--red);
  font: 500 14px var(--mono);
}

.answer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.answer > .link-btn {
  margin-left: auto;
  align-self: flex-start;
}
.answer-type {
  flex-direction: column;
  align-items: stretch;
}
.answer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rec-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: var(--red-soft);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.rec-btn:hover {
  transform: scale(1.05);
}
.rec-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.rec-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  transition: border-radius 0.2s, width 0.2s, height 0.2s;
}
.rec-btn.on {
  background: var(--red);
  animation: rec-pulse 1.4s ease-out infinite;
}
.rec-btn.on .rec-dot {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #fff;
}
@keyframes rec-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 95, 79, 0.5);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(255, 95, 79, 0);
  }
}
.rec-info {
  flex: 1;
}
.rec-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rec-clock {
  font: 500 28px var(--mono);
  font-variant-numeric: tabular-nums;
}
.rec-clock.warn {
  color: var(--yellow);
}
.meter {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}
.meter i {
  width: 5px;
  height: 100%;
  border-radius: 3px;
  background: var(--red);
  transform: scaleY(0.12);
  transition: transform 0.08s;
}
.rec-info .hint {
  margin-top: 4px;
}

.working {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.working .dots {
  color: var(--amber);
}

.problem {
  padding: 18px 22px;
  border: 1px solid rgba(255, 95, 79, 0.4);
  border-radius: var(--radius);
  background: var(--red-soft);
}
.problem p {
  margin: 0 0 12px;
}
.problem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Feedback */
.feedback {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.4s ease-out;
}
.fb-top {
  display: flex;
  gap: 24px;
  padding: 26px 28px;
}
.fb-body {
  flex: 1;
}
.fb-text {
  margin: 0;
  font-size: 17px;
}
.fb-delta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  font: 500 14px var(--mono);
  background: var(--surface-2);
}
.fb-delta.up {
  background: var(--green-soft);
  color: var(--green);
}
.fb-delta.down {
  background: var(--red-soft);
  color: var(--red);
}

.score {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
}
.score svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.score circle {
  fill: none;
  stroke-width: 8;
}
.score .track {
  stroke: var(--surface-2);
}
.score .arc {
  stroke: var(--score-color, var(--amber));
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  animation: arc 0.9s 0.1s ease-out forwards;
}
@keyframes arc {
  to {
    stroke-dashoffset: var(--offset);
  }
}
.score-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 38px var(--serif);
}
.score-num small {
  position: absolute;
  bottom: 22px;
  font: 500 11px var(--mono);
  color: var(--muted);
}

.report {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.tile {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}
.tile:last-child {
  border-right: 0;
}
.tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile-value {
  margin-top: 4px;
  font: 500 26px var(--mono);
  font-variant-numeric: tabular-nums;
}
.tile-value small {
  font-size: 13px;
  color: var(--muted);
}
.tile-note {
  font-size: 13px;
  color: var(--muted);
}
.tile.good .tile-value {
  color: var(--green);
}
.tile.ok .tile-value {
  color: var(--yellow);
}
.tile.bad .tile-value {
  color: var(--red);
}
.report-note {
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.transcript {
  border-top: 1px solid var(--line);
}
.transcript summary {
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.transcript p {
  margin: 0;
  padding: 0 28px 20px;
  font-size: 15px;
}
mark.filler {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 600;
}

.follow-up {
  margin: 0;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--amber-soft);
}
.follow-up span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.follow-up q {
  font-family: var(--serif);
  font-size: 18px;
}

.fb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.table-foot {
  margin-top: 30px;
  text-align: center;
}

/* ---------- Results ---------- */

.results-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 30px 0 34px;
}
.results-hero .score {
  width: 150px;
  height: 150px;
}
.results-hero .score-num {
  font-size: 54px;
}
.results-hero .score-num small {
  bottom: 32px;
}
.results-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
}
.results-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.result {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.result img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  object-position: 50% 30%;
}
.result-who {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}
.result-q {
  margin: 2px 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.3;
}
.result-fb {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.result-stats {
  margin-top: 8px;
  font: 500 13px var(--mono);
  color: var(--faint);
}
.result-score {
  min-width: 64px;
  text-align: right;
  font: 700 30px var(--serif);
}
.result-score small {
  display: block;
  font: 500 12px var(--mono);
  color: var(--muted);
}
.result-score.good {
  color: var(--green);
}
.result-score.ok {
  color: var(--yellow);
}
.result-score.bad {
  color: var(--red);
}
.result.skipped {
  opacity: 0.55;
}

/* Scoring guide */
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
}
.checks .pass {
  background: var(--green-soft);
  color: var(--green);
}
.checks .fail {
  background: var(--red-soft);
  color: var(--red);
}
.result .checks {
  margin-top: 10px;
}
.result .checks li {
  padding: 2px 9px;
  font-size: 12px;
}

/* A long pause inside the transcript */
.pause {
  display: inline-block;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--yellow-soft);
  color: var(--yellow);
  font: 500 13px var(--mono);
  white-space: nowrap;
}
/* The pause sign, drawn so it doesn't depend on an emoji font */
.pause::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 10px;
  margin-right: 8px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
  padding-left: 2px;
  box-sizing: content-box;
  vertical-align: -1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Passcode ---------- */

.dialog {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.dialog h2 {
  font-size: 26px;
}
.dialog input {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.dialog input:focus {
  outline: none;
  border-color: var(--amber);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* The pitch on the results */
.pitch-result {
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pitch-result h2 {
  padding: 20px 28px 16px;
  font-size: 24px;
}
.pitch-result .report-note {
  border-top: 1px solid var(--line);
}
.results-sub {
  margin: 0 0 14px;
  font-size: 24px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: min(560px, calc(100% - 32px));
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  animation: rise 0.25s ease-out;
}
.toast.bad {
  border-color: rgba(255, 95, 79, 0.5);
}

/* ---------- Small screens ---------- */

@media (max-width: 960px) {
  .judge-picks {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .history-list li {
    grid-template-columns: 44px 1fr;
  }
  .history-stats {
    grid-column: 2;
    text-align: left;
  }
  .topbar,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .step {
    padding: 20px 16px;
  }
  .judge-picks,
  .format-picks,
  .fields {
    grid-template-columns: 1fr;
  }
  .explain {
    padding: 16px;
  }
  .judge-pick {
    flex-direction: row;
  }
  .judge-pick img {
    width: 110px;
    aspect-ratio: 1;
  }
  .pitch {
    grid-template-columns: 1fr;
  }
  .clock {
    font-size: 56px;
  }
  .seat {
    width: 23%;
  }
  .seat-name {
    font-size: 14px;
  }
  .answer {
    flex-wrap: wrap;
  }
  .fb-top {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  .report,
  .totals {
    grid-template-columns: 1fr 1fr;
  }
  .tile:nth-child(2n) {
    border-right: 0;
  }
  .tile:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .results-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .result {
    grid-template-columns: 48px 1fr;
  }
  .result img {
    width: 48px;
    height: 48px;
  }
  .result-score {
    grid-column: 2;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .score .arc {
    stroke-dashoffset: var(--offset);
  }
}
