/* Research OS: design tokens, light and dark, LTR and RTL */
:root {
  --bg: #f4f6fb; --bg2: #eef1f8; --surface: #ffffff; --surface2: #f8f9fd; --ink: #1b2336; --ink2: #3b4560; --muted: #6b7489; --line: #e3e7f0;
  --primary: #5b4bdb; --primary-ink: #ffffff; --primary-soft: #ecebff; --accent: #0ea5a4; --accent-soft: #dcf5f4;
  --ok: #16a34a; --ok-soft: #dcfce7; --run: #2563eb; --run-soft: #dbeafe; --warn: #d97706; --warn-soft: #fef3c7; --warn-ink: #b45309; --bad: #e11d48; --bad-soft: #ffe4e6;
  --stale: #7c3aed; --stale-soft: #ede9fe; --ok-ink: #15803d; --run-ink: #1d4ed8; --bad-ink: #be123c; --stale-ink: #6d28d9; --idle: #94a3b8; --idle-soft: #f1f5f9;
  --shadow: 0 1px 2px rgba(20, 28, 50, .06), 0 4px 16px rgba(20, 28, 50, .06); --shadow-lg: 0 10px 40px rgba(20, 28, 50, .16);
  --r: 14px; --r-sm: 9px; --side: 250px;
  --font: "Inter", "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", Consolas, monospace;
  --paper: "Times New Roman", "Tinos", "Liberation Serif", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0f1320; --bg2: #141a2b; --surface: #171e31; --surface2: #1c2439; --ink: #e8ecf6; --ink2: #c3cbe0; --muted: #8e98b3; --line: #29324b;
  --primary: #8b7cff; --primary-soft: #2a2552; --accent: #2dd4bf; --accent-soft: #123a38; --ok-soft: #0f3321; --run-soft: #13254d; --warn-soft: #3a2a0c; --warn-ink: #fbbf24; --ok-ink: #4ade80; --run-ink: #60a5fa; --bad-ink: #fb7185; --stale-ink: #a78bfa; --bad-soft: #3d1320; --stale-soft: #2a1d4a; --idle-soft: #1e2638;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; --bg: #0f1320; --bg2: #141a2b; --surface: #171e31; --surface2: #1c2439; --ink: #e8ecf6; --ink2: #c3cbe0; --muted: #8e98b3; --line: #29324b;
  --primary: #8b7cff; --primary-soft: #2a2552; --accent: #2dd4bf; --accent-soft: #123a38; --ok-soft: #0f3321; --run-soft: #13254d; --warn-soft: #3a2a0c; --warn-ink: #fbbf24; --ok-ink: #4ade80; --run-ink: #60a5fa; --bad-ink: #fb7185; --stale-ink: #a78bfa; --bad-soft: #3d1320; --stale-soft: #2a1d4a; --idle-soft: #1e2638;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); }
[dir="rtl"] { --font: "Vazirmatn", "Inter", system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
:root { color-scheme: light; --card: var(--surface); --soft: var(--primary-soft); --pri: var(--primary); }   /* old names, so they follow the theme (dark mode) */
/* every list menu (select) follows the theme, so its text is readable in dark mode and on phones (Milad, 6 Oct 2026) */
select:not(.input) { background-color: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; min-height: 32px; }
select option { background-color: var(--surface); color: var(--ink); }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hide { display: none !important; }

/* shell */
/* plan 12.1: the app is the height of the window; the page, the menu and the right panel each scroll inside themselves */
.shell { display: grid; grid-template-columns: var(--lp, var(--side)) minmax(0, 1fr) var(--rp, 0px); height: 100vh; height: 100dvh; overflow: hidden; }
.shell:not(.lp-pinned) { --lp: 0px; }
.shell.rp-pinned { --rp: 340px; }
.shell > .side { grid-column: 1; grid-row: 1; } .shell > .main { grid-column: 2; grid-row: 1; } .shell > .rpanel { grid-column: 3; grid-row: 1; }
.side { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
/* plan 12.3: panels that hide by themselves, a tab at the page edge, a pin */
.edge-tab { position: fixed; top: 50%; z-index: 60; transform: translateY(-50%); border: 1px solid var(--line); background: var(--surface); color: var(--ink2); box-shadow: var(--shadow);
  width: 26px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 14px; padding: 6px 0; }
.edge-left { inset-inline-start: 0; border-start-start-radius: 0; border-end-start-radius: 0; border-radius: 0 10px 10px 0; }
.edge-right { inset-inline-end: 0; border-radius: 10px 0 0 10px; }
[dir="rtl"] .edge-left { border-radius: 10px 0 0 10px; } [dir="rtl"] .edge-right { border-radius: 0 10px 10px 0; }
.shell.lp-pinned .edge-left, .shell.lp-open .edge-left, .shell.rp-pinned .edge-right, .shell.rp-open .edge-right { display: none; }
.edge-count { background: var(--bad); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 5px; line-height: 16px; }
.pin-btn { opacity: .5; filter: grayscale(1); } .pin-btn.on { opacity: 1; filter: none; }
.brand-wrap { position: relative; } .brand-wrap > .pin-btn { position: absolute; top: 0; inset-inline-end: 0; width: 30px; height: 30px; font-size: 13px; }
.shell:not(.lp-pinned) > .side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: var(--side); z-index: 70; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.18); }
[dir="rtl"] .shell:not(.lp-pinned) > .side { transform: translateX(105%); }
.shell.lp-open > .side { transform: none !important; }
.rpanel { background: var(--surface); border-inline-start: 1px solid var(--line); height: 100vh; height: 100dvh; overflow-y: auto; padding: 14px 14px 30px; min-width: 0; }
.shell:not(.rp-pinned) > .rpanel { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(92vw, 360px); z-index: 70; transform: translateX(105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.18); }
[dir="rtl"] .shell:not(.rp-pinned) > .rpanel { transform: translateX(-105%); }
.shell.rp-open > .rpanel { transform: none !important; }
.rp-head { position: sticky; top: -14px; background: var(--surface); padding: 4px 0 10px; z-index: 2; gap: 6px; }
.rp-head h2 { font-size: 16px; }
.rp-list { display: flex; flex-direction: column; gap: 8px; }
.rp-item { display: block; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface2); }
.rp-item:hover { border-color: var(--primary); }
.rp-title { font-weight: 600; font-size: 13.5px; margin-top: 4px; overflow-wrap: break-word; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* plan 12.1: every block has a set size and scrolls inside its own frame; long lists are paged */
.content .card:not(.flat):not(.no-frame) { max-height: calc(100dvh - 150px); overflow: auto; }
.pager .frame { max-height: min(62dvh, 760px); overflow: auto; }
.pager-bar { justify-content: center; margin-top: 8px; gap: 12px; }
.frame-box { max-height: min(60dvh, 700px); overflow: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: conic-gradient(from 200deg, #5b4bdb, #0ea5a4, #f59e0b, #5b4bdb); display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 4px 14px rgba(91,75,219,.35); }
.brand b { font-size: 15.5px; }
.nav-group { margin: 12px 0 4px; padding: 0 10px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
[dir="rtl"] .nav-group { letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; border-radius: 10px; color: var(--ink2); font-weight: 520; }
.nav a:hover { background: var(--bg2); }
.nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav a .ico { width: 20px; text-align: center; opacity: .9; }
.nav a .count { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.nav .sub a { padding-inline-start: 38px; font-size: 13.5px; }
.main { min-width: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; gap: 12px; align-items: center; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 9px 14px 9px 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
[dir="rtl"] .search input { padding: 9px 36px 9px 14px; }
.search .s-ico { position: absolute; inset-inline-start: 13px; top: 9px; color: var(--muted); }
.search .results { position: absolute; top: 44px; inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 420px; overflow: auto; }
.search .results a { display: block; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.search .results a:hover { background: var(--bg2); }
.content { padding: 22px 26px 60px; max-width: 1500px; width: 100%; }
.page-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.purpose { color: var(--muted); margin-top: 4px; max-width: 860px; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: transform .06s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled], .btn.busy { opacity: .65; cursor: progress; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
.btn-err { color: var(--bad); font-size: 12.5px; margin-top: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.icon-btn .dot { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 5px; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-weight: 600; font-size: 13.5px; }
.field .req { color: var(--bad); margin-inline-start: 3px; }
.field .hint { color: var(--muted); font-size: 12.5px; }
.input, select.input, textarea.input { border: 1px solid var(--line); background: var(--surface); padding: 9px 12px; border-radius: 10px; width: 100%; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--idle); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 18px; height: 18px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span:before { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + span:before { transform: translateX(-18px); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card.flat { box-shadow: none; }
.card h2 + .muted { margin-top: 2px; }
.card-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--idle-soft); color: var(--ink2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); } .pill.run { background: var(--run-soft); color: var(--run-ink); } .pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); } .pill.stale { background: var(--stale-soft); color: var(--stale-ink); } .pill.pri { background: var(--primary-soft); color: var(--primary); }
.sev-FATAL { background: var(--bad); color: #fff; } .sev-MAJOR { background: var(--bad-soft); color: var(--bad-ink); } .sev-MINOR { background: var(--warn-soft); color: var(--warn-ink); } .sev-NOTE { background: var(--idle-soft); color: var(--muted); }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 22px; }
.bar { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; }
.stepper { display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.stepper .st { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stepper .st i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: var(--bg2); color: var(--muted); }
.stepper .st.done i { background: var(--ok); color: #fff; } .stepper .st.now i { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); } .stepper .st.now { color: var(--ink); font-weight: 650; }
.stepper .sep { width: 26px; height: 2px; background: var(--line); margin: 0 6px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 120px; height: 90px; margin-bottom: 8px; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--bg2), var(--surface2), var(--bg2)); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 8px; height: 14px; margin: 8px 0; }
@keyframes sh { to { background-position: -200% 0; } }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; overflow-x: auto; }
.tabs a { padding: 9px 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a.off { opacity: .45; cursor: not-allowed; }
.tabs a .n { background: var(--bg2); border-radius: 99px; padding: 0 6px; font-size: 11px; margin-inline-start: 4px; }

/* tooltip */
.tip { position: fixed; z-index: 1000; max-width: 320px; background: #1b2336; color: #f4f6fb; padding: 8px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.45; pointer-events: none; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }

/* toast */
.toasts { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 900; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--primary); box-shadow: var(--shadow-lg); border-radius: 12px; padding: 11px 14px; max-width: 380px; animation: up .2s ease; }
.toast.bad { border-inline-start-color: var(--bad); } .toast.ok { border-inline-start-color: var(--ok); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 20, 35, .28); z-index: 60; animation: fade .15s; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 96vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg); overflow-y: auto; padding: 22px; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
[dir="rtl"] .drawer { animation-name: slider; } @keyframes slider { from { transform: translateX(-30px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.drawer .sec { margin-top: 18px; }
.drawer .sec h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
[dir="rtl"] .drawer .sec h3 { letter-spacing: 0; }
details.tech summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-top: 18px; }
pre.code { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-family: var(--mono); font-size: 12px; max-height: 420px; direction: ltr; text-align: left; }

/* graphs */
.graph-wrap { position: relative; background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
.graph-wrap svg { display: block; }
.graph-wrap { direction: ltr; }
.gnode text { unicode-bidi: plaintext; }
.gnode { cursor: pointer; }
.gnode rect.box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; rx: 12; transition: stroke .2s; filter: drop-shadow(0 2px 4px rgba(20,28,50,.08)); }
.gnode:hover rect.box { stroke: var(--primary); }
.gnode text { fill: var(--ink); font-size: 12.5px; font-family: var(--font); }
.gnode text.sub { fill: var(--muted); font-size: 11px; }
.gnode.s-done rect.box { stroke: var(--ok); } .gnode.s-running rect.box, .gnode.s-queued rect.box { stroke: var(--run); stroke-width: 2.5; }
.gnode.s-repairing rect.box { stroke: var(--warn); stroke-width: 2.5; } .gnode.s-needs_you rect.box { stroke: var(--bad); stroke-width: 2.5; }
.gnode.s-stale rect.box { stroke: var(--stale); stroke-dasharray: 5 3; } .gnode.s-blocked rect.box { stroke: var(--idle); stroke-dasharray: 3 3; } .gnode.s-skipped { opacity: .55; }
.gnode.s-running rect.box, .gnode.s-repairing rect.box { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { stroke-opacity: .35; } }
.gnode .badge { font-size: 11px; font-weight: 700; }
.gedge { fill: none; stroke: #b8c0d4; stroke-width: 1.6; }
.gedge.k-evidence { stroke: #0ea5a4; } .gedge.k-decision { stroke: #d97706; } .gedge.k-feedback { stroke: #e11d48; stroke-dasharray: 5 4; } .gedge.k-data { stroke: #2563eb; } .gedge.k-artifact { stroke: #7c3aed; } .gedge.k-branch { stroke: #16a34a; stroke-dasharray: 2 4; }
.gedge.shared { stroke-dasharray: 6 5; stroke: var(--primary); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 2px solid; }

/* paper tables */
.paper { font-family: var(--paper); color: var(--ink); background: var(--surface); padding: 6px 2px; overflow-x: auto; direction: ltr; }
.paper .cap { text-align: center; font-size: 15px; margin: 4px 0 10px; }
.paper table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.paper th, .paper td { padding: 1px 5px; text-align: center; white-space: nowrap; }
.paper thead tr:first-child th { border-top: 1.6px solid var(--ink); padding-top: 5px; }
.paper thead tr:last-child th { border-bottom: 1px solid var(--ink); padding-bottom: 5px; font-weight: 500; }
.paper tbody tr.panel td { text-align: left; font-style: italic; padding-top: 8px; }
.paper tbody tr.se td { color: var(--ink2); padding-bottom: 3px; }
.paper tbody tr:last-child td { border-bottom: 1.6px solid var(--ink); }
.paper td.lab { text-align: left; font-weight: 600; }
.paper td.diff { color: var(--bad); }
.paper td.na { }
.paper td.same { color: var(--ok); }
.paper td.changed { background: rgba(245, 158, 11, .2); }
.paper tr.hdr th { font-weight: 500; padding: 2px 5px; }
.paper tbody tr.hdr th { border-bottom: 1px solid var(--line); }
.paper th.lab { text-align: left; }
.paper td.close { color: var(--warn, #b45309); }
.paper td.missing .nb { font-size: 10px; color: var(--muted, #6b7280); font-style: italic; font-family: var(--font); }
.paper tbody tr td.diff { color: var(--bad); } .paper tbody tr td.close { color: var(--warn, #b45309); } .paper tbody tr td.same { color: var(--ok); }
.paper td .pv { font-size: 10px; line-height: 1.1; color: var(--muted, #6b7280); }
.paper tbody tr.stat td { padding-top: 1px; }
.paper .notes { font-size: 11.5px; margin-top: 6px; text-align: left; color: var(--ink2); }
.paper sup { font-size: 9px; }
.paper.plain table { font-family: var(--font); }
.orig-box { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 8px; opacity: .92; }
.orig-head { font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 4px; }
.check-line { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }

/* verdict */
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; }
.verdict.worked { background: var(--ok-soft); } .verdict.partial { background: var(--warn-soft); } .verdict.failed { background: var(--bad-soft); }
.verdict .big { font-size: 20px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 600; }
ul.clean { margin: 0; padding-inline-start: 18px; }
ul.clean li { margin: 4px 0; }
.timeline { position: relative; }
.timeline .ev { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline .ev .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--bg2); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:hover td { background: var(--surface2); }
.figure img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.figure figcaption { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.gap-table td.done-no { color: var(--bad); font-weight: 700; } .gap-table td.done-partly { color: var(--warn); font-weight: 700; } .gap-table td.done-yes { color: var(--ok); font-weight: 700; }
.radar { display: flex; gap: 8px; }
.radar span { padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.radar .s { background: var(--ok-soft); color: var(--ok-ink); } .radar .m { background: var(--warn-soft); color: var(--warn-ink); } .radar .c { background: var(--bad-soft); color: var(--bad-ink); }
.hero { background: linear-gradient(120deg, var(--primary-soft), var(--accent-soft)); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; position: relative; overflow: hidden; }
.hero:after { content: ""; position: absolute; width: 220px; height: 220px; inset-inline-end: -60px; top: -80px; background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%); }
.proj-card { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.proj-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--idle); }
.live-dot.done { background: var(--ok); } .live-dot.running { background: var(--run); animation: pulse2 1.2s infinite; } .live-dot.needs_you { background: var(--bad); } .live-dot.waiting { background: var(--idle); } .live-dot.idle { background: var(--idle); }
@keyframes pulse2 { 50% { opacity: .35; } }
.code-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.code-split > div { min-width: 0; }
.m-only { display: none !important; }
.m-scrim { display: none; }
.back-bar { display: none; }
.nav a, .proj-gear, .back-bar button { touch-action: manipulation; }
/* phones and tablets (7 Oct 2026): header on top, menu as a drawer, content full width, wide things scroll inside their card */
@media (max-width: 1100px) {
  .m-only { display: inline-flex !important; }
  .m-only.hide { display: none !important; }
  .shell { grid-template-columns: 1fr; } .shell > .main { grid-column: 1; }
  .side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 320px); height: 100dvh; z-index: 70; transform: translateX(-105%);
    transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); padding-top: max(16px, env(safe-area-inset-top)); }
  [dir="rtl"] .side { transform: translateX(105%); }
  .shell.menu-open .side { transform: none; }
  .m-scrim { display: block; position: fixed; inset: 0; background: rgba(15,15,25,.38); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .shell.menu-open .m-scrim { opacity: 1; pointer-events: auto; }
  html.no-scroll, html.no-scroll body { overflow: hidden; }
  .top { padding: 8px 10px; gap: 8px; flex-wrap: wrap; padding-top: max(8px, env(safe-area-inset-top)); }
  .top .search { order: 10; flex: 1 0 100%; max-width: none; }
  .top .icon-btn { width: 40px; height: 40px; flex: none; }
  .top .ai-btn { width: auto; padding: 0 10px; }
  .m-brand .logo { width: 32px; height: 32px; border-radius: 9px; background: conic-gradient(from 200deg, #5b4bdb, #0ea5a4, #f59e0b, #5b4bdb); display: grid; place-items: center; color: #fff; font-weight: 800; }
  .content { padding: 14px 12px 70px; }
  /* back (Milad, 6 Oct 2026): only when there is a page to go back to, one tap, one page back; large enough for a thumb */
  .back-bar:not(.hide) { display: block; padding: 10px 12px 0; }
  .back-bar button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 0 16px 0 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
  .back-bar button .arr { font-size: 22px; line-height: 1; }
  .back-bar button .to { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink2); }
  .code-split { grid-template-columns: 1fr; }
  .card { overflow-x: auto; }
  .tabs { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .tabs a { scroll-snap-align: start; }
  .page-head { flex-wrap: wrap; }
  .row { flex-wrap: wrap; }
  .btn { min-height: 40px; }
  table.list { min-width: 520px; }
  input, select, textarea { font-size: 16px; }   /* iOS zooms into smaller fields */
  .content.page-in { animation: page-in .2s ease-out; }
}
@media (max-width: 1100px) {
  .shell { --lp: 0px !important; --rp: 0px !important; }
  .edge-left, .brand-wrap > .pin-btn, .rpanel .pin-btn { display: none !important; }
  .shell > .rpanel { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(92vw, 360px); z-index: 72; transform: translateX(105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  [dir="rtl"] .shell > .rpanel { transform: translateX(-105%); }
  .shell.rp-open > .rpanel { transform: none !important; }
  .shell.rp-pinned .edge-right { display: flex; }
  .shell.rp-open .m-scrim { opacity: 1; pointer-events: auto; }
  .edge-right { top: auto; bottom: 90px; transform: none; }
  .content .card:not(.flat):not(.no-frame) { max-height: calc(100dvh - 130px); }
}
@media (max-width: 760px) {
  .content [style*="grid-template-columns"]:not(.wb-grid) { grid-template-columns: 1fr !important; }
  .top .lang-btn, .top .theme-btn { display: none; }
  .side .m-prefs { display: flex !important; }
}
@media (max-width: 600px) {
  .top .ai-label { display: none; } .top .ai-btn { width: 40px; padding: 0; }
  .top .icon-btn { width: 36px; height: 36px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; } h2 { font-size: 18px; }
}
@keyframes page-in { from { opacity: .4; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .content.page-in { animation: none; } .side { transition: none; } }
.gedge.k-soft { stroke: #0ea5a4; stroke-dasharray: 3 4; }
.row.wrap { flex-wrap: wrap; }
.kv { display: inline-block; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 16px; }
.kv-null { background: #fde2e1; color: #b42318; }
.kv-special { background: #fbe8ff; color: #86198f; }
.kv-empty { background: #e0f2fe; color: #075985; }
.kv-blank { background: #fef3c7; color: #92400e; letter-spacing: 1px; }
.kv-num { color: #1d4ed8; }
.kv-date { color: #047857; }
.kv-text { color: inherit; }
.kv-word { background: #fff7ed; outline: 1px dashed #f59e0b; padding: 0 3px; }
.kv-tag { font-size: 9px; color: #b45309; margin-inline-start: 2px; }

/* request in progress: a moving bar across the top and a small label, shown only for what the person asked for */
.topbusy { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .15s; }
.topbusy.on { opacity: 1; }
.topbusy-run { height: 3px; width: 35%; background: var(--pri, #5b4bdb); border-radius: 2px; animation: topbusy 1.1s ease-in-out infinite; }
@keyframes topbusy { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
[dir="rtl"] .topbusy-run { animation-name: topbusyr; } @keyframes topbusyr { 0% { transform: translateX(100%); } 100% { transform: translateX(-300%); } }
.topbusy-label { position: fixed; top: 8px; inset-inline-end: 12px; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--card, #fff); color: var(--muted, #666); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.topbusy-label::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 6px; vertical-align: -1px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
html.waiting, html.waiting * { cursor: progress !important; }

.gedge-hit { fill: none; stroke: transparent; stroke-width: 12px; pointer-events: stroke; }

/* raw program output folded under technical details (UI.rich) */
.rich details.tech { margin-top: 6px; }
.rich details.tech pre { white-space: pre-wrap; direction: ltr; text-align: left; max-height: 320px; overflow: auto; background: var(--soft, rgba(0,0,0,.04)); padding: 8px; border-radius: 8px; }
sub, sup { font-size: 75%; line-height: 0; }

/* assistant panel */
.assist { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100vw); background: var(--card, #fff); border-inline-start: 1px solid var(--line, #ddd);
  box-shadow: -8px 0 24px rgba(0,0,0,.08); padding: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.assist-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.assist-q { align-self: flex-end; background: var(--soft, rgba(80,120,255,.08)); border-radius: 12px; padding: 8px 10px; max-width: 90%; white-space: pre-wrap; }
.assist-a { align-self: flex-start; border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 8px 10px; max-width: 95%; }
.md p { margin: 4px 0; } .md h2, .md h3, .md h4 { margin: 10px 0 4px; }
.icon-btn.ai-btn { width: auto; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.ctx-head { gap: 8px; margin-bottom: 4px; }
.ctx-codes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; padding: 6px 8px; border-radius: 8px; background: var(--soft, rgba(80,120,255,.06)); }
.ctx-code b { font-family: var(--mono, monospace); }
.paper-note { border-inline-start: 3px solid var(--pri, #4a6cf7); background: var(--soft, rgba(80,120,255,.05)); padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; direction: ltr; text-align: left; }
.paper-note.ours { border-color: var(--warn, #c98a00); }
.paper-note p { margin: 4px 0 0; line-height: 1.5; }

/* data check */
.list tr.bad td { color: var(--bad); }
.list tr.on-row td { background: var(--surface2); box-shadow: inset 3px 0 0 var(--pri, #5b4bdb); }
.bad-list li { color: var(--bad); }
.ok-line { color: var(--ok); font-size: 13px; }

/* feedback 🐞 on every part of the app */
.fb-btn { position: absolute; top: 2px; inset-inline-end: 2px; z-index: 5; width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink2); font-size: 11px; line-height: 16px; cursor: pointer; opacity: 0; transition: opacity .15s; }
/* hidden until the pointer is over its part, so it never gets in the way */
:hover > .fb-btn, .fb-btn:focus { opacity: .85; }
/* phones and tablets (no hover): nothing appears or changes on touch. A part that appeared on the first touch made Safari treat
   that touch as "hover" and wait for a second tap before opening a menu item or button (Milad, 7 Oct 2026) */
@media (hover: none) {
  .fb-btn, :hover > .fb-btn { opacity: .4; transition: none; }
  .proj-gear, .proj-row:hover .proj-gear { opacity: 1; }
}
.fb-bg { display: flex; align-items: center; justify-content: center; z-index: 80; }   /* F012 (8 Oct 2026): above an open drawer (it was under the notifications drawer) */
.fb-box { background: var(--surface); color: var(--ink); border-radius: 12px; padding: 16px; width: min(560px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.fb-where { font-size: 12.5px; color: var(--ink2); margin: 6px 0 10px; line-height: 1.6; }

/* Results: version switch and the two groups of a version (printed tables and figures, results behind them) */
.ver-bar { padding: 8px 12px; border: 1px solid var(--line, #ddd); border-radius: 8px; gap: 8px; }
.sec-head { margin: 10px 0 0; font-size: 1.05rem; }

/* the journal loop under the project's stages */
.pub-line { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line, #ddd); color: inherit; text-decoration: none; }

/* a stage opens its tab */
.stepper a.st.link { text-decoration: none; cursor: pointer; border-radius: 12px; padding: 2px 6px 2px 2px; }
.stepper a.st.link:hover { background: var(--bg2); color: var(--ink); }

/* the menu in folding groups */
.nav-block { margin-top: 4px; }
/* group headers (Milad, 30 Sep 2026: "the tree button is not visible at all; make it stand out, another color, bigger") */
.nav-fold { display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; text-align: start; font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .03em; color: var(--primary); background: var(--primary-soft); border: 1px solid transparent; border-radius: var(--r-sm); padding: 7px 10px; margin: 10px 0 4px; }
.nav-fold:hover { border-color: var(--primary); }
.nav-fold:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-fold .fold-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--primary); color: var(--primary-ink, #fff);
  font-size: 12px; line-height: 1; transition: transform .15s; flex: 0 0 auto; }
.nav-fold.open .fold-ico { transform: rotate(90deg); }
[dir="rtl"] .nav-fold:not(.open) .fold-ico { transform: rotate(180deg); }
.nav-fold .count { margin-inline-start: auto; }
.nav-sub { padding-inline-start: 10px; margin-inline-start: 10px; border-inline-start: 2px solid var(--primary-soft); }
.nav-sub.hide { display: none; }

/* projects in the menu: a gear beside each name, pinned on top, archived ones dimmed */
.proj-row { display: flex; align-items: center; gap: 2px; }
.proj-row .proj-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.proj-row .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-link.archived { opacity: .6; font-style: italic; }
.proj-gear { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--muted); padding: 4px 6px; border-radius: 6px; opacity: .55; touch-action: manipulation; }
.proj-gear.on { opacity: 1; background: var(--surface2); color: var(--ink); }
.proj-row:hover .proj-gear, .proj-gear:focus-visible { opacity: 1; }
.proj-gear:hover { background: var(--surface2); color: var(--ink); }
.proj-arch { display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; }
.pop-menu { position: fixed; z-index: 90; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 6px; }
.pop-title { font-size: 12px; color: var(--muted); padding: 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-item { display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0; text-align: start; font: inherit; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.pop-item:hover:not([disabled]) { background: var(--surface2); }
.pop-item.danger { color: var(--bad); }
.pop-item[disabled] { opacity: .45; cursor: not-allowed; }

/* the server is restarting: a banner instead of empty pages (R46) */
.restart-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 80; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--warn);
  padding: 10px 16px; text-align: center; font-weight: 600; box-shadow: var(--shadow); }

/* code library tree (M14.6 to M14.9) */
.cl-proj { border-bottom: 1px solid var(--line, #e5e5e5); padding: 6px 0; }
.cl-proj:last-child { border-bottom: 0; }
.cl-proj > summary { cursor: pointer; font-size: 15px; }
.cl-search { min-width: 360px; flex: 1; }
.cl-dir { margin-inline-start: 14px; }
.cl-dir > summary { cursor: pointer; padding: 3px 0; }
.cl-dir.kind > summary { font-weight: 650; }
.cl-row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; margin-inline-start: 14px; border-bottom: 1px solid var(--line, #e5e5e5); flex-wrap: wrap; }
.cl-row:hover { background: var(--idle-soft); }
.cl-row.gone .cl-name { text-decoration: line-through; opacity: .7; }
.cl-name { overflow-wrap: break-word; min-width: 0; }
.cl-user, .cl-date { white-space: nowrap; }
.cl-row .btn.icon, .cl-row button.icon { padding: 1px 6px; min-width: 0; }
.cl-hits { max-height: 420px; overflow-y: auto; margin: 6px 0; }
.cl-pk { margin: 6px 14px; line-height: 1.7; overflow-wrap: break-word; }
.brief .pb-sec { margin-top: 10px; } .brief .pb-sec h3 { margin: 0 0 6px; font-size: 14px; } .brief tr.stale td { opacity: .75; }

.nav-new-top { display: block; text-align: center; margin: 4px 8px 10px; }
.nav .nav-new { font-weight: 600; }

/* sign-in: the icon under the logo, and the screen that is all there is while signed out (2 Oct 2026) */
.brand-wrap { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.brand-wrap .brand { padding-bottom: 4px; }
.auth-box { display: flex; align-items: center; gap: 10px; padding: 0 8px; min-width: 0; }
.auth-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--primary); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.auth-ico:hover { background: var(--primary-soft); }
.auth-ico svg, .auth-out svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-out { width: 24px; height: 24px; flex: none; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.auth-out svg { width: 15px; height: 15px; }
.auth-out:hover { color: var(--bad); background: var(--bad-soft); }
.auth-state { min-width: 0; line-height: 1.25; }
.auth-box.in .auth-state b { color: var(--ok); }
.auth-box.out .auth-state b { color: var(--muted); }
.auth-state .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.signin-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 16px; box-sizing: border-box; }
.signin-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 10px 30px rgba(20,30,60,.10); }
.signin-panel { gap: 10px; margin-top: 8px; }
.signin-panel input { width: 100%; box-sizing: border-box; }
.signin-panel input[type=checkbox] { width: auto; flex: 0 0 auto; margin: 0; }
.signin-panel .remember { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 8px; cursor: pointer; user-select: none; }
.signin-panel .btn { width: 100%; justify-content: center; }
.auth-msg { color: var(--bad); min-height: 1em; }
.auth-or { text-align: center; }
.btn.google[disabled] { opacity: .55; cursor: not-allowed; }
.signin-foot { margin-top: 10px; }

/* a key or PIN field: masked like a password but not one, so the browser never autofills a saved user name into the page */
.secret-field { -webkit-text-security: disc; text-security: disc; }
.content.is-loading, .is-loading > * { opacity: .55; transition: opacity .15s; }

/* the server's browser on the Sign-ins page (6 Oct 2026): its own cursor, click rings, a text cursor, a frame and a label */
.rb-view { position: relative; outline: none; border-radius: 8px; box-shadow: 0 0 0 2px var(--line, #d0d4dc); transition: box-shadow .15s; }
.rb-view.on { box-shadow: 0 0 0 3px #5b4bdb, 0 0 18px rgba(91, 75, 219, .35); }
.rb-img { width: 100%; height: auto; display: block; background: #fff; border-radius: 8px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M3 2 L3 21 L8 16 L11.5 24 L14.5 22.7 L11 15 L18 15 Z' fill='%235b4bdb' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='22' cy='22' r='4.5' fill='%23ffb020' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") 3 2, crosshair; }
.rb-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 8px; }
.rb-ripple { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #ffb020;
  background: rgba(255, 176, 32, .25); animation: rb-ring .6s ease-out forwards; }
.rb-ripple.double { border-color: #5b4bdb; background: rgba(91, 75, 219, .2); }
@keyframes rb-ring { from { transform: scale(.25); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.rb-caret { position: absolute; width: 2px; height: 22px; margin-top: -11px; background: #5b4bdb; pointer-events: none; animation: rb-caret-out .7s ease-out forwards; }
@keyframes rb-caret-out { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rb-blink { 50% { opacity: 0; } }
.rb-wrap { display: flex; flex-direction: column; gap: 8px; }
.rb-badge { align-self: flex-end; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgba(30, 30, 40, .72); color: #fff; }
.rb-badge.on { background: #5b4bdb; }

/* setup checklist and guide (7 Oct 2026) */
.setup-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setup-row:first-of-type { border-top: 0; }
.setup-mark { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: #fde8e8; color: #b42318; flex: none; }
.setup-row.ok .setup-mark { background: #e3f6e8; color: #1e7b3a; }
.setup-guide { position: fixed; inset-inline-end: 18px; bottom: 18px; width: min(420px, calc(100vw - 24px)); z-index: 60; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 14px 16px; }
.setup-guide .setup-row { border-top: 0; padding: 6px 0; }
.setup-step p { margin: 4px 0 0; }

/* long paths and names wrap inside tables instead of widening the page (7 Oct 2026) */
table.list td { overflow-wrap: break-word; word-break: normal; }   /* plan 12.2: a narrow column never breaks a word letter by letter */
.vault-ok { color: var(--ok-ink); font-weight: 600; }

/* Team (proposal 108, 7 Oct 2026): header with tabs, people table, the access editor's trees, segmented levels */
.tm-head .tabs { border-bottom: 0; }
.tm-wait { border-inline-start: 4px solid var(--warn-ink); }
.tm-adv > summary { cursor: pointer; list-style: none; }
.tm-adv > summary::-webkit-details-marker { display: none; }
.tm-adv > summary:before { content: "▸ "; color: var(--muted); }
.tm-adv[open] > summary:before { content: "▾ "; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.sm { font-size: 11px; padding: 1px 7px; }
.tbl-wrap { overflow-x: auto; }
.ppl { display: flex; flex-direction: column; margin-top: 8px; }
.ppl-head, .ppl-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 110px 120px minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 8px 10px; }
.ppl-head { font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.ppl-row { border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.ppl-row:hover, .ppl-row.on { background: var(--bg2); }
.ppl-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ppl .c-chev { text-align: center; color: var(--muted); }
.ppl-ed { padding: 6px 0 14px; background: var(--bg2); border-radius: 0 0 10px 10px; margin-bottom: 6px; }
.acc-ed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 0 8px; overflow: hidden; }
.acc-tabs { margin: 0 !important; padding: 0 8px; }
.acc-hint { margin: 8px 12px 0; }
.acc-tree { display: flex; flex-direction: column; padding: 6px 0; max-height: 60vh; overflow-y: auto; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 40px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.acc-row:last-child { border-bottom: 0; }
.acc-row.leaf { background: var(--bg2); }
.acc-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc-tog { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; flex: none; padding: 0; line-height: 1; }
span.acc-tog { border: 0; background: none; cursor: default; }
.acc-group { flex-shrink: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 12px 4px; background: var(--bg2); }
.acc-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex: none; background: var(--surface); }
.seg-btn { border: 0; background: none; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg-btn + .seg-btn { border-inline-start: 1px solid var(--line); }
.seg-btn.on { background: var(--primary-soft); color: var(--primary); }
.seg.lv .seg-btn.l0.on { background: var(--bad-soft); color: var(--bad-ink); }
.seg.lv .seg-btn.l1.on { background: var(--run-soft); color: var(--run-ink); }
.seg.lv .seg-btn.l2.on { background: var(--ok-soft); color: var(--ok-ink); }
.seg.off { opacity: .5; }
.seg-btn:disabled { cursor: not-allowed; }
.tm-add { border: 1px dashed var(--primary); }
@media (max-width: 700px) {
  .ppl-head, .ppl-row { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .ppl .c-by, .ppl .c-acc { display: none; }
  .tm-head .tabs { flex-wrap: wrap; }
  .acc-ed { margin: 0 4px; }
  .acc-row { flex-wrap: wrap; row-gap: 6px; padding-inline-end: 8px; }
  .acc-name { flex: 1 1 90px; }
  .acc-row .seg { margin-inline-start: auto; }
  .seg-btn { padding: 6px 8px; font-size: 12px; }
}

/* F006 (7 Oct 2026): the graph editor's Save and Close stay in view; the step menu; a step picked from the menu is marked */
.ge-card .ge-top { position: sticky; top: 0; z-index: 5; background: var(--card); padding: 6px 0; gap: 8px; flex-wrap: wrap; }
tr.hl td { background: var(--primary-soft); }
.timeline .ev-note { border-inline-start: 3px solid var(--primary); padding-inline-start: 8px; }

/* M2.11 (8 Oct 2026): the graph itself is the editor; the bar with Save and Cancel stays in view */
.ge-edit { position: sticky; top: 0; z-index: 6; border: 2px solid var(--pri, #5b4bdb); }
.ge-banner { font-weight: 600; color: var(--pri, #5b4bdb); }
.ge-bar { gap: 6px; align-items: center; }
.ge-bar .btn.disabled, .ge-bar .btn:disabled { opacity: .45; cursor: not-allowed; }
.gnode.sel rect.box { stroke: var(--pri, #5b4bdb); stroke-width: 3.5; }
.ge-sel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
/* M2.12: a step in four plain sentences at the top of its drawer */
.plain-step { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft, rgba(91,75,219,.06)); }
.plain-step dt { font-weight: 700; white-space: nowrap; }
.plain-step dd { margin: 0; }
/* M2.4: help lists what is on the page */
.help-live dt { font-weight: 600; margin-top: 6px; }
.help-live dd { margin: 0 0 4px; }

/* plan 12.5: the graph canvas (xyflow). A node is a box with the state on its border; a working edge carries moving light */
.graph-canvas { position: relative; width: 100%; min-height: 280px; direction: ltr; background: var(--surface); border-radius: var(--r); }
.graph-wrap:has(> .graph-canvas) { overflow: hidden; background: var(--surface); }
.rflow .react-flow__node { padding: 0; border: 0; background: transparent; box-shadow: none; }
.rflow .react-flow__handle { opacity: 0; width: 6px; height: 6px; min-width: 0; min-height: 0; border: 0; }
.rflow .react-flow__background { color: var(--line); }
.rflow .react-flow__controls button { background: var(--surface); color: var(--ink); border-color: var(--line); }
.rflow .react-flow__controls button svg { fill: currentColor; }
.rflow .react-flow__minimap { background: var(--surface2); }
div.gnode { position: relative; box-sizing: border-box; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 12px 6px 16px;
  font-family: var(--font); color: var(--ink); box-shadow: 0 2px 4px rgba(20,28,50,.08); overflow: hidden; display: flex; flex-direction: column; justify-content: center; transition: border-color .2s; }
div.gnode[dir="rtl"] { padding: 7px 16px 6px 12px; text-align: right; }
div.gnode:hover { border-color: var(--primary); }
div.gnode:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
div.gnode .gn-bar { position: absolute; inset-block: 0; inset-inline-start: 0; width: 6px; }
div.gnode .gn-title { font-size: 12.5px; font-weight: 600; line-height: 1.25; unicode-bidi: plaintext; word-break: normal; overflow-wrap: normal; }
div.gnode .gn-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
div.gnode .gn-badge { position: absolute; top: 4px; inset-inline-end: 8px; font-size: 12px; font-weight: 700; }
div.gnode .gn-pct { position: absolute; inset-inline: 6px; bottom: 3px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
div.gnode .gn-pct i { display: block; height: 100%; background: var(--ok); }
div.gnode .gn-mark { position: absolute; top: -1px; inset-inline-end: -1px; width: 20px; height: 20px; border-radius: 0 12px 0 10px; background: var(--bad); color: #fff;
  font-weight: 800; font-size: 13px; display: grid; place-items: center; animation: mark-pulse 1.2s ease-in-out infinite; }
div.gnode.has-mark { border-color: var(--bad); }
@keyframes mark-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225,29,72,.55); } 50% { box-shadow: 0 0 0 7px rgba(225,29,72,0); } }
div.gnode.s-done { border-color: var(--ok); } div.gnode.s-running, div.gnode.s-queued { border-color: var(--run); border-width: 2.5px; }
div.gnode.s-repairing { border-color: var(--warn); border-width: 2.5px; } div.gnode.s-needs_you { border-color: var(--bad); border-width: 2.5px; }
div.gnode.s-stale { border-color: var(--stale); border-style: dashed; } div.gnode.s-blocked { border-color: var(--idle); border-style: dashed; } div.gnode.s-skipped { opacity: .55; }
div.gnode.s-running, div.gnode.s-repairing { animation: pulse 1.4s ease-in-out infinite; }
div.gnode.sel { border-color: var(--pri, #5b4bdb); border-width: 3.5px; }
.rflow .react-flow__node.draggable div.gnode { cursor: grab; }
.gedge.idle { stroke-opacity: .35; }
.gedge-flow { stroke: var(--accent); stroke-width: 2.6; stroke-dasharray: 6 18; stroke-linecap: round; animation: edge-flow linear infinite; filter: drop-shadow(0 0 3px var(--accent)); pointer-events: none; }
@keyframes edge-flow { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .gedge-flow, div.gnode .gn-mark { animation: none; } }
.hl-card { outline: 3px solid var(--primary); outline-offset: 2px; }
/* plan 12.2: on a phone a table scrolls sideways inside its own frame, and its columns keep whole words */
@media (max-width: 760px) {
  table.list { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  table.list th, table.list td { min-width: 4.5em; }
  .stepper { overflow-x: auto; flex-wrap: nowrap; }
  .stepper .st { white-space: nowrap; }
}

/* plan 12.6: Home board */
.board-wrap { margin-top: 8px; }
div.gnode.board-proj { justify-content: flex-start; padding-top: 9px; }
div.gnode.board-proj .gn-title { font-size: 14px; }
div.gnode .gn-inner { flex: 1 1 auto; min-height: 0; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
div.gnode .gn-inner svg.mini { width: 100%; height: 100%; display: block; }
svg.mini .me line { stroke: #b8c0d4; stroke-width: .25; }
svg.mini rect { stroke: rgba(0,0,0,.15); stroke-width: .15; cursor: pointer; }
svg.mini rect.dec { stroke: #e11d48; stroke-width: .8; }
svg.mini text { font-size: 1.15px; fill: #fff; pointer-events: none; font-family: var(--font); }
svg.mini g:hover rect { stroke: var(--primary); stroke-width: .5; }
div.gnode .gn-empty { color: var(--muted); font-size: 11px; padding: 10px 0; }
div.gnode.board-core { background: var(--surface2); }
.gedge.k-uses { stroke: #9aa3b8; stroke-dasharray: 2 3; }
.gedge.k-branch { stroke: #16a34a; stroke-width: 2.2; } .gedge.k-need { stroke: #0891b2; stroke-width: 2; }
/* plan 12.4: panels: move, resize, share a row, expand and restore */
.panel { position: relative; }
.panel-tools { position: absolute; top: 2px; inset-inline-end: 10px; display: flex; gap: 2px; z-index: 4; opacity: .25; transition: opacity .15s; }
.panel:hover > .panel-tools, .panel:focus-within > .panel-tools, .panel-expanded > .panel-tools { opacity: 1; }
@media (hover: none) { .panel-tools { opacity: .8; } }
.panel-tools button { width: 22px; height: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; touch-action: none; }
.panel-tools .panel-move { cursor: grab; }
.panel-grip { position: absolute; bottom: 0; inset-inline-end: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; z-index: 3;
  background: linear-gradient(135deg, transparent 50%, var(--line) 50%, var(--line) 60%, transparent 60%, transparent 70%, var(--line) 70%, var(--line) 80%, transparent 80%); }
[dir="rtl"] .panel-grip { cursor: nesw-resize; transform: scaleX(-1); }
.panel-row { display: flex !important; flex-wrap: nowrap; gap: 0 !important; align-items: stretch; }
.panel-row > .panel { min-width: 220px; }
.panel-div { flex: 0 0 14px; cursor: col-resize; position: relative; touch-action: none; }
.panel-div::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.panel-div:hover::after { background: var(--primary); }
.panel-dragging { opacity: .55; }
.panel-target { outline: 2px dashed var(--primary); outline-offset: 3px; }
.panel-drop { position: absolute; inset-inline: 8px; top: -6px; height: 4px; border-radius: 3px; background: var(--primary); z-index: 5; }
.panel-expanded { position: fixed !important; z-index: 55; inset: 70px 18px 18px calc(var(--lp, var(--side)) + 18px); max-height: none !important; height: auto !important; width: auto !important; overflow: auto; box-shadow: var(--shadow-lg); }
.shell.rp-pinned .panel-expanded { inset-inline-end: calc(340px + 18px); }
[dir="rtl"] .panel-expanded { inset: 70px calc(var(--lp, var(--side)) + 18px) 18px 18px; }
[dir="rtl"] .shell.rp-pinned .panel-expanded { inset-inline-start: calc(340px + 18px); }
.panel-placeholder { border: 2px dashed var(--line); border-radius: var(--r); }
@media (max-width: 1100px) { .panel-expanded, [dir="rtl"] .panel-expanded { inset: 60px 8px 8px 8px; } }
@media (max-width: 760px) { .panel-row { flex-direction: column; } .panel-div { display: none; } .panel-grip { width: 22px; height: 22px; } }
/* Home board, 9 Oct 2026 evening: the small drawing of steps is a button that opens them, not text to zoom into */
div.gnode .mini-wrap { position: relative; width: 100%; height: 100%; cursor: pointer; border-radius: 8px; }
div.gnode .mini-wrap:hover { background: var(--primary-soft); }
div.gnode .mini-open { position: absolute; bottom: 2px; inset-inline-end: 4px; font-size: 11px; font-weight: 700; color: var(--primary); background: var(--surface); border-radius: 6px; padding: 0 5px; }
svg.mini .me line { stroke-width: .35; }
/* Home board cards in words (9 Oct 2026, late) */
div.gnode.board-proj .gn-title { font-size: 15px; }
div.gnode.board-proj .gn-sub { font-size: 12px; }
div.gnode .bc { display: flex; flex-direction: column; gap: 5px; height: 100%; font-size: 12.5px; line-height: 1.35; }
div.gnode .bc-line { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
div.gnode .bc-links { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
div.gnode .bc-chips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 44px; overflow: hidden; }
div.gnode .bc-chip { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
div.gnode .bc-chip.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
div.gnode .bc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
div.gnode .bc-dec { background: var(--bad); color: #fff; border-radius: 7px; padding: 2px 7px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
div.gnode .bc-steps { background: var(--primary); color: #fff; border-radius: 8px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
div.gnode.board-core.busy { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
tr.flash td { background: var(--accent-soft, #fff3c4); transition: background .3s; }
.read-only [data-ro] { opacity: .45; cursor: not-allowed; } .ro-bar { margin-bottom: 10px; }
/* 13.12: System graphs from the service registry: link state and planned nodes */
.gedge.st-partial { opacity: .6; }
.gedge.st-planned, .gedge.st-drawn { opacity: .38; stroke-dasharray: 1 6; }
div.gnode.planned, .gnode.planned { opacity: .45; border-style: dashed; }
.live-dot.ok { background: var(--ok); } .live-dot.failed { background: var(--bad); } .live-dot.interrupted, .live-dot.blocked { background: var(--warn); }
.legend .lg-line { display: inline-block; width: 22px; height: 0; border-top: 2px solid #9aa3b8; vertical-align: middle; margin-inline-end: 4px; }
.legend .lg-line.st-partial { opacity: .6; } .legend .lg-line.st-planned { opacity: .5; border-top-style: dotted; }

/* 13.11 Home graph (Milad's design, 11 Oct 2026): dark board, highly transparent boxes, real lines only */
.hg-wrap { position: relative; display: flex; gap: 10px; align-items: stretch; }
.hg-wrap > .graph-canvas { flex: 1 1 auto; min-width: 0; }
.graph-canvas.hg-board { background: radial-gradient(1200px 600px at 50% 0%, #0c1830, #070e1a); color: #e7f1ff; }
.hg-board .react-flow__background { color: #1a2a44; }
.hg-board .h-hidden { opacity: 0 !important; pointer-events: none; }
.hg-board .hnode { position: relative; font-family: var(--font); color: #e7f1ff; }
.hg-board .hnode-body { width: 100%; height: 100%; }
.hg-board .hnode-body > div { transform-origin: 0 0; }
.hc-card { position: relative; box-sizing: border-box; border: 1px solid color-mix(in srgb, var(--c) 45%, #1d324c); border-radius: 16px; background: rgba(14,27,49,.16);
  box-shadow: 0 0 28px color-mix(in srgb, var(--c) 10%, transparent); overflow: hidden; }
.hc-card .glow { position: absolute; left: 0; right: 0; top: 0; height: 2px; opacity: .8; }
.hc-card .ic { position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border: 1px solid; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: #0d2238; }
.hc-card .tt { position: absolute; left: 58px; top: 12px; font-weight: 700; font-size: 19px; letter-spacing: -.3px; right: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-card .sb { position: absolute; left: 58px; top: 37px; font-size: 10.5px; color: #8296b2; right: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-card .pct { position: absolute; right: 16px; top: 8px; font-size: 30px; font-weight: 700; text-align: right; line-height: 1; }
.hc-card .pct small { font-size: 14px; } .hc-card .pct i { display: block; font-style: normal; font-size: 7.5px; color: #7d93b0; letter-spacing: 1.4px; margin-top: 3px; }
.hc-card .bar { position: absolute; left: 14px; right: 14px; top: 62px; height: 4px; border-radius: 3px; background: #1a2a42; overflow: hidden; } .hc-card .bar b { display: block; height: 100%; }
.hc-card .hc-st { position: absolute; left: 0; top: 0; }
.hc-card .sn { fill: #fff; font-size: 10px; font-weight: 700; } .hc-card .sl { fill: #8ea3c2; font-size: 9.5px; } .hc-card .sl.now { fill: #fff; font-weight: 700; }
.hc-card .meta { position: absolute; left: 14px; right: 14px; top: 142px; display: flex; gap: 10px; justify-content: space-between; align-items: center; font-size: 10px; color: #8296b2; }
.hc-card .fl { font-size: 8.5px; letter-spacing: .8px; padding: 3px 8px; border-radius: 6px; border: 1px solid; }
.hc-card .f-stale { color: #fbbf24; border-color: #7a5a1d; background: #2a2112; } .hc-card .f-needs_you, .hc-card .f-failed { color: #ff8a8a; border-color: #7a2d2d; background: #2a1414; }
.hc-card .f-running { color: #7cc4ff; border-color: #265a85; background: #0f2238; }
.hc-card .hc-dec { color: #fff; background: #e11d48; border-radius: 8px; padding: 1px 7px; font-weight: 700; cursor: pointer; }
.hc-card .ch { position: absolute; top: 166px; font-size: 8px; letter-spacing: 1.3px; color: #7d93b0; font-weight: 700; }
.hg-nd { position: relative; box-sizing: border-box; border: 1px solid color-mix(in srgb, var(--c) 60%, #2a4060); border-radius: 7px; background: rgba(18,34,58,.86);
  font-size: 9.6px; line-height: 1.15; padding: 3px 6px 3px 16px; display: flex; align-items: center; color: #d8e6f7; cursor: pointer; }
.hg-nd span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.hg-nd i { position: absolute; left: 6px; top: 50%; margin-top: -3px; width: 6px; height: 6px; border-radius: 50%; }
.hg-nd em { position: absolute; right: -6px; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: #ef4444; color: #fff; font-size: 9px; font-style: normal; display: grid; place-items: center; font-weight: 700; cursor: pointer; }
.hg-step.s-needs_you .hg-nd { border-color: #ef4444; box-shadow: 0 0 10px #ef444466; } .hg-step.s-stale .hg-nd { border-color: #8a6a1f; }
.hg-step.lit .hg-nd { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent), 0 0 16px var(--c); }
.hg-step.sel .hg-nd { border-color: #fff; box-shadow: 0 0 0 3px var(--c), 0 0 22px var(--c); }
.hg-step.near .hg-nd { border-color: #fff; box-shadow: 0 0 0 2.5px var(--c), 0 0 16px var(--c); }
.hg-board .dim { opacity: .2; transition: opacity .2s; }
.hg-gc { position: relative; box-sizing: border-box; width: 100%; height: 100%; border: 1px solid color-mix(in srgb, var(--g) 45%, #1d324c); border-radius: 16px; background: rgba(13,26,47,.14); }
.hg-gc .gi { position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--g); border: 1px solid color-mix(in srgb, var(--g) 55%, transparent); background: #0c2032; }
.hg-gc .gt { position: absolute; left: 54px; top: 12px; font-weight: 700; font-size: 14px; } .hg-gc .gn { position: absolute; right: 14px; top: 16px; font-size: 9px; color: #8296b2; border: 1px solid #263b58; border-radius: 8px; padding: 2px 7px; }
.hg-sc { position: relative; box-sizing: border-box; width: 100%; height: 44px; border: 1px solid #233a58; border-radius: 10px; background: rgba(15,29,51,.84); padding: 6px 10px 6px 40px; cursor: pointer; }
.hg-sc .si { position: absolute; left: 9px; top: 9px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; color: var(--g); background: #0c2032; border: 1px solid color-mix(in srgb, var(--g) 45%, transparent); }
.hg-sc b { display: block; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hg-sc small { display: block; font-size: 8.5px; color: #7d93b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-sc i { position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; }
.hg-svc.lit .hg-sc { border-color: #e0a24a; box-shadow: 0 0 14px #e0a24a55; }
.hg-board .redge.dim, .hg-board .redge-h.dim { opacity: .1; }
.hg-board .redge-run { animation: hgflow 1s linear infinite; } @keyframes hgflow { to { stroke-dashoffset: -30; } }
@media (prefers-reduced-motion: reduce) { .hg-board .redge-run { animation: none; } }
.hg-filter { order: -1; flex: 0 0 250px; align-self: flex-start; z-index: 5; width: 250px; max-height: calc(100dvh - 200px); overflow: auto; border: 1px solid #2a4060; border-radius: 14px;
  background: rgba(10,20,38,.9); padding: 8px 10px; font-size: 11px; color: #c9d8ec; }
.hg-filter.closed { width: auto; flex: 0 0 auto; }
@media (max-width: 700px) { .hg-filter { position: absolute; left: 8px; top: 8px; } } .hg-filter.closed > :not(.fp-h) { display: none; }
.hg-filter .fp-h { font-size: 9px; letter-spacing: 1.4px; color: #7d93b0; font-weight: 700; align-items: center; } .hg-filter .icon-btn { color: #c9d8ec; }
.hg-filter .fp-b { display: flex; gap: 7px; align-items: center; margin: 6px 0 3px; font-size: 12px; }
.hg-filter .fp-b em, .hg-filter .fp-g em { margin-left: auto; font-style: normal; color: #7d93b0; font-size: 10px; }
.hg-filter button:not(.icon-btn) { display: flex; gap: 7px; align-items: center; width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; padding: 2px 0 2px 18px; border-radius: 6px; }
.hg-filter button:not(.icon-btn):hover { background: #13243d; } .hg-filter .fp-s { padding-left: 40px; color: #a9bbd3; } .hg-filter .fp-g { padding-left: 4px; font-weight: 700; } .hg-filter .tw { color: #7d93b0; width: 10px; }
.hg-filter .ck { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--g, #5aa9ff); display: grid; place-items: center; font-size: 9px; color: #fff; flex: none; }
.hg-filter .ck.on { background: var(--g, #5aa9ff); } .hg-filter .ck.part { background: color-mix(in srgb, var(--g, #5aa9ff) 45%, transparent); } .hg-filter .ck.off { background: transparent; opacity: .8; }
.hg-legend { display: flex; flex-wrap: wrap; gap: 16px; } .hg-legend span { display: flex; align-items: center; gap: 7px; }
.hg-legend .ln { display: inline-block; width: 24px; border-top: 2px solid #3ee0a1; } .hg-legend .ln.d { border-top-style: dashed; border-color: #4f9dff; }
.hg-legend .ln.on { border-top: 3px dashed #ffb347; box-shadow: 0 0 6px #ffb347; } .hg-legend .ln.r { border-top: 2px dashed #6f86a8; }
.hg-insp .hg-ir { display: flex; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; } .hg-insp .hg-ir b { width: 96px; flex: none; color: var(--muted); font-weight: 600; } .hg-insp .hg-ir span { word-break: break-word; }
.pop-sep { height: 1px; background: var(--line); margin: 4px 2px; }
