:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1a1b1f; --muted: #6a6c76; --border: #e2e4ea;
  --accent: #3b5bdb; --accent-text: #fff; --ok: #2b8a3e; --warn: #b26a00; --err: #c92a2a;
  --soft: #eef1fb; --warn-bg: #fff6e5; --err-bg: #fdecec; --ok-bg: #e9f7ec;
  --mic: #0c8599; --call: #5c5f6b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417; --panel: #1c1d22; --text: #ececf1; --muted: #9a9ca8; --border: #2d2f37;
    --accent: #748ffc; --accent-text: #0b0c10; --ok: #51cf66; --warn: #fcc419; --err: #ff6b6b;
    --soft: #23273a; --warn-bg: #2f2814; --err-bg: #331b1b; --ok-bg: #16291b;
    --mic: #3bc9db; --call: #b0b3be;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h2 { font-size: 20px; margin: 0 0 4px; } h3 { font-size: 15px; margin: 0 0 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.tag { font-size: 11px; background: var(--soft); color: var(--accent); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .err { color: var(--err); }
.stack { display: grid; gap: 10px; } label { display: grid; gap: 4px; font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .space { justify-content: space-between; } .end { justify-content: flex-end; }
input, select, textarea, button { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
input, select, textarea { width: 100%; }
.row input { flex: 1; width: auto; min-width: 160px; }
button { cursor: pointer; white-space: nowrap; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { color: var(--err); border-color: var(--err); }
button:disabled { opacity: .5; cursor: not-allowed; }
.pill { padding: 1px 8px; border-radius: 10px; background: var(--soft); }
.list { list-style: none; padding: 0; margin: 0; } .list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; } .list a { color: var(--accent); text-decoration: none; }
.meeting-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.capture-box { display: grid; gap: 6px; justify-items: end; }
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } .capture-box { justify-items: start; } }
.transcript { max-height: 60vh; overflow-y: auto; display: grid; gap: 6px; }
.seg { display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.seg .ts { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; }
.seg .who { font-weight: 600; font-size: 12.5px; } .seg.mic .who { color: var(--mic); } .seg.tab .who { color: var(--call); }
.sug { border-left: 3px solid var(--accent); padding: 6px 10px; margin-bottom: 10px; background: var(--soft); border-radius: 0 8px 8px 0; }
.sug .meta { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sug .title { font-weight: 600; } .sug q, .notes q { display: block; color: var(--muted); font-style: italic; font-size: 12.5px; }
.banner { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.warn { background: var(--warn-bg); color: var(--warn); } .banner.err { background: var(--err-bg); color: var(--err); } .banner.ok { background: var(--ok-bg); color: var(--ok); }
.answer { margin-top: 10px; font-size: 13px; } .answer .q { color: var(--muted); }
.notes h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.notes table { width: 100%; border-collapse: collapse; font-size: 13px; } .notes td, .notes th { text-align: left; padding: 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sev { font-size: 11px; padding: 0 6px; border-radius: 6px; background: var(--soft); }
.sev.high, .sev.critical { background: var(--err-bg); color: var(--err); }
.notes textarea { min-height: 180px; }
dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .check input { width: auto; margin-top: 3px; }
.chatline { background: var(--soft); border-radius: 8px; padding: 8px 10px; } .chatline p { margin: 4px 0 6px; }
.danger-zone { border-style: dashed; }

/* mic toggle: a normal button with a small state dot; a thin level bar appears only while live */
button.mic { display: inline-flex; align-items: center; gap: 6px; }
button.mic .mic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
button.mic[aria-pressed="false"] .mic-dot { background: var(--err); }
button.mic[aria-pressed="true"] .mic-dot { background: var(--ok); }
.mic-meter { width: 28px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; display: none; }
button.mic[aria-pressed="true"] .mic-meter { display: inline-block; }
.mic-meter > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width 80ms linear; }
/* roles + tracker + brief */
fieldset.roles { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
fieldset.roles legend { font-weight: 500; padding: 0 4px; }
.filebtn { display: inline-block; cursor: pointer; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-weight: 400; }
label.inline { display: flex; align-items: center; gap: 8px; } label.inline input { width: auto; }
dialog.wide { max-width: 900px; }
.sheetbox { border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.sheetbox table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sheetbox td, .sheetbox th { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.sheetbox select { padding: 3px 6px; width: auto; }
.sheetbox .sample { color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-text { color: var(--warn); }
.brief h4 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.brief ul { margin: 0; padding-left: 18px; }
.sug.tracker { border-left-color: var(--mic); } .sug.tracker_mismatch { border-left-color: var(--warn); } .sug.not_in_tracker { border-left-color: var(--err); }
.refs { font-size: 11.5px; color: var(--muted); }
.answer div:last-child { white-space: pre-wrap; }

.who.nameable { cursor: pointer; border-bottom: 1px dashed currentColor; }
.who input { font-size: 12px; padding: 1px 6px; width: 140px; }

select.compact { width: auto; padding: 2px 6px; font-size: 12.5px; }

.navbtn { color: var(--accent); text-decoration: none; font-weight: 600; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; }
.navbtn:hover { background: var(--soft); }
#brief { max-height: 320px; overflow-y: auto; padding-right: 4px; }
