@font-face { font-family: "Fira Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/ui/fonts/fira-mono-latin-400-normal.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: "Fira Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/ui/fonts/fira-mono-latin-500-normal.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: "Fira Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/ui/fonts/fira-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Fira Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/ui/fonts/fira-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-400-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-500-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-600-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-700-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/ui/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("/ui/fonts/sora-latin-600-normal.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: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("/ui/fonts/sora-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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; }
/* Ducto stylesheet. Rules: DESIGN.md. Colour values: docs/design/pilot-modern/tokens/tokens.css, copied
   unchanged into the theme blocks below; no other rule names a colour, only var(--token).
   The root element picks the theme: md-dark, md-light, or md-auto (sign-in pages: follows the system). */
.md-dark, .md-auto {
  --bg: #080535;
  --dot: #241A78;
  --text: #FFFFFF;
  --text2: #C6CCE9;
  --text3: #9DA8D8;
  --title: #FFFFFF;
  --card: rgba(255,255,255,.05);
  --edge: rgba(157,168,216,.24);
  --hair: rgba(157,168,216,.16);
  --edge-dash: rgba(157,168,216,.5);
  --shadow: 0 18px 40px rgba(3,2,25,.5);
  --glow: 0 0 70px rgba(46,196,216,.14);
  --glass: rgba(255,255,255,.05);
  --glass2: rgba(255,255,255,.03);
  --hover: rgba(255,255,255,.08);
  --active: rgba(255,255,255,.14);
  --panel: rgba(255,255,255,.08);
  --panel-edge: rgba(255,255,255,.22);
  --panel-shadow: 0 24px 48px rgba(3,2,25,.45),inset 0 1px 0 rgba(255,255,255,.14);
  --line: #3234A0;
  --line2: #9DA8D8;
  --flow: #C6CCE9;
  --gate: #FFFFFF;
  --icon: #C6CCE9;
  --avatar: #3234A0;
  --ok: #5EC98A;
  --ok-dot: #5EC98A;
  --ok-bg: rgba(94,201,138,.14);
  --warn-text: #E0A100;
  --warn-dot: #E0A100;
  --warn-bg: rgba(224,161,0,.16);
  --warn-line: rgba(224,161,0,.45);
  --warn-flow: #E0A100;
  --signal: #2EC4D8;
  --btn: #2EC4D8;
  --btn-text: #080535;
  --field: rgba(255,255,255,.04);
  --field-edge: #7380C8;
  --err-text: #FF9B8F;
  --err-bg: rgba(180,35,24,.28);
  --focus: #9DA8D8;
  color-scheme: dark;
}
.md-light {
  --bg: #F3F5FC;
  --dot: #C6CCE9;
  --text: #14191F;
  --text2: #3B434D;
  --text3: #535C66;
  --title: #210F89;
  --card: rgba(255,255,255,.74);
  --edge: rgba(33,15,137,.16);
  --hair: rgba(33,15,137,.10);
  --edge-dash: rgba(33,15,137,.36);
  --shadow: 0 18px 40px rgba(33,15,137,.10);
  --glow: 0 0 70px rgba(46,196,216,.24);
  --glass: rgba(255,255,255,.68);
  --glass2: rgba(33,15,137,.04);
  --hover: rgba(33,15,137,.06);
  --active: rgba(33,15,137,.10);
  --panel: rgba(255,255,255,.58);
  --panel-edge: rgba(33,15,137,.16);
  --panel-shadow: 0 24px 48px rgba(33,15,137,.16),inset 0 1px 0 rgba(255,255,255,.8);
  --line: #C6CCE9;
  --line2: #9DA8D8;
  --flow: #4C57B7;
  --gate: #210F89;
  --icon: #3B434D;
  --avatar: #E4E7F6;
  --ok: #17703F;
  --ok-dot: #2E9E5B;
  --ok-bg: #E8F5EC;
  --warn-text: #8A5A00;
  --warn-dot: #E0A100;
  --warn-bg: #FDF3DC;
  --warn-line: #E0A100;
  --warn-flow: #8A5A00;
  --signal: #2EC4D8;
  --btn: #210F89;
  --btn-text: #FFFFFF;
  --field: #FFFFFF;
  --field-edge: #6E757F;
  --err-text: #B42318;
  --err-bg: #FDECEA;
  --focus: #7380C8;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  .md-auto {
    --bg: #F3F5FC;
    --dot: #C6CCE9;
    --text: #14191F;
    --text2: #3B434D;
    --text3: #535C66;
    --title: #210F89;
    --card: rgba(255,255,255,.74);
    --edge: rgba(33,15,137,.16);
    --hair: rgba(33,15,137,.10);
    --edge-dash: rgba(33,15,137,.36);
    --shadow: 0 18px 40px rgba(33,15,137,.10);
    --glow: 0 0 70px rgba(46,196,216,.24);
    --glass: rgba(255,255,255,.68);
    --glass2: rgba(33,15,137,.04);
    --hover: rgba(33,15,137,.06);
    --active: rgba(33,15,137,.10);
    --panel: rgba(255,255,255,.58);
    --panel-edge: rgba(33,15,137,.16);
    --panel-shadow: 0 24px 48px rgba(33,15,137,.16),inset 0 1px 0 rgba(255,255,255,.8);
    --line: #C6CCE9;
    --line2: #9DA8D8;
    --flow: #4C57B7;
    --gate: #210F89;
    --icon: #3B434D;
    --avatar: #E4E7F6;
    --ok: #17703F;
    --ok-dot: #2E9E5B;
    --ok-bg: #E8F5EC;
    --warn-text: #8A5A00;
    --warn-dot: #E0A100;
    --warn-bg: #FDF3DC;
    --warn-line: #E0A100;
    --warn-flow: #8A5A00;
    --signal: #2EC4D8;
    --btn: #210F89;
    --btn-text: #FFFFFF;
    --field: #FFFFFF;
    --field-edge: #6E757F;
    --err-text: #B42318;
    --err-bg: #FDECEA;
    --focus: #7380C8;
    color-scheme: light;
  }
}

:root {
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "Fira Mono", ui-monospace, monospace;
  --font-size-48: 48px;
  --font-size-30: 30px;
  --font-size-22: 22px;
  --font-size-14: 14px;
  --font-size-13: 13px;
  --font-size-12: 12px;

  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-40: 40px;

  --radius-6: 6px;
  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-18: 18px;
  --radius-pill: 999px;

  --height-22: 22px;
  --height-24: 24px;
  --height-40: 40px;
  --height-44: 44px;
  --height-48: 48px;
  --height-52: 52px;

  --border-1: 1px;
  --border-2: 2px;
  --bar-3: 3px;
  --focus-gap: 2px;
  --dot-size: 6px;
  --blur: 14px;
  --page-menu-width: 272px;
  --user-menu-width: 248px;
  --user-name-width: 220px;
  --preview-width: 340px;
  --wizard-text-width: 760px;
  --swatch-size: 40px;
  --gate-width: 30px;
  --gate-height: 16px;
  --duration-gate: 0.3s;
  --duration-pass: 0.7s;
  --sign-in-width: 440px;
  --kanal-height: 64px;
  --kanal-gate: 44px;
  --kanal-pt: 10px;
  --line-base: 1.5px;
  --line-title: 28px;
  --tracking-title: -0.02em;
  --icon-size: 16px;
  --line-data: 3px;
  --line-gate: 3.5px;
  --state-icon: 28px;
  --kanal-width: 352px;
  --content-narrow: 820px;
  --duration-flow: 2.2s;
  --canvas-gap: 100px;
  --stage-width: 1440px;
  --card-head: 46px;
  --card-row: 30px;
  --row-step: 32px;
  --avatar-size: 32px;
  --usage-box: 140px;
  --overview-columns: minmax(0, 300fr) minmax(0, 32fr) minmax(0, 300fr) minmax(0, 128fr) minmax(0, 264fr) minmax(0, 72fr) minmax(0, 270fr);
  --nav-icon: 20px;
  --card-icon: 18px;
  --graph-height: clamp(420px, 68vh, 760px);
  --graph-panel: 300px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-height: 100%;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 2px 2px, var(--dot) 1px, transparent 1.5px);
  background-size: 24px 24px;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-13);
  line-height: 1.5;
  color: var(--text);
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--font-size-30); font-weight: 700; color: var(--title); line-height: 1.2; }
h2 { font-size: var(--font-size-14); font-weight: 600; color: var(--text); }
h3 { font-size: var(--font-size-14); font-weight: 600; color: var(--text); }
.lead { font-size: var(--font-size-14); color: var(--text2); }
.help { font-size: var(--font-size-13); color: var(--text3); }
.mono { font-family: var(--font-mono); }
.big-number { font-family: var(--font-mono); font-size: var(--font-size-48); font-weight: 500; color: var(--title); }
.card-number { font-family: var(--font-mono); font-size: var(--font-size-22); font-weight: 500; color: var(--title); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }

.console { min-height: 100vh; }
/* Wide windows: page and top bar stay on the 1440 stage, centred; the dots on html still fill the window. */
.page { max-width: var(--stage-width); margin-inline: auto; padding: var(--space-24) var(--space-40) var(--space-40); display: grid; gap: var(--space-24); align-content: start; }

/* Top bar (DESIGN.md 5): logo, page menu, organisation, last check, user menu. */
.topbar {
  position: relative;
  z-index: 10;
  max-width: var(--stage-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-14);
  min-height: var(--height-48);
  padding: var(--space-16) var(--space-24) 0;
}
/* Clear space around the logo: half the mark height (logo package README). */
.wordmark { display: flex; align-items: center; gap: var(--space-12); padding-right: var(--space-6); }
.wordmark img, .sign-in-brand img { display: block; flex: none; }
.topbar-org { margin-left: auto; min-width: 0; font-size: var(--font-size-13); color: var(--text2); overflow-wrap: anywhere; }
.last-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: var(--height-44);
  padding: 0 var(--space-14);
  border: var(--border-1) solid var(--edge);
  border-radius: 22px;
  font-size: var(--font-size-13);
  color: var(--text2);
  background: var(--glass);
}
.last-check .mono { color: var(--text); }

/* Menus: native details/summary, so they need no script. Drop-down menus are glass (DESIGN.md 5.3). */
.page-menu, .user-menu { position: relative; }
.page-menu > summary, .user-menu > summary {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  min-height: var(--height-44);
  padding: 0 var(--space-14);
  border: var(--border-1) solid var(--edge);
  border-radius: 22px;
  cursor: pointer;
  list-style: none;
  font-size: var(--font-size-13);
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
}
.user-menu > summary { padding-left: var(--space-8); }
.page-menu > summary::-webkit-details-marker, .user-menu > summary::-webkit-details-marker { display: none; }
.page-menu > summary:hover, .page-menu[open] > summary, .user-menu > summary:hover, .user-menu[open] > summary { background: var(--active); }
.chevron { flex: none; width: var(--icon-size); height: var(--icon-size); color: var(--text2); }
.page-menu[open] .chevron, .user-menu[open] .chevron { transform: rotate(180deg); }
.menu-icon { flex: none; width: var(--nav-icon); height: var(--nav-icon); }
.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--space-28);
  height: var(--space-28);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-12);
  font-weight: 700;
  color: var(--text);
  background: var(--avatar);
}
/* Long names and e-mail addresses end in an ellipsis; the title attribute keeps the full text. */
.user-name { max-width: var(--user-name-width); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel {
  position: absolute;
  top: calc(100% + var(--space-8));
  z-index: 5;
  display: flex;
  flex-direction: column;
  border: var(--border-1) solid var(--panel-edge);
  border-radius: var(--radius-18);
  color: var(--text);
  background: var(--panel);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--panel-shadow);
}
.page-menu .menu-panel { left: 0; width: var(--page-menu-width); gap: var(--space-2); padding: var(--space-8); }
.page-menu .menu-panel a {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  min-height: var(--height-44);
  padding: 0 var(--space-12);
  border-radius: var(--radius-10);
  font-size: var(--font-size-13);
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
}
.page-menu .menu-panel a:hover { color: var(--text); background: var(--hover); }
.page-menu .menu-panel a[aria-current="page"] { color: var(--text); background: var(--active); font-weight: 600; }
.page-menu .grow { flex: 1; }
.user-menu .menu-panel { right: 0; width: var(--user-menu-width); gap: var(--space-10); padding: var(--space-12) var(--space-12) var(--space-6); }
.menu-group { display: flex; flex-direction: column; gap: var(--space-6); }
.menu-label { font-size: var(--font-size-12); color: var(--text2); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: var(--border-1) solid var(--edge); border-radius: var(--radius-10); }
.segmented a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--height-44);
  font-size: var(--font-size-13);
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
}
.segmented a:hover { color: var(--text); background: var(--hover); }
.segmented a[aria-current="true"] { color: var(--text); background: var(--active); font-weight: 600; }
.menu-row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  width: 100%;
  min-height: var(--height-44);
  padding: 0 var(--space-4);
  border: 0;
  border-top: var(--border-1) solid var(--hair);
  font-family: inherit;
  font-size: var(--font-size-13);
  font-weight: 600;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.menu-row .menu-icon { color: var(--text2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: var(--height-44);
  padding: 0 var(--space-20);
  border: var(--border-1) solid transparent;
  border-radius: 22px;
  font-family: inherit;
  font-size: var(--font-size-13);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}
/* `hidden` must win over display rules: a script-only control (e.g. Copy) stays out of sight without JS. */
[hidden] { display: none !important; }
.btn-primary { color: var(--btn-text); background: var(--btn); border-color: var(--btn); border-radius: 22px; }
.btn-primary:hover { color: var(--btn-text); filter: brightness(1.1); }
.btn-secondary { color: var(--text); background: var(--glass); border: var(--border-1) solid var(--edge); border-radius: 22px; }
.btn-secondary:hover { color: var(--text); background: var(--active); }
.btn-link { color: var(--text); background: transparent; border-color: transparent; padding: 0 var(--space-8); text-decoration: underline; text-underline-offset: var(--space-2); }
.btn-link:hover { background: var(--hover); }
.btn-primary:disabled, .btn-secondary:disabled { color: var(--text3); background: var(--glass2); border-color: var(--hair); filter: none; cursor: not-allowed; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-link:focus-visible { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
a { color: var(--text); font-weight: 600; text-underline-offset: var(--space-2); }
a:hover { color: var(--text); }

.field { display: grid; gap: var(--space-6); }
.field label { font-weight: 600; display: flex; align-items: center; gap: var(--space-8); }
.field input {
  min-height: var(--height-44);
  padding: 0 var(--space-12);
  border: var(--border-1) solid var(--field-edge);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: var(--font-size-13);
  color: var(--text);
  background: var(--field);
}
.field input::placeholder { color: var(--text3); }
.field input:focus-visible { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
.field input:read-only { color: var(--text); background: var(--glass2); border-color: var(--hair); }
.field input[aria-invalid="true"] { border: var(--border-2) solid var(--err-text); }
.field input:disabled { color: var(--text3); background: var(--glass2); }
.readonly-box {
  display: flex;
  align-items: center;
  min-height: var(--height-40);
  padding: 0 var(--space-12);
  border: var(--border-1) solid var(--hair);
  border-radius: 10px;
  font-size: var(--font-size-13);
  color: var(--text);
  background: var(--glass2);
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--height-24);
  padding: 0 var(--space-10);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-12);
  font-weight: 700;
  white-space: nowrap;
  color: var(--text2);
  background: var(--glass2);
}
.tag::before { content: ""; width: var(--dot-size); height: var(--dot-size); border-radius: var(--radius-pill); background: var(--text3); }
.tag-green { color: var(--ok); background: var(--ok-bg); }
.tag-green::before { background: var(--ok-dot); }
.tag-yellow { color: var(--warn-text); background: var(--warn-bg); }
.tag-yellow::before { background: var(--warn-dot); }
.tag-red { color: var(--err-text); background: var(--err-bg); }
.tag-red::before { background: var(--err-text); }
.tag-draft { color: var(--text2); background: transparent; border: var(--border-1) solid var(--field-edge); }
.tag-info { color: var(--text2); background: var(--glass2); border: var(--border-1) solid var(--edge); }
.tag-soon { color: var(--text2); background: var(--glass2); border: var(--border-1) dashed var(--edge-dash); }
.tag-type, .tag-new { min-height: var(--height-22); padding: 0 var(--space-8); font-weight: 600; border: var(--border-1) solid var(--hair); }
.tag-type { color: var(--text2); background: var(--glass2); }
.tag-new { color: var(--warn-text); background: var(--warn-bg); }
.tag-info::before, .tag-soon::before, .tag-type::before, .tag-new::before { content: none; }
.small-tag {
  display: inline-flex;
  align-items: center;
  min-height: var(--height-22);
  padding: 0 var(--space-8);
  border: var(--border-1) solid var(--hair);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-12);
  font-weight: 600;
  color: var(--text2);
  background: var(--glass2);
}

.alert { padding: var(--space-10) var(--space-12); border-radius: var(--radius-10); font-size: var(--font-size-13); }
.alert-red { color: var(--err-text); background: var(--err-bg); }
.alert-yellow { color: var(--warn-text); background: var(--warn-bg); }
.alert-info { color: var(--text); background: var(--glass2); border: var(--border-1) solid var(--edge); }

.card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-12);
  padding: var(--space-24);
  color: var(--text);
  background: var(--card);
  border: var(--border-1) solid var(--edge);
  border-radius: 18px;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow), var(--glow);
}
.box { padding: var(--space-18); border-radius: var(--radius-12); background: var(--glass2); }
/* The old full-width band becomes a glass surface until the canvas pages replace it. */
.band { padding: var(--space-28); border: var(--border-1) solid var(--edge); border-radius: 18px; color: var(--text); background: var(--card); backdrop-filter: blur(var(--blur)); }
.band h2 { font-size: var(--font-size-22); color: var(--title); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
table { width: 100%; border-collapse: collapse; }
th { height: var(--height-44); padding: 0 var(--space-18); text-align: left; font-size: var(--font-size-12); font-weight: 600; color: var(--text3); }
td { height: var(--height-52); padding: 0 var(--space-18); border-top: var(--border-1) solid var(--hair); }
tr[aria-selected="true"] td { background: var(--active); }
tr[aria-selected="true"] td:first-child { box-shadow: inset var(--bar-3) 0 0 var(--gate); }
.swatch { width: var(--swatch-size); height: var(--swatch-size); border-radius: var(--radius-8); border: var(--border-1) solid var(--edge); }

.gate { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-13); font-weight: 600; }
.gate-icon { width: var(--gate-width); height: var(--gate-height); flex: none; }
.gate-animate .gate-pass { stroke-dasharray: 14; animation: gate-pass var(--duration-pass) ease-out 1; }
@keyframes gate-pass { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }
.gate-toggle { display: inline-flex; align-items: center; min-height: var(--height-44); padding: 0 var(--space-12); border: var(--border-1) solid var(--edge); border-radius: var(--radius-10); color: var(--text); background: var(--glass); cursor: pointer; }
.gate-toggle:hover { background: var(--hover); }
.gate-toggle:focus-within { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
.gate-toggle input { position: absolute; opacity: 0; }
.gate-toggle input:checked ~ .when-hidden, .gate-toggle input:not(:checked) ~ .when-shown { display: none; }

/* Configuration wizard (DESIGN.md 3, 7): the step chain is drawn above the question (h1), then the canvas.
   The head follows the h1 in the document; order: -1 lifts it. */
.page:has(> .wz-head) h1 { font-size: var(--font-size-30); max-width: var(--wizard-text-width); }
.wz-head { order: -1; }
.wz-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.wz-steps li { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-14); color: var(--text2); }
.wz-steps li + li:not([data-step="publish"])::before { content: ""; width: var(--space-28); height: var(--border-2); background: var(--line2); }
.wz-steps a, .wz-step { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--height-44); padding: 0 var(--space-14); border: var(--border-1) solid transparent; border-radius: var(--radius-pill); font-weight: 500; text-decoration: none; color: var(--text2); }
.wz-steps a { color: var(--text); }
.wz-steps a:hover { background: var(--hover); }
.wz-step .mono { font-size: var(--font-size-12); color: var(--text3); }
.wz-step-now { font-weight: 600; color: var(--text); background: var(--active); border-color: var(--edge); }
.wz-step-now .mono { color: var(--text); }
.wz-step-done { flex: none; width: var(--icon-size); height: var(--icon-size); color: var(--ok-dot); }

.wz-stage { grid-column: 1 / -1; display: grid; column-gap: var(--canvas-gap); row-gap: var(--space-40); align-items: start; }
.wz-stage-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.wz-stage-connect { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wz-stage-three { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 2.4fr); }
.wz-stage-fields { grid-template-columns: minmax(0, 1fr) var(--preview-width); padding-left: var(--canvas-gap); }
.wz-stage-publish { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.wz-col { display: grid; gap: var(--space-40); align-content: start; min-width: 0; }
.wz-mid { align-self: center; }
.wz-low { align-self: end; }

.wz-node { gap: 0; padding: 0; align-content: start; min-width: 0; }
.wz-stage-chain .wz-node { grid-template-rows: auto 1fr auto; }
.wz-hd { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: var(--height-48); padding: 0 var(--space-16); border-bottom: var(--border-1) solid var(--hair); }
.wz-hd h2 { display: flex; align-items: center; gap: var(--space-10); min-width: 0; font-size: var(--font-size-14); color: var(--title); }
.wz-icon { flex: none; width: var(--icon-size); height: var(--icon-size); color: var(--text2); }
.wz-count { flex: none; font-size: var(--font-size-12); color: var(--text3); }
.wz-part { display: grid; gap: var(--space-12); align-content: start; padding: var(--space-16); }
.wz-part + .wz-part, .wz-checks + .wz-part { border-top: var(--border-1) solid var(--hair); }
.wz-facts { margin: 0; padding: var(--space-8) var(--space-16); display: grid; align-content: start; }
.wz-part .wz-facts { padding: 0; }
.wz-facts div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: var(--height-40); }
.wz-facts dt { display: inline-flex; align-items: center; gap: var(--space-8); color: var(--text2); }
.wz-facts dd { margin: 0; min-width: 0; font-weight: 600; text-align: right; color: var(--text); overflow-wrap: anywhere; }
.wz-go { margin: 0 var(--space-16) var(--space-8); }
.wz-go .wz-icon, .wz-btn .wz-icon { color: currentColor; }
.wz-btn { gap: var(--space-8); }
.wz-note { max-width: var(--wizard-text-width); }
.wz-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-16); }
.wz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }

.wz-checks { list-style: none; margin: 0; padding: var(--space-8) var(--space-16); display: grid; }
.wz-checks li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); min-height: var(--height-44); }
.wz-checks .gate { font-weight: 500; }
.wz-result { font-weight: 700; color: var(--text); }
.wz-out { padding: var(--space-16); border-top: var(--border-1) solid var(--hair); font-weight: 600; text-align: right; color: var(--text); }

.wz-numbers { display: flex; flex-wrap: wrap; gap: var(--space-40); }
.wz-number { display: grid; gap: var(--space-4); color: var(--text2); }
.wz-part.wz-gate-note { display: flex; align-items: center; gap: var(--space-16); color: var(--text2); }
.wz-part.wz-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); }
.wz-found { display: grid; gap: var(--space-8); }
.wz-found + .wz-found { margin-top: var(--space-12); }
.wz-found h3 { font-size: var(--font-size-14); }
.wz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-10); }
.wz-list li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-12); }
.wz-list li > span { flex: 1; min-width: 0; display: grid; gap: var(--space-2); }
.wz-list .mono { font-size: var(--font-size-12); color: var(--text2); }

.wz-table-card { overflow-x: auto; }
.wz-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12) var(--space-16); padding: var(--space-12) var(--space-16) var(--space-12) var(--space-24); border-bottom: var(--border-1) solid var(--hair); }
.wz-totals { flex: 1; display: flex; flex-wrap: wrap; gap: var(--space-8); color: var(--text2); }
.wz-totals strong { color: var(--text); }
.wz-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
.wz-search input { min-height: var(--height-44); width: calc(var(--space-40) * 6); max-width: 100%; padding: 0 var(--space-16); border: var(--border-1) solid var(--edge); border-radius: var(--radius-pill); font-family: inherit; font-size: var(--font-size-13); color: var(--text); background: var(--field); }
.wz-search input::placeholder, .wz-input::placeholder { color: var(--text3); }
.wz-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
.wz-removed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); padding: var(--space-8) var(--space-16) var(--space-8) var(--space-24); border-bottom: var(--border-1) solid var(--hair); font-size: var(--font-size-13); color: var(--text2); background: var(--glass2); }
.wz-removed p { flex: 1; min-width: 0; }
.wz-removed a { display: inline-flex; align-items: center; min-height: var(--height-44); }
.wz-table th, .wz-table td { padding: var(--space-12) var(--space-18); vertical-align: top; }
.wz-table td { height: auto; }
.wz-table tr > :first-child { padding-left: var(--space-24); }
.wz-table thead th { background: var(--glass2); }
.wz-table tbody th { text-align: left; font-size: var(--font-size-13); font-weight: 600; color: var(--text); border-top: var(--border-1) solid var(--hair); }
.wz-table tr.wz-selected td { background: var(--active); }
.wz-diff th .gate-icon { margin-right: var(--space-8); vertical-align: middle; }
.wz-state { width: 1%; white-space: nowrap; }
.wz-gate-btn { display: inline-flex; align-items: center; min-height: var(--height-44); padding: 0 var(--space-8); border: var(--border-1) solid transparent; border-radius: var(--radius-10); font-family: inherit; font-size: var(--font-size-13); color: var(--text); background: transparent; cursor: pointer; }
.wz-gate-btn:hover { border-color: var(--edge); background: var(--hover); }
.wz-gate-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
.wz-name > a { display: inline-flex; align-items: center; min-height: var(--height-44); margin-right: var(--space-8); font-size: var(--font-size-14); }
.wz-system { display: block; font-family: var(--font-mono); font-size: var(--font-size-12); color: var(--text2); }
.wz-tags { display: inline-flex; flex-wrap: wrap; gap: var(--space-4); }
.wz-tag { display: inline-flex; align-items: center; min-height: var(--height-22); padding: 0 var(--space-8); border: var(--border-1) solid var(--hair); border-radius: var(--radius-pill); font-size: var(--font-size-12); font-weight: 600; color: var(--text2); background: var(--glass2); }
.wz-tag-new { color: var(--warn-text); background: var(--warn-bg); }
.wz-edit > * + * { margin-top: var(--space-8); }
.wz-desc { display: flex; align-items: center; gap: var(--space-12); }
.wz-input { flex: 1; min-width: 0; min-height: var(--height-44); padding: 0 var(--space-12); border: var(--border-1) solid var(--field-edge); border-radius: var(--radius-10); font-family: inherit; font-size: var(--font-size-13); color: var(--text); background: var(--field); }
.wz-input:focus-visible { border-color: var(--focus); }
.wz-counter { flex: none; font-size: var(--font-size-13); color: var(--text3); }
.wz-choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.wz-choices legend { padding: 0; font-weight: 600; }
.wz-options { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-18); }
.wz-check { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--height-44); cursor: pointer; }
.wz-check input { width: var(--space-18); height: var(--space-18); margin: 0; accent-color: var(--btn); }
.wz-table-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-16); padding: var(--space-12) var(--space-16) var(--space-12) var(--space-24); border-top: var(--border-1) solid var(--hair); font-size: var(--font-size-13); color: var(--text2); }
.wz-summary .count { padding: var(--space-24); }
.wz-box { display: grid; gap: var(--space-6); border: var(--border-1) solid var(--hair); background: var(--glass2); }

.wz-part.wz-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-12); }
.wz-of { font-size: var(--font-size-22); color: var(--text3); }
.wz-waiting { display: inline-flex; align-items: center; gap: var(--space-6); }
.wz-part.wz-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); }
.wz-card-foot .help { flex: 1; min-width: 0; }
@media (max-width: 68.75em) {
  .wz-stage { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .wz-mid, .wz-low { align-self: auto; }
}

/* Sign-in pages (DESIGN.md 3, 4): header, the card centred as a node on the channel, footer. */
.sign-in-page { min-height: 100vh; display: flex; flex-direction: column; padding: var(--space-20) clamp(var(--space-16), 4vw, var(--space-40)); overflow-x: clip; }
.sign-in-brand { display: flex; align-items: center; gap: var(--space-16); min-height: var(--height-48); }
.sign-in-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-24) 0; }
.sign-in-card {
  position: relative;
  width: 100%;
  max-width: var(--sign-in-width);
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--card);
  border: var(--border-1) solid var(--edge);
  border-radius: var(--radius-18);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow), var(--glow);
}
.sign-in-body { display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-4) clamp(var(--space-20), 6vw, var(--space-32)) var(--space-28); }
.sign-in-head { display: flex; flex-direction: column; gap: var(--space-8); }
.sign-in-card h1 { font-size: var(--font-size-22); line-height: var(--line-title); letter-spacing: var(--tracking-title); }
.sign-in-card .lead { line-height: 1.55; }
.sign-in-place { font-size: var(--font-size-13); color: var(--text2); overflow-wrap: anywhere; }
.sign-in-place .mono { color: var(--text); }
.sign-in-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-16); min-height: var(--height-44); font-size: var(--font-size-13); color: var(--text3); }
.sign-in-foot a { display: inline-flex; align-items: center; min-height: var(--height-44); font-size: var(--font-size-13); font-weight: 400; }
.sign-in-actions, .sign-in-form { display: grid; gap: var(--space-14); }
.sign-in-card .btn { width: 100%; min-height: var(--height-48); font-size: var(--font-size-14); }
.sign-in-back { margin: calc(-1 * var(--space-8)) 0; }
.sign-in-back a { display: inline-flex; align-items: center; min-height: var(--height-44); font-weight: 400; }
.sign-in-note { display: flex; gap: var(--space-8); font-size: var(--font-size-12); color: var(--text3); }
/* The channel (points centred on the card border): lines inside the card stretch around the gate; the outer ones reach the page edges
   (clipped by .sign-in-page). x2="100%" lets every line fit any card width. */
.kanal { position: relative; flex: none; display: flex; align-items: center; height: var(--kanal-height); }
.kanal-line { flex: 1; min-width: 0; height: var(--space-16); overflow: visible; fill: none; stroke-linecap: round; }
.kanal-out-left, .kanal-out-right { position: absolute; top: calc((var(--kanal-height) - var(--space-16)) / 2); width: 100vw; }
.kanal-out-left { right: 100%; }
.kanal-out-right { left: 100%; }
.kanal-gate { flex: none; width: var(--space-16); height: var(--kanal-gate); fill: none; stroke: var(--gate); stroke-width: var(--line-gate); stroke-linecap: round; }
.k-ended { stroke: var(--line2); stroke-width: var(--line-base); }
.kanal-pt { position: absolute; top: calc(var(--kanal-height) / 2 - var(--kanal-pt) / 2); width: var(--kanal-pt); height: var(--kanal-pt); border: var(--border-2) solid var(--line2); border-radius: var(--radius-pill); background: var(--bg); }
.kanal-pt-left { left: calc(-1 * var(--kanal-pt) / 2 - var(--border-1)); }
.kanal-pt-right { right: calc(-1 * var(--kanal-pt) / 2 - var(--border-1)); }
.brand-org { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-size-13); color: var(--text2); }
.icon { flex: none; width: var(--icon-size); height: var(--icon-size); margin-top: var(--space-2); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.sign-in-note .icon { stroke: var(--icon); }
.alert-icon { display: flex; gap: var(--space-10); }
.k-data, .k-gate { stroke-linecap: round; }
.k-data { stroke: var(--flow); stroke-width: var(--line-data); }
.k-gate { stroke: var(--gate); stroke-width: var(--line-gate); }

.page-head { display: grid; gap: var(--space-6); }
.nav-icon { flex: none; width: var(--nav-icon); height: var(--nav-icon); }
.wordmark-tag { align-self: flex-end; padding-bottom: var(--space-2); font-family: var(--font-sans); font-size: var(--font-size-14); font-weight: 400; color: var(--text3); }
.sr-only { position: absolute; width: var(--border-1); height: var(--border-1); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.with-icon { display: flex; align-items: center; gap: var(--space-12); }
.card-icon { flex: none; width: var(--card-icon); height: var(--card-icon); color: var(--text2); }
.state-icon { flex: none; width: var(--state-icon); height: var(--state-icon); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.state-icon-ready { stroke: var(--ok-dot); }
.state-icon-attention { stroke: var(--warn-dot); }
.status-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--kanal-width)); align-items: center; gap: var(--space-24); }
.band-text { display: grid; gap: var(--space-8); }
.band-text p { font-size: var(--font-size-14); color: var(--text2); }
.kanal-lines { width: 100%; height: auto; }
.k-pass { stroke: var(--signal); stroke-width: var(--line-data); stroke-linecap: round; }
.k-flow { stroke: var(--flow); stroke-width: var(--line-data); stroke-linecap: round; stroke-dasharray: 6 18; animation: kanal-flow var(--duration-flow) linear infinite; }
@keyframes kanal-flow { to { stroke-dashoffset: -48; } }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-24); }
.cards > .card { align-content: start; }
.cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding-bottom: var(--space-12); border-bottom: var(--border-1) solid var(--hair); }
.items { list-style: none; margin: 0; padding: 0; display: grid; }
.items li { display: flex; align-items: center; gap: var(--space-14); min-height: var(--height-52); padding: var(--space-10) 0; border-top: var(--border-1) solid var(--hair); }
.grow { flex: 1; min-width: 0; display: grid; gap: var(--space-2); }
.state-word { flex: none; font-size: var(--font-size-13); color: var(--text); }
.sub { font-size: var(--font-size-13); color: var(--text2); }
.go { display: inline-flex; align-items: center; gap: var(--space-6); min-height: var(--height-44); justify-self: start; }
.count { display: flex; align-items: center; gap: var(--space-18); }
.card-soon { display: flex; align-items: center; gap: var(--space-16); border-style: dashed; border-color: var(--edge-dash); background: transparent; box-shadow: none; }
.summary { grid-template-columns: minmax(0, 1fr) minmax(0, var(--kanal-width)); align-items: center; gap: var(--space-24); padding: var(--space-28); }
.summary-text { display: grid; gap: var(--space-12); justify-items: start; }
.summary h2 { font-size: var(--font-size-22); color: var(--title); }
.table-card { padding: 0; overflow-x: auto; }
.table-card th, .table-card td { padding: var(--space-12) var(--space-18); }
.table-card tr > :first-child { padding-left: var(--space-24); }
.table-card tbody tr:first-child > * { border-top: 0; }
tbody th { white-space: nowrap; height: var(--height-52); text-align: left; font-size: var(--font-size-13); font-weight: 600; color: var(--text); border-top: var(--border-1) solid var(--hair); }
tr.soon th { font-weight: 500; color: var(--text2); }
td .gate, td .small-tag { white-space: nowrap; }
td .mono { font-size: var(--font-size-13); }
.small-tag-neutral { color: var(--text2); background: var(--glass2); }
.form-card { max-width: var(--content-narrow); padding: var(--space-28); }
.form-alert { max-width: var(--content-narrow); }
.form { display: grid; gap: var(--space-20); }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: var(--space-6); font-weight: 600; }
.radios { display: flex; flex-wrap: wrap; gap: var(--space-24); }
.field .radio { display: inline-flex; align-items: center; gap: var(--space-10); min-height: var(--height-44); font-weight: 400; cursor: pointer; }
.field .radio input { width: var(--space-18); height: var(--space-18); min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--btn); }
.field input.text { font-family: var(--font-sans); }
.field select { min-height: var(--height-44); padding: 0 var(--space-12); border: var(--border-1) solid var(--field-edge); border-radius: var(--radius-10); font-family: inherit; font-size: var(--font-size-13); color: var(--text); background: var(--field); }
.field select[aria-invalid="true"] { border: var(--border-2) solid var(--err-text); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); padding-top: var(--space-20); border-top: var(--border-1) solid var(--hair); }
.alert p + p { margin-top: var(--space-4); }
@media (max-width: 64em) {
  .cards, .status-band, .summary { grid-template-columns: minmax(0, 1fr); }
}

/* Canvas (DESIGN.md 3, 4): cards on a stage; /ui/ducto.js draws the lines from their real positions.
   Lines sit under the cards, connection points and gates over them; both layers are decoration. */
.canvas { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--canvas-gap); row-gap: var(--space-40); align-items: start; padding-top: calc(var(--height-40) + var(--space-24)); }
.canvas-col { display: grid; gap: var(--space-40); align-content: start; }
.canvas-wide { grid-column: 1 / -1; }
/* Tools: assistants and SMAX sit level with the middle of the tool list (reference Araclar). */
.md-lines-under, .md-lines-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; fill: none; stroke-linecap: round; }
.md-lines-under { z-index: 0; }
.md-lines-over { z-index: 2; }
.md-base { stroke: var(--line); stroke-width: 1.5px; }
.md-flow { stroke: var(--flow); stroke-width: 2px; stroke-dasharray: 10 46; animation: md-flow var(--duration-flow) linear infinite; }
@keyframes md-flow { to { stroke-dashoffset: -56; } }
.md-fl { stroke: var(--flow); stroke-width: 2px; }
.md-pasif { stroke: var(--line2); stroke-width: 2.5px; stroke-dasharray: 0.1 7; }
.md-wl { stroke: var(--warn-line); stroke-width: 1.5px; }
.md-flow.md-warn, .md-fl.md-warn { stroke: var(--warn-flow); }
.md-pass { stroke: var(--signal); stroke-width: 2.5px; }
.md-gate { stroke: var(--gate); stroke-width: 3px; }
.md-gate.md-gate-dashed { stroke-dasharray: 3 4.5; }
.md-pt { fill: var(--bg); stroke: var(--line2); stroke-width: 2px; }
.md-legend { position: absolute; top: 0; right: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-18); min-height: var(--height-40); padding: 0 var(--space-16); border-radius: calc(var(--height-40) / 2); border: var(--border-1) solid var(--edge); background: var(--glass); font-size: var(--font-size-12); font-weight: 500; color: var(--text2); }
.md-legend span { display: inline-flex; align-items: center; gap: var(--space-8); }
.md-key { flex: none; width: var(--space-28); height: var(--space-10); fill: none; stroke-linecap: round; }
.md-key-gate { width: var(--space-10); height: var(--gate-height); }
/* Setup Status (DESIGN.md 3.3): the script meets and leaves the status card at its measured [data-row]
   rows, which are 32 px high so the points stack 32 px apart. */
.setup-card { padding: 0; gap: 0; align-content: start; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); height: 46px; padding: 0 var(--space-16); border-bottom: var(--border-1) solid var(--hair); }
.setup-head h2 { display: flex; align-items: center; gap: var(--space-10); min-width: 0; }
.setup-body { display: grid; gap: var(--space-8); padding: var(--space-10) var(--space-16) var(--space-16); color: var(--text2); }
.setup-body .mono { color: var(--text); }
.setup-attention { border-color: var(--warn-line); }
/* The status card sits level with the middle of the check cards, the address card at the bottom (reference). */
.setup-col-status { align-self: center; }
.setup-col-address { align-self: end; }
.setup-rows { list-style: none; margin: 0; padding: var(--space-12) var(--space-16); border-bottom: var(--border-1) solid var(--hair); }
.setup-rows li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: 32px; }
.setup-rows .state-word { display: inline-flex; align-items: center; gap: var(--space-6); font-size: var(--font-size-12); color: var(--text2); text-transform: lowercase; }
.setup-rows .state-word::before { content: ""; width: var(--dot-size); height: var(--dot-size); border-radius: var(--radius-pill); background: var(--text3); }
.setup-row-done .state-word::before { background: var(--ok-dot); }
.setup-row-attention .state-word::before { background: var(--warn-dot); }
.setup-summary { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-8); padding: var(--space-16); border-bottom: var(--border-1) solid var(--hair); color: var(--text2); }
.setup-summary-title { font-size: var(--font-size-22); font-weight: 700; line-height: 1.3; color: var(--title); }
.setup-summary form { margin-top: var(--space-8); }
.setup-open { display: flex; align-items: center; justify-content: flex-end; min-height: var(--height-52); padding: var(--space-8) 46px var(--space-8) var(--space-16); font-weight: 600; color: var(--text); }
.setup-address-input { width: 100%; min-height: var(--height-44); padding: 0 var(--space-12); border: var(--border-1) solid var(--hair); border-radius: var(--radius-10); font-size: var(--font-size-13); color: var(--text); background: var(--glass2); }
/* Overview (DESIGN.md 7, geometri.json): Connection and Discovery on the left, Configuration and Tools offset
   in the next column so lines pass between them, then Pilot Status and Operators; Usage Figures below.
   The status card's rows sit 32 px apart in line with the incoming points: the first at 24 + 2 x 32 = 88. */
.canvas-overview { grid-template-columns: var(--overview-columns); column-gap: 0; grid-template-areas: "conn . config . status . ops" "disc . tools . status . ops"; }
.ov-conn { grid-area: conn; }
.ov-config { grid-area: config; margin-top: calc(var(--space-40) * 2 - var(--space-8)); }
.ov-disc { grid-area: disc; margin-top: var(--space-40); }
.ov-tools { grid-area: tools; margin-top: calc(var(--space-40) * 3 + var(--space-10)); }
.ov-status { grid-area: status; margin-top: calc(var(--space-40) + var(--space-20)); }
.ov-ops { grid-area: ops; margin-top: calc(var(--space-40) + var(--space-20)); }
.ov-card { display: flex; flex-direction: column; gap: 0; padding: 0 0 var(--space-4); }
.ov-card .card-head, .ov-usage .card-head { min-height: var(--card-head); padding: 0 var(--space-16); }
.ov-usage .card-head { border-bottom: 0; }
.card-title { display: flex; align-items: center; gap: var(--space-8); }
.ov-rows { display: flex; flex-direction: column; padding: var(--space-8) var(--space-16) 0; }
.ov-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: var(--card-row); color: var(--text2); }
.ov-row strong { font-weight: 500; color: var(--text); }
.ov-row .mono { font-size: var(--font-size-13); }
.ov-name { display: inline-flex; align-items: center; gap: var(--space-8); }
.ov-muted strong { color: var(--text2); }
.ov-warn strong { color: var(--warn-text); }
.ov-note { padding-top: var(--space-2); font-size: var(--font-size-12); text-align: right; color: var(--text3); }
.ov-card > .go { align-self: flex-start; margin: auto var(--space-16) 0; padding-top: var(--space-8); }
.ov-states { list-style: none; margin: 0; padding: calc(var(--space-24) + var(--space-2)) var(--space-16) var(--space-14); border-bottom: var(--border-1) solid var(--hair); }
.ov-states li { display: flex; align-items: center; justify-content: space-between; height: var(--row-step); }
.ov-state { display: inline-flex; align-items: center; gap: var(--space-6); font-size: var(--font-size-12); color: var(--text2); }
.ov-state::before { content: ""; width: var(--dot-size); height: var(--dot-size); border-radius: var(--radius-pill); background: var(--ok-dot); }
.ov-state.ov-warn { color: var(--warn-text); }
.ov-state.ov-warn::before { background: var(--warn-dot); }
.ov-summary { display: grid; gap: var(--space-8); align-content: start; padding: var(--space-16); border-bottom: var(--border-1) solid var(--hair); }
.ov-summary p { font-size: var(--font-size-13); color: var(--text2); }
.ov-summary .ov-summary-title { font-size: var(--font-size-22); font-weight: 700; color: var(--title); }
/* Two exit rows at the foot, each one step (32 px) high; their points are counted from the bottom edge. */
.ov-exits { display: grid; padding: var(--space-8) var(--space-40) var(--space-4) var(--space-16); }
.ov-exits span { display: flex; align-items: center; justify-content: flex-end; height: var(--row-step); color: var(--text2); }
.ov-exits .ov-exit-main { font-weight: 600; color: var(--text); }
.ov-operators { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-16) var(--space-16) 0; }
.ov-operators .big-number { line-height: 1; color: var(--text); }
.ov-operators strong { font-size: var(--font-size-14); font-weight: 600; }
.ov-avatars { display: flex; align-items: center; padding-top: var(--space-12); }
.ov-avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--avatar-size); height: var(--avatar-size); margin-right: calc(var(--space-4) * -1); border-radius: var(--radius-pill); border: var(--border-2) solid var(--bg); background: var(--avatar); font-size: var(--font-size-12); font-weight: 700; color: var(--text); }
.ov-usage { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.ov-soon { display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-12); font-weight: 700; color: var(--text2); }
.ov-usage-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-16); padding: var(--space-4) var(--space-16) var(--space-16); }
.ov-usage-body span { min-height: var(--usage-box); border-radius: var(--radius-12); border: var(--border-1) dashed var(--edge); background: var(--glass2); }
/* Narrow screens: one column, no lines (all information is written in the cards). */
@media (max-width: 68.75em) {
  .canvas { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .md-lines-under, .md-lines-over, .md-legend { display: none; }
  .canvas-overview { grid-template-areas: none; }
  .canvas-overview > [class^="ov-"] { grid-area: auto; margin-top: 0; }
  .ov-usage-body { grid-template-columns: minmax(0, 1fr); }
  .ov-usage-body span { display: none; }
}

/* Tools graph (#276): d3-force lays out the nodes in /ui/tools-graph.js; the list is the no-script page. */
.tg { display: grid; gap: var(--space-16); }
.tg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); }
.tg .md-legend { position: static; }
.tg-count { color: var(--text2); }
.tg-count strong { font-family: var(--font-mono); color: var(--title); }
.tg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
.tg-search, .tg-select { min-height: var(--height-40); padding: 0 var(--space-14); border: var(--border-1) solid var(--field-edge); border-radius: var(--radius-pill); font-family: inherit; font-size: var(--font-size-13); color: var(--text); background: var(--field); }
.tg-search { flex: 0 1 calc(var(--space-40) * 8); min-width: 0; }
.tg-search::placeholder { color: var(--text3); }
.tg-stage { display: grid; grid-template-columns: minmax(0, 1fr) var(--graph-panel); gap: var(--space-16); align-items: start; }
.tg-graph { position: relative; height: var(--graph-height); overflow: hidden; border: var(--border-1) solid var(--edge); border-radius: var(--radius-18); background: var(--glass2); }
.tg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tg-svg { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; fill: none; stroke-linecap: round; }
.tg-svg:active { cursor: grabbing; }
.tg-node { cursor: pointer; outline: none; transition: opacity var(--duration-flow); }
.tg-disc { fill: var(--bg); stroke: var(--line2); stroke-width: 1.5px; }
.tg-assistant .tg-disc, .tg-smax .tg-disc { stroke: var(--flow); stroke-width: 2px; }
.tg-soon .tg-disc { stroke: var(--edge-dash); stroke-dasharray: 3 3; }
.tg-icon { color: var(--icon); fill: none; stroke: currentColor; stroke-width: 1.6px; stroke-linejoin: round; }
.tg-label { fill: var(--text); stroke: none; font-size: var(--font-size-12); font-weight: 600; }
.tg-label-bg { fill: var(--bg); stroke: var(--hair); stroke-width: 1px; }
.tg-dot { stroke: var(--bg); stroke-width: 1.5px; }
.tg-dot-live { fill: var(--ok-dot); }
.tg-dot-soon { fill: var(--text3); }
.tg-node:hover .tg-disc, .tg-hit .tg-disc { stroke: var(--title); stroke-width: 2px; }
.tg-node:focus-visible .tg-disc, .tg-selected .tg-disc { stroke: var(--focus); stroke-width: 3px; }
.tg-dim { opacity: 0.18; }
.tg-panel { position: sticky; top: var(--space-16); align-content: start; }
.tg-panel-body { display: grid; gap: var(--space-10); }
.tg-panel h2 { font-size: var(--font-size-14); color: var(--title); }
.tg-facts { display: grid; gap: var(--space-8); margin: 0; }
.tg-facts div { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: var(--space-8); }
.tg-facts dt { color: var(--text3); }
.tg-facts dd { margin: 0; color: var(--text); }
.tg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-16); }
.tg-item { display: grid; gap: var(--space-12); padding: var(--space-20); border: var(--border-1) solid var(--edge); border-radius: var(--radius-18); background: var(--card); }
@media (max-width: 68.75em) {
  .tg-stage { grid-template-columns: minmax(0, 1fr); }
  .tg-panel { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Still segments would read as a dashed line; the lines alone are the complete final state. */
  .k-flow { display: none; }
}

/* Settings (#256): the form on the left feeds the Console and Sign-in Page cards; setup details below them.
   Proportions of the reference stage (600 | 140 | 620 of 1360), so they scale with the window. */
.canvas:has(> .settings-side) { grid-template-columns: minmax(0, 600fr) minmax(0, 620fr); column-gap: 10.3%; }
.settings-target { width: 48.4%; }
.settings-title { display: flex; align-items: center; gap: var(--space-10); }
.settings-icon { flex: none; width: var(--space-18); height: var(--space-18); color: var(--text2); }
.settings-text { font-size: var(--font-size-13); color: var(--text2); }
.settings-foot { border-top: 0; padding-top: var(--space-4); }
.settings-ro { display: grid; grid-template-columns: minmax(0, 25%) minmax(0, 1fr); gap: var(--space-12); align-items: center; font-size: var(--font-size-13); color: var(--text2); }
@media (max-width: 68.75em) {
  .canvas:has(> .settings-side) { grid-template-columns: minmax(0, 1fr); }
  .settings-target { width: auto; }
}

/* Operators (DESIGN.md 5.4): count card on the left, the list in a glass card; each 44 px row is met by a line. */
.op-list-col { grid-column: 2 / -1; gap: var(--space-20); }
.op-list { gap: 0; padding: 0; overflow-x: auto; }
.op-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-16) var(--space-24); border-bottom: var(--border-1) solid var(--hair); }
.op-search { display: flex; align-items: center; gap: var(--space-10); flex: 0 1 calc(var(--space-40) * 9); min-width: 0; padding: 0 var(--space-16); border: var(--border-1) solid var(--edge); border-radius: var(--radius-pill); color: var(--text2); background: var(--field); }
.op-search:focus-within { outline: 3px solid var(--focus); outline-offset: var(--focus-gap); }
.op-search .icon { margin-top: 0; }
.op-search input { flex: 1; min-width: 0; min-height: var(--height-44); border: 0; outline: 0; font-family: inherit; font-size: var(--font-size-14); color: var(--text); background: transparent; }
.op-search input::placeholder { color: var(--text3); }
.op-table th, .op-table td { height: var(--height-44); padding: 0 var(--space-18); border-top: var(--border-1) solid var(--hair); }
.op-table thead th { border-top: 0; white-space: nowrap; background: var(--glass2); }
/* Name and login wrap (a long e-mail login breaks inside), the short cells shrink to their content (#312). */
.op-table .op-tight { width: 1%; white-space: nowrap; }
.op-table .op-wrap { min-width: calc(var(--space-40) * 3); padding-block: var(--space-8); white-space: normal; overflow-wrap: anywhere; }
/* Room for the avatar plus an ordinary first and last name, so names break only between words. */
.op-table th.op-wrap { min-width: calc(var(--space-40) * 4.5); }
.op-table tr > :first-child { padding-left: var(--space-24); }
.op-table tbody th { font-size: var(--font-size-14); font-weight: 600; color: var(--text); }
.op-person { display: inline-flex; align-items: center; gap: var(--space-10); }
.op-soon { color: var(--text3); }
.op-foot { margin: 0; padding: var(--space-14) var(--space-24); border-top: var(--border-1) solid var(--hair); font-size: var(--font-size-13); color: var(--text2); }
.op-empty { place-items: center; min-height: calc(var(--height-44) * 8); text-align: center; border-style: dashed; border-color: var(--edge-dash); background: transparent; box-shadow: none; backdrop-filter: none; }
.op-empty-text { display: grid; gap: var(--space-12); justify-items: center; }
.op-empty h2 { font-size: var(--font-size-22); color: var(--title); }
.op-empty p { color: var(--text2); }
.op-empty .go { padding: 0 var(--space-20); border: var(--border-1) solid var(--edge); border-radius: var(--radius-pill); font-weight: 600; background: var(--glass); }
.op-person a { color: inherit; }
/* Change Log (#285): the Operators list, plus the operator filter and its clear link. */
.cl-filter { margin: 0; }
/* Six columns in two thirds of the canvas: the operator and field cells wrap (at the ", " between names, or
   inside a long e-mail login), the other cells shrink to their content, so nothing hides behind the card edge. */
.cl-table th, .cl-table td { padding: 0 var(--space-12); }
.cl-table .cl-tight { width: 1%; white-space: nowrap; }
.cl-table .cl-wrap { min-width: calc(var(--space-40) * 3); padding-block: var(--space-8); white-space: normal; overflow-wrap: anywhere; }
.cl-filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-12); }
@media (max-width: 68.75em) {
  .op-list-col { grid-column: auto; }
}
