/* Rebuttal Booth. One centered column, matching earthradionetwork.com. */
:root {
  color-scheme: dark;
  --bg: #05070C;
  --panel: #0C1320;
  --panel-2: #121C2E;
  --line: #23324E;
  --text: #F3F5F9;
  --muted: #9AA7BD;
  --dim: #61738F;
  --amber: #F2A73B;
  --amber-ink: #1A1205;
  --blue: #5A9BF7;
  --red: #E34B3C;
  --ok: #4FBF8B;
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 4px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
}

a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, .choice:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* header / footer */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  background: #070B13;
}
.brand { display: inline-flex; }
.brand img { display: block; height: 34px; width: auto; }
.top-tag, .eyebrow {
  font: 600 12px/1.2 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.top-tag { color: var(--dim); }

.foot {
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--dim);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .08em;
}
.foot p { margin: 0; }
.foot a { color: var(--muted); }

/* column */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.eyebrow { margin: 0; color: var(--amber); }
h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-wrap: balance;
}
h1:focus, h2:focus { outline: none; }
h1 { font-size: clamp(38px, 9vw, 56px); }
h2 { font-size: clamp(28px, 6.5vw, 38px); }
.lede { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.fine { margin: 0; color: var(--dim); font-size: 13.5px; }
.status { margin: 0; min-height: 1.5em; color: var(--muted); font-size: 15px; }

.demo-flag {
  align-self: center;
  margin: 0 0 22px;
  padding: 6px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--dim);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .04em;
  text-align: center;
}

.topic-chip {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.topic-chip strong { color: var(--text); font-weight: 600; }

/* topics from the last show */
.topics { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.topics-head { margin: 0; color: var(--blue); font: 600 12px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.topics-head span { color: var(--dim); }
.topics-sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.topic-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.topic-btn {
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 15px/1.25 var(--body);
  cursor: pointer;
}
.topic-btn:hover { border-color: var(--dim); color: var(--text); }
.topic-btn[aria-pressed="true"] { border-color: var(--amber); background: rgba(242,167,59,.12); color: var(--text); }
.topic-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* on-air notice */
.onair {
  margin: 0;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  text-align: left;
}
.onair strong { color: var(--text); font-weight: 600; }
form .onair strong { display: block; margin-bottom: 4px; }

/* mode choice */
.choices {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 14px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.choice:hover { border-color: var(--amber); transform: translateY(-2px); }
.choice svg {
  width: 38px; height: 38px;
  fill: none; stroke: var(--amber); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 6px;
}
.choice-title { font: italic 800 22px/1.1 var(--display); }
.choice-sub { color: var(--muted); font-size: 14px; }

/* stage */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  overflow: hidden;
}
.stage.portrait { aspect-ratio: 3 / 4; max-width: 380px; }
.stage video, .stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.stage #preview { transform: scaleX(-1); object-fit: cover; }
.stage audio { position: absolute; left: 12px; right: 12px; bottom: 12px; width: calc(100% - 24px); }
.stage-msg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  background: var(--panel);
}
.countdown {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,7,12,.55);
  font: italic 800 clamp(80px, 26vw, 150px)/1 var(--display);
  color: var(--text);
}
.rec-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 9px;
  border-radius: var(--radius);
  background: rgba(5,7,12,.7);
  font: 600 12px/1 var(--mono);
  letter-spacing: .16em;
}
.rec-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.meter { width: 100%; max-width: 280px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.meter-fill { width: 0%; height: 100%; background: var(--ok); transition: width .08s linear; }
.mic-hint { margin: -8px 0 0; color: var(--dim); font-size: 13.5px; }

.timer { font: 600 22px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.timer-sep { margin: 0 .5em; color: var(--dim); }
#timerMax { color: var(--dim); }
.progress { width: 100%; height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; }
.progress.big { height: 8px; border-radius: 4px; max-width: 420px; }
.progress-fill { width: 0%; height: 100%; background: var(--amber); transition: width .2s linear; }
.progress-fill.near-end { background: var(--red); }

/* buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 6px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 16px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn[disabled] { opacity: .5; cursor: default; }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover:not([disabled]) { background: #F7B95C; }
.btn-ghost { background: transparent; border-color: var(--amber); color: var(--amber); }
.btn-ghost:hover { background: rgba(242,167,59,.1); }
.btn-link { background: none; min-height: 44px; padding: 8px 10px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn-rec { background: var(--red); color: #fff; }
.btn-rec:hover { background: #EE6052; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.btn-stop { background: var(--text); color: #0A1019; }
.stop-sq { width: 12px; height: 12px; background: var(--red); border-radius: 2px; }

/* form */
form { width: 100%; display: flex; flex-direction: column; gap: 18px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.two > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label, legend { font-weight: 600; font-size: 15px; }
.opt { margin-left: 6px; color: var(--dim); font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: 400 16px/1.3 var(--body);
}
input::placeholder { color: var(--dim); }
input[aria-invalid="true"] { border-color: var(--red); }
.hint { margin: 0; color: var(--dim); font-size: 13.5px; }
form > .hint { margin-top: -10px; }
.err { margin: 0; color: #FF8A7D; font-size: 14px; }
.err-box { padding: 12px 14px; border: 1px solid var(--red); border-radius: var(--radius); color: #FFB3AA; text-align: center; }

.kinds { margin: 0; padding: 0; border: 0; min-width: 0; }
.kinds legend { padding: 0; margin-bottom: 8px; }
.kind-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-row label { position: relative; font-weight: 500; }
.kind-row input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kind-row span {
  display: inline-flex; align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.kind-row input:checked + span { border-color: var(--amber); background: rgba(242,167,59,.12); color: var(--text); }
.kind-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }

.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.45;
  cursor: pointer;
}
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--amber); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

form .actions { margin-top: 4px; }

@media (max-width: 460px) {
  .wrap { padding: 28px 16px 36px; }
  .top { padding-left: 16px; padding-right: 16px; }
  .brand img { height: 28px; }
  .choices { grid-template-columns: 1fr; }
  .choice { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 12px; padding: 20px 14px; }
  .choice svg { margin: 0; }
  .choice-sub { flex-basis: 100%; }
  .field.two { grid-template-columns: 1fr; }
  .actions .btn-primary, .actions .btn-rec, .actions .btn-stop, .actions .btn-ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
