/* Theme "Control room": steel instrument panels, one signal colour (orange) for "act here", the four agents as instrument
   channels (1 teal, 2 blue, 3 amber, 4 green). Numbers and headings in Bahnschrift, the DIN-style face built into Windows. */
:root {
  --bg: #0d141b; --surface: #141d26; --surface-2: #1b2631; --text: #e6edf3; --muted: #8a9aab;
  --border: rgba(138,154,171,.17); --border-2: rgba(138,154,171,.32);
  --accent: #ff6b1a; --accent-ink: #1b0a00; --accent-soft: rgba(255,107,26,.13); --ai: #7fb8ff;
  --ok: #3dd68c; --ok-soft: rgba(61,214,140,.13); --warn: #f5b13d; --warn-soft: rgba(245,177,61,.14);
  --bad: #f2555a; --bad-soft: rgba(242,85,90,.14); --info: #a2b1c2; --info-soft: rgba(162,177,194,.12);
  --jira: #4da3ff; --sheet: #f5b13d;
  --g1: #1fc8b4; --g2: #4da3ff; --g3: #f5b13d; --g4: #3dd68c;
  --grad: linear-gradient(90deg, #ff6b1a, #ff9a3c);
  --a1: #1fc8b4; --a2: #4da3ff; --a3: #f5b13d; --a4: #3dd68c;
  --c-blue: #4da3ff; --c-teal: #1fc8b4; --c-plum: #c48a5a; --c-indigo: #6fa8d8; --c-green: #3dd68c; --c-ochre: #f5b13d;
  --c-orange: #ff8a3d; --c-sea: #34c9b4; --c-rose: #f07a9a; --c-sky: #6cb8fb; --c-slate: #7d8ca0; --c-red: #f2555a; --c-grey: #a2b1c2;
  --navy: #0b1117; --navy-2: #16212b; --navy-text: #b8c5d3; --brass: #ff6b1a; --brass-soft: rgba(255,107,26,.13);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Bahnschrift, "DIN Alternate", "DIN Next", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --serif: var(--display);
  --radius: 8px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 14px 34px -24px rgba(0,0,0,.85);
  --glow: none; --dots: rgba(138,154,171,.07); --gridline: rgba(138,154,171,.05);
  --sidebar: 248px; --side-bg: #0b1117; --side-text: #b8c5d3; --side-muted: #6f8092;
}
:root[data-theme="light"] {
  --bg: #e7ecf1; --surface: #ffffff; --surface-2: #f2f5f8; --text: #0e1822; --muted: #52627a;
  --border: rgba(14,24,34,.12); --border-2: rgba(14,24,34,.24);
  --accent: #e0560b; --accent-ink: #ffffff; --accent-soft: rgba(224,86,11,.10); --ai: #1f74d6;
  --ok: #138a52; --ok-soft: rgba(19,138,82,.11); --warn: #9a6200; --warn-soft: rgba(217,138,28,.15);
  --bad: #c62f35; --bad-soft: rgba(198,47,53,.10); --info: #50627a; --info-soft: rgba(80,98,122,.10);
  --jira: #1f74d6; --sheet: #b87a0e;
  --g1: #0e9c8c; --g2: #1f74d6; --g3: #b87a0e; --g4: #178a55;
  --grad: linear-gradient(90deg, #e0560b, #f08a2e);
  --a1: #0e9c8c; --a2: #1f74d6; --a3: #b87a0e; --a4: #178a55;
  --c-blue: #1f74d6; --c-teal: #0e9c8c; --c-plum: #9a5b2c; --c-indigo: #2f6fb8; --c-green: #178a55; --c-ochre: #9a6200;
  --c-orange: #c25410; --c-sea: #0f8572; --c-rose: #b83a63; --c-sky: #2f7fc4; --c-slate: #52627a; --c-red: #c62f35; --c-grey: #6b7a92;
  --navy: #0e1822; --navy-2: #1a2632; --navy-text: #c3cfdb; --brass: #e0560b; --brass-soft: rgba(224,86,11,.10);
  --shadow: 0 1px 0 #fff inset, 0 10px 26px -20px rgba(14,24,34,.45);
  --dots: rgba(14,24,34,.06); --gridline: rgba(14,24,34,.045);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
body { margin: 0; color: var(--text); font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--glow), radial-gradient(var(--dots) 1px, transparent 1px) 0 0 / 22px 22px, var(--bg); background-attachment: fixed; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
h1 { font-size: 24px; letter-spacing: -.02em; margin: 6px 0 4px; font-weight: 700; }
h2 { font-size: 12.5px; margin: 30px 0 10px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 700; }
h2 .count { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.sub { color: var(--muted); margin: 0 0 16px; }
.muted { color: var(--muted); }
.mono { white-space: nowrap; font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.spacer { flex: 1; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- shell: sidebar + main ---- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
  border-right: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 16px; }
.logo { width: 34px; height: 34px; border-radius: 4px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--ai)); color: #04101a; box-shadow: 0 0 22px rgba(31,200,180,.35); }
.logo svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand b { display: block; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 11.5px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 4px; color: var(--muted); font-weight: 600; font-size: 14px; }
.side nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--accent-soft); color: var(--accent); }
.side .label { margin: 18px 10px 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.mini { display: flex; flex-direction: column; gap: 1px; }
.mini a { display: flex; align-items: center; gap: 10px; padding: 6px 11px; border-radius: 4px; color: var(--text); font-size: 13.5px; }
.mini a:hover { background: var(--surface-2); text-decoration: none; }
.mini a span.s { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.mini a.planned { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; box-shadow: 0 0 0 3px transparent; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.run { background: var(--accent); animation: pulse 1.3s infinite; }
.dot.off { background: var(--bad); }
.dot.plan { background: transparent; border: 1.5px dashed var(--muted); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px var(--accent-soft); } 50% { box-shadow: 0 0 0 7px transparent; } }
.me { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me .who { line-height: 1.2; min-width: 0; flex: 1; } .me .who b { display: block; overflow: hidden; text-overflow: ellipsis; } .me .who small { color: var(--muted); font-size: 12px; }
.iconbtn { border: 1px solid var(--border); background: var(--surface); width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; color: var(--muted); }
.iconbtn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 28px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(10px); min-height: 60px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 8px 28px 64px; }
.datebox { display: flex; align-items: center; gap: 6px; }
.datebox button, .datebox input { border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding: 6px 11px; }
.datebox button:hover { background: var(--surface-2); }
.datebox input { font: inherit; color: inherit; color-scheme: inherit; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 3px; padding: 5px 12px; background: var(--surface); }
a.status:hover { text-decoration: none; border-color: var(--border-2); color: var(--text); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .status.run i { background: var(--accent); animation: pulse 1.3s infinite; } .status.off i { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { .dot.run, .status.run i, .flow::after { animation: none !important; } }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); gap: 8px; }
  .brand { padding: 0; } .brand small, .side .label, .mini { display: none; }
  .side nav { flex-direction: row; flex-wrap: wrap; flex: 1; } .side nav a { padding: 7px 10px; }
  .side nav a span { display: none; } .side nav a.on span { display: inline; }
  .me { margin: 0; border: 0; padding: 0; } .me .who { display: none; }
  .topbar { padding: 10px 14px; } .wrap { padding: 6px 14px 56px; }
}
* { box-sizing: border-box; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }


h2 .count { color: var(--muted); font-weight: 500; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.stat { padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; }

.toolbar { display: flex; gap: 10px; margin: 18px 0 12px; }
.toolbar input { flex: 1; max-width: 320px; border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding: 8px 12px; font: inherit; color: inherit; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.person { padding: 16px; display: block; color: inherit; transition: border-color .12s, transform .12s; }
.person:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.p-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-name { font-weight: 650; line-height: 1.25; }
.p-role { color: var(--muted); font-size: 13px; }
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m .v { font-weight: 700; font-size: 17px; } .m .k { color: var(--muted); font-size: 12px; }
.p-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 12px; font-weight: 650; background: var(--info-soft); color: var(--info); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.acc { background: var(--accent-soft); color: var(--accent); }

.back { display: inline-block; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.hero { display: flex; gap: 16px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.hero .avatar { width: 56px; height: 56px; font-size: 20px; }
.hero h1 { margin: 0; }

.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } .p-grid { grid-template-columns: repeat(2, 1fr); } }
.panel { padding: 16px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.ticket { padding: 16px; margin-bottom: 12px; }
.t-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.t-key { font-weight: 700; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 14px; }
.t-sum { font-weight: 600; flex: 1 1 260px; }
.t-meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.fp { margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: 4px; border: 1px solid var(--border); }
.fp .line { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.fp .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.fp .lab { color: var(--muted); font-size: 12px; font-weight: 650; width: 78px; flex: none; }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 8px; font-size: 13px; }
.chip.app { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.tw { overflow-x: auto; }
.mono { white-space: nowrap; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.flag { padding: 12px 14px; border-left: 4px solid var(--warn); margin-bottom: 10px; }
.flag.High { border-left-color: var(--bad); } .flag.Low { border-left-color: var(--info); }
pre { margin: 8px 0 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; overflow: auto; font-size: 12px; }
details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.err { color: var(--bad); padding: 20px; }

/* ---- controls ---- */
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding: 7px 14px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
input[type=text], input[type=number], input[type=time], input[type=search], input[type=date], select, textarea {
  border: 1px solid var(--border); background: var(--surface); color: inherit; border-radius: 4px; padding: 7px 10px; font: inherit; }
textarea { width: 100%; min-height: 70px; resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 3px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; cursor: pointer; }
.daypick { display: flex; gap: 4px; flex-wrap: wrap; }
.daypick label { border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); user-select: none; }
.daypick input { position: absolute; opacity: 0; width: 0; height: 0; }
.daypick label:has(input:checked) { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.daypick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- header status ---- */

/* ---- people ---- */
tr.inactive td { opacity: .55; }
tr.inactive td:first-child { opacity: 1; }
.banner { padding: 12px 16px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); margin: 14px 0 0; font-size: 14px; }
.banner code { background: var(--surface); padding: 1px 6px; border-radius: 5px; color: var(--text); }
.banner.info { background: var(--info-soft); color: var(--info); }

/* ---- settings ---- */
.sgroup { margin-top: 18px; }
.sgroup > .card { padding: 4px 18px; }
.sgroup h2 { margin: 0 0 2px; }
.sgroup .gdesc { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.field { display: grid; grid-template-columns: 1fr minmax(200px, 300px); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.field:last-child { border-bottom: 0; }
.field .fl { font-weight: 600; }
.field .fh { color: var(--muted); font-size: 13px; margin-top: 2px; }
.field .fn { color: var(--warn); font-size: 13px; margin-top: 4px; }
.field .ctl { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.field .ctl input[type=text] { width: 100%; }
.field .meta { font-size: 12px; color: var(--muted); width: 100%; text-align: right; }
.field .meta button { border: 0; background: none; color: var(--accent); padding: 0; font-size: 12px; }
.field.dirty { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
@media (max-width: 700px) { .field { grid-template-columns: 1fr; } .field .ctl { justify-content: flex-start; } .field .meta { text-align: left; } }
.conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 16px; }
.conn .k { color: var(--muted); font-size: 12px; font-weight: 650; }
.conn .v { margin-top: 4px; word-break: break-word; }
.savebar { position: sticky; bottom: 12px; margin-top: 18px; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--accent); border-radius: 4px; box-shadow: 0 6px 24px rgba(20,30,45,.15); flex-wrap: wrap; }
.savebar.show { display: flex; }

/* ---- dialog + toast ---- */
dialog { border: 1px solid var(--border); border-radius: 4px; padding: 0; background: var(--surface); color: var(--text); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,15,25,.45); }
.dlg-h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg-h h3 { margin: 0; font-size: 17px; }
.dlg-b { padding: 16px 20px; overflow: auto; max-height: calc(100vh - 200px); }
.dlg-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form label input, .form label textarea { width: 100%; font-weight: 400; color: var(--text); }
.form .wide { grid-column: 1 / -1; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.form label.check input { width: auto; flex: none; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.ulist { border: 1px solid var(--border); border-radius: 4px; max-height: 46vh; overflow: auto; margin-top: 10px; }
.urow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.urow:last-child { border-bottom: 0; }
.urow:hover { background: var(--surface-2); }
.urow.added { cursor: default; opacity: .6; }
.urow .nm { flex: 1; min-width: 0; }
.urow .id { color: var(--muted); font-size: 12px; font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: 4px; background: var(--text); color: var(--bg); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #fff; }

.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }

/* ---- overrides / new components ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .7; }
.person:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px rgba(31,200,180,.10); }
.btn { border-radius: 4px; }
.btn.primary { color: var(--accent-ink); font-weight: 700; }
.pill { letter-spacing: .01em; }
.pill.ai { background: rgba(77,163,255,.15); color: var(--ai); }
pre, .fp { background: var(--surface-2); }
.chip { background: var(--surface); }
table { font-size: 13.5px; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
dialog { box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.toast.bad { background: var(--bad); color: #fff; border-color: transparent; } .toast.warn { background: var(--warn); color: #1c1300; border-color: transparent; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 14px; }
.pagehead h1 { margin: 0; } .pagehead .sub { margin: 2px 0 0; }
.eyebrow { color: var(--accent); font-size: 11.5px; font-weight: 700; }

/* ---- agent pipeline strip ---- */
.pipe { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 0; margin: 4px 0 6px; }
.node { position: relative; padding: 14px 16px 14px; margin-right: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: block; color: inherit; transition: border-color .15s, transform .15s; }
.node:last-child { margin-right: 0; }
a.node:hover { text-decoration: none; border-color: var(--c); transform: translateY(-1px); }
.node .top { display: flex; align-items: center; gap: 8px; }
.node .num { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #05101a; background: var(--c); flex: none; }
.node .nm { font-weight: 650; line-height: 1.2; }
.node .meta { margin-top: 9px; font-size: 12.5px; color: var(--muted); min-height: 36px; }
.node.planned { background: transparent; border-style: dashed; }
.node.planned .num { background: transparent; color: var(--muted); border: 1.5px dashed var(--muted); }
.node.live { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 8px 28px color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); }
.node:not(:last-child)::before { content: ""; position: absolute; right: -27px; top: 50%; width: 26px; height: 2px; background: var(--border-2); }
.node.live:not(:last-child)::before { background: linear-gradient(90deg, var(--c), var(--border-2)); }
.node:not(:last-child)::after { content: ""; position: absolute; right: -30px; top: calc(50% - 4px); border-left: 6px solid var(--border-2); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.node .state { margin-left: auto; }
@media (max-width: 900px) { .pipe { grid-template-columns: 1fr 1fr; gap: 12px; } .node { margin-right: 0; } .node::before, .node::after { display: none !important; } }
@media (max-width: 520px) { .pipe { grid-template-columns: 1fr; } }

/* ---- main grid: people + activity ---- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-top: 8px; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.cols .grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.feed { padding: 6px 0; font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.feed .ev { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.feed .ev:last-child { border-bottom: 0; }
.feed .t { color: var(--muted); }
.feed .tag { color: var(--c, var(--accent)); font-weight: 700; }
.feed .what { color: var(--text); word-break: break-word; }
.feed .what .muted { display: block; margin-top: 2px; }
.feed .okc { color: var(--ok); } .feed .badc { color: var(--bad); } .feed .warnc { color: var(--warn); }
.feedhead { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px; font-weight: 700; font-family: system-ui, sans-serif; font-size: 12.5px; color: var(--muted); }

/* ---- agents page ---- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.agent { padding: 18px; position: relative; overflow: hidden; }
.agent::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); opacity: .9; }
.agent.planned { background: transparent; border-style: dashed; } .agent.planned::before { opacity: .35; }
.agent .hd { display: flex; align-items: center; gap: 12px; }
.agent .num { width: 38px; height: 38px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; background: var(--c); color: #05101a; flex: none; font-size: 16px; }
.agent.planned .num { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
.agent h3 { margin: 0; font-size: 16.5px; letter-spacing: -.01em; } .agent .hd .pill { margin-left: auto; }
.agent p.role { color: var(--muted); margin: 12px 0; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.io .k { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }
.metrics .v { font-weight: 700; font-size: 16px; } .metrics .k { color: var(--muted); font-size: 12px; }
.agent .act { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.addagent { padding: 18px; border-style: dashed; background: transparent; }
.addagent code, .ph code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
.ph { padding: 16px 18px; border: 1.5px dashed var(--border-2); border-radius: var(--radius); color: var(--muted); display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ph .num { width: 26px; height: 26px; border-radius: 4px; border: 1.5px dashed var(--muted); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.signedout { text-align: center; padding: 60px 20px; }
input[type=password], input[type=email] { border: 1px solid var(--border); background: var(--surface); color: inherit; border-radius: 4px; padding: 7px 10px; font: inherit; }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--surface-2) inset; }
.feed .ev { grid-template-columns: 64px 1fr; } .feed .t { white-space: nowrap; }
.feed .tag { color: color-mix(in srgb, var(--c, var(--accent)) 62%, var(--text)); }
@media (max-width: 900px) {
  .brand { flex: 1; }
  .side nav { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .side nav a { flex: 1; justify-content: center; }
}

/* ---- agent briefing ---- */
.brief { margin: 14px 0 4px; padding: 14px 18px 12px; border-radius: var(--radius); border: 1px solid transparent; position: relative; overflow: hidden;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--accent), var(--ai), var(--accent)) border-box;
  box-shadow: 0 10px 34px color-mix(in srgb, var(--ai) 12%, transparent); }
.brief::after { content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--ai), transparent); animation: scan 4.5s ease-in-out infinite; }
@keyframes scan { 0% { left: -40%; } 60%, 100% { left: 110%; } }
.brief-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--ai)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brief-h .muted, .brief-h a { -webkit-text-fill-color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.spark { font-size: 15px; -webkit-text-fill-color: var(--ai); }
.brief ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.brief li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.brief li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.brief li.ok::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.brief li.warn::before { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.brief li.bad::before { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.brief li b { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .brief::after { animation: none; display: none; } }

/* ---- clickable stats ---- */
button.stat { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
button.stat:hover { border-color: var(--border-2); transform: translateY(-1px); }
button.stat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 26px color-mix(in srgb, var(--accent) 18%, transparent); }
button.stat.on::before { opacity: 1; width: 4px; }
button.stat .l::after { content: "  ⌄"; opacity: .5; }
button.stat.on .l::after { content: "  · filtering"; color: var(--accent); opacity: 1; }

/* ---- person health ---- */
.ring { border-radius: 50%; padding: 2px; flex: none; background: var(--border); }
.ring.r-ok { background: conic-gradient(var(--ok), color-mix(in srgb, var(--ok) 40%, transparent), var(--ok)); }
.ring.r-warn { background: conic-gradient(var(--warn), color-mix(in srgb, var(--warn) 35%, transparent), var(--warn)); }
.ring.r-bad { background: conic-gradient(var(--bad), color-mix(in srgb, var(--bad) 35%, transparent), var(--bad)); }
.ring .avatar { border: 2px solid var(--surface); }
.person.h-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.dayline { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.dayline i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--ai)); }

/* ---- FAQ ---- */
.faq { padding: 4px 18px; }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 14.5px; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--accent); font-weight: 800; width: 12px; flex: none; }
.faq details[open] summary::before { content: "–"; }
.faq p { margin: 8px 0 0 22px; color: var(--muted); }
.ring .avatar { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
@media (max-width: 900px) {
  .pipe { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%); overflow-x: auto; gap: 10px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .pipe .node { scroll-snap-align: start; }
  .brief-h { flex-wrap: wrap; } .brief-h .muted:not(a) { display: none; }
}

/* =====================  v3: background, layout, person cards  ===================== */
.wrap { max-width: 1520px; }
.cols { grid-template-columns: minmax(0, 1fr) 360px; }
.cols .grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }

.side { background: color-mix(in srgb, var(--surface) 72%, transparent); }
.card { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); }

/* person card */
.pcard { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px; color: inherit; position: relative; overflow: hidden;
  transition: transform .16s, border-color .16s, box-shadow .16s; }
.pcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hc); opacity: .9; }
.pcard.h-ok { --hc: var(--ok); } .pcard.h-warn { --hc: var(--warn); } .pcard.h-bad { --hc: var(--bad); }
.pcard:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--hc) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hc) 35%, transparent), 0 14px 36px color-mix(in srgb, var(--hc) 14%, transparent); }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-top .avatar { width: 40px; height: 40px; font-size: 14px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--hc) 60%, transparent); }
.pc-id { min-width: 0; flex: 1; } .pc-id .p-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 3px; color: var(--hc); background: color-mix(in srgb, var(--hc) 13%, transparent); white-space: nowrap; }
.pc-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pc-body { display: flex; gap: 16px; align-items: center; }
.gauge { width: 78px; height: 78px; position: relative; flex: none; }
.gauge svg { width: 100%; height: 100%; }
.gauge circle { fill: none; stroke-width: 6; }
.g-bg { stroke: var(--surface-2); }
.gauge.off .g-bg { stroke: var(--border-2); stroke-width: 2; }
.g-fg { stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
.g-t { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.g-t b { font-size: 15.5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.g-t small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.pc-main { flex: 1; min-width: 0; }
.pc-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.pc-line b { font-size: 20px; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pc-bar { position: relative; height: 6px; border-radius: 4px; background: var(--surface-2); margin: 6px 0 10px; overflow: hidden; display: flex; }
.pc-bar i { display: block; height: 100%; }
.pc-bar .b-ip { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--ai))); }
.pc-bar .b-od { background: var(--bad); margin-left: auto; }
.pc-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.pc-kv b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 3px; } .pc-kv b.bad { color: var(--bad); }
.pc-kv em { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.k-ip { background: var(--accent); } .k-od { background: var(--bad); } .k-fl { background: var(--warn); }
.pc-note { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); padding-top: 11px; border-top: 1px dashed var(--border); }
.pc-note span { color: var(--ai); flex: none; }
.h-ok .pc-note { color: color-mix(in srgb, var(--ok) 55%, var(--muted)); }

/* command palette */
.kbd { font: 11px ui-monospace, Consolas, monospace; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.palette { width: min(560px, calc(100vw - 32px)); padding: 0; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 18px; font-size: 16px; background: transparent; }
.palette input:focus-visible { outline: none; }
.pal-list { max-height: 50vh; overflow: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 4px; color: var(--text); cursor: pointer; }
.pal-item small { margin-left: auto; color: var(--muted); }
.pal-item.on, .pal-item:hover { background: var(--accent-soft); text-decoration: none; }
.searchbtn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 4px; padding: 6px 10px; color: var(--muted); font-size: 13px; }
.searchbtn:hover { border-color: var(--border-2); color: var(--text); }
@media (max-width: 900px) { .searchbtn .kbd { display: none; } }

/* delivery */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num.bad { color: var(--bad); font-weight: 600; }
i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; flex: none; }
a.p-link { color: inherit; text-decoration: none; }

/* settings: sections */
.setwrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.setnav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); }
.setnav .sn-h { font-size: 11px; color: var(--muted); font-weight: 700;
  padding: 12px 10px 6px; display: flex; align-items: center; gap: 7px; }
.setnav .sn-h:first-child { padding-top: 4px; }
.setnav .sn-h i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.setnav button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.setnav button span { flex: 1; }
.setnav button:hover { background: var(--surface-2); }
.setnav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.setnav button.planned { color: var(--muted); font-style: italic; }
.setnav button small { font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 3px; padding: 1px 7px; }
.setnav button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: none; }
.setnav button.dirty .dot { display: block; }
.setbody > .sgroup:first-child, .setbody > .ssec { margin-top: 0; }
.setsearch { width: min(320px, 100%); align-self: flex-end; }
.sx { margin-top: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sx .muted { font-size: 13px; }
.subh { font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
@media (max-width: 900px) {
  .setwrap { grid-template-columns: 1fr; gap: 12px; }
  .setnav { position: static; flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px; gap: 4px; }
  .setnav .sn-h { display: none; }
  .setnav button { width: auto; white-space: nowrap; flex: none; scroll-snap-align: start; }
  .setsearch { width: 100%; }
}
.field[hidden], .ssec[hidden], #snone[hidden] { display: none !important; }
details.mt { margin-top: 8px; } details.mt summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* page loading: keep the old page visible but quiet, so clicks never feel lost */
#app.loading { opacity: .55; transition: opacity .15s .12s; pointer-events: none; }

/* deltas, sparklines, flag chips */
.delta { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.delta.good { color: var(--ok); } .delta.bad { color: var(--bad); }
.pc-week { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; font-size: 12px; color: var(--muted); }
svg.sparkb { width: 70px; height: 18px; flex: none; }
svg.sparkb rect { fill: var(--accent); opacity: .55; } svg.sparkb rect.now { opacity: 1; } svg.sparkb rect.zero { fill: var(--border-2); opacity: 1; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; }
.fchips button.pill { cursor: pointer; border: 0; font: inherit; font-size: 12px; }

/* daily report + delivery drill-down */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg small { color: var(--muted); margin-left: 3px; }
tr.rrow, tr.drow { cursor: pointer; }
tr.rrow:hover td, tr.drow:hover td, tr.drow.open td { background: var(--surface-2); }
tr.rrow:focus-visible, tr.drow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.caret { display: inline-block; color: var(--muted); transition: transform .15s; }
tr.drow.open .caret { transform: rotate(90deg); }
tr.ddet td { background: var(--surface-2); }
.dgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 6px 0 10px; }
.dl h4 { margin: 0 0 6px; font-size: 13px; } .dl h4 small { color: var(--muted); font-weight: 500; }
.dl ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.dl li span { margin-left: 4px; } .dl p { margin: 0; font-size: 13px; }
.pc-state.s-bad, .pc-state.s-warn, .pc-state.s-ok { white-space: nowrap; }
@media (max-width: 900px) { .dgrid { grid-template-columns: 1fr; } }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.4); }
.rtable td:nth-child(2) { min-width: 170px; }
.rtable td:nth-child(3) { white-space: nowrap; }
.banner.info { border-color: color-mix(in srgb, var(--ai) 40%, var(--border)); background: color-mix(in srgb, var(--ai) 10%, var(--surface)); color: var(--text); }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); background: var(--bad-soft); color: var(--text); }

/* ================================================================== shell v4: sidebar + top bar */
.shell { transition: grid-template-columns .2s ease; }
.side { padding: 16px 12px 14px; gap: 4px; border-right: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface) 70%, transparent)); }
.side::after { content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 100%; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent) 30%, color-mix(in srgb, var(--ai) 40%, transparent) 70%, transparent); }
.brand { padding: 2px 6px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border); position: relative; }
.brand .bt { min-width: 0; flex: 1; }
.brand b { font-size: 16px; font-weight: 750; letter-spacing: -.015em; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.logo { width: 36px; height: 36px; border-radius: 4px; box-shadow: 0 6px 20px -6px rgba(31,200,180,.6), inset 0 1px 0 rgba(255,255,255,.35); }
.iconbtn.collapse { width: 28px; height: 28px; border-radius: 4px; flex: none; }
.iconbtn.collapse .ico { width: 15px; height: 15px; transition: transform .2s; }

.side nav { gap: 1px; }
.side nav .nav-h { font-size: 10.5px; font-weight: 700; color: var(--muted);
  opacity: .8; padding: 14px 12px 6px; }
.side nav a { position: relative; padding: 8px 12px; border-radius: 4px; font-weight: 550; font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s; }
.side nav a .ico { width: 18px; height: 18px; flex: none; opacity: .85; }
.side nav a:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 85%, transparent); }
.side nav a.on { color: var(--text); font-weight: 650;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 3%, transparent)); }
.side nav a.on .ico { color: var(--accent); opacity: 1; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--ai)); box-shadow: 0 0 12px var(--accent); }

.agents-card { margin-top: 14px; border: 1px solid var(--border); border-radius: 4px; padding: 10px 8px 6px;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.ac-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 6px; gap: 8px; }
.ac-h span { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.ac-h b { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mini a { gap: 9px; padding: 6px 6px; font-size: 13px; color: var(--text); }
.mini a .num { width: 20px; height: 20px; border-radius: 4px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  color: var(--ac); background: color-mix(in srgb, var(--ac) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); }
.mini a .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini a.planned { color: var(--muted); } .mini a.planned .num { opacity: .6; border-style: dashed; }

.me { margin-top: auto; padding: 10px 8px; border: 1px solid var(--border); border-radius: 4px; gap: 9px;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.side .me { margin-top: auto; }
.me .av { width: 34px; height: 34px; background: linear-gradient(135deg, var(--accent), var(--ai)); color: #04101a; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.me .iconbtn { width: 30px; height: 30px; border-radius: 4px; background: transparent; }
.me .iconbtn .ico { width: 16px; height: 16px; }

/* collapsed rail */
.shell.rail { --sidebar: 76px; }
.shell.rail .brand .bt, .shell.rail .side nav a span, .shell.rail .side nav .nav-h, .shell.rail .ac-h, .shell.rail .mini a .nm,
.shell.rail .me .who, .shell.rail .me #theme { display: none; }
.shell.rail .brand { flex-direction: column; gap: 10px; }
.shell.rail .iconbtn.collapse .ico { transform: rotate(180deg); }
.shell.rail .side nav a { justify-content: center; padding: 10px 0; }
.shell.rail .side nav { gap: 4px; padding-top: 6px; }
.shell.rail .agents-card { padding: 8px 4px; }
.shell.rail .mini a { justify-content: center; position: relative; padding: 6px 0; }
.shell.rail .mini a .dot { position: absolute; right: 8px; top: 4px; width: 7px; height: 7px; }
.shell.rail .me { flex-direction: column; padding: 8px 4px; }

/* top bar */
.topbar { gap: 12px; padding: 12px 28px; min-height: 64px; flex-wrap: nowrap;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(1.3); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--ai) 45%, transparent), transparent); }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; min-width: 0; }
.crumb .ico { width: 14px; height: 14px; opacity: .6; }
.crumb b { color: var(--text); font-weight: 650; }
.searchbtn { min-width: 250px; padding: 7px 10px 7px 12px; border-radius: 4px; gap: 9px; margin-left: 10px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); }
.searchbtn .ico { width: 15px; height: 15px; }
.searchbtn > span:not(.kbd) { flex: 1; text-align: left; }
.status { padding: 6px 12px; font-weight: 550; white-space: nowrap; }
.datebox { gap: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); overflow: hidden; flex: none; }
.datebox button, .datebox input { border: 0; border-radius: 0; background: transparent; padding: 7px 10px; height: 34px; }
.datebox button + input, .datebox input + button, .datebox #today { border-left: 1px solid var(--border); }
.datebox button .ico { width: 15px; height: 15px; }
.datebox #today { font-weight: 600; padding: 7px 14px; }
.datebox button:hover { background: var(--surface-2); }
.runbtn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 4px; white-space: nowrap; flex: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--ai))); color: var(--accent-ink); border: 0;
  box-shadow: 0 6px 18px -8px var(--accent); font-weight: 650; }
.runbtn .ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.runbtn:hover { filter: brightness(1.07); }

@media (max-width: 1250px) { .searchbtn { min-width: 0; } .searchbtn > span:not(.kbd) { display: none; } .crumb #crumbsec, .crumb .ico { display: none; } }
@media (max-width: 900px) {
  .shell, .shell.rail { grid-template-columns: 1fr; --sidebar: auto; }
  .side::after { display: none; }
  .brand { border-bottom: 0; padding: 0; margin: 0; } .iconbtn.collapse, .agents-card, .side nav .nav-h, .crumb { display: none; }
  .me { border: 0; background: none; padding: 0; margin-top: 0; }
  .shell.rail .brand .bt, .shell.rail .me .who { display: block; }
  .side nav a.on::before { display: none; }
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .searchbtn { margin-left: 0; }
}

/* Agent 2: screen activity on the person page */
.amix { display: grid; grid-template-columns: 12px 140px 1fr 44px; gap: 8px; align-items: center; margin: 7px 0; font-size: 14px; }
.amix .dot { width: 10px; height: 10px; border-radius: 3px; }
.amix .ab { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.amix .ab i { display: block; height: 100%; border-radius: 4px; }
.amix .ap { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tstrip { display: flex; gap: 2px; height: 22px; margin-top: 14px; border-radius: 4px; overflow: hidden; }
.tstrip i { flex: 1; min-width: 4px; opacity: .9; }
.tstrip i:hover { opacity: 1; outline: 2px solid var(--text); outline-offset: -2px; }

.pc-screen { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 8px 2px 0; }
.pc-screen i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.pc-screen.warn { color: var(--warn, #fbbf24); font-weight: 600; }

/* Security page */
.secrow { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.secrow:last-child { border-bottom: 0; }
.secrow .muted { font-size: 13px; margin-top: 2px; line-height: 1.45; }
.secrow .fix { font-size: 12.5px; margin-top: 4px; }
.cmds .cmd { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.cmds .cmd:last-of-type { border-bottom: 0; }
.cmds .cmd .muted { font-size: 12.5px; }
.cmds .cl { display: flex; gap: 8px; align-items: center; margin-top: 3px; }
.cmds .cl code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 12.5px; padding: 5px 8px; border-radius: 4px; background: var(--bg2, rgba(127,127,127,.12)); }
.howto h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.howto h3 .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; font-size: 12px; border: 1px solid var(--border); }
.howto ol, .checks { margin: 0; padding-left: 20px; line-height: 1.65; font-size: 14px; }
.checks li { margin: 4px 0; }
.secgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); column-gap: 28px; }
.secgrid .secrow:last-child { border-bottom: 1px solid var(--border); }
.two.secdiag { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .two.secdiag { grid-template-columns: 1fr; } }

.fb { white-space: nowrap; }
.fbb { width: 28px; height: 26px; border-radius: 4px; border: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; margin-right: 4px; font-size: 13px; }
.fbb:hover { color: var(--text); border-color: var(--accent); }
.fbb.on.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); border-color: var(--ok); }
.fbb.on.bad { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); border-color: var(--bad); }
.accbig { display: flex; align-items: baseline; gap: 10px; } .accbig b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }

/* ================= v5 "aurora": the same look as the sign-in page ================= */
.card { background: color-mix(in srgb, var(--surface) 76%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 22px 60px -34px rgba(0, 0, 0, .8); transition: border-color .2s, transform .2s, box-shadow .2s; }
a.card:hover, .pcard:hover, .card.agent:hover { border-color: rgba(77, 163, 255, .45); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 26px 60px -30px rgba(255, 107, 26, .55); text-decoration: none; }

.stat::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; opacity: .85;
  background: linear-gradient(90deg, var(--g1), var(--g2), var(--g3)); }
.stat .n { background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 70%, var(--g2))); -webkit-background-clip: text; background-clip: text; }

.btn.primary, .runbtn { background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 10px 28px -14px rgba(255, 107, 26, .95); }
.btn.primary:hover, .runbtn:hover { background: var(--grad); filter: brightness(1.08); }
.btn { transition: border-color .15s, background .15s, transform .15s; }
.btn:hover { border-color: rgba(77, 163, 255, .5); }
.btn:active { transform: translateY(1px); }

.side { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border); }
.side nav a { transition: background .15s, color .15s; }
.side nav a.on { background: linear-gradient(90deg, rgba(255, 107, 26, .24), rgba(255, 154, 60, .07)); box-shadow: inset 0 0 0 1px rgba(77, 163, 255, .22); }
.side nav a.on .ico { color: var(--g2); }
.logo { background: linear-gradient(140deg, var(--g1), var(--g2) 55%, var(--g3)); box-shadow: 0 8px 26px -8px rgba(77, 163, 255, .8); }
.topbar { background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.topbar::after { background: linear-gradient(90deg, transparent, rgba(31, 200, 180, .5), rgba(77, 163, 255, .5), rgba(251, 191, 36, .35), transparent); }
.eyebrow { background: linear-gradient(90deg, var(--g1), var(--g2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pagehead h1 { letter-spacing: -.025em; }
input, select, textarea { transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--g2) !important; box-shadow: 0 0 0 3px rgba(77, 163, 255, .18); outline: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--g2) 6%, transparent); }
.pill.acc { background: rgba(77, 163, 255, .14); color: var(--g2); }
#app > * { animation: enter .35s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { body::before, #app > * { animation: none !important; } .card, a.card:hover { transition: none; transform: none !important; } }

/* Agent 3 */
.ascore { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; text-align: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); box-shadow: inset 0 0 0 3px var(--c); }
.ascore b { font-size: 32px; font-weight: 800; color: var(--c); line-height: 1; margin-top: 14px; }
.ascore span { font-size: 11.5px; color: var(--muted); padding: 0 12px; margin-top: -16px; }
.hstrip { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.hcell { display: grid; gap: 3px; text-align: center; font-size: 11px; color: var(--muted); }
.hcell i { width: 34px; height: 14px; border-radius: 4px; display: block; }
.cflag { padding: 10px 0; border-top: 1px solid var(--border); opacity: .72; } .cflag.on { opacity: 1; }
.apill { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--c); border: 1px solid var(--c); border-radius: 3px; padding: 1px 8px; white-space: nowrap; }

/* metrics block on the person page */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.mcell { padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.mcell b { display: block; font-size: 20px; letter-spacing: -.01em; }
.mcell span { font-size: 12px; color: var(--muted); }
.clickrow { cursor: pointer; } .clickrow:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.costbar { display: grid; grid-template-columns: minmax(180px, 1.4fr) 3fr 80px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.costbar .cb { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; } .costbar .cb i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.tip { padding: 10px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 0 10px 10px 0; margin: 8px 0; font-size: 13.5px; }
.tip b { display: block; margin-bottom: 2px; }

/* ================================================================ v6: agentic polish */
/* section headers carry a small gradient tick */
h2::before { content: ""; width: 14px; height: 2px; border-radius: 2px; flex: none; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.pagehead h1, .hero h1 { background: linear-gradient(92deg, var(--text) 55%, color-mix(in srgb, var(--g2) 80%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* data flows along the pipeline between live agents */
.node.live:not(:last-child)::before { background: linear-gradient(90deg, transparent 0 20%, var(--c) 45%, #fff 50%, var(--c) 55%, transparent 80%) 0 0 / 220% 100%, var(--border-2);
  animation: pflow 2.2s linear infinite; }
@keyframes pflow { from { background-position: 120% 0, 0 0; } to { background-position: -120% 0, 0 0; } }
.node.live .num { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); animation: pnum 2.8s ease-out infinite; }
@keyframes pnum { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
/* interactive cards lift and catch light */
a.card, .pcard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.card:hover, .pcard:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -22px rgba(255, 107, 26, .55), 0 0 0 1px rgba(77, 163, 255, .28); text-decoration: none; }
/* a thin moving bar while a page loads */
#app { position: relative; }
#app.loading::before { content: ""; position: fixed; left: var(--sidebar); right: 0; top: 0; height: 2px; z-index: 50;
  background: linear-gradient(90deg, transparent, var(--g1), var(--g2), var(--g3), transparent) 0 0 / 40% 100% no-repeat; animation: lbar 1s linear infinite; }
@keyframes lbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
#app > *:nth-child(2) { animation-delay: .03s; } #app > *:nth-child(3) { animation-delay: .06s; } #app > *:nth-child(4) { animation-delay: .09s; }
#app > *:nth-child(5) { animation-delay: .12s; } #app > *:nth-child(n+6) { animation-delay: .15s; }

/* person page: Day at a glance + jump links */
.story { position: relative; overflow: hidden; padding: 16px 18px; margin: 12px 0 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--g2) 10%, var(--surface)), var(--surface) 55%); border: 1px solid color-mix(in srgb, var(--g2) 30%, var(--border)); }
.story::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--g1) 18%, transparent), transparent 70%); }
.st-h { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .st-h .muted { font-weight: 500; font-size: 12.5px; }
.st-spark { color: var(--g2); animation: twinkle 3s ease-in-out infinite; } @keyframes twinkle { 50% { opacity: .45; transform: scale(.85); } }
.st-l { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: baseline; margin: 6px 0; font-size: 14px; }
.st-n { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: #05101a; }
.st-n.n1 { background: #1fc8b4; } .st-n.n2 { background: #4da3ff; } .st-n.n3 { background: #fbbf24; }
.st-todo { margin-top: 10px; padding: 9px 12px; border-radius: 4px; font-size: 13.5px; background: color-mix(in srgb, var(--g2) 9%, transparent); }
.st-todo b { margin-right: 6px; color: var(--g2); }
.jump { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.jump a { font-size: 12.5px; padding: 4px 11px; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.jump a:hover { color: var(--text); border-color: var(--g2); text-decoration: none; }
[id^="j-"] { scroll-margin-top: 80px; }

/* help: guide */
.htabs { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .htabs input { flex: 1; min-width: 220px; }
.seg button.on { background: linear-gradient(90deg, rgba(255, 107, 26, .28), rgba(255, 154, 60, .12)); color: var(--text); font-weight: 650; }
.gsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.gstep { padding: 14px 16px; position: relative; } .gstep p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.gs-n { position: absolute; right: 12px; top: 8px; font-size: 30px; font-weight: 800; opacity: .14; }
.gflow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.gflow-n { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--c) 55%, var(--border));
  background: color-mix(in srgb, var(--c) 9%, transparent); }
.gflow-n .num, .gagent .num { width: 22px; height: 22px; border-radius: 4px; display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; color: #05101a; background: var(--c); }
.gflow-a { flex: 1; min-width: 26px; height: 2px; position: relative; overflow: hidden; background: var(--border-2); }
.gflow-a i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--g2), transparent) 0 0 / 50% 100% no-repeat; animation: lbar 1.8s linear infinite; }
.gagents { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.gagent { border-top: 2px solid var(--c); } .gagent h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 15px; }
.gagent dl { margin: 0; font-size: 13px; } .gagent dt { color: var(--muted); font-size: 11px; margin-top: 8px; font-weight: 700; }
.gagent dd { margin: 2px 0 0; line-height: 1.5; }
.ganno { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .ganno { grid-template-columns: 1fr; } }
.anno { counter-reset: an; pointer-events: none; }
.anno .pc-state, .anno .gauge, .anno .pc-kv, .anno .pc-screen, .anno .pc-week, .anno .pc-note { position: relative; outline: 1px dashed color-mix(in srgb, var(--g2) 55%, transparent); outline-offset: 3px; border-radius: 4px; }
.anno .pc-state::after, .anno .gauge::after, .anno .pc-kv::after, .anno .pc-screen::after, .anno .pc-week::after, .anno .pc-note::after {
  position: absolute; top: -9px; left: -11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  font: 800 10.5px/1 system-ui, sans-serif; color: #fff; background: var(--grad); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.anno .pc-state::after { content: "1"; left: auto; right: -9px; } .anno .gauge::after { content: "2"; } .anno .pc-kv::after { content: "3"; }
.anno .pc-screen::after { content: "4"; } .anno .pc-week::after { content: "5"; } .anno .pc-note::after { content: "6"; }
.glegend { margin: 0; padding: 0; list-style: none; counter-reset: gl; display: grid; gap: 10px; }
.glegend li { counter-increment: gl; display: grid; grid-template-columns: 26px 1fr; gap: 4px 10px; font-size: 13.5px; }
.glegend li::before { content: counter(gl); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11.5px; color: #fff; background: var(--grad); }
.glegend li span { color: var(--muted); line-height: 1.5; }
.gul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.65; }
@media (prefers-reduced-motion: reduce) { .node.live::before, .node.live .num, .st-spark, .gflow-a i, #app.loading::before { animation: none !important; } }

/* ===== v7: Work review, CEO dashboard ===== */
.review { margin-top: 14px; padding: 18px 20px 14px; position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--v) 38%, var(--border)); }
.review::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--v); }
.review::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--v) 18%, transparent), transparent 68%); }
.rv-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.rv-badge { width: 46px; height: 46px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--v);
  background: color-mix(in srgb, var(--v) 14%, transparent); border: 1px solid color-mix(in srgb, var(--v) 45%, transparent); flex: none; }
.rv-main { flex: 1; min-width: 240px; }
.rv-eyebrow { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rv-eyebrow .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rv-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 3px; }
.rv-verdict { font-size: 19px; font-weight: 750; letter-spacing: -.02em; color: var(--v); }
.rv-line { color: var(--text); font-size: 14.5px; }
.rv-trend { display: grid; justify-items: end; gap: 2px; font-size: 11.5px; color: var(--muted); max-width: 190px; text-align: right; color: var(--muted); }
.spark { overflow: visible; color: var(--muted); }
.rv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; position: relative; z-index: 1; }
.rv-col { background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--border); border-radius: 4px; padding: 12px 14px; }
.rv-col h4, .rv-h { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.rv-h { margin: 16px 0 8px; position: relative; z-index: 1; } .rv-h .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rv-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.rv-exp { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.rchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 14px; position: relative; z-index: 1; }
.rchk { display: flex; gap: 10px; padding: 9px 11px; border-radius: 4px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.rchk.watch { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); } .rchk.concern { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.rdot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); margin-top: 1px; }
.rchk b { font-size: 13.5px; } .rchk p { margin: 2px 0 0; font-size: 12.8px; color: var(--muted); line-height: 1.45; }
.rsteps { margin-top: 14px; padding: 10px 14px; border-radius: 4px; background: var(--accent-soft); position: relative; z-index: 1; font-size: 13.5px; }
.rsteps ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.rv-foot { font-size: 12px; margin: 12px 0 0; position: relative; z-index: 1; }

.ceo-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 20px 24px; margin-top: 6px; }
.ceo-ring { display: grid; justify-items: center; gap: 6px; }
.ring { overflow: visible; filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent) 25%, transparent)); }
.ringv { transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); animation: ringin 1.4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ringin { from { stroke-dasharray: 0 400; } }
.ringt { font-size: 34px; font-weight: 800; fill: var(--text); letter-spacing: -.03em; } .rings { font-size: 9.5px; fill: var(--muted); }
.ceo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ceo-verd { display: grid; gap: 7px; min-width: 160px; } .ceo-verd .k { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.vrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tchart { width: 100%; height: auto; } .axt { font-size: 10px; fill: var(--muted); }
.legend2 { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend2 i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; } .legend2 i.dash { background: repeating-linear-gradient(90deg, var(--warn) 0 4px, transparent 4px 7px); }
.linkrow { display: flex; gap: 8px; margin-top: 8px; } .linkrow input { flex: 1; font: 12.5px ui-monospace, Consolas, monospace; padding: 8px 10px; border-radius: 4px; color: inherit; background: var(--surface-2); border: 1px solid var(--border); }
@media (max-width: 900px) { .ceo-hero { grid-template-columns: 1fr; justify-items: stretch; } .ceo-ring { justify-self: center; } .rv-trend { justify-items: start; text-align: left; } }
@media print {
  .side, .topbar, .noprint, #toast, .jump, .tabs { display: none !important; }
  body { background: #fff !important; color: #111 !important; } .card { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; border-color: #ccc !important; }
  main, #app { margin: 0 !important; padding: 0 !important; max-width: none !important; } .shell { display: block !important; }
  .ringv { animation: none; } .review::after { display: none; } .muted { color: #555 !important; }
  tr, .card { break-inside: avoid; }
}

.prow { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 38px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.pbar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; } .pbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--ai)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.prow b { text-align: right; }
.ceo-hero > *, .ceo-kpis > * { min-width: 0; } .linkrow input { min-width: 0; }
@media (max-width: 700px) { .ceo-hero { padding: 16px; } .ceo-verd { min-width: 0; } .rv-trend { max-width: none; } }

.two > * { min-width: 0; }

/* ---- v8: command view, run menu, users */
.runmenu { position: relative; } .runbtn .caret { width: 14px; height: 14px; margin-left: 2px; }
.runpop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 310px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.35); padding: 6px; }
.runpop[hidden] { display: none; } .runpop hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }
.runpop button { display: grid; gap: 1px; width: 100%; text-align: left; background: none; border: 0; border-radius: 4px; padding: 8px 10px; color: var(--text); cursor: pointer; font: inherit; }
.runpop button:hover, .runpop button:focus-visible { background: var(--surface-2); outline: none; } .runpop small { color: var(--muted); font-size: 12px; }
.brief { padding: 14px 18px; margin: 10px 0; border-left: 4px solid var(--accent); } .brief .k { font-size: 11.5px; font-weight: 700; color: var(--muted); } .brief p { margin: 6px 0 0; line-height: 1.55; }
.apgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.apanel { padding: 14px 16px; border-top: 3px solid var(--c); } .apanel .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .apanel .hd b { flex: 1; }
.apanel .num { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #04101a; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.apanel .kv { display: grid; gap: 5px; } .apanel .kv > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .apanel .kv span { color: var(--muted); } .apanel .kv b { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.apanel .note { font-size: 12px; margin: 8px 0 0; }
.wallgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; } .wgroup h3 { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.wsc { padding: 12px 14px; margin-bottom: 8px; border-left: 4px solid var(--sv); } .wh { display: flex; gap: 12px; align-items: center; } .wn { font-size: 26px; line-height: 1; color: var(--sv); min-width: 26px; text-align: center; }
.wp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .pchip, .scchip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 3px; border: 1px solid var(--sv); color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--sv) 12%, transparent); }
.pchip i { font-style: normal; font-size: 10px; opacity: .7; margin-left: 3px; } .pchip:hover { background: color-mix(in srgb, var(--sv) 28%, transparent); }
.paircode { font: 800 40px ui-monospace, monospace; letter-spacing: .2em; text-align: center; padding: 16px; border: 1px dashed var(--border); border-radius: 4px; margin: 10px 0; }
.teamset { border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; } .teamset legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; } .teamset .chk { display: inline-flex; gap: 6px; margin: 4px 14px 4px 0; font-weight: 400; color: var(--text); }
details.card > summary { cursor: pointer; padding: 2px 0; } #teamsel { padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
@media print { .runmenu, .noprint { display: none !important; } }
.agtag { margin-right: 7px; vertical-align: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #04101a; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }

.changes { padding: 12px 16px; margin: 10px 0; } .changes .chead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.crow { display: grid; gap: 6px; } .crow > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .clab { font-size: 11.5px; font-weight: 700; min-width: 150px; }
.clab.bad { color: var(--bad); } .clab.warn { color: var(--warn); } .clab.ok { color: var(--ok); }
.prepgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; margin-top: 10px; } @media (max-width: 560px) { .prepgrid { grid-template-columns: 1fr; } }
.prep { padding: 16px 18px; break-inside: avoid; } .prep .phd { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .prep h3 { margin: 0; font-size: 17px; } .prep h3 a { color: inherit; text-decoration: none; }
.pscore { text-align: right; font-size: 26px; font-weight: 800; display: grid; justify-items: end; } .prep .story { margin: 10px 0; line-height: 1.55; }
.pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .pcols h4 { margin: 0 0 4px; font-size: 12px; } .pcols h4.ok { color: var(--ok); } .pcols h4.warn { color: var(--warn); } .pcols ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
@media (max-width: 560px) { .pcols { grid-template-columns: 1fr; } } .prep .openers { margin-top: 10px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
@media print { .prepgrid { grid-template-columns: 1fr 1fr; } }

.dhealth { padding: 12px 16px; margin: 10px 0; border-left: 3px solid var(--warn); } .dhealth ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.dhealth .chead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

.todo { padding: 14px 18px; margin: 10px 0; border-left: 3px solid var(--accent); } .todo ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 10px; } .todo li .who { font-weight: 600; margin-left: 6px; } .todo li .muted { font-size: 13px; margin-top: 3px; line-height: 1.5; }
.todo .chead, .changes .chead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

/* notice when the page is not showing the day that was asked for */
.asof { margin: 10px 0 0; padding: 9px 14px; border: 1px solid var(--warn); border-left-width: 3px; border-radius: 3px; background: var(--warn-soft); font-size: 13.5px; }

/* announcements (Users & screens) */
.annform { display: grid; grid-template-columns: 1fr 200px 110px 110px auto; gap: 10px; align-items: end; }
.annform label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); } .annform input, .annform select { width: 100%; font-weight: 400; color: var(--text); }
@media (max-width: 900px) { .annform { grid-template-columns: 1fr 1fr; } .annform label:first-child { grid-column: 1 / -1; } }
svg.ring { background: none; padding: 0; border-radius: 0; }

/* settings: agents at a glance */
.setags { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.setag { padding: 16px 18px; border-top: 2px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.setag .hd { display: flex; align-items: center; gap: 10px; } .setag .hd b { flex: 1; font-size: 15.5px; }
.setag .num { width: 26px; height: 26px; border-radius: 7px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.setag p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.setag .kv { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } .setag .kv div { display: flex; justify-content: space-between; font-size: 13px; } .setag .kv span { color: var(--muted); }
.setag .chg { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; } .setag .btns { margin-top: auto; }
.dayonly { margin: 4px 0 12px; padding: 10px 14px; border: 1px solid var(--border); border-left: 3px solid var(--brass); border-radius: 10px; background: var(--surface); font-size: 13.5px; line-height: 1.55; color: var(--muted); } .dayonly b { color: var(--text); }
.pwhy { font-size: 12.8px; color: var(--muted); margin-top: 5px; max-width: 520px; line-height: 1.45; }
.pparts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; max-width: 560px; }
.pparts span { display: grid; gap: 2px; min-width: 96px; flex: 1; } .pparts i { display: block; height: 3px; border-radius: 3px; } .pparts em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.pparts span { background: linear-gradient(var(--border), var(--border)) 0 0 / 100% 3px no-repeat; }
.howread { margin: 12px 0 0; } .howread summary { cursor: pointer; color: var(--text); font-size: 14px; }
.hr3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 12px; } .hr3 p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }


/* ======================================================================= v11: agent console */
body { font-family: var(--sans); background: var(--bg); }
body::before { content: ""; position: fixed; inset: -12%; z-index: -2; pointer-events: none;
  background: radial-gradient(44vmax 40vmax at 8% 0%, color-mix(in srgb, var(--g1) 20%, transparent), transparent 62%),
              radial-gradient(42vmax 40vmax at 100% 6%, color-mix(in srgb, var(--g2) 22%, transparent), transparent 62%),
              radial-gradient(36vmax 30vmax at 62% 108%, color-mix(in srgb, var(--g4) 9%, transparent), transparent 62%);
  animation: aurora 42s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px); background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 25%, transparent 85%); mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 25%, transparent 85%); }
@keyframes aurora { to { transform: translate(3%, 2%) scale(1.07); } }
:root[data-theme="light"] body::before { opacity: .55; }

/* shape */
.card, .stat, .node, .agent, .apanel, .brief, .story, .review, .setnav, .runpop, dialog, .banner, .asof, .ph, .dayonly, .tip { border-radius: var(--radius); }
.mcell, .rv-col, .rchk, .rsteps, .st-todo, .fp, pre, .paircode, .teamset, .ulist { border-radius: 12px; }
.btn, .seg, .searchbtn, .datebox, .status, .side nav a, .mini a, .iconbtn, .toast, .runbtn, .jump a, .setnav button, .pal-item,
input[type=text], input[type=number], input[type=time], input[type=search], input[type=date], input[type=password], input[type=email], select, textarea { border-radius: 10px; }
.pill, .pc-state, .scchip, .pchip, .chip, .kbd, .apill { border-radius: 999px; }
.pill { padding: 2px 10px; } .avatar, .me .av { border-radius: 50%; }
.node .num, .agent .num, .apanel .num, .agtag, .gflow-n .num, .gagent .num, .mini a .num, .setag .num, .st-n { border-radius: 9px; color: #04101a; }

/* type */
h1 { font: 750 30px/1.15 var(--display); letter-spacing: -.028em; }
h2 { font: 700 12.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
h2 .count { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sgroup h2 { font-size: 17px; letter-spacing: -.01em; text-transform: none; color: var(--text); } .sgroup h2::before { content: none; }
.eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
th, .side nav .nav-h, .ac-h span, .feedhead, .subh, .conn .k, .io .k, .rv-eyebrow, .rv-col h4, .rv-h, .ceo-verd .k, .wgroup h3, .brief .k, .pcols h4, .setnav .sn-h, .clab, .fp .lab, .g-t small, .gagent dt { text-transform: uppercase; letter-spacing: .09em; }
th { font-size: 11.5px; } .stat .n, .ringt, .wn, .pscore, .accbig b, .mcell b, .pc-line b { font-family: var(--display); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .n { font-size: 30px; color: transparent; background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 55%, var(--g2))); -webkit-background-clip: text; background-clip: text; }
.stat .n[style*="color"] { background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.stat .n .muted, .stat .n span { -webkit-text-fill-color: var(--muted); }

/* glass panels */
.card { background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); }
:root[data-theme="light"] .card { background: rgba(255,255,255,.84); }
.stat { padding: 16px 18px; } .stat::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; background: var(--grad); opacity: .9; }
a.card:hover, .pcard:hover, .card.agent:hover, button.stat:hover, a.node:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--g2) 55%, var(--border));
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--g2) 30%, transparent), 0 22px 50px -26px color-mix(in srgb, var(--g2) 70%, transparent); text-decoration: none; }
button.stat.on { border-color: var(--g1); box-shadow: 0 0 0 1px var(--g1), 0 16px 40px -22px var(--g1); }

/* buttons, inputs */
.btn { background: color-mix(in srgb, var(--surface-2) 70%, transparent); border-color: var(--border-2); font-weight: 600; }
.btn:hover { border-color: var(--g1); background: var(--surface-2); }
.btn.primary, .runbtn { position: relative; overflow: hidden; background: var(--grad); border: 0; color: #fff; font-weight: 700; box-shadow: 0 12px 30px -14px #4da3ff; }
.btn.primary::after, .runbtn::after { content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); animation: sheen 5.5s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { left: -70%; } 100% { left: 140%; } }
.btn.primary:hover, .runbtn:hover { background: var(--grad); filter: brightness(1.12); }
.btn.danger { background: transparent; border: 1px solid var(--bad); color: var(--bad); }
input:focus, select:focus, textarea:focus { border-color: var(--g1) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--g1) 22%, transparent); outline: none; }
.seg { border-color: var(--border-2); } .seg button.on { background: var(--grad); color: #fff; font-weight: 700; }
.pill.acc, .pill.ai { background: color-mix(in srgb, var(--g2) 16%, transparent); color: var(--g2); }

/* side panel */
.side { background: color-mix(in srgb, var(--navy) 78%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid var(--border); color: var(--navy-text); }
.side::after { content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 100%; pointer-events: none; background: linear-gradient(180deg, transparent, var(--g1) 30%, var(--g2) 70%, transparent); opacity: .5; }
.brand { border-bottom: 1px solid var(--border); } .brand b { font: 800 17px/1.1 var(--display); letter-spacing: -.02em; color: #fff; } .brand small { color: #8593ad; letter-spacing: .06em; }
.logo { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--grad); color: #fff; box-shadow: 0 8px 26px -8px #4da3ff, inset 0 1px 0 rgba(255,255,255,.35); }
.logo svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.1; stroke-linecap: round; animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.side nav .nav-h, .ac-h span { color: #6f7d98; font-size: 10.5px; font-weight: 800; }
.side nav a { color: var(--navy-text); font-weight: 550; } .side nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side nav a.on { color: #fff; font-weight: 700; background: linear-gradient(90deg, color-mix(in srgb, var(--g2) 34%, transparent), color-mix(in srgb, var(--g1) 8%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g2) 30%, transparent); }
.side nav a.on .ico { color: var(--g1); } .side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 14px var(--g1); }
.side .iconbtn { background: rgba(255,255,255,.04); border-color: var(--border-2); color: var(--navy-text); }
.agents-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; }
.mini a { color: var(--navy-text); } .mini a:hover { background: rgba(255,255,255,.05); color: #fff; }
.mini a .num { color: var(--ac); background: color-mix(in srgb, var(--ac) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); }
.me { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; } .me .who b { color: #fff; } .me .who small { color: #8593ad; }
.me .av { background: var(--grad); color: #fff; border: 0; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: ping 2.4s ease-out infinite; }
.dot.run { background: var(--g1); animation: ping 1.1s ease-out infinite; --ok: var(--g1); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 65%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* top bar + live ticker */
.topbar { background: color-mix(in srgb, var(--bg) 58%, transparent); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid var(--border); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--g1), var(--g2), transparent); opacity: .55; }
.status.on i { background: var(--ok); animation: ping 2.4s ease-out infinite; } .status.run i { --ok: var(--g1); background: var(--g1); animation: ping 1.1s ease-out infinite; }
.ticker { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 0 1 380px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12.5px; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent); overflow: hidden; white-space: nowrap; }
.ticker .tg { font: 800 10px/1 var(--sans); letter-spacing: .14em; color: var(--tc, var(--g1)); border: 1px solid color-mix(in srgb, var(--tc, var(--g1)) 45%, transparent); background: color-mix(in srgb, var(--tc, var(--g1)) 12%, transparent); padding: 4px 7px; border-radius: 6px; flex: none; }
.ticker .tx { overflow: hidden; text-overflow: ellipsis; animation: tick .5s ease-out; } .ticker .tx b { color: var(--text); font-weight: 600; }
@keyframes tick { from { opacity: 0; transform: translateY(7px); } }
@media (max-width: 1400px) { .ticker { display: none; } }

/* agent pipeline */
.pipe { margin: 10px 0 8px; }
.node { padding: 16px 16px 14px; border: 1px solid var(--border); border-top: 0; overflow: visible; background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.node > .top::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; border-radius: 2px; background: var(--c); opacity: .35; }
.node.live > .top::before { opacity: 1; box-shadow: 0 0 16px var(--c); }
.node .num { width: 30px; height: 30px; font-size: 14px; background: var(--c); box-shadow: 0 6px 18px -6px var(--c); }
.node.live { box-shadow: var(--shadow), 0 20px 46px -30px var(--c); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.node.live .num { animation: orb 2.6s ease-out infinite; }
@keyframes orb { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 75%, 100% { box-shadow: 0 0 0 10px transparent; } }
.node:not(:last-child)::before { height: 2px; background: var(--border-2); }
.node.live:not(:last-child)::before { background: linear-gradient(90deg, transparent 0 15%, var(--c) 45%, #fff 50%, var(--c) 55%, transparent 85%) 0 0 / 240% 100%, color-mix(in srgb, var(--c) 35%, var(--border-2)); animation: pflow 1.8s linear infinite; }
@keyframes pflow { from { background-position: 120% 0, 0 0; } to { background-position: -120% 0, 0 0; } }
.node:not(:last-child)::after { border-left-color: var(--c); }
.agent::before { background: var(--c); box-shadow: 0 0 18px var(--c); } .apanel { border-top: 0; position: relative; overflow: hidden; } .apanel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c); box-shadow: 0 0 16px var(--c); }

/* briefing: the agents' own summary */
.brief { padding: 16px 20px 14px; border: 1px solid transparent; border-left-width: 1px; position: relative; overflow: hidden;
  background: linear-gradient(color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)) padding-box, linear-gradient(120deg, var(--g1), var(--g2), var(--g1)) border-box;
  box-shadow: 0 18px 50px -30px color-mix(in srgb, var(--g2) 80%, transparent); }
.brief::after { content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 2px; background: linear-gradient(90deg, transparent, var(--g1), var(--g2), transparent); animation: scan 4.5s ease-in-out infinite; }
.brief-h { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feed .tag { color: var(--c, var(--g1)); }

/* score ring, bars */
.ring { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--g1) 35%, transparent)); } .ringt { font-size: 36px; fill: var(--text); } .rings { letter-spacing: .14em; text-transform: uppercase; }
.pc-bar .b-ip, .pbar i, .dayline i, .costbar .cb i { background: linear-gradient(90deg, var(--g1), var(--g2)); }
.g-fg { stroke: var(--g1); filter: drop-shadow(0 0 5px var(--g1)); }
.avatar, .ring .avatar { background: linear-gradient(135deg, color-mix(in srgb, var(--g1) 22%, transparent), color-mix(in srgb, var(--g2) 22%, transparent)); color: var(--text); border: 1px solid var(--border-2); }
.pcard::before { height: 2px; box-shadow: 0 0 14px var(--hc); } .pc-state i { box-shadow: 0 0 8px currentColor; }

/* misc */
dialog { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border-2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px color-mix(in srgb, var(--g2) 18%, transparent); }
dialog::backdrop { background: rgba(3,6,14,.62); backdrop-filter: blur(4px); }
.runpop { background: color-mix(in srgb, var(--surface) 96%, transparent); border-color: var(--border-2); box-shadow: 0 30px 70px -30px rgba(0,0,0,.85); }
.toast { background: color-mix(in srgb, var(--surface-2) 94%, transparent); color: var(--text); border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #1c1300; }
tbody tr:hover, tbody tr:hover td { background: color-mix(in srgb, var(--g1) 5%, transparent); }
.setnav { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(16px); } .setnav button.on { background: linear-gradient(90deg, color-mix(in srgb, var(--g2) 26%, transparent), transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--g1); font-weight: 700; }
.setag { border-top: 0; position: relative; overflow: hidden; } .setag::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.dayonly { border-left: 0; background: color-mix(in srgb, var(--surface) 72%, transparent); box-shadow: inset 3px 0 0 var(--g1); }
.asof { border-radius: 12px; } .banner { border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); } .banner.info { border-color: color-mix(in srgb, var(--g2) 40%, var(--border)); background: color-mix(in srgb, var(--g2) 9%, var(--surface)); color: var(--text); }
.ascore { border-radius: 50%; } .field.dirty { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
#app.loading::before { background: linear-gradient(90deg, transparent, var(--g1), var(--g2), transparent) 0 0 / 40% 100% no-repeat; }
::selection { background: color-mix(in srgb, var(--g2) 45%, transparent); }
@media (max-width: 900px) { .side::after { display: none; } .me, .agents-card { border: 0; background: none; } }
@media (prefers-reduced-motion: reduce) { body::before, .logo svg, .btn.primary::after, .runbtn::after, .dot.on, .dot.run, .status i, .node.live .num, .node.live::before, .brief::after, .ticker .tx { animation: none !important; } }
@media print { body::before, body::after { display: none; } .card { backdrop-filter: none !important; } }
@media (max-width: 1700px) { .searchbtn { min-width: 0; } .searchbtn > span:not(.kbd) { display: none; } }
.ticker { flex: 1 1 260px; max-width: 460px; } @media (max-width: 1400px) { .ticker { display: flex; } } @media (max-width: 1180px) { .ticker { display: none; } }
.crumb { flex: none; }
:root[data-theme="light"] .side { background: var(--navy); }
.pparts { max-width: none; gap: 6px 14px; } .pparts span { min-width: 168px; flex: 0 1 168px; } .pparts em { overflow: hidden; text-overflow: ellipsis; }
tr.clickrow > td:first-child { min-width: 380px; } .pwhy { max-width: 560px; }
.scchip, .kbd, .pchip { white-space: nowrap; } .ticker { flex: 1 1 320px; }

/* delivery: how the numbers fit */
.recon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .recon > div { border: 1px solid var(--line, var(--border)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.recon b { font: 700 16px/1.2 var(--display, inherit); } .recon span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.seg { display: inline-flex; gap: 6px; } @media (max-width: 900px) { .recon { grid-template-columns: 1fr; } }

.vfb .fbb { width: auto; padding: 0 12px; height: 30px; font-weight: 600; } .vfb .fbb[data-v="right"]:hover { color: var(--ok); border-color: var(--ok); } .vfb .fbb[data-v="wrong"]:hover { color: var(--bad); border-color: var(--bad); }

/* v14: why this score, day view, ticket age */
.vmode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.vmode a { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text); background: transparent; }
.vmode a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.why { border-left: 4px solid var(--c, var(--accent)); }
.wl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.wl li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.wl .wd { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--warn); }
.wl li.bad .wd { background: var(--bad); }
.wtags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wbar { display: inline-block; width: 70px; height: 7px; border-radius: 6px; background: var(--border); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.wbar i { display: block; height: 100%; }
.t-age { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; margin-top: 6px; color: var(--muted); }
.t-age i { font-style: normal; }
.t-age b { color: var(--text); font-weight: 600; }
.t-quiet { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-style: italic; }
details.quiet { margin-top: 10px; } details.quiet > summary { cursor: pointer; font-size: 13.5px; color: var(--muted); padding: 8px 2px; }
.trules { margin-top: 12px; } table.rules { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13.5px; }
table.rules th { text-align: left; vertical-align: top; width: 150px; padding: 7px 10px 7px 0; white-space: nowrap; } table.rules td { padding: 7px 0; line-height: 1.55; color: var(--muted); border-bottom: 1px solid var(--border); } table.rules tr:last-child td { border-bottom: 0; }
.preasons { list-style: none; margin: 6px 0 4px; padding: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); } .preasons li { padding-left: 14px; position: relative; margin-bottom: 3px; } .preasons li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); } .preasons li.bad::before { background: var(--bad); }
.dlink { font-size: 12px; color: var(--accent); }
.pill.idle { color: var(--warn); border-color: var(--warn); } .cmdlists table.rules th, .cmdlists table.rules td { padding: 6px 8px 6px 0; }

/* v16 polish */
.stats .stat .n { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.card.ticket { border-left: 3px solid var(--border); transition: border-color .15s; } .card.ticket:hover { border-left-color: var(--accent); }
nav.jump { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); padding: 8px 0; }
h2 { margin-top: 26px; } .why .wl li { padding: 2px 0; }
.card.panel.scope { border-style: dashed; background: transparent; }
.cmdlists .two { gap: 26px; } .cmdlists h3.subh { margin-top: 0; }
@media (max-width: 760px) { .vmode { gap: 6px; } table.rules th { width: auto; white-space: normal; display: block; padding-bottom: 0; } table.rules td { display: block; } }
.usual { margin: 8px 0 0; font-size: 13.5px; } .usual.lower b, .usualc.lower { color: var(--warn); } .usual.higher b, .usualc.higher { color: var(--ok); } .usualc { font-size: 12px; margin-top: 2px; color: var(--muted); }
.chk-r { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); } .chk-r:last-child { border-bottom: 0; } .chk-d { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ok); }
.chk-r.warn .chk-d { background: var(--warn); } .chk-r.bad .chk-d { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 22%, transparent); } .chk-b .muted { font-size: 13.5px; margin-top: 2px; } .chk-fix { font-size: 13px; margin-top: 4px; }
.dchk { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin: 10px 0; text-decoration: none; color: inherit; border-left: 4px solid var(--warn); } .dchk-go { margin-left: auto; color: var(--accent); font-size: 13px; }

/* v16 motion: one entrance per page change, quick and quiet; everything else answers a click */
#app.enter > * { animation: pagein .45s cubic-bezier(.2,.8,.2,1) both; } #app.enter > *:nth-child(2) { animation-delay: .04s; } #app.enter > *:nth-child(3) { animation-delay: .08s; } #app.enter > *:nth-child(4) { animation-delay: .12s; } #app.enter > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes pagein { from { opacity: 0; transform: translateY(10px); } }
.card.stat, .card.ticket, .pcard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; } .card.stat:hover, .pcard:hover { transform: translateY(-2px); }
.side nav a { transition: background .15s, color .15s, padding-left .15s; } .side nav a:hover { padding-left: 16px; }
.btn, .pill { transition: transform .12s, filter .15s; } .btn:active { transform: scale(.97); }
.ascore, .ceo-ring svg circle:last-of-type { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { #app.enter > * { animation: none; } .card.stat:hover, .pcard:hover { transform: none; } }

.gl{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
.gl li{display:flex;gap:10px;align-items:flex-start;font-size:13.5px}
.gl .gd{flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;color:#fff;background:var(--ok)}
.gl li.warn .gd{background:var(--warn)}.gl li.bad .gd{background:var(--bad)}
.gate summary{cursor:pointer;font-weight:600}

/* ---- v25: agent mark, agent signature, checks that run, thinking state ---- */
.logo[data-mark], .lmark[data-mark] { color: #fff; }
.logo[data-mark] svg { width: 30px; height: 30px; animation: none; overflow: visible; stroke: none; fill: initial; }
.agentsig { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 9px 3px 7px; border-radius: 999px; vertical-align: middle;
  font: 600 11.5px/1.2 var(--sans); letter-spacing: .02em; color: var(--a4); background: color-mix(in srgb, var(--a4) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--a4) 35%, transparent); }
.agentsig i { width: 7px; height: 7px; border-radius: 50%; background: var(--a4); box-shadow: 0 0 0 0 var(--a4); animation: sigp 2.4s ease-out infinite; }
@keyframes sigp { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--a4) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.gate[open] .gl li { animation: chkin .32s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.gate[open] .gl .gd { animation: chkpop .38s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes chkin { from { opacity: 0; transform: translateX(-6px); } }
@keyframes chkpop { from { transform: scale(0); } }
#thinking { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px;
  border-radius: 999px; font: 500 13px/1.2 var(--sans); color: var(--text); background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border-2); box-shadow: var(--shadow); backdrop-filter: blur(10px); opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s, transform .2s; }
#thinking.on { opacity: 1; transform: none; }
.tdots { display: inline-flex; gap: 4px; } .tdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--g1); animation: tdot 1.1s ease-in-out infinite; }
.tdots i:nth-child(2) { background: var(--g2); animation-delay: .15s; } .tdots i:nth-child(3) { background: var(--g4); animation-delay: .3s; }
@keyframes tdot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .agentsig i, .gate[open] .gl li, .gate[open] .gl .gd, .tdots i { animation: none !important; } }

/* v26: the mark breathes (a soft glow that rises and falls, like a system that is awake) */
.logo[data-mark] { animation: markglow 4.8s ease-in-out infinite; }
@keyframes markglow { 0%, 100% { box-shadow: 0 8px 26px -10px #4da3ff, inset 0 1px 0 rgba(255,255,255,.35); }
  50% { box-shadow: 0 8px 30px -6px #1fc8b4, 0 0 0 3px rgba(31,200,180,.10), inset 0 1px 0 rgba(255,255,255,.35); } }
@media (prefers-reduced-motion: reduce) { .logo[data-mark] { animation: none; } }

/* ---- v27: agent briefing, click-to-explain, agent timeline, change markers ---- */
.abrief { padding: 16px 20px; margin: 0 0 16px; border-left: 3px solid var(--a4); background: linear-gradient(100deg, color-mix(in srgb, var(--a4) 7%, var(--surface)), var(--surface) 60%); }
.abrief .abh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; } .abrief .agentsig { margin-left: 0; }
.abrief p { margin: 4px 0; font-size: 15.5px; line-height: 1.5; max-width: 80ch; min-height: 1.5em; }
.abrief p.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--a4); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.stat.xp { cursor: pointer; position: relative; transition: border-color .15s, transform .15s; }
.stat.xp:hover, .stat.xp:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); }
.stat.xp::after { content: "explain"; position: absolute; top: 9px; right: 11px; font: 600 10.5px/1 var(--sans); color: var(--accent); opacity: 0; transition: opacity .15s; }
.stat.xp:hover::after, .stat.xp:focus-visible::after { opacity: .9; }
.xrule { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted); } .xrule .agentsig { margin: 0 6px 0 0; }
.atl { list-style: none; margin: 0; padding: 0; position: relative; }
.atl::before { content: ""; position: absolute; left: 66px; top: 6px; bottom: 6px; width: 1px; background: var(--border-2); }
.atl li { display: grid; grid-template-columns: 52px 28px 1fr; gap: 0 12px; align-items: start; padding: 8px 0; font-size: 13.5px; }
.atl time { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; text-align: right; }
.atl .an { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 11px/1 var(--sans); color: #061019; background: var(--c); position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--surface); }
.atl li.bad .an { background: var(--bad); }
.atl li:first-child .an { animation: pnum 2.2s ease-out infinite; }
[data-cm].chg { animation: chg 2.4s ease-out; border-radius: 6px; }
@keyframes chg { 0% { background: color-mix(in srgb, var(--accent) 34%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 34%, transparent); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .abrief p.typing::after, .atl li:first-child .an, [data-cm].chg { animation: none; } [data-cm].chg { outline: 2px solid var(--accent); } }

.upd { margin-left: 12px; font: inherit; font-size: 12px; color: var(--muted, #8a93a6); background: none; border: 0; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.upd:hover { color: var(--text, #e8ecf4); background: rgba(127,127,127,.15); }
.upd[hidden] { display: none; }

.cl-note { display: block; margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(246,185,76,.4); background: rgba(246,185,76,.08); color: var(--warn, #f6b94c); text-decoration: none; font-size: 13.5px; }
.cl-note:hover { background: rgba(246,185,76,.14); }
.clp { margin-top: 10px; border: 1px solid var(--border, rgba(148,163,184,.2)); border-radius: 10px; padding: 0 12px 8px; }
.clp > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.clp > summary::-webkit-details-marker { display: none; }
.pill.info { background: rgba(31,200,180,.14); color: #1fc8b4; }
.clp td.num, .clp th.num { white-space: nowrap; } .clp td:nth-child(4) { white-space: nowrap; }

.dtile { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.dtile:hover, .dtile:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 22px -10px var(--accent); outline: none; }
.dtile .dsub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.dby { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin: 0 0 10px; } .dby b { color: var(--text); }
#dlg { max-width: min(1100px, 94vw); }
.vtabs { display: inline-flex; gap: 4px; margin: 0 0 14px; } .vtabs a { text-decoration: none; }
.pflow { display: flex; align-items: stretch; gap: 0; margin: 16px 0 6px; flex-wrap: wrap; }
.pfn { flex: 1 1 150px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border, rgba(148,163,184,.25)); background: var(--card, rgba(255,255,255,.03)); }
.pfn i { font-style: normal; font-weight: 800; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; background: rgba(148,163,184,.18); flex: none; }
.pfn b { display: block; font-size: 13px; } .pfn small { color: var(--muted); font-size: 11.5px; }
.pfn.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); } .pfn.ok i { background: var(--ok); color: #06231a; }
.pfn.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); } .pfn.warn i { background: var(--warn); color: #2b1c03; }
.pfn.bad { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad) inset; } .pfn.bad i { background: var(--bad); color: #2a0b0b; }
.pfl { align-self: center; width: 22px; height: 2px; background: var(--border, rgba(148,163,184,.3)); flex: none; }
.pfl.on { background: linear-gradient(90deg, var(--ok), var(--accent)); background-size: 200% 100%; animation: pflow 2s linear infinite; }
@keyframes pflow { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pfl.on { animation: none; } }


/* ======================================================================= theme: Control room
   Steel panels, hairline rules, Bahnschrift numerals, one signal colour. Loaded last on purpose: it settles every older layer. */
body { background: var(--bg); font-family: var(--sans); }
body::before { background: radial-gradient(70vmax 50vmax at 100% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%); animation: none; inset: 0; }
body::after { background-size: 32px 32px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
:root[data-theme="light"] body::before { opacity: 1; }

/* shape: instruments are crisp */
.card, .stat, .node, .agent, .apanel, .brief, .story, .review, .setnav, .runpop, dialog, .banner, .asof, .ph, .dayonly, .tip { border-radius: var(--radius); }
.btn, .seg, .searchbtn, .datebox, .status, .side nav a, .mini a, .iconbtn, .toast, .runbtn, .jump a, .setnav button, .pal-item,
input[type=text], input[type=number], input[type=time], input[type=search], input[type=date], input[type=password], input[type=email], select, textarea { border-radius: 6px; }
.mcell, .rv-col, .rchk, .rsteps, .st-todo, .fp, pre, .paircode, .teamset, .ulist { border-radius: 8px; }
.pill, .pc-state, .scchip, .pchip, .chip, .kbd, .apill { border-radius: 4px; }
.card { box-shadow: var(--shadow); border-color: var(--border); }
a.card:hover, .pcard:hover, .card.agent:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 12px 30px -22px color-mix(in srgb, var(--accent) 60%, transparent); }

/* type: engineering face for headings and every number, sentence case labels */
h1 { font: 600 32px/1.1 var(--display); letter-spacing: -.01em; }
h2 { font: 600 15px/1.3 var(--display); letter-spacing: 0; text-transform: none; color: var(--text); }
h2::before { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.eyebrow { font: 600 13px/1.2 var(--display); letter-spacing: .01em; text-transform: none; color: var(--accent); background: none; -webkit-background-clip: initial; background-clip: initial;
  display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 14px; height: 2px; background: currentColor; }
th, .side nav .nav-h, .ac-h span, .feedhead, .subh, .conn .k, .io .k, .rv-eyebrow, .rv-col h4, .rv-h, .ceo-verd .k, .wgroup h3, .brief .k, .pcols h4, .setnav .sn-h, .clab, .fp .lab, .g-t small, .gagent dt {
  text-transform: none; letter-spacing: .01em; }
th { font: 600 12.5px var(--display); color: var(--muted); }
.stat .n, .ringt, .wn, .pscore, .accbig b, .mcell b, .pc-line b, .big, .n { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .n { color: var(--text); background: none; -webkit-background-clip: initial; background-clip: initial; font-size: 34px; }
.mono, .t-key { font-family: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace; }

/* stat tiles: a steel rule on top that lights up when you point at it */
.stat::before { background: var(--border-2); height: 2px; opacity: 1; transition: background .2s; }
.stat:hover::before, .dtile:focus-visible::before { background: var(--accent); }

/* buttons: solid signal, no gradients */
.btn { border-color: var(--border-2); }
.btn:hover { border-color: var(--accent); }
.btn.primary, .runbtn { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); box-shadow: 0 6px 18px -10px var(--accent); font-weight: 650; }
:root[data-theme="light"] .btn.primary, :root[data-theme="light"] .runbtn { color: #fff; }
.btn.primary:hover, .runbtn:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); filter: none; }
.seg button.on, .seg .btn.primary { background: var(--accent); color: var(--accent-ink); }
:root[data-theme="light"] .seg button.on, :root[data-theme="light"] .seg .btn.primary { color: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.ai { background: color-mix(in srgb, var(--ai) 16%, transparent); color: var(--ai); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }

/* sidebar: a dark steel rail in both themes; the active page carries an orange bar */
.side { background: var(--side-bg); color: var(--side-text); border-right: 1px solid rgba(138,154,171,.14); backdrop-filter: none; }
.side .brand b { color: #fff; font: 600 19px var(--display); letter-spacing: 0; } .side .brand small { color: var(--side-muted); }
.side nav a { color: var(--side-text); font-weight: 550; position: relative; }
.side nav a .ico { color: var(--side-muted); }
.side nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side nav a.on { background: rgba(255,107,26,.12); color: #fff; box-shadow: none; }
.side nav a.on .ico { color: var(--accent); }
.side nav a.on::before { content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.side nav .nav-h, .side .label { color: var(--side-muted); font: 600 12px var(--display); letter-spacing: .02em; }
.side .mini a { color: var(--side-text); } .side .mini a:hover { background: rgba(255,255,255,.05); }
.logo { background: #0b1117; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(255,107,26,.25), 0 6px 18px -8px rgba(255,107,26,.55); animation: none; }

/* the signal rail: one live trace under the top bar */
.topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom: 1px solid var(--border); }
.topbar::after { height: 2px; bottom: -1px; background:
    linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 22% 100% no-repeat,
    linear-gradient(90deg, var(--border), var(--border)); animation: rail 7s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes rail { 0% { background-position: -25% 0, 0 0; } 100% { background-position: 125% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .topbar::after { animation: none; background: var(--border); } }

/* status pills: flat, legible chips */
.pill { font-weight: 600; letter-spacing: .01em; }
.side nav a.on::after { content: none; }
.me .av { background: var(--accent); color: var(--accent-ink); }

/* ----------------------------------------------------------------------- settings */
.setsearch { min-width: 300px; padding: 10px 14px 10px 36px !important; background: var(--surface) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9aab' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important; background-position: 11px 50% !important; background-size: 16px !important; background-repeat: no-repeat !important; }
.setwrap { grid-template-columns: 250px minmax(0, 1fr); gap: 28px; }
.setnav { background: var(--surface); border: 1px solid var(--border); padding: 8px; gap: 1px; backdrop-filter: none; box-shadow: var(--shadow); }
.setnav .sn-h { font: 600 12px var(--display); color: var(--muted); padding: 14px 10px 6px; display: flex; align-items: center; gap: 8px; }
.setnav .sn-h i { width: 10px; height: 10px; border-radius: 2px; }
.setnav button { position: relative; padding: 8px 10px 8px 14px; font-size: 13.5px; border-radius: 5px; }
.setnav button:hover { background: var(--surface-2); }
.setnav button.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.setnav button.on::before { content: ""; position: absolute; left: 2px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent); }
.setnav button small { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 4px; }
.sgroup > h2 { font: 600 22px/1.2 var(--display); margin: 2px 0 4px; } .sgroup > h2::before { content: none; }
.sgroup .gdesc { max-width: 78ch; line-height: 1.55; }
.gmeta { display: flex; gap: 8px; margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.gmeta b { color: var(--text); font: 600 13px var(--display); } .gmeta .chgd b { color: var(--accent); }
.sgroup > .card { padding: 0; overflow: hidden; }
.field { position: relative; padding: 16px 20px; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); border-bottom: 1px solid var(--border); transition: background .15s; }
.field:last-child { border-bottom: 0; }
.field:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.field .fl { font: 600 15px/1.3 var(--display); }
.field .fh { line-height: 1.5; max-width: 72ch; }
.field.changed::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.field .meta { font-size: 11.5px; } .field.changed .meta { color: var(--accent); }
.field input[type=text], .field input[type=number], .field input[type=time], .field select { background: var(--surface-2); border: 1px solid var(--border-2); padding: 8px 10px; font-variant-numeric: tabular-nums; }
.daypick label { border-radius: 4px; }
.switch { width: 44px; height: 24px; }
.switch span { background: var(--border-2); border-radius: 5px; }
.switch span::before { width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 3px; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.savebar { background: #0b1117; color: #e6edf3; border: 1px solid rgba(255,107,26,.5); border-radius: 8px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); padding: 12px 14px 12px 18px; }
.savebar #savecount { font: 600 15px var(--display); }
.savebar .btn:not(.primary) { background: transparent; color: #e6edf3; border-color: rgba(255,255,255,.2); }
.setag { border-top: 0; border-left: 3px solid var(--c); }
.setag::before { content: none; }
.setag .num { background: var(--c); color: #0b1117; border-radius: 4px; font-family: var(--display); }
.setag .hd b { font: 600 17px var(--display); }
.conn { gap: 0; } .conn > div { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.conn .k { font: 600 12.5px var(--display); color: var(--muted); }
@media (max-width: 900px) { .setwrap { grid-template-columns: 1fr; } .setsearch { min-width: 0; width: 100%; } }
.field:not(.changed) .meta { display: none; }
.field { align-items: center; padding: 14px 20px; }
.brief-h, .abrief .abh b { font: 600 15px var(--display); letter-spacing: .01em; text-transform: none; color: var(--accent); }
.ticker .tg { font: 600 11.5px/1 var(--display); letter-spacing: .02em; text-transform: none; border-radius: 4px; }
.agentsig { border-radius: 4px; }
.ring { filter: none; }
.brief { border-color: var(--border-2); }
.ac-h span, .feedhead { font: 600 13.5px var(--display); }
.brief-h .muted { font: 400 12.5px var(--sans); color: var(--muted); }
.brief-h .spark { color: var(--accent); }

/* ----------------------------------------------------------------------- motion and finish (Control room, pass 2) */
/* instrument bezels: corner brackets on the key panels; they reach further when you point at one */
.stat, .node, .brief, .setag, .pcard, .apanel {
  --tk: color-mix(in srgb, var(--accent) 75%, transparent);
  background-image: linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk));
  background-size: 10px 1.5px, 1.5px 10px, 10px 1.5px, 1.5px 10px; background-position: 0 0, 0 0, 100% 100%, 100% 100%; background-repeat: no-repeat;
  transition: background-size .35s cubic-bezier(.2,.8,.2,1), transform .2s, border-color .2s, box-shadow .2s; }
.stat:hover, .node:hover, .brief:hover, .setag:hover, .pcard:hover, .apanel:hover { background-size: 26px 1.5px, 1.5px 26px, 26px 1.5px, 1.5px 26px; }
.stat:hover, .node:hover, .pcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* the sidebar marker slides to the page you open */
.side nav { position: relative; }
.side nav a.on::before { content: none !important; }
.navind { position: absolute; left: -14px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent);
  transition: top .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), opacity .2s; pointer-events: none; }
.side nav a .ico { transition: transform .2s, color .2s; } .side nav a:hover .ico { transform: translateX(2px); color: #fff; }

/* the signal rail runs faster while the agents are fetching a page */
body:has(#app.loading) .topbar::after { animation-duration: 1.3s; }
#app.loading { opacity: .72; }
#app.loading::before { display: none; }

/* page arrival: section markers draw in, then content rises (once per page, not on refresh) */
#app.enter h2::before { animation: mark .5s cubic-bezier(.2,.8,.2,1) both .1s; }
@keyframes mark { from { transform: scaleX(0); opacity: 0; } }
#app.enter .stat .n { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* live status: a ping on every "online" chip */
.pill.ok { position: relative; padding-left: 20px; }
.pill.ok::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; animation: lping 2.4s ease-out infinite; }
@keyframes lping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.pill.bad, .pill.warn { padding-left: 10px; }

/* pipeline: packets travel between the agent cards */
.node:not(:last-child)::before { content: ""; position: absolute; right: -26px; top: 50%; width: 26px; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, var(--c), transparent) 0 0 / 10px 100% no-repeat, color-mix(in srgb, var(--c) 25%, transparent);
  animation: packet 1.8s linear infinite; z-index: 1; }
@keyframes packet { from { background-position: -10px 0, 0 0; } to { background-position: 30px 0, 0 0; } }

/* tables: the row you point at is marked */
tbody tr { transition: background .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* buttons: a light sheen passes when you point at the main action */
.btn.primary, .runbtn { overflow: hidden; }
.btn.primary::after, .runbtn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: left .6s; }
.btn.primary:hover::after, .runbtn:hover::after { left: 130%; }
.btn:active { transform: scale(.98); }

/* first load: a skeleton instead of "Loading" */
.skel { display: grid; gap: 16px; padding-top: 34px; }
.skel i { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 40%, var(--surface) 80%) 0 0 / 300% 100%; border: 1px solid var(--border); animation: shim 1.4s linear infinite; }
.skel .h { height: 34px; width: 260px; } .skel .r { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; } .skel .r i { height: 96px; } .skel .b { height: 260px; }
@keyframes shim { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* dialogs open from the point of action */
dialog[open] { animation: dlgin .28s cubic-bezier(.2,.8,.2,1); } @keyframes dlgin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
dialog::backdrop { background: rgba(8,13,18,.55); backdrop-filter: blur(3px); }

@media (prefers-reduced-motion: reduce) {
  .navind, .stat, .node, .brief, .setag, .pcard, .apanel { transition: none !important; }
  .pill.ok::before, .node:not(:last-child)::before, .skel i, #app.enter h2::before, #app.enter .stat .n, dialog[open] { animation: none !important; }
}
.brief::after { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.navind { left: -12px; width: 3px; }
.stat, .node, .brief, .setag, .pcard, .apanel { --tk: var(--accent); background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px; }
.stat:hover, .node:hover, .brief:hover, .setag:hover, .pcard:hover, .apanel:hover { background-size: 34px 2px, 2px 34px, 34px 2px, 2px 34px; }
.card.stat:hover, a.card:hover, a.node:hover, button.stat:hover, .pcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* v41: shift-aware card line and state */
.pc-screen.shiftline{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;padding:7px 10px;margin:2px 0;border-radius:var(--radius);background:color-mix(in srgb,var(--accent) 6%,transparent);border:1px dashed color-mix(in srgb,var(--accent) 28%,transparent)}
.pc-screen.shiftline b{color:var(--text)}
.sdot{width:8px;height:8px;border-radius:50%;flex:none;background:var(--muted)}
.sdot.before{background:var(--a2);box-shadow:0 0 0 3px color-mix(in srgb,var(--a2) 22%,transparent)}
.sdot.on{background:var(--a4);animation:pulse 1.8s ease-in-out infinite}
.sdot.brk{background:var(--a3)}
.sdot.after{background:var(--muted)}
.pc-state.s-later{color:var(--a2);background:color-mix(in srgb,var(--a2) 14%,transparent)}
.pc-state.s-later i{background:var(--a2)}
.pcard:has(.pc-state.s-later){opacity:.92}
.pcard:has(.pc-state.s-later) .pc-body{filter:saturate(.7)}
