/* Blayde. Light by default (a theme switch in the sidebar offers Dark and System).
   Enterprise blue on white, tiles with real depth, a left navigation. No external fonts or assets (CSP: self only). */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb; --bg-2: #e9eef7; --panel: #ffffff; --panel-2: #f7f9fd; --fg: #0f172a; --muted: #5a6478; --line: #e2e8f2;
  --accent: #2563eb; --accent-2: #4f46e5; --accent-ink: #ffffff; --accent-soft: rgba(37, 99, 235, .10);
  --ok: #15803d; --bad: #c0262d; --warn: #a15c07;
  --side-bg: #0f1b3d; --side-fg: #c9d3ea; --side-muted: #8592b3; --side-on: #ffffff; --side-hover: rgba(255, 255, 255, .07); --side-active: rgba(99, 140, 255, .22);
  --tile-top: rgba(255, 255, 255, .9);
  --shadow: 0 1px 1px rgba(15, 23, 42, .04), 0 4px 10px -2px rgba(15, 23, 42, .06), 0 14px 30px -12px rgba(37, 66, 140, .18);
  --shadow-lift: 0 2px 2px rgba(15, 23, 42, .04), 0 10px 22px -4px rgba(15, 23, 42, .10), 0 30px 60px -24px rgba(37, 66, 140, .35);
  --radius: 16px; --radius-sm: 10px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1022; --bg-2: #0f1730; --panel: #121b33; --panel-2: #16203b; --fg: #e7ecf6; --muted: #98a3bd; --line: #24304d;
  --accent: #6d9bff; --accent-2: #8f86ff; --accent-ink: #071023; --accent-soft: rgba(109, 155, 255, .14);
  --ok: #4ade80; --bad: #f87171; --warn: #fbbf24;
  --side-bg: #070c1a; --tile-top: rgba(255, 255, 255, .06);
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 20px -6px rgba(0, 0, 0, .5), 0 20px 40px -20px rgba(80, 120, 255, .25);
  --shadow-lift: 0 2px 2px rgba(0, 0, 0, .35), 0 16px 34px -8px rgba(0, 0, 0, .6), 0 36px 70px -28px rgba(80, 120, 255, .4);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    color-scheme: dark;
    --bg: #0a1022; --bg-2: #0f1730; --panel: #121b33; --panel-2: #16203b; --fg: #e7ecf6; --muted: #98a3bd; --line: #24304d;
    --accent: #6d9bff; --accent-2: #8f86ff; --accent-ink: #071023; --accent-soft: rgba(109, 155, 255, .14);
    --ok: #4ade80; --bad: #f87171; --warn: #fbbf24;
    --side-bg: #070c1a; --tile-top: rgba(255, 255, 255, .06);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 20px -6px rgba(0, 0, 0, .5), 0 20px 40px -20px rgba(80, 120, 255, .25);
    --shadow-lift: 0 2px 2px rgba(0, 0, 0, .35), 0 16px 34px -8px rgba(0, 0, 0, .6), 0 36px 70px -28px rgba(80, 120, 255, .4);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(1000px 520px at 75% -12%, rgba(79, 70, 229, .10), transparent 62%), radial-gradient(800px 480px at 10% 110%, rgba(37, 99, 235, .08), transparent 60%); }

/* ---------- the frame: left navigation + content ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
body.public .shell { grid-template-columns: minmax(0, 1fr); }
body.public .side, body.public .topbar { display: none; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1rem; padding: 1rem .8rem; background: var(--side-bg); color: var(--side-fg); overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: .6rem; color: var(--side-on); text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem; padding: .3rem .5rem .6rem; }
.side-brand .logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #4f8bff, #7c6bff); box-shadow: 0 6px 16px -4px rgba(99, 120, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.side-brand .env { margin-left: auto; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--side-muted); border: 1px solid rgba(255, 255, 255, .15); border-radius: 99px; padding: .05rem .45rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: 10px; color: var(--side-fg); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--side-hover); color: var(--side-on); }
.nav-item.on { background: var(--side-active); color: var(--side-on); box-shadow: inset 2px 0 0 #6d9bff; }
.nav-item .ico { width: 18px; height: 18px; flex: 0 0 18px; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-sub { margin: 2px 0 6px 1.55rem; padding-left: .7rem; border-left: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 1px; }
.nav-sub-title { color: var(--side-on); font-weight: 600; font-size: .88rem; text-decoration: none; padding: .35rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub-item { display: flex; align-items: center; justify-content: space-between; color: var(--side-fg); text-decoration: none; font-size: .88rem; padding: .32rem .55rem; border-radius: 8px; }
.nav-sub-item:hover { background: var(--side-hover); color: var(--side-on); }
.nav-sub-item.on { background: var(--side-active); color: var(--side-on); }
.count { font-size: .68rem; font-weight: 700; min-width: 1.15rem; text-align: center; padding: .05rem .35rem; border-radius: 99px; background: rgba(255, 255, 255, .14); color: var(--side-on); }
.count.warn { background: #f5a524; color: #1d1300; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .6rem; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.theme-switch button { background: none; box-shadow: none; color: var(--side-muted); padding: .35rem; justify-content: center; border-radius: 8px; }
.theme-switch button .ico { width: 16px; height: 16px; }
.theme-switch button.on { background: rgba(255, 255, 255, .14); color: var(--side-on); }
.theme-switch button:hover { transform: none; filter: none; color: var(--side-on); }
.who { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--side-muted); padding: 0 .3rem; }
.who-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { background: none; box-shadow: none; color: inherit; padding: .35rem; border-radius: 8px; }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--side-hover); transform: none; filter: none; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .75rem; min-height: 3.2rem; padding: .55rem 1.6rem;
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.crumbs .here { color: var(--fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .sep { opacity: .5; }
.menu-btn { display: none; color: var(--fg); }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.6rem 1.6rem 4rem; }
body.public .wrap { max-width: 76rem; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.badge { font-size: .72rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: .12rem .55rem; color: var(--muted); vertical-align: middle; white-space: nowrap; }
.badge.accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); margin-left: .4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--accent); margin: 0 0 .3rem; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; line-height: 1.2; margin: .2rem 0 1rem; } h2 { font-size: 1.2rem; letter-spacing: -.01em; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1.02rem; margin: 1.1rem 0 .45rem; } h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .4rem; }
a { color: var(--accent); text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .85em; word-break: break-all; }
kbd { font: 600 .7rem var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .35rem; color: var(--muted); background: var(--panel-2); }

/* ---------- controls ---------- */
button, .button { font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px var(--accent-soft); transition: transform .12s ease, box-shadow .2s ease, filter .2s ease; }
button:hover, .button:hover { filter: brightness(1.05); transform: translateY(-1px); }
button:active, .button:active { transform: translateY(0); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tile:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.secondary { background: var(--panel); color: var(--fg); border-color: var(--line); box-shadow: none; }
button.secondary:hover { border-color: var(--accent); }
button.link { background: none; border: none; color: var(--accent); padding: 0; box-shadow: none; font-weight: 500; }
button.link:hover { transform: none; text-decoration: underline; }
button:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
input, select, textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
input.big, textarea.big { font-size: 1.15rem; padding: .9rem 1rem; border-radius: 12px; }
input.small { width: 9rem; flex: 0 0 auto; }
textarea { min-height: 14rem; font-family: var(--mono); font-size: .85rem; }
textarea.short, textarea.prose { min-height: 5rem; font-family: inherit; font-size: inherit; }
textarea.big.prose { min-height: 7rem; font-size: 1.1rem; }
label { display: block; margin: .7rem 0 .3rem; color: var(--muted); font-size: .82rem; font-weight: 500; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; } .row > * { flex: 1 1 12rem; }
.err { color: var(--bad); white-space: pre-wrap; min-height: 1.2em; }
.note { border-left: 3px solid var(--accent); padding: .6rem .9rem; background: var(--accent-soft); border-radius: 0 10px 10px 0; margin: .75rem 0 1rem; }
ul.plain, ol.plain { margin: .25rem 0; padding-left: 1.2rem; } ul.plain li, ol.plain li { margin: .25rem 0; }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 0 1.25rem; flex-wrap: wrap; }
.tabs a { padding: .55rem .85rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 550; }
.tabs a.on { color: var(--fg); border-bottom-color: var(--accent); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 550; }
.toast { position: sticky; top: 4rem; z-index: 5; margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ok); box-shadow: var(--shadow-lift); animation: rise .35s ease both; }

/* ---------- home ---------- */
.welcome { max-width: 40rem; margin: 10vh auto 0; text-align: center; }
.welcome .button { font-size: 1.05rem; padding: .8rem 1.4rem; margin-top: .5rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: .5rem 0 2rem; }
.card { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card strong { font-size: 1.05rem; letter-spacing: -.01em; }

/* ---------- onboarding ---------- */
.onboard { min-height: calc(100vh - 4rem); display: flex; flex-direction: column; }
.onboard-top { display: flex; align-items: center; gap: 1rem; justify-content: space-between; margin-bottom: 1.5rem; }
.rail { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0; flex-wrap: wrap; counter-reset: s; }
.rail li { counter-increment: s; display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.rail li::before { content: counter(s); width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: .72rem; border: 1px solid var(--line); background: var(--panel); }
.rail li:not(:last-child)::after { content: ""; width: 1.4rem; height: 2px; background: var(--line); border-radius: 2px; }
.rail li.done::before { content: "✓"; background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rail li.done:not(:last-child)::after { background: var(--accent); }
.rail li.now { color: var(--fg); font-weight: 600; }
.rail li.now::before { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 0 0 4px var(--accent-soft); }
.onboard-body { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2rem; align-items: start; }
.onboard-body:has(.preview[hidden]) { grid-template-columns: minmax(0, 1fr); }
.stage-wrap { max-width: 44rem; width: 100%; }
.stage { view-transition-name: stage; }
.q { font-size: clamp(1.7rem, 2.6vw, 2.4rem); letter-spacing: -.03em; line-height: 1.12; margin: .2rem 0 .5rem; }
.sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; max-width: 38rem; }
.hint { color: var(--muted); font-size: .85rem; margin: 1rem 0 .4rem; }
.actions { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.kbd-hint { font-size: .8rem; }
.tiles { display: grid; gap: 1rem; }
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tiles.three { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom: 1rem; }
.tile { all: unset; box-sizing: border-box; position: relative; cursor: pointer; display: flex; flex-direction: column; gap: .45rem; padding: 1.25rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lift); }
.tile kbd { position: absolute; top: .9rem; right: .9rem; }
.tile-icon { width: 2.4rem; height: 2.4rem; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.icon { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-title { font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em; color: var(--fg); }
.tile-text { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip { all: unset; cursor: pointer; font-size: .88rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); transition: border-color .15s, background .15s, transform .12s; }
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.req-list, .src-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.req, .src { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); animation: rise .25s ease both; }
.req-n { font: 650 .75rem var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: .2rem .45rem; }
.req-body { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.src .row { flex: 1; } .src .row label { margin-top: 0; }
.req-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; }
.preview { position: sticky; top: 5rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-lift); view-transition-name: preview; }
.preview.full { position: static; box-shadow: var(--shadow); max-width: 44rem; }
.pv-head h3 { margin: .1rem 0; font-size: 1.15rem; }
.pv { border-top: 1px dashed var(--line); padding: .7rem 0 .2rem; margin-top: .6rem; transition: background .4s ease; border-radius: 8px; }
.pv.lit { animation: lit 1.1s ease both; }
.pv p { margin: .2rem 0; }
.pv-empty { color: var(--muted); font-style: italic; }

/* ---------- overview ---------- */
.next { position: relative; margin: 0 0 1.25rem; padding: 1.4rem 1.5rem; border-radius: calc(var(--radius) + 4px); background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lift); animation: rise .35s ease both; }
.next h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: .1rem 0 .35rem; }
.next .lead { font-size: 1.02rem; margin: 0 0 1rem; max-width: 46rem; }
.next.risky { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 14%, transparent), var(--shadow-lift); }
.next.done { box-shadow: var(--shadow); }
.resolved { display: grid; grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr); gap: 1rem; padding: 1rem; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: .75rem; }
.resolved select { width: auto; }
.allows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.allows li { padding-left: 1.4rem; position: relative; }
.allows li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.ack { display: flex; gap: .6rem; align-items: flex-start; color: var(--fg); font-size: .92rem; margin: .75rem 0; }
.ack input { width: auto; margin-top: .25rem; }
.big-btn { font-size: 1.02rem; padding: .7rem 1.5rem; }
.journey { list-style: none; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; padding: 0; margin: 0 0 1.5rem; }
.journey li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; font-size: .72rem; color: var(--muted); padding: 0 .2rem; }
.journey li::before { content: ""; position: absolute; top: .5rem; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.journey li:first-child::before { display: none; }
.journey .dot { position: relative; z-index: 1; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--panel); border: 2px solid var(--line); }
.journey li.done { color: var(--fg); } .journey li.done::before { background: var(--accent); }
.journey li.done .dot { background: var(--accent); border-color: var(--accent); }
.journey li.now { color: var(--fg); font-weight: 650; }
.journey li.now .dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); animation: pulse 2s ease-in-out infinite; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.plan-grid .panel { margin: 0; }
.task { border-style: dashed; }

/* legacy blocks still used by older screens */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: .5rem 0 1rem; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: var(--bg); display: flex; flex-direction: column; }
.choice > p.muted { flex: 1; } .choice h3 { margin-top: 0; } .choice button { align-self: flex-start; }
.radios { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: .25rem 0 .5rem; }
label.inline { display: inline-flex; gap: .4rem; align-items: center; color: var(--fg); font-size: .95rem; margin: 0; }
label.inline input { width: auto; }
.rows .item { align-items: start; border-bottom: 1px dashed var(--line); padding: .25rem 0 .5rem; }
.narrow { flex: 0 0 auto !important; }
ol.checklist { list-style: none; padding-left: 0; } ol.checklist li { padding: .2rem 0; }
ol.checklist li.done { color: var(--ok); } ol.checklist li.later { color: var(--muted); } ol.checklist li.next { font-weight: 600; }
ol.checklist .mark { display: inline-block; width: 1.2rem; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lit { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--accent-soft); } 50% { box-shadow: 0 0 0 9px transparent; } }
::view-transition-old(stage) { animation: .18s ease both fade-out; }
::view-transition-new(stage) { animation: .28s ease both slide-in; }
@keyframes fade-out { to { opacity: 0; transform: translateX(-12px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::view-transition-group(*) { animation: none !important; transition: none !important; } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .onboard-body { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; order: -1; }
  .resolved { grid-template-columns: minmax(0, 1fr); }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1rem; }
  .journey li::before { display: none; }
  .req-add { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .wrap { padding: 1rem 1rem 3rem; }
  .rail { display: none; } /* "Step N of M" above the question carries progress on phones */
  .onboard-top { justify-content: flex-end; margin-bottom: .5rem; }
  .q { font-size: 1.6rem; }
}
@media (pointer: coarse) { .tile kbd, .kbd-hint { display: none; } }
/* ---------- AI intake + connect ---------- */
.fine { color: var(--muted); font-size: .8rem; margin: .9rem 0 .4rem; }
.understood { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.understood .lead { font-size: 1.1rem; margin-top: 0; }
.connect-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin: .75rem 0; }
.connect-row > div:first-child { flex: 1 1 14rem; }
.connect-row .grow { flex: 2 1 18rem; }
.steps-mini { margin: 0 0 1rem; padding-left: 1.3rem; } .steps-mini li { margin: .35rem 0; }
.stage textarea.big + .chips { margin-top: .9rem; }
/* AI wait: a bar that eases toward 90% over ~12s, then the real result replaces it */
.thinking { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.thinking .track { flex: 0 0 180px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.thinking .bar { display: block; height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 12s cubic-bezier(.2,.7,.3,1); }
.thinking .bar.go { width: 90%; }
@media (prefers-reduced-motion: reduce) { .thinking .bar { transition: none; width: 60%; } }
/* signed-out landing */
.landing { max-width: 760px; margin: 8vh auto 0; }
.landing h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; margin: .2rem 0 1rem; letter-spacing: -.02em; }
.landing .lead { font-size: 1.12rem; max-width: 62ch; }
.landing .points { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.landing .points li { display: flex; gap: .9rem; align-items: flex-start; }
.landing .points .n { flex: 0 0 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.landing .points p { margin: .15rem 0 0; }
.journey.short { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; font-size: .85rem; }
.journey.short li { font-size: .82rem; }
.access .connect-row { align-items: flex-start; }

.plan-grid .panel:has(table) { grid-column: 1 / -1; } /* tables need the full row, never a third of it */
.thinking .bar.pulse { width: 100% !important; transition: none; animation: writing 1.6s ease-in-out infinite; transform-origin: left; }
@keyframes writing { 0% { opacity: .35; } 50% { opacity: 1; } 100% { opacity: .35; } }
.panel.understood + .thinking, .stage .thinking:first-child { margin: 0 0 1rem; }
/* ---------- discovery report ---------- */
.discovery { margin: 1.25rem 0 1.5rem; }
.report { display: grid; gap: 1rem; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.rep-head h2 { margin: 0; }
.rep-risk { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.risk { font-weight: 700; padding: .35rem .8rem; border-radius: 99px; font-size: .9rem; }
.risk-critical, .risk-high { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.risk-moderate { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.risk-low { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.sev-counts { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.sev { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .2rem .55rem; }
.sev b { color: var(--fg); }
.sev-critical { --sev: var(--bad); } .sev-high { --sev: #e5484d; } .sev-medium { --sev: var(--warn); } .sev-low { --sev: var(--muted); }
.sev.sev-critical b, .sev.sev-high b { color: var(--sev); }
.rep-summary .lead { font-size: 1.08rem; line-height: 1.6; margin: 0; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.rep-grid > .panel, .report > .panel { margin: 0; }
.rep-plan { padding-left: 1.2rem; display: grid; gap: .9rem; }
.rep-plan .row-top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.rep-plan p { margin: .2rem 0 .4rem; }
.chip-sm { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: .1rem .5rem; white-space: nowrap; }
.fids { display: flex; gap: .35rem; flex-wrap: wrap; }
.fid { display: inline-block; font: 600 .75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .25rem .45rem; border-radius: 6px; text-decoration: none;
  color: var(--sev, var(--muted)); background: color-mix(in srgb, var(--sev, var(--muted)) 14%, transparent); }
.sev-group { margin-bottom: 1rem; }
.sev-h { color: var(--sev); margin: .8rem 0 .4rem; }
.finding { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; margin: .35rem 0; }
.finding > summary { color: var(--fg); font-weight: 500; }
.finding-body h5 { margin: .7rem 0 .2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.finding-body p { margin: 0; }
.coverage { list-style: none; padding: 0; display: grid; gap: .7rem; }
.coverage p { margin: .15rem 0 0; }
.cov { font-size: .72rem; font-weight: 700; border-radius: 6px; padding: .15rem .45rem; }
.cov-covered { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.cov-partly { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.cov-not_covered { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.cost-months { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cost-months > div { display: flex; flex-direction: column; }
.cost-months b { font-size: 1.2rem; }
.muted-panel { color: var(--muted); }
.arch-wrap { overflow-x: auto; margin: .6rem 0; }
.arch { width: 100%; min-width: 760px; height: auto; }
.arch .col-title { fill: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.arch .edge { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .75; }
.arch .edge.inferred { stroke-dasharray: 5 5; opacity: .5; }
.arch .node rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.2; }
.arch .node.tier-edge rect { stroke: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.arch .node.flagged rect { stroke: var(--bad); stroke-width: 2; }
.arch .node-label { fill: var(--fg); font-size: 12.5px; font-weight: 600; }
.arch .node-sub { fill: var(--muted); font-size: 10.5px; }
@media print {
  header.top, nav, .tabs, .next, .journey, .access, .plan-grid, .no-print, .toast { display: none !important; }
  .finding { break-inside: avoid; } .finding:not([open]) .finding-body { display: block; }
  body { background: #fff; }
}
.report > *, .rep-grid > * { min-width: 0; } /* a grid item would otherwise grow to the diagram's min-width and push the page sideways */
.finding > summary { overflow-wrap: anywhere; }
@media (max-width: 640px) { .rep-risk { align-items: flex-start; } .sev-counts { justify-content: flex-start; } }
/* ---------- GitHub + builds ---------- */
.build { margin: 1.25rem 0; display: grid; gap: 1rem; }
.build .panel { margin: 0; }
.job .steps { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; font-size: .88rem; max-height: 22rem; overflow: auto; }
.job .steps li { overflow-wrap: anywhere; }
.job .step-command { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.job-error h3 { color: var(--bad); } .job-done h3 { color: var(--ok); }
.gh-steps { padding-left: 1.2rem; display: grid; gap: .45rem; margin: .4rem 0 .9rem; }
.gh-steps li.done { color: var(--muted); }
/* connection cards: a labelled header, a status pill, floating panel (not clickable, so no hover) */
.conn { margin-top: 1.25rem; padding: 1.25rem 1.4rem; border-radius: 16px; box-shadow: var(--shadow-lift); max-width: 46rem; }
.conn-head { display: flex; align-items: center; gap: .85rem; }
.conn-icon { width: 34px; height: 34px; flex: 0 0 34px; fill: var(--fg); }
.conn-title { flex: 1; }
.conn-title .eyebrow { margin: 0; }
.conn-title h3 { margin: .05rem 0 0; font-size: 1.15rem; }
.conn-what { margin: .7rem 0 .9rem; }
.pill { font-size: .75rem; font-weight: 650; padding: .25rem .6rem; border-radius: 99px; white-space: nowrap; }
.pill-on { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.pill-off { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.panel { border-radius: 14px; }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.seg-tabs { display: flex; gap: .3rem; padding: .3rem; margin: 0 0 1.4rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; width: fit-content; max-width: 100%; }
.seg-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.seg-tabs a:hover { color: var(--fg); background: var(--panel-2); }
.seg-tabs a.on { color: #fff; background: linear-gradient(180deg, #3b74f2, var(--accent)); box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.seg-tabs .count { background: var(--accent-soft); color: var(--accent); }
.seg-tabs a.on .count { background: rgba(255, 255, 255, .25); color: #fff; }
.pill { font-size: .75rem; font-weight: 700; padding: .28rem .7rem; border-radius: 99px; white-space: nowrap; }
.pill-on { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.pill-off { color: var(--muted); background: color-mix(in srgb, var(--muted) 13%, transparent); }
.pill-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---------- tiles with depth: a top highlight, layered shadow, a slight lean toward the pointer ---------- */
.tile3d { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.15rem 1.25rem; border-radius: var(--radius); color: var(--fg); text-decoration: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 100%, #fff 0%), var(--panel-2)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; will-change: transform; }
.tile3d::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 0%), rgba(99, 140, 255, .12), transparent 45%); }
a.tile3d:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
a.tile3d:hover::after { opacity: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.stat-n { font-size: 2rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.stat.warn .stat-n { color: var(--warn); }
.tiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.tiles-grid.three { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 1.2rem; }
.project-tile { min-height: 9.5rem; }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pt-top .eyebrow { margin: 0; }
.pt-name { font-size: 1.12rem; letter-spacing: -.01em; margin-top: .3rem; }
.pt-next { color: var(--fg); font-size: .9rem; margin-top: auto; }
.tile3d.mini strong { font-size: .98rem; line-height: 1.4; }
.report-ready { margin-top: 1.2rem; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.welcome.tile3d { max-width: 40rem; margin: 8vh auto 0; text-align: center; align-items: center; padding: 2.4rem 2rem; }
.panel, .next, .preview { box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow); }
.rows { list-style: none; padding: 0; margin: 0; display: grid; }
.rows li { padding: .55rem 0; border-bottom: 1px solid var(--line); } .rows li:last-child { border-bottom: 0; }
.rows.big li { padding: 0; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem .4rem; color: var(--fg); text-decoration: none; border-radius: 10px; }
.row-link:hover { background: var(--panel-2); }
.row-main { display: flex; flex-direction: column; gap: .1rem; }
.list-panel { padding: .4rem .8rem; }

/* ---------- phones: the navigation slides in ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 264px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 40px rgba(0, 0, 0, .3); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: .5rem 1rem; }
  .wrap { padding: 1.2rem 1rem 3rem; }
}
@media (prefers-reduced-motion: reduce) { .tile3d, a.tile3d:hover { transform: none !important; transition: none; } }
@media print { .side, .topbar, .seg-tabs { display: none !important; } .shell { display: block; } }

/* ---------- dashboard ---------- */
a.stat { text-decoration: none; }
.stat-hint { font-size: .8rem; font-weight: 600; color: var(--accent); margin-top: .35rem; opacity: .85; }
a.stat:hover .stat-hint { opacity: 1; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; margin-bottom: .6rem; }
.dash-grid > .panel { margin: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.panel-head h3 { margin: 0 0 .6rem; }
.panel-head.spaced { margin: 1.6rem 0 .9rem; }
.empty { padding: 1.4rem .6rem; text-align: center; }
.empty p { margin: .3rem 0 0; }
.row-icon { flex: 0 0 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.row-icon.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.row-link .row-main { flex: 1; }
.small-btn { font-size: .82rem; padding: .35rem .8rem; border-radius: 9px; }
.conn-row { display: flex; align-items: center; justify-content: space-between; }
.lead-in { margin: -.4rem 0 1rem; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- left nav: every project, the open one unfolded ---------- */
.nav-proj { display: flex; flex-direction: column; }
.nav-sub-title { display: flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--side-fg); border-radius: 8px; }
.nav-sub-title:hover { background: var(--side-hover); color: var(--side-on); }
.nav-proj.open > .nav-sub-title { color: var(--side-on); font-weight: 650; }
.nav-sub-title .caret { width: .8rem; font-size: .7rem; opacity: .7; }
.np-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-warn { width: 7px; height: 7px; border-radius: 50%; background: #f5a524; flex: 0 0 7px; }
.nav-sections { margin: 1px 0 6px 1rem; padding-left: .55rem; border-left: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 1px; }
.nav-sub-item.more { color: var(--side-muted); font-size: .82rem; }

/* ---------- report: tabs, summary hero, grouped findings ---------- */
.report .rep-head { margin-bottom: .9rem; }
.rep-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.rep-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 0 0 1.3rem; overflow-x: auto; }
.rep-tabs button { background: none; box-shadow: none; color: var(--muted); border-radius: 0; padding: .7rem .95rem; border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; }
.rep-tabs button:hover { color: var(--fg); transform: none; filter: none; }
.rep-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.rep-body { display: grid; gap: 1.1rem; scroll-margin-top: 5rem; }
.rep-body > .panel { margin: 0; }
.sum-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.1rem; }
.risk-card { border-left: 4px solid var(--warn); }
.risk-card.risk-critical, .risk-card.risk-high { border-left-color: var(--bad); }
.risk-card.risk-low { border-left-color: var(--ok); }
.risk-word { font-size: 1.6rem; letter-spacing: -.02em; }
.risk-high .risk-word, .risk-critical .risk-word { color: var(--bad); } .risk-moderate .risk-word { color: var(--warn); } .risk-low .risk-word { color: var(--ok); }
.headline { font-size: 1.08rem; line-height: 1.5; margin: .2rem 0 0; color: var(--fg); }
.sev-bars { display: grid; gap: .55rem; margin-top: .5rem; }
.sev-bar { display: grid; grid-template-columns: 5rem 1fr 2rem; align-items: center; gap: .7rem; background: none; box-shadow: none; color: var(--fg); padding: .15rem 0; font-weight: 500; }
.sev-bar:hover { transform: none; filter: none; } .sev-bar:hover .sb-label { color: var(--accent); }
.sev-bar b { text-align: right; }
.sb-label { text-align: left; font-size: .88rem; }
.sb-track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.sb-fill { display: block; height: 100%; border-radius: inherit; background: var(--sev, var(--accent)); min-width: 2px; }
.sb-fill.cost { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.sev-critical { --sev: #b4232a; } .sev-high { --sev: #e5484d; } .sev-medium { --sev: #e5a00d; } .sev-low { --sev: #8b94a7; }
.points { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.points li { line-height: 1.5; }
.sec-title { margin: .4rem 0 0; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .9rem; }
.area-tile { text-align: left; align-items: flex-start; cursor: pointer; font: inherit; border-left: 4px solid var(--sev, var(--ok)); }
.area-tile.clean { border-left-color: var(--ok); }
.area-tile:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow-lift); filter: none; }
.area-n { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
.area-tile.clean .area-n { color: var(--ok); }
.step-tile { text-align: left; align-items: flex-start; font: inherit; cursor: pointer; }
.step-tile:hover { filter: none; }
.step-n { width: 1.7rem; height: 1.7rem; border-radius: 9px; display: inline-grid; place-items: center; font-weight: 750; font-size: .85rem; color: #fff; background: linear-gradient(180deg, #3b74f2, var(--accent)); flex: 0 0 1.7rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.fact { display: flex; flex-direction: column; gap: .1rem; }
.filters { display: flex; flex-direction: column; gap: .5rem; }
.fgroup { display: flex; gap: .4rem; flex-wrap: wrap; }
.fchip { background: var(--panel); color: var(--fg); border: 1px solid var(--line); box-shadow: none; padding: .32rem .75rem; border-radius: 99px; font-size: .83rem; font-weight: 600; }
.fchip:hover { transform: none; filter: none; border-color: var(--accent); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fchip[class*="sev-"]:not(.on)::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sev); margin-right: .1rem; }
.fg-list { display: grid; gap: .6rem; }
.fgroup-row { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--sev); border-radius: 12px; box-shadow: var(--shadow); }
.fgroup-row > summary { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; cursor: pointer; list-style: none; color: var(--fg); }
.fgroup-row > summary::-webkit-details-marker { display: none; }
.fgroup-row[open] > summary { border-bottom: 1px solid var(--line); }
.sev-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sev); flex: 0 0 9px; }
.fg-title { font-weight: 650; flex: 1; }
.sev-pill { color: var(--sev); background: color-mix(in srgb, var(--sev) 14%, transparent); }
.fg-body { padding: .9rem 1rem 1rem; display: grid; gap: .8rem; }
.fix-box { background: var(--accent-soft); border-radius: 10px; padding: .7rem .9rem; }
.fix-box h5 { margin: 0 0 .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.fix-box p { margin: 0; }
.res-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.res-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.res-table td { padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.res-table tr:last-child td { border-bottom: 0; }
.plan-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.plan-step .ps-head { display: flex; align-items: center; gap: .7rem; }
.plan-step .ps-head strong { flex: 1; font-size: 1.02rem; }
.plan-step p { margin: .3rem 0 .5rem; }
.cost-row { display: grid; grid-template-columns: minmax(0, 14rem) 1fr 5rem; align-items: center; gap: .8rem; padding: .35rem 0; font-size: .9rem; }
.cost-row b { text-align: right; }
@media (max-width: 900px) { .sum-hero { grid-template-columns: minmax(0, 1fr); } .fg-area { display: none; } .cost-row { grid-template-columns: minmax(0, 1fr) 4rem; } .cost-row .sb-track { display: none; } }

/* ---------- Fix it ---------- */
.fix-panel { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.fix-panel textarea { margin: .5rem 0; }
.fix-out { display: grid; gap: .8rem; margin-top: .6rem; }
.fix-questions .fq { margin: .4rem 0 .8rem; }
.fix-questions .fq p { margin: 0 0 .4rem; font-weight: 600; }
.chg { display: grid; gap: .8rem; }
.chg-block { border-radius: 12px; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--sev, var(--line)); background: var(--panel); }
.chg-block h4 { margin: 0 0 .5rem; color: var(--fg); }
.chg-bad { --sev: var(--bad); } .chg-warn { --sev: var(--warn); } .chg-info { --sev: var(--accent); } .chg-ok { --sev: var(--ok); }
.chg-ok p { margin: 0; font-weight: 600; }
.chg-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.chg-list li { display: flex; flex-direction: column; }
.chg-warn h4, .chg-warn { }
section.chg-warn:not(.chg-block) { background: color-mix(in srgb, var(--warn) 10%, transparent); border-radius: 12px; padding: .8rem 1rem; }
.apply-panel .big-btn { margin-top: .3rem; }
.res-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; }
.res { display: flex; gap: .7rem; align-items: flex-start; }
.res p { margin: .1rem 0 0; }
.res-mark { flex: 0 0 1.6rem; height: 1.6rem; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
.res-done .res-mark { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.res-failed .res-mark { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.res-skipped .res-mark { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.res-info .res-mark { color: var(--accent); background: var(--accent-soft); }
.fix-box .small-btn { margin-top: .6rem; }
.fix-ideas { margin: .2rem 0 .3rem; }
.fix-ideas .fchip { text-align: left; white-space: normal; font-weight: 500; }
.tab-hint kbd, .fix-panel .actions kbd { margin: 0 .1rem; }
.fix-panel .helper { margin: .2rem 0 .5rem; color: var(--muted); font-size: .9rem; }
.ask-wrap { position: relative; }
.ask-wrap textarea { padding-bottom: 2.2rem; }
.tab-badge { position: absolute; right: .7rem; bottom: .75rem; font-size: .78rem; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border-radius: 8px; padding: .2rem .5rem; pointer-events: none; }
.tab-badge kbd { background: var(--panel); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }

/* ---------- signed-out hero: the four layers as an isometric stack ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; min-height: calc(100vh - 7rem); max-width: 72rem; margin: 0 auto; }
.hero-copy h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.06; margin: .2rem 0 1rem; letter-spacing: -.03em; }
.hero-copy .lead { font-size: 1.12rem; max-width: 58ch; }
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.stack3d { position: relative; width: 100%; height: 470px; perspective: 1500px; display: grid; place-items: center; }
.stack3d .scene { list-style: none; margin: 0; padding: 0; position: relative; width: 250px; height: 170px; transform-style: preserve-3d; margin-top: 190px;
  transform: rotateX(calc(54deg + var(--py, 0deg))) rotateZ(calc(-38deg + var(--px, 0deg))); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.stack3d .scene::before { content: ""; position: absolute; inset: 8%; border-radius: 30%; background: rgba(37, 66, 140, .28); filter: blur(26px); transform: translateZ(-34px); }
.layer { position: absolute; inset: 0; border-radius: 20px; transform: translateZ(var(--z)); display: flex; flex-direction: column; justify-content: flex-end; gap: .1rem; padding: 1rem 1.25rem;
  color: var(--l-ink); background: var(--l-bg); border: 1px solid var(--l-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 24px 40px -26px rgba(15, 30, 90, .6);
  animation: layer-in .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 160ms + 120ms); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; outline: none; cursor: default; }
.layer strong { font-size: 1.2rem; letter-spacing: -.01em; } .layer span { font-size: .8rem; opacity: .85; }
.layer.on, .layer:focus-visible { transform: translateZ(calc(var(--z) + 26px)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 2px var(--accent), 0 34px 50px -24px rgba(15, 30, 90, .7); }
.layer.l0 { --l-bg: color-mix(in srgb, var(--accent) 92%, #0b1640); --l-ink: #fff; --l-line: transparent; }
.layer.l1 { --l-bg: color-mix(in srgb, var(--accent) 68%, var(--panel)); --l-ink: #fff; --l-line: transparent; }
.layer.l2 { --l-bg: color-mix(in srgb, var(--accent) 30%, var(--panel)); --l-ink: color-mix(in srgb, var(--accent) 70%, var(--fg)); --l-line: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.layer.l3 { --l-bg: color-mix(in srgb, var(--panel) 82%, transparent); --l-ink: color-mix(in srgb, var(--accent) 70%, var(--fg)); --l-line: color-mix(in srgb, var(--accent) 25%, var(--line));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes layer-in { from { opacity: 0; transform: translateZ(calc(var(--z) + 170px)); } }
.stack-cap { min-height: 4.6rem; max-width: 26rem; text-align: center; }
.stack-cap strong { font-size: .95rem; } .stack-cap p { margin: .25rem 0 0; font-size: .92rem; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1rem; min-height: 0; padding-top: 2vh; }
  .stack3d { height: 330px; } .stack3d .scene { width: 190px; height: 130px; margin-top: 110px; }
  .layer { padding: .7rem .9rem; } .layer strong { font-size: 1rem; }
}

/* ---------- onboarding: the current step is the top card; finished steps stack behind it ---------- */
.deck { position: relative; padding-top: calc(var(--k, 0) * 2.1rem); }
.ghost-card { position: absolute; left: 0; right: 0; top: calc((var(--k) - var(--n)) * 2.1rem); height: 4rem; z-index: calc(10 - var(--n));
  transform: scale(calc(1 - var(--n) * .035)); transform-origin: 50% 0; display: flex; align-items: flex-start; gap: .5rem; padding: .5rem 1.2rem;
  background: var(--panel-2); color: var(--muted); font-weight: 500; font-size: .85rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 16px -10px rgba(15, 30, 90, .35); }
.ghost-card:hover { transform: scale(calc(1 - var(--n) * .035)) translateY(-3px); filter: none; color: var(--fg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ghost-card .gc-check { color: var(--accent); font-weight: 700; }
.stage.card-top { position: relative; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem 1.4rem;
  box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow-lift); }
::view-transition-old(stage) { animation: .22s ease both card-away; }
::view-transition-new(stage) { animation: .34s cubic-bezier(.2, .8, .2, 1) both card-deal; }
html[data-dir="back"]::view-transition-old(stage) { animation: .2s ease both card-drop; }
html[data-dir="back"]::view-transition-new(stage) { animation: .32s cubic-bezier(.2, .8, .2, 1) both card-lift; }
@keyframes card-away { to { opacity: 0; transform: translateY(-26px) scale(.95); } }
@keyframes card-deal { from { opacity: 0; transform: perspective(1200px) translateY(22px) rotateX(9deg) scale(.98); } }
@keyframes card-drop { to { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes card-lift { from { opacity: 0; transform: translateY(-22px) scale(.96); } }
@media (max-width: 860px) { .stage.card-top { padding: 1.1rem 1rem; } .deck { padding-top: calc(var(--k, 0) * 1.8rem); } .ghost-card { top: calc((var(--k) - var(--n)) * 1.8rem); } }
.journey.four { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; } /* a style attribute here was blocked by the CSP */
.tiles-grid.four { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 1.2rem; }

/* ---------- project docs ---------- */
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin: .4rem 0 1.2rem; }
.doc-head h2 { margin: 0 0 .2rem; font-size: 1.5rem; letter-spacing: -.02em; }
.doc-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.doc-toc { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: 2px; padding: .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow); }
.doc-toc .stat-label { margin: 0 0 .4rem .4rem; }
.toc-link { background: none; box-shadow: none; color: var(--muted); font-weight: 500; justify-content: flex-start; padding: .35rem .5rem; border-radius: 8px; text-align: left; }
.toc-link:hover { background: var(--accent-soft); color: var(--accent); transform: none; filter: none; }
.doc-body { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.doc-sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: inset 0 1px 0 var(--tile-top), var(--shadow); scroll-margin-top: 4.5rem; }
.doc-sec h2 { font-size: 1.15rem; margin: 0 0 .7rem; letter-spacing: -.01em; }
.doc-sec blockquote { margin: .8rem 0; padding: .6rem .9rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0; }
.doc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem; margin-top: 1rem; }
.doc-facts > div { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; background: var(--panel-2); border-radius: var(--radius-sm); }
.doc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.doc-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.doc-table td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.doc-ms li { margin: .35rem 0; }
.flow-wrap { overflow-x: auto; padding: .3rem 0; }
.flow { max-width: 100%; height: auto; display: block; }
.flow-node rect { fill: var(--panel-2); stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); stroke-width: 1.2; }
.flow-node:first-of-type rect { fill: var(--accent-soft); }
.flow-node.st-done rect { fill: color-mix(in srgb, var(--ok) 12%, var(--panel)); stroke: var(--ok); }
.flow-node.st-now rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.flow-node.st-later rect { stroke-dasharray: 4 4; }
.fn-title { font-size: 13px; font-weight: 650; fill: var(--fg); }
.fn-sub { font-size: 11px; fill: var(--muted); }
.fn-link { font-size: 11px; font-weight: 700; fill: var(--accent); }
.flow-edge { stroke: var(--accent); stroke-width: 1.6; fill: none; }
.flow-head { fill: var(--accent); }
.flow-legend { margin: .6rem 0 .4rem; padding-left: 1.3rem; display: grid; gap: .2rem; font-size: .92rem; }
.docs-empty { max-width: 44rem; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .doc-toc { position: static; flex-direction: row; flex-wrap: wrap; } }
@media print { .doc-layout { display: block; } .doc-sec { box-shadow: none; break-inside: avoid; margin-bottom: .8rem; } .doc-toc, .no-print { display: none !important; } }
.proof { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.proof h4 { margin: 0 0 .2rem; font-size: .95rem; }
.blockers { margin: .4rem 0 .6rem; padding-left: 1.2rem; display: grid; gap: .3rem; color: var(--bad); }
.create-org { text-align: left; align-items: stretch; }
.create-org label { margin-top: .6rem; }
.create-org .actions { justify-content: flex-start; }
.since { margin-bottom: 1.2rem; }
.since-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: .4rem 0 .8rem; }
.since-cell { display: flex; flex-direction: column; padding: .7rem .8rem; border-radius: var(--radius-sm); background: var(--panel-2); }
.since-cell strong { font-size: 1.4rem; letter-spacing: -.02em; } .since-cell span { color: var(--muted); font-size: .82rem; }
.since-cell.bad strong { color: var(--bad); } .since-cell.ok strong { color: var(--ok); }
.since h4 { margin: .6rem 0 .3rem; font-size: .9rem; }
.since-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .2rem; font-size: .9rem; }
.sev-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .45rem; background: var(--muted); }
.sev-dot.sev-critical { background: #b91c1c; } .sev-dot.sev-high { background: #ea580c; } .sev-dot.sev-medium { background: #ca8a04; } .sev-dot.sev-low { background: #64748b; }
@media (max-width: 700px) { .since-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------- connections hub ---------- */
.conn-hub { margin-bottom: 1.2rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; }
.hub-tile { gap: .3rem; padding: 1rem 1.1rem; }
.hub-tile .pill { align-self: flex-start; }
.hub-tile.later { opacity: .72; }
.slack-btn { background: #4a154b; color: #fff; }
.slack-btn:hover { background: #611f69; }
details.manual { margin-top: .8rem; } details.manual summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.second-opinion .review { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: .6rem 0; background: var(--panel-2); }
.review-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.review-head .muted { margin-left: auto; }
.concerns { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.pill-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

/* ---------- deploy: IaC choice, plan, approval, proof ---------- */
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem; margin: .25rem 0 .75rem; }
.seg { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; background: var(--panel-2); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; cursor: pointer; }
.seg.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.deploy { margin-top: 1rem; }
.deploy-plan .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .8rem; }
.deploy-plan .chip { font: 600 .82rem var(--mono); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem; }
.chip.act-add { color: var(--ok); } .chip.act-change { color: var(--accent); } .chip.act-replace { color: var(--warn); } .chip.act-delete { color: var(--bad); }
.plan-table { width: 100%; border-collapse: collapse; margin: .4rem 0 .8rem; font-size: .88rem; }
.plan-table td { border-top: 1px solid var(--line); padding: .35rem .5rem; vertical-align: top; overflow-wrap: anywhere; }
.plan-table td.act { font-weight: 700; white-space: nowrap; width: 5.5rem; }
.plan-table tr.act-add td.act { color: var(--ok); } .plan-table tr.act-change td.act { color: var(--accent); } .plan-table tr.act-replace td.act { color: var(--warn); } .plan-table tr.act-delete td.act { color: var(--bad); }
.plan-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: .8rem 0; }
.panel.inset { background: var(--panel-2); margin-top: .8rem; }
.deploy .proof { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .6rem; }
.deploy .proof li { margin: .25rem 0; }

/* Who did what */
.credit-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.credit { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .2rem 1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.credit-step { color: var(--muted); font-size: .9rem; }
.credit-note { grid-column: 2; }
.credit-kind { margin-right: .35rem; font-size: .72rem; }
.kind-ai { color: var(--accent, #4f46e5); background: color-mix(in srgb, var(--accent, #4f46e5) 13%, transparent); }
.kind-identity { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.kind-person { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.kind-code { color: var(--muted); background: color-mix(in srgb, var(--muted) 13%, transparent); }
@media (max-width: 640px) { .credit { grid-template-columns: 1fr; } .credit-note { grid-column: 1; } }

.scope-picks { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .6rem 0; }

/* ===================== Glass sidebar (curved, collapsible) ===================== */
.shell { grid-template-columns: 276px minmax(0, 1fr); transition: grid-template-columns .25s ease; }
body.side-mini .shell { grid-template-columns: 96px minmax(0, 1fr); }
.side { background: transparent; padding: 14px 0 14px 14px; overflow: visible; }
.glass { position: relative; height: 100%; display: flex; flex-direction: column; gap: .55rem; padding: 1rem .85rem; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  border-radius: 30px; color: var(--side-fg);
  background: linear-gradient(180deg, rgba(31, 48, 99, .94) 0%, rgba(15, 25, 58, .95) 45%, rgba(10, 17, 40, .97) 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 60px -24px rgba(8, 15, 40, .55), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  /* the curve: both long sides bow gently inward, wide at the top and bottom, narrow at the middle */
  -webkit-mask: radial-gradient(14px 46% at 0 50%, transparent 98%, #000 100%) left / 51% 100% no-repeat, radial-gradient(14px 46% at 100% 50%, transparent 98%, #000 100%) right / 51% 100% no-repeat;
  mask: radial-gradient(14px 46% at 0 50%, transparent 98%, #000 100%) left / 51% 100% no-repeat, radial-gradient(14px 46% at 100% 50%, transparent 98%, #000 100%) right / 51% 100% no-repeat; }
.glass::-webkit-scrollbar { display: none; }
.glass::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none; border-radius: 30px 30px 0 0;
  background: radial-gradient(120% 90% at 30% 0%, rgba(140, 170, 255, .22), transparent 70%); }
.g-brand { display: flex; align-items: center; gap: .4rem; padding: .1rem .2rem .3rem; }
.g-brand .side-brand { padding: .2rem; flex: 1; min-width: 0; }
.wordmark { text-transform: uppercase; letter-spacing: .28em; font-size: .82rem; font-weight: 700; }
.gem { display: inline-block; width: 26px; height: 26px; flex: 0 0 26px; clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%);
  background: linear-gradient(160deg, #e9f0ff 0%, #8fb2ff 30%, #6d5bff 62%, #3a2a9e 100%); filter: drop-shadow(0 0 8px rgba(130, 150, 255, .8)); border-radius: 0; box-shadow: none; }
.side-brand .logo.gem { width: 22px; height: 26px; border-radius: 0; box-shadow: none; }
.gem.big { width: 54px; height: 64px; flex: 0 0 54px; animation: gem-float 5s ease-in-out infinite; }
@keyframes gem-float { 50% { transform: translateY(-4px) rotate(3deg); } }
.g-toggle { color: var(--side-muted); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: .3rem; }
.g-toggle:hover { color: var(--side-on); background: rgba(255, 255, 255, .12); }
.g-toggle .ico { width: 16px; height: 16px; }
.g-user { display: flex; align-items: center; gap: .65rem; padding: .55rem; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.avatar { position: relative; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6d9bff, #8b5cf6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 8px 18px -6px rgba(109, 155, 255, .8); }
.avatar .online { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px #121d42; }
.g-user-text { display: flex; flex-direction: column; min-width: 0; gap: .15rem; }
.g-user .who-name { color: var(--side-on); font-weight: 600; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-badges { display: flex; gap: .35rem; align-items: center; }
.g-badges .env { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1b1440; background: linear-gradient(135deg, #f5f7ff, #c9d6ff); border-radius: 99px; padding: .02rem .45rem; }
.g-badges .muted-in { font-size: .7rem; color: var(--side-muted); }
.g-label { margin: .4rem .5rem 0; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--side-muted); display: flex; align-items: center; gap: .5rem; }
.g-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent); }
.side-nav { gap: 3px; }
.nav-item { position: relative; gap: .7rem; padding: .42rem .5rem; border-radius: 14px; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.nav-ico { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.nav-ico .ico { width: 16px; height: 16px; }
.nav-item.on { background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07)); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.nav-item.on::before { content: ""; position: absolute; left: -.85rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: #cfe0ff; box-shadow: 0 0 10px #8fb2ff; }
.nav-item.on .nav-ico { background: #f2f6ff; color: #1a2550; border-color: transparent; }
.nav-item.within .nav-ico { background: rgba(143, 178, 255, .22); color: var(--side-on); }
.nav-item .count { margin-left: auto; }
.nav-sub { margin: 2px 0 6px 1.45rem; border-left: 1px solid rgba(255, 255, 255, .16); }
.nav-sub-item.on { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); }
.g-notice { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .75rem .8rem; border-radius: 18px; text-decoration: none; color: var(--side-fg);
  background: radial-gradient(120% 140% at 100% 50%, rgba(109, 91, 255, .45), transparent 60%), linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14); transition: transform .15s; }
.g-notice:hover { transform: translateY(-2px); }
.g-notice-text { display: flex; flex-direction: column; gap: .1rem; font-size: .76rem; line-height: 1.35; min-width: 0; }
.g-notice-text strong { color: var(--side-on); font-size: .88rem; }
.g-notice-eyebrow { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: #b8c8ff; }
.g-gem { margin-top: auto; display: grid; place-items: center; padding: .8rem 0; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .12); }
.side-foot { margin-top: .3rem; border-top: 1px solid rgba(255, 255, 255, .1); gap: .4rem; }
.g-out { background: none; box-shadow: none; color: var(--side-fg); font: inherit; font-weight: 500; width: 100%; cursor: pointer; text-align: left; }
.g-out:hover { background: var(--side-hover); color: var(--side-on); transform: none; filter: none; }
/* collapsed: an icon rail */
body.side-mini .glass { padding: .9rem .55rem; align-items: center; }
body.side-mini .wordmark, body.side-mini .nav-label, body.side-mini .g-user-text, body.side-mini .g-label, body.side-mini .nav-item .count { display: none; }
body.side-mini .g-brand { flex-direction: column; gap: .5rem; }
body.side-mini .g-user { padding: .3rem; background: none; border: 0; }
body.side-mini .nav-item { padding: .3rem; justify-content: center; }
body.side-mini .nav-item.on::before { left: -.55rem; }
body.side-mini .side-foot { width: 100%; align-items: center; }
body.side-mini .g-gem { width: 100%; }
@media (max-width: 900px) {
  .shell, body.side-mini .shell { grid-template-columns: minmax(0, 1fr); }
  .side { width: 292px; padding: 10px; background: transparent; box-shadow: none; }
  body.side-mini .wordmark, body.side-mini .nav-label, body.side-mini .g-user-text, body.side-mini .g-label { display: initial; }
}
@media (prefers-reduced-motion: reduce) { .gem.big { animation: none; } .shell { transition: none; } }

/* ===================== AI console ===================== */
.brain { position: relative; margin: 0 0 1.4rem; padding: 1.2rem 1.3rem 1.3rem; border-radius: 24px; color: #dfe7fb; overflow: hidden;
  background: radial-gradient(90% 120% at 50% -10%, rgba(109, 91, 255, .38), transparent 60%), radial-gradient(60% 80% at 100% 100%, rgba(37, 99, 235, .25), transparent 70%), linear-gradient(180deg, #0f1938, #0a1128);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 24px 50px -28px rgba(10, 17, 40, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }
.brain::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask: linear-gradient(180deg, #000, transparent 70%); mask: linear-gradient(180deg, #000, transparent 70%); }
.brain > * { position: relative; z-index: 1; }
.brain .eyebrow { color: #b8c8ff; margin: 0; }
.brain .muted { color: #93a1c4; }
.brain-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.brain-core { display: flex; align-items: center; gap: 1.2rem; max-width: 46rem; margin: 0 auto; padding: .9rem 1.1rem; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.brain-id { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.brain-id h3 { margin: .15rem 0 0; color: #fff; font-size: 1.35rem; letter-spacing: -.01em; }
.orb { position: relative; flex: 0 0 84px; width: 84px; height: 84px; display: grid; place-items: center; }
.orb .core { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a9c1ff 25%, #6d5bff 60%, #2b1f86 100%); box-shadow: 0 0 24px 6px rgba(120, 130, 255, .55); }
.orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(160, 180, 255, .35); }
.orb .r2 { inset: 10px; border-color: rgba(160, 180, 255, .2); }
.orb.st-working .core { animation: orb-pulse 1.6s ease-in-out infinite; }
.orb.st-working .r1 { animation: ring-out 1.8s ease-out infinite; }
@keyframes orb-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 34px 10px rgba(120, 130, 255, .7); } }
@keyframes ring-out { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.brain-bus { height: 26px; margin: 0 auto; width: calc(100% - 4rem); position: relative; }
.brain-bus::before { content: ""; position: absolute; left: 50%; top: 0; height: 13px; width: 1px; background: linear-gradient(#8fb2ff, rgba(143, 178, 255, .4)); }
.brain-bus::after { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: linear-gradient(90deg, transparent, rgba(143, 178, 255, .55) 15%, rgba(143, 178, 255, .55) 85%, transparent); }
.brain-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: .7rem; }
.bnode { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .8rem .85rem; border-radius: 16px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .1); transition: transform .15s, border-color .15s; }
.bnode:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.bnode::before { content: ""; position: absolute; left: 50%; top: -13px; height: 13px; width: 1px; background: rgba(143, 178, 255, .45); }
.bnode.st-off { opacity: .6; }
.bnode-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.bname { color: #fff; font-size: .98rem; margin-top: .3rem; }
.bsub { font-size: .76rem; color: #a9b8e0; font-family: var(--mono, ui-monospace, monospace); overflow-wrap: anywhere; }
.brole { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8fa0c8; }
.btext { margin: .25rem 0 0; font-size: .84rem; line-height: 1.45; color: #cdd7f0; }
.bkind { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 99px; align-self: flex-start; }
.bkind.kind-ai { color: #d9d4ff; background: rgba(139, 92, 246, .28); }
.bkind.kind-identity { color: #bdf3d0; background: rgba(34, 197, 94, .2); }
.bkind.kind-person { color: #ffe2b3; background: rgba(245, 165, 36, .22); }
.bkind.kind-code { color: #cfd8ea; background: rgba(148, 163, 184, .2); }
.bstate { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; color: #a9b8e0; }
.bstate i { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.bstate.st-working { color: #c7d7ff; } .bstate.st-working i { background: #6d9bff; box-shadow: 0 0 0 0 rgba(109, 155, 255, .7); animation: dot-ping 1.4s infinite; }
.bstate.st-done { color: #9ae6b4; } .bstate.st-done i { background: #22c55e; }
.bstate.st-waiting { color: #fcd38d; } .bstate.st-waiting i { background: #f5a524; }
.bstate.st-off i { background: transparent; border: 1px solid #64748b; }
@keyframes dot-ping { 70% { box-shadow: 0 0 0 7px rgba(109, 155, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(109, 155, 255, 0); } }
@media (max-width: 640px) { .brain-core { flex-direction: column; text-align: center; } .brain-id { align-items: center; } .bnode::before, .brain-bus::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .orb .core, .orb .r1, .bstate i { animation: none !important; } }
/* fit a 900px-tall laptop screen without scrolling the menu */
.glass { gap: .4rem; }
.nav-item { padding: .32rem .5rem; }
.nav-ico { flex-basis: 28px; width: 28px; height: 28px; }
.g-user { padding: .45rem; }
.g-notice { padding: .6rem .7rem; }
.g-notice .gem.big { width: 40px; height: 48px; flex-basis: 40px; }
.bkind { white-space: nowrap; }
@media (max-height: 760px) { .g-notice { display: none; } .side-foot { margin-top: auto; } }
.brain-nodes { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 1100px) { .brain-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .brain-nodes { grid-template-columns: minmax(0, 1fr); } }
/* Connections */
.hub-tile { text-decoration: none; color: inherit; }
.hub-tile.is-on { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.hub-act { margin-top: auto; padding-top: .4rem; font-weight: 600; font-size: .86rem; color: var(--accent); }
.hub-later-title { margin: 1.4rem 0 .6rem; }
.ai-rows { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .5rem; }
.ai-rows li { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.ai-rows li.off { opacity: .7; }
.ai-rows li p { margin: .15rem 0 0; }
.ai-rows .bkind.kind-ai { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 13%, transparent); margin-top: .15rem; }
@media (max-width: 640px) { .ai-rows li { grid-template-columns: 1fr; } }
.hub-tile.later { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ===================== Chrome tones: the sidebar and the AI console are a darker shade of the page ===================== */
:root {
  --chrome-bg: linear-gradient(180deg, #e6ecf5 0%, #dce3ef 55%, #d4dcea 100%);
  --chrome-fg: #33405e; --chrome-muted: #6b7690; --chrome-on: #0f172a;
  --chrome-line: rgba(15, 23, 42, .09); --chrome-card: rgba(255, 255, 255, .55); --chrome-card-2: rgba(255, 255, 255, .78);
  --chrome-hover: rgba(15, 23, 42, .05); --chrome-glow: rgba(109, 120, 255, .16); --chrome-shadow: 0 24px 48px -28px rgba(30, 45, 90, .35);
}
[data-theme="dark"] {
  --chrome-bg: linear-gradient(180deg, #0c1328 0%, #080d1d 55%, #060a17 100%);
  --chrome-fg: #c9d3ea; --chrome-muted: #8592b3; --chrome-on: #ffffff;
  --chrome-line: rgba(255, 255, 255, .1); --chrome-card: rgba(255, 255, 255, .05); --chrome-card-2: rgba(255, 255, 255, .1);
  --chrome-hover: rgba(255, 255, 255, .06); --chrome-glow: rgba(109, 91, 255, .3); --chrome-shadow: 0 24px 50px -28px rgba(0, 0, 0, .8);
}
@media (prefers-color-scheme: dark) { [data-theme="system"] {
  --chrome-bg: linear-gradient(180deg, #0c1328 0%, #080d1d 55%, #060a17 100%);
  --chrome-fg: #c9d3ea; --chrome-muted: #8592b3; --chrome-on: #ffffff;
  --chrome-line: rgba(255, 255, 255, .1); --chrome-card: rgba(255, 255, 255, .05); --chrome-card-2: rgba(255, 255, 255, .1);
  --chrome-hover: rgba(255, 255, 255, .06); --chrome-glow: rgba(109, 91, 255, .3); --chrome-shadow: 0 24px 50px -28px rgba(0, 0, 0, .8);
} }

/* sidebar: page-toned, left side curved, right side straight */
.side { --side-fg: var(--chrome-fg); --side-muted: var(--chrome-muted); --side-on: var(--chrome-on); --side-hover: var(--chrome-hover); }
.glass { background: var(--chrome-bg); color: var(--chrome-fg); border: 1px solid var(--chrome-line); box-shadow: var(--chrome-shadow), inset 0 1px 0 rgba(255, 255, 255, .5);
  -webkit-mask: radial-gradient(14px 46% at 0 50%, transparent 98%, #000 100%) left / 51% 100% no-repeat, linear-gradient(#000, #000) right / 50% 100% no-repeat;
  mask: radial-gradient(14px 46% at 0 50%, transparent 98%, #000 100%) left / 51% 100% no-repeat, linear-gradient(#000, #000) right / 50% 100% no-repeat; }
.glass::before { background: radial-gradient(120% 90% at 30% 0%, var(--chrome-glow), transparent 70%); }
.g-toggle, .g-user, .nav-ico, .g-gem { background: var(--chrome-card); border-color: var(--chrome-line); }
.g-user .who-name { color: var(--chrome-on); }
.avatar .online { box-shadow: 0 0 0 2px #e2e8f2; }
.g-label::after { background: linear-gradient(90deg, var(--chrome-line), transparent); }
.nav-item.on { background: var(--chrome-card-2); border-color: var(--chrome-line); box-shadow: 0 8px 18px -12px rgba(30, 45, 90, .45); }
.nav-item.on::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav-item.on .nav-ico { background: var(--accent); color: #fff; }
.nav-item.within .nav-ico { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--chrome-on); }
.nav-sub { border-left-color: var(--chrome-line); }
.nav-sub-item.on { background: var(--chrome-card-2); border-color: var(--chrome-line); }
.count { background: var(--chrome-card-2); color: var(--chrome-on); }
.g-notice { color: var(--chrome-fg); background: radial-gradient(120% 140% at 100% 50%, var(--chrome-glow), transparent 60%), var(--chrome-card); border-color: var(--chrome-line); }
.g-notice-text strong { color: var(--chrome-on); }
.g-notice-eyebrow { color: var(--accent-2); }
.g-badges .env { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.side-foot { border-top-color: var(--chrome-line); }
.theme-switch { background: var(--chrome-card); }
.theme-switch button.on { background: var(--chrome-card-2); }
[data-theme="dark"] .avatar .online { box-shadow: 0 0 0 2px #0c1328; }

/* AI console: same page-toned surface */
.brain { color: var(--chrome-fg); background: radial-gradient(90% 120% at 50% -10%, var(--chrome-glow), transparent 60%), var(--chrome-bg); border-color: var(--chrome-line); box-shadow: var(--chrome-shadow), inset 0 1px 0 rgba(255, 255, 255, .45); }
.brain::after { background-image: radial-gradient(color-mix(in srgb, var(--chrome-muted) 45%, transparent) 1px, transparent 1px); }
.brain .eyebrow { color: var(--accent-2); }
.brain .muted { color: var(--chrome-muted); }
.brain-core, .bnode { background: var(--chrome-card); border-color: var(--chrome-line); }
.brain-id h3, .bname { color: var(--chrome-on); }
.bsub { color: var(--chrome-muted); }
.brole { color: var(--chrome-muted); }
.btext { color: var(--chrome-fg); }
.bstate { color: var(--chrome-muted); }
.bstate.st-working { color: var(--accent); } .bstate.st-done { color: var(--ok); } .bstate.st-waiting { color: #b7791f; }
[data-theme="dark"] .bstate.st-waiting { color: #fcd38d; }
.bkind.kind-ai { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.bkind.kind-identity { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.bkind.kind-person { color: #b7791f; background: color-mix(in srgb, #f5a524 18%, transparent); }
.bkind.kind-code { color: var(--chrome-muted); background: color-mix(in srgb, var(--chrome-muted) 16%, transparent); }
.brain-bus::before { background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 35%, transparent)); }
.brain-bus::after { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent) 15%, color-mix(in srgb, var(--accent) 45%, transparent) 85%, transparent); }
.bnode::before { background: color-mix(in srgb, var(--accent) 40%, transparent); }
/* clickable cards */
a.bnode, a.brain-core { text-decoration: none; color: inherit; cursor: pointer; }
a.bnode:hover, a.brain-core:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--chrome-line)); transform: translateY(-2px); }
a.bnode:focus-visible, a.brain-core:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bgo { margin-top: auto; padding-top: .4rem; font-size: .78rem; font-weight: 600; color: var(--accent); }

/* ===================== Calmer pages (owner 11-15: "too busy") ===================== */
/* the console, compact: one row — orchestrator, a chip per member, a toggle */
.brain.compact { padding: .75rem .9rem; }
.brain.compact::after { display: none; }
.brain-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brain-mini { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.brain-mini-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.brain-mini-text strong { color: var(--chrome-on); font-size: 1rem; }
.brain-mini-text .eyebrow { font-size: .62rem; }
.orb.small { flex: 0 0 40px; width: 40px; height: 40px; }
.orb.small .core { width: 22px; height: 22px; box-shadow: 0 0 14px 3px rgba(120, 130, 255, .45); }
.bchips { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; min-width: 0; }
.bchip { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .65rem .32rem .5rem; border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--chrome-on);
  background: var(--chrome-card); border: 1px solid var(--chrome-line); text-decoration: none; transition: border-color .15s, transform .15s; }
a.bchip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--chrome-line)); transform: translateY(-1px); }
.bchip-role { font-weight: 500; color: var(--chrome-muted); }
.bchip-role::before { content: "· "; }
.bdot { width: 8px; height: 8px; border-radius: 50%; background: var(--chrome-muted); }
.bdot.kind-ai { background: var(--accent-2); } .bdot.kind-identity { background: var(--ok); } .bdot.kind-code { background: var(--chrome-muted); }
.bchip.st-working .bdot { animation: dot-ping 1.4s infinite; box-shadow: 0 0 0 0 rgba(109, 155, 255, .7); }
.bchip.st-off { opacity: .55; }
.brain-toggle { margin-left: auto; background: transparent; color: var(--accent); border: 1px solid var(--chrome-line); box-shadow: none; padding: .35rem .75rem; border-radius: 99px; font-size: .82rem; font-weight: 600; }
.brain-toggle:hover { background: var(--chrome-card); transform: none; filter: none; }
.brain-head .brain-toggle { margin-left: 0; }
/* fewer shouting labels inside the console */
.brain .eyebrow, .bkind { letter-spacing: .04em; }
.bkind { text-transform: none; font-size: .7rem; }
/* the next step leads the page */
.page-head + .seg-tabs + .next, .seg-tabs + .next { margin-top: .4rem; }
/* the sidebar's user card is the way to the account */
a.g-user { text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
a.g-user:hover, a.g-user.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--chrome-line)); background: var(--chrome-card-2); }
@media (max-width: 640px) { .bchip-role { display: none; } .brain-toggle { margin-left: 0; } }

/* ===================== Account and billing ===================== */
.account { display: grid; gap: 1.2rem; }
.acct-profile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.acct-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.acct-id h3 { margin: .1rem 0; overflow-wrap: anywhere; }
.avatar.big { flex: 0 0 56px; width: 56px; height: 56px; font-size: 1.3rem; }
.acct-org { display: grid; gap: 1rem; margin-top: .6rem; }
.page-head.small h2 { margin: .1rem 0 0; }
.acct-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.4rem; }
.fact { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.fact-v { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.fact-v code { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .15rem .4rem; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.small-btn { font-size: .78rem; padding: .2rem .55rem; }
.acct-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; padding: .9rem 1rem; margin: .4rem 0 1rem; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.acct-plan p { margin: 0 0 .2rem; }
.acct-big { font-size: 1.25rem; }
.acct-usage { margin: .6rem 0 1rem; }
.acct-usage-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.meter { height: 8px; margin: .5rem 0 .3rem; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; margin: .6rem 0 1rem; }
.plan-card { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; }
.plan-card button { margin-top: auto; }
.plan-price { font-size: 1.5rem; font-weight: 700; margin: .1rem 0; }
.danger-ghost { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: none; }
.danger-ghost:hover { background: color-mix(in srgb, var(--bad) 8%, transparent); transform: none; filter: none; }
.acct-invoices .table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.acct-invoices th, .acct-invoices td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .acct-invoices th:nth-child(2), .acct-invoices td:nth-child(2) { display: none; } }

/* the menu ends at the menu: the footer sits at the bottom now that the notice card is gone */
.side-foot { margin-top: auto; }
/* the console as a slim strip right under the tabs */
.seg-tabs + .brain.compact { margin-top: -.2rem; }
.brain.compact { padding: .55rem .8rem; border-radius: 16px; }
.brain.compact .orb.small { flex-basis: 34px; width: 34px; height: 34px; }
.brain.compact .orb.small .core { width: 18px; height: 18px; }

/* ===================== Invoicing ===================== */
.details-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.details-form .full { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: .3rem; }
.fld input, .fld select { width: 100%; }
@media (max-width: 640px) { .details-form { grid-template-columns: minmax(0, 1fr); } }
.usage-bars { list-style: none; margin: .4rem 0 .6rem; padding: 0; display: grid; gap: .45rem; }
.usage-bars li { display: grid; grid-template-columns: 6.5rem 1fr 9rem; align-items: center; gap: .8rem; font-size: .88rem; }
.ub-bar { height: 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.ub-bar i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.ub-v { text-align: right; color: var(--muted); }
@media (max-width: 640px) { .usage-bars li { grid-template-columns: 5rem 1fr; } .ub-v { grid-column: 1 / -1; text-align: left; } }
.table.lines { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .6rem 0; }
.table.lines th, .table.lines td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.lines .num { text-align: right; white-space: nowrap; }
.invoice-page .actions { margin-bottom: 1rem; }
.invoice { max-width: 860px; padding: 2rem 2.2rem; }
.inv-head { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.inv-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.inv-meta { text-align: right; }
.inv-meta h2 { margin: 0 0 .4rem; }
.inv-meta dl, .inv-totals { display: grid; grid-template-columns: auto auto; gap: .25rem 1.2rem; margin: .6rem 0 0; justify-content: end; }
.inv-meta dt, .inv-totals dt { color: var(--muted); }
.inv-meta dd, .inv-totals dd { margin: 0; text-align: right; }
.inv-parties { display: flex; gap: 3rem; flex-wrap: wrap; padding: 1.2rem 0; }
.inv-parties > div { display: flex; flex-direction: column; gap: .15rem; }
.inv-totals { margin: 1rem 0 1.2rem auto; }
.inv-totals .grand { font-weight: 800; font-size: 1.1rem; color: var(--fg); padding-top: .4rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .invoice { padding: 1.2rem; } .inv-meta { text-align: left; } .inv-meta dl { justify-content: start; } .table.lines th:nth-child(2), .table.lines td:nth-child(2) { display: none; } }
@media print { .no-print { display: none !important; } .invoice { box-shadow: none; border: 0; max-width: none; } body { background: #fff; } }
.back-link { align-self: center; margin-right: auto; font-weight: 600; text-decoration: none; }
.invoice-page .actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* AI credits: sidebar meter and the hot state near the limit */
.g-credits { display: flex; flex-direction: column; gap: .35rem; padding: .55rem .65rem; border-radius: 14px; text-decoration: none; color: var(--chrome-fg); background: var(--chrome-card); border: 1px solid var(--chrome-line); }
.g-credits:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--chrome-line)); }
.g-credits-top { display: flex; justify-content: space-between; font-size: .76rem; }
.g-credits-top strong { color: var(--chrome-on); }
.g-credits-bar { height: 6px; border-radius: 99px; background: var(--chrome-card-2); overflow: hidden; }
.g-credits-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.g-credits-bar.hot i, .meter.hot span { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.land-proof { list-style: none; padding: 0; margin: .9rem 0 1.2rem; display: grid; gap: .35rem; }
.land-proof li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

.controls-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 .6rem; }
.ctl { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.ctl.beyond { color: #047857; background: color-mix(in srgb, #10b981 15%, transparent); }

/* Embedded Stripe Checkout: Stripe draws its own form in a frame; we only give it room. */
.checkout-frame { min-height: 32rem; margin: .5rem 0 1rem; border-radius: 14px; overflow: hidden; background: #fff; }

/* ---------- Ask Blayde: sidebar button + slide-over panel ---------- */
.g-ask { display: flex; align-items: center; gap: .6rem; width: 100%; margin: .2rem 0 .4rem; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #6d5efc) 16%, transparent), transparent); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.g-ask:hover { border-color: var(--accent, #6d5efc); }
.g-ask .nav-label { flex: 1; font-weight: 600; }
.g-ask kbd { font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .2rem .35rem; border-radius: 6px; border: 1px solid var(--line); opacity: .75; }
body.side-mini .g-ask { justify-content: center; padding: .55rem; }
body.side-mini .g-ask .nav-label { display: none; }
.ask-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(420px, 100vw); display: flex; flex-direction: column; gap: .6rem; padding: 1rem;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lift); transform: translateX(105%); transition: transform .2s ease; }
.ask-panel.in { transform: none; }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ask-head strong { font-size: 1.05rem; }
.ask-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; padding: .2rem; }
.ask-msg { max-width: 92%; padding: .6rem .8rem; border-radius: 14px; white-space: pre-wrap; line-height: 1.45; }
.ask-msg.you { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.ask-msg.ai { align-self: flex-start; background: color-mix(in srgb, var(--line) 45%, transparent); border-bottom-left-radius: 4px; }
.ask-msg.thinking { opacity: .7; font-style: italic; }
.ask-msg.err { border-left: 3px solid var(--bad, #d64545); }
.ask-msg .ask-draft { margin-top: .6rem; padding: .6rem; border-radius: 10px; border: 1px dashed var(--line); white-space: normal; }
.ask-msg .ask-go { display: inline-block; margin-top: .5rem; }
.ask-msg .ask-meta { display: block; margin-top: .4rem; font-size: .75rem; }
.ask-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ask-chip { padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: .85rem; cursor: pointer; }
.ask-chip:hover { border-color: var(--accent, #6d5efc); }
.ask-input { display: flex; gap: .5rem; align-items: flex-end; }
.ask-input textarea { flex: 1; resize: none; min-height: 2.6rem; max-height: 8rem; }
.ask-foot { margin: 0; }
@media (max-width: 640px) { .ask-panel { width: 100vw; } }
@media print { .ask-panel, .g-ask { display: none !important; } }

/* ---------- Health ---------- */
.hsummary { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.h-org { margin: 1.6rem 0 .6rem; font-size: 1.1rem; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem; }
.hcard { display: grid; gap: .8rem; border-top: 3px solid var(--line); }
.hcard.s-ok { border-top-color: var(--ok); } .hcard.s-degraded { border-top-color: var(--warn); } .hcard.s-down { border-top-color: var(--bad); }
.hcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.hcard-name { font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none; } .hcard-name:hover { text-decoration: underline; }
.hcard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.hcard-stats div { display: flex; flex-direction: column; } .hcard-stats strong { font-size: 1.15rem; letter-spacing: -.01em; }
.hstrip { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; height: 1.6rem; }
.hstrip span { border-radius: 2px; background: color-mix(in srgb, var(--muted) 18%, transparent); }
.hstrip span.ok { background: var(--ok); opacity: .75; } .hstrip span.warn { background: var(--warn); } .hstrip span.bad { background: var(--bad); }
.hcard-why { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.hcard.s-down .hcard-why { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.hsignals { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.hsignals li { display: flex; gap: .55rem; align-items: baseline; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex: 0 0 .6rem; margin-right: .2rem; background: var(--muted); }
.dot.d-on { background: var(--ok); } .dot.d-warn { background: var(--warn); } .dot.d-bad { background: var(--bad); } .dot.d-off { background: color-mix(in srgb, var(--muted) 50%, transparent); }
table.fleet { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.fleet th, table.fleet td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
table.fleet .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 560px) { .hgrid { grid-template-columns: minmax(0, 1fr); } }
/* organization setup: who is it for */
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .3rem 0 .4rem; }
.who-tile { display: flex; flex-direction: column; gap: .25rem; text-align: left; padding: .8rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.who-tile:hover { transform: translateY(-2px); }
.who-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
@media (max-width: 640px) { .who-grid { grid-template-columns: minmax(0, 1fr); } }

/* What a person is agreeing to, shown inside the approval card */
.next .digest { display: grid; gap: 1rem; margin: 1rem 0 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line, rgba(120,130,160,.25)); border-radius: 12px; background: var(--panel-2, rgba(120,130,160,.06)); }
.next .digest h4 { margin: 0 0 .35rem; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); }
.next .digest p { margin: 0; }
.next .digest ol, .next .digest ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.next .digest-reqs li { display: grid; gap: .1rem; }
.next .digest-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }

/* NOC: the open incident on a Health card, its timeline, and the live-events panel */
.incident { margin: .8rem 0; padding: .8rem .9rem; border-radius: 12px; border: 1px solid var(--line, rgba(120,130,160,.25)); background: var(--panel-2, rgba(120,130,160,.06)); }
.incident.sev1, .incident.sev2 { border-color: rgba(220, 38, 38, .45); background: rgba(220, 38, 38, .06); }
.incident.sev3, .incident.sev4 { border-color: rgba(217, 119, 6, .45); background: rgba(217, 119, 6, .06); }
.inc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.inc-timeline { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .3rem; font-size: .86rem; }
.inc-timeline li { display: grid; grid-template-columns: 4.6rem 6.5rem minmax(0, 1fr); gap: .5rem; align-items: baseline; }
.inc-from { font-weight: 600; font-size: .78rem; }
.inc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .6rem; }
.inc-past { margin-top: .6rem; } .inc-past ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.live-events { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.live-events > div { flex: 1 1 28rem; } .live-events h3 { margin: 0 0 .3rem; }
@media (max-width: 640px) { .inc-timeline li { grid-template-columns: 4.2rem minmax(0, 1fr); } .inc-timeline .inc-from { display: none; } }
