  /* Layout: collapsible rail on the left, scrolling work area on the right; summary above detail on every page.
     Visual system mirrors neev.leniahealth.com: deep indigo surfaces, Sora for text, DM Mono for data and eyebrows, the brand gradient for one primary action per view. */
  :root {
    --bg: #0e0b1a; --panel: #13102a; --panel-2: #1b1636; --panel-3: #221d42; --line: rgba(255,255,255,0.08); --line-2: rgba(255,255,255,0.16);
    --fg: #ffffff; --fg-2: rgba(255,255,255,0.62); --fg-3: rgba(255,255,255,0.52);
    --accent: #a060e0; --accent-fg: #ffffff; --accent-soft: rgba(123,48,200,0.22);
    --ga: #e8622a; --gb: #c03080; --gc: #7b30c8; --eyebrow: #e8622a; --grad: linear-gradient(135deg, var(--ga), var(--gb), var(--gc));
    --good: #2dd4a0; --warn: #f1a52a; --bad: #ff6b5e; --good-soft: rgba(45,212,160,0.14); --warn-soft: rgba(241,165,42,0.14); --bad-soft: rgba(255,107,94,0.14);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --muted-mark: rgba(255,255,255,0.14); --grid: rgba(255,255,255,0.07);
    --sans: 'Sora', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
    --r: 14px; --r-sm: 7px; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
    color-scheme: dark;
  }
  @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
    --bg: #f4f2fa; --panel: #ffffff; --panel-2: #f0edf7; --panel-3: #e7e2f2; --line: rgba(20,12,40,0.12); --line-2: rgba(20,12,40,0.26);
    --fg: #15102a; --fg-2: rgba(21,16,42,0.86); --fg-3: rgba(21,16,42,0.76); --eyebrow: #a8401a;
    --accent: #7b30c8; --accent-fg: #ffffff; --accent-soft: rgba(123,48,200,0.12);
    --good: #117a59; --warn: #8a5600; --bad: #b8352a; --good-soft: rgba(17,122,89,0.09); --warn-soft: rgba(138,86,0,0.09); --bad-soft: rgba(184,53,42,0.09); --grad: linear-gradient(135deg, #bf4a18, #a3266a, #6a28b0);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --muted-mark: rgba(21,16,42,0.14); --grid: rgba(21,16,42,0.08);
    --shadow: 0 1px 2px rgba(21,16,42,.06), 0 8px 24px rgba(21,16,42,.08); color-scheme: light; } }
  :root[data-theme="light"] {
    --bg: #f4f2fa; --panel: #ffffff; --panel-2: #f0edf7; --panel-3: #e7e2f2; --line: rgba(20,12,40,0.12); --line-2: rgba(20,12,40,0.26);
    --fg: #15102a; --fg-2: rgba(21,16,42,0.86); --fg-3: rgba(21,16,42,0.76); --eyebrow: #a8401a;
    --accent: #7b30c8; --accent-fg: #ffffff; --accent-soft: rgba(123,48,200,0.12);
    --good: #117a59; --warn: #8a5600; --bad: #b8352a; --good-soft: rgba(17,122,89,0.09); --warn-soft: rgba(138,86,0,0.09); --bad-soft: rgba(184,53,42,0.09); --grad: linear-gradient(135deg, #bf4a18, #a3266a, #6a28b0);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --muted-mark: rgba(21,16,42,0.14); --grid: rgba(21,16,42,0.08);
    --shadow: 0 1px 2px rgba(21,16,42,.06), 0 8px 24px rgba(21,16,42,.08); color-scheme: light; }

  html, body { height: 100%; }
  body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
  * { box-sizing: border-box; }
  button, input, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
  h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; } h2 { font-size: 17px; } h3 { font-size: 14px; }
  .num { font-family: var(--mono); }
  .muted { color: var(--fg-2); } .faint { color: var(--fg-3); font-size: 12px; }
  .eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 6px; }
  .eyebrow .p { color: var(--accent); }
  .hidden { display: none !important; }
  .skip { position: absolute; left: -999px; top: 8px; background: var(--panel); color: var(--fg); padding: 8px 12px; border-radius: var(--r-sm); z-index: 50; border: 1px solid var(--line-2); }
  .skip:focus { left: 8px; }

  /* Shell */
  .shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; } #app { height: 100vh; height: 100dvh; }
  .rail { width: 248px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: width .18s ease, transform .18s ease; overflow: hidden; }
  .rail.collapsed { width: 64px; }
  .rail .brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); min-height: 60px; }
  .rail .mark { width: 32px; height: 32px; flex: none; display: block; }
  .rail .brand { position: relative; }
  .rail-toggle { margin-left: auto; width: 28px; height: 28px; border: 1px solid var(--line-2); background: transparent; border-radius: 6px; color: var(--fg-2); display: grid; place-items: center; flex: none; }
  .rail-toggle svg { width: 16px; height: 16px; }
  .rail-toggle:hover { color: var(--fg); border-color: rgba(160,96,224,0.6); }
  .rail.collapsed .brand { justify-content: center; padding-inline: 8px; flex-direction: column; gap: 8px; min-height: 0; }
  .rail.collapsed .rail-toggle { margin-left: 0; }
  .rail .brand b { font-size: 17px; white-space: nowrap; font-weight: 800; letter-spacing: -0.03em; line-height: 1; display: block; }
  .rail .brand small { display: block; color: var(--fg-3); font-size: 11px; white-space: nowrap; font-family: var(--mono); }
  .rail nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
  .rail .nav-h { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding: 14px 12px 6px; white-space: nowrap; }
  .rail.collapsed .nav-h { visibility: hidden; height: 10px; padding: 0; }
  .rail nav button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; background: transparent; border-radius: var(--r-sm); text-align: left; white-space: nowrap; color: var(--fg-2); position: relative; }
  .rail nav button:hover { background: var(--panel-2); color: var(--fg); }
  .rail nav button[aria-current="page"] { background: var(--accent-soft); color: var(--fg); font-weight: 500; }
  .rail nav button[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--grad); }
  .rail nav button svg { width: 18px; height: 18px; flex: none; }
  .rail nav button .badge { justify-self: end; font-size: 11px; background: var(--bad-soft); color: var(--bad); border-radius: 999px; padding: 0 7px; font-family: var(--mono); }
  .rail.collapsed nav button { grid-template-columns: 18px; justify-content: center; padding: 8px 0; justify-items: center; }
  .rail.collapsed nav button span, .rail.collapsed .brand div, .rail.collapsed .badge { display: none; }
  .rail .foot-wrap { position: relative; margin-top: auto; } .foot { border: 0; border-top: 1px solid var(--line); padding: 10px; display: flex; align-items: center; gap: 10px; width: 100%; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; } .foot:hover { background: var(--panel-2); } .foot .chev { margin-left: auto; color: var(--fg-3); font-size: 11px; } .umenu { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 2px; z-index: 20; } .umenu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--fg); font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; text-align: left; cursor: pointer; } .umenu button:hover { background: var(--panel-2); } .umenu button svg { width: 16px; height: 16px; } .umenu button.danger { color: var(--bad); } .umenu .uver { font-family: var(--mono); font-size: 10px; color: var(--fg-3); padding: 6px 10px 4px; border-top: 1px solid var(--line); margin-top: 2px; }
  .rail .foot img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
  .rail .foot .who { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .rail .foot .who small { display: block; color: var(--fg-3); font-size: 11px; }
  .rail.collapsed .foot .who { display: none; } .rail.collapsed .chev { display: none; }
  .rail .powered { display: flex; align-items: center; gap: 8px; padding: 4px 14px 12px; color: var(--fg-3); font-size: 11px; white-space: nowrap; }
  .rail .powered img { height: 16px; width: auto; }
  .rail.collapsed .powered { justify-content: center; padding-inline: 0; }
  .rail.collapsed .powered span { display: none; }
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: auto; }
  .topbar-title { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--panel) 96%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
  #rail-toggle { display: none; }
  @media (max-width: 760px) { #rail-toggle { display: grid; } }
  .topbar .icon-btn { width: 38px; height: 38px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--fg-2); }
  .topbar .icon-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.32); }
  .topbar .icon-btn svg { width: 18px; height: 18px; }
  .search { flex: 1; max-width: 640px; position: relative; }
  .search input { width: 100%; height: 38px; padding: 8px 12px 8px 36px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(127,127,127,0.06); color: var(--fg); }
  .search input::placeholder { color: var(--fg-3); }
  .search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
  .search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--fg-3); pointer-events: none; }
  .search kbd { position: absolute; right: 10px; top: 9px; font-family: var(--mono); font-size: 11px; color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; }
  .results { position: absolute; left: 0; right: 0; top: 44px; max-width: min(720px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); max-height: 420px; overflow: auto; z-index: 20; }
  .results .grp { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-3); padding: 10px 12px 4px; }
  .results button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; color: var(--fg); }
  .results button:hover, .results button[aria-selected="true"] { background: var(--panel-2); }
  .results button small { color: var(--fg-3); white-space: nowrap; font-family: var(--mono); font-size: 11px; }
  .answer { padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(123,48,200,0.10), transparent); }
  .answer p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; }
  .answer table { font-size: 12px; margin-top: 8px; } .answer td { padding: 5px 8px; white-space: normal; }
  .answer.claude { background: linear-gradient(180deg, rgba(232,98,42,0.08), transparent); }
  .results .sugg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; color: var(--fg); border-bottom: 1px solid var(--line); }
  .results .sugg:hover { background: var(--panel-2); }
  .results .sugg small { color: var(--fg-3); font-family: var(--sans); font-size: 12px; white-space: normal; }
  .results .none { padding: 14px 12px; color: var(--fg-3); }
  .live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--good); white-space: nowrap; }
  .livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; margin-right: 6px; animation: pulse 2s ease-in-out infinite; }
  .seg button[aria-pressed="true"] .livedot { background: #fff; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
  @media (prefers-reduced-motion: reduce) { .livedot { animation: none; } }
  .seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
  .seg button { border: 0; background: transparent; min-height: 36px; padding: 7px 12px; font-size: 13px; color: var(--fg-2); }
  .seg button + button { border-left: 1px solid var(--line); }
  .seg button:hover { color: var(--fg); background: var(--panel-2); }
  .seg button[aria-pressed="true"] { background: var(--grad); color: #fff; }
  .hctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; padding-top: 2px; } .seg .ps { display: none; } @media (max-width: 760px) { .hctl { justify-content: space-between; width: 100%; } .hctl .live { width: 100%; } .hctl .seg { flex: 1; display: flex; } .hctl .seg button { flex: 1; white-space: nowrap; padding: 7px 6px; } .seg .pl { display: none; } .seg .ps { display: inline; } .page-h h1 { font-size: 22px; } }
  .content { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; width: 100%; }
  .page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .page-h p { margin: 6px 0 0; color: var(--fg-2); max-width: 72ch; }
  .sub { margin: 6px 0 0; color: var(--fg-3); font-size: 13px; max-width: 72ch; }
  .strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; margin-top: 12px; }
  .stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(127,127,127,0.04); text-align: left; color: var(--fg); font: inherit; position: relative; min-width: 0; }
  .stat::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--good); }
  .stat.warn::before { background: var(--warn); } .stat.bad::before { background: var(--bad); } .stat.neutral::before { background: var(--fg-3); }
  .stat .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat .val { font-size: 18px; font-weight: 500; line-height: 1.25; }
  .stat .val:not(.num) { font-size: 15px; font-family: var(--sans); }
  .stat .note { font-size: 11.5px; color: var(--fg-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  button.stat { cursor: pointer; } button.stat:hover { border-color: rgba(160,96,224,0.6); }
  .mix { display: inline-flex; width: 110px; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; vertical-align: middle; } .mix i { display: block; height: 100%; }
  .facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; align-items: center; }
  .tk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg-2); border: 1px solid var(--line); border-radius: 100px; padding: 4px 11px 4px 9px; background: rgba(127,127,127,0.04); max-width: 100%; }
  .tk i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
  .tk.warn i { background: var(--warn); } .tk.bad i { background: var(--bad); }
  .tk.more { display: none; } .facts.open .tk.more { display: inline-flex; }
  .tk-more { border: 1px dashed var(--line-2); background: transparent; color: var(--fg-3); border-radius: 100px; padding: 4px 11px; font-size: 12px; }
  .tk-more:hover { color: var(--fg); }

  /* Cards, tiles, tables */
  .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
  .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
  .card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px; min-width: 0; position: relative; }
  .card.span { grid-column: 1 / -1; }
  .card h3 + .faint { margin-top: 2px; }
  .tile { cursor: pointer; transition: border-color .12s, transform .12s; } .tile h3 { min-height: 2.7em; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
  .tile:hover { border-color: rgba(160,96,224,0.6); }
  .tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
  .tile .big { font-family: var(--mono); font-size: 30px; line-height: 1.1; margin: 10px 0 6px; font-weight: 500; letter-spacing: -0.02em; }
  .tile .big .u { font-family: var(--sans); font-size: 13px; color: var(--fg-3); margin-left: 4px; font-weight: 400; }
  .tile .delta { font-size: 12px; color: var(--fg-2); }
  .tile .delta b { font-family: var(--mono); font-weight: 500; }
  .tile .delta.good b { color: var(--good); } .tile .delta.bad b { color: var(--bad); }
  .tile .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--fg-2); } .tile .foot .pill { flex: none; white-space: nowrap; }
  .pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 500; font-family: var(--mono); letter-spacing: .02em; border: 0; }
  button.pill { cursor: pointer; } button.pill:hover { outline: 1px solid var(--line-2); }
  .pill.ok { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.neutral { background: var(--panel-2); color: var(--fg-2); }
  .bullet { position: relative; height: 6px; margin-top: 10px; }
  .bullet .track { position: absolute; inset: 0; background: var(--muted-mark); border-radius: 3px; }
  .bullet .val { position: absolute; left: 0; top: 0; height: 6px; background: var(--s1); border-radius: 3px; }
  .bullet .mark { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: var(--fg); }
  .bullet .mark.p { background: var(--fg-3); }
  .lineage { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: 1px solid var(--line); background: transparent; color: var(--fg-3); border-radius: 100px; padding: 3px 9px; font-family: var(--mono); font-size: 10px; letter-spacing: .02em; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hc.future { display: inline-block; width: 100%; min-height: 24px; border: 1px dashed var(--line); border-radius: 6px; opacity: .5; } tr.flash td { background: rgba(160,96,224,0.14); } .signed-out { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px solid rgba(241,165,42,.4); display: flex; flex-direction: column; gap: 2px; font-size: 13px; } .signed-out span { color: var(--fg-2); } .drawer table th, .drawer table td { white-space: normal; } .drawer-b > * { flex: none; } .drawer .pill { white-space: nowrap; } .drawer td.n { white-space: nowrap; } .drawer .kv dd { overflow-wrap: anywhere; } textarea { width: 100%; box-sizing: border-box; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--fg); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; } .announce { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 13px; } .announce.warn { border-color: rgba(241,165,42,.5); background: var(--warn-soft); } .announce.bad { border-color: rgba(255,107,94,.5); background: var(--bad-soft); } .announce b { flex: none; } .announce span { flex: 1; } pre.code { margin: 8px 0 0; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-2); } tr.dim td { opacity: .5; } .tbox { -webkit-overflow-scrolling: touch; } .tbox.scrollable { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); } .tbox.scrollable.at-end { -webkit-mask-image: none; mask-image: none; } .swipe-hint { display: none; font-family: var(--mono); font-size: 10px; color: var(--fg-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; } .tbox.scrollable + .swipe-hint { display: block; } @media (max-width: 760px) { .login-grid { display: flex !important; flex-direction: column; } .login .box { order: -1; } .brand-panel .lede { font-size: 15px; } .page-h h1 { font-size: 22px; } .drawer { width: calc(100vw - 16px); max-height: 92vh; } } table.errlog td:first-child, table.errlog th:first-child { min-width: 0; width: 28px; padding-right: 0; } .subtabs { flex-wrap: wrap; } .linkish { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline dotted; } .lineage:hover { color: var(--fg); border-color: var(--line-2); } .lineage .lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lineage .dot { flex: none; }
  .stripe { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--good); }
  .stripe.bad { background: var(--bad); } .stripe.warn { background: var(--warn); }
  .tbox { overflow: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; } td:first-child { min-width: 150px; } td:first-child small { white-space: normal; }
  th { color: var(--fg-3); font-weight: 500; font-size: 11px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; position: sticky; top: 0; background: var(--panel); }
  th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
  th button:hover { color: var(--fg); }
  th[aria-sort="ascending"] button::after { content: " \2191"; } th[aria-sort="descending"] button::after { content: " \2193"; }
  td.n, th.n { text-align: right; } td.n { font-family: var(--mono); }
  td.hot { color: var(--bad); font-weight: 500; }
  tbody tr:hover td { background: rgba(127,127,127,0.05); }
  tr.pick { cursor: pointer; } tr.pick:hover td { background: var(--panel-2); } tr[aria-selected="true"] td { background: var(--accent-soft); }
  .chart { position: relative; min-height: 200px; }
  .chart svg { display: block; width: 100%; height: auto; }
  .tip { position: absolute; z-index: 3; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 6px 9px; font-size: 12px; pointer-events: none; white-space: nowrap; display: none; color: var(--fg); }
  .tip .d { color: var(--fg-3); font-family: var(--mono); font-size: 11px; }
  .legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--fg-2); margin: 8px 0 2px; }
  .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .btn { border: 1.5px solid var(--line-2); background: transparent; color: var(--fg-2); border-radius: var(--r-sm); min-height: 36px; padding: 7px 14px; font-size: 13px; }
  .btn:hover { color: var(--fg); border-color: rgba(160,96,224,0.6); }
  .btn.primary { background: var(--grad); color: #fff; border-color: transparent; font-weight: 500; }
  .btn.primary:hover { opacity: .9; }
  .btn.danger { color: var(--bad); border-color: rgba(255,107,94,0.4); }
  .btn:disabled { opacity: .4; cursor: default; }
  .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fg-2); }
  .field input, .field select, select, input[type="number"] { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(127,127,127,0.06); color: var(--fg); min-width: 0; }
  input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
  input[type="number"] { width: 92px; font-family: var(--mono); }
  input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gc); }
  .alert { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); }
  .alert i { display: block; width: 4px; border-radius: 2px; align-self: stretch; background: var(--warn); }
  .alert.bad i { background: var(--bad); } .alert.info i { background: var(--s1); }
  .alert b { display: block; } .alert small { color: var(--fg-2); }
  .toast { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--panel-3); color: var(--fg); border: 1px solid var(--line-2); padding: 9px 14px; border-radius: var(--r-sm); font-size: 13px; box-shadow: var(--shadow); z-index: 30; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 100px; min-height: 34px; padding: 5px 12px; background: transparent; color: var(--fg); font-size: 12px; cursor: pointer; }
  .chip:hover { border-color: rgba(160,96,224,0.6); }
  .chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .chip .m { font-family: var(--mono); font-size: 11px; color: var(--fg-3); }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
  .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
  .kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
  .kv dt { color: var(--fg-3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; } .kv dd { margin: 0; }
  .subtabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .subtabs button { border: 1px solid var(--line-2); background: transparent; border-radius: 100px; min-height: 34px; padding: 5px 14px; font-size: 13px; color: var(--fg-2); }
  .subtabs button:hover { color: var(--fg); border-color: rgba(160,96,224,0.6); }
  .subtabs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 500; }
  mark { background: var(--warn-soft); color: inherit; border-radius: 2px; }
  .flash { animation: flash 1.6s ease-out; }
  @keyframes flash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
  @media (prefers-reduced-motion: reduce) { .flash { animation: none; } .rail, .tile { transition: none; } }
  .movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-top: 12px; }
  .mover { border-left: 3px solid var(--good); padding: 2px 0 2px 12px; display: flex; flex-direction: column; gap: 2px; }
  .mover.bad { border-color: var(--bad); }
  .mover b { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--good); } .mover.bad b { color: var(--bad); }
  .mover small { color: var(--fg-3); font-size: 11px; }
  table.heat th.hh { text-align: center; padding: 6px 2px; font-size: 9px; }
  table.heat td.cell { padding: 3px 2px; }
  .hc { display: block; width: 100%; min-width: 30px; height: 24px; border-radius: 4px; border: 0; font-family: var(--mono); font-size: 10px; color: #fff; cursor: pointer; }
  .hc:hover { outline: 2px solid var(--fg); outline-offset: 1px; }
  .b0, .hc.b0 { background: #1d1838; color: var(--fg-3); } .b1, .hc.b1 { background: #3b2270; } .b2, .hc.b2 { background: #5a2ba0; } .b3, .hc.b3 { background: #8a46d8; } .b4, .hc.b4 { background: #c08bff; color: #1a0f26; }
  @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .b0, :root:not([data-theme="dark"]) .hc.b0 { background: #ece7f6; color: var(--fg-3); } :root:not([data-theme="dark"]) .hc.b1, :root:not([data-theme="dark"]) .hc.b2, :root:not([data-theme="dark"]) .hc.b3 { color: #fff; } }
  :root[data-theme="light"] .b0, :root[data-theme="light"] .hc.b0 { background: #ece7f6; color: var(--fg-3); } :root[data-theme="light"] .hc.b1, :root[data-theme="light"] .hc.b2, :root[data-theme="light"] .hc.b3 { color: #fff; }
  .fleet { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 12px; }
  .dev { text-align: left; color: var(--fg); font: inherit; background: rgba(127,127,127,0.04); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
  .dev:hover { border-color: rgba(160,96,224,0.7); }
  .devstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
  .devstats div { display: flex; flex-direction: column; } .devstats b { font-size: 15px; font-weight: 500; } .devstats span { font-size: 10px; color: var(--fg-3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
  .proj { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; border-left-width: 3px; border-left-color: var(--good); display: flex; flex-direction: column; gap: 4px; }
  .proj.warn { border-left-color: var(--warn); } .proj.bad { border-left-color: var(--bad); }
  .proj .big { font-size: 24px; font-weight: 500; } .proj small { color: var(--fg-3); font-size: 11px; }
  .ask-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 36; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 100px; border: 1.5px solid transparent; background: linear-gradient(var(--panel-3), var(--panel-3)) padding-box, var(--grad) border-box; color: var(--fg); font: inherit; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.45); cursor: pointer; }
  .ask-fab img { width: 24px; height: 24px; } .ask-fab kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--fg-3); }
  .ask-fab:hover { transform: translateY(-1px); } .ask-fab[aria-expanded="true"] { opacity: .35; }
  .ask-panel { position: fixed; right: 20px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100vw - 24px)); height: min(640px, calc(100vh - 110px)); z-index: 37; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.55); display: flex; flex-direction: column; overflow: hidden; animation: pop2 .16s ease-out; }
  @keyframes pop2 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .ask-panel { animation: none; } }
  .ask-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(123,48,200,0.12), transparent); }
  .ask-h img { width: 28px; height: 28px; } .ask-h > div:nth-child(2) { flex: 1; min-width: 0; } .ask-h b { display: block; font-size: 14px; } .ask-h small { color: var(--fg-3); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ask-h .icon-btn { width: 32px; height: 32px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r-sm); color: var(--fg-2); }
  .ask-panel .thread { flex: 1; overflow: auto; padding: 14px; gap: 10px; }
  .ask-panel .turn.a { padding: 12px 14px; } .ask-panel .turn.a table td { white-space: normal; font-size: 12px; }
  .ask-empty { display: flex; flex-direction: column; gap: 10px; }
  .ask-f { border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
  .ask-f input { flex: 1; min-width: 0; height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(127,127,127,0.06); color: var(--fg); }
  #ask-sugg:empty { display: none; } #ask-sugg .chip { font-size: 12px; min-height: 30px; padding: 3px 10px; }
  @media (max-width: 760px) { .ask-fab span, .ask-fab kbd { display: none; } .ask-fab { padding: 12px; } .ask-panel { right: 12px; left: 12px; width: auto; } }
  .ask-box input { flex: 1; min-width: 220px; height: 42px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(127,127,127,0.06); color: var(--fg); font-size: 14px; }
  .thread { display: flex; flex-direction: column; gap: 10px; }
  .turn.q { align-self: flex-end; max-width: 80%; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 14px 14px 4px 14px; padding: 9px 14px; }
  .turn.a { max-width: 100%; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px 14px 14px 4px; padding: 14px 16px; }
  .turn.a p { margin: 2px 0 0; line-height: 1.55; } .turn.a table { margin-top: 8px; font-size: 12px; } .turn.a td { white-space: normal; }
  .stream { font-family: var(--mono); font-size: 12px; color: var(--fg-2); display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
  .stream div:first-child { color: var(--good); }
  .brief { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; line-height: 1.6; margin: 12px 0 0; color: var(--fg-2); }
  button.card.quick { text-align: left; color: var(--fg); font: inherit; }
  details summary { cursor: pointer; }
  table.matrix td { text-align: center; } table.matrix td:first-child { text-align: left; } table.matrix th { text-align: center; white-space: normal; } table.matrix th:first-child { text-align: left; }
  .drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 38; }
  .drawer { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(820px, calc(100vw - 24px)); max-height: min(88vh, 960px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.4); z-index: 39; display: flex; flex-direction: column; outline: none; animation: pop .16s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
  .drawer-h { cursor: move; user-select: none; }
  @media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
  .drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .drawer-h .icon-btn { width: 34px; height: 34px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r-sm); color: var(--fg-2); }
  .drawer-b { padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow: auto; display: flex; flex-direction: column; gap: 6px; }
  .drawer-b h2 { font-size: 20px; margin-top: 4px; }
  .dval { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
  .dval .num { font-size: 36px; font-weight: 500; letter-spacing: -0.02em; } .dval .u { color: var(--fg-3); }
  .dactions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
  .drawer .kv { margin-top: 12px; } .drawer .kv dd { color: var(--fg-2); }
  .confirm { display: inline-flex; gap: 8px; align-items: center; }

  /* Sign-in */
  .login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(60% 40% at 20% 10%, rgba(232,98,42,0.16), transparent 65%), radial-gradient(50% 40% at 85% 90%, rgba(123,48,200,0.18), transparent 65%), var(--bg); }
  .login-grid { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; }
  .brand-panel { display: flex; flex-direction: column; gap: 22px; padding: 28px 24px; }
  .brand-panel .lenia { height: 28px; width: auto; align-self: flex-start; } .brand-panel .lenia.light-only { display: none; height: 34px; }
  .brand-panel .hero { display: flex; align-items: center; gap: 16px; margin-top: 8px; } .hero .word { display: flex; align-items: baseline; gap: 10px; transform: translateY(-2px); }
  .brand-panel .hero .mark { width: 64px; height: 64px; }
  .brand-panel .word { font-size: 50px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; color: var(--fg); white-space: nowrap; } .word .pulse { font-weight: 400; letter-spacing: -1px; color: var(--fg-2); } .wm { font-weight: 800; letter-spacing: -0.03em; font-size: 17px; } .wm .pulse { font-weight: 400; letter-spacing: 0; color: var(--fg-2); }
  .brand-panel .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); margin: -6px 0 0 80px; }
  .brand-panel .lede { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.6; max-width: 44ch; }
  .brand-panel .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-panel .stats div { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
  .brand-panel .stats b { font-size: 22px; font-weight: 500; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .brand-panel .stats span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
  .brand-panel .tags { display: flex; flex-wrap: wrap; gap: 7px; }
  .brand-panel .tags span { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--fg-2); border: 1px solid var(--line-2); border-radius: 100px; padding: 4px 12px; }
  .login .box { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; position: relative; }
  .login .box::before { content: ""; position: absolute; top: -1px; left: 32px; right: 32px; height: 1px; background: linear-gradient(90deg, transparent, var(--ga), var(--gb), var(--gc), transparent); }
  .login .box h1 { font-size: 20px; }
  @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand-panel { background: linear-gradient(160deg, #ffffff, #f3eff9); border: 1px solid var(--line-2); border-radius: 16px;} :root:not([data-theme="dark"]) .brand-panel .lenia.dark-only { display: none;} :root:not([data-theme="dark"]) .brand-panel .lenia.light-only { display: block;} :root:not([data-theme="dark"]) .brand-panel .word { color: #16122a;} :root:not([data-theme="dark"]) .brand-panel .word .pulse { color: #3f3a56; } }
  :root[data-theme="light"] .brand-panel { background: linear-gradient(160deg, #ffffff, #f3eff9); border: 1px solid var(--line-2); border-radius: 16px;} :root[data-theme="light"] .brand-panel .lenia.dark-only { display: none;} :root[data-theme="light"] .brand-panel .lenia.light-only { display: block;} :root[data-theme="light"] .brand-panel .word { color: #16122a;} :root[data-theme="light"] .brand-panel .word .pulse { color: #3f3a56; }
  .personas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .persona { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(127,127,127,0.04); text-align: left; color: var(--fg); min-width: 0; }
  .persona:hover { border-color: rgba(160,96,224,0.7); background: var(--panel-2); }
  .persona.primary { border-color: var(--accent); background: var(--accent-soft); }
  .persona > div { min-width: 0; }
  .persona img, .persona .av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; }
  .persona b { display: block; font-size: 13px; white-space: normal; line-height: 1.25; } .persona small { color: var(--fg-3); font-family: var(--mono); font-size: 10px; display: block; white-space: normal; }
  .persona .go { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--accent); }
  .divider { display: flex; align-items: center; gap: 10px; color: var(--fg-3); font-size: 10px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
  .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
  @media (max-width: 860px) { .login-grid { grid-template-columns: 1fr; } .brand-panel { padding: 8px 4px; gap: 16px; } .brand-panel .word { font-size: 38px; } .brand-panel .stats { grid-template-columns: repeat(4, 1fr); } .brand-panel .stats b { font-size: 18px; } .personas { grid-template-columns: 1fr; } }
  @media (max-width: 520px) { .brand-panel .stats { grid-template-columns: repeat(2, 1fr); } }

  @media (max-width: 760px) {
    .topbar { display: flex; position: static; }
    .rail { position: fixed; inset: 0 auto 0 0; z-index: 10; transform: translateX(-100%); width: 260px; }
    .rail.open { transform: none; }
    .rail.collapsed { width: 260px; }
    .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9; }
    .content { padding: 14px 16px; }
    .topbar { padding: 10px 16px; }
    .search kbd { display: none; }
    th.opt, td.opt { display: none; }
  }
  .help { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
  .help-toc { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 12px; }
  .help-toc a { color: var(--fg-2); text-decoration: none; padding: 6px 8px; border-radius: 8px; font-size: 13px; } .help-toc a:hover { background: var(--panel-3); color: var(--fg); }
  .help-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .help-sec h2 { font-size: 20px; margin: 0 0 10px; } .help-sec h4 { margin: 18px 0 6px; font-size: 14px; } .help-sec p, .help-sec li { font-size: 14px; line-height: 1.6; color: var(--fg-2); } .help-sec b { color: var(--fg); } .help-sec ul, .help-sec ol { padding-left: 20px; margin: 6px 0; }
  .help-sec figure { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0e0b1a; } .help-sec figure img { display: block; width: 100%; height: auto; } .help-sec figure.tall { max-width: 300px; }
  .help-foot { padding: 8px 4px 24px; font-size: 12px; }
  @media (max-width: 900px) { .help { grid-template-columns: 1fr; } .help-toc { position: static; } }
  .print-foot { display: none; }
  @media print {
    .print-foot { display: block; position: fixed; bottom: 0; left: 0; right: 0; font-family: var(--mono); font-size: 9px; color: #333; border-top: 1px solid #ccc; padding: 4px 0; background: #fff; }
    @page { margin: 14mm 12mm 18mm; }
    :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --panel-3: #f3f1f8; --line: #ddd; --line-2: #ccc; --fg: #111; --fg-2: #333; --fg-3: #666; --grid: #e5e5e5; }
    body { background: #fff !important; color: #111; }
    .swipe-hint, .tbox.scrollable::after { display: none !important; } .tbox.scrollable { overflow: visible; } .tbox table { font-size: 10px; }
    .rail, .topbar, .ask-fab, .ask-panel, .hctl, #help-print, .help-toc, .scrim, .drawer, .toast, .subtabs { display: none !important; }
    .shell, .main, .work { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; height: auto !important; overflow: visible !important; }
    .help { display: block; } .help-sec { break-inside: auto; border: 0; padding: 0 0 16px; box-shadow: none; } .help-sec h2 { margin-top: 10px; }
    .help-sec h2 { break-after: avoid; font-size: 18px; } .help-sec h4 { break-after: avoid; } .help-sec figure { break-inside: avoid; max-width: 170mm; margin: 0 auto 10px; } .help-sec figure img { max-height: 150mm; width: auto; max-width: 100%; margin: 0 auto; } .help-sec figure.tall { max-width: 70mm; } table { break-inside: auto; } tr, thead { break-inside: avoid; } thead { display: table-header-group; } p, li { orphans: 3; widows: 3; }
    .card { box-shadow: none; } .tbox { overflow: visible; } table { font-size: 10.5px; } th { position: static; }
    .page-h h1 { font-size: 22px; }
  }

/* ---- Light UI refinements (hosted build) ---- */
:root[data-theme="light"] { --bg: #f6f5fb; --panel-2: #f3f1f9; --panel-3: #ffffff; }
:root[data-theme="light"] .topbar .icon-btn:hover { border-color: var(--line-2); }
:root[data-theme="light"] .ask-fab { box-shadow: 0 8px 24px rgba(21,16,42,.14); }
:root[data-theme="light"] .ask-panel, :root[data-theme="light"] .drawer { box-shadow: 0 24px 64px rgba(21,16,42,.18), 0 2px 6px rgba(21,16,42,.08); }
:root[data-theme="light"] .umenu { box-shadow: 0 12px 32px rgba(21,16,42,.16); }
:root[data-theme="light"] .drawer-scrim { background: rgba(21,16,42,.22); }
:root[data-theme="light"] .rail { background: #ffffff; }
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(21,16,42,.04); }
:root[data-theme="light"] .help-sec figure { background: var(--panel-2); }
:root[data-theme="light"] .tile .big, :root[data-theme="light"] .stat .val { color: #15102a; }
.gate { min-height: 100vh; display: grid; place-items: center; color: var(--fg-3); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.acct-temp { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--good-soft); border: 1px solid var(--good); font-size: 13px; }
.acct-temp code { font-family: var(--mono); font-size: 14px; user-select: all; }
.mfa-qr { width: 180px; height: 180px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 8px; }
.form-err { color: var(--bad); font-size: 13px; min-height: 1em; }
.acct-actions { width: 1%; }
.acct-actions select { width: 120px; min-width: 0; }
.pill.demo { background: var(--accent-soft); color: var(--accent); }
.view-as-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 14px; background: var(--warn); color: #1a1200; font-size: 13px; font-weight: 500; }
.view-as-bar .btn { color: #1a1200; border-color: rgba(0,0,0,.35); min-height: 30px; padding: 4px 12px; background: rgba(255,255,255,.35); }
:root[data-viewing-as] #app, :root[data-viewing-as] .shell { height: calc(100dvh - 40px); }
