:root {
  --paper: #F7F3EC;
  --paper-2: #F1EBE1;
  --card: #FFFDF9;
  --ink: #22303A;
  --ink-2: #3E4C56;
  --muted: #6F7B85;
  --faint: #9AA5AE;
  --line: #E8E1D5;
  --line-2: #F0EAE0;
  --navy: #1D5C73;
  --navy-2: #164B5E;
  --navy-soft: #E4EFF3;
  --clay: #D4795A;
  --clay-soft: #FBE9E1;
  --sage: #4E8F63;
  --sage-soft: #E3F1E7;
  --amber: #C48A2B;
  --amber-soft: #FBF0DA;
  --risk: #C25B4E;
  --risk-soft: #FAE6E3;
  --plum: #7B5EA7;
  --plum-soft: #EEE8F6;
  --display: "Fraunces", Georgia, serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(34,48,58,.05), 0 2px 8px rgba(34,48,58,.04);
  --shadow-md: 0 1px 2px rgba(34,48,58,.05), 0 10px 30px rgba(34,48,58,.07);
  --shadow-lg: 0 2px 4px rgba(34,48,58,.05), 0 24px 60px rgba(34,48,58,.12);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.015em; font-variation-settings: "opsz" 48, "SOFT" 60; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18.5px; }
p { margin: 0 0 12px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }

/* ====== Sign-in ====== */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); background: var(--paper); }
.scene { position: relative; overflow: hidden; background: linear-gradient(180deg, #F4EBDD 0%, #F8F1E5 70%, #E9DCC7 100%); }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .caption { position: absolute; left: 44px; bottom: 36px; color: #4A3A2C; }
.scene .caption h2 { font-size: 30px; color: #4A3A2C; font-style: italic; font-variation-settings: "opsz" 72, "SOFT" 100; }
.scene .caption p { margin: 4px 0 0; color: #7A6650; font-size: 14.5px; }
.signin-panel { display: flex; flex-direction: column; justify-content: center; padding: 56px 64px; gap: 26px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.02em; color: #262626; line-height: 1; font-variation-settings: "opsz" 72, "SOFT" 10; text-decoration: none; }
.brand em { font-style: normal; color: var(--clay); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand.sm { font-size: 28px; }
.tagline { color: var(--muted); margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
input, textarea, select { font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,92,115,.14); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236F7B85' stroke-width='1.6' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; font-weight: 700; font-size: 14.5px; transition: transform .15s var(--ease), background .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(22,75,94,.2); white-space: nowrap; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22,75,94,.22); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn.block { width: 100%; padding: 13px 18px; font-size: 15.5px; }
.btn.secondary { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; padding: 8px 12px; }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); transform: none; box-shadow: none; }
.btn.clay { background: var(--clay); border-color: var(--clay); }
.btn.clay:hover { background: #C26A4B; border-color: #C26A4B; }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-card { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; display: flex; gap: 10px; align-items: center; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); }
.demo-card:hover { border-color: var(--navy); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.demo-card b { display: block; font-weight: 700; font-size: 14px; line-height: 1.25; }
.demo-card span.sub { color: var(--muted); font-size: 12.5px; }
.error { color: var(--risk); font-size: 14px; background: var(--risk-soft); padding: 9px 12px; border-radius: var(--r-sm); margin-bottom: 12px; }
#authstep > * + * { margin-top: 18px; }
#authstep h2 { margin-bottom: 6px; }
#authstep form { margin: 0; }
.sso-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.code-input { text-align: center; letter-spacing: .42em; font-size: 24px; font-weight: 700; font-family: var(--display); padding: 14px; }
.code-input::placeholder { letter-spacing: .42em; color: var(--line); }
.auth-alt { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.auth-alt .btn { font-size: 13.5px; }
.booting { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin-top: 4px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.switch b { font-weight: 600; font-size: 14px; }

/* avatars */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 12.5px; color: #fff; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.av-navy { background: var(--navy); } .av-clay { background: var(--clay); } .av-sage { background: var(--sage); } .av-plum { background: var(--plum); } .av-amber { background: var(--amber); } .av-slate { background: #6B7B88; }

/* ====== App shell ====== */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 24px; }
.topbar .brand { line-height: 1; }
.topbar .role-tag { font-size: 12px; color: var(--muted); margin-left: 10px; font-weight: 700; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 999px; margin-left: auto; scrollbar-width: none; }
.tabs a { white-space: nowrap; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.tabs .count { font-size: 11px; background: var(--risk); color: #fff; border-radius: 10px; padding: 1px 6px; font-weight: 800; }
.userchip { display: flex; align-items: center; gap: 10px; position: relative; }
.me { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 4px 4px 10px; border-radius: 999px; cursor: pointer; }
.me:hover { background: var(--paper-2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 268px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu-head b { display: block; font-size: 14px; line-height: 1.2; }
.menu-head span { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.menu a { display: block; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); font-weight: 600; font-size: 14px; }
.menu a:hover { background: var(--paper-2); text-decoration: none; }
.menu a#signout { color: var(--risk); }
.userchip .meta { text-align: right; line-height: 1.2; }
.userchip .meta b { display: block; font-size: 14px; }
.userchip .meta span { font-size: 12.5px; color: var(--muted); }
.userchip .meta a { font-size: 12.5px; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.bell:hover { color: var(--navy); border-color: var(--navy); }
.bell .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--clay); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.main { max-width: 1200px; margin: 0 auto; padding: 28px 28px 80px; animation: rise .35s var(--ease) both; overflow-x: clip; }
html, body { overflow-x: hidden; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.notice { display: flex; align-items: center; gap: 10px; background: var(--clay-soft); color: #8A4A32; border-radius: var(--r-md); padding: 8px 14px; font-size: 13px; margin-bottom: 22px; }
.notice svg { flex: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: inline-block; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ====== Blocks ====== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.card.tint-navy { background: linear-gradient(180deg, #F3F8FA, var(--card)); }
.card.tint-clay { background: linear-gradient(180deg, #FDF4EF, var(--card)); }
.card h3 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h3 .tiny { font-family: var(--sans); letter-spacing: 0; font-weight: 600; }
.stack > * + * { margin-top: 18px; }
.grid > *, .split > *, .stack > *, .card { min-width: 0; max-width: 100%; }
.table-wrap { max-width: 100%; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.kpi-band { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.kpi-band .filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.kpi-band .filters label { font-size: 13px; color: var(--muted); font-weight: 700; }
.kpi-band .filters select { width: auto; padding: 7px 34px 7px 12px; font-size: 14px; }
.kpi-band .filters .right { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi { background: linear-gradient(180deg, #FBF8F2, #F6F1E8); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 16px 16px 14px; text-align: center; }
.kpi .n { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--navy); font-variation-settings: "opsz" 72, "SOFT" 40; }
.kpi .n.sage { color: var(--sage); } .kpi .n.clay { color: var(--clay); } .kpi .n.risk { color: var(--risk); } .kpi .n.amber { color: var(--amber); }
.kpi .n small { font-size: 15px; color: var(--muted); font-family: var(--sans); font-weight: 600; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--paper-2); color: var(--muted); }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.strong, .pill.signed, .pill.active, .pill.reviewed { background: var(--navy-soft); color: var(--navy); }
.pill.steady { background: var(--sage-soft); color: var(--sage); }
.pill.coaching, .pill.review, .pill.moderate, .pill.draft { background: var(--amber-soft); color: var(--amber); }
.pill.watch, .pill.high { background: var(--risk-soft); color: var(--risk); }
.pill.low, .pill.quiet, .pill.invited, .pill.disabled { background: var(--paper-2); color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: 12.5px; font-weight: 600; margin: 0 6px 6px 0; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 700; color: var(--faint); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.row { cursor: pointer; transition: background .12s; }
.table tr.row:hover td { background: #FAF6EF; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .warn { color: var(--risk); font-weight: 700; }
.table .good { color: var(--sage); font-weight: 700; }
.person { display: flex; align-items: center; gap: 10px; }
.person b { font-weight: 700; display: block; line-height: 1.2; }
.person span { font-size: 12.5px; color: var(--muted); }
.person .avatar, .demo-card .avatar, .menu-head .avatar, .me .avatar { color: #fff; }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.attention li:last-child { border-bottom: 0; }
.attention .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--faint); }
.attention li[data-p="1"] .dot { background: var(--risk); box-shadow: 0 0 0 4px var(--risk-soft); }
.attention li[data-p="2"] .dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.attention li[data-p="3"] .dot { background: var(--navy); box-shadow: 0 0 0 4px var(--navy-soft); }
.attention b { font-weight: 700; display: block; }
.attention .d { color: var(--muted); font-size: 14px; }
.brief { font-family: var(--display); font-size: 17px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; font-variation-settings: "opsz" 14, "SOFT" 80; }
.brief.loading { color: var(--faint); }
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--paper-2); border-radius: var(--r-md); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--sans); font-size: 12.5px; fill: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.spark { vertical-align: middle; }
.trend-rows { display: grid; gap: 10px; }
.trend-row { display: grid; grid-template-columns: 150px 1fr 58px; align-items: center; gap: 12px; font-size: 14px; }
.trend-row .bars { display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.trend-row .bars i { flex: 1; background: var(--navy); border-radius: 4px 4px 2px 2px; min-height: 3px; opacity: .85; }
.trend-row .delta { text-align: right; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.up { color: var(--sage); } .down { color: var(--clay); } .flat { color: var(--faint); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; padding: 8px 12px; font-size: 14px; }
.filters select { padding-right: 34px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 50; box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
.skeleton { display: grid; gap: 18px; }
.skeleton div { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--paper-2) 25%, #F7F2EA 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ====== Session close-out ====== */
.session-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 26px; box-shadow: var(--shadow-sm); display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.session-hero .sub { color: var(--muted); margin-top: 4px; }
.transcript { padding: 0; overflow: hidden; }
.transcript .head { padding: 16px 24px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.transcript .head h3 { margin: 0; }
.turns { padding: 10px 0; }
.turn { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 8px 24px; border-left: 3px solid transparent; }
.turn .who { width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 800; display: grid; place-items: center; margin-top: 2px; }
.turn.therapist .who { background: var(--navy-soft); color: var(--navy); }
.turn.client .who { background: var(--clay-soft); color: var(--clay); }
.turn.mark-flag { border-left-color: var(--risk); background: #FCF3F1; }
.turn.mark-strength { border-left-color: var(--sage); background: #F1F8F3; }
.turn.mark-suggest { border-left-color: var(--amber); background: #FCF6EA; }
.turn .note { margin-top: 7px; font-size: 13.5px; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.05); }
.turn .note b { font-weight: 800; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.turn.mark-flag .note b { color: var(--risk); }
.turn.mark-strength .note b { color: var(--sage); }
.turn.mark-suggest .note b { color: var(--amber); }
.soap label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--faint); display: block; margin: 12px 0 5px; }
.soap textarea { min-height: 80px; font-size: 14.5px; }
.locked { background: var(--paper-2); padding: 10px 14px; border-radius: var(--r-sm); font-size: 14.5px; white-space: pre-wrap; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric-row div { background: var(--paper-2); border-radius: var(--r-md); padding: 12px 14px; }
.metric-row b { font-family: var(--display); font-size: 24px; font-weight: 500; display: block; line-height: 1.1; color: var(--navy); }
.metric-row span { font-size: 12.5px; color: var(--muted); }
.coach { list-style: none; margin: 0; padding: 0; }
.coach li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.coach li:last-child { border-bottom: 0; }
.coach q { display: block; font-size: 13.5px; color: var(--muted); font-style: italic; margin-top: 3px; }
.coach q::before, .coach q::after { content: none; }
.coach .alt { font-size: 13.5px; color: var(--sage); margin-top: 4px; font-weight: 600; }
.flag { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px 14px 20px; margin-bottom: 12px; background: #fff; box-shadow: var(--shadow-sm); position: relative; }
.flag::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--faint); }
.flag.high::before { background: var(--risk); } .flag.moderate::before { background: var(--amber); }
.flag q { display: block; font-family: var(--display); font-size: 16.5px; margin: 8px 0; color: var(--ink); font-variation-settings: "opsz" 20, "SOFT" 80; }
.flag q::before, .flag q::after { content: none; }
.flag .meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.flag .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.review-box { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; padding-top: 12px; border-top: 1px dashed var(--line); }
.review-box select { grid-column: 1 / -1; width: auto; padding: 8px 34px 8px 12px; font-size: 14px; }
.review-box input { padding: 9px 12px; font-size: 14px; }
.crisis { background: var(--risk-soft); color: #8E3D33; border-radius: var(--r-md); padding: 10px 14px; font-size: 13.5px; margin-top: 12px; }
.email { background: var(--paper-2); border-radius: var(--r-md); padding: 16px 18px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; }
ul.plain { padding-left: 18px; margin: 0; }
ul.plain li { margin-bottom: 5px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); counter-increment: s; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--navy-soft); color: var(--navy); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.steps li:last-child { border-bottom: 0; }
.dictate-state { font-size: 13px; color: var(--clay); font-weight: 700; }
.foot { text-align: center; color: var(--faint); font-size: 12.5px; padding: 30px 0 0; }

@media (max-width: 1040px) {
  .grid.two, .grid.three, .split { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis > :last-child:nth-child(odd) { grid-column: span 2; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .trend-row { grid-template-columns: 110px 1fr 50px; }
  .signin { grid-template-columns: 1fr; }
  .scene { min-height: 300px; }
  .signin-panel { padding: 40px 28px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  .signin { min-height: 100svh; }
  .scene { display: none; }
  .signin-panel { padding: 40px 22px 32px; justify-content: flex-start; gap: 22px; }
  .brand { font-size: 44px; }
  .btn.block { padding: 15px 18px; }
  input, textarea, select { padding: 13px 14px; font-size: 16px; }
  .sso-grid { grid-template-columns: 1fr; }
  .topbar-in { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px 10px; }
  .tabs { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; background: transparent; border-radius: 0; overflow-x: auto; gap: 6px; -webkit-overflow-scrolling: touch; }
  .tabs a { background: var(--paper-2); padding: 8px 14px; }
  .tabs a.active { background: var(--navy); color: #fff; box-shadow: none; }
  .userchip { margin-left: auto; gap: 6px; }
  .me { padding: 0; }
  .me .meta { display: none; }
  .menu { width: min(284px, calc(100vw - 32px)); }
  .main { padding: 16px 16px 56px; }
  .notice { font-size: 12.5px; padding: 8px 12px; margin-bottom: 16px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-head .actions .btn { width: 100%; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .kpi-band { padding: 14px; }
  .kpi-band .filters { flex-direction: column; align-items: stretch; gap: 8px; }
  .kpi-band .filters select { width: 100%; }
  .kpi-band .filters .right { margin-left: 0; align-self: flex-start; }
  .kpi { padding: 12px 10px; }
  .kpi .n { font-size: 28px; }
  .session-hero { flex-direction: column; align-items: flex-start; padding: 18px 16px; }
  .session-hero .avatar.lg { width: 44px; height: 44px; font-size: 15px; }
  .session-hero h1 { font-size: 24px; }
  .transcript .head { padding: 14px 16px; }
  .turn { padding: 8px 16px; }
  .turns { max-height: 70vh; overflow: auto; }
  .review-box { grid-template-columns: 1fr; }
  .review-box .btn, .review-box select { width: 100%; }
  .flag { padding: 12px 12px 12px 16px; }
  .flag q { font-size: 15.5px; }
  .filters select, .filters input { flex: 1 1 45%; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .table { font-size: 14px; }
  .table.wide { min-width: 660px; }
  .table th { white-space: nowrap; }
  .table td, .table th { padding: 10px 8px; }
  .trend-row { grid-template-columns: 96px 1fr 48px; font-size: 13px; }
  .brief { font-size: 16px; }
  .foot { font-size: 12px; padding-top: 20px; }
}
