/* Speaker Kit page styles. Brand colours and fonts come from kit-config.js:
   kit.js sets --brand-accent, --brand-accent-dark, --brand-kv and --brand-font on <html>.
   Layout: two-column workbench, form steps on the left, live preview pinned on the right;
   stacks on phones with the preview first. */
*, *::before, *::after { box-sizing: border-box; }
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #FAF7F5;
  --surface: #FFFFFF;
  --fg: #282828;
  --muted: #6B6262;
  --line: #E9E0DD;
  --accent: var(--brand-accent, #D31A2B);
  --accent-ink: color-mix(in srgb, var(--accent) 80%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--bg));
  --stage: #EEE8E5;
  --ok: #3E7E52;
  --font: var(--brand-font, "Figtree", "Segoe UI", Helvetica, Arial, sans-serif);
  --serif: var(--brand-serif, Georgia, "Gelasio", serif);
  --kv: var(--brand-kv, var(--accent));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1A1A; --surface: #262223; --fg: #F3EEEC; --muted: #A99F9F; --line: #3A3434;
    --accent: var(--brand-accent-dark, #E8404F); --accent-ink: color-mix(in srgb, var(--accent) 70%, white);
    --stage: #141212; --ok: #7CC48F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1A1A; --surface: #262223; --fg: #F3EEEC; --muted: #A99F9F; --line: #3A3434;
  --accent: var(--brand-accent-dark, #E8404F); --accent-ink: color-mix(in srgb, var(--accent) 70%, white);
  --stage: #141212; --ok: #7CC48F;
  color-scheme: dark;
}
html, body { background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 56px;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; display: grid; gap: 28px; }
.kv { height: 56px; border-radius: 10px; background: var(--kv); }
header.intro { display: grid; gap: 8px; max-width: 70ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin: 0; font-weight: 800; text-wrap: balance; }
.dates { font-family: var(--serif); font-size: 17px; color: var(--muted); margin: 0; }
.lede { margin: 0; color: var(--muted); font-size: 16px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.steps { display: grid; gap: 18px; min-width: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.step h2 { margin: 0; font-size: 17px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.step h2 .n { font-size: 13px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label, .lbl { font-size: 13px; font-weight: 600; }
input[type="text"], select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 170px; line-height: 1.45; }
input::placeholder { color: var(--muted); opacity: .75; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a.btn:focus-visible, .choice:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn {
  font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
a.btn { text-decoration: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; cursor: pointer;
  display: grid; gap: 4px; background: var(--bg); position: relative;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 15px; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.adjust { display: grid; gap: 10px; }
.slider { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 13px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; background: var(--bg); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { font-size: 14px; }
.choice small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.media-info { font-size: 13px; color: var(--muted); }
.status { font-size: 13.5px; min-height: 1.4em; color: var(--muted); }
.status.ok { color: var(--ok); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.preview-col { position: sticky; top: max(16px, env(safe-area-inset-top, 0px)); display: grid; gap: 12px; min-width: 0; }
.stage { background: var(--stage); border-radius: 14px; padding: 18px; display: grid; place-items: center; }
.stage canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.18); touch-action: none; cursor: grab; }
.stage canvas.nomedia { cursor: default; }
.stage-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }
.result { display: grid; gap: 10px; }
.result video { width: 100%; max-height: 50vh; border-radius: 8px; background: #000; }
.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
.vhidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; top: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; order: -1; }
  .stage canvas { max-height: 60vh; }
}
@media (max-width: 520px) {
  .grid2, .upload { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .progress > i { transition: none; } }
