* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); font-feature-settings: 'tnum' 1, 'ss01' 1; -webkit-font-smoothing: antialiased; min-height: 100vh; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
body[data-chat="1"] { grid-template-columns: var(--rail) minmax(0, 1fr) var(--chat); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
a { color: var(--navy-3); }
.sr { position: absolute; left: -9999px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.tbl td.mono { white-space: nowrap; }
.tbl td.mono.wrap { white-space: normal; max-width: 460px; }
.num { font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums; }
.one { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m { color: var(--muted); font-weight: 500; }
.f { color: var(--faint); }
.ex { display: inline-block; font: 600 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--tint); border: 1px dashed var(--line-2); padding: 3px 5px; border-radius: 3px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }
.tag { display: inline-block; font: 500 11px/1 var(--mono); color: var(--muted); background: var(--tint); padding: 3px 6px; border-radius: 3px; vertical-align: middle; white-space: nowrap; }
.note { color: var(--muted); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--r); box-shadow: var(--shadow); font-weight: 600; z-index: 90; }

/* the rail */
.rail { background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.mark { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: radial-gradient(circle at 35% 35%, var(--navy-4), var(--navy) 70%); box-shadow: 0 0 0 2px var(--mint); }
.mark svg { width: 20px; height: 20px; }
.brand b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.brand span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .62); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; color: rgba(255, 255, 255, .78); padding: 9px 10px; border-radius: var(--r-s); font-weight: 600; font-size: 14px; text-align: left; }
.nav button svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav button[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.nav .n { margin-left: auto; font: 700 11.5px/1 var(--font); background: var(--mint); color: var(--navy); padding: 4px 7px; border-radius: 10px; min-width: 22px; text-align: center; }
.nav .n.q { background: rgba(255, 255, 255, .16); color: #fff; }
.rail .foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.modebox { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r); padding: 10px 12px; }
.modebox .l { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 700; }
.modebox .v { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 3px; }
.modebox .v i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(92, 214, 169, .25); }
.modebox .s { font-size: 12px; color: rgba(255, 255, 255, .62); margin-top: 2px; }
.ask { display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--mint); color: var(--navy); border: 0; border-radius: var(--r); padding: 11px 12px; font-weight: 800; font-size: 14px; }
.ask:hover { background: var(--mint-2); }
.ask svg { width: 18px; height: 18px; }

/* the top bar and content */
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; flex-wrap: nowrap; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 24px; height: 58px; }
.top .grow { flex: 1; }
.seg { display: inline-flex; background: var(--tint); border-radius: var(--r-s); padding: 3px; gap: 2px; }
.seg button { white-space: nowrap; border: 0; background: none; border-radius: 4px; padding: 5px 11px; font-weight: 600; color: var(--muted); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 5px 11px; font-weight: 600; font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--navy-3); color: var(--navy-3); background: var(--run-bg); }
.top select { border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); padding: 6px 8px; font-weight: 600; font-size: 13px; max-width: 220px; }
.checked { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.checked i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.checked i.stale { background: var(--warn-line); }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-h p { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; font-weight: 700; color: var(--muted); font-size: 13.5px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--navy); }
.tabs button .n { margin-left: 6px; color: var(--faint); font-weight: 600; }

/* status */
.st { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--font); padding: 5px 9px 5px 7px; border-radius: 20px; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st.ok { color: var(--ok); background: var(--ok-bg); } .st.watch { color: var(--warn); background: var(--warn-bg); } .st.act { color: var(--act); background: var(--act-bg); } .st.none { color: var(--none); background: var(--none-bg); }
.st.run { color: var(--run); background: var(--run-bg); } .st.done { color: var(--mint-ink); background: var(--mint-bg); } .st.quiet { color: var(--muted); background: var(--tint); }
.st.run::before { animation: pulse 1.1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.watch { background: var(--warn-line); } .dot.act { background: var(--act); } .dot.none { background: var(--none-bg); box-shadow: inset 0 0 0 1px var(--line-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: var(--r-s); border: 1px solid transparent; font-weight: 700; font-size: 13.5px; white-space: nowrap; background: var(--surface); }
.btn.p { background: var(--navy); color: #fff; } .btn.p:hover { background: var(--navy-3); }
.btn.mint { background: var(--mint); color: var(--navy); } .btn.mint:hover { background: var(--mint-2); }
.btn.sec { border-color: var(--line-2); color: var(--ink); } .btn.sec:hover { background: var(--tint); }
.btn.q { color: var(--muted); } .btn.q:hover { background: var(--tint); color: var(--ink); }
.btn.sm { min-height: 30px; padding: 3px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.x { background: none; border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); flex: none; }
.x:hover { background: var(--tint); color: var(--ink); }

/* the brief: the one lifted surface on the overview */
.brief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); padding: 22px 26px 18px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; position: relative; overflow: hidden; }
.brief::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--mint), var(--navy-4)); }
.brief .mark { width: 44px; height: 44px; }
.brief .lead { font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 78ch; margin-top: 6px; }
.brief .lead b { font-weight: 800; }
.brief .who { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brief .who h1 { font-size: 20px; }
.brief .who .m { font-size: 13px; }
.kpis { display: flex; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; flex-wrap: wrap; }
.kpi { padding: 0 22px 0 0; margin-right: 22px; border-right: 1px solid var(--line); }
.kpi:last-child { border: 0; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .v.mint { color: var(--mint-ink); }
.kpi .v.warn { color: var(--warn); } .kpi .v.act { color: var(--act); }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* needs you: the top of the actions list, with its buttons */
.needs { display: grid; gap: 8px; }
.need { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px 16px; }
.need .k { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.need .k.act { background: var(--act-bg); color: var(--act); } .need .k.watch { background: var(--warn-bg); color: var(--warn); }
.need .t { font-weight: 700; font-size: 14.5px; }
.need .t button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; }
.need .t button:hover { text-decoration: underline; }
.need .w { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.need .w b { color: var(--ink); font-weight: 700; }
.need .acts { display: flex; gap: 6px; }

/* the health band: one object, ten columns */
.band { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.col { background: none; border: 0; border-right: 1px solid var(--line); border-top: 3px solid var(--line-2); padding: 12px 12px 10px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit; }
.col:last-child { border-right: 0; }
.col:hover { background: var(--tint); }
.col.ok { border-top-color: var(--ok); } .col.watch { border-top-color: var(--warn-line); } .col.act { border-top-color: var(--act); } .col.none { border-top-color: var(--line-2); }
.col .n { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col .sc { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: 2px; }
.col .sc small { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0; margin-left: 2px; }
.col .sc.none { color: var(--faint); font-size: 15px; font-weight: 700; }
.col .st { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; }
.col .a { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip { display: flex; gap: 1.5px; height: 14px; align-items: flex-end; margin-top: 4px; }
.strip i { flex: 1; min-width: 1px; height: 100%; border-radius: 1px; background: var(--ok-bg); }
.strip i.ok { background: var(--ok); opacity: .55; } .strip i.watch { background: var(--warn-line); } .strip i.act { background: var(--act); } .strip i.none { background: var(--none-bg); }
.strip i.today { outline: 1px solid var(--ink); outline-offset: 1px; }

/* two-column body: matrix and activity */
.two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.block { display: grid; gap: 10px; }
.bh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bh h2 { font-size: 15px; }
.mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mx th { font-weight: 700; color: var(--muted); font-size: 11.5px; text-align: center; padding: 6px 2px; white-space: nowrap; }
.mx th.r { text-align: left; }
.mx th button { background: none; border: 0; padding: 2px 4px; border-radius: 4px; font: inherit; color: inherit; }
.mx th button:hover { background: var(--tint); color: var(--ink); }
.mx th .sc { display: block; font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.mx th .sc.none { color: var(--faint); font-weight: 600; font-size: 12px; }
.mx td { padding: 3px 2px; text-align: center; border-top: 1px solid var(--line); }
.mx td.r { text-align: left; padding-left: 0; width: 1%; }
.mx td.r .one { max-width: 180px; }
.mx td.r button { background: none; border: 0; padding: 4px 6px; border-radius: 4px; font: inherit; font-weight: 700; color: var(--ink); text-align: left; display: flex; flex-direction: column; gap: 1px; }
.mx td.r button:hover { background: var(--tint); }
.mx td.r .tag { font-size: 10.5px; }
.cellb { width: 30px; height: 30px; border-radius: 7px; border: 0; display: inline-grid; place-items: center; font: 700 12px/1 var(--font); }
.cellb.ok { background: var(--ok-bg); color: var(--ok); } .cellb.watch { background: var(--warn-bg); color: var(--warn); } .cellb.act { background: var(--act-bg); color: var(--act); } .cellb.none { background: var(--none-bg); color: var(--faint); }
.cellb:hover { outline: 2px solid var(--navy-3); outline-offset: 1px; }
.cellb.ex { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .55) 4px 6px); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* activity stream */
.feed { display: grid; }
.ev { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; padding-top: 0; }
.ev .who { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--muted); font-weight: 800; font-size: 11px; }
.ev .who.s { background: var(--navy); color: var(--mint); box-shadow: 0 0 0 2px var(--mint-bg); }
.ev .t { font-size: 13.5px; line-height: 1.45; }
.ev .t b { font-weight: 700; }
.ev .d { font-size: 12px; color: var(--faint); font-weight: 600; margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev .t button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--navy-3); text-decoration: underline; text-underline-offset: 2px; }

/* actions list (the full list) */
.list { display: grid; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 10px; border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: inherit; width: 100%; border-radius: 0; }
.row:first-child { border-top: 0; }
.row.compact { grid-template-columns: auto minmax(0, 1fr) auto; }
.row.compact .w { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row.compact .w .st { padding: 3px 7px 3px 6px; font-size: 11px; }
.row:hover { background: var(--tint); }
.row .k { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11.5px; }
.row .k.act { background: var(--act-bg); color: var(--act); } .row .k.watch { background: var(--warn-bg); color: var(--warn); } .row .k.ok { background: var(--ok-bg); color: var(--ok); }
.row .t { font-weight: 700; font-size: 14px; }
.row .w { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.row .meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; align-items: center; }
.row .meta b { color: var(--ink); font-weight: 800; font-size: 14px; }
.row .meta .lbl { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.surface .list { padding: 2px 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ok); font-size: 16px; margin-bottom: 4px; }

/* overlays: flyout (click 1), card (click 2), chat */
.backdrop { position: fixed; inset: 0; background: rgba(12, 31, 78, .38); z-index: 40; backdrop-filter: blur(2px); }
.fly { position: fixed; top: 0; right: 0; height: 100vh; width: min(600px, 100%); background: var(--surface); box-shadow: var(--shadow); z-index: 41; overflow: auto; display: flex; flex-direction: column; }
body[data-chat="1"] .fly { right: var(--chat); }
.fh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.fh .eyebrow { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.fh h2 { font-size: 20px; }
.fh .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fsec { padding: 16px 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.fsec:first-of-type { border-top: 0; }
.fsec h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fsec h3 .m { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; align-items: center; background: none; border: 0; padding: 4px 0; text-align: left; color: inherit; }
.bar:hover .lab { text-decoration: underline; }
.bar .lab { font-weight: 600; font-size: 13px; }
.bar .trk { display: block; height: 10px; background: var(--tint); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar .trk i { display: block; height: 100%; border-radius: 3px; }
.bar .trk i.act { background: var(--act); } .bar .trk i.watch { background: var(--warn-line); } .bar .trk i.ok { background: var(--ok); }
.bar .v { font-weight: 800; font-size: 15px; text-align: right; }
.bar .v small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.reads { display: grid; gap: 6px; }
.read { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: none; border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 12px; text-align: left; color: inherit; }
.read:hover { border-color: var(--navy-3); }
.read .w { font-weight: 700; font-size: 12.5px; color: var(--muted); }
.read .v { font-family: var(--mono); font-size: 12.5px; }
.hist { display: flex; gap: 2px; height: 26px; }
.hist i { flex: 1; border-radius: 2px; background: var(--ok-bg); }
.hist i.ok { background: var(--ok); opacity: .5; } .hist i.watch { background: var(--warn-line); } .hist i.act { background: var(--act); } .hist i.none { background: var(--none-bg); }
.hist i.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.histl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.noperm { background: var(--tint); border-radius: var(--r-s); padding: 12px 14px; font-size: 13.5px; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal .backdrop { z-index: 0; }
.card { position: relative; z-index: 1; width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.ch { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 26px 16px; position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--line); }
.ch .eyebrow { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.ch h2 { font-size: 21px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.card .fsec { padding: 16px 26px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.facts .v { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.facts .n { font-size: 12px; color: var(--muted); font-weight: 600; }
.plan { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--bg); }
.plan .kind { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.plan .kind .who { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--mint); display: grid; place-items: center; font-size: 11px; box-shadow: 0 0 0 2px var(--mint-bg); }
.plan ol { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13.5px; }
.plan .kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 12.5px; }
.plan .kv b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.evid { font-family: var(--mono); font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; }
.evid ul { margin: 6px 0 0; padding-left: 18px; columns: 2; }
.evid li { break-inside: avoid; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; width: 100%; }
.inline label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.inline input, .inline select { border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 7px 9px; background: var(--surface); min-width: 170px; }
.log { display: grid; gap: 6px; font-size: 13px; }
.log > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.log .d { color: var(--faint); font-weight: 600; font-size: 12px; }
.kv2 { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; }
.kv2 b { font-weight: 800; }
.progress { display: grid; gap: 6px; }
.step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px; }
.step i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 10px; font-style: normal; font-weight: 800; }
.step.done i { background: var(--mint); border-color: var(--mint); color: var(--navy); }
.step.now i { border-color: var(--navy-3); animation: pulse 1.1s infinite; }
.step.todo { color: var(--muted); }
.ticket { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; }
.ticket .id { font-family: var(--mono); font-weight: 600; }

/* chat */
.chat[hidden] { display: none; }
.chat { position: sticky; top: 0; height: 100vh; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; z-index: 42; }
.chat .hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat .hd b { font-size: 14px; font-weight: 800; }
.chat .hd span { font-size: 12px; color: var(--muted); display: block; }
.chat .ctx { font-size: 12px; color: var(--muted); padding: 8px 16px; background: var(--tint); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.chat .ctx b { color: var(--ink); }
.msgs { flex: 1; overflow: auto; padding: 16px; display: grid; gap: 12px; align-content: start; }
.msg { max-width: 92%; display: grid; gap: 6px; }
.msg.s { justify-self: start; }
.msg.u { justify-self: end; }
.msg .b { padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.msg.s .b { background: var(--tint); border-top-left-radius: 4px; }
.msg.u .b { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.msg .b b { font-weight: 800; }
.msg .b ul { margin: 6px 0 0; padding-left: 18px; }
.msg .acts { margin-top: 2px; }
.msg .d { font-size: 11px; color: var(--faint); font-weight: 600; }
.sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.sugg button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--navy-3); }
.sugg button:hover { background: var(--tint); }
.chat form { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.chat input { flex: 1; border: 1px solid var(--line-2); border-radius: 20px; padding: 9px 14px; background: var(--bg); }
.chat form button { border: 0; background: var(--navy); color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.chat form button svg { width: 16px; height: 16px; }

/* settings and checks */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.set { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 10px; }
.set h2 { font-size: 15px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.sw i { width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw.on i { background: var(--mint); } .sw.on i::after { left: 16px; }
.mxk td { text-align: center; font-family: var(--mono); font-size: 12px; }
.mxk td.r { text-align: left; font-family: var(--font); font-weight: 600; min-width: 220px; width: auto; }
.mxk .pill { white-space: nowrap; margin: 1px; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 4px; font: 600 11.5px/1 var(--mono); }
.pill.act { background: var(--act-bg); color: var(--act); } .pill.watch { background: var(--warn-bg); color: var(--warn); } .pill.q { color: var(--faint); }

/* review bar (prototype controls, not the design) */
.rb { position: fixed; right: 12px; bottom: 12px; z-index: 60; display: flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 12px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow-s); }
body[data-chat="1"] .rb { right: calc(var(--chat) + 12px); }
.rb .seg button { padding: 3px 8px; font-size: 12px; }
.rb button.q { background: none; border: 0; color: var(--navy-3); font-weight: 700; padding: 3px 6px; }


/* round 3: pages (pillar, app, check), the grouped matrix, the charts */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.crumb button { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-3); font-weight: 700; }
.crumb button:hover { text-decoration: underline; }
.crumb .sep { color: var(--faint); }
.crumb b { color: var(--ink); }
.hero { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; }
.hero .eyebrow { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.hero h1 { font-size: 26px; }
.hero .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-facts { border: 0; gap: 0; }
.hero-facts > div { border-right: 1px solid var(--line); padding: 4px 20px; }
.hero-facts > div:first-child { padding-left: 0; }
.hero-facts > div:last-child { border-right: 0; }
.hero-facts .v.big { font-size: 34px; }
.lnk { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-3); font-weight: 700; cursor: pointer; text-align: left; }
.lnk:hover { text-decoration: underline; }
.tbl.work td, .tbl.work th { padding: 6px 8px; }
.tbl.work tr.sum td { font-weight: 800; border-top: 2px solid var(--line-2); }
.tbl.work tr.hl td { background: var(--tint); }
.tbl td.num, .tbl th.num { text-align: right; }
select.inl { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); padding: 3px 6px; font-size: 12.5px; }
.mx tr.grp td { border-top: 1px solid var(--line); }
.mx tr.sub td { border-top: 1px dashed var(--line); background: var(--bg); }
.mx td.r { display: flex; align-items: center; gap: 2px; border-top: 0; }
.mx tr.grp td.r, .mx tr.sub td.r { border-top: inherit; }
.mx .chev { background: none; border: 0; width: 22px; height: 26px; color: var(--muted); font-size: 12px; border-radius: 4px; padding: 0; }
.mx .chev:hover { background: var(--tint); color: var(--ink); }
.mx tr.sub td.r .nm { padding-left: 26px; font-weight: 600; }
.mx td.r .nm { background: none; border: 0; padding: 4px 6px; border-radius: 4px; font: inherit; font-weight: 700; color: var(--ink); text-align: left; display: flex; align-items: center; gap: 8px; }
.mx td.r .nm:hover { background: var(--tint); }
.mx td.r .nm .one { max-width: 210px; }
.mx td.r .nm { flex-direction: row; }
.mx td.r .nm .cnt { font: 600 11.5px/1 var(--font); color: var(--muted); background: var(--tint); border-radius: 9px; padding: 3px 6px; }
.tbl.work tr.dim td { color: var(--muted); }
.tbl.work tr.dim .lnk { color: var(--muted); font-weight: 600; }
.line { width: 100%; height: auto; display: block; }
.line .band-ok { fill: var(--ok-bg); opacity: .6; } .line .band-watch { fill: var(--warn-bg); opacity: .6; } .line .band-act { fill: var(--act-bg); opacity: .6; }
.line .thr { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.line .ln { fill: none; stroke: var(--navy-3); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.line .pt { stroke: var(--surface); stroke-width: 2; } .line .pt.ok { fill: var(--ok); } .line .pt.watch { fill: var(--warn-line); } .line .pt.act { fill: var(--act); }
.line .ax { font: 600 11px var(--font); fill: var(--muted); }
.heat { display: grid; gap: 3px; }
.heat .hr { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; }
.heat .lab { font-size: 12px; font-weight: 600; color: var(--muted); }
.heat .cells { display: flex; gap: 2px; }
.heat .cells i { flex: 1; height: 14px; border-radius: 2px; background: var(--ok-bg); min-width: 0; }
.heat .cells i.ok { background: var(--ok); opacity: .45; } .heat .cells i.watch { background: var(--warn-line); } .heat .cells i.act { background: var(--act); } .heat .cells i.none { background: var(--none-bg); }
.heat .cells i.today { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.heat .cells.lbl { justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
.hist2 h3 { margin-bottom: 8px; }
.set .bh h2 { font-size: 15px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 14px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts > div { padding: 6px 10px; border-right: 0; }
  .heat .hr { grid-template-columns: 90px minmax(0, 1fr); }
  .mx td.r .nm .one { max-width: 120px; }
}
/* settings sub-navigation, live switches, forms */
.stack { display: grid; gap: 18px; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 74px; }
.subnav button { background: none; border: 0; text-align: left; padding: 8px 12px; border-radius: var(--r-s); font-weight: 600; color: var(--muted); font-size: 13.5px; }
.subnav button:hover { background: var(--tint); color: var(--ink); }
.subnav button[aria-current="page"] { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 700; }
.sw.live { cursor: pointer; } .sw.live:focus-visible { outline: 2px solid var(--navy-3); outline-offset: 2px; border-radius: 10px; }
.cb { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.tbl tr.subc td { background: var(--bg); }
.tbl tr.subc td:first-child { padding-left: 20px; }
.hcrumb { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; }
.hcrumb button.cur { color: var(--ink); }
@media (max-width: 760px) { .subnav { position: static; flex-direction: row; overflow-x: auto; } .subnav button { flex: none; } .two[style] { grid-template-columns: 1fr !important; } }
/* the history heatmap */
.hm { display: grid; gap: 3px; }
.hmr { display: grid; grid-template-columns: 170px minmax(0, 1fr) 52px; gap: 10px; align-items: center; }
.hmr .lab { font-size: 12px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 2px 4px; text-align: left; border-radius: 4px; }
.hmr button.lab:hover { background: var(--tint); color: var(--ink); }
.hmr .cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.5px; }
.hmr .cells .c { height: 16px; border: 0; padding: 0; border-radius: 2px; background: var(--ok-bg); min-width: 0; }
.hmr .cells .c.ok { background: var(--ok); opacity: .45; } .hmr .cells .c.watch { background: var(--warn-line); } .hmr .cells .c.act { background: var(--act); } .hmr .cells .c.none { background: var(--none-bg); }
.hmr .cells .c:hover { outline: 2px solid var(--navy-3); outline-offset: 1px; opacity: 1; z-index: 1; }
.hmr .cells .c.sel { outline: 2px solid var(--ink); outline-offset: 1px; opacity: 1; }
.hmr .tot { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: right; }
.hmr .tot.act { color: var(--act); }
.hmr.ax .cells { display: block; position: relative; height: 16px; }
.hmr.ax .cells span { position: absolute; top: 0; font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.row.compact .k:empty { width: 10px; height: 10px; border-radius: 50%; }
@media (max-width: 760px) { .hmr { grid-template-columns: 90px minmax(0, 1fr); } .hmr .tot { display: none; } .hmr .cells .c { height: 12px; } }
/* with the chat docked, the content column is narrow */
@media (max-width: 1560px) {
  body[data-chat="1"] .band { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body[data-chat="1"] .col:nth-child(5) { border-right: 0; }
  body[data-chat="1"] .two { grid-template-columns: 1fr; }
  body[data-chat="1"] .kpi .v { font-size: 22px; }
}
/* phone */
@media (max-width: 1100px) {
  body[data-chat="1"] { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .chat { position: fixed; inset: 0; left: auto; width: min(420px, 100%); box-shadow: var(--shadow); }
  body[data-chat="1"] .fly { right: 0; }
  .two { grid-template-columns: 1fr; }
  .band { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .col:nth-child(5) { border-right: 0; } .col:nth-child(n+6) { border-top-width: 3px; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  body, body[data-chat="1"] { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 62px; flex-direction: row; align-items: center; padding: 0 6px; z-index: 30; }
  .rail .brand, .rail .foot .modebox, .rail .foot .ask span { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; gap: 0; }
  .nav button { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 6px 4px; }
  .nav button .n { margin: 0; position: absolute; transform: translate(14px, -22px); }
  .nav button { position: relative; }
  .rail .foot { margin: 0; }
  .ask { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .top { padding: 0 14px; height: auto; flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .top .grow { display: none; }
  .content { padding: 14px 14px 90px; gap: 16px; }
  .brief { grid-template-columns: 1fr; padding: 18px 16px 14px; }
  .brief .mark { display: none; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .kpi { padding: 0; margin: 0; border: 0; } .kpi .v { font-size: 22px; }
  .tabs { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; }
  .tabs button { flex: none; }
  .row > :nth-child(n+3) { grid-column: 2; }
  .row .t.one { white-space: normal; }
  .row .meta { gap: 10px; }
  .row .meta .lbl { white-space: nowrap; }
  .need { grid-template-columns: auto minmax(0, 1fr); }
  .need .acts { grid-column: 2; }
  .band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col { border-right: 1px solid var(--line); } .col:nth-child(even) { border-right: 0; } .col:nth-child(5) { border-right: 1px solid var(--line); }
  .mx { display: block; overflow-x: auto; }
  .mx td.r, .mx th.r { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  .fly { width: 100%; }
  .card { max-height: 100vh; border-radius: 0; width: 100%; }
  .modal { padding: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(2) { border-right: 0; } .facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .plan .kv { grid-template-columns: 1fr; }
  .evid ul { columns: 1; }
  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row .meta { grid-column: 2; }
  .read { grid-template-columns: 1fr; gap: 4px; }
  .chat { width: 100%; }
  .rb { bottom: 72px; right: 10px; }
  .bh .seg { flex-wrap: wrap; }
  .bh .seg button { font-size: 12px; padding: 4px 8px; }
  .rb .lbl { display: none; }
  .log > div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { .st.run::before, .step.now i { animation: none; } }
