/* Client portal, v7 (23 Nov 2026): the home page's look on the real portal (app/portal.html).
   Loaded after every inline layer in portal.html, so it wins: white paper, navy ink, Bricolage Grotesque,
   1.5px ink borders, hard offset shadows on the panels that matter, one colour per agent and the
   3D clay faces. Same tokens as assets/portal-ui.css (the portal demo). */

:root {
  color-scheme: light;
  --bg: #f6f7fa; --bg2: #ffffff; --panel: #f1f3f7; --raise: #f1f3f7;
  --line: #e3e7ee; --line2: #cfd5df; --line3: #0f1b2d;
  --ink: #0f1b2d; --ink-2: #33405a; --soft: #33405a; --muted: #5f6b80; --faint: #95a0b3;
  --gold: #2f5bea; --gold-hi: #2449c4; --gold-dim: #e6ecfe;
  --acc: #2f5bea; --acc2: #2449c4; --acc-bg: #e6ecfe;
  --ok: #11935a; --ok-bg: #def5ea; --warn: #a86a07; --warn-bg: #fdf1dc; --bad: #b42318; --bad-bg: #fde8e6;
  --nia: #d4870f; --nia-s: #fdf1dc; --rhea: #2f5bea; --rhea-s: #e6ecfe; --ava: #2f5bea; --leo: #11935a; --leo-s: #def5ea;
  --f-serif: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sh: 6px 6px 0 #0f1b2d; --sh-sm: 4px 4px 0 #0f1b2d;
}
html, body { background: var(--bg) !important; color: var(--ink) !important; }
body { font-optical-sizing: auto; }
body::before { background: radial-gradient(#d9dee7 1.2px, transparent 1.4px) 0 0 / 22px 22px !important; -webkit-mask: linear-gradient(180deg, #000, transparent 420px); mask: linear-gradient(180deg, #000, transparent 420px); opacity: .7; }
h1, h2, h3 { color: var(--ink) !important; font-weight: 700 !important; }
h1 { letter-spacing: -0.035em !important; font-stretch: 92%; }
h2 { font-weight: 700 !important; letter-spacing: -0.02em !important; }
h3 { font-weight: 650 !important; }
p { color: var(--ink-2); }
a { color: var(--ink); text-decoration-color: var(--line2); }
.label, .label.gold, .note, .muted { color: var(--muted) !important; }
.label, .label.gold { font-weight: 600 !important; }
.logo { background-image: url(/assets/logo-dark.png) !important; }
:focus-visible { outline-color: var(--rhea) !important; }

/* controls */
.btn { border: 1.5px solid var(--ink) !important; background: #fff !important; color: var(--ink) !important; font-weight: 600 !important; transition: transform .15s, background .15s; }
.btn:hover { background: var(--panel) !important; border-color: var(--ink) !important; transform: translateY(-1px); }
.btn.solid, .btn.solid:hover { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.btn.ghost { background: transparent !important; border-color: transparent !important; }
.btn.ghost:hover { background: var(--panel) !important; transform: none; }
.btn:disabled { opacity: .45; transform: none; }
input:not([type=checkbox]):not([type=radio]), select, textarea { background: #fff !important; color: var(--ink) !important; border: 1.5px solid var(--line2) !important; border-radius: 12px !important; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--ink) !important; box-shadow: 3px 3px 0 var(--rhea) !important; }
input[type=checkbox], input[type=radio] { accent-color: var(--leo); }
select { appearance: none; padding-right: 34px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%230f1b2d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat !important; }
legend, .dow, .calhead span, .calwrap .dow span { color: var(--muted) !important; font-weight: 700 !important; }

/* agents: 3D clay faces on their own tint, ringed in their colour */
.ag { background: var(--panel); box-shadow: inset 0 0 0 2px var(--c, var(--ink)); object-fit: cover !important; object-position: 50% 30% !important; border-radius: 50% !important; }
.ag-nia { --c: var(--nia); background: var(--nia-s); }
.ag-ava, .ag-rhea { --c: var(--rhea); background: var(--rhea-s); }
.ag-leo { --c: var(--leo); background: var(--leo-s); }

/* shell */
.banner.preview { background: var(--ink) !important; color: #fff !important; border-bottom: 1.5px solid var(--ink) !important; font-weight: 600; }
.pside { background: #fff !important; border-right: 1.5px solid var(--ink) !important; }
.pco { border: 1.5px solid var(--ink) !important; background: #fff !important; box-shadow: var(--sh-sm); }
.pco i { background: var(--ink) !important; color: #fff !important; font-weight: 700 !important; }
.pco b { font-weight: 650 !important; }
.pmenu { border: 1.5px solid var(--ink) !important; color: var(--ink) !important; font-weight: 600 !important; }
.pside .tab { color: var(--ink-2) !important; font-weight: 500 !important; }
.pside .tab:hover { background: var(--panel) !important; color: var(--ink) !important; }
.pside .tab[aria-selected="true"] { background: var(--ink) !important; color: #fff !important; }
.pside .tab .badge { background: var(--rhea) !important; color: #fff !important; font-weight: 700 !important; }
.pside .tab[aria-selected="true"] .badge { background: #fff !important; color: var(--ink) !important; }
.pgrp { color: var(--faint) !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px !important; }
.pag { color: var(--ink) !important; font-weight: 600; }
.pag img { width: 32px !important; height: 32px !important; }
.pag small { font-weight: 400; }
.pme { border-top: 1.5px solid var(--line) !important; }
.pbar { background: rgba(255,255,255,.92) !important; border-bottom: 1.5px solid var(--ink) !important; color: var(--muted) !important; }
.pbar .crumb b { color: var(--ink) !important; font-weight: 650 !important; }
.plive { color: var(--ok) !important; background: var(--ok-bg); border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; font-weight: 600; }
.plive i { box-shadow: 0 0 0 0 rgba(17,147,90,.5); }
.plive.setup { color: var(--muted) !important; background: var(--panel); }

/* surfaces: ink panels on white paper */
.card, .metric, .post, .sess, .book > div, .ov > div, .grid7, .hero, .tl, .banner:not(.preview), .empty, .plancard, .auth .box, .calwrap, .tablewrap, .thread, .mail, .box, .sdr-status, .list, .stats, .agents-strip, .miles {
  background: #fff !important; border: 1.5px solid var(--ink) !important; border-radius: 18px !important; color: var(--ink);
}
.list li { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
.list li + li { border-top: 1px solid var(--line) !important; }
.stats > div { border: 0 !important; background: none !important; }
.stats > div + div { border-left: 1.5px solid var(--line) !important; }
.agc + .agc { border-left: 1.5px solid var(--line) !important; }
.miles > div { border: 0 !important; background: none !important; }
.miles > div + div { border-left: 1.5px solid var(--line) !important; }
.empty { border-style: dashed !important; color: var(--muted) !important; background: rgba(255,255,255,.7) !important; }
.hero, .stats, .plancard, .auth .box, .thread { box-shadow: var(--sh) !important; }
.agents-strip { box-shadow: none !important; }
.note { font-size: 13px !important; }

/* overview */
.hero { background: #fff !important; position: relative; overflow: hidden !important; }
.hero::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 45%; pointer-events: none; background: radial-gradient(var(--line2) 1.3px, transparent 1.5px) 0 0 / 18px 18px; -webkit-mask: linear-gradient(90deg, transparent, #000 70%); mask: linear-gradient(90deg, transparent, #000 70%); opacity: .8; }
.hero > * { position: relative; z-index: 1; }
.hero .meta { color: var(--muted) !important; }
.hero .meta b { color: var(--ink) !important; font-weight: 650 !important; }
.ring circle { stroke: var(--panel) !important; }
.ring circle + circle, .ring .fg, .ring .val { stroke: var(--leo) !important; }
.big-ring .cap b { font-weight: 700 !important; }
.agc { color: var(--ink) !important; }
.agc:hover { background: var(--panel) !important; }
.agc b { font-weight: 700 !important; }
.agc img { border-radius: 50% !important; }
.agc .live { background: var(--ok) !important; box-shadow: 0 0 0 3px var(--ok-bg) !important; }
.agc:has(.ag-nia) { box-shadow: inset 0 -4px 0 var(--nia); }
.agc:has(.ag-ava) { box-shadow: inset 0 -4px 0 var(--rhea); }
.agc:has(.ag-leo) { box-shadow: inset 0 -4px 0 var(--leo); }
.stats b, .metric b, .metric .val { font-weight: 700 !important; letter-spacing: -0.04em !important; color: var(--ink) !important; }
.stats p { color: var(--ok) !important; font-weight: 600; }

/* timeline + phases */
.tl .line { background: var(--panel) !important; height: 4px !important; }
.tl .fill { background: var(--leo) !important; height: 4px !important; }
.tl .now span { background: var(--ink) !important; color: #fff !important; font-weight: 700 !important; }
.tl .now i { background: var(--leo) !important; box-shadow: 0 0 0 4px var(--leo-s) !important; }
.miles .w { color: var(--rhea) !important; font-weight: 700 !important; }
.miles > div.done .w { color: var(--ok) !important; }
.phases .ph b { font-weight: 650 !important; }

/* status pills */
.st { border: 1.5px solid var(--line2) !important; color: var(--ink-2) !important; background: #fff !important; font-weight: 600 !important; }
.st.approved { color: var(--ok) !important; background: var(--ok-bg) !important; border-color: transparent !important; }
.st.delivered { color: var(--warn) !important; background: var(--warn-bg) !important; border-color: transparent !important; }
.st.progress { color: var(--acc2) !important; background: var(--acc-bg) !important; border-color: transparent !important; }
.view, .cal-link { color: var(--rhea) !important; font-weight: 650; }
.cbox { border-top: 1px solid var(--line) !important; }
.cbox .c { background: var(--panel) !important; border: 0 !important; color: var(--ink) !important; border-radius: 14px 14px 14px 4px !important; }
.cbox .c.me { background: var(--ink) !important; color: #fff !important; border-radius: 14px 14px 4px 14px !important; }

/* tables */
thead th { background: var(--panel) !important; color: var(--muted) !important; font-weight: 700 !important; font-size: 12.5px !important; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1.5px solid var(--ink) !important; }
.tbl td, table td { color: var(--ink-2) !important; border-bottom: 1px solid var(--line) !important; }
.tbl td b, table td b { color: var(--ink); }
tbody th { background: none !important; color: var(--ink) !important; font-weight: 650 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 14.5px !important; border-bottom: 1px solid var(--line) !important; }
.tablewrap { overflow-x: auto; }

/* tabs inside views */
.subtabs, .podpick { border: 1.5px solid var(--ink) !important; background: #fff !important; }
.subtabs button, .podpick button { color: var(--ink-2) !important; font-weight: 600 !important; }
.subtabs button[aria-selected="true"], .podpick button[aria-pressed="true"] { background: var(--ink) !important; color: #fff !important; }
.chips span, .chip { border: 1.5px solid var(--line2) !important; background: #fff !important; color: var(--ink-2) !important; font-weight: 600; }

/* calendar */
.calwrap .d.on, .calwrap .d.sel, .day.today .d { background: var(--ink) !important; color: #fff !important; }
.day { border-color: var(--line) !important; }
.day.sel { background: var(--rhea-s) !important; box-shadow: inset 0 0 0 1.5px var(--rhea) !important; }

/* plan card */
.plancard { background: #fff !important; }
.plancard b { font-weight: 700 !important; letter-spacing: -0.045em !important; color: var(--ink); }
.plancard .pc-r { border-left: 1.5px dashed var(--line2); padding-left: 24px; }
.plancard p { color: var(--ink-2) !important; }

/* sign-in, footer, toast, overlays */
.auth .box { background: #fff !important; }
.foot { border-top: 1.5px solid var(--line) !important; color: var(--muted) !important; }
.foot a { color: var(--rhea) !important; }
.toast { background: var(--ink) !important; color: #fff !important; border: 1.5px solid var(--ink) !important; box-shadow: 4px 4px 0 var(--leo) !important; }
.scrim { background: rgba(15,27,45,.35) !important; }
.msg.err, .err { color: var(--bad) !important; }

/* cookie banner on the portal (legal.js) */
html body .cookie-bar, html body .cookie-dialog { background: #fff !important; color: var(--ink) !important; border: 1.5px solid var(--ink) !important; box-shadow: 6px 6px 0 var(--ink) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
html body .cookie-bar p, html body .cookie-dialog p { color: var(--ink-2) !important; }
html body .cookie-bar a, html body .cookie-dialog a, html body .cookie-bar .linkbtn { color: var(--ink) !important; }
html body .cookie-bar .btn, html body .cookie-dialog .btn { background: var(--ink) !important; color: #fff !important; border: 1.5px solid var(--ink) !important; }
html body .cookie-bar .btn.line, html body .cookie-dialog .btn.line { background: #fff !important; color: var(--ink) !important; border-color: var(--ink) !important; }

@media (max-width: 900px) {
  .pside { background: rgba(255,255,255,.96) !important; border-right: 0 !important; border-bottom: 1.5px solid var(--ink) !important; }
  .stats > div:nth-child(3) { border-left: 0 !important; }
  .stats > div:nth-child(n+3) { border-top: 1.5px solid var(--line) !important; }
  .agc + .agc { border-left: 0 !important; border-top: 1.5px solid var(--line) !important; }
  .plancard .pc-r { border-left: 0; padding-left: 0; border-top: 1.5px dashed var(--line2); padding-top: 16px; }
  .hero, .stats, .plancard, .auth .box, .thread { box-shadow: var(--sh-sm) !important; }
  .hero::after { width: 70%; }
}

/* the overview hero is a <section> directly in .wrap, whose sections are otherwise frameless */
.wrap > section.hero { border: 1.5px solid var(--ink) !important; border-radius: 18px !important; padding: 30px 32px !important; }
.pag img.ag, .agc img.ag { border-radius: 50% !important; }
@media (max-width: 900px) { .wrap > section.hero { padding: 22px 20px !important; } }

/* cards without a progress ring (approvals, briefs) are one column; only deliverables keep the ring column */
.card:not(:has(> .ring)):not(:has(> svg.ring)) { grid-template-columns: 1fr !important; }
.card .mail { box-shadow: none !important; border-radius: 14px !important; overflow: hidden; }
.mail .mail-h { padding: 10px 16px; background: var(--rhea-s); border-bottom: 1.5px solid var(--ink); font-size: 14px; }
.mail .mail-h span { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; margin-right: 8px; }
.mail .mail-b { padding: 14px 16px; }
.pill { font-weight: 700 !important; }
.wrap ul.feed { list-style: none; padding: 0; margin: 0; border: 1.5px solid var(--ink); border-radius: 18px; background: #fff; overflow: hidden; }
.wrap ul.feed li { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--ink-2); }
.wrap ul.feed li:first-child { border-top: 0; }
.book { gap: 14px !important; } .book > div { box-shadow: 4px 4px 0 var(--ink); }
.thread { padding: 16px !important; display: grid; gap: 10px; }
.thread .c { background: var(--panel) !important; color: var(--ink) !important; border: 0 !important; border-radius: 16px 16px 16px 4px !important; box-shadow: none !important; max-width: 80%; justify-self: start; padding: 10px 14px !important; }
.thread .c b { color: inherit !important; }
.thread .c.me { background: var(--ink) !important; color: #fff !important; border-radius: 16px 16px 4px 16px !important; justify-self: end; }
/* phones: views never push the page wider than the screen */
.wrap { grid-template-columns: minmax(0, 1fr); }
.wrap > *, .sdr-top, .sdr-status { min-width: 0; }
.sdr-status { flex-wrap: wrap; }
.sdr-line, .sdr-status .note { white-space: normal !important; min-width: 0; }
.subtabs, .podpick { max-width: 100% !important; overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; }
.subtabs button, .podpick button { flex: none; }
.sdr-top { grid-template-columns: minmax(0, 1fr) !important; }

/* shared sidebar pieces (same as portal-ui.css) */
.sb-client { display: grid; gap: 4px; padding: 0 4px 22px; }
.sb-client b { font-size: 25px; line-height: 1; font-weight: 700; font-stretch: 85%; letter-spacing: -.035em; color: var(--ink); }
.sb-client span { font-size: 13.5px; color: #5f6b80; }

.sb-team { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 10px; margin: 0 0 26px; }
.sb-team .faces { display: flex; padding-left: 4px; }
.sb-team .faces img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: var(--s); box-shadow: 0 0 0 1.5px var(--ink); object-fit: cover; }
.sb-team .faces img + img { margin-left: -10px; }
.sb-team .faces img.ag-nia { --s: #fdf1dc; } .sb-team .faces img.ag-ava { --s: #e6ecfe; } .sb-team .faces img.ag-leo { --s: #def5ea; }
.sb-team .faces img.off { filter: grayscale(1); opacity: .55; }
.sb-team .bubble { position: relative; display: block; padding: 11px 13px 12px; border: 1.5px solid var(--ink); border-radius: 4px 16px 16px 16px; background: #fff; box-shadow: 4px 4px 0 var(--ink); font-size: 14.5px; line-height: 1.4; font-weight: 500; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.sb-team .bubble small { display: block; font-size: 12px; font-weight: 600; color: #5f6b80; margin-bottom: 3px; }
.sb-team:hover .bubble { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.sb-team:focus-visible .bubble { outline: 2px solid #2f5bea; outline-offset: 3px; }

.sb-foot { margin-top: auto; padding-top: 22px; display: grid; gap: 14px; }
.sb-me { display: flex; gap: 10px; align-items: center; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.sb-me .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.sb-me span { display: grid; line-height: 1.25; } .sb-me b { font-size: 14.5px; } .sb-me small { font-size: 12.5px; color: #5f6b80; }
.sb-run { display: flex; align-items: center; gap: 7px; } .sb-run small { font-size: 12px; color: #5f6b80; } .sb-run img { height: 13px; width: auto; opacity: .85; }

/* ---- Sidebar (24 Nov 2026), same design as the demo: client name, the agents speaking up, type-only menu ---- */
.pside.sb { padding: 26px 20px 18px !important; gap: 0 !important; background: #fff !important; }
.pside.sb .pside-top { padding: 0 4px 22px !important; align-items: flex-start; }
.pside.sb .sb-nav { gap: 0 !important; }
.pside.sb .sb-nav .tab { display: flex !important; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 6px !important; border-radius: 0 !important; background: none !important; color: #33405a !important; font: 500 16px/1.3 var(--f-sans) !important; letter-spacing: -.01em !important; }
.pside.sb .sb-nav .tab:hover { background: none !important; color: var(--ink) !important; }
.pside.sb .sb-nav .tab:hover .l { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.pside.sb .sb-nav .tab[aria-selected="true"] { background: none !important; color: var(--ink) !important; font-weight: 700 !important; }
.pside.sb .sb-nav .tab[aria-selected="true"] .l { text-decoration: none; }
.pside.sb .sb-nav .l { position: relative; display: inline-block; }
.pside.sb .sb-nav .sb-scrib { position: absolute; left: -2px; bottom: -6px; width: calc(100% + 6px); height: 8px; overflow: visible; pointer-events: none; }
.pside.sb .sb-nav .sb-scrib path { fill: none; stroke: #2f5bea; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pside.sb .sb-nav .w { font-size: 12.5px; font-weight: 600; color: #b35f00; white-space: nowrap; }
.pside.sb .sb-team { margin-bottom: 22px; }
.pside.sb .sb-team .faces img.ag-ava { --s: #e6ecfe; }
.pside.sb .pme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1.5px solid var(--ink); font-weight: 600; font-size: 14.5px; }
.pside.sb .sb-run .logo { display: inline-block; width: 116px; height: 13px; background: url("../assets/logo-dark.png") left center / contain no-repeat !important; aspect-ratio: auto; opacity: .85; }
@media (max-width: 900px) {
  .pside.sb { padding: 12px 16px !important; }
  .pside.sb .pside-top { padding: 0 !important; align-items: center; }
  .pside.sb .sb-client b { font-size: 20px; }
  .pside.sb .sb-team, .pside.sb .sb-foot { display: none; }
  .pside.sb.menu-open .sb-team, .pside.sb.menu-open .sb-foot { display: grid; margin-top: 14px; }
}
.pside.sb .sb-nav .tab svg.sb-scrib { display: block !important; width: calc(100% + 6px) !important; height: 8px !important; stroke: none !important; }
.pside.sb .sb-nav .tab svg.sb-scrib path { stroke: #2f5bea !important; stroke-width: 3 !important; fill: none !important; }

/* Portal bridge (24 Nov 2026): conversations, playbook, calls & credit, insights */
.cv-grid { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 14px; }
.cv-list { display: grid; gap: 6px; max-height: 70vh; overflow-y: auto; padding-right: 2px; }
.cv-item { display: grid; gap: 3px; text-align: left; width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.cv-item:hover { border-color: var(--line2); }
.cv-item.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.cv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cv-meta { font-size: 13px; color: var(--muted); }
.cv-sum { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-st { font-size: 12px; font-weight: 700; border-radius: 7px; padding: 1px 7px; background: var(--panel, #f3f5f9); color: var(--ink-2); white-space: nowrap; }
.cv-st.s-needs_you { background: #fde8e4; color: #a3321f; }
.cv-st.s-with_you { background: var(--acc-bg); color: var(--acc2); }
.cv-thread { min-width: 0; }
.cv-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.cv-h h3 { margin: 0; }
.cv-msgs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.bub { max-width: 80%; padding: 9px 13px; border-radius: 16px; background: var(--panel, #f3f5f9); font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.bub small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.bub.b-ai { align-self: flex-end; background: var(--acc-bg); border-bottom-right-radius: 5px; }
.bub.b-you { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.bub.b-you small { color: #c9d1de; }
.bub.b-them { border-bottom-left-radius: 5px; }
.bub.b-system { align-self: center; background: none; border: 1px dashed var(--line2); font-size: 13px; color: var(--muted); }
.cv-reply { display: grid; gap: 8px; }
.cv-reply textarea { width: 100%; }
.cv-log { margin-top: 12px; font-size: 13.5px; }
.pb-add { display: grid; gap: 6px; margin-bottom: 16px; }
.pb-add input, .pb-add textarea, [data-credit-add] select, [data-credit-set] select { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.grid2 form { display: grid; gap: 8px; align-content: start; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.meter { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 12px 0 16px; }
.meter i { display: block; height: 100%; background: var(--acc); }
.meter.warn i { background: #d4870f; }
.msg.warn { background: #fff6e0; border: 1px solid #f0d58a; color: #6b4a00; border-radius: 10px; padding: 8px 12px; }
.flag.f-warn { border-left: 4px solid #d4870f; }
.flag.f-good { border-left: 4px solid #11935a; }
@media (max-width: 900px) { .cv-grid, .grid2 { grid-template-columns: 1fr; } .cv-list { max-height: none; } .bub { max-width: 92%; } }
/* Results: the latest week in detail (replies by kind, meetings, A/B test). */
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.res-card { background: var(--bg2); border: 1.5px solid var(--line3); border-radius: 14px; box-shadow: var(--sh-sm); padding: 16px 18px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.res-card.res-ab { grid-column: 1 / -1; }
.res-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-bars li { display: grid; grid-template-columns: minmax(84px, 9.5em) minmax(0, 1fr) 2.6em; align-items: center; gap: 10px; font-size: 14px; }
.res-bars .k { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-bars .res-track { height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.res-bars .res-track i { display: block; height: 100%; background: var(--acc); border-radius: 999px; }
.res-bars b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.res-meet, .ab-n { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.res-meet > div, .ab-n > div { display: grid; gap: 2px; min-width: 0; }
.res-meet b.num { font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.res-meet span, .ab-n span { font-size: 13px; color: var(--muted); }
.ab-arms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ab-arm { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; min-width: 0; }
.ab-arm.on { border-color: var(--acc); background: var(--acc-bg); }
.ab-angle { margin: 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.ab-n b.num { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.ab-verdict { margin: 0; font-size: 14.5px; color: var(--ink); }
.ab-testrun { margin: 0; justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; }
@media (max-width: 720px) {
  .res-grid, .ab-arms { grid-template-columns: minmax(0, 1fr); }
  .res-card { padding: 14px; }
}
