/* Harbor & Pine: the record's look. */
:root {
  --bg: #f5f4f0; --card: #ffffff; --fg: #1d2330; --fg2: #3f4757; --muted: #6b7385; --line: #e5e3dc; --line2: #efede7;
  --brand: #0f6e64; --brand-2: #14857a; --brand-soft: #e3f1ee; --accent: #2f5fd0; --accent-soft: #e9effc;
  --good: #1f8f5f; --good-soft: #e2f4ea; --warn: #b7791f; --warn-soft: #fbf0dc; --bad: #c2413a; --bad-soft: #fbe6e4; --info: #5b5fc7; --info-soft: #ecebfb;
  --health: #2f7fc1; --behavioral: #7b5cc4; --food: #d0802b; --income: #1f8f5f; --housing: #c2413a; --utilities: #b8892a; --legal: #50607a; --crisis: #c2185b; --employment: #2a8c9a; --family: #d4589a; --veterans: #44608c; --general: #6b7385;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 30, 40, .05), 0 4px 16px rgba(20, 30, 40, .05);
  --font: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12151b; --card: #1a1e26; --fg: #e8eaef; --fg2: #c4c9d4; --muted: #949bab; --line: #2b303b; --line2: #232731; --brand: #3fbfae; --brand-2: #57cdbd; --brand-soft: #173430; --accent: #7f9cf5; --accent-soft: #1e2742;
    --good: #4cc38a; --good-soft: #17322a; --warn: #e0a84a; --warn-soft: #3a2e17; --bad: #ef6b63; --bad-soft: #3c1d1c; --info: #9a9df0; --info-soft: #25264a; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14.5px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 24px; letter-spacing: -0.015em; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: -0.005em; }
h3 { font-size: 14.5px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }

/* frame */
.demo-banner { background: #23324a; color: #e8eefc; font-size: 12.5px; text-align: center; padding: 6px 16px; }
.demo-banner b { color: #ffd479; }
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo-link { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 16px; color: var(--fg); white-space: nowrap; }
.logo-link:hover { text-decoration: none; }
.logo-link svg { width: 26px; height: 26px; }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav a { color: var(--fg2); font-weight: 560; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.top nav a:hover { background: var(--line2); text-decoration: none; }
.top nav a.on { color: var(--brand); background: var(--brand-soft); }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.top .me .who { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.top .me .who b { color: var(--fg); font-weight: 600; }
.spend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.spend .bar { width: 46px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.spend .bar i { display: block; height: 100%; background: var(--brand); }
main { max-width: 1320px; margin: 0 auto; padding: 22px 24px 80px; }
@media (max-width: 820px) {
  .top { padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; }
  .top .me .who, .spend { display: none; }
  main { padding: 16px 14px 60px; }
}

/* parts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card h2 .muted { font-weight: 450; font-size: 13px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.btn, button.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-weight: 560; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ai { background: linear-gradient(135deg, #0f6e64, #2f5fd0); border: 0; color: #fff; }
.btn.ai::before { content: "✦"; font-size: 12px; }
.btn.small { padding: 4px 9px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 620; background: var(--line2); color: var(--fg2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); } .pill.brand { background: var(--brand-soft); color: var(--brand); } .pill.accent { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips .pill { max-width: 100%; white-space: normal; line-height: 1.35; padding-top: 2px; padding-bottom: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; letter-spacing: .02em; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.callout { border-radius: 12px; padding: 10px 14px; font-size: 13.5px; background: var(--accent-soft); }
.callout.warn { background: var(--warn-soft); } .callout.bad { background: var(--bad-soft); } .callout.good { background: var(--good-soft); } .callout.brand { background: var(--brand-soft); }
.callout b { color: var(--fg); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 14px; color: var(--fg2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 560; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button .n { font-size: 11px; color: var(--muted); margin-left: 4px; }
input.field, select.field, textarea.field { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
input.field:focus, textarea.field:focus, select.field:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
textarea.field { min-height: 120px; resize: vertical; line-height: 1.45; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.src { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); cursor: pointer; vertical-align: 1px; white-space: nowrap; border: 0; }
.src:hover { filter: brightness(.95); }
.src.ln { font-family: var(--mono); font-weight: 500; }
.made { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.made .ai-badge { color: var(--brand); font-weight: 650; }
.made .ai-badge::before { content: "✦ "; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 8px; }

/* AI at work */
.working { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(180deg, var(--brand-soft), var(--card) 70%); border-radius: var(--radius); padding: 14px 18px; }
.working h3 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.working ol { list-style: none; margin: 0; padding: 0; }
.working li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 4px 0; font-size: 13.5px; }
.working li .d { color: var(--muted); font-size: 12.5px; }
.working li .t { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.working li .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; margin-top: 1px; }
.working li.done .ic { background: var(--good); color: #fff; }
.working li.now .ic { border: 2px solid var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.working .err { color: var(--bad); margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 14px; height: 14px; border: 2px solid var(--brand); border-top-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }

/* login */
.login { max-width: 980px; margin: 24px auto; }
.login .hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; margin-bottom: 22px; }
@media (max-width: 760px) { .login .hero { grid-template-columns: 1fr; } }
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.account { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--card); cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.account:hover { border-color: var(--brand); }
.account .role { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 700; }
.account .what { font-size: 12.5px; color: var(--muted); }
.account .go { margin-top: auto; color: var(--brand); font-weight: 650; font-size: 13px; }

/* caseload */
.today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
@media (max-width: 860px) { .today { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); }
.stat .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 560; }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cc { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; cursor: pointer; color: var(--fg); transition: border-color .15s, transform .15s; }
.cc:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.cc .head { display: flex; gap: 12px; align-items: center; }
.cc .name { font-weight: 680; font-size: 15.5px; }
.cc .sub { font-size: 12.5px; color: var(--muted); }
.cc .probs { font-size: 12.5px; color: var(--fg2); }
.cc .trend { display: flex; align-items: center; gap: 10px; }
.cc .trend .lab { font-size: 11.5px; color: var(--muted); }
.cc .foot { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line2); padding-top: 8px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 560; color: var(--fg2); font-size: 13px; }
.seg button.on { background: var(--brand-soft); color: var(--brand); }

/* client header */
.chead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.chead .facts { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--fg2); }
.chead .facts span { display: inline-flex; gap: 5px; align-items: center; }
@media (max-width: 600px) { .chead { align-items: flex-start; gap: 12px; } .chead > .grow { flex: 1 1 220px; min-width: 0; } .chead > div:last-child:not(.grow) { text-align: left !important; } .chead h1 { font-size: 21px; } }
.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.need { border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--card); }
.need .k { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.need .v { font-weight: 640; font-size: 13.5px; }
.need.bad { background: var(--bad-soft); border-color: transparent; } .need.warn { background: var(--warn-soft); border-color: transparent; } .need.good { background: var(--good-soft); border-color: transparent; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 4px 0 12px; }
.tl::before { content: ""; position: absolute; left: -17px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--brand); }
.tl.call::before { border-color: var(--accent); } .tl.pending::before { background: var(--warn); border-color: var(--warn); }
.tl .when { font-size: 12px; color: var(--muted); }
.tl a.title { font-weight: 620; color: var(--fg); }

/* brief */
.brief .headline { font-size: 16px; font-weight: 620; line-height: 1.4; }
.brief ul { margin: 4px 0; padding-left: 18px; } .brief li { margin: 3px 0; }
.brief .q { font-size: 15px; font-style: italic; color: var(--brand); }

/* benefits */
.value-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--line2); }
.value-bar i { display: block; height: 100%; min-width: 3px; }
.value-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--fg2); margin-top: 6px; }
.prog { border: 1px solid var(--line); border-left: 4px solid var(--cat, var(--brand)); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.prog .t { font-weight: 660; }
.prog .val { font-weight: 720; color: var(--good); font-variant-numeric: tabular-nums; }
.prog .why { font-size: 13.5px; margin: 4px 0; }
.prog .ev { font-size: 12.5px; color: var(--fg2); border-left: 2px solid var(--line); padding-left: 8px; margin: 4px 0; }
.prog details { font-size: 12.5px; }
.prog details summary { cursor: pointer; color: var(--muted); }
.week { display: grid; gap: 6px; }
.week .d { display: grid; grid-template-columns: 90px 96px 1fr; gap: 8px; font-size: 13.5px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line2); }
@media (max-width: 600px) { .week .d { grid-template-columns: 1fr; gap: 2px; } }
.week .day { font-weight: 680; }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.screen { font-size: 12.5px; padding: 6px 9px; border-radius: 9px; background: var(--line2); display: flex; gap: 6px; align-items: center; }
.screen.likely { background: var(--good-soft); } .screen.possible { background: var(--warn-soft); } .screen.enrolled { background: var(--accent-soft); }
.map { height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.map.tall { height: 560px; }
.svc { padding: 10px 0; border-bottom: 1px solid var(--line2); cursor: pointer; }
.svc:hover .t { color: var(--brand); }
.svc .t { font-weight: 620; }
.svc .m { font-size: 12.5px; color: var(--muted); }

/* application */
.form-sec { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.form-sec h3 { margin: 0; padding: 8px 14px; background: var(--line2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg2); }
.fld { display: grid; grid-template-columns: 220px 1fr; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line2); font-size: 13.5px; align-items: start; }
.fld:first-of-type { border-top: 0; }
@media (max-width: 640px) { .fld { grid-template-columns: 1fr; gap: 2px; } }
.fld .l { color: var(--fg2); font-weight: 560; }
.fld .v { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.fld.missing { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
.fld.check { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.fld .ask { font-size: 12.5px; color: var(--bad); width: 100%; }
.fld.check .ask { color: var(--warn); }
.letter { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.6; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.meter { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line2); }
.meter i { display: block; height: 100%; }

/* treatment and research */
.rec { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card); }
.rec .t { font-weight: 680; font-size: 15px; }
.strength { display: inline-flex; gap: 2px; vertical-align: middle; }
.strength i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.strength.s3 i { background: var(--good); } .strength.s2 i:nth-child(-n+2) { background: var(--brand); } .strength.s1 i:nth-child(1) { background: var(--warn); }
.study { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.study:first-child { border-top: 0; }
.kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; white-space: nowrap; height: fit-content; }
.kind.guideline { background: #1f8f5f; color: #fff; } .kind.meta-analysis { background: #2f5fd0; color: #fff; } .kind.systematic-review { background: #7b5cc4; color: #fff; } .kind.trial { background: var(--line2); color: var(--fg2); }
.paper-title { font-weight: 620; color: var(--fg); cursor: pointer; }
.paper-title:hover { color: var(--brand); }
.paper .meta { font-size: 12px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; }
.paper .abs { font-size: 13px; color: var(--fg2); margin-top: 4px; }
.paper { padding: 12px 0; border-bottom: 1px solid var(--line2); }
.rs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .rs-layout { grid-template-columns: 1fr; } }
.facet h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facet .r { display: flex; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.facet .r:hover { background: var(--line2); }
.facet .r.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.facet .r .n { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.read-as { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; font-size: 16px; padding: 11px 14px; border-radius: 12px; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.topic { cursor: pointer; }
.topic:hover { border-color: var(--brand); }
.answer { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: linear-gradient(180deg, var(--brand-soft), var(--card) 60%); border-radius: var(--radius); padding: 14px 18px; }
.answer .a { font-size: 15px; line-height: 1.55; }
.answer ol { padding-left: 20px; } .answer li { margin: 5px 0; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(720px, 100%); background: var(--card); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.15); z-index: 100; overflow-y: auto; padding: 20px 24px 60px; transform: translateX(100%); transition: transform .2s ease; }
.drawer.open { transform: none; }
.drawer .x { position: sticky; top: 0; float: right; }
.scrim { position: fixed; inset: 0; background: rgba(10, 15, 25, .3); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.abstract { white-space: pre-line; font-size: 14px; line-height: 1.6; color: var(--fg2); }

/* session */
.sess { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .sess { grid-template-columns: 1fr; } }
.tx { max-height: calc(100vh - 210px); overflow-y: auto; padding-right: 6px; position: sticky; top: 70px; }
@media (max-width: 1000px) { .tx { max-height: 520px; position: static; } }
.turn { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 5px 8px; border-radius: 10px; font-size: 13.5px; scroll-margin: 120px; }
.turn .ts { font-size: 11px; color: var(--muted); font-family: var(--mono); padding-top: 2px; }
.turn .who { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.turn.clinician .who { color: var(--brand); } .turn.client .who { color: var(--accent); } .turn.other .who { color: var(--warn); }
.turn.client { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.turn.hl { background: color-mix(in srgb, #ffd479 45%, transparent) !important; outline: 1px solid #e0b040; }
.turn .code { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; margin-left: 6px; color: #fff; }
.talkline { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--line2); cursor: pointer; }
.talkline i { display: block; height: 100%; }
.note-sec h3 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.note-sec p { margin: 0 0 6px; }
.sent { border-radius: 5px; padding: 1px 2px; }
.sent:hover { background: var(--line2); }
[contenteditable="true"] { outline: 1px dashed var(--line); border-radius: 6px; padding: 2px 4px; }
.gauges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gauge { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.gauge .v { font-size: 22px; font-weight: 740; font-variant-numeric: tabular-nums; }
.gauge .k { font-size: 12px; color: var(--muted); font-weight: 560; }
.gauge .b { height: 6px; background: var(--line2); border-radius: 3px; margin-top: 6px; position: relative; }
.gauge .b i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.gauge .b u { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--fg2); opacity: .5; }
.moment { border-left: 3px solid var(--good); padding: 6px 10px; margin: 8px 0; background: var(--good-soft); border-radius: 0 10px 10px 0; font-size: 13.5px; }
.moment.miss { border-color: var(--warn); background: var(--warn-soft); }
.moment .try { margin-top: 4px; font-style: italic; color: var(--fg); }
.flag { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.flag.high { border-left-color: var(--bad); } .flag.low { border-left-color: var(--good); }
.flag blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--fg2); font-style: italic; }
.risk-dial { display: flex; gap: 4px; }
.risk-dial i { flex: 1; height: 10px; border-radius: 5px; background: var(--line2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; gap: 5px; align-items: center; }

/* charts */
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
svg.chart .grid line { stroke: var(--line2); }

/* supervise */
.sv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sv-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sv-table td { padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.sv-table tr:hover td { background: var(--line2); }
.scroll-x { overflow-x: auto; }

/* leaflet tweaks */
.leaflet-container { font: 12.5px/1.4 var(--font); background: var(--line2); }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); } }
.leaflet-popup-content { margin: 10px 12px; }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin.home { width: 22px; height: 22px; background: #c2413a; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
