:root {
  color-scheme: dark;
  --base: #0a1421;
  --panel: #101e2d;
  --surface: #0c1826;
  --line: #2a3e50;
  --text: #edf4fa;
  --muted: #aebfce;
  --cyan: #78d5e4;
  --gold: #f1ca81;
  --blue: #7591a9;
  font: 16px/1.48 system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 15% 0%, #172b3c 0, var(--base) 39rem); color: var(--text); }
[hidden] { display: none !important; }
.width { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--line); background: #0a1521d9; }
.mast-inner { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
a { color: var(--cyan); text-underline-offset: .25em; }
.brand { text-decoration: none; color: var(--text); font-weight: 650; }
.brand span { padding-inline: .3rem; color: var(--blue); }
.release-link { font: .75rem ui-monospace, monospace; color: var(--muted); white-space: nowrap; }
.heading { padding: clamp(26px, 4.5vw, 57px) 0 22px; }
h1 { font-family: Georgia, serif; font-size: clamp(2rem, 4.4vw, 3.65rem); font-weight: 500; line-height: 1.07; letter-spacing: -.035em; margin: 0; }
h1 span { color: var(--gold); }
.heading p { color: var(--muted); margin-bottom: 0; max-width: 68ch; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
button, select { font: inherit; color: inherit; }
button, select { border: 1px solid var(--line); background: #162738; border-radius: 7px; min-height: 44px; padding: 7px 13px; }
button { cursor: pointer; }
button:hover:not(:disabled), button[aria-pressed="true"] { border-color: var(--cyan); background: #22384a; }
button:disabled { cursor: default; opacity: .42; }
button.primary { background: var(--cyan); color: #0d202c; border-color: transparent; font-weight: 700; }
button.primary:hover:not(:disabled) { background: #a6ecf4; }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[role="tab"] { background: transparent; color: var(--muted); border: 0; border-radius: 0; border-bottom: 3px solid transparent; }
[role="tab"][aria-selected="true"] { color: var(--cyan); border-color: var(--cyan); font-weight: 700; }
[role="tab"]:hover { background: #152739; }
.workbench { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 14px; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card-title { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 10px; }
.card-title p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.015em; line-height: 1.3; }
.controls h2 { margin-bottom: .85rem; }
.badge { display: inline-block; padding: 4px 9px; border: 1px solid currentColor; border-radius: 5px; font-size: .72rem; line-height: 1.3; white-space: nowrap; }
.badge.certified { color: var(--gold); background: #2a251e; }
.badge.verified { color: var(--cyan); background: #132c38; }
.badge.experimental { color: #f1bb9a; background: #322620; }
.scene, .flux-scene { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.scene text, .flux-scene text { font-family: ui-monospace, monospace; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; min-height: 22px; margin-top: 9px; color: var(--muted); font-size: .8rem; }
.swatch { display: inline-block; width: .6rem; height: .6rem; border-radius: .15rem; background: var(--blue); margin-right: .3rem; }
.swatch.gold { background: var(--gold); }
.swatch.cyan { background: var(--cyan); }
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
select { width: 100%; min-width: 0; margin-bottom: 11px; }
.check { min-height: 42px; display: flex; align-items: center; gap: 8px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--cyan); }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin: .15rem 0 .85rem; }
.pair, .flux-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.flux-controls { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stats { margin: .45rem 0 .7rem; }
.stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.stats dt, .muted { color: var(--muted); }
.stats dd { margin: 0; font-family: ui-monospace, monospace; text-align: right; }
.info { margin-top: 14px; }
summary { cursor: pointer; font-weight: 650; min-height: 30px; }
summary::marker { color: var(--cyan); }
details:not([open]).info { padding-block: 13px; }
.small { font-size: .85rem; }
.mono, pre, .equation { font-family: ui-monospace, monospace; }
p { overflow-wrap: anywhere; }
p:last-child { margin-bottom: 0; }
pre { font-size: .84rem; white-space: pre; overflow: auto; background: var(--surface); border-radius: 6px; padding: 13px; margin-bottom: 0; }
.values { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; margin-top: 9px; }
.coordinate { display: grid; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.coordinate small { color: var(--muted); }
.coordinate strong { font: .88rem ui-monospace, monospace; color: var(--cyan); }
.coordinate.highlight { border-color: var(--gold); }
.notice { border-left: 2px solid var(--gold); background: #282622; border-radius: 3px 7px 7px 3px; padding: 10px 12px; font-size: .88rem; }
.source-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; }
.foot { padding: 22px 0 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .83rem; }
.node-target { cursor: pointer; }
.node-target:focus-visible circle, .node-target:hover circle { stroke: var(--gold); stroke-width: 4; }
@media (max-width: 800px) {
  .workbench { grid-template-columns: 1fr; }
  .flux-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .width { width: calc(100% - 24px); }
  .card { padding: 13px; }
  .card-title { flex-wrap: wrap; gap: 6px; }
  .tabs { justify-content: space-between; gap: 1px; }
  [role="tab"] { padding-inline: 8px; font-size: .79rem; flex: 1; }
  .release-link { font-size: .65rem; }
  .brand { font-size: .84rem; }
  .values { grid-template-columns: repeat(3,1fr); }
  .pair { gap: 8px; }
}
