/* orion.css: the Orion design language, shared stylesheet. Version 2.1 (2026-11-03).
   Reference implementation: LLM Gateway dashboard (D:\Projects\LLM API\gateway\dashboard.html).
   Copy this file into a new app (or inline it), bundle the fonts from LLM Gateway's assets/fonts folder,
   then add app-specific styles in a separate block underneath. Don't edit tokens per app. */
  /* ORION design language, v2 (shared by all "Powered by Orion" software; rules in ORION-DESIGN.md).
     Named after the constellation: NIGHT (dark, near-black neutral grey) is the default; DAY (light, paper-white) is a choice the user makes.
     RIGEL blue is the one accent; BETELGEUSE orange appears only in brand moments (logo, About).
     One type family (Inter), sentence-case labels, soft layered surfaces, colour only where it means something:
       ACCENT  Rigel: selection, primary buttons, focus, links.
       STATUS  green / amber / red, always with a word: running, paused, failed.
       LEVEL   gauge bands: idle teal, normal blue, elevated amber, high red.
       IDENTITY per-user colours in charts and the user table.
       METRIC  a small coloured dot per tracked metric, matching its chart.
     Fonts are bundled with the app (SIL Open Font License). */
  @font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-400.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-600.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-ext-400.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  @font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-ext-600.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  @font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-400.woff2) format("woff2"); }
  @font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url(/assets/fonts/jetbrains-mono-600.woff2) format("woff2"); }
  /* brand type: the product wordmark and the Orion mark only */
  @font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/assets/fonts/space-grotesk-500.woff2) format("woff2"); }
  @font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(/assets/fonts/space-grotesk-700.woff2) format("woff2"); }

  /* ---------- tokens: Day (light), plus the theme-neutral ones; Night overrides them below */
  :root {
    color-scheme: light;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --brand: "Space Grotesk", "Inter", system-ui, sans-serif;  /* wordmarks only */
    --display: var(--body);
    --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
    --rigel: #2f5bd3;
    --betelgeuse: #f0743e;
    --page: #f5f6f9;
    --page-glow: rgba(47, 91, 211, 0.07);
    --surface: #ffffff;
    --surface-2: #f2f4f8;
    --surface-3: #e3e7ef;
    --text: #141a26;
    --text-2: #4d5668;
    --muted: #687083;
    --grid: rgba(20, 30, 55, 0.07);
    --axis: rgba(20, 30, 55, 0.16);
    --border: rgba(20, 30, 55, 0.09);
    --border-strong: rgba(20, 30, 55, 0.18);
    --highlight: transparent;
    --accent: #2f5bd3;
    --accent-rgb: 47, 91, 211;
    --accent-hover: #2650c0;
    --on-accent: #ffffff;
    --accent-wash: rgba(47, 91, 211, 0.08);
    --good: #1d8a57;
    --good-rgb: 29, 138, 87;
    --warning: #b4740f;
    --warn-wash: #fdf6e7;
    --warn-line: #f0d39a;
    --critical: #c8433e;
    --crit-wash: #fdf0ef;
    --shadow: 0 1px 2px rgba(20, 30, 55, 0.05), 0 4px 16px rgba(20, 30, 55, 0.05);
    --shadow-pop: 0 12px 40px rgba(20, 30, 55, 0.16);
    --idle: #9aa0aa;
    --idle-stripe: #c9cdd4;
    /* per-user chart colours, fixed order (validated categorical palette) */
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #7d71e0; --series-8: #e05d5d;
    /* metric colours (r, g, b), the same in every tile dot and chart */
    --m-requests: 14, 145, 190;
    --m-tokens: 124, 92, 220;
    --m-data: 212, 72, 140;
    --m-busy: 22, 160, 110;
    --m-energy: 196, 140, 10;
    --m-cost: 92, 150, 30;
    --m-users: 47, 91, 211;
    --star: 20, 28, 45;
  }
  /* ---------- tokens: Night, the default. Day only when the user picks it: <html data-theme="light">
     (a header switch, remembered in localStorage "orion-theme" and applied before first paint; see ORION-DESIGN.md §1) */
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --rigel: #7aa2ff;
    --betelgeuse: #ff8a5c;
    --page: #0a0a0b;
    --page-glow: rgba(255, 255, 255, 0.025);
    --surface: #131314;
    --surface-2: #19191b;
    --surface-3: #252528;
    --text: #ececee;
    --text-2: #a8a8af;
    --muted: #84848b;
    --grid: rgba(255, 255, 255, 0.06);
    --axis: rgba(255, 255, 255, 0.14);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --highlight: rgba(255, 255, 255, 0.035);
    --accent: #7aa2ff;
    --accent-rgb: 122, 162, 255;
    --accent-hover: #94b4ff;
    --on-accent: #08112b;
    --accent-wash: rgba(122, 162, 255, 0.12);
    --good: #4cc38a;
    --good-rgb: 76, 195, 138;
    --warning: #e8b04a;
    --warn-wash: rgba(232, 176, 74, 0.09);
    --warn-line: rgba(232, 176, 74, 0.35);
    --critical: #f07a74;
    --crit-wash: rgba(240, 122, 116, 0.09);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.22);
    --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.55);
    --idle: #5a606b;
    --idle-stripe: #8a909b;
    --m-requests: 76, 196, 232;
    --m-tokens: 167, 142, 250;
    --m-data: 240, 120, 180;
    --m-busy: 72, 210, 155;
    --m-energy: 236, 196, 80;
    --m-cost: 160, 210, 90;
    --m-users: 122, 162, 255;
    --star: 255, 255, 255;
  }

  /* ---------- base */
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; color: var(--text); min-height: 100vh;
    background: radial-gradient(1100px 420px at 50% -160px, var(--page-glow), transparent 70%) no-repeat, var(--page);
    font: 14px/1.55 var(--body); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
  .wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px 64px; }
  [hidden] { display: none !important; }
  input, select, textarea, button { font-family: inherit; }
  h1 { font-size: 16px; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
  h2 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: -0.005em; }
  h3 { font-size: 13px; margin: 32px 0 12px; font-weight: 600; color: var(--text-2); }
  .sub { color: var(--text-2); font-size: 13px; }
  .hint { color: var(--text-2); font-size: 12.5px; margin-top: 12px; line-height: 1.5; }
  .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .spacer { flex: 1; }
  code.inline { font: 12px var(--mono); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; word-break: break-all; }
  kbd { font: 500 11px/1 var(--mono); color: var(--text-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; background: var(--surface); }
  #stars { display: none !important; }

  /* ---------- header + tabs */
  .topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 96%, var(--page)); border-bottom: 1px solid var(--border); }
  .topbar .wrap { padding-bottom: 0; }
  header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0 6px; }
  .brand { display: flex; align-items: center; gap: 10px; }
  .brand svg { width: 30px; height: 30px; flex: none; }
  .brand h1 { font-family: var(--brand); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .2em; }
  .brand .version { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
  @keyframes spin { to { transform: rotate(360deg); } }
  .head-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; }
  .status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
  .dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
  .dot.on { background: var(--good); }
  .dot.warn { background: var(--warning); }
  .dot.bad { background: var(--critical); }
  .dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s cubic-bezier(0, 0, .2, 1) 3; }
  @keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
  .gaming-top { gap: 8px; font-size: 13px; white-space: nowrap; color: var(--text-2); padding: 0 4px; }
  #stop-btn { margin-left: 4px; }

  nav { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-top: 4px; }
  nav button {
    position: relative; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text-2); padding: 10px 12px 12px; cursor: pointer;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px 8px 0 0; transition: color .15s;
  }
  nav button:hover { color: var(--text); }
  nav button[aria-selected="true"] { color: var(--text); font-weight: 600; }
  nav kbd { display: none; }
  .tab-indicator { position: absolute; bottom: 0; left: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; transition: transform .25s cubic-bezier(.2, .8, .2, 1), width .25s cubic-bezier(.2, .8, .2, 1); }
  .count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; font-size: 11.5px; font-weight: 600;
           border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
  nav button[aria-selected="true"] .count { background: var(--accent-wash); color: var(--accent); }
  .count.bump { animation: bump .4s ease; }
  @keyframes bump { 50% { transform: scale(1.25); } }

  main.wrap { padding-top: 24px; }
  [role="tabpanel"]:not([hidden]) { animation: panel-in .25s ease-out; }
  @keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } }

  .banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px;
            background: var(--warn-wash); border: 1px solid var(--warn-line); animation: rise .25s ease both; }
  .banner > span { flex: 1 1 320px; }

  /* ---------- cards */
  .card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 16px; min-width: 0;
          box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); }
  /* title on the left, actions on the right, the description on its own line under the title */
  .card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 2px; margin-bottom: 16px; }
  .card-head > h2 { grid-column: 1; display: flex; align-items: center; gap: 8px; }
  .card-head > .sub:not(.right) { grid-column: 1; font-size: 13px; }
  .card-head > .sub::first-letter { text-transform: uppercase; }  /* sentence case, whatever the source text */
  .card-head > .right { grid-column: 2; grid-row: 1; justify-self: end; display: flex; gap: 8px; align-items: center; }
  .card-head > .right.sub { font-size: 12px; color: var(--muted); }
  .card-head[data-metric] > h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--tint)); flex: none; }
  .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
  .grid2 > .card { margin-bottom: 0; }
  .grid2:has(+ h3) { margin-bottom: 0; }

  /* ---------- buttons + inputs */
  .btn {
    position: relative; overflow: hidden; font: inherit; font-size: 13px; font-weight: 500; color: var(--text); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 13px; min-height: 34px; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .15s, border-color .15s, color .15s;
  }
  .btn:hover { background: var(--surface-2); text-decoration: none; }
  .btn:active:not(:disabled) { transform: translateY(1px); }
  .btn:disabled { opacity: .5; cursor: default; }
  .btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
  .btn.primary:hover { background: var(--accent-hover); }
  .btn.danger { color: var(--critical); }
  .btn.danger:hover { background: var(--crit-wash); border-color: var(--critical); }
  .btn.danger-solid { background: var(--critical); border-color: transparent; color: #fff; font-weight: 600; }
  .btn.small { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
  .btn.ghost { border-color: transparent; background: none; color: var(--accent); }
  .btn.ghost:hover { background: var(--accent-wash); }
  .btn.icon-btn { width: 34px; height: 34px; padding: 0; }
  .btn .ripple { display: none; }
  .btn.ok { background: var(--good) !important; color: #fff !important; border-color: transparent !important; }

  input[type="date"], input[type="text"], input[type="number"], select {
    font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 8px; padding: 6px 10px; min-height: 34px; min-width: 0; transition: border-color .15s, box-shadow .15s;
  }
  input[type="date"]:focus, input[type="text"]:focus, input[type="number"]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
  input:disabled { opacity: .5; }
  input[type="number"] { font-variant-numeric: tabular-nums; }
  #backend-url, #vllm-repo { font-family: var(--mono); font-size: 12.5px; }

  /* switch */
  input.switch { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--surface-3);
                 border: 0; cursor: pointer; transition: background-color .2s; flex: none; margin: 0; }
  input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
                        box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s ease; }
  input.switch:checked { background: var(--accent); }
  input.switch:checked::after { transform: translateX(16px); }
  input.switch:disabled { opacity: .4; cursor: default; }
  input.switch.big { width: 46px; height: 26px; }
  input.switch.big::after { width: 22px; height: 22px; }
  input.switch.big:checked { background: var(--good); }
  input.switch.big:checked::after { transform: translateX(20px); }
  label.toggle { display: flex; gap: 10px; align-items: center; font-size: 13.5px; cursor: pointer; }

  /* ---------- tiles (numbers) */
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
  .tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); }
  .card .tile { box-shadow: none; background: var(--surface-2); border-color: transparent; }
  .tile .label { color: var(--text-2); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
  .tile[data-metric] .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--tint)); flex: none; }
  .tile .value { font-size: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.2; }
  .tile .note { color: var(--muted); font-size: 12px; margin-top: 2px; }
  .skeleton { overflow: hidden; min-height: 84px; }
  .skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent-wash), transparent); animation: shimmer 1.4s infinite; }
  @keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
  [data-metric="requests"] { --tint: var(--m-requests); }
  [data-metric="tokens"]   { --tint: var(--m-tokens); }
  [data-metric="data"]     { --tint: var(--m-data); }
  [data-metric="busy"]     { --tint: var(--m-busy); }
  [data-metric="energy"]   { --tint: var(--m-energy); }
  [data-metric="cost"]     { --tint: var(--m-cost); }
  [data-metric="users"]    { --tint: var(--m-users); }

  /* ---------- gauges: ring colour = load level (--g set in JS) */
  .gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
  .gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .gauge svg { width: 92px; height: 92px; overflow: visible; }
  .gauge .track { fill: none; stroke: var(--surface-3); stroke-width: 7; }
  .gauge .bar { fill: none; stroke: rgb(var(--g, 150, 150, 156)); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%;
                transition: stroke-dashoffset .6s ease, stroke .3s; }
  .gauge .bands { transform: rotate(-90deg); transform-origin: 50% 50%; }
  .gauge .band { fill: none; stroke-width: 2; opacity: .35; }
  .gauge .mark { stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; opacity: .7; transform-origin: 50px 50px; }
  .gauge text { fill: var(--text); font: 600 17px var(--body); font-variant-numeric: tabular-nums; }
  .gauge .glabel { color: var(--text); font-size: 12.5px; font-weight: 500; margin-top: 4px; }
  .gauge .gsub { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; min-height: 1.4em; }
  .livebar { display: flex; gap: 28px; align-items: baseline; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--border); }
  .livebar .big { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
  .livebar .lbl { color: var(--text-2); font-size: 12.5px; }

  /* ---------- charts + legends */
  .chart { position: relative; height: 230px; }
  .nochart { display: none; color: var(--text-2); font-size: 13px; padding: 24px 0; }
  .legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; color: var(--text-2); font-size: 12px; }
  .legend span { display: inline-flex; align-items: center; }
  .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
  .legend .idle-label { color: var(--text); font-weight: 600; }
  .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; flex: none; }
  .sw.idle, .legend i.idle, .tile-accent.idle { background: repeating-linear-gradient(135deg, var(--idle) 0 2px, var(--idle-stripe) 2px 3.5px); }

  /* ---------- tables */
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
  th { color: var(--muted); font-weight: 500; font-size: 12px; }
  thead th { border-bottom-color: var(--border-strong); }
  tbody tr:hover td { background: var(--surface-2); }
  tbody tr.new { animation: fade .4s ease both; }
  td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
  td.actions { text-align: right; }
  td.actions .btn + .btn { margin-left: 4px; }
  td.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
  tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--border-strong); }
  tr.off td:not(:first-child) { color: var(--muted); }
  tr.idle td { color: var(--text-2); background: color-mix(in srgb, var(--idle) 10%, transparent); }
  tr.idle td:first-child { font-weight: 600; }
  .empty { color: var(--text-2); padding: 24px 10px; text-align: center; border-bottom: 0; white-space: normal; }
  tbody tr:hover td.empty { background: none; }
  .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 99px;
          background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
  .pill.good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
  .pill.warn { color: var(--warning); background: var(--warn-wash); }
  .pill.bad { color: var(--critical); background: var(--crit-wash); }
  .pill.admin { color: var(--accent); background: var(--accent-wash); }
  .running-bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; width: 80px; display: inline-block; vertical-align: middle; }
  .running-bar::after { content: ""; display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 4px; animation: indeterminate 1.2s ease-in-out infinite; }
  @keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

  /* ---------- key/value lists, team access, secrets */
  .kv { display: grid; grid-template-columns: max-content 1fr; gap: 12px 18px; align-items: start; }
  .kv > .k { color: var(--text-2); font-size: 13px; min-height: 28px; display: flex; align-items: center; }
  .kv > span:not(.k) { min-height: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .access-switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; cursor: pointer; }
  .access-switch .t { font-weight: 600; }
  .access-switch .s { color: var(--text-2); font-size: 12.5px; }
  .access-switch.on { background: color-mix(in srgb, var(--good) 8%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
  .reveal { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); animation: rise .25s ease both; }
  .secret { position: relative; margin: 10px 0 12px; cursor: pointer; }
  .secret code { display: block; word-break: break-all; font: 13px var(--mono); padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; filter: blur(6px); transition: filter .3s ease; user-select: none; }
  .secret.shown code { filter: none; user-select: all; }
  .secret .veil { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--text); transition: opacity .2s; }
  .secret.shown .veil { opacity: 0; pointer-events: none; }
  .callout { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--warn-wash); border: 1px solid var(--warn-line); font-size: 13px; }

  /* ---------- getting started */
  .progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-bottom: 16px; }
  .progress > div { height: 100%; background: var(--good); border-radius: 6px; transition: width .5s ease; }
  .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .steps li { display: flex; gap: 12px; align-items: flex-start; }
  .check { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--border-strong); color: var(--text-2); }
  .steps li.done .check { background: var(--good); border-color: var(--good); color: #fff; }
  .steps li.done .step-title { color: var(--text-2); }
  .check.spin { border: 2.5px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
  .check.act { border-color: var(--warning); color: var(--warning); }
  .check.err { border-color: var(--critical); color: var(--critical); }
  .step-body { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
  .steps .step-title { font-weight: 500; }
  .step-detail { font-size: 12.5px; color: var(--text-2); }
  li.err .step-detail { color: var(--critical); }
  li.act .step-detail { color: var(--warning); }
  .steps .step-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
  .steps .group-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; }

  /* ---------- filters, segmented controls, export menu */
  .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
  .seg { position: relative; display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 3px; }
  .seg button { position: relative; z-index: 1; border: 0; background: none; color: var(--text-2); padding: 5px 12px; min-height: 28px; font: inherit; font-size: 13px; cursor: pointer; border-radius: 7px; transition: color .15s; }
  .seg button:hover { color: var(--text); }
  .seg button[aria-pressed="true"] { color: var(--text); font-weight: 600; }
  .seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--border);
                transition: transform .25s cubic-bezier(.2, .8, .2, 1), width .25s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
  .seg.mini { padding: 2px; border-radius: 8px; }
  .seg.mini button { padding: 3px 9px; min-height: 24px; font-size: 12px; border-radius: 6px; }
  .seg.mini button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 0 0 1px var(--border); }
  .menu { position: relative; }
  .menu > summary { list-style: none; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 2px; opacity: .7; }
  .menu[open] > summary { background: var(--surface-2); }
  .menu .menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 240px; padding: 6px; display: grid; gap: 2px;
                     background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); animation: rise .15s ease both; }
  .menu .menu-list .btn { justify-content: flex-start; border: 0; background: none; font-weight: 400; }
  .menu .menu-list .btn:hover { background: var(--surface-2); }

  .savebar { position: sticky; bottom: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; margin-top: 16px; border-radius: 12px;
             background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow-pop); animation: rise .25s ease both; }
  .settings-actions { position: sticky; bottom: 16px; z-index: 4; display: flex; justify-content: flex-end; margin: -4px 0 16px; }
  .settings-actions .btn { box-shadow: var(--shadow-pop); }

  /* ---------- forms */
  .form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 20px; }
  .field { display: flex; flex-direction: column; gap: 6px; }
  .field > span { font-size: 13px; font-weight: 600; }
  .field small { color: var(--text-2); font-size: 12px; line-height: 1.45; }

  /* ---------- dialogs + toasts */
  dialog { border: 1px solid var(--border); border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); width: min(460px, calc(100vw - 32px)); }
  dialog[open] { animation: pop .2s ease-out; }
  dialog::backdrop { background: rgba(10, 12, 18, 0.5); animation: fade .2s ease; }
  @keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
  .dlg { padding: 24px; }
  .dlg h2 { margin-bottom: 8px; font-size: 17px; }
  .dlg p { margin: 0 0 14px; color: var(--text-2); line-height: 1.55; }
  .dlg .row { justify-content: flex-end; margin-top: 22px; }
  .shortcuts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 13px; }
  #toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 20; max-width: calc(100vw - 32px); }
  .toast { padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); font-size: 13px;
           display: flex; gap: 10px; align-items: center; animation: toast-in .25s ease-out; }
  .toast.out { animation: toast-out .25s ease forwards; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
  .toast.err { border-color: var(--critical); }
  .toast.ok .dot { background: var(--good); }
  .toast.err .dot { background: var(--critical); }
  #fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
  #stopped { display: none; position: fixed; inset: 0; background: var(--page); z-index: 30; align-items: center; justify-content: center; text-align: center; padding: 16px; }
  #stopped.show { display: flex; animation: fade .3s ease; }
  #stopped h1 { font-size: 20px; margin-bottom: 6px; }

  /* ---------- intro splash and the "stopped" screen (the footer button and About panel are at the end) */
  /* intro: the constellation draws itself, once per session */
  #splash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--page); transition: opacity .6s ease, visibility .6s; }
  #splash.gone { opacity: 0; visibility: hidden; }
  #splash .inner { text-align: center; }
  #splash svg { width: 120px; height: 120px; color: var(--text); }
  #splash .title { font-family: var(--brand); font-weight: 700; font-size: 20px; letter-spacing: .24em; text-transform: uppercase; margin-top: 16px; opacity: 0; animation: rise .6s .7s ease forwards; }
  #splash .by { font: 10.5px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 6px; opacity: 0; animation: rise .6s .9s ease forwards; }
  #splash .by b { font-family: var(--brand); letter-spacing: .38em; color: var(--text-2); }
  #stopped .orion { width: 90px; height: 90px; color: var(--muted); margin-bottom: 14px; }

  /* ---------- small screens */
  @media (max-width: 760px) { .details { grid-template-columns: 1fr; } }
  @media (max-width: 560px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .card { padding: 16px; }
    .gauges { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
    .gauge svg { width: 80px; height: 80px; }
    header { gap: 12px; padding-top: 12px; }
    .head-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .head-actions > .status, .head-actions > .gaming-top { justify-content: center; }
    .head-actions > * { min-height: 34px; }
    nav { margin: 0 -16px; padding: 0 16px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
    nav button { padding: 10px 10px 12px; }
    .card-head { grid-template-columns: 1fr; }
    .card-head > .right { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
    .filters .spacer { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  /* ---------- About Orion: the "Powered by Orion" footer button and the About panel it opens.
     Required in every Orion app (ORION-DESIGN.md §2a). The panel is always Night, whatever the app's mode. */
  footer.orion-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; padding: 36px 0 8px; text-align: center; }
  .powered { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: 10px; margin: 0 auto; padding: 6px 16px 6px 8px; border-radius: 99px; border: 1px solid transparent;
             background: none; cursor: pointer; color: var(--muted); font: 9.5px var(--mono); letter-spacing: .26em; text-transform: uppercase;
             transition: color .2s, border-color .2s, background-color .2s; }
  .powered svg { width: 34px; height: 34px; color: var(--text); flex: none; }
  .powered svg line { opacity: .6; stroke-width: 1.4; }  /* small size: bolder lines so the constellation reads clearly */
  .powered svg circle { transform-box: fill-box; transform-origin: center; transform: scale(1.7); }  /* and bigger stars */
  .powered > span { white-space: nowrap; }
  .powered b { font: 700 9.5px var(--brand); letter-spacing: .4em; color: var(--text-2); margin-right: -.4em; }
  .powered:hover, .powered:focus-visible { color: var(--text); border-color: color-mix(in srgb, var(--rigel) 40%, transparent); background: var(--accent-wash); }
  .powered:hover b { color: var(--text); }
  .powered .zw { font-size: 0; letter-spacing: 0; }  /* hidden watermark: no width, or it pushes the label off-centre */
  .orion line { stroke: currentColor; stroke-width: .9; stroke-linecap: round; opacity: .45; }
  .orion circle { fill: currentColor; }
  .orion .glow { opacity: .2; }
  .orion .betelgeuse { fill: #ff8a5c; }
  .orion .rigel { fill: #7aa2ff; }
  .orion.twinkle circle:not(.glow) { animation: twinkle 3.2s ease-in-out 3; transform-box: fill-box; transform-origin: center; }
  .orion.twinkle circle:nth-of-type(3n) { animation-delay: -1.1s; }
  .orion.twinkle circle:nth-of-type(3n+1) { animation-delay: -2.2s; }
  @keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
  .orion.draw line { stroke-dasharray: 60; stroke-dashoffset: 60; animation: od-line .9s cubic-bezier(.6, 0, .2, 1) forwards; }
  .orion.draw circle { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: od-star .5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
  @keyframes od-line { to { stroke-dashoffset: 0; } }
  @keyframes od-star { to { transform: scale(1); } }

  .orion-dlg { color-scheme: dark; width: min(460px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: auto;
               border: 1px solid rgba(140, 185, 255, .22); border-radius: 20px; background: #0a0a0b; color: #ececee; box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
               font-family: var(--body); }
  .orion-dlg::backdrop { background: rgba(4, 4, 6, .72); }
  .orion-dlg[open] { animation: od-in .4s cubic-bezier(.2, .8, .2, 1); }
  @keyframes od-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes od-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .od-inner { padding: 30px 26px 22px; text-align: center; background: radial-gradient(120% 70% at 50% 0%, rgba(122, 162, 255, .16), transparent 70%); }
  .od-mark svg { display: block; width: 168px; height: 168px; margin-inline: auto; color: #fff; filter: drop-shadow(0 0 14px rgba(140, 185, 255, .35)); }
  .od-word { font: 700 26px/1.2 var(--brand); letter-spacing: .5em; padding-left: .5em; margin-top: 12px; opacity: 0; animation: od-rise .6s .9s ease forwards; }
  .od-product, .od-links, .od-copy, .od-close { opacity: 0; animation: od-rise .6s 1.2s ease forwards; }
  .od-product { margin-top: 22px; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .03); text-align: left; }
  .od-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
  .od-logo svg, .od-logo img { width: 34px; height: 34px; flex: none; }
  .od-logo span { font: 700 16px var(--brand); letter-spacing: .2em; text-transform: uppercase; }
  .od-facts { margin: 0; display: grid; }
  .od-facts > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13.5px; }
  .od-facts > div:first-child { border-top: 0; }
  .od-facts dt { color: #84848b; font: 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; align-self: center; white-space: nowrap; }
  .od-facts dd { margin: 0; text-align: right; color: #ececee; overflow-wrap: anywhere; }
  .od-facts dd code { font: 12.5px var(--mono); background: none; border: 0; padding: 0; color: #ececee; }
  .od-facts a { color: #7aa2ff; }
  .od-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .od-links:empty { display: none; }
  .orion-dlg nav.od-links { position: static; padding: 0; border: 0; background: none; overflow: visible; margin-left: 0; margin-right: 0; }  /* immune to the host page's nav styles */
  .od-links a { font: 500 13px var(--body); color: #ececee; text-decoration: none; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .15);
                transition: background-color .2s, border-color .2s; }
  .od-links a:hover { background: rgba(122, 162, 255, .12); border-color: rgba(122, 162, 255, .5); }
  .od-copy { margin: 16px 0 0; font-size: 12px; color: #84848b; }
  .od-close { margin-top: 14px; min-height: 34px; padding: 6px 20px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2); background: none; color: #ececee;
              font: 500 13px var(--body); cursor: pointer; }
  .od-close:hover { background: rgba(255, 255, 255, .06); }
  @media (prefers-reduced-motion: reduce) {
    .orion-dlg, .orion-dlg * { animation: none !important; opacity: 1 !important; }
    .orion.draw line { stroke-dashoffset: 0; } .orion.draw circle { transform: none; }
  }
