/* Projekt 47 – screen bundle. assets.go inlines the @import lines below. */
@layer reset, tokens, base, layout, components, utilities;

/* src/fonts.css */
/* Self-hosted variable fonts (OFL-1.1, see static/fonts/LICENSE-*).
   Unlayered on purpose: @font-face rules are global and layer order has no
   meaning for them. Latin-ext is split off so most pages only fetch the
   latin subset; German umlauts and ß are part of the latin subset. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/fonts/inter-latin-opsz-normal.2c295d99e2.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-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-opsz-normal.5e6d4fe9d9.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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/static/fonts/jetbrains-mono-latin-wght-normal.18be452724.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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/static/fonts/jetbrains-mono-latin-ext-wght-normal.79bfdab9ba.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;
}
/* src/tokens.css */
/* Design tokens. Colours use light-dark() so a single declaration covers
   both schemes: the theme cookie sets data-theme on <html> (light/dark),
   "system" leaves it unset and follows prefers-color-scheme. Any subtree
   can flip its scheme with color-scheme (e.g. the dark marketing band or
   terminal cards) and every token below follows automatically. */
@layer tokens {
  :root {
    color-scheme: light dark;

    /* Surfaces */
    --bg: light-dark(#ffffff, #0a0a0b);
    --bg-subtle: light-dark(#fafafa, #0e0e10);
    --bg-muted: light-dark(#f4f4f5, #18181b);
    --bg-card: light-dark(#ffffff, #111113);
    --bg-inset: light-dark(#f7f7f8, #0c0c0e);
    --bg-hover: light-dark(#f4f4f5, #1a1a1d);
    --bg-active: light-dark(#ececee, #222226);
    --bg-overlay: light-dark(rgb(10 10 11 / .32), rgb(0 0 0 / .6));

    /* Text */
    --ink: light-dark(#0a0a0b, #fafafa);
    --ink-2: light-dark(#52525b, #a1a1aa);
    --ink-3: light-dark(#71717a, #7c7c86);
    --ink-inverse: light-dark(#fafafa, #0a0a0b);

    /* Lines */
    --line: light-dark(#e4e4e7, #27272a);
    --line-strong: light-dark(#d4d4d8, #3f3f46);
    --line-faint: light-dark(#efeff1, #1c1c1f);

    /* Accent: one restrained blue, used for links, focus and data. */
    --accent: light-dark(#2450e6, #7b96ff);
    --accent-hover: light-dark(#1b3fc0, #9bb0ff);
    --accent-soft: light-dark(#eef2fe, #151b30);
    --accent-line: light-dark(#c9d5fb, #2a3560);
    --accent-ink: light-dark(#ffffff, #0a0a0b);
    --focus-ring: light-dark(rgb(36 80 230 / .32), rgb(123 150 255 / .45));

    /* Status tones: text colour, tinted background, tinted border. */
    --ok: light-dark(#15803d, #4ade80);
    --ok-bg: light-dark(#f0fdf4, #0d2216);
    --ok-line: light-dark(#bbf7d0, #173d26);
    --warn: light-dark(#b45309, #fbbf24);
    --warn-bg: light-dark(#fffbeb, #261c08);
    --warn-line: light-dark(#fde68a, #4a3510);
    --danger: light-dark(#b91c1c, #f87171);
    --danger-bg: light-dark(#fef2f2, #2a1111);
    --danger-line: light-dark(#fecaca, #4c1d1d);
    --info: light-dark(#2450e6, #7b96ff);
    --info-bg: light-dark(#eef2fe, #151b30);
    --info-line: light-dark(#c9d5fb, #2a3560);
    --neutral: light-dark(#475569, #94a3b8);
    --neutral-bg: light-dark(#f1f5f9, #161b23);
    --neutral-line: light-dark(#e2e8f0, #283140);

    /* Primary buttons are ink, inverted in dark mode. */
    --btn-primary: var(--ink);
    --btn-primary-hover: light-dark(#27272a, #e4e4e7);
    --btn-primary-ink: var(--ink-inverse);

    /* Typography */
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --fs-2xs: .6875rem;
    --fs-xs: .75rem;
    --fs-sm: .8125rem;
    --fs-base: .875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: clamp(1.875rem, 1.5rem + 1.2vw, 2.5rem);
    --fs-5xl: clamp(2.125rem, 1.6rem + 2vw, 3.25rem);
    --fs-display: clamp(2.5rem, 1.55rem + 3.9vw, 4.5rem);
    --lh-tight: 1.1;
    --lh-snug: 1.3;
    --lh-base: 1.55;
    --tracking-tight: -.022em;
    --tracking-display: -.035em;
    --tracking-caps: .08em;

    /* Spacing on a 4 px grid */
    --sp-1: .25rem;
    --sp-2: .5rem;
    --sp-3: .75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --sp-32: 8rem;

    /* Shape and depth */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-full: 999px;
    --shadow-xs: 0 1px 2px light-dark(rgb(9 9 11 / .05), rgb(0 0 0 / .5));
    --shadow-sm: 0 1px 2px light-dark(rgb(9 9 11 / .04), rgb(0 0 0 / .5)),
                 0 1px 3px light-dark(rgb(9 9 11 / .06), rgb(0 0 0 / .3));
    --shadow-md: 0 1px 2px light-dark(rgb(9 9 11 / .04), rgb(0 0 0 / .5)),
                 0 6px 16px -4px light-dark(rgb(9 9 11 / .08), rgb(0 0 0 / .5));
    --shadow-lg: 0 2px 4px light-dark(rgb(9 9 11 / .04), rgb(0 0 0 / .4)),
                 0 16px 40px -12px light-dark(rgb(9 9 11 / .18), rgb(0 0 0 / .7));
    --shadow-xl: 0 4px 12px light-dark(rgb(9 9 11 / .05), rgb(0 0 0 / .4)),
                 0 32px 80px -24px light-dark(rgb(9 9 11 / .28), rgb(0 0 0 / .8));
    --ring: 0 0 0 3px var(--focus-ring);

    /* Motion */
    --ease: cubic-bezier(.2, .7, .2, 1);
    --dur-1: 120ms;
    --dur-2: 200ms;
    --dur-3: 320ms;

    /* Layout */
    --container: 1200px;
    --container-narrow: 760px;
    --gutter: clamp(1rem, .5rem + 2.5vw, 2rem);
    --sidebar-w: 240px;
    --topbar-h: 56px;
    --header-h: 64px;

    /* Stacking */
    --z-sticky: 20;
    --z-overlay: 40;
    --z-dialog: 50;
    --z-toast: 60;
  }

  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }

  /* Subtrees that are always dark (terminal cards, the security band). */
  .scheme-dark { color-scheme: dark; }
  .scheme-light { color-scheme: light; }

  @media (prefers-reduced-motion: reduce) {
    :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }
  }
}
/* src/reset.css */
/* Minimal modern reset: predictable box model, no default margins,
   media that never overflows, form controls inherit typography. */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 4; }
  body { min-height: 100dvh; line-height: var(--lh-base); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
  img, picture, video, canvas, svg { display: block; max-width: 100%; }
  svg { flex-shrink: 0; }
  input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  p, h1, h2, h3, h4, h5, h6, li, dd, td, th { overflow-wrap: break-word; }
  h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; text-wrap: balance; }
  p { text-wrap: pretty; }
  ul, ol { padding: 0; list-style: none; }
  a { color: inherit; text-decoration: none; }
  table { border-collapse: collapse; border-spacing: 0; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  legend { padding: 0; }
  summary { cursor: pointer; }
  dialog { padding: 0; border: 0; color: inherit; background: none; max-width: none; max-height: none; }
  [hidden]:not([hidden="until-found"]) { display: none !important; }
  :target { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
}
/* src/base.css */
/* Element defaults: typography, links, focus, code. The root stays at the
   browser default (16 px) so rem tokens are stable; the app shell sets a
   denser 14 px body, marketing pages keep 16 px. */
@layer base {
  html {
    font-family: var(--font-sans);
    font-feature-settings: "cv11", "ss01";
    font-optical-sizing: auto;
    background: var(--bg);
    color: var(--ink);
    scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  }
  @media (prefers-reduced-motion: no-preference) {
    html:focus-within { scroll-behavior: smooth; }
  }
  body { background: var(--bg); color: var(--ink); font-size: var(--fs-md); }
  body.app { font-size: var(--fs-base); background: var(--bg-subtle); }

  ::selection { background: light-dark(rgb(36 80 230 / .16), rgb(123 150 255 / .3)); }
  ::placeholder { color: var(--ink-3); opacity: 1; }

  h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 600; line-height: var(--lh-snug); letter-spacing: var(--tracking-tight); }
  strong, b { font-weight: 600; }
  small { font-size: var(--fs-sm); }
  hr { border: 0; border-top: 1px solid var(--line); }

  a { transition: color var(--dur-1) var(--ease); }
  :is(p, li, dd, td) > a:not([class]), a.link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: .22em;
  }
  :is(p, li, dd, td) > a:not([class]):hover, a.link:hover { text-decoration-color: currentColor; }

  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  :focus:not(:focus-visible) { outline: none; }

  code, kbd, samp, pre { font-family: var(--font-mono); font-feature-settings: "calt" 0; font-variant-ligatures: none; }
  code, samp { font-size: .9em; }
  :not(pre) > code {
    padding: .1em .38em;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    background: var(--bg-muted);
    white-space: nowrap;
  }
  kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.5em; height: 1.5em; padding: 0 .35em;
    border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-xs);
    background: var(--bg-card); color: var(--ink-3);
    font-size: var(--fs-2xs); font-weight: 500; line-height: 1;
  }
  pre { overflow-x: auto; font-size: var(--fs-sm); line-height: 1.7; }
  abbr[title] { text-decoration: underline dotted; text-underline-offset: .2em; cursor: help; }
  time { font-variant-numeric: tabular-nums; }

  /* Icons from the sprite: <svg class="i"><use href="…#i-name"/></svg> */
  .i { width: 1rem; height: 1rem; flex: none; vertical-align: -.2em; }
  .i-xs { width: .75rem; height: .75rem; }
  .i-sm { width: .875rem; height: .875rem; }
  .i-lg { width: 1.25rem; height: 1.25rem; }
  .i-xl { width: 1.5rem; height: 1.5rem; }
  .i-2xl { width: 2rem; height: 2rem; }
  .i-thin { stroke-width: 1.25; }
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

  .skip-link {
    position: fixed; left: var(--sp-4); top: var(--sp-4); z-index: var(--z-toast);
    padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
    background: var(--ink); color: var(--ink-inverse); font-weight: 500;
    transform: translateY(-200%); transition: transform var(--dur-2) var(--ease);
  }
  .skip-link:focus { transform: none; }

  /* Logo: ring mark (ui/logo) + HTML wordmark */
  .logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 600; font-size: .9375rem; letter-spacing: -.012em; white-space: nowrap; }
  /* Wortmarke: "47" in JetBrains Mono SemiBold, 96 % (docs/p47-brand). */
  .logo-num { font-family: var(--font-mono); font-size: .96em; font-weight: 600; letter-spacing: -.02em; }
  .logo-mark { width: 1.375rem; height: 1.375rem; }
  .logo-mark .logo-ink { stroke: currentColor; }
  .logo-mark .logo-accent { stroke: var(--accent); }
  .logo-lg { font-size: 1.125rem; }
  .logo-lg .logo-mark { width: 1.625rem; height: 1.625rem; }

  .sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}
/* src/layout.css */
/* Layout primitives shared by app and marketing pages. */
@layer layout {
  .container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
  .container-narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

  .stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--sp-4)); }
  .stack-xs { --stack-gap: var(--sp-1); }
  .stack-sm { --stack-gap: var(--sp-2); }
  .stack-md { --stack-gap: var(--sp-3); }
  .stack-lg { --stack-gap: var(--sp-6); }
  .stack-xl { --stack-gap: var(--sp-8); }

  .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--sp-2)); }
  .cluster-lg { --cluster-gap: var(--sp-4); }
  .cluster-between { justify-content: space-between; }
  .cluster-end { justify-content: flex-end; }
  .cluster-nowrap { flex-wrap: nowrap; }

  .row { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
  .row > .grow, .grow { flex: 1 1 auto; min-width: 0; }

  .grid { display: grid; gap: var(--grid-gap, var(--sp-4)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 240px), 1fr)); }
  .grid-gap-lg { --grid-gap: var(--sp-6); }

  /* 8/4 split used by the dashboard and detail pages. */
  .split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
  .split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .split-stretch { align-items: stretch; }

  @media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4, .split-even { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 560px) {
    .grid-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  .center { display: grid; place-items: center; }
  .full-height { min-height: 100dvh; }
  .divider { height: 1px; background: var(--line); border: 0; }
  .divider-v { width: 1px; align-self: stretch; background: var(--line); }
}
/* src/components.css */
/* Core components: buttons, cards, pills, alerts, avatars, breadcrumbs,
   tabs, pagination, empty states, skeletons. */
@layer components {
  /* Buttons. Primary is ink (inverted in dark mode); accent is reserved
     for rare marketing emphasis. */
  .btn {
    --btn-h: 2.125rem;
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    height: var(--btn-h); padding: 0 .875rem;
    border: 1px solid transparent; border-radius: var(--r-sm);
    font-size: var(--fs-sm); font-weight: 500; line-height: 1; white-space: nowrap;
    cursor: pointer; user-select: none;
    transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  }
  .btn:focus-visible { outline: none; box-shadow: var(--ring); }
  .btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
  .btn .i { width: .9375rem; height: .9375rem; }
  .btn-primary { background: var(--btn-primary); color: var(--btn-primary-ink); box-shadow: var(--shadow-xs); }
  .btn-primary:hover { background: var(--btn-primary-hover); }
  .btn-secondary { background: var(--bg-card); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
  .btn-secondary:hover { background: var(--bg-hover); }
  .btn-ghost { color: var(--ink-2); }
  .btn-ghost:hover { background: var(--bg-hover); color: var(--ink); }
  .btn-danger { background: var(--bg-card); color: var(--danger); border-color: var(--danger-line); }
  .btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
  .btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-xs); }
  .btn-accent:hover { background: var(--accent-hover); }
  .btn-sm { --btn-h: 1.75rem; padding: 0 .625rem; font-size: var(--fs-xs); gap: var(--sp-1); }
  .btn-lg { --btn-h: 2.5rem; padding: 0 1.125rem; font-size: var(--fs-base); }
  .btn-xl { --btn-h: 2.875rem; padding: 0 1.375rem; font-size: var(--fs-md); border-radius: var(--r-md); }
  .btn-icon { width: var(--btn-h); padding: 0; }
  .btn-block { display: flex; width: 100%; }
  .btn .kbd-hint { margin-left: var(--sp-1); opacity: .6; font-size: var(--fs-2xs); }
  .btn.htmx-request { opacity: .7; cursor: progress; }

  .link-arrow { display: inline-flex; align-items: center; gap: .3em; color: var(--accent); font-weight: 500; }
  .link-arrow .i { transition: transform var(--dur-2) var(--ease); }
  .link-arrow:hover .i { transform: translateX(2px); }

  /* Cards */
  .card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); min-width: 0; }
  .card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 3.25rem; padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line); }
  .card-title { font-size: var(--fs-base); font-weight: 600; letter-spacing: -.01em; }
  .card-subtitle { color: var(--ink-3); font-size: var(--fs-xs); }
  .card-body { padding: var(--sp-5); }
  .card-body-flush { padding: 0; }
  .card-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); }
  .card-link { transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
  .card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

  /* Pills: a tone dot plus label. The tone sets --tone/--tone-bg. */
  .tone-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); --tone-line: var(--ok-line); }
  .tone-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); --tone-line: var(--warn-line); }
  .tone-danger { --tone: var(--danger); --tone-bg: var(--danger-bg); --tone-line: var(--danger-line); }
  .tone-info { --tone: var(--info); --tone-bg: var(--info-bg); --tone-line: var(--info-line); }
  .tone-neutral { --tone: var(--neutral); --tone-bg: var(--neutral-bg); --tone-line: var(--neutral-line); }
  .pill {
    display: inline-flex; align-items: center; gap: .4em;
    height: 1.375rem; padding: 0 .5rem;
    border: 1px solid var(--tone-line, var(--line)); border-radius: var(--r-full);
    background: var(--tone-bg, var(--bg-muted)); color: var(--tone, var(--ink-2));
    font-size: var(--fs-xs); font-weight: 500; line-height: 1; white-space: nowrap;
  }
  .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.pill-plain::before { display: none; }
  .pill .i { width: .75rem; height: .75rem; }
  .pill-lg { height: 1.625rem; padding: 0 .625rem; font-size: var(--fs-sm); }
  .badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.25rem; height: 1.25rem; padding: 0 .375rem; border-radius: var(--r-full);
    background: var(--bg-muted); color: var(--ink-2);
    font-size: var(--fs-2xs); font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .badge.tone-danger, .badge.tone-warn, .badge.tone-ok, .badge.tone-info { background: var(--tone-bg); color: var(--tone); }
  .tag {
    display: inline-flex; align-items: center; gap: .3em; height: 1.375rem; padding: 0 .4375rem;
    border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--bg-card);
    color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap;
  }
  .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--ink-3)); flex: none; }
  .dot-pulse { box-shadow: 0 0 0 3px var(--tone-bg, var(--bg-muted)); }

  /* Alerts */
  .alert {
    display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-3); align-items: start;
    padding: var(--sp-3) var(--sp-4); border: 1px solid var(--tone-line, var(--line)); border-radius: var(--r-md);
    background: var(--tone-bg, var(--bg-muted)); color: var(--ink); font-size: var(--fs-sm);
  }
  .alert > .i { color: var(--tone, var(--ink-2)); margin-top: .1rem; }
  .alert-title { font-weight: 600; }
  .alert-body { color: var(--ink-2); }
  .alert-actions { display: flex; gap: var(--sp-2); align-items: center; }

  /* Empty state */
  .empty { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-12) var(--sp-6); text-align: center; }
  .empty-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); color: var(--ink-3); box-shadow: var(--shadow-xs); }
  .empty-art { width: 10rem; height: 7.5rem; color: var(--ink-3); }
  .empty-art .p47-accent { stroke: var(--accent); }
  .empty-title { font-size: var(--fs-md); font-weight: 600; }
  .empty-text { max-width: 26rem; color: var(--ink-2); font-size: var(--fs-sm); }

  /* Avatar */
  .avatar {
    display: inline-grid; place-items: center; flex: none;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--bg-muted); color: var(--ink-2); border: 1px solid var(--line);
    font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .02em;
  }
  .avatar-sm { width: 1.375rem; height: 1.375rem; font-size: .5625rem; }
  .avatar-lg { width: 2.5rem; height: 2.5rem; font-size: var(--fs-sm); }
  .avatar-square { border-radius: var(--r-sm); }

  /* Breadcrumbs */
  .breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--ink-3); }
  .breadcrumbs li { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; }
  .breadcrumbs li + li::before { content: "/"; color: var(--line-strong); padding-right: var(--sp-1); }
  .breadcrumbs a:hover { color: var(--ink); }
  .breadcrumbs [aria-current] { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Tabs (links or role=tab buttons) */
  .tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .tab {
    position: relative; display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3) .625rem; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
  }
  .tab:hover { color: var(--ink); }
  .tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); }
  .tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { content: ""; position: absolute; inset: auto var(--sp-2) -1px; height: 2px; border-radius: 2px; background: var(--ink); }
  .tab .badge { height: 1.125rem; min-width: 1.125rem; }

  /* Segmented control (filters, theme switcher) */
  .segmented { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-muted); }
  .segmented > * { display: inline-flex; align-items: center; gap: var(--sp-1); height: 1.625rem; padding: 0 .625rem; border-radius: 5px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; }
  .segmented > :hover { color: var(--ink); }
  .segmented > [aria-pressed="true"], .segmented > [aria-current="page"], .segmented > [aria-current="true"] { background: var(--bg-card); color: var(--ink); box-shadow: var(--shadow-xs); }

  /* Pagination */
  .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-3); }
  .pagination ol { display: flex; gap: 2px; }
  .pagination a, .pagination span.page { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 var(--sp-2); border-radius: var(--r-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
  .pagination a:hover { background: var(--bg-hover); color: var(--ink); }
  .pagination [aria-current="page"] { background: var(--ink); color: var(--ink-inverse); font-weight: 500; }
  .pagination .gap { color: var(--ink-3); }

  /* Skeleton */
  .skeleton { display: block; height: .75rem; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-active) 37%, var(--bg-muted) 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; }
  .skeleton-lg { height: 1.25rem; }
  .skeleton-w-50 { width: 50%; }
  .skeleton-w-75 { width: 75%; }
  @keyframes skeleton { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
  @media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
}

@layer components {
  @media (max-width: 640px) {
    .alert { grid-template-columns: auto 1fr; }
    .alert > .alert-actions { grid-column: 2; }
  }
}

@layer components {
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented > * { white-space: nowrap; flex: none; }
}
/* src/forms.css */
/* Forms: fields, inputs, selects, checkboxes, switches, input groups.
   Validation errors come from the server (web.Form) and are rendered as
   .field-error plus aria-invalid on the control. */
@layer components {
  .field { display: grid; gap: .375rem; min-width: 0; }
  .field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: var(--sp-4); }
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .field-row > .field + .field { margin-top: 0; }
  @media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } .field-row > .field + .field { margin-top: var(--sp-4); } }
  .label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; }
  .label .optional { color: var(--ink-3); font-weight: 400; font-size: var(--fs-xs); }
  .hint { color: var(--ink-3); font-size: var(--fs-xs); }
  .field-error { display: flex; align-items: center; gap: var(--sp-1); color: var(--danger); font-size: var(--fs-xs); font-weight: 500; }
  .field-error .i { width: .8125rem; height: .8125rem; }

  .input, .select, .textarea {
    display: block; width: 100%; min-width: 0; height: 2.25rem; padding: 0 .75rem;
    background: var(--bg-card); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-xs);
    font-size: var(--fs-sm); line-height: 1.4;
    transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  }
  .input:hover, .select:hover, .textarea:hover { border-color: light-dark(#a1a1aa, #52525b); }
  .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
  .input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
  .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px light-dark(rgb(185 28 28 / .18), rgb(248 113 113 / .3)); }
  .input:disabled, .select:disabled, .textarea:disabled { background: var(--bg-muted); color: var(--ink-3); cursor: not-allowed; }
  .input[readonly] { background: var(--bg-inset); }
  .input-lg { height: 2.75rem; padding: 0 .875rem; font-size: var(--fs-md); border-radius: var(--r-md); }
  .input-sm { height: 1.875rem; font-size: var(--fs-xs); }
  .input-mono { font-family: var(--font-mono); font-size: var(--fs-xs); }
  .textarea { height: auto; min-height: 6rem; padding: .5rem .75rem; resize: vertical; }
  .select {
    appearance: none; padding-right: 2rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .5rem center; background-size: 1rem;
  }

  /* Input with leading icon / trailing addon */
  .input-wrap { position: relative; display: flex; align-items: center; }
  .input-wrap > .i { position: absolute; left: .7rem; color: var(--ink-3); pointer-events: none; }
  .input-wrap > .input { padding-left: 2.125rem; }
  .input-wrap > kbd { position: absolute; right: .5rem; }

  /* Copyable value: input + button glued together */
  .input-group { display: flex; min-width: 0; }
  .input-group > .input { border-top-right-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
  .input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; height: auto; box-shadow: none; }
  .input-addon { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--line-strong); background: var(--bg-muted); color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; }
  .input-group > .input-addon:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 0; }
  .input-group > .input-addon:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 0; }
  .input-group > .input-addon:first-child + .input { border-top-left-radius: 0; border-bottom-left-radius: 0; }

  /* Checkbox and radio */
  .check, .radio {
    appearance: none; flex: none; width: 1rem; height: 1rem; margin-top: .125rem;
    border: 1px solid var(--line-strong); background: var(--bg-card); box-shadow: var(--shadow-xs);
    display: inline-grid; place-items: center; cursor: pointer;
    transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  }
  .check { border-radius: var(--r-xs); }
  .radio { border-radius: 50%; }
  .check:checked, .radio:checked { background: var(--ink); border-color: var(--ink); }
  .check::after { content: ""; width: .625rem; height: .625rem; background: var(--ink-inverse); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); transform: scale(0); transition: transform var(--dur-1) var(--ease); }
  .check:checked::after { transform: scale(1); }
  .radio::after { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: var(--ink-inverse); transform: scale(0); transition: transform var(--dur-1) var(--ease); }
  .radio:checked::after { transform: scale(1); }
  .check:focus-visible, .radio:focus-visible { outline: none; box-shadow: var(--ring); }
  .check[aria-invalid="true"] { border-color: var(--danger); }
  .choice { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
  .choice strong { color: var(--ink); font-weight: 500; }
  .choice-card { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
  .choice-card:hover { border-color: var(--line-strong); }
  .choice-card:has(:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

  /* Switch: <input type=checkbox class="switch" role="switch"> */
  .switch {
    appearance: none; flex: none; position: relative; width: 2rem; height: 1.125rem; border-radius: var(--r-full);
    background: var(--line-strong); cursor: pointer; transition: background-color var(--dur-2) var(--ease);
  }
  .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: .875rem; height: .875rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease); }
  .switch:checked { background: var(--ok); }
  .switch:checked::after { transform: translateX(.875rem); }
  .switch:focus-visible { outline: none; box-shadow: var(--ring); }

  /* Form layout helpers */
  .form-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--sp-8); padding: var(--sp-6) 0; border-top: 1px solid var(--line); }
  .form-section:first-child { border-top: 0; padding-top: 0; }
  .form-section-title { font-size: var(--fs-base); font-weight: 600; }
  .form-section-text { margin-top: var(--sp-1); color: var(--ink-3); font-size: var(--fs-sm); }
  @media (max-width: 860px) { .form-section { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); } }
  .form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-2); padding-top: var(--sp-5); }
  .form-actions-start { justify-content: flex-start; }

  /* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
  .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
}

@layer components {
  /* Native file input, aligned with the other controls. */
  input[type="file"].input { height: auto; padding: .375rem; color: var(--ink-2); }
  input[type="file"].input::file-selector-button { height: 1.75rem; margin-right: var(--sp-3); padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: var(--r-xs); background: var(--bg-card); color: var(--ink); font: inherit; font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
  input[type="file"].input::file-selector-button:hover { background: var(--bg-hover); }
  .form-section > :last-child { min-width: 0; }
  .form-section .kv { margin-top: var(--sp-4); }
}
/* src/data.css */
/* Data display: tables, key/value lists, stat tiles, rings, bars,
   timelines, code/terminal blocks, DNS records, steppers. Widths of data
   bars are SVG attributes (<rect width="37%">), never style attributes. */
@layer components {
  /* Tables */
  .table-wrap { overflow-x: auto; }
  .table { width: 100%; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
  .table th { height: 2.25rem; padding: 0 var(--sp-4); border-bottom: 1px solid var(--line); background: var(--bg-subtle); color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; text-align: left; white-space: nowrap; }
  .table td { height: 3rem; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line-faint); color: var(--ink-2); vertical-align: middle; }
  .table tbody tr:last-child td { border-bottom: 0; }
  .table tbody tr { transition: background-color var(--dur-1) var(--ease); }
  .table tbody tr:hover { background: var(--bg-subtle); }
  .table .num, .table th.num { text-align: right; }
  .table .shrink { width: 1%; white-space: nowrap; }
  .table .primary { color: var(--ink); font-weight: 500; }
  .table a.row-link { color: var(--ink); font-weight: 500; }
  .table a.row-link:hover { color: var(--accent); }
  .table .sub { display: block; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
  .table-compact td { height: 2.5rem; }
  .table th a { display: inline-flex; align-items: center; gap: var(--sp-1); }
  .table th a:hover { color: var(--ink); }
  .table th[aria-sort] { color: var(--ink); }
  .card > .table-wrap .table th:first-child, .card > .table-wrap .table td:first-child { padding-left: var(--sp-5); }
  .card > .table-wrap .table th:last-child, .card > .table-wrap .table td:last-child { padding-right: var(--sp-5); }

  /* Mono values: hostnames, serials, fingerprints, DNS names */
  .mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
  .host { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink); }
  .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .eyebrow { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--ink-3); }

  /* Key/value list */
  .kv { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: var(--sp-3) var(--sp-6); font-size: var(--fs-sm); }
  .kv dt { color: var(--ink-3); }
  .kv dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
  .kv-rows { gap: 0 var(--sp-6); }
  .kv-rows > :nth-child(1), .kv-rows > :nth-child(2) { padding-top: 0; }
  .kv-rows dt, .kv-rows dd { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-faint); }
  .kv-rows dt:last-of-type, .kv-rows dd:last-of-type { border-bottom: 0; }
  @media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); } .kv dd + dt { margin-top: var(--sp-2); } .kv-rows dt { border-bottom: 0; padding-bottom: 0; } }

  /* Stat tile */
  .stat { display: grid; gap: var(--sp-2); align-content: start; padding: var(--sp-4) var(--sp-5); transition: background-color var(--dur-1) var(--ease); }
  a.stat:hover { background: var(--bg-subtle); }
  a.stat:hover .stat-label { color: var(--ink); }
  .stat-grid > .stat:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
  .stat-grid > .stat:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
  .stat-label { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
  .stat-label .i { color: var(--ink-3); }
  .stat-value { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .stat-value small { margin-left: var(--sp-1); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; }
  .stat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); color: var(--ink-3); font-size: var(--fs-xs); }
  .trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; color: var(--tone, var(--ink-2)); }
  .trend .i { width: .8125rem; height: .8125rem; }
  .stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid > .stat + .stat { border-left: 1px solid var(--line); }
  @media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid > .stat:nth-child(3) { border-left: 0; }
    .stat-grid > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  }

  /* Ring: SVG with circumference 100 (r = 15.9155). */
  .ring { position: relative; display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none; color: var(--tone, var(--ink-3)); }
  .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .ring .ring-track { stroke: var(--line); }
  .ring .ring-value { stroke: currentColor; stroke-linecap: round; transition: stroke-dasharray var(--dur-3) var(--ease); }
  .ring-label { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: var(--fs-2xs); font-weight: 600; font-variant-numeric: tabular-nums; }
  .ring-sm { width: 1.25rem; height: 1.25rem; }
  .ring-lg { width: 3.5rem; height: 3.5rem; }
  .ring-lg .ring-label { font-size: var(--fs-sm); }
  .ring-xl { width: 9rem; height: 9rem; }
  .ring-xl .ring-label { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.04em; }
  .ring-caption { display: grid; justify-items: center; line-height: 1.15; }
  .ring-caption small { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; }
  .expiry { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
  .expiry-text { display: grid; line-height: 1.25; }
  .expiry-text small { color: var(--ink-3); font-size: var(--fs-xs); }

  /* Horizontal bar (SVG) */
  .bar { display: block; width: 100%; height: .375rem; border-radius: var(--r-full); overflow: hidden; }
  .bar .bar-track { fill: var(--bg-muted); }
  .bar .bar-fill { fill: var(--tone, var(--ink)); }
  .bar-lg { height: .5rem; }
  .bar-stack .seg-ok { fill: var(--ok); }
  .bar-stack .seg-warn { fill: var(--warn); }
  .bar-stack .seg-danger { fill: var(--danger); }
  .bar-stack .seg-neutral { fill: var(--line-strong); }
  .legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); color: var(--ink-2); font-size: var(--fs-xs); }
  .legend > span { display: inline-flex; align-items: center; gap: var(--sp-2); }
  .legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }

  /* Timeline / event feed */
  .timeline { display: grid; }
  .timeline-item { position: relative; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--sp-3); padding-bottom: var(--sp-4); }
  .timeline-item::before { content: ""; position: absolute; left: .75rem; top: 1.5rem; bottom: 0; width: 1px; background: var(--line); }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-item:last-child::before { display: none; }
  .timeline-icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--tone-bg, var(--bg-muted)); color: var(--tone, var(--ink-3)); border: 1px solid var(--tone-line, var(--line)); }
  .timeline-icon .i { width: .75rem; height: .75rem; }
  .timeline-title { color: var(--ink); font-size: var(--fs-sm); line-height: 1.5rem; }
  .timeline-title strong { font-weight: 500; }
  .timeline-meta { color: var(--ink-3); font-size: var(--fs-xs); }

  /* Code / terminal block */
  .code { position: relative; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-inset); overflow: hidden; }
  .code-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); height: 2.25rem; padding: 0 var(--sp-2) 0 var(--sp-3); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); }
  .code pre { padding: var(--sp-3) var(--sp-4); color: var(--ink); }
  .code .prompt { color: var(--ink-3); user-select: none; }
  .code .c-comment { color: var(--ink-3); }
  .code .c-ok { color: var(--ok); }
  .code .c-accent { color: var(--accent); }
  .code .c-warn { color: var(--warn); }
  .terminal { color-scheme: dark; background: #0b0b0e; border-color: #222226; color: #e4e4e7; box-shadow: var(--shadow-lg); }
  .terminal .code-header { border-color: #1f1f23; }
  .terminal-dots { display: inline-flex; gap: 6px; }
  .terminal-dots span { width: 10px; height: 10px; border-radius: 50%; background: #2a2a2f; }

  /* DNS record block */
  .dns { display: grid; grid-template-columns: max-content minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-inset); font-size: var(--fs-sm); overflow: hidden; }
  .dns > dt { padding: var(--sp-2) var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); border-bottom: 1px solid var(--line-faint); display: flex; align-items: center; }
  .dns > dd { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3); border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink); min-width: 0; }
  .dns > dd > span { min-width: 0; overflow-wrap: anywhere; }
  .dns > :nth-last-child(-n+2) { border-bottom: 0; }

  /* Copy button state */
  .copy-btn[data-copied] { color: var(--ok); }
  .copy-btn .when-copied { display: none; }
  .copy-btn[data-copied] .when-copied { display: inline; }
  .copy-btn[data-copied] .when-idle { display: none; }

  /* Stepper (onboarding) */
  .stepper { display: flex; gap: var(--sp-2); counter-reset: step; }
  .stepper li { flex: 1 1 0; display: grid; gap: var(--sp-2); min-width: 0; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
  .stepper li::before { content: ""; height: 3px; border-radius: 2px; background: var(--line); }
  .stepper li.done::before, .stepper li[aria-current="step"]::before { background: var(--ink); }
  .stepper li[aria-current="step"] { color: var(--ink); }
  .stepper li.done { color: var(--ink-2); }
  .stepper .step-n { font-family: var(--font-mono); color: var(--ink-3); margin-right: var(--sp-1); }
  @media (max-width: 640px) { .stepper .step-name { display: none; } .stepper li[aria-current="step"] .step-name { display: inline; } }
}

@layer components {
  .table .host, .table td.mono, .table .nowrap { white-space: nowrap; }
  /* Prüfsummen u. Ä.: nur optisch gekürzt, Tooltip und Kopieren liefern den vollen Wert. */
  .hash-short { display: inline-block; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
  .breadcrumbs a { color: var(--ink-3); text-decoration: none; }
}

@layer components {
  /* Code blocks keep long commands on one line but scroll inside the
     block instead of overflowing the card. */
  .code pre { overflow-x: auto; scrollbar-width: thin; }
  .code > pre > code { display: block; width: max-content; min-width: 100%; }
  .terminal { box-shadow: var(--shadow-sm); }
  .hero-terminal .terminal, .terminal.terminal-float { box-shadow: var(--shadow-xl); }
}
/* src/overlays.css */
/* Floating UI: dropdowns (<details>), dialogs (<dialog>, with a :target
   fallback when JS is off), toasts and CSS-only tooltips. */
@layer components {
  /* Dropdown built on <details class="dropdown"><summary>…</summary><div class="menu">… */
  .dropdown { position: relative; }
  .dropdown > summary { list-style: none; }
  .dropdown > summary::-webkit-details-marker { display: none; }
  .menu {
    position: absolute; z-index: var(--z-overlay); top: calc(100% + 6px); left: 0;
    min-width: 13rem; max-height: 70vh; overflow-y: auto; padding: var(--sp-1);
    background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    animation: menu-in var(--dur-2) var(--ease);
  }
  .menu-end { left: auto; right: 0; }
  .menu-up { top: auto; bottom: calc(100% + 6px); }
  .menu-wide { min-width: 17rem; }
  .menu-item, .menu form > button {
    display: flex; align-items: center; gap: var(--sp-2); width: 100%;
    padding: .4375rem var(--sp-2); border-radius: var(--r-sm);
    color: var(--ink); font-size: var(--fs-sm); text-align: left;
  }
  .menu-item:hover, .menu form > button:hover, .menu-item:focus-visible { background: var(--bg-hover); outline: none; }
  .menu-item .i { color: var(--ink-3); }
  .menu-item[aria-current="true"] { font-weight: 500; }
  .menu-item .check { margin-left: auto; color: var(--ink); }
  .menu-item-danger { color: var(--danger); }
  .menu-item-danger .i { color: currentColor; }
  .menu-label { padding: var(--sp-2) var(--sp-2) var(--sp-1); color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 500; text-transform: uppercase; letter-spacing: var(--tracking-caps); }
  .menu-sep { height: 1px; margin: var(--sp-1) calc(-1 * var(--sp-1)); background: var(--line); }
  .menu-meta { padding: var(--sp-2); color: var(--ink-3); font-size: var(--fs-xs); }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

  /* Dialog */
  .dialog {
    width: min(32rem, calc(100vw - 2rem)); margin: auto;
    background: var(--bg-card); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xl);
  }
  .dialog[open] { animation: dialog-in var(--dur-3) var(--ease); }
  .dialog::backdrop { background: var(--bg-overlay); }
  .dialog-wide { width: min(44rem, calc(100vw - 2rem)); }
  .dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5) var(--sp-5) 0; }
  .dialog-title { font-size: var(--fs-lg); font-weight: 600; }
  .dialog-body { padding: var(--sp-3) var(--sp-5) var(--sp-5); color: var(--ink-2); font-size: var(--fs-sm); }
  .dialog-footer { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); background: var(--bg-subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  /* No-JS fallback: the opener is a link to #id, the dialog shows via :target. */
  .dialog:target:not([open]) {
    display: block; position: fixed; inset: 0; z-index: var(--z-dialog); height: fit-content;
    box-shadow: var(--shadow-xl), 0 0 0 100vmax var(--bg-overlay);
  }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

  /* Toasts */
  .toasts {
    position: fixed; z-index: var(--z-toast); right: var(--sp-4); bottom: var(--sp-4);
    display: flex; flex-direction: column; gap: var(--sp-2); width: min(24rem, calc(100vw - 2rem)); pointer-events: none;
  }
  .toast {
    display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-3); align-items: start;
    padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
    background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm); pointer-events: auto;
    animation: toast-in var(--dur-3) var(--ease);
  }
  .toast > .i, .toast > [data-toast-icon] { color: var(--tone, var(--ink-2)); margin-top: .125rem; display: inline-flex; }
  .toast-close { color: var(--ink-3); border-radius: var(--r-xs); padding: 2px; }
  .toast-close:hover { color: var(--ink); background: var(--bg-hover); }
  .toast.is-leaving { opacity: 0; transform: translateY(4px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
  @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

  /* Flash banner rendered server-side at the top of the content area. */
  .flash { margin-bottom: var(--sp-4); }

  /* Tooltip: <span data-tip="Text">…</span>. Purely visual; the trigger
     must carry its own accessible name. */
  [data-tip] { position: relative; }
  [data-tip]::after {
    content: attr(data-tip); position: absolute; z-index: var(--z-overlay); left: 50%; bottom: calc(100% + 6px);
    padding: .3125rem .5rem; border-radius: var(--r-sm);
    background: var(--ink); color: var(--ink-inverse);
    font-size: var(--fs-xs); font-weight: 500; line-height: 1.3; white-space: nowrap;
    opacity: 0; transform: translate(-50%, 2px); pointer-events: none;
    transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 300ms; }
  [data-tip-pos="bottom"]::after { bottom: auto; top: calc(100% + 6px); }

  /* htmx request indicator */
  .htmx-indicator { opacity: 0; transition: opacity var(--dur-2) var(--ease); }
  .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
  .spinner { width: 1rem; height: 1rem; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
/* src/screens.css */
/* Screen-specific pieces of the app: dashboard action list, readiness
   gauge, certificate detail header, onboarding wizard, agent cards,
   12-column grid, meters/progress and the style guide catalogue. */
@layer components {
  /* 12-column grid for dashboards and forms */
  .cols-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4); }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-6 { grid-column: span 6; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
  @media (max-width: 1100px) { .span-3 { grid-column: span 6; } .span-4, .span-6, .span-8 { grid-column: 1 / -1; } }
  @media (max-width: 640px) { .span-3 { grid-column: 1 / -1; } }

  /* "Handlungsbedarf" action list */
  .actions-list { display: grid; }
  .action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line-faint); }
  .action:last-child { border-bottom: 0; }
  .action-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-md); background: var(--tone-bg); color: var(--tone); border: 1px solid var(--tone-line); }
  .action-title { color: var(--ink); font-size: var(--fs-sm); font-weight: 500; }
  .action-meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); color: var(--ink-3); font-size: var(--fs-xs); }
  .action-meta .host { color: var(--ink-2); font-size: var(--fs-xs); }
  @media (max-width: 640px) { .action { grid-template-columns: auto minmax(0, 1fr); } .action > .btn { grid-column: 2; justify-self: start; } }

  /* Readiness gauge */
  .gauge { display: grid; justify-items: center; gap: var(--sp-4); padding: var(--sp-6) var(--sp-5); text-align: center; }
  .gauge-text { color: var(--ink-2); font-size: var(--fs-sm); max-width: 18rem; }
  .gauge-list { display: grid; gap: var(--sp-2); width: 100%; text-align: left; font-size: var(--fs-sm); }
  .gauge-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); color: var(--ink-2); }
  .gauge-list strong { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }

  /* Detail header (certificate, endpoint, customer) */
  .detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-5); align-items: center; margin-bottom: var(--sp-6); }
  .detail-head h1 { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .detail-head .page-subtitle { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
  @media (max-width: 760px) { .detail-head { grid-template-columns: auto minmax(0, 1fr); } .detail-head > .page-actions { grid-column: 1 / -1; } }
  .san-list { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
  .san-list .tag { font-family: var(--font-mono); font-size: var(--fs-2xs); }

  /* Agent / endpoint cards */
  .agent-card { display: grid; gap: var(--sp-3); padding: var(--sp-5); }
  .agent-card-head { display: flex; align-items: center; gap: var(--sp-3); }
  .agent-card-head .grow strong { display: block; font-size: var(--fs-sm); font-weight: 600; }
  .agent-card-head .grow small { color: var(--ink-3); font-size: var(--fs-xs); }
  .agent-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-subtle); color: var(--ink-2); }

  /* Onboarding wizard */
  .wizard { width: min(44rem, 100%); margin: 0 auto; }
  .wizard-head { display: grid; gap: var(--sp-5); margin-bottom: var(--sp-6); }
  .wizard-foot { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--line); background: var(--bg-subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .wait { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-sm); }

  /* Native meter / progress, themed */
  meter, progress { width: 100%; height: .375rem; border: 0; border-radius: var(--r-full); background: var(--bg-muted); appearance: none; overflow: hidden; vertical-align: middle; }
  progress::-webkit-progress-bar, meter::-webkit-meter-bar { background: var(--bg-muted); border: 0; border-radius: var(--r-full); }
  progress::-webkit-progress-value { background: var(--ink); border-radius: var(--r-full); }
  progress::-moz-progress-bar { background: var(--ink); border-radius: var(--r-full); }
  meter::-webkit-meter-optimum-value { background: var(--ok); }
  meter::-webkit-meter-suboptimum-value { background: var(--warn); }
  meter::-webkit-meter-even-less-good-value { background: var(--danger); }
  meter:-moz-meter-optimum::-moz-meter-bar { background: var(--ok); }
  meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
  meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }

  /* Style guide catalogue */
  .sg-section { padding: var(--sp-10) 0; border-top: 1px solid var(--line); }
  .sg-section:first-of-type { border-top: 0; padding-top: 0; }
  .sg-title { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-5); font-size: var(--fs-lg); }
  .sg-title code { font-size: var(--fs-xs); font-weight: 400; }
  .sg-demo { padding: var(--sp-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
  .sg-demo + .sg-demo { margin-top: var(--sp-3); }
  .sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--sp-3); }
  .sg-swatch { display: grid; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-2); }
  .sg-swatch::before { content: ""; height: 3rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sw); }
  .sw-bg { --sw: var(--bg); } .sw-subtle { --sw: var(--bg-subtle); } .sw-muted { --sw: var(--bg-muted); } .sw-ink { --sw: var(--ink); }
  .sw-ink2 { --sw: var(--ink-2); } .sw-line { --sw: var(--line); } .sw-accent { --sw: var(--accent); } .sw-ok { --sw: var(--ok); }
  .sw-warn { --sw: var(--warn); } .sw-danger { --sw: var(--danger); } .sw-neutral { --sw: var(--neutral); } .sw-accent-soft { --sw: var(--accent-soft); }
  .sg-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: var(--sp-2); }
  .sg-icon { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2); border: 1px solid var(--line-faint); border-radius: var(--r-md); color: var(--ink-2); font-family: var(--font-mono); font-size: var(--fs-2xs); }
  .sg-icon .i { width: 1.25rem; height: 1.25rem; color: var(--ink); }
  .sg-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--sp-3); }
  .sg-index a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); }
  .sg-type > * + * { margin-top: var(--sp-3); }
}

@layer components {
  .agent-card-head .grow { min-width: 0; }
  .agent-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line-faint); color: var(--ink-3); font-size: var(--fs-xs); }
  .agent-card-meta > span + span:not(.ml-auto)::before { content: "·"; margin-right: var(--sp-3); color: var(--line-strong); }
  .grid-auto { --grid-min: 280px; }
}

@layer components {
  .detail-head h1.detail-title { font-family: var(--font-sans); font-size: var(--fs-2xl); letter-spacing: -.025em; }
}
/* src/app.css */
/* Application shell: fixed sidebar, topbar, content area, page header.
   Mobile: the sidebar becomes off-canvas; JS toggles body.nav-open, the
   no-JS fallback opens it via #sidebar:target. */
@layer components {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }

  .sidebar {
    position: sticky; top: 0; height: 100dvh; z-index: var(--z-overlay);
    display: flex; flex-direction: column; gap: var(--sp-3);
    padding: var(--sp-3); background: var(--bg-subtle); border-right: 1px solid var(--line);
  }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; height: 2.5rem; padding: 0 var(--sp-2); }
  .sidebar-close { display: none; }
  .sidebar-nav { flex: 1 1 auto; overflow-y: auto; margin: 0 calc(-1 * var(--sp-3)); padding: 0 var(--sp-3); scrollbar-width: thin; }
  .sidebar-foot { border-top: 1px solid var(--line); margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-3) var(--sp-3) 0; }

  .nav-group + .nav-group { margin-top: var(--sp-4); }
  .nav-group-label { padding: var(--sp-1) var(--sp-2); color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
  .nav-item {
    display: flex; align-items: center; gap: .625rem; height: 2rem; padding: 0 var(--sp-2);
    border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500;
    transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  }
  .nav-item .i { color: var(--ink-3); transition: color var(--dur-1) var(--ease); }
  .nav-item:hover { background: var(--bg-hover); color: var(--ink); }
  .nav-item[aria-current="page"] { background: var(--bg-card); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
  .nav-item[aria-current="page"] .i { color: var(--ink); }
  .nav-item .badge { margin-left: auto; }

  /* Tenant / customer switcher (dropdown in the sidebar) */
  .switcher > summary {
    display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2);
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); box-shadow: var(--shadow-xs);
    transition: border-color var(--dur-1) var(--ease);
  }
  .switcher > summary:hover { border-color: var(--line-strong); }
  .switcher-text { display: grid; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
  .switcher-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; }
  .switcher-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: var(--fs-xs); }
  .switcher > summary > .i:last-child { color: var(--ink-3); }
  .switcher .menu { left: 0; right: 0; min-width: 0; }

  .user-menu > summary { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-md); }
  .user-menu > summary:hover { background: var(--bg-hover); }
  .user-menu .menu { left: 0; right: 0; }

  /* Main column */
  .main { display: flex; flex-direction: column; min-width: 0; }
  .topbar {
    position: sticky; top: 0; z-index: var(--z-sticky);
    display: flex; align-items: center; gap: var(--sp-3); height: var(--topbar-h); padding: 0 var(--sp-6);
    background: color-mix(in srgb, var(--bg-subtle) 92%, transparent); border-bottom: 1px solid var(--line);
  }
  .topbar .breadcrumbs { flex: 1 1 auto; min-width: 0; }
  .topbar-search { width: min(18rem, 30vw); }
  .topbar-search .input { height: 2rem; background: var(--bg-card); }
  .topbar-actions { display: flex; align-items: center; gap: var(--sp-1); }
  .nav-toggle { display: none; }

  .content { flex: 1 1 auto; width: 100%; max-width: 1360px; margin: 0 auto; padding: var(--sp-6) var(--sp-6) var(--sp-16); }
  .content-narrow { max-width: 880px; }

  .page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
  .page-title { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
  .page-subtitle { margin-top: var(--sp-1); color: var(--ink-2); font-size: var(--fs-sm); }
  .page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-8) 0 var(--sp-3); font-size: var(--fs-md); font-weight: 600; }

  .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--line); }
  .toolbar .input-wrap { flex: 1 1 14rem; max-width: 22rem; }
  .toolbar .input { height: 2rem; }
  .toolbar .select { height: 2rem; width: auto; }

  .readonly-banner { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-6); background: var(--info-bg); color: var(--info); border-bottom: 1px solid var(--info-line); font-size: var(--fs-xs); font-weight: 500; }
  .dev-banner { padding: 2px var(--sp-3); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-2xs); font-family: var(--font-mono); text-align: center; border-bottom: 1px solid var(--warn-line); }

  @media (max-width: 960px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
      position: fixed; inset: 0 auto 0 0; width: min(var(--sidebar-w), 86vw); box-shadow: var(--shadow-xl);
      transform: translateX(-102%); transition: transform var(--dur-3) var(--ease); visibility: hidden;
    }
    .nav-open .sidebar, .sidebar:target { transform: none; visibility: visible; }
    .nav-open .scrim, .sidebar:target ~ .scrim { display: block; }
    .sidebar-close { display: inline-flex; }
    .nav-toggle { display: inline-flex; }
    .topbar { padding: 0 var(--sp-4); }
    .topbar-search { display: none; }
    .content { padding: var(--sp-5) var(--sp-4) var(--sp-12); }
  }
  .scrim { display: none; position: fixed; inset: 0; z-index: calc(var(--z-overlay) - 1); background: var(--bg-overlay); }

  /* Auth screens (login, invitation) */
  .auth { display: grid; place-items: center; min-height: 100dvh; padding: var(--sp-8) var(--sp-4); background: var(--bg-subtle); }
  .auth-card { width: min(25rem, 100%); }
  .auth-card .card-body { padding: var(--sp-8); }
  .auth-logo { display: flex; justify-content: center; margin-bottom: var(--sp-6); }
  .auth-title { font-size: var(--fs-xl); font-weight: 600; text-align: center; letter-spacing: -.02em; }
  .auth-text { margin-top: var(--sp-2); color: var(--ink-2); font-size: var(--fs-sm); text-align: center; }
  .auth-foot { margin-top: var(--sp-6); color: var(--ink-3); font-size: var(--fs-xs); text-align: center; }
  .or { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); }
  .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

}

@layer components {
  .auth-foot a { color: var(--ink-3); text-decoration: none; }
  .auth-foot a:hover { color: var(--ink); }
  .auth-card > .card { box-shadow: var(--shadow-md); }
}

@layer components {
  @media (max-width: 640px) {
    .topbar .breadcrumbs li:not(:last-child) { display: none; }
    .topbar .breadcrumbs li + li::before { display: none; }
  }
}

@layer components {
  .auth-sent { justify-items: center; }
  .auth-sent .status-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-inline: auto; border-radius: 50%; background: var(--tone-bg); color: var(--tone); border: 1px solid var(--tone-line); }
}
/* src/site.css */
/* Marketing site: header, hero, section scaffolding, footer.
   Visuals are real HTML/CSS product mockups (mock.css), no stock art. */
@layer components {
  .site { font-size: var(--fs-md); }
  .site main { overflow-x: clip; }

  .site-header {
    position: sticky; top: 0; z-index: var(--z-sticky); height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur-2) var(--ease);
  }
  .site-header.is-scrolled, .site-header.solid { border-bottom-color: var(--line); }
  .site-header .container { display: flex; align-items: center; gap: var(--sp-8); height: 100%; }
  .site-nav { display: flex; align-items: center; gap: var(--sp-1); flex: 1 1 auto; }
  .site-nav a { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
  .site-actions { display: flex; align-items: center; gap: var(--sp-2); }
  .site-menu { display: none; }
  .site-menu > summary { list-style: none; }
  .site-menu > summary::-webkit-details-marker { display: none; }
  .site-menu-panel { position: fixed; inset: var(--header-h) 0 auto; z-index: var(--z-overlay); display: grid; gap: var(--sp-1); padding: var(--sp-4) var(--gutter) var(--sp-6); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .site-menu-panel a:not(.btn) { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-faint); font-weight: 500; }
  .site-menu-panel .btn { margin-top: var(--sp-3); }
  @media (max-width: 880px) {
    .site-nav, .site-actions .hide-mobile { display: none; }
    .site-header .container { justify-content: space-between; }
    .site-menu { display: block; }
  }

  /* Sections */
  .section { padding: var(--sp-24) 0; }
  .section-sm { padding: var(--sp-16) 0; }
  .section + .section-border, .section-border { border-top: 1px solid var(--line); }
  .section-muted { background: var(--bg-subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .section-head { display: grid; gap: var(--sp-4); max-width: 46rem; margin-bottom: var(--sp-12); }
  .section-head.center { justify-items: center; margin-inline: auto; text-align: center; }
  .kicker { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
  .h-display { font-size: var(--fs-display); font-weight: 600; letter-spacing: var(--tracking-display); line-height: 1.02; }
  .h-section { font-size: var(--fs-5xl); font-weight: 600; letter-spacing: -.032em; line-height: 1.08; }
  .h-sub { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.022em; line-height: 1.2; }
  .lead { color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.6; max-width: 40rem; }
  .lead-sm { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.65; }
  .muted { color: var(--ink-2); }
  .faint { color: var(--ink-3); }
  @media (max-width: 760px) { .section { padding: var(--sp-16) 0; } .section-head { margin-bottom: var(--sp-8); } .lead { font-size: var(--fs-md); } }

  /* Hero */
  .hero { position: relative; padding: var(--sp-20) 0 var(--sp-16); }
  .hero::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 44rem; z-index: -1; pointer-events: none;
    background-image: linear-gradient(var(--line-faint) 1px, transparent 1px), linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
    background-size: 48px 48px; background-position: center top;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  }
  .hero-inner { display: grid; justify-items: center; gap: var(--sp-6); text-align: center; }
  .hero .h-display { max-width: 15ch; }
  .hero .h-display .soft { color: var(--ink-3); }
  .hero .lead { max-width: 38rem; text-align: center; }
  .hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-2); }
  .hero-note { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-5); color: var(--ink-3); font-size: var(--fs-sm); }
  .hero-note span { display: inline-flex; align-items: center; gap: var(--sp-2); }
  .hero-note .i { color: var(--ok); }
  .announce {
    display: inline-flex; align-items: center; gap: var(--sp-2); height: 2rem; padding: 0 var(--sp-3) 0 var(--sp-1);
    border: 1px solid var(--line); border-radius: var(--r-full); background: var(--bg-card); box-shadow: var(--shadow-xs);
    color: var(--ink-2); font-size: var(--fs-sm);
  }
  .announce:hover { border-color: var(--line-strong); color: var(--ink); }
  .announce .tag-new { display: inline-flex; align-items: center; height: 1.5rem; padding: 0 var(--sp-2); border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .04em; }
  .announce .i { color: var(--ink-3); }
  .hero-visual { position: relative; width: 100%; max-width: 1120px; margin: var(--sp-16) auto 0; }
  @media (max-width: 760px) { .hero { padding-top: var(--sp-12); } .hero-visual { margin-top: var(--sp-10); } }

  /* Logo strip / CA-neutral strip */
  .strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-3) var(--sp-10); color: var(--ink-3); }
  .strip-item { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; color: var(--ink-3); white-space: nowrap; }
  .strip-label { width: 100%; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }

  /* Footer */
  .site-footer { border-top: 1px solid var(--line); background: var(--bg-subtle); padding: var(--sp-16) 0 var(--sp-10); font-size: var(--fs-sm); }
  .footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--sp-8); }
  .footer-brand p { margin-top: var(--sp-4); max-width: 22rem; color: var(--ink-2); }
  .footer-col h2 { margin-bottom: var(--sp-3); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; }
  .footer-col ul { display: grid; gap: var(--sp-2); }
  .footer-col a { color: var(--ink-2); text-decoration: none; }
  .footer-col a:hover { color: var(--ink); }
  .footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); }
  .footer-bottom .cluster { gap: var(--sp-5); }
  @media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }

  .draft-banner { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-2) var(--gutter); background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); font-size: var(--fs-sm); font-weight: 500; text-align: center; }
}
/* src/site-sections.css */
/* Landing page sections: lifetime timeline, cost bars, steps, targets,
   security band, MSP split, check form, pricing cards, FAQ, final CTA. */
@layer components {
  /* Lifetime / cost bar charts: rows of label | SVG bar | value */
  .chart { display: grid; gap: var(--sp-3); }
  .chart-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 6.5rem; align-items: center; gap: var(--sp-4); }
  .chart-label { display: grid; line-height: 1.3; }
  .chart-label strong { font-size: var(--fs-sm); font-weight: 600; }
  .chart-label small { color: var(--ink-3); font-size: var(--fs-xs); }
  .chart-bar { display: block; width: 100%; height: 2.25rem; overflow: visible; }
  .chart-bar .track { fill: var(--bg-muted); }
  .chart-bar .fill { fill: var(--line-strong); }
  .chart-bar .fill-accent { fill: var(--accent); }
  .chart-bar .fill-ink { fill: var(--ink); }
  .chart-bar .fill-ok { fill: var(--ok); }
  .chart-value { justify-self: end; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .chart-value small { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; margin-left: 2px; }
  .chart-row.is-highlight .chart-label strong, .chart-row.is-highlight .chart-value { color: var(--accent); }
  .chart-note { display: flex; gap: var(--sp-3); align-items: flex-start; margin-top: var(--sp-6); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); color: var(--ink-2); font-size: var(--fs-sm); }
  .chart-note .i { color: var(--accent); margin-top: 2px; }
  .chart-foot { margin-top: var(--sp-3); color: var(--ink-3); font-size: var(--fs-xs); }
  @media (max-width: 640px) {
    .chart-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-3); }
    .chart-bar { grid-column: 1 / -1; grid-row: 2; height: 1.5rem; }
  }

  .split-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .panel { padding: var(--sp-8); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); box-shadow: var(--shadow-xs); }
  .panel-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-6); }
  .panel-title h3 { font-size: var(--fs-md); font-weight: 600; }
  .compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-6); }
  .compare-item { padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); }
  .compare-item.is-good { border-color: var(--ok-line); background: var(--ok-bg); }
  .compare-figure { margin-top: var(--sp-1); font-size: var(--fs-4xl); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .compare-item.is-good .compare-figure { color: var(--ok); }
  @media (max-width: 860px) { .split-cards, .compare { grid-template-columns: minmax(0, 1fr); } .panel { padding: var(--sp-5); } }

  /* Steps */
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); counter-reset: step; }
  .step { display: grid; grid-template-rows: auto auto 1fr; gap: var(--sp-3); padding: var(--sp-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
  .step-num { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--fs-xs); }
  .step h3 { font-size: var(--fs-lg); font-weight: 600; }
  .step p { color: var(--ink-2); font-size: var(--fs-sm); }
  .step-visual { align-self: end; margin-top: var(--sp-3); }
  @media (max-width: 960px) { .steps { grid-template-columns: minmax(0, 1fr); } }

  /* Targets grid */
  .targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); gap: 1px; }
  .target { display: grid; align-content: start; gap: var(--sp-2); padding: var(--sp-6); background: var(--bg-card); }
  .target-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); box-shadow: var(--shadow-xs); }
  .target h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-md); font-weight: 600; }
  .target p { color: var(--ink-2); font-size: var(--fs-sm); }
  @media (max-width: 960px) { .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 560px) { .targets { grid-template-columns: minmax(0, 1fr); } }

  /* Dark security band */
  .band-dark { color-scheme: dark; background: #0a0a0b; color: var(--ink); border-top: 1px solid #1c1c1f; border-bottom: 1px solid #1c1c1f; }
  .band-dark .kicker { color: #9bb0ff; }
  .sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-10) var(--sp-8); }
  .sec-item { display: grid; gap: var(--sp-2); align-content: start; padding-top: var(--sp-5); border-top: 1px solid var(--line); }
  .sec-item .i { color: var(--ink); margin-bottom: var(--sp-2); }
  .sec-item h3 { font-size: var(--fs-md); font-weight: 600; }
  .sec-item p { color: var(--ink-2); font-size: var(--fs-sm); }
  @media (max-width: 960px) { .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 560px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } }

  /* Feature split (text + visual) */
  .feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-16); align-items: center; }
  .feature-list { display: grid; gap: var(--sp-4); margin-top: var(--sp-8); }
  .feature-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); color: var(--ink-2); font-size: var(--fs-sm); }
  .feature-list li strong { display: block; color: var(--ink); font-size: var(--fs-md); font-weight: 600; margin-bottom: 2px; }
  .feature-list .i { margin-top: 3px; color: var(--accent); }
  @media (max-width: 960px) { .feature { grid-template-columns: minmax(0, 1fr); gap: var(--sp-10); } }

  /* Check form card */
  .check-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-12); align-items: center; padding: var(--sp-12); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-card); box-shadow: var(--shadow-md); }
  .check-form { display: grid; gap: var(--sp-3); }
  .check-form .input-row { display: flex; gap: var(--sp-2); }
  .check-form .input-row .input { flex: 1 1 auto; }
  .check-points { display: grid; gap: var(--sp-2); margin-top: var(--sp-6); color: var(--ink-2); font-size: var(--fs-sm); }
  .check-points li { display: flex; gap: var(--sp-2); align-items: flex-start; }
  .check-points .i { color: var(--ok); margin-top: 3px; }
  @media (max-width: 860px) { .check-card { grid-template-columns: minmax(0, 1fr); padding: var(--sp-6); gap: var(--sp-6); } .check-form .input-row { flex-direction: column; } }

  /* Pricing cards */
  .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); align-items: stretch; }
  .plan { position: relative; display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-8); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
  .plan.is-featured { border-color: var(--ink); box-shadow: var(--shadow-lg), 0 0 0 1px var(--ink); }
  .plan-badge { position: absolute; top: -.75rem; left: var(--sp-8); display: inline-flex; align-items: center; height: 1.5rem; padding: 0 var(--sp-3); border-radius: var(--r-full); background: var(--ink); color: var(--ink-inverse); font-size: var(--fs-xs); font-weight: 600; }
  .plan-name { font-size: var(--fs-lg); font-weight: 600; }
  .plan-desc { color: var(--ink-2); font-size: var(--fs-sm); min-height: 2.6em; }
  .plan-price { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
  .plan-price strong { font-size: var(--fs-5xl); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
  .plan-price span { color: var(--ink-3); font-size: var(--fs-sm); }
  .plan-list { display: grid; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); }
  .plan-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2); }
  .plan-list .i { margin-top: 3px; color: var(--ink); }
  .plan .btn { margin-top: auto; }
  .plans-note { margin-top: var(--sp-6); color: var(--ink-3); font-size: var(--fs-sm); text-align: center; }
  @media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 30rem; margin-inline: auto; } }

  /* FAQ */
  .faq { display: grid; border-top: 1px solid var(--line); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5) 0; list-style: none; font-size: var(--fs-md); font-weight: 500; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary .i { color: var(--ink-3); transition: transform var(--dur-2) var(--ease); }
  .faq details[open] summary .i { transform: rotate(45deg); }
  .faq summary:hover { color: var(--accent); }
  .faq-body { padding: 0 var(--sp-12) var(--sp-6) 0; color: var(--ink-2); }
  .faq-body p + p { margin-top: var(--sp-3); }
  .faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--sp-16); }
  @media (max-width: 860px) { .faq-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); } .faq-body { padding-right: 0; } }

  /* Final CTA */
  .cta { display: grid; justify-items: center; gap: var(--sp-5); padding: var(--sp-20) var(--sp-6); text-align: center; }
  .cta .h-section { max-width: 18ch; }
  .waitlist { display: grid; gap: var(--sp-3); width: min(30rem, 100%); text-align: left; }
  .waitlist .input-row { display: flex; gap: var(--sp-2); }
  .waitlist .input-row .input { flex: 1 1 auto; }
  .waitlist .choice { font-size: var(--fs-xs); }
  .waitlist-done { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-6); border: 1px solid var(--ok-line); border-radius: var(--r-lg); background: var(--ok-bg); text-align: center; width: min(30rem, 100%); }
  .waitlist-done .i { color: var(--ok); }
  @media (max-width: 560px) { .waitlist .input-row { flex-direction: column; } }
}

@layer components {
  /* Inline forms: the button matches the large input's height. */
  .check-form .input-row .btn, .waitlist .input-row .btn { height: auto; min-height: 2.75rem; }
  .check-card .h-section { font-size: var(--fs-4xl); }
  .panel > .compare:first-child, .panel-title + .compare { margin-top: 0; }
}
/* src/site-pages.css */
/* Secondary marketing pages: page hero, pricing comparison, security
   architecture diagram, legal prose, waitlist status pages, check result. */
@layer components {
  .page-hero { padding: var(--sp-20) 0 var(--sp-12); text-align: center; }
  .page-hero .stack { justify-items: center; }
  .page-hero .h-section { max-width: 20ch; margin-inline: auto; }
  .page-hero .lead { margin-inline: auto; }

  /* Pricing comparison table */
  .compare-table { width: 100%; font-size: var(--fs-sm); border-collapse: separate; border-spacing: 0; }
  .compare-table th, .compare-table td { padding: var(--sp-4); border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
  .compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--ink-2); width: 34%; }
  .compare-table thead th { position: sticky; top: var(--header-h); z-index: 1; background: var(--bg); font-size: var(--fs-md); font-weight: 600; color: var(--ink); border-bottom-color: var(--line-strong); }
  .compare-table thead th small { display: block; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
  .compare-table .group th { padding-top: var(--sp-8); text-align: left; color: var(--ink); font-size: var(--fs-xs); font-family: var(--font-mono); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
  .compare-table .yes { color: var(--ink); }
  .compare-table .no { color: var(--line-strong); }
  .compare-table td.is-featured, .compare-table th.is-featured { background: var(--bg-subtle); }
  @media (max-width: 760px) {
    .compare-scroll { overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
    .compare-table { min-width: 40rem; }
    .compare-table thead th { position: static; }
  }

  /* Security architecture diagram (inline SVG, classes only) */
  .diagram { padding: var(--sp-8); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-subtle); }
  .diagram svg { width: 100%; height: auto; font-family: var(--font-sans); }
  .diagram .zone { fill: var(--bg-card); stroke: var(--line-strong); stroke-width: 1; }
  .diagram .zone-cloud { fill: var(--accent-soft); stroke: var(--accent-line); }
  .diagram .node { fill: var(--bg-card); stroke: var(--line-strong); stroke-width: 1; }
  .diagram .node-key { fill: var(--ok-bg); stroke: var(--ok-line); }
  .diagram .zone-label { fill: var(--ink-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
  .diagram .node-title { fill: var(--ink); font-size: 13px; font-weight: 600; }
  .diagram .node-text { fill: var(--ink-2); font-size: 11px; }
  .diagram .flow { stroke: var(--ink-2); stroke-width: 1.5; fill: none; }
  .diagram .flow-accent { stroke: var(--accent); }
  .diagram .flow-dashed { stroke-dasharray: 4 4; }
  .diagram .arrow { fill: var(--ink-2); }
  .diagram .arrow-accent { fill: var(--accent); }
  .diagram .flow-label { fill: var(--ink-2); font-family: var(--font-mono); font-size: 10.5px; }
  .diagram .flow-label-bg { fill: var(--bg-subtle); }
  .diagram-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); margin-top: var(--sp-5); color: var(--ink-2); font-size: var(--fs-xs); }
  .diagram-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
  .legend-line { width: 1.5rem; height: 2px; background: var(--ink-2); }
  .legend-line.accent { background: var(--accent); }
  .legend-swatch { width: .75rem; height: .75rem; border-radius: 3px; border: 1px solid var(--ok-line); background: var(--ok-bg); }
  @media (max-width: 760px) { .diagram { padding: var(--sp-3); } }

  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .fact { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); padding: var(--sp-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
  .fact-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-md); background: var(--bg-muted); color: var(--ink); }
  .fact h3 { font-size: var(--fs-md); font-weight: 600; margin-bottom: var(--sp-1); }
  .fact p { color: var(--ink-2); font-size: var(--fs-sm); }
  .fact p + p { margin-top: var(--sp-2); }
  @media (max-width: 860px) { .facts { grid-template-columns: minmax(0, 1fr); } }

  /* Legal / long-form prose */
  .prose { max-width: 44rem; color: var(--ink-2); font-size: var(--fs-md); line-height: 1.7; }
  .prose > * + * { margin-top: var(--sp-4); }
  .prose h1 { color: var(--ink); font-size: var(--fs-4xl); letter-spacing: -.03em; line-height: 1.15; }
  .prose h2 { margin-top: var(--sp-12); color: var(--ink); font-size: var(--fs-xl); }
  .prose h3 { margin-top: var(--sp-8); color: var(--ink); font-size: var(--fs-md); }
  .prose ul { padding-left: 1.25rem; list-style: disc; }
  .prose ol { padding-left: 1.25rem; list-style: decimal; }
  .prose li + li { margin-top: var(--sp-2); }
  .prose li::marker { color: var(--ink-3); }
  .prose strong { color: var(--ink); }
  .prose address { font-style: normal; }
  .prose .meta { color: var(--ink-3); font-size: var(--fs-sm); }
  .legal-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--sp-16); padding: var(--sp-16) 0 var(--sp-24); }
  .legal-nav { position: sticky; top: calc(var(--header-h) + var(--sp-8)); align-self: start; display: grid; gap: var(--sp-1); font-size: var(--fs-sm); }
  .legal-nav a { padding: var(--sp-1) var(--sp-3); border-left: 1px solid var(--line); color: var(--ink-3); }
  .legal-nav a:hover { color: var(--ink); }
  .legal-nav a[aria-current="page"] { border-left-color: var(--ink); color: var(--ink); font-weight: 500; }
  @media (max-width: 860px) { .legal-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); padding-top: var(--sp-10); } .legal-nav { position: static; display: flex; flex-wrap: wrap; } .legal-nav a { border-left: 0; border-bottom: 1px solid var(--line); } }

  /* Status page for waitlist steps (danke, bestätigen, bestätigt) */
  .status-page { display: grid; place-items: center; min-height: calc(100dvh - var(--header-h) - 20rem); padding: var(--sp-20) 0; }
  .status-card { display: grid; justify-items: center; gap: var(--sp-4); width: min(32rem, 100%); padding: var(--sp-10) var(--sp-8); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg-card); box-shadow: var(--shadow-md); text-align: center; }
  .status-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--tone-bg, var(--bg-muted)); color: var(--tone, var(--ink)); border: 1px solid var(--tone-line, var(--line)); }
  .status-card h1 { font-size: var(--fs-2xl); letter-spacing: -.025em; }
  .status-card p { color: var(--ink-2); }
  .status-steps { display: grid; gap: var(--sp-2); width: 100%; margin-top: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-md); background: var(--bg-subtle); text-align: left; font-size: var(--fs-sm); color: var(--ink-2); }
  .status-steps li { display: flex; gap: var(--sp-3); align-items: center; }
  .status-steps .n { display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; border: 1px solid var(--line-strong); font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-2); flex: none; }
  .status-steps .n.done { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }

  /* Check result */
  .result-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-6); align-items: center; padding: var(--sp-6); }
  .result-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
  .result-summary > div { display: grid; gap: var(--sp-1); padding: var(--sp-4) var(--sp-6); }
  .result-summary > div + div { border-left: 1px solid var(--line); }
  .result-summary strong { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .result-summary span { color: var(--ink-3); font-size: var(--fs-xs); }
  @media (max-width: 760px) {
    .result-head { grid-template-columns: auto minmax(0, 1fr); }
    .result-head > :last-child { grid-column: 1 / -1; }
    .result-summary { grid-template-columns: minmax(0, 1fr); }
    .result-summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
  }
}
/* src/mock.css */
/* Product mockups for marketing pages: a browser window with a miniature
   dashboard plus a floating terminal card. Built from real components at
   a smaller scale, so they follow the theme like the app itself. */
@layer components {
  .window {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--bg-card); box-shadow: var(--shadow-xl);
    text-align: left; font-size: var(--fs-xs);
  }
  .window-bar { display: flex; align-items: center; gap: var(--sp-3); height: 2.5rem; padding: 0 var(--sp-4); border-bottom: 1px solid var(--line); background: var(--bg-subtle); }
  .window-dots { display: inline-flex; gap: 6px; }
  .window-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
  .window-url { flex: 0 1 22rem; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: var(--sp-2); height: 1.5rem; border-radius: var(--r-sm); background: var(--bg-muted); color: var(--ink-3); font-family: var(--font-mono); font-size: var(--fs-2xs); }
  .window-url .i { width: .625rem; height: .625rem; color: var(--ok); }
  .window-body { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); min-height: 30rem; }

  .mock-side { display: grid; align-content: start; gap: 2px; padding: var(--sp-3); border-right: 1px solid var(--line); background: var(--bg-subtle); }
  .mock-side .logo { font-size: var(--fs-xs); margin: var(--sp-1) var(--sp-2) var(--sp-3); }
  .mock-side .logo-mark { width: 1rem; height: 1rem; }
  .mock-tenant { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); margin-bottom: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-card); font-weight: 600; }
  .mock-nav { display: flex; align-items: center; gap: var(--sp-2); height: 1.625rem; padding: 0 var(--sp-2); border-radius: 5px; color: var(--ink-2); font-weight: 500; }
  .mock-nav .i { width: .75rem; height: .75rem; color: var(--ink-3); }
  .mock-nav.is-active { background: var(--bg-card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
  .mock-nav .badge { margin-left: auto; height: 1rem; min-width: 1rem; font-size: .5625rem; }

  .mock-main { display: grid; align-content: start; gap: var(--sp-4); padding: var(--sp-5); background: var(--bg-subtle); min-width: 0; }
  .mock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .mock-head h4 { font-size: var(--fs-md); font-weight: 600; letter-spacing: -.02em; }
  .mock-head .btn { --btn-h: 1.625rem; font-size: var(--fs-2xs); padding: 0 var(--sp-2); }
  .mock-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); }
  .mock-kpi { display: grid; gap: 2px; padding: var(--sp-3); }
  .mock-kpi + .mock-kpi { border-left: 1px solid var(--line); }
  .mock-kpi span { color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 500; }
  .mock-kpi strong { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .mock-kpi small { font-size: .625rem; color: var(--ink-3); }
  .mock-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card); min-width: 0; }
  .mock-card-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); font-weight: 600; }
  .mock-row { display: grid; grid-template-columns: 1.25rem minmax(0, 2fr) minmax(0, 1.4fr) 5.5rem 4.5rem; align-items: center; gap: var(--sp-3); padding: .4375rem var(--sp-3); border-bottom: 1px solid var(--line-faint); color: var(--ink-2); }
  .mock-row:last-child { border-bottom: 0; }
  .mock-row .host { font-size: .6875rem; }
  .mock-row .pill { height: 1.125rem; font-size: .625rem; padding: 0 .375rem; }
  .mock-row .ring { width: 1rem; height: 1rem; }
  .mock-row .num { text-align: right; font-variant-numeric: tabular-nums; }
  .mock-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-4); }
  .mock-gauge { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-3); text-align: center; }
  .mock-gauge .ring-xl { width: 6.5rem; height: 6.5rem; }
  .mock-gauge .ring-xl .ring-label { font-size: var(--fs-2xl); }
  .mock-gauge p { color: var(--ink-3); font-size: var(--fs-2xs); }

  /* Floating terminal card on the hero */
  .hero-terminal { position: absolute; right: -2.5rem; bottom: -2.5rem; width: min(27rem, 46%); z-index: 2; }
  .hero-terminal pre { font-size: .6875rem; line-height: 1.75; }
  @media (max-width: 1240px) { .hero-terminal { right: var(--sp-4); } }
  @media (max-width: 900px) {
    .window-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .mock-side { display: none; }
    .mock-split { grid-template-columns: minmax(0, 1fr); }
    .mock-gauge { display: none; }
    .hero-terminal { position: relative; right: auto; bottom: auto; width: 100%; margin-top: calc(-1 * var(--sp-8)); padding: 0 var(--sp-3); }
  }
  @media (max-width: 560px) {
    .mock-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mock-kpi:nth-child(3) { border-left: 0; }
    .mock-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
    .mock-row { grid-template-columns: 1.25rem minmax(0, 1fr) 4.25rem; }
    .mock-row > :nth-child(3), .mock-row > :nth-child(5) { display: none; }
    .window-url { display: none; }
  }

  /* Small inline visuals inside step / feature cards */
  .mini { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-subtle); padding: var(--sp-3); font-size: var(--fs-xs); }
  .mini-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-1) 0; color: var(--ink-2); }
  .mini-row + .mini-row { border-top: 1px dashed var(--line); }
  .mini .host { font-size: .6875rem; }
  .mini .pill { height: 1.125rem; font-size: .625rem; }
  .mini-code { margin: 0; padding: var(--sp-3); border-radius: var(--r-md); background: #0b0b0e; color: #e4e4e7; font-size: .6875rem; line-height: 1.7; color-scheme: dark; overflow-x: auto; }
  .mini-code .prompt { color: #71717a; }
  .mini-code .c-ok { color: #4ade80; }

  /* Customer switcher mock for the MSP section */
  .mock-customers { display: grid; gap: 0; }
  .mock-customer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line-faint); font-size: var(--fs-sm); }
  .mock-customer:last-child { border-bottom: 0; }
  .mock-customer strong { font-weight: 500; }
  .mock-customer small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
  .mock-customer .bar { width: 5rem; }
  @media (max-width: 560px) { .mock-customer { grid-template-columns: auto minmax(0, 1fr) auto; } .mock-customer .bar { display: none; } }
}
/* src/utilities.css */
/* Small single-purpose helpers. Kept deliberately short: components and
   layout primitives come first, utilities only fill the gaps. */
@layer utilities {
  .mt-0 { margin-top: 0; } .mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
  .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); } .mt-12 { margin-top: var(--sp-12); }
  .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); } .mb-8 { margin-bottom: var(--sp-8); }
  .ml-auto { margin-left: auto; }
  .p-0 { padding: 0; }

  .text-xs { font-size: var(--fs-xs); } .text-sm { font-size: var(--fs-sm); } .text-base { font-size: var(--fs-base); } .text-md { font-size: var(--fs-md); } .text-lg { font-size: var(--fs-lg); }
  .text-ink { color: var(--ink); } .text-muted { color: var(--ink-2); } .text-faint { color: var(--ink-3); } .text-accent { color: var(--accent); }
  .text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-danger { color: var(--danger); } .text-tone { color: var(--tone); }
  .text-center { text-align: center; } .text-right { text-align: right; }
  .fw-400 { font-weight: 400; } .fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
  .nowrap { white-space: nowrap; }
  .tabular { font-variant-numeric: tabular-nums; }
  .uppercase { text-transform: uppercase; letter-spacing: var(--tracking-caps); }
  .break-all { overflow-wrap: anywhere; }
  .w-full { width: 100%; }
  .max-w-prose { max-width: 40rem; }
  .relative { position: relative; }
  .block { display: block; }
  .inline-flex { display: inline-flex; align-items: center; gap: var(--sp-2); }

  @media (max-width: 760px) { .hide-sm { display: none !important; } }
  @media (min-width: 761px) { .show-sm { display: none !important; } }
  @media (max-width: 1100px) { .hide-md { display: none !important; } }
  @media (max-width: 1360px) { .hide-lg { display: none !important; } }

  /* JS-only controls stay hidden until app.js marks <html class="js">. */
  html:not(.js) .js-only { display: none !important; }
  html.js .no-js { display: none !important; }
}
