:root {
  --bg: #f4f6fa; --panel: #ffffff; --ink: #172033; --muted: #5f6b7d; --line: #d9e0ea;
  --brand: #0b5cab; --brand-ink: #ffffff; --brand-soft: #e6f0fb; --bar: #2f7fd1;
  --good: #1f7a3a; --warn: #9a5b00; --bad: #b42318; --live: #d92d20;
  --shadow: 0 2px 10px rgb(16 24 40 / 6%);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1520; --panel: #171f2d; --ink: #e6ebf3; --muted: #9aa7ba; --line: #2a3446;
    --brand: #4c95e6; --brand-ink: #0b1320; --brand-soft: #1b2a41; --bar: #5da3f0; --shadow: none; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid #66a9e8; outline-offset: 1px; }
.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #083f76, #0b78cf); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 9px; right: 9px; top: 10px; height: 14px;
  background: repeating-linear-gradient(to bottom, white 0 2px, transparent 2px 6px); border-radius: 1px; }
.brand-name { font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgb(217 45 32 / 25%); }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); display: grid; gap: 8px; }
.who { font-weight: 600; color: var(--ink); word-break: break-all; }
.link { background: none; border: none; color: var(--brand); padding: 0; text-align: left; }
.main { padding: 24px 28px; max-width: 1100px; width: 100%; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 8px; }
h3 { font-size: 14px; margin: 18px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 200px; }
.primary { background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.primary:disabled, .ghost:disabled { opacity: .55; cursor: default; }
.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.ghost.danger { color: var(--bad); }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); margin: 2px 4px 2px 0; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; text-transform: uppercase; }
.badge.live { background: rgb(217 45 32 / 12%); color: var(--live); }
.badge.notes { background: rgb(31 122 58 / 12%); color: var(--good); }
.badge.transcript { background: var(--brand-soft); color: var(--brand); }
.badge.plain { background: var(--bg); color: var(--muted); }
.badge.sched { background: rgb(154 91 0 / 12%); color: var(--warn); }
.meeting-list { display: grid; gap: 10px; }
.meeting { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; text-decoration: none; color: inherit; }
.meeting:hover { border-color: var(--brand); }
.meeting .title { font-weight: 700; font-size: 15px; }
.meeting .meta { color: var(--muted); font-size: 12px; }
.meeting .summary { grid-column: 1 / -1; color: var(--ink); opacity: .9; }
.meeting .people { grid-column: 1 / -1; }
.right { text-align: right; }
.err { color: var(--bad); min-height: 1em; }
.ok { color: var(--good); }
.empty { color: var(--muted); padding: 30px; text-align: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-weight: 600; color: var(--muted); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.notes h2 { margin-top: 18px; font-size: 15px; }
.notes h2:first-child { margin-top: 0; }
.notes ul { margin: 4px 0 0; padding-left: 20px; }
.notes li { margin: 3px 0; }
.notes p { margin: 6px 0; }
.action-owner { font-weight: 700; }
.turn { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.turn:last-child { border-bottom: none; }
.turn .ts { color: var(--muted); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.turn .who { display: inline; font-weight: 700; margin-right: 6px; }
.turn.hit { background: rgb(255 214 0 / 18%); }
mark { background: rgb(255 214 0 / 45%); color: inherit; border-radius: 2px; }
.speaker-bar { display: grid; grid-template-columns: 180px 1fr 60px 70px 60px 70px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.speaker-bar:last-child { border-bottom: none; }
.speaker-bar .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speaker-bar .track { height: 10px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.speaker-bar .fill { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.speaker-bar .num { text-align: right; color: var(--muted); font-size: 12px; }
.speaker-head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.tile .n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12px; color: var(--muted); }
.chat { display: grid; gap: 10px; }
.msg { padding: 10px 12px; border-radius: 10px; max-width: 85%; white-space: pre-wrap; }
.msg.q { background: var(--brand-soft); justify-self: end; }
.msg.a { background: var(--bg); justify-self: start; white-space: normal; }
.msg.a p { margin: 4px 0; }
.sources { font-size: 12px; color: var(--muted); }
.sources a { margin-right: 8px; }
textarea.notes-edit { width: 100%; min-height: 380px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.upcoming-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.upcoming-item .title { font-weight: 700; }
.upcoming-item .meta { color: var(--muted); font-size: 12px; }
.options { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.options label { display: flex; gap: 6px; align-items: center; }
.options input[type=text] { width: 130px; padding: 5px 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgb(0 0 0 / 25%); max-width: 90vw; z-index: 9; }
.signin { display: grid; place-items: center; min-height: 70vh; }
.signin-card { max-width: 420px; text-align: center; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; }
  .side-foot { display: none; }
  .main { padding: 14px; }
  .speaker-bar { grid-template-columns: 120px 1fr 50px; }
  .speaker-bar .hide-sm { display: none; }
}
.in-teams .side { display: none; }
.in-teams .main { max-width: none; }

ul.plain { margin: 6px 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }
ul.plain ul { margin: 2px 0 6px; padding-left: 18px; font-size: 13px; }
