/* Aeron console. Layout: sticky top bar, grouped left nav, one content column (max 1180px).
   Theme: follows the system, or the viewer's choice (html[data-theme="light"|"dark"]). */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f7f9fa; --surface-3: #edf1f4; --ink: #14202b; --muted: #55636f; --faint: #85919c;
  --line: #dce2e7; --line-2: #e9edf0;
  --accent: #0b6a85; --accent-hover: #095a71; --accent-soft: #e2f0f4; --accent-ink: #ffffff;
  --good: #1d7748; --good-soft: #e2f2e8; --warn: #8f5600; --warn-soft: #faefd9; --bad: #ae2a21; --bad-soft: #fae6e3;
  --series-1: #2a78d6; --series-2: #eb6834; --series-muted: #c9d1d8; --grid: #e7ebee;
  --c1: #2a78d6; --c2: #1d7748; --c3: #ae2a21; --c4: #8f5600; --c5: #5b4fb0;
  --code: #eef1f4;
  --shadow: 0 1px 2px rgb(16 24 32 / .04), 0 2px 6px rgb(16 24 32 / .05);
  --shadow-lg: 0 12px 40px rgb(16 24 32 / .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1217; --surface: #131b22; --surface-2: #172029; --surface-3: #1c2731; --ink: #e3e9ee; --muted: #9aa6b2; --faint: #6c7985;
    --line: #26313c; --line-2: #1e2831;
    --accent: #55c2dd; --accent-hover: #74cfe5; --accent-soft: #11313b; --accent-ink: #0c1217;
    --good: #63c993; --good-soft: #132d1f; --warn: #e2a54b; --warn-soft: #31240e; --bad: #f08b81; --bad-soft: #381614;
    --series-1: #3987e5; --series-2: #d95926; --series-muted: #3a4752; --grid: #222d37;
    --c1: #3987e5; --c2: #63c993; --c3: #f08b81; --c4: #e2a54b; --c5: #a99cf0;
    --code: #0f171e;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1217; --surface: #131b22; --surface-2: #172029; --surface-3: #1c2731; --ink: #e3e9ee; --muted: #9aa6b2; --faint: #6c7985;
  --line: #26313c; --line-2: #1e2831;
  --accent: #55c2dd; --accent-hover: #74cfe5; --accent-soft: #11313b; --accent-ink: #0c1217;
  --good: #63c993; --good-soft: #132d1f; --warn: #e2a54b; --warn-soft: #31240e; --bad: #f08b81; --bad-soft: #381614;
  --series-1: #3987e5; --series-2: #d95926; --series-muted: #3a4752; --grid: #222d37;
  --c1: #3987e5; --c2: #63c993; --c3: #f08b81; --c4: #e2a54b; --c5: #a99cf0;
  --code: #0f171e;
  --shadow: 0 1px 2px rgb(0 0 0 / .3);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--code); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 23px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16.5px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 620; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; gap: 14px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 680; font-size: 16.5px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.mark { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--accent); position: relative; }
.mark::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.server { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 340px; }
.server::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.server:empty { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.who { color: var(--muted); font-size: 13px; white-space: nowrap; padding: 0 6px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; padding: 6px 8px; color: var(--ink); cursor: pointer; border-radius: 7px; font: inherit; font-size: 13px; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn .ico { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* layout */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100% - 54px); }
.layout.no-nav { grid-template-columns: minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); background: var(--surface); padding: 14px 10px 24px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 0 10px 5px; }
.nav-add { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); padding: 1px 6px; border-radius: 5px; }
.nav-add:hover { color: var(--accent); background: var(--accent-soft); }
.nav-add .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.sidebar a[data-nav], .app-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; min-width: 0; }
.sidebar a[data-nav] .ico, .app-link .ico { color: var(--muted); }
.sidebar a[data-nav] .grow, .app-link .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar a[data-nav]:hover, .app-link:hover { background: var(--surface-2); }
.sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar a[aria-current="page"] .ico { color: var(--accent); }
.app-avatar { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; background: var(--surface-3); color: var(--muted); }
.app-avatar.expo { background: color-mix(in srgb, var(--series-1) 16%, transparent); color: var(--series-1); }
.app-avatar.flutter { background: color-mix(in srgb, var(--c5) 18%, transparent); color: var(--c5); }
.nav-empty { color: var(--muted); font-size: 12.5px; padding: 2px 10px; }
.attn { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); display: inline-block; flex: none; }
.attn.bad { background: var(--bad); }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
main { padding: 26px max(16px, env(safe-area-inset-right)) 72px max(16px, env(safe-area-inset-left)); min-width: 0; outline: none; }
.page { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head .titles { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 760px; }
.page-head .sub { color: var(--muted); }
.page-head .learn { font-size: 13px; }
.eyebrow { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.intro { color: var(--muted); max-width: 820px; }

/* buttons & forms */
.btn { font: inherit; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 15px; height: 15px; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.btn.danger.armed, .btn.danger:hover { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.btn.armed:not(.danger) { background: var(--good); border-color: var(--good); color: var(--surface); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.active { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: 12.5px; border: 0; background: none; color: var(--muted); padding: 4px 10px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .label { font-weight: 550; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea { font: inherit; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=range] { accent-color: var(--accent); width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notice { border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); display: flex; gap: 10px; align-items: flex-start; }
.notice > .ico { margin-top: 2px; color: var(--muted); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.warn > .ico { color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.notice.bad > .ico { color: var(--bad); }
.notice.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.notice.good > .ico { color: var(--good); }
.notice.page { flex-direction: column; }
details.card > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "›"; display: inline-block; width: 12px; transition: transform .15s; color: var(--muted); font-size: 18px; line-height: 1; }
details.card[open] > summary::before { transform: rotate(90deg); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); min-width: 0; text-decoration: none; color: inherit; }
a.tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .v { font-size: 26px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.tile .d { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tile .d .up-good, .tile .d .down-good { color: var(--good); font-weight: 600; }
.tile .d .up-bad, .tile .d .down-bad { color: var(--bad); font-weight: 600; }
.tile .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tile.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.tile.bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 55%, var(--surface)); }

/* how-it-works pipeline */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.flow-step { position: relative; padding: 14px 18px 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; min-width: 0; }
.flow-step + .flow-step { border-left: 1px solid var(--line-2); }
a.flow-step:hover { background: var(--surface-2); }
.flow-step .n { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.flow-step .n span { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 0; }
.flow-step .t { font-weight: 620; }
.flow-step .s { font-size: 12.5px; color: var(--muted); }
.flow-step .live { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.flow-step.hot .n span { background: var(--warn); color: var(--surface); }
.flow-step.hot .live { color: var(--warn); }
.flow-step.ok .live { color: var(--good); }
.flow-step:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface); border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.flow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap, .drawer .table-wrap { box-shadow: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td { white-space: nowrap; }
td.wrap { white-space: normal; min-width: 180px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 22px 12px; text-align: center; }

/* pills, chips & bars */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 550; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kind { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter .track { width: 110px; height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.split { display: flex; flex-direction: column; gap: 8px; }
.split-bar { display: flex; gap: 2px; height: 8px; }
.split-bar span { border-radius: 4px; min-width: 0; }
.split-bar .a { background: var(--series-1); }
.split-bar .b { background: var(--series-muted); }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); }
.split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.split-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.split-legend .a i { background: var(--series-1); }
.split-legend .b i { background: var(--series-muted); }
.split-legend strong { color: var(--ink); font-weight: 600; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* rollout cards */
.rollouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.rollout { display: flex; flex-direction: column; gap: 14px; }
.rollout .title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rollout .story { font-size: 14px; }
.rollout .story strong { font-weight: 620; }
.rollout .controls { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.rollout .controls .label { font-size: 12px; color: var(--muted); font-weight: 550; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* code blocks */
pre { margin: 0; background: var(--code); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 12.5px/1.6 var(--mono); color: var(--ink); }
pre code { background: none; padding: 0; }
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; top: 6px; right: 6px; opacity: .85; }
.code-wrap:hover .copy { opacity: 1; }
.code-wrap pre { padding-right: 70px; }

/* charts */
.chart-card { display: flex; flex-direction: column; gap: 10px; }
.chart-card .card-head { margin-bottom: 0; align-items: center; }
.chart-card .card-head h2 { font-size: 15px; }
.chart-card .big { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.chart text.end-label { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .bar { fill: var(--series-1); transition: opacity .12s; }
.chart .bar.partial { opacity: .45; }
.chart .bar, .chart text, .chart .grid, .chart .line, .chart .area, .chart .dot, .chart .cross { pointer-events: none; }
.chart .bar-hit { fill: transparent; cursor: default; outline: none; }
.chart .bar-hit:hover + .bar, .chart .bar-hit:focus-visible + .bar { opacity: .72; }
.chart .bar-hit:focus-visible { stroke: var(--accent); stroke-width: 2; }
.chart .line { fill: none; stroke: var(--series-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-2); opacity: .1; }
.chart .dot { fill: var(--series-2); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart-empty { color: var(--muted); font-size: 13px; padding: 30px 0; text-align: center; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--sw); vertical-align: -1px; }
.spark { width: 96px; height: 26px; display: block; }
.spark .l { fill: none; stroke: var(--series-1); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .e { fill: var(--series-1); }

/* tooltip (one, global, position: fixed so it is never clipped) */
.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 320px; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: 7px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-lg); }
.tip .tv { font-weight: 650; font-size: 13px; }
.tip .tl { opacity: .8; }
.tip .tr { display: flex; align-items: center; gap: 7px; }
.tip .tr i { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.tip b { font-weight: 650; }
.term { border-bottom: 1px dotted currentColor; cursor: help; text-decoration: none; }
.term:focus-visible { outline-offset: 1px; }
.qmark { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; cursor: help; vertical-align: 1px; background: var(--surface); }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--surface); z-index: 31; border-left: 1px solid var(--line); padding: 20px max(20px, env(safe-area-inset-right)) 32px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-lg); }
.drawer .page-head { align-items: center; }
.help h3 { margin-top: 6px; }
.help ol, .help ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.help .task { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.help .terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.help .terms dt { font-weight: 600; }
.help .terms dd { margin: 0; color: var(--muted); }

/* toasts */
.toasts { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; max-width: 380px; box-shadow: var(--shadow-lg); }
.toast.bad { background: var(--bad); color: #fff; }

/* login */
.login-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; max-width: 980px; margin: 6vh auto 0; align-items: start; }
.login { display: flex; flex-direction: column; gap: 14px; }
.login-about { display: flex; flex-direction: column; gap: 14px; padding: 6px 4px; }
.login-about h2 { font-size: 19px; }
.login-about ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.login-about ol strong { color: var(--ink); }
.error-text { color: var(--bad); min-height: 1.2em; }

/* docs */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) 200px; gap: 32px; align-items: start; }
.docs.no-toc { grid-template-columns: 230px minmax(0, 1fr); }
.docs-nav { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 12px; }
.docs-nav .group { display: flex; flex-direction: column; gap: 1px; }
.docs-pages { display: flex; flex-direction: column; gap: 14px; }
.docs-pages[open] { display: flex; }
.docs-pages > summary { display: none; }
.docs-pages > .group + .group { margin-top: 14px; }
.docs-nav .group-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 0 10px 4px; }
.docs-nav a { padding: 5px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.docs-nav a:hover { background: var(--surface-2); }
.docs-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.docs-search { position: relative; }
.docs-search input { padding-left: 32px; }
.docs-search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { display: flex; flex-direction: column; gap: 10px; }
.search-results a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; background: var(--surface); }
.search-results a:hover { border-color: var(--accent); }
.search-results .where { font-size: 12px; color: var(--muted); }
.search-results .what { font-weight: 600; color: var(--accent); }
.search-results .snip { font-size: 13px; color: var(--muted); margin-top: 3px; }
mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.docs-toc { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; border-left: 1px solid var(--line); padding-left: 12px; max-height: calc(100vh - 100px); overflow-y: auto; }
.docs-toc .label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 4px; }
.docs-toc a { color: var(--muted); text-decoration: none; padding: 3px 0; }
.docs-toc a:hover { color: var(--accent); }
.docs-toc a.active { color: var(--accent); font-weight: 600; }
.md { max-width: 80ch; display: flex; flex-direction: column; gap: 14px; line-height: 1.7; font-size: 15px; min-width: 0; }
.md h1 { font-size: 28px; margin-bottom: 2px; letter-spacing: -.015em; }
.md h1 + p { font-size: 16.5px; color: var(--muted); }
.md h2 { font-size: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); scroll-margin-top: 76px; }
.md h3 { font-size: 16px; margin-top: 8px; scroll-margin-top: 76px; }
.md h4 { font-size: 14.5px; scroll-margin-top: 76px; }
.md ul, .md ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.md li > ul { margin-top: 5px; }
.md blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--muted); }
.md .callout { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.md .callout.hint { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); border-left-color: var(--good); background: var(--good-soft); }
.md .callout.note { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-left-color: var(--accent); background: var(--accent-soft); }
.md .callout.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); border-left-color: var(--warn); background: var(--warn-soft); }
.md .callout.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); border-left-color: var(--bad); background: var(--bad-soft); }
.md table { font-size: 13.5px; }
.md td { white-space: normal; }
.md th { white-space: normal; }
.md hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.md pre { font-size: 12.5px; }
.os-tabs { border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--code); }
.os-tabs .os-bar { display: flex; gap: 2px; padding: 4px 4px 0; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.os-tabs .os-bar button { font: inherit; font-size: 12.5px; font-weight: 550; border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 6px 6px 0 0; cursor: pointer; border-bottom: 2px solid transparent; }
.os-tabs .os-bar button[aria-selected="true"] { color: var(--ink); background: var(--code); border-bottom-color: var(--accent); }
.os-tabs pre { border: 0; border-radius: 0; }
.flow-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.flow-chips .chip { padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13.5px; }
.flow-chips .arrow { color: var(--faint); }
.doc-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.doc-pager a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; min-width: 0; max-width: 48%; background: var(--surface); }
.doc-pager a:hover { border-color: var(--accent); }
.doc-pager .dir { font-size: 12px; color: var(--muted); }
.doc-pager .next { margin-left: auto; text-align: right; }

/* nav badge, checklists, approval cards */
.badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--warn); color: var(--surface); font-size: 11.5px; font-weight: 650; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.checklist li > .go { align-self: center; }
.checklist .mark-ok, .checklist .mark-todo, .checklist .mark-bad, .checklist .mark-warn { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.mark-ok { background: var(--good-soft); color: var(--good); }
.mark-todo { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.mark-warn { background: var(--warn-soft); color: var(--warn); }
.mark-bad { background: var(--bad-soft); color: var(--bad); }
.checklist .how { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.checklist .how code { font-size: 11.5px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.progress .track { flex: 1; max-width: 220px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.progress .fill { height: 100%; background: var(--good); border-radius: 3px; }
.approval { display: flex; flex-direction: column; gap: 14px; }
.approval .what { font-size: 16px; font-weight: 600; }
.approval .effect { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; }
.approval .effect .ico { color: var(--accent); margin-top: 2px; }
.approval .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; }
.approval .meta strong { color: var(--ink); font-weight: 600; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-2); }
.approval-actions input[type=number] { width: 76px; }
.approval .checks-before { font-size: 13px; color: var(--muted); }
.approval .checks-before ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.welcome { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.welcome .card { display: flex; flex-direction: column; gap: 8px; }
.welcome .card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.welcome .card h3 span { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.welcome .card .btn-row { margin-top: auto; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.score { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.score .ring { width: 64px; height: 64px; }
.score .ring circle { fill: none; stroke-width: 7; }
.score .ring .bg { stroke: var(--line-2); }
.score .ring .fg { stroke: var(--good); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.score .ring text { fill: var(--ink); font: 650 15px var(--font); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.roles .card { box-shadow: none; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.roles ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.action-text { font-weight: 550; }
.step-n { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; margin-right: 6px; }

@media (max-width: 1100px) {
  .docs { grid-template-columns: 210px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-step:nth-child(4) { border-left: 0; }
  .flow-step:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .flow-step:nth-child(3)::after { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; top: 54px; left: 0; bottom: 0; width: 270px; z-index: 25; height: auto; box-shadow: var(--shadow-lg); }
  .sidebar:not(.open) { display: none; }
  .grid-2, .grid-3, .docs, .docs.no-toc, .login-wrap, .roles { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; max-height: none; }
  .docs-pages > summary { display: block; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 13.5px; }
  .docs-pages[open] > summary { margin-bottom: 12px; }
  .server, .who { display: none; }
  .icon-btn .lbl { display: none; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-step + .flow-step { border-left: 0; border-top: 1px solid var(--line-2); }
  .flow-step::after { display: none; }
  .rollouts { grid-template-columns: minmax(0, 1fr); }
  .login-about { order: 2; }
}
@media (prefers-reduced-motion: no-preference) { .meter .fill, .progress .fill { transition: width .25s ease; } }
@media (forced-colors: active) { .chart .bar, .split-bar span { forced-color-adjust: none; } }
