:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --text: #1d2125;
  --muted: #5f676f;
  --line: #dcdedb;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --soft: #e8f0f6;
  --warn-bg: #fdf3dc;
  --warn-text: #6b4a00;
  --danger: #a4262c;
  --ok: #1d6f42;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b;
    --surface: #1e2226;
    --text: #e8eaec;
    --muted: #a0a8b0;
    --line: #33393f;
    --accent: #6db3e3;
    --accent-text: #0e1a22;
    --soft: #223341;
    --warn-bg: #3a2f14;
    --warn-text: #f3d68c;
    --danger: #f08a8f;
    --ok: #7ccf9f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Segoe UI", "Nirmala UI", "Noto Sans Devanagari", "Noto Sans Gujarati", system-ui, sans-serif;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
a { color: var(--accent); }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); font-weight: 600; text-decoration: none; }
.local-tag { font-size: .8rem; color: var(--ok); border: 1px solid currentColor; border-radius: 4px; padding: 1px 8px; }
main { max-width: 1240px; margin: 0 auto; padding: 20px; }
main.narrow { max-width: 760px; }
.login { max-width: 380px; padding-top: 12vh; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: .9rem; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
input[type=checkbox] { display: inline-block; width: auto; margin: 0 8px 0 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, [contenteditable]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.check { display: flex; align-items: flex-start; color: var(--text); }
.hint { font-size: .85rem; color: var(--muted); }
.error { color: var(--danger); margin-inline: 0; margin-block-end: 0; }
button, .button {
  display: inline-block; padding: 9px 16px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; text-decoration: none;
}
button:disabled { opacity: .55; cursor: default; }
button.primary { color: var(--accent-text); background: var(--accent); border-color: var(--accent); font-weight: 600; }
button.small, .button.small { padding: 4px 10px; font-size: .85rem; }
button.danger { color: var(--danger); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.section-title { margin: 28px 0 10px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.badge { font-size: .8rem; padding: 1px 8px; border-radius: 4px; background: var(--soft); white-space: nowrap; }
.badge.failed { color: var(--danger); }
.title-input { font-size: 1.3rem; font-weight: 600; padding: 4px 6px; margin: 0 0 0 -7px; background: transparent; border-color: transparent; }
.title-input:hover, .title-input:focus { border-color: var(--line); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); }
.steps li::before {
  content: ""; position: absolute; left: 4px; top: 13px; width: 11px; height: 11px;
  border-radius: 50%; border: 2px solid var(--line);
}
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now { color: var(--text); font-weight: 600; }
.steps li.now::before { background: var(--accent); border-color: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .steps li.now::before { animation: none; } .bar > div { transition: none; } }
.speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.quote { margin-inline: 0; margin-block-end: 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: .9rem; }
.banner { padding: 10px 14px; border-radius: 6px; background: var(--warn-bg); color: var(--warn-text); font-size: .9rem; }
.tabs { display: none; gap: 6px; margin: 16px 0 0; }
.tabs button[aria-selected=true] { background: var(--soft); border-color: var(--accent); }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.pane { min-width: 0; }
.lines { max-height: 72vh; overflow-y: auto; margin: 0 -8px; }
.ln { display: grid; grid-template-columns: 62px 124px 1fr; gap: 8px; padding: 7px 8px; border-radius: 6px; align-items: start; }
.ln.flash { background: var(--soft); }
.ln time { font-size: .8rem; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.ln time button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; }
.ln select { margin: 0; padding: 2px 4px; font-size: .85rem; }
.ln .tx { overflow-wrap: anywhere; min-height: 1.5em; border-radius: 4px; padding: 0 3px; }
.ln .tx:empty::before { content: "not transcribed"; color: var(--muted); font-style: italic; font-size: .85rem; }
textarea.mom { min-height: 56vh; resize: vertical; font-size: .95rem; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 860px) {
  .tabs { display: flex; }
  .panes { grid-template-columns: 1fr; }
  .pane[hidden-narrow] { display: none; }
  .lines { max-height: none; }
}
@media (max-width: 540px) {
  main { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .ln { grid-template-columns: 56px 1fr; }
  .ln .tx { grid-column: 1 / -1; }
  .list li { flex-wrap: wrap; }
}
