:root {
  --bg: #f7f7f9;
  --panel: #ffffff;
  --text: #1c1c24;
  --muted: #6b6b7b;
  --line: #e6e6ec;
  --accent: #5b5bd6;
  --accent-soft: #ececfb;
  --live: #e5484d;
  --ok: #2f9e6b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 4px 16px rgba(20, 20, 40, .05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131318; --panel: #1b1b22; --text: #ececf1; --muted: #9a9aab; --line: #2b2b35;
    --accent: #8b8bf0; --accent-soft: #26264a; --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--live); margin: 4px 0; }

.btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 14px;
  border-radius: 8px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.danger:hover { border-color: var(--live); color: var(--live); }
.wide { width: 100%; }
.link { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }

input, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0; }
label input, label textarea { margin-top: 4px; font-weight: 400; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.brand-lg { font-size: 24px; justify-content: center; }
.logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  color: #fff; font-size: 15px; }
.brand-lg .logo { width: 36px; height: 36px; font-size: 20px; border-radius: 9px; }

/* auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 32px; box-shadow: var(--shadow); text-align: center; }
.auth-card form { text-align: left; margin-top: 18px; }
.auth-card .btn { margin-top: 8px; }

/* layout */
.app { display: grid; grid-template-columns: 300px 1fr; height: 100%; }
.sidebar { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; }
.sidebar-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 10px; }
.search { padding: 0 16px 10px; }
.meeting-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.group-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  padding: 12px 10px 4px; }
.m-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.m-item:hover { background: var(--bg); }
.m-item.active { background: var(--accent-soft); }
.m-title { font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-meta { font-size: 12px; color: var(--muted); }
.m-snippet { font-size: 12px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-snippet mark, .seg mark { background: #ffe58a; color: #1c1c24; border-radius: 2px; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: grid; gap: 6px; font-size: 13px; }
.me { display: flex; justify-content: space-between; color: var(--muted); }

.main { overflow-y: auto; min-width: 0; }
.empty { height: 100%; display: grid; place-content: center; text-align: center; gap: 6px; padding: 24px; }

/* detail */
.detail-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 22px 32px 0; border-bottom: 1px solid var(--line); }
.title-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.title-input { font-size: 22px; font-weight: 700; border: 1px solid transparent; background: transparent; padding: 2px 6px;
  margin-left: -7px; letter-spacing: -.3px; }
.title-input:hover { border-color: var(--line); }
.head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.menu button { font: inherit; font-size: 13px; text-align: left; background: none; border: 0; color: var(--text); padding: 7px 10px; border-radius: 6px;
  cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.menu button span { color: var(--muted); }
.menu button:hover, .menu button:focus-visible { background: var(--accent-soft); outline: none; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.live { background: rgba(229, 72, 77, .12); color: var(--live); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live .dot { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tabs { display: flex; gap: 4px; margin-top: 14px; }
.tab { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted);
  cursor: pointer; font-weight: 600; }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab-body { padding: 24px 32px 48px; max-width: 860px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 10px; }
.card ul { margin: 0; padding-left: 18px; }
.card li { margin: 4px 0; }
.tldr { font-size: 15.5px; line-height: 1.6; }
.notice { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.notice.err { border-color: var(--live); background: rgba(229, 72, 77, .08); }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.actions { list-style: none; padding: 0 !important; }
.actions li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.actions li:last-child { border-bottom: 0; }
.actions input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.actions .done .task { text-decoration: line-through; color: var(--muted); }
.chip { font-size: 12px; color: var(--muted); margin-left: 6px; white-space: nowrap; }

.seg { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.seg-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.seg-speaker { font-weight: 700; font-size: 13px; }
.seg-text { white-space: pre-wrap; }
.transcript-filter { max-width: 320px; margin-bottom: 10px; }

.chat { display: grid; gap: 12px; }
.bubble { padding: 12px 14px; border-radius: 10px; white-space: pre-wrap; }
.bubble.q { background: var(--accent); color: #fff; justify-self: end; max-width: 80%; }
.bubble.a { background: var(--panel); border: 1px solid var(--line); }
.ask-form { display: flex; gap: 8px; margin-top: 14px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.suggestions .btn { border-radius: 999px; }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(560px, 92vw); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 10, 20, .45); }
dialog h3 { font-size: 18px; margin-bottom: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.steps { padding-left: 20px; } .steps li { margin: 8px 0; }
label.file { font-weight: 400; color: var(--muted); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 9px 16px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); z-index: 10; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .app { height: auto; min-height: 100%; }
  .sidebar { max-height: 45vh; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .main { overflow: visible; }
  .title-row { flex-wrap: wrap; }
  .title-input { font-size: 19px; flex: 1 1 100%; }
  .detail-head, .tab-body { padding-left: 16px; padding-right: 16px; }
}

/* plan & billing */
.plan-card-side { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 12px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 13px; }
.plan-name { font-weight: 600; font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.plan-meter { display: grid; gap: 4px; }
.m-row { font-size: 12px; color: var(--text); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; font-variant-numeric: tabular-nums; }
.m-row .left { color: var(--muted); white-space: nowrap; }
.m-row .left.out { color: var(--live); font-weight: 600; }
.plan-meter .bar { height: 5px; }
.bar span.warn { background: #e5a00d; }
.m-reset { font-size: 11px; color: var(--muted); margin-top: 2px; }
.plan-card-side .btn.wide { width: 100%; margin-top: 4px; }
dialog.wide { width: min(860px, 94vw); }
.limit-msg { border-left: 3px solid var(--live); background: rgba(229, 72, 77, .1); padding: 8px 12px; border-radius: 6px; margin: 10px 0; font-size: 13px; }
.usage { display: grid; gap: 10px; margin: 14px 0 18px; }
.u-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bar { height: 6px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar span.full { background: var(--live); }
.period-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg { font: inherit; font-size: 13px; border: 0; background: none; color: var(--muted); padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.seg.active { background: var(--accent); color: #fff; }
.seg .save { font-size: 11px; opacity: .85; margin-left: 4px; }
.plan-toggles { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.period-toggle .seg { display: inline-block; border-bottom: 0; }
.save-pill { display: inline-block; font-size: 11px; font-weight: 600; color: #1f7a52; background: #e3f5ec; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.save-pill.ghost { background: none; border: 1px dashed #2f9e6b; }
@media (prefers-color-scheme: dark) { .save-pill { color: #7fd9aa; background: #173a2a; } }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-card h4 { font-size: 15px; }
.plan-card .price { font-size: 26px; font-weight: 700; }
.plan-card .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; align-content: start; gap: 4px; font-size: 13px; flex: 1; }
.plan-card li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.plan-card .btn.wide { width: 100%; text-align: center; text-decoration: none; display: block; }
.plan-card.current { outline: 2px solid var(--ok); outline-offset: -2px; }

/* interview scorecard */
.notes-type { margin-bottom: 0; margin-right: auto; }
.rec-card { border-left: 4px solid var(--muted); }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rec-pill { font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.rec-who { color: var(--muted); font-size: 13px; }
.rec-strong, .rec-yes { border-left-color: #2f9e6b; } .rec-strong .rec-pill, .rec-yes .rec-pill { background: #e3f5ec; color: #1f7a52; }
.rec-lean { border-left-color: #8bb83a; } .rec-lean .rec-pill { background: #eef6e0; color: #4f7414; }
.rec-leanno { border-left-color: #e5a00d; } .rec-leanno .rec-pill { background: #fdf1d8; color: #8a5d00; }
.rec-no { border-left-color: #e5484d; } .rec-no .rec-pill { background: #fde8e8; color: #b42318; }
table.scores { width: 100%; border-collapse: collapse; }
table.scores td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.scores tr:last-child td { border-bottom: 0; }
.sc-area { font-weight: 600; width: 28%; } .sc-dots { color: var(--accent); white-space: nowrap; letter-spacing: 1px; width: 90px; } .sc-ev { color: var(--muted); }
ol.qa { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.qa-q { font-weight: 600; } .qa-a { margin-top: 3px; } .qa-n { margin-top: 2px; }
.assess { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; background: var(--accent-soft); }
.a-strong { background: #e3f5ec; color: #1f7a52; } .a-adequate { background: #eef0f6; color: #4a4a5a; }
.a-weak { background: #fde8e8; color: #b42318; } .a-not_answered { background: #f1f1f4; color: #6b6b7b; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .two-col .card { margin-bottom: 14px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .sc-area { width: auto; } }
@media (prefers-color-scheme: dark) {
  .rec-strong .rec-pill, .rec-yes .rec-pill, .a-strong { background: #173a2a; color: #7fd9aa; }
  .rec-lean .rec-pill { background: #2a3517; color: #b9dc7a; } .rec-leanno .rec-pill { background: #3a2e10; color: #f0c560; }
  .rec-no .rec-pill, .a-weak { background: #3d1a1a; color: #ff9b9b; } .a-adequate, .a-not_answered { background: #2b2b35; color: #c4c4d0; }
}

/* public share page (/s/<token>) */
.share-body { height: auto; min-height: 100%; }
.share-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px max(20px, calc(50% - 430px)); background: var(--panel); border-bottom: 1px solid var(--line); }
.share-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.logo-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 14px; }
.share-main { max-width: 860px; margin: 0 auto; padding: 24px 20px 40px; }
.share-head { padding: 0 0 4px; border: 0; background: none; position: static; }
.share-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.share-title { font-size: 26px; margin: 0 0 6px; }
.share-main .tab-body { padding: 16px 0 0; }
.share-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; border-color: var(--accent); }
@media (max-width: 600px) { .share-cta { flex-direction: column; align-items: flex-start; } .share-title { font-size: 21px; } }

/* share dialog */
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 12px 0; cursor: pointer; }
dialog .check-row input { width: auto; flex: none; margin: 0; padding: 0; accent-color: var(--accent); }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.danger-link { color: var(--live); font-weight: 600; }
