/* ===========================================================================
   kan.fyi — app stylesheet, ported from the "Kan.fyi v2" design project
   (claude.ai/design project a46fae42, file "Kan.fyi v2.dc.html").

   The design prototype styles every element inline. The app CSP is
   `style-src 'self'` (internal/httpx/middleware.go), which blocks style
   attributes outright, so the port is class-driven: every inline rule in the
   prototype has a class here, with the same values.

   Layers, in order:
     1. Webfonts (self-hosted — CSP is also `font-src 'self'`)
     2. Design tokens (ds/tokens/{colors,typography,spacing,elevation}.css)
     3. Base / reset
     4. Primitives (buttons, inputs, badges, cards, chips)
     5. Shell (marketing header/footer, app header)
     6. Landing screen
     7. App screens (sites grid, site detail, MCP setup)
     8. Overlays (dialog, toast, upload pill, drag overlay)
     9. Auth screen
    10. Reduced motion
   =========================================================================== */

/* ── 1. Webfonts ─────────────────────────────────────────────────────────────
   ds/tokens/fonts.css pulls these from the Google Fonts CDN and notes that
   production should self-host. The CSP forces that here: both families are
   vendored as variable-weight woff2 (latin + latin-ext subsets). */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/plus-jakarta-sans-latin-ext.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-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin.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-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-ext.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;
}

/* ── 2. Design tokens ────────────────────────────────────────────────────────
   Copied verbatim from ds/tokens/*.css. Warm paper + ink neutrals, turmeric
   amber as THE brand color, jade green reserved to mean "live". */
:root {
  /* Palette — warm paper neutrals */
  --paper-50: oklch(0.991 0.004 85);
  --paper-100: oklch(0.975 0.006 85);
  --paper-200: oklch(0.945 0.008 85);
  --paper-300: oklch(0.905 0.01 85);
  --paper-400: oklch(0.815 0.011 84);

  /* Warm ink — text neutrals */
  --ink-400: oklch(0.64 0.014 78);
  --ink-500: oklch(0.56 0.015 76);
  --ink-600: oklch(0.495 0.016 74);
  --ink-800: oklch(0.34 0.016 70);
  --ink-900: oklch(0.235 0.014 68);

  /* Jade green — "live" */
  --green-50: oklch(0.965 0.022 162);
  --green-100: oklch(0.93 0.04 162);
  --green-200: oklch(0.87 0.068 162);
  --green-300: oklch(0.78 0.095 161);
  --green-500: oklch(0.56 0.118 160);
  --green-600: oklch(0.52 0.116 160);
  --green-700: oklch(0.47 0.11 160);
  --green-800: oklch(0.41 0.098 160);
  --green-900: oklch(0.3 0.066 160);

  /* Turmeric amber — brand */
  --amber-50: oklch(0.975 0.028 82);
  --amber-100: oklch(0.945 0.058 82);
  --amber-200: oklch(0.9 0.09 80);
  --amber-400: oklch(0.82 0.14 78);
  --amber-500: oklch(0.78 0.155 75);
  --amber-600: oklch(0.69 0.15 70);
  --amber-700: oklch(0.535 0.124 63);

  /* Sky — info */
  --sky-50: oklch(0.965 0.022 240);
  --sky-100: oklch(0.925 0.045 240);
  --sky-600: oklch(0.56 0.11 242);
  --sky-700: oklch(0.5 0.105 242);

  /* Terracotta red — destructive */
  --red-50: oklch(0.965 0.022 28);
  --red-100: oklch(0.925 0.045 28);
  --red-500: oklch(0.58 0.19 27);
  --red-600: oklch(0.525 0.196 27);
  --red-700: oklch(0.47 0.18 27);

  --white: oklch(1 0 0);

  /* Semantic aliases */
  --background: var(--paper-50);
  --foreground: var(--ink-900);
  --card: var(--white);
  --card-foreground: var(--ink-900);
  --primary: var(--ink-900);
  --primary-foreground: var(--paper-50);
  --primary-hover: var(--ink-800);
  --accent: var(--amber-500);
  --accent-foreground: var(--ink-900);
  /* The subtle amber pair completes the set (success/warning/info/destructive
     all have one). ds/tokens/colors.css defines it; only the admin console's
     reporter-admin chip uses it so far. */
  --accent-subtle: var(--amber-50);
  --accent-subtle-foreground: var(--amber-700);
  --muted: var(--paper-100);
  --muted-foreground: var(--ink-600);
  --border: var(--paper-200);
  --input: var(--paper-300);
  --ring: var(--green-600);
  --success-subtle: var(--green-50);
  --success-subtle-foreground: var(--green-800);
  --warning-subtle: var(--amber-50);
  --warning-subtle-foreground: var(--amber-700);
  --info-subtle: var(--sky-50);
  --info-subtle-foreground: var(--sky-700);
  --destructive: var(--red-600);
  --destructive-foreground: var(--white);
  --destructive-subtle: var(--red-50);
  --destructive-subtle-foreground: var(--red-700);

  /* Type */
  --font-sans: "Plus Jakarta Sans", 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,
    monospace;

  /* Layout */
  --container-shell: 1140px;
  --container-app: 1080px;
  --container-content: 720px;
  --container-dialog: 500px;
  --container-auth: 390px;

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Elevation — warm brown, never pure black */
  --shadow-color: 28 18% 30%;
  --shadow-xs: 0 1px 2px -1px hsl(var(--shadow-color) / 0.1);
  --shadow-sm: 0 1px 2px -1px hsl(var(--shadow-color) / 0.1),
    0 2px 5px -2px hsl(var(--shadow-color) / 0.08);
  --shadow-md: 0 2px 4px -2px hsl(var(--shadow-color) / 0.1),
    0 6px 14px -4px hsl(var(--shadow-color) / 0.1);
  --shadow-lg: 0 4px 8px -3px hsl(var(--shadow-color) / 0.1),
    0 16px 32px -8px hsl(var(--shadow-color) / 0.14);
  --shadow-xl: 0 8px 16px -6px hsl(var(--shadow-color) / 0.12),
    0 28px 56px -12px hsl(var(--shadow-color) / 0.18);
  --shadow-lift: 0 2px 0 0 hsl(var(--shadow-color) / 0.06),
    0 4px 10px -3px hsl(var(--shadow-color) / 0.12);

  /* Motion */
  --duration-instant: 80ms;
  --duration-fast: 140ms;
  --duration-base: 220ms;
  --duration-slow: 360ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 3. Base ────────────────────────────────────────────────────────────────*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--green-700);
}
a:hover {
  color: var(--green-800);
}

::placeholder {
  color: var(--ink-400);
}

/* The UA's `[hidden] { display: none }` loses to any class that sets display, and
   this stylesheet sets display on most components — so a server-rendered `hidden`
   (dialogs, the toast, the upload progress row, inactive tab panels and code
   snippets) would show anyway. JS toggles those via the attribute, so it has to win. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted-foreground);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes kanToastIn {
  from {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
@keyframes kanDialogIn {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes kanPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
@keyframes kanFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-8px) rotate(var(--tilt, 0deg));
  }
}

/* ── 4. Primitives ──────────────────────────────────────────────────────────*/

/* Buttons. Every control is a pill; the press is a 1px translate on a spring. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--ink-900);
  color: var(--paper-50);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard),
    transform var(--duration-instant) var(--ease-spring);
}
.btn:hover {
  background: var(--ink-800);
  color: var(--paper-50);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* Quiet outline button on a card surface. */
.btn-secondary {
  background: var(--card);
  border-color: var(--input);
  color: var(--foreground);
  font-weight: 600;
}
.btn-secondary:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Text-only nav / tertiary button. */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-600);
  font-weight: 600;
  height: 38px;
  padding: 0 14px;
}
.btn-ghost:hover {
  background: var(--muted);
  color: var(--ink-900);
}

.btn-danger {
  background: var(--card);
  border-color: var(--input);
  color: var(--destructive);
  font-weight: 600;
}
.btn-danger:hover {
  background: var(--destructive-subtle);
  color: var(--destructive-subtle-foreground);
}

/* Amber CTA — used on the dark call-to-action band. */
.btn-accent {
  background: var(--amber-500);
  color: var(--ink-900);
}
.btn-accent:hover {
  background: var(--amber-400);
  color: var(--ink-900);
}

.btn-lg {
  height: 52px;
  padding: 0 28px;
  font-size: 15.5px;
  box-shadow: var(--shadow-md);
}
.btn-md {
  height: 46px;
  font-size: 14px;
}
.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13.5px;
}
.btn-block {
  display: flex;
  width: 100%;
}

/* Square icon button (copy, preview, close). */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard),
    transform var(--duration-instant) var(--ease-spring);
}
.icon-btn:hover {
  background: var(--muted);
  color: var(--ink-900);
}
.icon-btn:active {
  transform: translateY(1px);
}
.icon-btn-round {
  border-radius: var(--radius-pill);
  width: 40px;
  height: 40px;
  border-color: var(--input);
  background: var(--card);
  color: var(--ink-600);
}
.icon-btn-round:hover {
  background: var(--muted);
}
.icon-btn-on-dark {
  color: var(--paper-300);
}
.icon-btn-on-dark:hover {
  background: color-mix(in oklab, white 10%, transparent);
  color: var(--white);
}

/* Inline "more" link with a trailing arrow. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.link-arrow:hover {
  color: var(--ink-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Back link above a detail page. */
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.link-back:hover {
  color: var(--ink-900);
}

/* Pill input. */
.input {
  height: 46px;
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--input);
  background: var(--card);
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--foreground);
  outline: none;
}
.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 22%, transparent);
}

/* Status badge: a dot plus a label. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--paper-100);
  color: var(--ink-600);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--paper-400);
}
/* A badge sitting beside a heading ("Analytics — Coming soon") must not inherit
   the heading's size or ride its baseline. The neutral default fill is the right
   read: not live yet, same as a Draft. */
h1 > .badge,
h2 > .badge,
h3 > .badge {
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -1px;
  letter-spacing: 0;
}

/* "live" = jade green, per the DS role map. */
.badge-live {
  background: var(--success-subtle);
  color: var(--success-subtle-foreground);
}
.badge-live .dot {
  background: var(--green-500);
}
.badge-warn {
  background: var(--warning-subtle);
  color: var(--warning-subtle-foreground);
}
.badge-danger {
  background: var(--destructive-subtle);
  color: var(--destructive-subtle-foreground);
}
.badge-danger .dot {
  background: var(--red-500);
}

/* Mono chip — "Works with" row, MCP tool names. */
.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-600);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  white-space: nowrap;
}
.chip-square {
  border-radius: var(--radius-xs);
  background: var(--paper-100);
  font-size: 11.5px;
  padding: 3px 8px;
}

/* Client selector chips on the MCP screen. */
.chip-toggle {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--input);
  background: var(--card);
  color: var(--ink-600);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip-toggle:active {
  transform: translateY(1px);
}
.chip-toggle[aria-pressed="true"] {
  background: var(--ink-900);
  color: var(--paper-50);
  border-color: transparent;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  padding: 18px;
}

/* Dark code block. */
.code-block {
  position: relative;
  background: var(--ink-900);
  border-radius: var(--radius-md);
  padding: 16px 52px 16px 16px;
}
.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-100);
  white-space: pre-wrap;
  word-break: break-all;
}
.code-block .copy {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
}
/* One-liner variant with no copy button (landing "how it works" card). */
.code-line {
  background: var(--ink-900);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper-100);
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}

/* The tile that stands in for a site thumbnail: initial on a brand fill. The
   three variants are assigned per-site so a grid of cards is not monochrome. */
.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--amber-400);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  flex: none;
  text-transform: uppercase;
}
.tile-1 {
  background: var(--amber-400);
  color: var(--ink-900);
}
.tile-2 {
  background: var(--ink-900);
  color: var(--amber-400);
}
.tile-3 {
  background: var(--amber-200);
  color: var(--ink-900);
}
.tile-lg {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 18px;
}

/* Dropzone (dialog + detail page). */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1.5px dashed var(--input);
  border-radius: var(--radius-lg);
  background: var(--paper-50);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard);
}
.dropzone:hover {
  border-color: var(--ink-900);
  background: var(--amber-50);
}
.dropzone.dragover {
  border-color: var(--green-500);
  background: var(--green-50);
}
.dropzone .dz-title {
  font-size: 14.5px;
  font-weight: 700;
}
.dropzone .dz-hint {
  font-size: 12px;
  color: var(--ink-500);
}
.dropzone .controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.status {
  min-height: 1.2em;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}
.status.error {
  color: var(--destructive-subtle-foreground);
}
.status:empty {
  min-height: 0;
}

/* Upload progress (design's custom bar; a <progress> cannot take this shape). */
.progress {
  height: 6px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--paper-200);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: var(--pct, 0%);
  border-radius: var(--radius-pill);
  background: var(--amber-500);
  transition: width var(--duration-instant) linear;
}
.upload-live {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
}
.upload-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upload-live-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-live-pct {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* "or" rule. */
.or-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-400);
  font-size: 12px;
}
.or-rule::before,
.or-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── 5. Shell ───────────────────────────────────────────────────────────────*/
.announce {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ink-900);
  color: var(--paper-100);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.announce .dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--amber-500);
  flex: none;
}
.announce .mono {
  font-size: 12px;
  color: var(--amber-400);
}
/* The bar is ink-900; the default green link colour has no contrast on it. */
.announce a {
  color: var(--amber-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.announce a:hover {
  color: var(--amber-200);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--paper-50) 88%, transparent);
  backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: var(--container-shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Inline <svg> (see the "kan-logo" partial), so width must be free to track the
   viewBox aspect ratio off the fixed height. */
.logo {
  height: 28px;
  width: auto;
  display: block;
}

/* Signed-in app header: logo, nav, spacer, New site, avatar. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--paper-50) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.app-header-inner {
  max-width: var(--container-app);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.app-header .logo {
  height: 24px;
}
.app-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-header .spacer {
  flex: 1;
}
.nav-link[aria-current="page"] {
  color: var(--ink-900);
  font-weight: 700;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  text-transform: uppercase;
  text-decoration: none;
}
.avatar:hover {
  color: var(--ink-900);
}

/* Header avatar menu — a native <details>, so it opens without JS (the Sign
   out form lives inside; see the header partial). The toggle is the <summary>,
   restyled as the avatar tile; is-current is the design's "you are on
   Settings" ring, since no nav link marks that page. */
.avatar-btn {
  border: 1.5px solid transparent;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  /* A summary defaults to a list-item with a disclosure marker; the avatar
     tile is its own affordance. display:flex (from .avatar) suppresses the
     ::marker box in modern engines; the -webkit rule covers older Safari. */
  list-style: none;
}
.avatar-btn::-webkit-details-marker {
  display: none;
}
.avatar-btn:active {
  transform: translateY(1px);
}
.avatar-btn.is-current {
  border-color: var(--ink-900);
}
.menu {
  position: relative;
  flex: none;
}
.menu-pop {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 40;
  width: 222px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-head {
  padding: 8px 10px 7px;
  min-width: 0;
}
.menu-head .name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}
.menu-head .email {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 11px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-800);
  cursor: pointer;
  text-decoration: none;
}
.menu-item:hover {
  background: var(--muted);
  color: var(--ink-900);
}
.menu-item svg {
  flex: none;
}

.shell {
  flex: 1;
  width: 100%;
  max-width: var(--container-shell);
  margin: 0 auto;
  padding: 10px 20px 0;
}
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--container-app);
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.column-content {
  max-width: var(--container-content);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
}
.site-footer-inner {
  max-width: var(--container-shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-footer .brand img {
  height: 16px;
  display: block;
}
.site-footer .brand span,
.site-footer .links {
  font-size: 12.5px;
  color: var(--ink-500);
}
/* Both footers style their link row identically; one rule so they cannot drift. */
.site-footer .links,
.app-footer .links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .links a,
.app-footer .links a {
  color: var(--ink-500);
  text-decoration: none;
}
.site-footer .links a:hover,
.app-footer .links a:hover {
  color: var(--ink-900);
}

/* Signed-in footer. Signed-in pages had none, so the legal documents were
   reachable only by anonymous visitors — backwards, since account holders are
   the people bound by them. Also carries the permanent beta notice. */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px 28px;
  margin-top: 48px;
}
.app-footer-inner {
  max-width: var(--container-shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.app-footer-beta {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-500);
  max-width: 62ch;
}
.app-footer .links {
  font-size: 12.5px;
}

/* Legal documents. Long-form prose, so the measure is capped well below the
   app's usual container — these are read, not scanned. */
.legal {
  max-width: 70ch;
}
/* The two language sections are jump targets (#id / #en), and both headers are
   position:sticky — so without this the browser scrolls the anchor to y=0 and
   the header covers the very heading you asked to jump to. Found by clicking
   the links: "Privacy Notice" landed underneath the bar.
   Clears the one-row header (~62px) with room to spare. The signed-in header
   wraps to two rows at the 720px breakpoint below, which is why this value has
   to be raised there — keep the two in step. */
.legal section[id] {
  scroll-margin-top: 84px;
}
.legal h2 {
  margin-top: 32px;
}
.legal h3 {
  margin-top: 24px;
}
.legal p,
.legal li {
  line-height: 1.65;
}
.legal ul {
  padding-left: 20px;
}
.legal li {
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 13px;
  color: var(--ink-500);
}
/* Separates the Indonesian and English halves of the same document. Both live
   on one page so they cannot drift apart; the rule is what tells a reader the
   text below is a translation, not a continuation. */
.legal-rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0 32px;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.legal-nav a {
  color: var(--ink-500);
  text-decoration: none;
}
.legal-nav a:hover {
  color: var(--ink-900);
}

/* The consent line under the sign-in button. There is no registration step —
   accounts are created on magic-link verify — so this is the only moment a user
   deliberately acts before an account exists. */
.auth-legal {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-500);
  text-align: center;
}

/* ── 6. Landing ─────────────────────────────────────────────────────────────*/
.hero {
  background: var(--amber-400);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 36px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.5vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink-900);
}
.hero h1 .spark {
  display: inline-block;
  vertical-align: super;
  margin-left: 6px;
}
.hero p {
  margin: 0;
  max-width: 420px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-800);
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-actions .link-arrow {
  font-size: 14px;
}
.hero-scribble {
  margin-top: 2px;
  align-self: flex-end;
}

/* The floating decorative stack on the right of the hero. */
.hero-art {
  position: relative;
  min-height: 400px;
}
.float {
  position: absolute;
  animation: kanFloat 8s ease-in-out infinite;
}
.float-preview {
  --tilt: -2deg;
  top: 8px;
  left: 2%;
  width: min(266px, 62%);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  transform: rotate(-2deg);
}
.float-chat {
  --tilt: 2.5deg;
  top: 200px;
  left: 42%;
  width: min(258px, 58%);
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  transform: rotate(2.5deg);
  animation-duration: 9s;
  animation-delay: 0.6s;
}
.float-stats {
  --tilt: -4deg;
  top: 64px;
  right: 0;
  width: 158px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 13px;
  transform: rotate(-4deg);
  animation-duration: 7s;
  animation-delay: 1.2s;
}
.url-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper-100);
  border-radius: var(--radius-pill);
  padding: 6px 11px;
}
.url-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--green-500);
  flex: none;
}
.url-pill .mono {
  font-size: 11.5px;
  color: var(--ink-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skeleton {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.skeleton .line {
  height: 11px;
  border-radius: 5px;
  background: var(--paper-100);
}
.skeleton .line-1 {
  width: 62%;
  background: var(--paper-200);
}
.skeleton .line-2 {
  width: 84%;
}
.skeleton .line-3 {
  width: 74%;
}
.skeleton .block {
  height: 48px;
  border-radius: 9px;
  background: var(--amber-200);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-800);
}
.float-preview .badge-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
}
.bubble-user {
  align-self: flex-end;
  background: color-mix(in oklab, white 12%, transparent);
  border-radius: 12px 12px 4px 12px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper-100);
  margin-left: 26px;
}
.bubble-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--paper-300);
  background: color-mix(in oklab, white 7%, transparent);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
}
.bubble-ai {
  margin-top: 10px;
  background: color-mix(in oklab, white 7%, transparent);
  border-radius: 12px 12px 12px 4px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper-100);
  margin-right: 26px;
}
.bubble-ai .mono {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green-300);
}
.float-stats p {
  margin: 0;
}
.float-stats .label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-500);
}
.float-stats .total {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
}
.sparkbars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 42px;
  margin-top: 8px;
}
/* Decorative 7-bar sparkline. Heights are fixed in CSS rather than per-element
   style attributes, which the app CSP forbids. */
.sparkbars i {
  flex: 1;
  border-radius: 3px;
  background: var(--green-300);
}
.sparkbars i:nth-child(1) {
  height: 34%;
}
.sparkbars i:nth-child(2) {
  height: 48%;
}
.sparkbars i:nth-child(3) {
  height: 42%;
}
.sparkbars i:nth-child(4) {
  height: 62%;
}
.sparkbars i:nth-child(5) {
  height: 55%;
}
.sparkbars i:nth-child(6) {
  height: 78%;
}
.sparkbars i:nth-child(7) {
  height: 100%;
  background: var(--green-600);
}

.works-with {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 30px 0 6px;
}
.works-with .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-right: 4px;
}

.section {
  padding: 56px 0 0;
}
.section h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 520px;
}
.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}
/* Color-blocked "way in" card with a decorative blob. */
.way {
  position: relative;
  overflow: hidden;
  background: var(--paper-100);
  border-radius: var(--radius-xl);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.way > * {
  position: relative;
}
.way h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.way p {
  margin: 0;
  max-width: 380px;
  font-size: 14px;
  color: var(--ink-600);
}
.blob {
  position: absolute;
  border-radius: var(--radius-pill);
}
.blob-amber {
  right: -34px;
  bottom: -44px;
  width: 150px;
  height: 150px;
  background: var(--amber-400);
}
.blob-ink {
  right: -30px;
  top: -40px;
  width: 130px;
  height: 130px;
  background: var(--ink-900);
}
/* Compact dropzone teaser on the landing page. */
.way .dropzone {
  flex-direction: row;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  border-color: var(--paper-400);
  text-decoration: none;
  color: inherit;
}
.way .dropzone .dz-title {
  font-size: 14px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 28px;
  padding: 56px 0 0;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.feature .glyph {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-600);
}

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  border-radius: 32px;
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin: 64px 0;
}
.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 460px;
}
.cta-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--paper-50);
}
.cta-copy p {
  margin: 0;
  font-size: 12.5px;
  color: var(--paper-300);
}
.cta-art {
  position: relative;
  flex: 1;
  min-width: 250px;
  min-height: 150px;
}
.cta-art .float {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  box-shadow: var(--shadow-lg);
  animation-duration: 7s;
}
.cta-art .float .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--green-500);
  flex: none;
}
.cta-art .float .mono {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
}
.cta-art .float-a {
  --tilt: -3deg;
  top: 6px;
  right: 8%;
  transform: rotate(-3deg);
}
.cta-art .float-b {
  --tilt: 2deg;
  top: 62px;
  right: 24%;
  transform: rotate(2deg);
  animation-duration: 8s;
  animation-delay: 0.8s;
}
.cta-art .float-c {
  --tilt: -2deg;
  top: 118px;
  right: 2%;
  transform: rotate(-2deg);
  background: color-mix(in oklab, white 10%, transparent);
  border: 1px solid color-mix(in oklab, white 18%, transparent);
  box-shadow: none;
  animation-duration: 9s;
  animation-delay: 1.4s;
}
.cta-art .float-c .mono {
  color: var(--paper-200);
  font-weight: 400;
}

/* ── 7. App screens ─────────────────────────────────────────────────────────*/
.page-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 20px;
}
.page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.page-head .count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-foreground);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}
.site-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}
.site-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}
.site-card:active {
  transform: translateY(0);
}
.site-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-card-id {
  min-width: 0;
  flex: 1;
}
.site-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The whole card is the link target; the copy button sits above it. */
.site-card-name a {
  color: inherit;
  text-decoration: none;
}
.site-card-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
}
.site-card-url {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-card-url.is-live {
  color: var(--green-700);
}
.site-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.site-card-meta .sep {
  color: var(--ink-400);
}
.site-card-meta .spacer {
  flex: 1;
}
.site-card-meta .icon-btn {
  position: relative;
  z-index: 1;
}

/* Account storage meter under the site grid: a quiet footnote — muted text,
   mono figures (the .page-head .count treatment) — that picks up a badge once
   usage crosses 80% of the account cap. */
.storage-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 2px 0;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.storage-line .nums {
  font-family: var(--font-mono);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 72px 24px;
  text-align: center;
}
.empty .glyph {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty h2 {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 800;
}
.empty p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted-foreground);
}
.empty .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* The signed-in 404 (handlers.notFound) — an unknown or foreign site/token id.
   One centered column inside the app chrome. The numeral is the only decorative
   element, and the brand's amber is reserved for its zero: jade means "live"
   everywhere else in the app, so it must never read as "missing" here. */
.nf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 72px 24px 64px;
  text-align: center;
}
.nf-code {
  margin: 0;
  font-size: clamp(64px, 12vw, 112px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.nf-code .nf-zero {
  color: var(--amber-500);
}
.nf h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.nf-lede {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-600);
  text-wrap: pretty;
}
.nf-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
/* spec §6 puts the report path on platform pages; this card is what a reporter
   who followed a dead dashboard link actually sees. */
.nf-report {
  margin-top: 26px;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.nf-report h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.nf-report p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-600);
}
.nf-report .mono {
  color: var(--ink-800);
}

/* Site detail */
.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.detail-id {
  flex: 1;
  min-width: 240px;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.detail-url {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.detail-url .url {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--ink-500);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.detail-url .url.is-live {
  color: var(--green-700);
}
.detail-url .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-actions form {
  margin: 0;
}

/* Tabs — the active tab is marked by an inset bottom rule, per the design. The
   tabs are plain links to per-tab URLs now (the JS-switched tablist is gone),
   so the active one is the page you're on, marked by aria-current="page".
   text-decoration/hover are restated because these are <a> elements and would
   otherwise pick up the global green link styles. */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 9px 14px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-500);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover {
  color: var(--ink-900);
}
.tab[aria-current="page"] {
  color: var(--ink-900);
  box-shadow: inset 0 -2px 0 0 var(--ink-900);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.stat .label {
  margin: 0;
  font-size: 12px;
  color: var(--muted-foreground);
}
.stat .value {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat .sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted-foreground);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.panel-head .note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}
.panel p.hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted-foreground);
}
/* Danger zone — the one destructive panel, on a site's Settings tab. A red
   edge and heading mark it before a word is read; the button keeps the
   standard .btn-danger treatment. */
.panel-danger {
  border-color: color-mix(in oklab, var(--destructive) 40%, transparent);
}
.panel-danger .panel-head h2 {
  color: var(--destructive);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}
.row .input {
  flex: 1;
  width: auto;
  min-width: 220px;
}

/* Empty chart frame — the design's "no traffic yet" state. */
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  padding: 0 16px;
}
.chart-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Domain rows (default subdomain). */
.domain-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.domain-row .id {
  flex: 1;
  min-width: 0;
}
.domain-row .name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-row .note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

/* Subdomain rename — the Domain panel's editable half on site Settings. The
   form reuses the Rename panel's .row rhythm (flex, gap, wrap); these rules
   only add the vertical spacing that separates the controls from the
   read-only .domain-row above. The .panel p.* selectors exactly tie
   .panel p.hint's specificity, and this block comes later in the file, so the
   top margins here win without touching the base hint rule. */
.panel form.subdomain-form {
  margin-top: 14px;
}
.panel p.subdomain-foot {
  margin-top: 10px;
}
.panel p.subdomain-state {
  margin-top: 14px;
}
/* Inline refusal under the row (taken / invalid / throttled / forbidden).
   Plain colored text, same convention as .status.error — no box, no icon. */
.panel p.subdomain-error {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--destructive-subtle-foreground);
}

/* Custom domains — the Domain panel's second subsection on site Settings.
   The status chips reuse the existing badge palette (badge-live /
   badge-warn / badge-danger / the neutral default) — no new colors here,
   only the spacing that separates the subsection from the rename controls
   above and stacks the per-domain cards. The one new class below reuses the
   global kanPulse keyframe so a provisioning row reads as in motion. */
.panel .custom-domains-head {
  margin-top: 20px;
}
.custom-domains .domain-row + .domain-row {
  margin-top: 10px;
}
.custom-domains .domain-row form {
  flex: none;
}
.panel form.custom-domains-form {
  margin-top: 14px;
}
/* The one new chip variant: "provisioning" is the neutral badge whose dot
   pulses (the global kanPulse keyframe) to read as in-motion. */
.badge-provisioning .dot {
  animation: kanPulse 1.6s ease-in-out infinite;
}

/* MCP landing (/mcp) — implements the "MCP landing" design (claude.ai/design,
   Kan.fyi project). Layout and phase choreography only: every color, radius,
   shadow and ease is a token from the block at the top of this file. The
   mcpl- prefix keeps it from colliding with app chrome; .mcp-clients and
   .mcp-note survive from the previous page because app.js's client switcher
   and web/mcp_copy_test.go's snippet contract both key on that markup. */
.mcp-clients {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mcp-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
}
.mcpl-main {
  /* flex: 1 is the sticky-footer invariant .app-main also carries: body is a
     flex column, and without it a short page leaves the footer mid-screen. */
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.mcpl-main h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.mcpl-section {
  display: flex;
  flex-direction: column;
  gap: 26px;
  scroll-margin-top: 80px;
}
.mcpl-sub {
  margin: -16px 0 0;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-600);
  text-wrap: pretty;
}
.mcpl-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.mcpl-fineprint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-500);
}
.mcpl-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--amber-500);
  flex: none;
}
.mcpl-dot-green {
  background: var(--green-500);
}
.mcpl-dot-amber {
  background: var(--amber-500);
}
.mcpl-dot-red {
  background: var(--red-500);
}
.mcpl-dot-ink {
  background: var(--ink-500);
}
.mcpl-dot-sky {
  background: var(--sky-600);
}
.mcpl-pulse {
  animation: kanPulse 1.7s ease-in-out infinite;
}

/* Hero */
.mcpl-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 56px;
  padding-top: 64px;
}
.mcpl-hero-copy {
  flex: 1 1 380px;
  min-width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
.mcpl-hero-copy h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink-900);
}
.mcpl-lede {
  margin: 0;
  max-width: 430px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-800);
  text-wrap: pretty;
}
.mcpl-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mcpl-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-800);
}
.mcpl-live-word {
  font-size: 12px;
  font-weight: 700;
  color: var(--green-700);
}
.mcpl-works-with {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.mcpl-works-with .mcpl-eyebrow {
  margin-right: 4px;
}
.mcpl-client-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-600);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  white-space: nowrap;
}

/* Hero demo — the chat that becomes a site. All phase styling keys off the
   [data-hero] container's data-phase (0 typing, 1 publishing, 2 live), which
   web/static/mcp.js drives; the markup ships at phase 2 so no-JS renders the
   finished story. */
.mcpl-hero-demo {
  position: relative;
  flex: 1 1 360px;
  max-width: 470px;
  margin: 20px 10px 104px 0;
}
.mcpl-blob {
  position: absolute;
  top: -32px;
  right: -22px;
  width: 130px;
  height: 130px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
}
.mcpl-fleck {
  position: absolute;
  top: -42px;
  right: 120px;
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
}
.mcpl-chat-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mcpl-replay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out);
}
.mcpl-replay:hover {
  background: var(--paper-100);
  color: var(--ink-800);
}
/* The button ships with the hidden attribute and only mcp.js — the sole owner
   of its behavior — unhides it, so no-JS visitors never see a dead control and
   reduced-motion visitors never tab into an invisible one. The class sets
   display, which would defeat the UA's [hidden] rule without this guard. */
.mcpl-replay[hidden] {
  display: none;
}
[data-hero][data-phase="2"] .mcpl-replay {
  opacity: 1;
  pointer-events: auto;
}
.mcpl-bubble {
  align-self: flex-end;
  max-width: 88%;
  background: var(--ink-900);
  color: var(--paper-50);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.55;
  min-height: 66px;
}
.mcpl-caret {
  display: none;
  width: 2px;
  height: 15px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--amber-400);
  animation: kanBlink 1s step-end infinite;
}
[data-hero][data-phase="0"] .mcpl-caret {
  display: inline-block;
}
@keyframes kanBlink {
  0%,
  55% {
    opacity: 1;
  }
  56%,
  100% {
    opacity: 0;
  }
}
.mcpl-tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
[data-hero][data-phase="0"] .mcpl-tool-row {
  opacity: 0;
  transform: translateY(8px);
}
.mcpl-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: var(--radius-xs);
  background: var(--paper-100);
  border: 1px solid var(--paper-200);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
}
[data-hero-dot] {
  background: var(--green-500);
  transition: background var(--duration-slow);
}
[data-hero][data-phase="0"] [data-hero-dot],
[data-hero][data-phase="1"] [data-hero-dot] {
  background: var(--amber-500);
}
.mcpl-tool-caption {
  font-size: 12.5px;
  color: var(--ink-500);
}
.mcpl-tool-caption [data-when="publishing"] {
  display: none;
}
[data-hero][data-phase="1"] .mcpl-tool-caption [data-when="publishing"] {
  display: inline;
}
[data-hero][data-phase="0"] .mcpl-tool-caption [data-when="done"],
[data-hero][data-phase="1"] .mcpl-tool-caption [data-when="done"] {
  display: none;
}
.mcpl-live-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
}
[data-hero]:not([data-phase="2"]) .mcpl-live-row {
  opacity: 0;
  transform: translateY(8px);
}
.mcpl-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-800);
}
.mcpl-live-url {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-700);
}
.mcpl-site-card-wrap {
  position: absolute;
  right: -12px;
  bottom: -92px;
  transform: rotate(2deg);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
[data-hero]:not([data-phase="2"]) .mcpl-site-card-wrap {
  opacity: 0;
  transform: rotate(2deg) scale(0.95);
}
.mcpl-site-card {
  width: 216px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: kanFloat 8s ease-in-out infinite;
}
.mcpl-skel {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--paper-200);
}
.mcpl-skel-a {
  width: 62%;
  background: var(--paper-300);
}
.mcpl-skel-b {
  width: 88%;
}
.mcpl-skel-c {
  width: 47%;
}
.mcpl-url-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-100);
  font-size: 11px;
  color: var(--ink-800);
}
.mcpl-url-pill .mcpl-dot {
  width: 6px;
  height: 6px;
}

/* Connect steps */
.mcpl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 680px;
}
.mcpl-steps > li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
}
.mcpl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 800;
}
.mcpl-step-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 5px;
  min-width: 0;
}
.mcpl-step-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.mcpl-step-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-600);
}
.mcpl-step-text strong {
  font-weight: 600;
  color: var(--ink-800);
}
.mcpl-token-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--paper-100);
  border: 1px solid var(--paper-200);
  font-size: 12.5px;
  color: var(--ink-800);
}
.mcpl-step-body .try-saying {
  max-width: 520px;
}

/* Verdict + tool tables */
.mcpl-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.mcpl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 18px;
  padding: 16px 20px;
}
.mcpl-row + .mcpl-row {
  border-top: 1px solid var(--border);
}
.mcpl-row > p {
  margin: 0;
  flex: 1;
  min-width: 230px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-600);
}
.mcpl-cell-key {
  flex: 0 0 132px;
}
#tools .mcpl-cell-key {
  flex-basis: 196px;
}
.mcpl-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}
.mcpl-verdict .mcpl-dot {
  width: 8px;
  height: 8px;
}
.mcpl-verdict-live {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
}
.mcpl-verdict-held {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  color: var(--amber-700);
}
.mcpl-verdict-failed {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  color: var(--red-700);
}
.mcpl-verdict-unpublished {
  background: var(--paper-100);
  border: 1px solid var(--paper-300);
  color: var(--ink-800);
}
.mcpl-verdict-pending {
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  color: var(--sky-700);
}
.mcpl-reason {
  font-size: 12.5px;
  color: var(--red-700);
}
.mcpl-tool-name {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--paper-100);
  border: 1px solid var(--paper-200);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
}

/* Two doors */
.mcpl-doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.mcpl-door {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mcpl-door-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mcpl-door-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-600);
}
.mcpl-flow {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcpl-flow-step {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
.mcpl-flow-step > p {
  margin: 0;
  flex: 1;
  min-width: 180px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-800);
}
.mcpl-flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--paper-100);
  color: var(--ink-800);
  flex: none;
}
.mcpl-flow-arrow {
  width: 2px;
  height: 12px;
  margin-left: 14px;
  border-radius: 1px;
  background: var(--paper-300);
}
.mcpl-flow-end {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-700);
}
.mcpl-flow-end .mcpl-dot {
  margin-left: 12px;
}
.mcpl-door-caps {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mcpl-cap {
  font-size: 11.5px;
  color: var(--ink-600);
  background: var(--paper-100);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
}

/* Limits */
.mcpl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.mcpl-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mcpl-stat-num {
  font-variant-numeric: tabular-nums;
  font-size: 25px;
  font-weight: 800;
  color: var(--ink-900);
}
.mcpl-stat-label {
  font-size: 13px;
  color: var(--ink-600);
}
#limits .mcpl-fineprint {
  font-size: 13px;
}

/* FAQ */
.mcpl-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 32px;
  max-width: 960px;
}
.mcpl-q {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.mcpl-a {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-600);
}

/* Closing CTA */
.mcpl-cta {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  border-radius: 32px;
  padding: 60px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.mcpl-cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  color: var(--paper-50);
}
.mcpl-cta > p {
  margin: 0;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper-300);
  text-wrap: pretty;
}
.mcpl-cta .btn {
  margin-top: 6px;
}
.mcpl-blob-cta {
  top: auto;
  right: -52px;
  bottom: -64px;
  width: 190px;
  height: 190px;
}
.mcpl-fleck-cta {
  top: auto;
  right: 150px;
  bottom: 36px;
  width: 10px;
  height: 10px;
  background: var(--paper-50);
}
.mcpl-cta-url {
  font-size: 12.5px;
  color: var(--amber-400);
}

.try-saying {
  background: var(--amber-400);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.try-saying .eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-800);
}
.try-saying .quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-900);
}
.try-saying .result {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green-800);
}

/* ── 8. Overlays ────────────────────────────────────────────────────────────*/
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--ink-900) 45%, transparent);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dialog {
  width: 100%;
  max-width: var(--container-dialog);
  background: var(--card);
  border: none;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: kanDialogIn var(--duration-base) var(--ease-out);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.dialog-head .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
}
.dialog-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.dialog-text + .dialog-text {
  margin-top: -6px;
}
.dialog-text strong,
.dialog-text code {
  color: var(--foreground);
  font-weight: 700;
}
/* Choice row: primary first, wrapping to full width on narrow screens rather
   than letting three pill buttons overflow the dialog. */
.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dialog-actions .btn {
  flex: 1 1 auto;
}

/* "From your AI" row at the bottom of the New site dialog. */
.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: var(--font-sans);
  color: var(--foreground);
  transition: background var(--duration-fast) var(--ease-standard);
}
.option-row:hover {
  background: var(--muted);
  color: var(--foreground);
}
.option-row:active {
  transform: translateY(1px);
}
.option-row .body {
  flex: 1;
}
.option-row .title {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.option-row .sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Full-page drop target on the landing screen. */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: color-mix(in oklab, var(--amber-400) 88%, transparent);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.drag-overlay .inner {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 2.5px dashed var(--ink-900);
  border-radius: 28px;
  padding: 56px 72px;
  text-align: center;
  max-width: 520px;
}
.drag-overlay h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
.drag-overlay p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-800);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-900);
  color: var(--paper-50);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  animation: kanToastIn var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

/* Background-upload pill, bottom right. */
.upload-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ink-900);
  color: var(--paper-50);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-xl);
  width: 250px;
}
.upload-pill .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.upload-pill .name {
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-pill .pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-300);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.upload-pill .progress {
  height: 4px;
  background: color-mix(in oklab, white 14%, transparent);
}
.upload-pill .caption {
  font-size: 11px;
  color: var(--paper-300);
}

/* ── 9. Auth ────────────────────────────────────────────────────────────────*/
.auth-screen {
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper-50);
}
.auth-card {
  width: 100%;
  max-width: var(--container-auth);
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}
.auth-card > * {
  position: relative;
}
.auth-card .blob-corner {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 104px;
  height: 104px;
  border-radius: var(--radius-pill);
  background: var(--amber-400);
}
.auth-card .blob-dot {
  position: absolute;
  top: 24px;
  right: 22px;
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
}
.auth-card .mark {
  height: 40px;
  display: block;
  margin: 0 auto;
}
.auth-card h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.auth-card .sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted-foreground);
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.auth-card .cf-turnstile {
  display: flex;
  justify-content: center;
}
.auth-back {
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-500);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.auth-back:hover {
  color: var(--ink-900);
}
/* Page-level banner (e.g. "no index.html — this link will 404"). Wider and more
   explanatory than .notice, which is a one-liner inside a card. */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.5;
}
.banner-icon {
  display: flex;
  flex: none;
  margin-top: 1px;
}
.banner-body {
  min-width: 0;
}
.banner-body p {
  margin: 0;
}
.banner-body p + p {
  margin-top: 6px;
}
.banner-title {
  font-weight: 800;
}
.banner code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-radius: var(--radius-xs);
  padding: 1px 5px;
  background: color-mix(in oklab, var(--ink-900) 8%, transparent);
}
.banner-warn {
  background: var(--warning-subtle);
  border: 1px solid var(--amber-200);
  color: var(--amber-700);
}
.banner-warn a {
  color: inherit;
}
/* Success tone — the subdomain-rename confirmation on site Settings is the
   one server-rendered success the detail page shows. Green mirrors the
   "live" badge family, matching how the rename leaves the site: still live,
   at a new address. */
.banner-ok {
  background: var(--success-subtle);
  border: 1px solid var(--green-200);
  color: var(--success-subtle-foreground);
}
/* Inside .stack the flex gap already separates children; the rename-success
   banner's own bottom margin would double it. Scoped to .banner-ok only — the
   pre-existing banner-warn banners (purge-failed, held-site) keep their default
   margin. */
.stack > .banner-ok {
  margin-bottom: 0;
}
.banner-body ul {
  margin: 8px 0;
  padding-left: 18px;
}
.banner-body li {
  font-size: 12.5px;
  line-height: 1.5;
}

/* Inline notice inside the auth card (e.g. a pending upload). */
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amber-700);
}
.notice svg {
  flex: none;
}

/* ── 10. Reduced motion ─────────────────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Small screens: the hero art is decorative and its absolute layout does not
   reflow, so it is dropped rather than allowed to overlap the copy. */
@media (max-width: 720px) {
  .hero-art,
  .cta-art {
    display: none;
  }
  .app-header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .app-header .spacer {
    flex-basis: 100%;
    height: 0;
  }
  /* The wrap above makes the signed-in header two rows tall, so the legal
     pages' jump anchors need to clear that much instead of the ~62px assumed
     by the base .legal section[id] rule. Verified in a browser: without this,
     clicking "Read this page in English" while signed in lands with the
     "Terms of Service" heading hidden behind the bar. */
  .legal section[id] {
    scroll-margin-top: 140px;
  }
}

/* ---------------------------------------------------------------------------
   Visibility (the share axis)

   Visibility is orthogonal to status, so its badges are a SEPARATE family from
   .badge-live/.badge-warn/.badge-danger rather than extra values in that set —
   a site wears one of each at once and the two must stay visually distinct.
   Colours follow the design's role map: public reads as live (jade), link-only
   as informational (sky), private as the solid ink chip, draft as neutral.
   --------------------------------------------------------------------------- */
.badge-public {
  background: var(--success-subtle);
  color: var(--success-subtle-foreground);
}
.badge-link {
  background: var(--info-subtle);
  color: var(--info-subtle-foreground);
}
.badge-private {
  background: var(--ink-900);
  color: var(--paper-50);
}
.badge-draft {
  background: var(--paper-100);
  color: var(--ink-600);
}

/* Sites-list filter. Plain links, not .chip — that class is the mono "works
   with" pill and these are sans-serif navigation. */
.vis-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.vis-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.vis-chip:hover {
  background: var(--muted);
  color: var(--foreground);
}
.vis-chip.is-selected {
  background: var(--ink-900);
  border-color: transparent;
  color: var(--paper-50);
}
.vis-chip-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
  font-weight: 500;
}

/* The "Who can see this?" chooser. Radios are visually replaced by the card,
   but kept in the DOM and focusable — the whole control is a native fieldset so
   it works without JavaScript, which the dashboard does not have a framework
   for anyway. */
.vis-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vis-options {
  display: grid;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
}
.vis-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
}
.vis-option:hover {
  background: var(--muted);
}
.vis-option.is-selected {
  border-color: var(--ink-900);
  background: var(--amber-50, var(--muted));
  box-shadow: inset 0 0 0 1px var(--ink-900);
}
.vis-option input[type="radio"] {
  margin: 3px 0 0;
  accent-color: var(--ink-900);
  flex: none;
}
.vis-option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vis-option-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--foreground);
}
.vis-option-sub {
  font-size: 13px;
  color: var(--muted-foreground);
}
.vis-option-crawl {
  font-size: 12px;
  color: var(--ink-500, var(--muted-foreground));
}
.vis-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* "How it's served" disclosure. It shows the literal bytes the platform sends,
   so it is monospaced and must not wrap in a way that changes them. */
.vis-served {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.vis-served summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.vis-served dl {
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.vis-served dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-foreground);
}
.vis-served dd {
  margin: 4px 0 0;
}
.vis-served pre {
  margin: 0;
  padding: 10px 12px;
  background: var(--paper-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-600);
  overflow-x: auto;
  white-space: pre;
}

/* Settings — two columns: sticky section nav left, cards right. The nav
   collapses to a horizontal row on narrow screens, same breakpoint as the
   detail page. */
.settings-head {
  margin-bottom: 18px;
}
.page-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted-foreground);
}
.settings-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-600);
  text-decoration: none;
  white-space: nowrap;
}
.settings-nav a:hover {
  background: var(--muted);
  color: var(--ink-900);
}
.settings-nav a[aria-current="page"] {
  background: var(--paper-100);
  color: var(--ink-900);
}
.settings-nav svg {
  flex: none;
}
.settings-body {
  min-width: 0;
}
@media (max-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .settings-nav {
    position: static;
    flex-direction: row;
  }
}

/* Account tab. */
.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  min-width: 0;
}
.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}
.profile-row .name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.profile-row .email {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-500);
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600);
}
.email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--paper-100);
  border: 1px solid var(--border);
  padding: 0 8px 0 16px;
  font-size: 13px;
  color: var(--ink-600);
  min-width: 0;
}
.email-row .mono {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-row .badge {
  margin-left: auto;
  flex: none;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
}
.beta-band {
  background: var(--amber-400);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.beta-band .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-800);
}
.beta-band p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-900);
}
.beta-band .mono {
  font-size: 12.5px;
  color: var(--ink-800);
}

/* Access tokens tab. */
.tokens-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.tokens-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.tokens-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.tokens-title .count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.tokens-head .hint {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted-foreground);
}
.token-glyph {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--paper-100);
  border: 1px solid var(--border);
  color: var(--ink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dialog-text.warn {
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 600;
  color: var(--amber-700);
}

/* Visually hidden but announced — used for the fieldset legends above, which
   are redundant next to the panel heading for sighted users but are the only
   grouping label a screen reader gets. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===========================================================================
   11. Admin console (app.kan.fyi/admin/reports)
   ---------------------------------------------------------------------------
   Ported from the design project's `Admin console v2.dc.html` +
   `admin-console.css`. The prototype styles inline; the CSP is
   `style-src 'self'`, so every rule lives here as a class.

   Two deliberate departures from the designer's port sheet:
     · Its .dlg/.dlg-title/.dlg-body/.dlg-foot are dropped — this app already
       has .dialog/.dialog-head/.dialog-text/.dialog-actions with a focus trap
       in app.js. Only the genuinely new dialog pieces are kept below.
     · Its .stat-card / .aq-row are <button onClick>; here they are anchors
       (?f=, ?sel=) so filtering and selection work with no JavaScript.
   No new tokens beyond --accent-subtle (added in the token block above).
   =========================================================================== */

/* ── Shell ───────────────────────────────────────────────────────────────── */

/* The console's <body>. .aq-main claims the leftover height (flex: 1) so a
   short queue still pins the footer text to the bottom rather than leaving the
   page floating mid-viewport. */
.adm-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
}

/* .spacer is defined elsewhere only as `.app-header .spacer` / `.site-card-meta
   .spacer`, so it does nothing inside these containers on its own. Without this
   every right-aligned element on the console — the relative timestamp, the
   uploads pill, the dialog buttons — collapses to the left. */
.kill-banner-in .spacer,
.aq-head .spacer,
.aq-line .spacer,
.aq-dhead .spacer,
.aq-dsite .spacer,
.aq-buttons .spacer,
.dialog-actions .spacer { flex: 1; }

.adm-header-in { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.adm-logo { height: 24px; width: auto; display: block; }
.adm-pill {
  display: inline-flex; align-items: center;
  background: var(--ink-900); color: var(--paper-50);
  border-radius: var(--radius-pill); padding: 3px 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
}
.adm-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--amber-400); color: var(--ink-900);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: none;
}

/* Kill switch — engaged: full-bleed strip under the header */
.kill-banner { background: var(--amber-400); color: var(--ink-900); }
.kill-banner-in { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kill-title { font-size: 13.5px; font-weight: 800; color: var(--ink-900); }
.kill-sub { font-size: 13px; color: var(--ink-800); }
.kill-flag { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-800); }

/* Kill switch — ambient pill, always visible in the title row */
.uploads-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card);
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-600);
}
.uploads-pill .uploads-dot {
  width: 7px; height: 7px; border-radius: var(--radius-pill);
  background: var(--green-500); animation: kanPulse 2s ease-in-out infinite; flex: none;
}
.uploads-pill-off { border-color: transparent; background: var(--amber-400); color: var(--ink-900); font-weight: 600; }
.uploads-pill-off .uploads-dot { background: var(--ink-900); animation-duration: 1.6s; }

/* ── Primitives — additions ──────────────────────────────────────────────── */
.badge-open { background: var(--info-subtle); color: var(--info-subtle-foreground); }
.badge-open .dot { background: var(--sky-600); animation: kanPulse 1.6s ease-in-out infinite; }
.badge-hold { background: var(--ink-900); color: var(--paper-50); }
/* .badge .dot defaults to the pale --paper-400 "not live yet, same as a Draft"
   fill, which is deliberate where .badge-warn means Coming soon. On the abuse
   queue it means DISABLED, an action someone took, so it gets a real amber dot
   — scoped to the console so the marketing usage keeps its neutral read. */
.adm-root .badge-warn .dot { background: var(--amber-600); }

/* Filter-card dots */
.dot-all { background: var(--ink-400); }
.dot-open { background: var(--sky-600); animation: kanPulse 1.6s ease-in-out infinite; }
.dot-warn { background: var(--amber-500); }
.dot-danger { background: var(--red-600); }

/* Reporter provenance chips — the three kinds must never look alike */
.reporter {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11px; white-space: nowrap; flex: none;
}
.reporter-public { border: 1px solid var(--border); background: var(--card); color: var(--ink-600); }
.reporter-system { background: var(--info-subtle); color: var(--info-subtle-foreground); }
.reporter-admin {
  background: var(--accent-subtle); color: var(--ink-800);
  font-family: var(--font-sans); font-weight: 700; padding-left: 3px;
}
.reporter-admin .avatar-dot {
  width: 14px; height: 14px; border-radius: var(--radius-pill);
  background: var(--amber-400); color: var(--ink-900);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 800; flex: none;
}

/* Attacker-controlled free text — always contained, never system copy */
.hostile-text {
  background: var(--paper-100); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  color: var(--ink-800); white-space: pre-wrap; word-break: break-word;
}
.aq-preview {
  margin: 0; flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Destructive buttons (44px — phone hit target) */
.btn-approve { height: 44px; padding: 0 18px; border: 1px solid var(--input); background: var(--card); color: var(--green-700); font-weight: 700; }
.btn-approve:hover { background: var(--green-50); }
.btn-danger { height: 44px; padding: 0 20px; background: var(--red-600); color: var(--white); border-color: transparent; font-weight: 700; }
.btn-danger:hover { background: var(--red-700); }
.btn-danger-outline {
  height: 44px; padding: 0 18px; gap: 7px;
  border: 1px solid color-mix(in oklab, var(--red-500) 40%, transparent);
  background: var(--card); color: var(--red-700); font-weight: 700;
}
.btn-danger-outline:hover { background: var(--red-50); }
.btn-danger-deep { height: 44px; padding: 0 20px; gap: 7px; background: var(--red-700); color: var(--white); border-color: transparent; font-weight: 700; }
.btn-danger-deep:hover { background: var(--red-600); }

/* Typed-confirm input (mono variant of .input) */
.arm-field {
  height: 42px; width: 100%; border-radius: var(--radius-pill);
  border: 1px solid var(--input); background: var(--card); padding: 0 16px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  color: var(--foreground); outline: none;
}
.arm-field:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 22%, transparent);
}

/* Attestation row (release-hold dialog) */
.attest {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer;
}
.attest-box { width: 16px; height: 16px; accent-color: var(--ink-900); margin: 2px 0 0; flex: none; }
.attest-text { font-size: 13px; line-height: 1.5; color: var(--ink-800); }

/* Evidence reference row — refs only, never media */
.evidence-ref { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ev-tag { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.04em; flex: none; }
.ev-val { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Screen — abuse queue (master–detail) ────────────────────────────────── */
.aq-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 20px 72px; }
.aq-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.aq-h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.015em; }
.aq-count { font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); }

/* Count cards — anchors that double as the queue filter */
.aq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.stat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--card); text-align: left; text-decoration: none;
  font-family: var(--font-sans); box-shadow: var(--shadow-xs);
  transition: background var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.stat-card:hover { box-shadow: var(--shadow-lift); }
.stat-card-sel { background: var(--ink-900); border-color: transparent; }
.stat-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.stat-card-sel .stat-label { color: var(--paper-300); }
.stat-num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-900); }
.stat-card-sel .stat-num { color: var(--paper-50); }
.stat-label .dot { width: 7px; height: 7px; border-radius: var(--radius-pill); flex: none; }

/* Two panes: list left, sticky detail right; one column when narrow */
.aq-layout { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.aq-listpane { flex: 1 1 340px; min-width: 0; }
.aq-detailpane {
  flex: 1.4 1 420px; min-width: 0;
  position: sticky; top: 74px; align-self: flex-start;
  max-height: calc(100vh - 96px); overflow: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-xs); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}

.aq-list { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-xs); overflow: hidden; }
.aq-row {
  border-top: 1px solid var(--border); border-left: 3px solid transparent;
  padding: 12px 14px 12px 11px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 6px;
}
.aq-row:first-child { border-top: none; }
.aq-row:hover { background: var(--paper-50); }
.aq-row-sel { border-left-color: var(--ink-900); background: var(--paper-100); }
.aq-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq-subline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aq-site { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink-900); }
.aq-site-lg { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 19px; font-weight: 700; color: var(--ink-900); }
.aq-live-dot { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--green-500); animation: kanPulse 1.6s ease-in-out infinite; flex: none; }
.aq-vault-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-400); white-space: nowrap; }
.aq-time { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); white-space: nowrap; }

.aq-dhead, .aq-dsite { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.aq-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.aq-meta-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aq-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-400); }
/* overflow-wrap, not the default: an admin reporter is a 26-char ULID with no
   break opportunity, so the Reporter cell ran straight over the Site cell
   beside it. min-width:0 above is the other half — a grid item defaults to
   min-content width and will not shrink without it. */
.aq-val { font-size: 12.5px; color: var(--ink-800); overflow-wrap: anywhere; min-width: 0; }
.aq-val-live { font-weight: 700; color: var(--green-700); }
.aq-open-link { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--green-700); }
.aq-reason, .aq-evidence { display: flex; flex-direction: column; gap: 6px; }
.aq-act { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.aq-noterow { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.aq-note { flex: 1; min-width: 0; }
.aq-noterow .btn { flex: none; }
.aq-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq-actdiv { width: 1px; height: 24px; background: var(--border); flex: none; }
.aq-audit-cap { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); }
/* Shown in place of the action buttons when the record's site id is malformed
   (a pre-validation /report row), and in place of Approve while a legal hold
   stands. Both are deliberately inert text, not disabled buttons: a disabled
   button invites hunting for the way to enable it. */
.aq-badsite { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-600); }

/* A resolved record is history, not a task. It stays in the list — the queue is
   an append-only audit trail and hiding rows would lose that — but it must not
   read as something still waiting, which is exactly how an approved-but-still-
   "held by scan" row read before this existed. */
.aq-row-done { opacity: 0.55; }
.aq-row-done:hover { opacity: 1; }
.aq-done-tag {
  font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap;
  color: var(--green-700); background: var(--success-subtle);
  border-radius: var(--radius-pill); padding: 1px 7px; flex: none;
}
.aq-done-banner {
  margin: 0; padding: 9px 12px; border-radius: 12px;
  background: var(--success-subtle); color: var(--green-800);
  font-size: 12.5px; line-height: 1.55;
}
.aq-approve-blocked {
  display: inline-flex; align-items: center; height: 44px; padding: 0 14px;
  border-radius: var(--radius-pill); background: var(--muted);
  font-size: 12.5px; font-weight: 600; color: var(--ink-500);
}
.aq-foot { margin: 10px 4px 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-400); }
.aq-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 72px 24px; text-align: center; }
.aq-empty-icon { width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; }
.aq-empty-title { margin: 6px 0 0; font-size: 16px; font-weight: 800; }
.aq-empty-sub { margin: 0; font-size: 13.5px; color: var(--muted-foreground); }

/* ── Overlays — dialog additions ─────────────────────────────────────────── */
.dlg-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-600); margin-bottom: 3px; }
.dlg-mono { font-family: var(--font-mono); }
.dlg-req { font-weight: 400; color: var(--ink-400); }
.dlg-stats { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-500); }
.dlg-cross {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  border: 1px dashed color-mix(in oklab, var(--red-500) 35%, transparent);
  border-radius: 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-800);
}
.dlg-cross svg { color: var(--red-600); flex: none; margin-top: 1px; }
/* The endpoint caption sits on its own line above the buttons, not inline with
   them as the prototype had it: the real routes carry the site id
   (/admin/sites/k3f9x2a/ban-csam) and are far longer than the mock /admin/ban,
   so inline they wrapped the row and threw the submit button onto its own
   full-width line. */
.dlg-endpoint { display: block; margin: 0; font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); word-break: break-all; }
/* Buttons keep their natural width here so .spacer can right-align them; the
   shared .dialog-actions .btn rule stretches them to fill instead. */
.adm-root .dialog-actions { align-items: center; }
.adm-root .dialog-actions .btn { flex: none; }

/* ── Mobile — abuse reports arrive when you are away from a desk ─────────── */
@media (max-width: 560px) {
  .aq-main { padding: 20px 14px 64px; }
  .aq-stats { grid-template-columns: 1fr 1fr; }
  .aq-detailpane { position: static; max-height: none; }
  .aq-meta { grid-template-columns: 1fr 1fr; }
  .aq-buttons .btn { flex: 1 1 auto; }
  .aq-noterow { flex-wrap: wrap; }
  .aq-actdiv { display: none; }
}
