/* Security hub v2. Look taken from the approved concepts (ConceptB Mission control, ConceptA Ops console). */
:root {
  --ground: #070D19; --panel: #0C1628; --panel2: #0A1322; --line: #16253D; --line2: #1E3354; --line3: #2A4470;
  --ink: #DCE8FF; --ink2: #C9D7EE; --mute: #93A8C8; --dim: #7088A8; --faint: #5D7493;
  --blue: #4C8DFF; --blue2: #7AA7FF; --blue3: #9DBDFF; --green: #34D399; --amber: #FBBF24; --red: #F87171; --violet: #A78BFA; --violet2: #C4B5FD;
  --gray: #5D7493;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
body { min-height: 100vh; background: radial-gradient(1200px 520px at 60% 0%, #0E1D38 0%, var(--ground) 60%) fixed; }
a { color: var(--blue2); } a:hover { color: var(--ink); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); font-size: 12px; }
.amber { color: var(--amber); } .strong { font-weight: 600; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue3); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- animation ---------- */
@keyframes flow { from { left: 0; } to { left: 100%; } }
@keyframes flowA { from { left: -6px; } to { left: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes halo { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.rise { animation: rise .25s ease-out; }
.lp { animation: livePulse 1.6s ease-in-out infinite; }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(76,141,255,.25); border-top-color: var(--blue2); animation: spin 1s linear infinite; vertical-align: -2px; margin-right: 8px; flex-shrink: 0; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex-shrink: 0; background: var(--panel2); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brandmark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--blue), #1D4FD8); box-shadow: 0 0 18px rgba(76,141,255,.45); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.brandtext { display: flex; flex-direction: column; } .b1 { font-weight: 600; letter-spacing: .5px; } .b2 { font-size: 11px; color: var(--dim); }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.navbtn { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--mute); font-size: 13px; cursor: pointer; text-align: left; }
.navbtn:hover { background: #101D33; color: var(--ink); }
.navbtn.on { border-color: #24406A; background: rgba(76,141,255,.12); color: var(--ink); font-weight: 600; }
.badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #13213A; color: var(--mute); }
.badge.amber { background: rgba(251,191,36,.16); color: var(--amber); } .badge.red { background: rgba(248,113,113,.16); color: var(--red); } .badge.blue { background: rgba(76,141,255,.16); color: var(--blue3); }
.sysbox { margin-top: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.syshead { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; color: var(--dim); }
.sysline { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sysmeta { font-size: 11px; color: var(--dim); }
.sysold { font-size: 12px; }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); display: inline-block; flex-shrink: 0; }
.livedot.green { background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.5); } .livedot.red { background: var(--red); }
.phonebar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
main { flex: 1; min-width: 0; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 14px; }
.view { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.view[hidden] { display: none; }

.banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(248,113,113,.10); border: 1px solid rgba(248,113,113,.45); color: #FECACA; padding: 10px 14px; border-radius: var(--r); font-size: 13px; }
.banner[hidden], .notice[hidden] { display: none; }
.notice { background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.3); border-radius: var(--r); padding: 8px 14px; font-size: 12px; color: #FDE68A; }
.notice summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.notice ul { margin: 6px 0 4px; padding-left: 18px; } .notice li { margin: 2px 0; overflow-wrap: anywhere; }

/* ---------- common bits ---------- */
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.8px; color: var(--mute); }
.sub { font-size: 12px; color: var(--dim); }
.phead { display: flex; flex-direction: column; gap: 4px; }
.phead h1, .qhead h1 { font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.qhead { display: flex; flex-direction: column; gap: 4px; }
.qhead .sub { font-size: 13px; color: var(--mute); }
.panel { background: rgba(12,22,40,.85); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panelhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panelbody { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.btn { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #13213A; color: var(--ink); }
.btn.primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--blue), #2563EB); box-shadow: 0 4px 14px rgba(76,141,255,.35); font-weight: 600; }
.btn.tp { border-color: rgba(248,113,113,.45); }
.btn.ai { border-color: #2A2F5A; color: var(--violet2); background: rgba(167,139,250,.06); }
.btn.link { border-color: transparent; color: var(--blue2); padding: 0 6px; }
.btn.sm { min-height: 32px; font-size: 12px; padding: 0 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--blue2); cursor: pointer; padding: 4px 6px; font-size: 12px; min-height: 28px; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }
.linkbtn.more { align-self: flex-start; }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.iconbtn:hover { background: #13213A; color: var(--ink); }
.chip { min-height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line2); background: transparent; color: var(--mute); font-size: 12px; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: #2E4A75; }
.chip.on { border-color: var(--blue); background: rgba(76,141,255,.14); color: var(--ink); }
.chip .n { opacity: .6; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; border-radius: 6px; padding: 3px 8px; white-space: nowrap; flex-shrink: 0; }
.v-tp { color: var(--red); background: rgba(248,113,113,.13); } .v-suspicious { color: var(--amber); background: rgba(251,191,36,.12); }
.v-fp { color: var(--green); background: rgba(52,211,153,.12); } .v-review { color: var(--violet2); background: rgba(167,139,250,.13); } .v-none { color: var(--mute); background: rgba(147,168,200,.12); }
.wl { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--red); border: 1px solid rgba(248,113,113,.55); border-radius: 4px; padding: 1px 6px; white-space: nowrap; flex-shrink: 0; }
.wl.soft { color: #FCA5A5; border-style: dashed; }
.tag { font-size: 11px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; flex-shrink: 0; border: 1px solid var(--line2); color: var(--mute); }
.tag.amber { color: var(--amber); border-color: rgba(251,191,36,.4); } .tag.queued { color: var(--blue3); border-color: rgba(76,141,255,.45); }
.tag.done { color: var(--green); border-color: rgba(52,211,153,.4); } .tag.red { color: var(--red); border-color: rgba(248,113,113,.4); }
.sevbar { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; background: var(--gray); }
.sevbar.sv-high { background: var(--red); } .sevbar.sv-medium { background: var(--amber); } .sevbar.sv-low { background: #60A5FA; } .sevbar.sv-informational { background: #64748B; }
.sevtxt { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--mute); }
.sevtxt.sv-high { color: var(--red); } .sevtxt.sv-medium { color: var(--amber); } .sevtxt.sv-low { color: #60A5FA; }
.state { padding: 26px 12px; text-align: center; color: var(--mute); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.state.loading { flex-direction: row; justify-content: center; }
.state.err { color: #FECACA; } .st-title { font-weight: 600; } .st-why { font-size: 12px; color: var(--mute); max-width: 52ch; overflow-wrap: anywhere; }
.stale { font-size: 12px; color: #FDE68A; background: rgba(251,191,36,.06); border: 1px solid rgba(251,191,36,.25); border-radius: 8px; padding: 6px 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.infobox { font-size: 13px; color: var(--ink2); background: rgba(76,141,255,.07); border: 1px solid #24406A; border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.errbox { font-size: 13px; color: #FECACA; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.35); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.errline { font-size: 12px; color: var(--red); }
.resp { font-size: 13px; color: var(--mute); min-height: 0; overflow-wrap: anywhere; }
.resp:empty { display: none; } .resp.good { color: var(--green); } .resp.bad { color: var(--red); }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #101D33; border: 1px solid var(--line3); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: rise .25s ease-out; transition: opacity .4s; overflow-wrap: anywhere; }
.toast.good { border-color: rgba(52,211,153,.5); } .toast.bad { border-color: rgba(248,113,113,.6); } .toast.out { opacity: 0; }

/* ---------- Mission control header + KPIs ---------- */
.mchead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mctitle { display: flex; flex-direction: column; gap: 2px; margin-right: 8px; }
.mctitle h1 { font-size: 16px; font-weight: 600; }
.live { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.live .livedot { width: 6px; height: 6px; }
.kpis { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.kpi { background: rgba(12,22,40,.8); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; text-align: left; min-width: 0; min-height: 56px; }
.kpi:hover { border-color: #2E4A75; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.num { font-size: 24px; font-weight: 600; line-height: 1; }
.kl { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; flex-shrink: 0; }
.spark span { width: 4px; border-radius: 1px; background: currentColor; opacity: .45; }
.spark span.last { opacity: 1; }
.spark .notrend { width: auto; background: none; opacity: 1; font-size: 10px; color: var(--faint); align-self: center; }
.t-amber { color: var(--amber); } .t-green { color: var(--green); } .t-blue { color: var(--blue3); } .t-violet { color: var(--violet2); }
.kpi .kl { color: var(--mute); }

/* ---------- agent map ---------- */
.map { position: relative; border: 1px solid var(--line); border-radius: 16px; background-color: rgba(7,13,25,.55); background-image: radial-gradient(rgba(122,167,255,.10) 1px, transparent 1px); background-size: 22px 22px; padding: 14px 18px; overflow: hidden; }
.maphead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 2; }
.maphead .sub { margin-top: 2px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--mute); flex-wrap: wrap; }
.legend > span { display: flex; align-items: center; gap: 6px; }
.ldot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--gray); }
.s-running.ldot, .ldot.s-running { background: var(--blue); } .ldot.s-idle { background: var(--green); } .ldot.s-ready { background: var(--violet); }
.ldot.s-waiting { background: var(--amber); } .ldot.s-error, .ldot.s-stalled { background: var(--red); } .ldot.s-nofeed { background: var(--gray); }
.mapmsg { position: relative; z-index: 2; font-size: 12px; color: #FDE68A; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mapmsg:empty { display: none; }
.extraagents { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 2; }
.extraagents:empty { display: none; }
.agentchip { display: inline-flex; align-items: center; gap: 8px; background: var(--ground); border: 1px dashed var(--line2); border-radius: 20px; padding: 6px 12px; font-size: 12px; cursor: pointer; min-height: 36px; max-width: 100%; color: var(--ink); }
.agentchip span:last-child { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agentchip.sel { border-style: solid; border-color: var(--blue); }

/* inspector */
.inspslot:empty { display: none; }
.insp { background: rgba(10,19,34,.97); border: 1px solid var(--line3); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.insp.float { position: absolute; right: 18px; bottom: 16px; width: 360px; max-height: calc(100% - 32px); overflow-y: auto; z-index: 5; grid-template-columns: 1fr; }
.insp.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .95fr); margin-top: 12px; background: var(--ground); box-shadow: none; }
.map.compact .insp.float { position: static; width: auto; margin-top: 12px; max-height: none; }
.insphead { display: flex; align-items: center; gap: 8px; }
.insphead h3 { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insphead .iconbtn { width: 36px; height: 36px; }
.inspmain { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.insp .role { font-size: 12px; color: var(--dim); }
.insp .task { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.insp .task.dim { color: var(--mute); }
.statepill { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; border: 1px solid currentColor; border-radius: 6px; padding: 2px 7px; color: var(--gray); white-space: nowrap; }
.statepill.s-running { color: var(--blue3); } .statepill.s-idle { color: var(--green); } .statepill.s-waiting { color: var(--amber); } .statepill.s-error, .statepill.s-stalled { color: var(--red); } .statepill.s-ready { color: var(--violet2); } .statepill.s-nofeed { color: var(--mute); }
.indet { height: 5px; background: #13213A; border-radius: 3px; overflow: hidden; }
.indet span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--violet)); animation: indet 1.6s ease-in-out infinite; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fact { background: var(--panel); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact .k { font-size: 10px; color: var(--dim); } .fact .v { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspside { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.runs { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.evlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.evlist li { display: grid; grid-template-columns: 62px 56px minmax(0, 1fr); gap: 6px; border-bottom: 1px solid #13213A; padding-bottom: 4px; }
.evlist .t { color: var(--dim); font-size: 11px; } .evlist .kd { color: var(--mute); font-size: 11px; }
.evlist .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evlist li.k-error .kd { color: var(--red); } .evlist li.k-end .kd { color: var(--green); } .evlist li.k-start .kd { color: var(--blue3); }

/* ---------- Mission control lower grid ---------- */
.mcgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: stretch; }
.mcgrid > .panel, .mcgrid > .chatdock { max-height: 560px; }
.mcgrid .panelbody { overflow-y: auto; }
.needs { display: flex; flex-direction: column; gap: 8px; }
.needcard { background: var(--panel2); border: 1px solid #1A2B45; border-radius: var(--r); padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.needcard:hover { border-color: #2E4A75; }
.nc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nc-l1, .nc-l2 { display: flex; gap: 6px; align-items: center; min-width: 0; }
.nc-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nc-who { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.needcard .btn { min-height: 44px; }
.streaming { font-size: 11px; color: var(--green); }
.feedlist { list-style: none; margin: 0; padding: 0; }
.feedlist li { display: grid; grid-template-columns: 62px 8px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid #13213A; align-items: start; }
.feedlist .t { font-size: 11px; color: var(--dim); }
.fdot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; background: var(--green); }
.feedlist li.k-start .fdot, .feedlist li.k-progress .fdot { background: var(--blue); } .feedlist li.k-error .fdot { background: var(--red); } .feedlist li.k-info .fdot { background: var(--gray); }
.fx { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; min-width: 0; }
.fx strong { color: var(--green); }
.feedlist li.k-start .fx strong, .feedlist li.k-progress .fx strong { color: var(--blue3); } .feedlist li.k-error .fx strong { color: var(--red); } .feedlist li.k-info .fx strong { color: var(--mute); }
.fm { color: var(--ink2); }

/* chat */
.chatdock { background: rgba(12,22,40,.85); border: 1px solid #2A2F5A; border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 420px; overflow: hidden; }
.chathead { padding: 12px 14px; border-bottom: 1px solid #1E2547; display: flex; align-items: center; gap: 10px; }
.chathead .ct { font-size: 13px; font-weight: 600; } .chathead .cs { font-size: 11px; color: var(--violet); }
.aibadge { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--violet), #6D28D9); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.msgs { flex: 1; min-height: 160px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.msgs.thread { max-height: 460px; padding: 14px 0; }
.bub { max-width: 88%; display: flex; flex-direction: column; gap: 4px; animation: rise .25s ease-out; }
.bub.me { align-self: flex-end; align-items: flex-end; } .bub.agent { align-self: flex-start; }
.btext { font-size: 13px; line-height: 1.5; padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.bub.me .btext { border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; border: 1px solid #7C3AED; }
.bub.agent .btext { border-radius: 4px 14px 14px 14px; background: #161E3A; border: 1px solid #263459; }
.qdetail .bub.me .btext { background: #2563EB; border-color: #2563EB; }
.qdetail .bub.agent .btext { background: #13213A; border-color: var(--line2); }
.bmeta { font-size: 10px; color: var(--faint); } .bmeta.amber { color: var(--amber); }
.thinking { align-self: flex-start; background: #161E3A; border: 1px solid #263459; border-radius: 12px; padding: 8px 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #A9B8D6; }
.steps li { display: flex; gap: 6px; align-items: center; }
.steps .ck { color: var(--green); } .steps li.live { color: var(--violet2); }
.typing { display: inline-flex; gap: 4px; } .typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.prompts { padding: 0 14px 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.qdetail .prompts { padding: 0 0 8px; }
.pchip { min-height: 32px; padding: 0 11px; border-radius: 16px; border: 1px solid #2A2F5A; background: rgba(167,139,250,.08); color: var(--violet2); font-size: 12px; cursor: pointer; }
.pchip:hover { color: var(--ink); border-color: var(--violet); }
.composer { padding: 10px 14px 14px; border-top: 1px solid #1E2547; display: flex; gap: 8px; align-items: flex-end; }
.qdetail .composer { padding: 10px 0 0; border-top-color: var(--line); }
.chatin { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; padding: 11px 14px; background: var(--panel2); border: 1px solid #2A2F5A; border-radius: 10px; color: var(--ink); font: inherit; font-size: 13px; resize: vertical; }
.chatin::placeholder, .search::placeholder, textarea::placeholder { color: var(--faint); }
.sendbtn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sendbtn.ai { background: linear-gradient(135deg, var(--violet), #6D28D9); }
.sendbtn[disabled] { opacity: .45; cursor: not-allowed; }
.chatdock .resp { padding: 0 14px 10px; }

/* ---------- Queue ---------- */
.stripbox { background: linear-gradient(180deg, var(--panel), #0A1424); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.striphead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stripscroll { overflow-x: auto; padding-bottom: 4px; }
.strip { display: flex; align-items: center; min-width: 980px; }
.stripcell { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.node { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 8px 12px; border-radius: 12px; cursor: pointer; background: var(--ground); border: 1px solid #1A2B45; transition: transform .15s, border-color .15s; color: var(--ink); text-align: left; }
.node:hover { border-color: #2E4A75; transform: translateY(-2px); }
.node.sel { border-color: var(--blue); background: rgba(76,141,255,.10); }
.node.s-waiting { border-color: rgba(251,191,36,.5); }
.ndot { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.ndot .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(76,141,255,.2); border-top-color: var(--blue2); animation: spin 1.1s linear infinite; }
.ncore { position: absolute; inset: 5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ground); background: var(--gray); }
.node.s-running .ncore { background: var(--blue); } .node.s-idle .ncore { background: var(--green); } .node.s-waiting .ncore { background: var(--amber); } .node.s-error .ncore, .node.s-stalled .ncore { background: var(--red); } .node.s-ready .ncore { background: var(--violet); }
.node.s-nofeed .ncore { background: transparent; border: 1px dashed var(--gray); color: var(--mute); }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nname { font-size: 13px; font-weight: 600; white-space: nowrap; }
.nshort { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.s-running .nshort { color: var(--blue3); } .node.s-waiting .nshort { color: var(--amber); } .node.s-error .nshort, .node.s-stalled .nshort { color: var(--red); }
.link { flex: 1 1 24px; min-width: 18px; position: relative; height: 2px; background: var(--line2); margin: 0 4px; }
.link.live { background: rgba(76,141,255,.45); }
.dotflow { position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue2); box-shadow: 0 0 8px var(--blue); animation: flowA 1.6s linear infinite; }
.dotflow.d2 { animation-delay: .53s; } .dotflow.d3 { animation-delay: 1.06s; }
.sidechips { display: flex; gap: 10px; flex-wrap: wrap; }

.qgrid { display: flex; gap: 16px; align-items: flex-start; }
.qlist { flex: 999 1 560px; min-width: 0; padding: 0; gap: 0; overflow: hidden; }
.qdetail { flex: 1 1 400px; min-width: 320px; max-width: 540px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px 18px; }
.qtools { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.searchwrap { display: flex; align-items: center; gap: 8px; background: var(--ground); border: 1px solid var(--line2); border-radius: 10px; padding: 0 12px; height: 44px; color: var(--dim); }
.searchwrap:focus-within { border-color: var(--blue); }
.search { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 13px; height: 100%; }
.filters { display: flex; flex-direction: column; gap: 10px; }
.segrow { display: flex; gap: 10px; flex-wrap: wrap; }
.seg { display: flex; background: var(--ground); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; font-size: 12px; cursor: pointer; background: transparent; color: var(--mute); }
.seg button.on { background: #1B2E4F; color: var(--ink); font-weight: 600; }
.seg .n { opacity: .6; font-weight: 400; }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rowlbl { font-size: 11px; color: var(--dim); margin-right: 4px; min-width: 52px; }
.chip.sv-high.on { border-color: var(--red); } .chip.sv-medium.on { border-color: var(--amber); } .chip.sv-low.on { border-color: #60A5FA; }
.chip.wlchip { color: #FCA5A5; } .chip.wlchip.on { border-color: var(--red); background: rgba(248,113,113,.1); }
.countline { display: flex; gap: 10px; align-items: center; padding: 10px 16px; font-size: 12px; color: var(--dim); }
.countline .dim { margin-left: auto; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid #13213A; text-align: left; cursor: pointer; background: transparent; color: inherit; min-height: 64px; }
.row:hover { background: #0F1B30; }
.row.on { background: rgba(76,141,255,.09); box-shadow: inset 3px 0 0 var(--blue); }
.row:focus-visible { outline-offset: -2px; }
.rmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rtitle { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.r2 { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--mute); min-width: 0; }
.r2 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.who .u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unk { color: var(--faint); font-style: italic; }
.av { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fam { color: var(--dim); flex-shrink: 0; }
.rside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; max-width: 34%; }
.age { font-size: 12px; color: var(--mute); }
.next { font-size: 11px; color: var(--mute); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next.t-approve { color: var(--amber); } .next.t-queued { color: var(--blue3); } .next.t-closed { color: var(--dim); } .next.t-held { color: #FDE68A; } .next.t-bad { color: var(--red); }
.moreslot { padding: 12px 16px; display: flex; justify-content: center; }
.moreslot:empty { display: none; }

/* detail */
.backbtn { display: none; align-self: flex-start; }
.dhead { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dtitle { font-size: 17px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.dwho { display: flex; gap: 14px; font-size: 12px; color: var(--mute); flex-wrap: wrap; }
.dwho > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--violet); min-width: 0; }
.credit span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); flex-shrink: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 4px; overflow-x: auto; }
.tabs button { min-height: 44px; padding: 0 12px; border: 0; background: transparent; font-size: 13px; cursor: pointer; color: var(--dim); white-space: nowrap; }
.tabs button.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }
.tabpanel { padding: 14px 0 4px; display: flex; flex-direction: column; gap: 12px; }
.desc { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.recbox { background: linear-gradient(135deg, rgba(76,141,255,.10), rgba(167,139,250,.08)); border: 1px solid var(--line3); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.recbox .rec { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.recbox .why { font-size: 12px; color: var(--mute); line-height: 1.5; overflow-wrap: anywhere; }
.actst { border-top: 1px solid var(--line2); padding-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.al1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .al2 { color: var(--ink2); } .al3 { color: var(--dim); overflow-wrap: anywhere; }
.statepill.a-proposed { color: var(--amber); } .statepill.a-approved, .statepill.a-executing { color: var(--blue3); } .statepill.a-done { color: var(--green); } .statepill.a-failed { color: var(--red); } .statepill.a-rejected, .statepill.a-expired { color: var(--mute); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actbar { display: flex; gap: 8px; flex-wrap: wrap; }
.actbar .btn { min-height: 44px; }
.notebox { display: flex; flex-direction: column; gap: 8px; background: var(--ground); border: 1px solid var(--line2); border-radius: 10px; padding: 10px; }
.notebox[hidden] { display: none; }
.notebox textarea { width: 100%; min-height: 64px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; color: var(--ink); font: inherit; font-size: 13px; padding: 8px 10px; resize: vertical; }
.notebox .hint { font-size: 12px; color: var(--mute); }
.noteacts { display: flex; gap: 8px; }
.evidence { list-style: none; margin: 0; padding: 0; }
.evidence li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #13213A; }
.esw { width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--blue); }
.esw.c1 { background: var(--violet); } .esw.c2 { background: #22D3EE; } .esw.c3 { background: var(--green); }
.et { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; } .es { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- approvals / agents / closed ---------- */
.apgroup { display: flex; flex-direction: column; gap: 10px; }
.apgrid, .agentgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.apcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.apcard.s-proposed { border-color: rgba(251,191,36,.45); }
.aphead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .aphead h3 { font-size: 15px; font-weight: 600; }
.apwho { font-size: 13px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apwhy { font-size: 12px; color: var(--mute); line-height: 1.5; overflow-wrap: anywhere; }
.apcard .btn { align-self: flex-start; min-height: 44px; }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; min-height: 44px; }
.acard:hover { border-color: #2E4A75; } .acard.sel { border-color: var(--blue); }
.acard.s-error, .acard.s-stalled { border-color: rgba(248,113,113,.45); } .acard.s-waiting { border-color: rgba(251,191,36,.45); }
.ach { display: flex; align-items: center; gap: 8px; } .ach strong { flex: 1; font-size: 14px; }
.act { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ace { font-size: 12px; color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csec { padding: 14px 0 6px; } .csec .panelhead { padding: 0 14px; }
.clist { list-style: none; margin: 0; padding: 0; }
.citem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid #13213A; }
.cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cwho { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creason { font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; }
.cacts { display: flex; gap: 8px; flex-shrink: 0; } .cacts .btn { min-height: 44px; }

/* ---------- insights ---------- */
.chartgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 14px; }
.chart .ch { font-size: 14px; font-weight: 600; }
.csub { margin: 0; font-size: 12px; color: var(--dim); }
.clegend { display: flex; gap: 14px; font-size: 12px; color: var(--mute); margin-bottom: 6px; }
.clegend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { height: 150px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line2); }
.bgrp { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 1px; min-width: 0; }
.bgrp:hover { background: rgba(122,167,255,.06); }
.bar { flex: 1; border-radius: 4px 4px 0 0; min-width: 2px; max-width: 14px; }
.bgrp { justify-content: center; }
.c-blue { background: var(--blue); } .c-green { background: var(--green); } .c-red { background: var(--red); }
.baxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 4px; }
.stack { display: flex; height: 18px; gap: 2px; border-radius: 4px; overflow: hidden; }
.stack .sseg { min-width: 2px; }
.sseg.v-tp, .sw.v-tp { background: var(--red); } .sseg.v-suspicious, .sw.v-suspicious { background: var(--amber); } .sseg.v-review, .sw.v-review { background: var(--violet); } .sseg.v-fp, .sw.v-fp { background: var(--green); } .sseg.v-none, .sw.v-none { background: var(--gray); }
.slegend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; font-size: 12px; color: var(--ink2); }
.slegend li { display: flex; align-items: center; gap: 6px; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 8px; align-items: center; font-size: 12px; }
.ht { height: 12px; background: #101D33; border-radius: 4px; overflow: hidden; }
.hb { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--gray); }
.hb.sv-high { background: var(--red); } .hb.sv-medium { background: var(--amber); } .hb.sv-low { background: #60A5FA; } .hb.sv-informational { background: #64748B; }
.hv { text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tv { font-size: 22px; font-weight: 600; color: var(--violet2); } .tl { font-size: 11px; color: var(--mute); }
.tableview summary { cursor: pointer; font-size: 12px; color: var(--blue2); min-height: 32px; display: flex; align-items: center; }
.dtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.dtable th { text-align: left; color: var(--dim); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--line2); }
.dtable td { padding: 5px 6px; border-bottom: 1px solid #13213A; font-variant-numeric: tabular-nums; }
.dtable td:first-child { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtable .wl { margin-left: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mcgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mcgrid > .chatdock { grid-column: 1 / -1; }
  .insp.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .insp.wide .runs { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .qgrid { display: block; }
  .qdetail { display: none; }
  body.detail-open .view[data-view="queue"] .qdetail { display: flex; position: fixed; inset: 0; max-width: none; max-height: none; border-radius: 0; z-index: 40; min-width: 0; top: 0; background: var(--panel); border: 0; }
  body.detail-open.on-queue { overflow: hidden; }
  .backbtn { display: inline-flex; }
}
@media (max-width: 760px) {
  /* review H2-F2: every tap target 44 px at phone width */
  .pchip, .agentchip, .btn, .btn.sm, .linkbtn, .tableview summary, .notice summary { min-height: 44px; }
  .searchwrap { height: auto; min-height: 46px; }
  .search { min-height: 44px; }
  .chatin { min-height: 44px; }
  .shell { display: block; }
  .phonebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: rgba(10,19,34,.96); border-bottom: 1px solid var(--line); padding: 4px 10px; min-height: 52px; }
  .phonetitle { flex: 1; font-weight: 600; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 35; transform: translateX(-105%); transition: transform .2s; height: 100%; width: 260px; }
  .sidebar.open { transform: none; }
  main { padding: 14px 12px 40px; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex-basis: 100%; }
  .mcgrid { grid-template-columns: minmax(0, 1fr); }
  .mcgrid > .panel, .mcgrid > .chatdock { max-height: none; }
  .insp.wide { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row { flex-wrap: wrap; align-items: stretch; }
  .row .sevbar { align-self: stretch; }
  .rmain { flex-basis: calc(100% - 20px); }
  .r1 { flex-wrap: wrap; }
  .rtitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .r2 { flex-wrap: wrap; gap: 4px 12px; }
  .rside { flex-direction: row; max-width: none; width: 100%; padding-left: 16px; justify-content: space-between; align-items: center; }
  .seg button, .chip { min-height: 44px; }
  .needcard { flex-wrap: wrap; } .needcard .btn { width: 100%; }
  .citem { flex-wrap: wrap; } .cacts { width: 100%; } .cacts .btn { flex: 1; }
  .actbar .btn { flex: 1 1 140px; }
  .chartgrid, .apgrid, .agentgrid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .linkbtn { min-height: 44px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .dotflow { display: none; }
}
@media (forced-colors: active) {
  .pill, .wl, .statepill, .tag { border: 1px solid CanvasText; }
}
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus, main:focus { outline: none; }
/* inspector run history (from /api/v2/agent-runs) */
.runbars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.runbars .rb { flex: 1; max-width: 18px; border-radius: 2px; background: #2E4A75; }
.runbars .rb.o-error { background: var(--red); } .runbars .rb.o-open { background: var(--blue); } .runbars .rb.o-ok { background: #3B6A9E; }
/* evidence gaps */
.gapbox { background: rgba(251,191,36,.05); border: 1px solid rgba(251,191,36,.25); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gaps { margin: 0; padding-left: 18px; font-size: 12px; color: #FDE68A; } .gaps li { margin: 2px 0; overflow-wrap: anywhere; }
.btn.link, .btn.link:hover { background: transparent; } .btn.link:hover { text-decoration: underline; }
/* review H2-F1: the inspector sits under the map, never over an agent */
.map .insp.wide { position: relative; z-index: 2; background: rgba(10,19,34,.97); }
/* review H2-F3: wide tables scroll inside their own box, never the page */
.tablewrap { max-width: 100%; overflow-x: auto; }
.tablewrap .dtable td:first-child { white-space: normal; overflow-wrap: anywhere; }

/* ---------- agent map as a pipeline (checklist 20261021, map redesign) ----------
   Stage columns read left to right; the only moving thing is the dots on a link where work moves now. */
@keyframes wflow { from { stroke-dashoffset: 18; } to { stroke-dashoffset: 0; } }
@keyframes stepin { from { background-color: rgba(122,167,255,.20); } }
.flowwrap { --pipecols: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.05fr) minmax(0, .9fr) minmax(0, .85fr); position: relative; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
.wires .w { fill: none; stroke: #2A4470; stroke-width: 1.6; }
.wires .w.dashed { stroke: #3A5384; stroke-dasharray: 4 5; }
.wires .w.live { stroke: rgba(122,167,255,.8); stroke-width: 2; }
.wires .w.amber { stroke: rgba(251,191,36,.6); }
.wires .wf { fill: none; stroke: var(--blue3); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0 18; animation: wflow .9s linear infinite; filter: drop-shadow(0 0 4px rgba(76,141,255,.9)); }
.wires .wf.amber { stroke: #FDE68A; filter: drop-shadow(0 0 4px rgba(251,191,36,.8)); animation-duration: 1.8s; }
.ah { fill: #2A4470; } .ah.live { fill: var(--blue3); } .ah.amber { fill: var(--amber); }
.wlabels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.wlabel { position: absolute; transform: translate(-50%, calc(-100% - 6px)); display: flex; flex-direction: column; align-items: center; font-size: 11px; line-height: 1.25; color: var(--mute); white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: rgba(7,13,25,.85); }
.wlabel.r-down, .wlabel.r-up { transform: translate(8px, -50%); align-items: flex-start; }
.wlabel .wl2 { color: var(--faint); font-variant-numeric: tabular-nums; }
.wlabel.live { color: var(--blue3); } .wlabel.live .wl2 { color: var(--blue2); }
.wlabel[hidden], .wlabel .wl2[hidden] { display: none; }
.stages { position: relative; z-index: 1; display: grid; grid-template-columns: var(--pipecols); grid-template-rows: auto minmax(78px, auto) minmax(118px, auto) minmax(100px, auto); }
.stages .stage { display: contents; }
.sband { grid-row: 1 / 5; margin: 0 3px; border-radius: 12px; background: rgba(122,167,255,.022); border: 1px solid rgba(122,167,255,.05); }
.sband.alt { background: rgba(122,167,255,.045); }
.stagehead { grid-row: 1; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px 4px; min-width: 0; }
.stt { display: flex; flex-direction: column; min-width: 0; }
.sn { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line3); color: var(--blue3); font: 600 11px var(--mono); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sname { font-size: 13px; font-weight: 600; white-space: nowrap; }
.snote { font-size: 11px; color: var(--dim); line-height: 1.3; }
.pn { --c: #4A5F7E; position: relative; justify-self: center; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px; max-width: 100%; min-width: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; text-align: center; }
.pn.s-running { --c: var(--blue); } .pn.s-idle { --c: var(--green); } .pn.s-waiting { --c: var(--amber); } .pn.s-error, .pn.s-stalled { --c: var(--red); } .pn.s-ready { --c: var(--violet); }
.pdot { position: relative; width: 46px; height: 46px; flex-shrink: 0; transition: transform .15s; }
.pn:hover .pdot { transform: scale(1.06); }
.pdot .core { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 35%, transparent), #0B1528 70%); border: 2px solid var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 28%, transparent); }
.pn.s-nofeed .core { border-style: dashed; color: var(--mute); }
.pn.crashed .core { background: rgba(248,113,113,.14); }
.pn.sel .core { box-shadow: 0 0 0 3px rgba(122,167,255,.28), 0 0 26px color-mix(in srgb, var(--c) 60%, transparent); }
.pdot .halo, .pdot .ring { display: none; position: absolute; border-radius: 50%; pointer-events: none; }
.pn.s-waiting .halo, .pn.s-running .halo { display: block; inset: 0; border: 2px solid var(--c); animation: halo 1.8s ease-out infinite; }
.pn.s-running .ring { display: block; inset: -6px; border: 2px solid rgba(76,141,255,.15); border-top-color: var(--blue3); border-right-color: var(--blue3); animation: spin 1.2s linear infinite; }
.ptext { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; max-width: 100%; }
.pname { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.psub { font-size: 11.5px; color: var(--mute); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn.s-running .psub { color: var(--blue3); } .pn.s-waiting .psub { color: var(--amber); } .pn.s-error .psub, .pn.s-stalled .psub { color: var(--red); } .pn.s-ready .psub { color: var(--violet2); } .pn.s-nofeed .psub { color: var(--faint); }
.pstep { font-size: 11px; color: var(--ink2); max-width: 100%; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pstep[hidden] { display: none; }
.pn.crashed .pstep { color: #FCA5A5; }
.pn.chipform { flex-direction: row; gap: 9px; text-align: left; padding: 5px 12px 5px 6px; border: 1px solid var(--line2); background: rgba(10,19,34,.92); border-radius: 22px; }
.pn.chipform .pdot { width: 28px; height: 28px; }
.pn.chipform .core { font-size: 10px; }
.pn.chipform .ptext { align-items: flex-start; }
.pn.chipform .pname { font-size: 12px; }
.pn.chipform .pstep { -webkit-line-clamp: 1; }
.pn.chipform.sel { border-color: var(--blue); }
.stages .pn.chipform { align-self: end; margin-bottom: 22px; }
.lane { position: relative; z-index: 1; display: grid; grid-template-columns: var(--pipecols); align-items: center; row-gap: 4px; }
.laneslot { display: contents; }
.lanehead { grid-column: 1 / 3; display: flex; flex-direction: column; gap: 1px; padding: 0 12px; min-width: 0; }
.lanename { font-size: 12px; font-weight: 600; color: var(--ink2); }
.lanenote { font-size: 11px; color: var(--dim); }
.oversight .pn { grid-column: 3 / 6; justify-self: start; }
.bracket { grid-column: 1 / -1; height: 9px; margin: 2px 3px 0; border: 1px solid #2E4A75; border-bottom: 0; border-radius: 7px 7px 0 0; }
.ondemand { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.ondemand .pn.od1 { grid-column: 3; justify-self: center; } .ondemand .pn.od2 { grid-column: 4; justify-self: center; }
/* phone and narrow: a numbered list of the same stages, top to bottom */
.map.compact .wires, .map.compact .wlabels, .map.compact .sband, .map.compact .bracket { display: none; }
.map.compact .flowwrap { gap: 14px; }
.map.compact .stages { display: flex; flex-direction: column; gap: 14px; }
.map.compact .stages .stage { position: relative; display: flex; flex-direction: column; gap: 6px; padding-left: 30px; }
.map.compact .stagehead { padding: 0; margin-left: -30px; align-items: center; }
.map.compact .stt { flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.map.compact .stage:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: 24px; bottom: -14px; width: 2px; background: linear-gradient(var(--line3), rgba(42,68,112,.2)); }
.map.compact .pn, .map.compact .pn.chipform { flex-direction: row; justify-self: stretch; align-self: stretch; width: 100%; max-width: none; gap: 12px; margin: 0; padding: 8px 12px 8px 8px; min-height: 52px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.map.compact .pn.sel { border-color: var(--blue); }
.map.compact .pdot { width: 36px; height: 36px; }
.map.compact .ptext { align-items: flex-start; }
.map.compact .psub { white-space: normal; }
.map.compact .lane { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.map.compact .lanehead { padding: 0; }
.map.compact .oversight { order: 3; }
.map.compact .ondemand { order: 4; margin-top: 0; border-top: 0; padding-top: 0; }

/* inspector: what it is doing now, live steps, run history and replay */
.inspsteps { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.colhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.colbtns { margin-left: auto; display: flex; gap: 6px; }
.nowbox { border: 1px solid rgba(76,141,255,.35); background: rgba(76,141,255,.06); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.nowlbl { font-size: 12px; font-weight: 600; color: var(--blue3); }
.nowprog { font-size: 13px; overflow-wrap: anywhere; }
.nowstep { font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; }
.stepscroll { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,13,25,.6); }
.steplist { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 72px 16px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 10px; border-bottom: 1px solid #13213A; font-size: 12px; }
.step:last-child { border-bottom: 0; }
.step .st { color: var(--dim); font-size: 11px; padding-top: 1px; white-space: nowrap; }
.step .sic { color: var(--mute); display: inline-flex; padding-top: 2px; }
.step .stx { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.step .sm { color: var(--ink2); overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; min-width: 0; }
.step.k-start .sic { color: var(--blue3); } .step.k-end .sic { color: var(--green); } .step.k-end .sm { color: var(--mute); }
.step.k-alert { background: rgba(76,141,255,.05); } .step.k-alert .sm { color: var(--ink); font-weight: 600; }
.step.vstep { background: rgba(167,139,250,.07); box-shadow: inset 3px 0 0 var(--violet); } .step.vstep .sm { color: var(--ink); }
.step.k-error { background: rgba(248,113,113,.08); box-shadow: inset 3px 0 0 var(--red); } .step.k-error .sm, .step.k-error .sic { color: #FCA5A5; }
.step.fresh { animation: stepin .7s ease-out; }
.step.hid { display: none; }
.step .sopen { min-height: 0; padding: 0 4px; }
.histlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hrun { width: 100%; display: grid; grid-template-columns: 62px auto minmax(0, 1fr); grid-template-areas: "t p m" "x x x"; gap: 2px 8px; align-items: center; text-align: left; min-height: 44px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 12px; cursor: pointer; }
.hrun .t { grid-area: t; color: var(--dim); font-size: 11px; } .hrun .statepill { grid-area: p; justify-self: start; }
.hmeta { grid-area: m; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hmsg { grid-area: x; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrun:hover { border-color: #2E4A75; } .hrun.on { border-color: var(--blue); background: rgba(76,141,255,.10); } .hrun[disabled] { cursor: default; opacity: .7; }
.runbars .rb.o-loose, .runbars .rb.o-info { background: #2E4A75; }
.replay { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* live activity, grouped by run */
.rungroups { display: flex; flex-direction: column; gap: 8px; }
.rungroup { border: 1px solid var(--line); border-radius: 10px; background: rgba(10,19,34,.6); overflow: hidden; flex-shrink: 0; }
.rungroup.s-running { border-color: rgba(76,141,255,.45); } .rungroup.s-error { border-color: rgba(248,113,113,.5); }
.rghead { width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; padding: 6px 10px; border: 0; background: transparent; color: var(--ink); font-size: 12px; text-align: left; cursor: pointer; }
.rghead:hover { background: #0F1B30; }
.chev { width: 7px; height: 7px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg); margin: 0 3px 3px 1px; transition: transform .15s; flex-shrink: 0; }
.rungroup.closed .chev { transform: rotate(-45deg); margin-bottom: 0; }
.rghead strong { font-size: 12.5px; }
.rungroup.s-running .rghead strong { color: var(--blue3); } .rungroup.s-error .rghead strong { color: var(--red); } .rungroup.s-idle .rghead strong { color: var(--green); }
.rgsum { flex: 1; min-width: 0; color: var(--mute); }
.rgwhen { color: var(--dim); font-size: 11px; }
.rgbody { border-top: 1px solid var(--line); max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.rungroup.closed .rgbody { display: none; }
.feednote { font-size: 12px; color: #FDE68A; } .feednote[hidden] { display: none; }
.state[hidden] { display: none; }
@media (max-width: 1280px) {
  .insp.wide .inspsteps { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
  .rghead { min-height: 44px; }
  .step { grid-template-columns: 64px 16px minmax(0, 1fr); padding: 6px 8px; }
  .insp.wide .inspsteps { grid-row: auto; }
  .stepscroll, .rgbody { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .wires .wf { animation: none; }
}

/* ---------- Approvals that work (M5 fix round, contract P6) ----------
   One idea: the card is a decision. The target is set large (what you are about to act on), the two
   buttons span the card, and a high-impact card (disable an account, isolate a device) carries a red rail
   and asks once more, naming the target, in a red-tinted strip. Live status is a three-step track. */
.apmeta { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.apmeta .infobox { display: flex; flex-direction: column; gap: 4px; }
.warnline { color: #FDE68A; }
.apnotice { font-size: 12px; color: var(--mute); }
.apnotice summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.apnotice ul { margin: 6px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.apbody { display: flex; flex-direction: column; gap: 22px; margin-top: 12px; }
.aptitle { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.aptitle .count { font-size: 12px; font-weight: 600; color: var(--mute); border: 1px solid var(--line2); border-radius: 999px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.g-waiting .aptitle .count { color: var(--amber); border-color: rgba(251,191,36,.45); }
.apcard { position: relative; overflow: hidden; }
.apcard.hi { border-left: 3px solid var(--red); padding-left: 13px; }
.apcard.s-executing { border-color: rgba(76,141,255,.5); }
.apcard.s-failed { border-color: rgba(248,113,113,.45); }
.apcard.s-rejected, .apcard.s-expired { opacity: .82; }
.aptarget { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.aptarget .on { font-size: 12px; color: var(--dim); flex-shrink: 0; }
.aptarget .tv { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { font-size: 10px; font-weight: 700; letter-spacing: .8px; border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; white-space: nowrap; cursor: help; }
.flag.f-red { color: var(--red); } .flag.f-amber { color: var(--amber); } .flag.f-mute { color: var(--mute); }
.apfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.apres { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; }
.apres li.bad { color: #FECACA; }
.aptrack { list-style: none; margin: 2px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; }
.aptrack li { display: flex; align-items: center; gap: 4px; padding-top: 6px; border-top: 3px solid var(--line2); color: var(--faint); }
.aptrack li.past { border-top-color: var(--blue); color: var(--mute); }
.aptrack li.now { border-top-color: var(--blue2); color: var(--ink); font-weight: 600; }
.apcard.s-done .aptrack li.now { border-top-color: var(--green); color: var(--green); }
.aptrack li.now.bad { border-top-color: var(--red); color: var(--red); }
.aptrack .spin { width: 11px; height: 11px; margin-right: 2px; }
.decide { display: flex; flex-direction: column; gap: 6px; }
.decide:empty { display: none; }
.apcard > .decide { margin-top: auto; padding-top: 4px; }
.btnrow { display: flex; gap: 8px; }
.btnrow .btn { flex: 1 1 0; }
.btn.big { min-height: 48px; font-size: 14px; font-weight: 600; }
.apcard .btnrow .btn { align-self: auto; }
.btn.danger { border: 0; color: #fff; background: linear-gradient(135deg, #EF4444, #B91C1C); box-shadow: 0 4px 14px rgba(239,68,68,.3); white-space: normal; text-align: center; overflow-wrap: anywhere; }
.btn.danger:hover { background: linear-gradient(135deg, #F87171, #DC2626); }
.btn.danger.yes { flex-direction: column; gap: 1px; padding: 6px 14px; overflow-wrap: normal; word-break: normal; line-height: 1.25; }
.btn.danger.yes .yv { font-size: 12px; font-weight: 600; opacity: .9; }
.btn.danger.yes .yt { font-size: 15px; font-weight: 700; max-width: 100%; }
.confirm { background: rgba(248,113,113,.07); border: 1px solid rgba(248,113,113,.4); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.confirm .cq { margin: 0; font-size: 13px; color: #FECACA; overflow-wrap: anywhere; }
.decide.compact .btn.big { min-height: 44px; font-size: 13px; }
.nc-l3 { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line2); }
.nc-act { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decidebox { border: 1px solid rgba(251,191,36,.45); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: rgba(251,191,36,.04); }
.decidebox.hi { border-color: rgba(248,113,113,.5); border-left: 3px solid var(--red); }
.decidebox .rec { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .btnrow { flex-direction: column; }
  .btnrow .btn, .needcard .btnrow .btn { width: 100%; min-height: 48px; }
  .aptarget .tv { white-space: normal; overflow-wrap: anywhere; }
  .apnotice summary { min-height: 44px; }
}
@media (forced-colors: active) {
  .flag { border: 1px solid CanvasText; }
  .apcard.hi, .decidebox.hi { border-left: 3px solid CanvasText; }
}
/* ---------- Alert flow markers (checklist 20261021-alert-flow-tokens) ----------
   One idea: each alert is a small token riding the wires. Before the verdict it is a pale blue bead; the
   verdict check paints it (green harmless, amber suspicious, red true positive). The one being investigated
   sits on Triage's dot with a turning ring; the queue waits as hollow beads under the node. Everything else on
   the map stays as it was, so the tokens are the only new motion. */
.mapheadr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fmarkers { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.fmk { position: absolute; left: 0; top: 0; width: 14px; height: 14px; padding: 0; margin: 0; border-radius: 50%; border: 2px solid #9DBDFF; background: #1B3158;
  box-shadow: 0 0 0 2px rgba(7,13,25,.85), 0 0 10px rgba(122,167,255,.45); cursor: pointer; pointer-events: auto; will-change: transform; }
.fmk:not(.moving) { transition: transform .35s ease, opacity .8s ease; }
.fmk::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; }
.fmk.v-fp { border-color: var(--green); background: #0E3B2C; box-shadow: 0 0 0 2px rgba(7,13,25,.85), 0 0 10px rgba(52,211,153,.5); }
.fmk.v-sus { border-color: var(--amber); background: #4A3A0B; box-shadow: 0 0 0 2px rgba(7,13,25,.85), 0 0 10px rgba(251,191,36,.5); }
.fmk.v-tp { border-color: var(--red); background: #4B1717; box-shadow: 0 0 0 2px rgba(7,13,25,.85), 0 0 12px rgba(248,113,113,.65); }
.fmk.st-queued { background: transparent; border-style: dashed; box-shadow: 0 0 0 2px rgba(7,13,25,.85); }
.fmk.inv { width: 18px; height: 18px; margin: -2px 0 0 -2px; background: var(--blue2); border-color: #fff; }
.fmk.inv::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--blue3); border-right-color: var(--blue3); animation: spin 1.1s linear infinite; }
.fmk.watch { outline: 2px solid var(--red); outline-offset: 2px; }
.fmk.fin { opacity: .9; }
.fmk.gone { opacity: 0; pointer-events: none; }
.fmk:hover, .fmk:focus-visible { z-index: 2; box-shadow: 0 0 0 2px rgba(7,13,25,.85), 0 0 0 4px var(--blue3); outline-offset: 3px; }
/* 44 px tap target on the phone list: the 14 px marker is 10 px inside its 2 px border, so -17 px all round */
.fmk.touch::before { inset: -17px; }
.fbub { position: absolute; left: 0; top: 0; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 9px; background: #13213A; border: 1px solid var(--line3); color: var(--ink2);
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: auto; cursor: default; }
.fmtip { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; background: rgba(10,19,34,.98); border: 1px solid var(--line3); border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 12px; color: var(--ink2); display: flex; flex-direction: column; gap: 2px; }
.fmtip[hidden] { display: none; }
.fmtip .ftt { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.fmtip .ftn { color: var(--blue3); overflow-wrap: anywhere; }
.fmtip .ftl { overflow-wrap: anywhere; }
.freplay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 6px 10px; border: 1px solid rgba(167,139,250,.45); border-radius: 10px;
  background: rgba(167,139,250,.08); color: var(--violet2); font-size: 12.5px; }
.freplay[hidden] { display: none; }
.freplay strong { color: var(--ink); }
.map.hasflow .stages .pn:not(.chipform) { margin-bottom: 18px; }
.map.compact.hasflow .stages .pn { margin-bottom: 30px; }
/* Today strip: every alert of the Central day and where it is or ended */
.ftoday { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ftoday[hidden] { display: none; }
.fthead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ftitle { margin: 0; font-size: 14px; font-weight: 600; }
.ftwarn { font-size: 12px; color: #FDE68A; }
.rtable { table-layout: fixed; width: auto; }
.rtable th { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.rtable td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtable td:first-child { max-width: none; }
.tablewrap .rtable td:first-child { white-space: nowrap; }
.rtable tr.ftdone td { color: var(--mute); }
.colgrip { position: absolute; top: 0; right: 0; width: 10px; height: 100%; cursor: col-resize; touch-action: none; }
.colgrip::after { content: ''; position: absolute; top: 20%; bottom: 20%; right: 4px; width: 2px; border-radius: 1px; background: var(--line3); }
.colgrip:hover::after, .colgrip:focus-visible::after { background: var(--blue2); }
.ftopen { padding: 0; min-height: 28px; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.rtable .wl { margin-left: 6px; }
.fdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #9DBDFF; vertical-align: 1px; }
.fdot.v-fp { background: var(--green); } .fdot.v-sus { background: var(--amber); } .fdot.v-tp { background: var(--red); } .fdot.fin { opacity: .6; }
.pill.fv-fp { color: var(--green); background: rgba(52,211,153,.12); } .pill.fv-sus { color: var(--amber); background: rgba(251,191,36,.12); }
.pill.fv-tp { color: var(--red); background: rgba(248,113,113,.13); } .pill.fv-none { color: var(--mute); background: rgba(147,168,200,.12); }
/* F0: an error the agent has run past is grey history, not a red problem */
.acpast { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.pastbox { font-size: 12.5px; color: var(--mute); background: rgba(147,168,200,.06); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
.pastbox strong { color: var(--ink2); font-weight: 600; }
/* F10: a 12-hour Central clock with seconds ("12:40:15 PM") always fits its column */
.step { grid-template-columns: 84px 16px minmax(0, 1fr); }
.evlist li { grid-template-columns: 84px 56px minmax(0, 1fr); }
.hrun { grid-template-columns: 84px auto minmax(0, 1fr); }
.rgwhen { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 760px) {
  .step { grid-template-columns: 80px 16px minmax(0, 1fr); }
  .map.compact .flowwrap { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .fmk, .fmk:not(.moving) { transition: none; }
  .fmk.inv::after { animation: none; border-color: var(--blue3); }
}
@media (forced-colors: active) {
  .fmk { border: 2px solid CanvasText; forced-color-adjust: none; }
}
/* ---------- M1.2 alert filters (queue toolbar, Filters panel, tags, new bar, grouped rows) ---------- */
.qtabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line2); margin: -4px 0 0; }
.qtab { min-height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--mute); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.qtab:hover { color: var(--ink); }
.qtab.on { color: var(--ink); border-bottom-color: var(--blue); }
.qtab .n { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #16253D; color: var(--ink2); }
.qtab.on .n { background: var(--blue); color: var(--ground); }
.qtab.amber .n { color: var(--amber); } .qtab.amber.on .n { background: var(--amber); color: var(--ground); }
.qbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qbar .searchwrap { flex: 1 1 220px; min-width: 0; }
.seglbl { font-size: 11px; color: var(--dim); padding: 0 6px 0 6px; align-self: center; }
.fbtn { min-height: 40px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--ground); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.fbtn:hover { border-color: #2E4A75; }
.fbtn.open { background: #10203A; }
.fbtn.active { border-color: var(--blue); }
.fbtn .n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: var(--ground); }
.fpanel { border: 1px solid var(--line2); border-radius: var(--r-lg); background: var(--panel2); padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.fpanel[hidden] { display: none; }
.fgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.fgroup legend { padding: 0; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.fbody, .fopts { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fsub { font-size: 11px; color: var(--dim); margin-top: 6px; }
.fsub:first-child { margin-top: 0; }
.fopt { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink2); font-size: 13px; cursor: pointer; min-width: 0; }
.fopt:hover { border-color: #2E4A75; }
.fopt.on { border-color: var(--line3); background: #10203A; color: var(--ink); }
.fopt.zero:not(.on) { color: var(--dim); }
.fopt input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--blue); cursor: pointer; }
.fopt .flbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fopt .n { font-size: 12px; color: var(--mute); }
.fdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--gray); }
.fdot.v-tp { background: #FCA5A5; } .fdot.v-suspicious { background: #FCD34D; } .fdot.v-review { background: var(--violet2); } .fdot.v-fp { background: #6EE7B7; } .fdot.v-none { background: var(--ink2); }
.fdot.sv-high { background: var(--red); } .fdot.sv-medium { background: var(--amber); } .fdot.sv-low { background: #60A5FA; } .fdot.sv-informational { background: #64748B; }
.fdot.wlx { background: var(--red); } .fdot.nouser { background: transparent; border: 1px dashed var(--faint); }
.pfind { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 0 10px; height: 36px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--ground); color: var(--dim); }
.pfind:focus-within { border-color: var(--blue); }
.psearch { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 13px; }
.plist { max-height: 280px; overflow-y: auto; }
.fnote { font-size: 12px; color: var(--dim); }
.fnote:empty { display: none; }
.ftags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ftags[hidden] { display: none; }
.ftag { min-height: 30px; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; border: 1px solid var(--line3); border-radius: 999px; background: #10203A; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.ftag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftag svg { color: var(--mute); flex: none; }
.ftag:hover svg { color: var(--ink); }
.newbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line3); border-radius: var(--r); background: #0E1F3D; font-size: 13px; }
.newbar[hidden] { display: none; }
.newdot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: none; }
.newtxt { flex: 1 1 220px; min-width: 0; }
.newbar .btn.on { background: var(--blue); border-color: var(--blue); color: var(--ground); }
.qtools[hidden] { display: none; }
.rgroup { display: flex; flex-direction: column; }
.rghead { margin: 0; padding: 12px 16px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); border-top: 1px solid var(--line); }
.rgroup:first-child .rghead, .rows > .state + .rgroup .rghead { border-top: 0; }
.rghead .n { font-weight: 500; letter-spacing: 0; }
.rglist { display: flex; flex-direction: column; }
.row.isnew { background: #0E1D36; }
.row.isnew:hover { background: #12233F; }
.newtag { font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: var(--ground); flex-shrink: 0; }
.when { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.when .clk { font-size: 12px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.when .age { white-space: nowrap; }
@media (max-width: 760px) {
  .qtab, .fbtn, .fopt, .ftag, .newbar .btn { min-height: 44px; }
  .pfind { height: 44px; }
  .qbar .searchwrap { flex-basis: 100%; }
  .qbar .seg { flex: 1 1 auto; }
  .fbtn { flex: 1 1 auto; justify-content: center; }
  .qtab { padding: 0 10px; }
  .fpanel { grid-template-columns: minmax(0, 1fr); }
  .when { align-items: flex-start; flex-direction: row; gap: 8px; flex-wrap: wrap; }
}
@media (forced-colors: active) {
  .newtag, .ftag, .qtab.on { border: 1px solid CanvasText; }
}

/* ---------- Mission A: Monitoring home, main chat, alert page chat (checklist 20261030-chat-and-home) ---------- */
/* Top bar: "Ask the agent" (Ctrl+K) on every page. Phones use the chat button in the phone bar instead. */
/* Fix round 1 (R6): the bar sticks to the top of the window, so "Ask the agent" stays visible on a long page. Only the
   button takes clicks; the rest of the bar lets them through to the page under it. */
.topbar { display: flex; justify-content: flex-end; align-items: center; min-height: 36px; margin-bottom: -6px; position: sticky; top: 8px; z-index: 25; pointer-events: none; }
.askbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #3B3486; background: rgba(24,20,56,.94); color: var(--violet2); font-size: 13px; cursor: pointer; pointer-events: auto; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.askbtn:hover, .askbtn[aria-expanded="true"] { color: var(--ink); border-color: var(--violet); background: rgba(167,139,250,.18); }
.askbtn kbd { font-family: var(--mono); font-size: 10.5px; color: var(--mute); border: 1px solid var(--line3); border-radius: 5px; padding: 1px 5px; }
body.on-chat .topbar { display: none; }
.askphone { display: none; }
.view[data-view="agents"] > .kpis { flex: none; }

/* Markdown answers: plain page text, Claude-desktop style. Nothing here scrolls except code blocks and wide tables, sideways. */
.md { font-size: 14px; line-height: 1.62; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; }
.md .md-h { margin: 16px 0 6px; line-height: 1.3; color: var(--ink); }
.md h3.md-h { font-size: 18px; font-weight: 650; } .md h4.md-h { font-size: 16px; font-weight: 650; } .md h5.md-h { font-size: 14.5px; font-weight: 650; } .md h6.md-h { font-size: 13px; font-weight: 650; color: var(--ink2); }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; } .md li > ul, .md li > ol { margin: 4px 0 2px; }
.md li > p { margin: 0 0 6px; }
.md strong { font-weight: 650; color: #F1F6FF; }
.md em { font-style: italic; }
.md del { color: var(--dim); }
.md a { color: var(--blue2); text-decoration: underline; text-underline-offset: 2px; }
.md a.alink { font-family: var(--mono); font-size: 12px; text-decoration: none; border-bottom: 1px dashed var(--blue2); overflow-wrap: anywhere; }
.md code.md-code { font-family: var(--mono); font-size: 12.5px; background: #101D33; border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.md pre.md-pre { margin: 0 0 10px; padding: 10px 12px; background: #08111F; border: 1px solid var(--line2); border-radius: 10px; overflow-x: auto; max-width: 100%; }
.md pre.md-pre code { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre; }
.md blockquote.md-quote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--line3); color: var(--ink2); }
.md hr { border: 0; border-top: 1px solid var(--line2); margin: 14px 0; }
.md .mdtable { max-width: 100%; overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--line2); border-radius: 10px; }
.md table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.md th, .md td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.md th { background: #0E1A2F; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.md tbody tr:last-child td { border-bottom: 0; }
.md .al-c { text-align: center; } .md .al-r { text-align: right; }
.vchip { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; border-radius: 6px; padding: 1px 7px; margin: 0 1px; line-height: 1.6; white-space: nowrap; vertical-align: 1px; }

/* One conversation: user turns are right-aligned bubbles, agent turns are page text. */
.chatlog { display: flex; flex-direction: column; min-width: 0; }
.turns { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pendslot { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pendslot:not(:empty) { margin-top: 18px; }
.turn { display: flex; flex-direction: column; gap: 6px; min-width: 0; animation: rise .2s ease-out; }
.turn.user { align-items: flex-end; }
.ububble { max-width: min(78%, 640px); padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: #1E2D52; border: 1px solid #2B3F6E; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.agent { align-items: stretch; }
.tmeta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--faint); min-height: 24px; flex-wrap: wrap; }
.tmeta.amber { color: var(--amber); }
.copybtn { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--dim); font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.turn.agent:hover .copybtn, .turn.agent:focus-within .copybtn, .copybtn:focus-visible { opacity: 1; }
.copybtn:hover { color: var(--ink); border-color: var(--line2); }
@media (hover: none) { .copybtn { opacity: 1; } }
.offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
.ansacts { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px; background: rgba(12,22,40,.6); }
.ansact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ansact .aa-title { flex: 1 1 160px; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.thinking .thinkhead { font-size: 12px; font-weight: 600; color: var(--violet2); margin-bottom: 4px; }
.pendslot .thinking, .alertchat .thinking { align-self: stretch; max-width: 640px; }
.steps li.run { color: var(--ink2); } .steps li.run svg { color: var(--blue2); flex-shrink: 0; } .steps li.bad { color: var(--red); }

/* Composer: grows to about 8 lines, then scrolls inside itself (the only inner scroll on the Chat page). */
.composer2 { display: flex; flex-direction: column; gap: 6px; }
.cbox { display: flex; gap: 8px; align-items: flex-end; padding: 8px; border: 1px solid #34307A; border-radius: 14px; background: var(--panel2); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.cbox:focus-within { border-color: var(--violet); }
.chatin2 { flex: 1; min-width: 0; min-height: 28px; max-height: 196px; padding: 6px 6px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.45; resize: none; overflow-y: auto; outline: 0; }
.chint { font-size: 11px; color: var(--faint); padding: 0 4px; }
/* Fix round 1 (R8): the placeholder is one line, never clipped mid-word on a phone. */
.chatin2::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ansact > .resp { flex-basis: 100%; }
.composer2 .resp:empty { display: none; }
.jumpbtn { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line3); background: #13213A; color: var(--ink); font-size: 12px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.jumpbtn[hidden] { display: none; }
.prompts.big { padding: 0; justify-content: center; }
.chempty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8vh 12px 18px; }
.chempty h2 { font-size: 20px; font-weight: 600; } .chempty p { margin: 0; max-width: 56ch; color: var(--mute); font-size: 13px; }
.aibadge.lg { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }

/* The Chat tab: one page scroll (the window), the input pinned to the bottom of the window. */
.view[data-view="chat"] { min-height: calc(100vh - 60px); gap: 10px; }
.chathead2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chathead2 h1 { font-size: 20px; font-weight: 600; }
.chatui.page { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 860px; margin: 0 auto; min-width: 0; }
.chatui.page .chatlog { flex: 1; padding: 6px 2px 18px; }
.chatui.page .composer2 { position: sticky; bottom: 0; z-index: 5; padding: 10px 0 14px; background: linear-gradient(180deg, rgba(7,13,25,0) 0%, var(--ground) 26%); }
body.on-chat main { padding-bottom: 0; }

/* The slide-in panel: same conversation, on top of any page, never modal. Its message list is its only scroll. */
.chatpanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 45; display: flex; flex-direction: column; background: #0B1424; border-left: 1px solid #2A2F5A; box-shadow: -18px 0 40px rgba(0,0,0,.45); transform: translateX(104%); transition: transform .2s ease-out; }
.chatpanel.open { transform: none; }
.chatpanel[hidden] { display: none; }
.cphead { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-bottom: 1px solid #1E2547; }
.cphead .cpt { flex: 1; min-width: 0; } .cphead h2 { font-size: 14px; font-weight: 600; } .cphead .cs { font-size: 11px; color: var(--violet2); }
.chatui.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chatui.panel .chatlog { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 18px; }
.chatui.panel .composer2 { padding: 8px 12px 12px; border-top: 1px solid #1E2547; }
.chatui.panel .chempty { padding: 4vh 8px 12px; }
.chatui.panel .ububble { max-width: 88%; }

/* The alert page: the list is hidden while an alert is open; one page scroll, no inner scroll box. */
body.detail-open .view[data-view="queue"] .qlist, body.detail-open .view[data-view="queue"] .stripbox, body.detail-open .view[data-view="queue"] .qhead { display: none; }
.view[data-view="queue"] .qdetail { display: none; }
body.detail-open .view[data-view="queue"] .qgrid { display: block; }
body.detail-open .view[data-view="queue"] .qdetail { display: flex; flex-direction: column; position: static; max-width: 920px; width: 100%; margin: 0 auto; max-height: none; overflow: visible; min-width: 0; }
body.detail-open .view[data-view="queue"] .backbtn { display: inline-flex; }
.dtop { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.alertchat { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line2); min-width: 0; }
.alertchat[hidden] { display: none; }
.achead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.achead h3 { font-size: 16px; font-weight: 600; }
.alertchat .prompts { padding: 0; }
.composer2.inpage { position: sticky; bottom: 0; z-index: 5; padding: 8px 0 12px; background: linear-gradient(180deg, rgba(12,22,40,0) 0%, var(--panel) 30%); }

@media (max-width: 899px) {
  body.detail-open .view[data-view="queue"] .qdetail { position: static; inset: auto; z-index: auto; border-radius: var(--r-lg); border: 1px solid var(--line); }
  body.detail-open.on-queue { overflow: visible; }
}
@media (max-width: 760px) {
  .topbar { display: none; }
  .askphone { display: inline-flex; }
  .chatpanel { width: 100vw; border-left: 0; }
  .ububble { max-width: 88%; }
  .view[data-view="chat"] { min-height: calc(100vh - 66px); }
  .copybtn, .jumpbtn { min-height: 44px; }
  .ansact .btn { flex: 1 1 auto; }
  .chathead2 .dim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chatpanel { transition: none; }
}
@media (forced-colors: active) {
  .vchip, .ububble, .cbox { border: 1px solid CanvasText; }
}

/* ---------- P2: People, Learned and "How this is worked out" (checklist 20261030-p2-people-learned) ---------- */
/* The drop-down floats over the page (absolute), so opening it never moves anything (H3). */
.kpiwrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpiwrap .kpi { width: 100%; }
.kpinote { font-size: 11px; color: var(--amber); text-align: left; padding: 2px 0; min-height: 22px; }
.how { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; }
.how.right { align-items: flex-end; margin-left: auto; }
.howbtn { background: none; border: 0; color: var(--dim); font: inherit; font-size: 11px; padding: 2px 0; min-height: 24px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.howbtn::after { content: ' \25BE'; }
.howbtn[aria-expanded="true"]::after { content: ' \25B4'; }
.howbtn:hover, .howbtn[aria-expanded="true"] { color: var(--blue2); }
.howbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.howpop { position: absolute; top: 100%; left: 0; z-index: 45; width: min(360px, calc(100vw - 32px)); background: #0E1A30; border: 1px solid var(--line3); border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 12px; color: var(--ink2); line-height: 1.45; text-align: left; white-space: normal; }
.how.right .howpop { left: auto; right: 0; }
.howpop[hidden] { display: none; }
.howpop { scroll-margin-bottom: 16px; }   /* G12: room under a drop-down scrolled into view */
.howpop ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.howrow { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.chhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pplwrap, .ppldetail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pplwrap[hidden], .ppldetail[hidden] { display: none; }
.ppldetail .backbtn { display: inline-flex; }
.pplgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 14px; align-items: start; }
.pplnotes { display: flex; flex-direction: column; gap: 6px; }
.pplmeta { font-size: 12px; }
.pname { text-align: left; padding: 2px 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num2 { font-variant-numeric: tabular-nums; }
.pwrap .rtable td.tiercell { white-space: normal; }
.rtable tr.tier-close td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.rtable tr.tier-watch td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.tierb { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px; border: 1px solid; border-radius: 4px; padding: 1px 6px; white-space: nowrap; margin: 1px 6px 1px 0; cursor: help; }
.tierb.t-red { color: var(--red); border-color: rgba(248,113,113,.55); background: rgba(248,113,113,.08); }
.tierb.t-amber { color: var(--amber); border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.06); }
.tierb.t-wl { color: #FCA5A5; border-style: dashed; border-color: rgba(248,113,113,.55); }
.tierb:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.chglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chg { border-left: 3px solid var(--line3); padding-left: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.chg.up { border-left-color: var(--red); }
.chg.down { border-left-color: var(--green); }
.chg1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chgwho { text-align: left; padding: 2px 0; }
.chgwhy summary { cursor: pointer; font-size: 12px; color: var(--mute); }
.chgwhy ul { margin: 4px 0 0; padding-left: 16px; }
.pphead h1 { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ppmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ppline { margin: 0; font-size: 13px; color: var(--ink2); }
.ppline.strong { font-weight: 600; color: var(--ink); }
.whylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.whylist li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.whylist .linkbtn { text-align: left; }
.pptlhead { justify-content: flex-start; }
.plinks { display: inline-flex; gap: 4px 10px; flex-wrap: wrap; }
.plink { display: inline-flex; align-items: center; gap: 2px; padding: 2px 0; text-align: left; }
.lwrap .rtable td, .tablewrap.lwrap .rtable td:first-child { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.lwhat summary { cursor: pointer; }
.lwhat p { margin: 6px 0 0; }
.lref { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.tag.src-teach { color: var(--blue3); border-color: #24406A; }
.tag.src-feedback { color: var(--amber); border-color: rgba(251,191,36,.4); }
.tag.src-tuning { color: var(--green); border-color: rgba(52,211,153,.4); }
@media (max-width: 1100px) { .pplgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .howbtn, .plink, .pname, .chgwho { min-height: 44px; } .how.right { margin-left: 0; align-items: flex-start; } .how.right .howpop { left: 0; right: auto; } }
@media (forced-colors: active) { .tierb, .howpop { border: 1px solid CanvasText; } }

/* P2 fix round 1 (G6): the side column holds Recent tier changes and Alerts with no person. */
.pplsidecol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nplist li { font-size: 12px; }

/* P2 fix round 1 (G10): the email under the name in the People list. */
.pwrap .rtable td.pcell { white-space: normal; }
.pcell .pname { display: block; }
.pmail { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* P3 risk score (checklist 20261030-p3-risk-score): the Riskiest people tile, the People Score column, the score panel
   and the trend. Up = risk rising (red), down = falling (green), flat = grey, no comparison point = dim. */
.risklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.riskrow { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-size: 13px; }
.riskrow:hover { background: #101D33; border-color: var(--line2); }
.riskrow:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.rrank { width: 18px; flex-shrink: 0; color: var(--mute); font-variant-numeric: tabular-nums; text-align: right; }
.rwho { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.rname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }
.rmail { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.riskrow .tierb { cursor: inherit; margin: 0; }
.rscore { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.rarrow { display: inline-block; width: 14px; text-align: center; font-size: 11px; cursor: help; }
.rarrow.r-up { color: var(--red); } .rarrow.r-down { color: var(--green); } .rarrow.r-flat { color: var(--mute); } .rarrow.r-nodata { color: var(--dim); }
.rarrow:focus-visible, .rspts:focus-visible, .riskns span:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.riskfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.scorecell { cursor: help; }
.rshead { display: flex; align-items: baseline; gap: 10px 14px; flex-wrap: wrap; }
.rsbig { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.rshead .rarrow { font-size: 16px; width: auto; }
.rstier { font-size: 12px; color: var(--ink2); }
.rsrow { cursor: help; }
.rspts { font-weight: 600; cursor: help; }
.riskns { font-size: 12px; color: var(--mute); display: flex; flex-direction: column; gap: 4px; }
.riskns > span { cursor: help; align-self: flex-start; }
.rtscroll { overflow-x: auto; }
.rtchart { display: flex; align-items: stretch; gap: 6px; height: 190px; min-width: 0; padding-top: 4px; }
.rtcol { flex: 1 1 0; min-width: 46px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.rtval { font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }
.rtcol.nodata .rtval { color: var(--dim); font-style: italic; }
.rtbarwrap { flex: 1 1 auto; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line2); }
.rtbar { width: 100%; min-height: 2px; background: var(--blue); border-radius: 4px 4px 0 0; }
.rtcol.now .rtbar { background: var(--blue2); }
.rtnd { width: 100%; height: 100%; border: 1px dashed var(--line3); border-bottom: 0; border-radius: 4px 4px 0 0; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(147,168,200,.08) 6px 12px); }
.rtlbl { font-size: 11px; text-align: center; color: var(--mute); white-space: nowrap; }
.rtcol.now .rtlbl { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .rmail { display: none; } .rtcol { min-width: 40px; } }
@media (forced-colors: active) { .rtbar { background: CanvasText; } .rtnd { border: 1px dashed CanvasText; } .riskrow { border: 1px solid CanvasText; } }

/* P4 hub (checklist 20261102-p4-hub): Threats page, article page, paste box, the reported-email line and box, the Monitoring
   Threats status line, and the P3 polish "closed as ... by" note. Answer chips: match = red (something in our data), no match =
   green, not fully checked = amber, needs a permission = violet, nothing to check = grey. Long values wrap, never widen the page. */
.tchip { display: inline-block; font-size: 11px; font-weight: 600; border: 1px solid var(--line2); border-radius: 6px; padding: 1px 7px; color: var(--mute); white-space: normal; overflow-wrap: anywhere; cursor: help; }
.tchip.t-match { color: var(--red); border-color: rgba(248,113,113,.55); background: rgba(248,113,113,.08); }
.tchip.t-nomatch { color: var(--green); border-color: rgba(52,211,153,.45); }
.tchip.t-partial { color: var(--amber); border-color: rgba(251,191,36,.45); }
.tchip.t-perm { color: var(--violet2); border-color: rgba(167,139,250,.5); }
.tchip.t-none { color: var(--mute); }
.twrap, .tdetail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.twrap[hidden], .tdetail[hidden] { display: none; }
.tdetail > .panel, .tdetail > .ttags { min-width: 0; }
.pwrap .rtable tr.thit td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tdtitle { overflow-wrap: anywhere; }
.ttags { display: flex; flex-wrap: wrap; gap: 6px; }
.ttags .tag { white-space: normal; overflow-wrap: anywhere; }
.tansline { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; }
.tsum { margin: 0 0 8px; color: var(--ink2); overflow-wrap: anywhere; white-space: pre-line; }
.tcheck { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 8px; }
.tcheck.hit { border-color: rgba(248,113,113,.5); }
.tcheck.s-could-not-run { border-style: dashed; }
.tchead { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.tcdesc { margin: 0; overflow-wrap: anywhere; }
.tcres { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; font-size: 13px; overflow-wrap: anywhere; }
.tcheck.hit .tcline { color: var(--red); font-weight: 600; }
.tcheck.s-could-not-run .tcline { color: var(--amber); }
.tents { font-size: 12px; min-width: 0; }
.tentw { color: var(--mute); font-weight: 600; }
.tents ul { margin: 2px 0 0; padding-left: 18px; }
.tents li { overflow-wrap: anywhere; }
.tentn { font-family: var(--mono); }
.tkql summary { cursor: pointer; font-size: 12px; color: var(--blue2); min-height: 28px; }
.tpre { margin: 6px 0 0; max-height: 360px; overflow: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; white-space: pre; }
.tind { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 12px; }
.tind li { display: flex; gap: 8px; align-items: baseline; min-width: 0; font-size: 12px; }
.tindt { color: var(--mute); flex-shrink: 0; min-width: 70px; }
.tindv { font-family: var(--mono); overflow-wrap: anywhere; word-break: break-all; min-width: 0; }
.tpaste { display: flex; flex-direction: column; gap: 8px; }
.tpaste .dim { margin: 0; }
.tplabel { width: 100%; min-height: 40px; background: var(--panel2); color: var(--ink); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font: inherit; }
.tpastein { width: 100%; min-height: 120px; resize: vertical; background: var(--panel2); color: var(--ink); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; }
.tpbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tpbar .btn { min-height: 36px; }
.tpresp { font-size: 12px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.okline { font-size: 12px; color: var(--green); }
.tunrec { margin: 0; padding-left: 18px; font-family: var(--mono); font-size: 11px; color: var(--mute); }
.tunrec li { overflow-wrap: anywhere; }
.tpasted { display: flex; flex-direction: column; gap: 10px; }
.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.tpl.wait { border-style: dashed; }
.tplname { font-weight: 600; }
.tplmore summary { cursor: pointer; font-size: 12px; color: var(--blue2); min-height: 28px; }
.threatline { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); padding: 2px 4px; }
.tsdot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); flex-shrink: 0; }
.tsdot.t-match { background: var(--red); } .tsdot.t-ok { background: var(--green); }
.r3 { display: flex; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--mute); min-width: 0; flex-wrap: wrap; }
.r3 > span { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrep { color: var(--ink2); }
.fam.famrep { color: var(--violet2); font-weight: 600; }
.repbox .panelhead { margin: 0; }
.repdl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.repdl dt { color: var(--mute); }
.repdl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.replist { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink2); }
.replist li { overflow-wrap: anywhere; }
.vcell .closednote { display: block; font-size: 11px; white-space: normal; margin-top: 2px; }
.pwrap .rtable td.vcell, .tablewrap .rtable td.vcell { white-space: normal; }
.riskfp { font-size: 12px; }
.riskfp .closednote { margin-left: 4px; }
.tmob { display: none; }
@media (max-width: 760px) { .tmob { display: block; margin-top: 4px; } }
@media (max-width: 760px) { .tkql summary, .tplmore summary, .threatline .linkbtn { min-height: 44px; } .repdl { grid-template-columns: minmax(0, 1fr); } .repdl dd { margin-bottom: 4px; } }
@media (forced-colors: active) { .tchip, .tcheck, .tpl { border: 1px solid CanvasText; } .tsdot { background: CanvasText; } }
