/* KillTheCut — Design Overhaul Stylesheet
   Notion + Google product feel. Airier density. Indigo accent.
   Generated from Claude Design handoff (tokens + shared + landing). */

/* ============== TOKENS ============== */
:root {
  /* Color: neutrals (cool off-white base) */
  --color-bg: #FBFBFA;
  --color-bg-elevated: #FFFFFF;
  --color-bg-subtle: #F5F5F4;
  --color-bg-muted: #EEEEED;
  --color-bg-hover: #F0F0EF;

  --color-border: #E5E5E3;
  --color-border-strong: #D4D4D2;
  --color-border-subtle: #EFEFED;

  --color-ink: #1F1F1E;
  --color-ink-secondary: #4A4A48;
  --color-ink-tertiary: #767672;
  --color-ink-quaternary: #A8A8A4;
  --color-ink-disabled: #C4C4C0;

  /* Color: accent (muted indigo) */
  --color-accent: oklch(0.52 0.13 268);
  --color-accent-hover: oklch(0.46 0.14 268);
  --color-accent-active: oklch(0.42 0.14 268);
  --color-accent-bg: oklch(0.96 0.02 268);
  --color-accent-bg-hover: oklch(0.93 0.03 268);
  --color-accent-border: oklch(0.85 0.05 268);
  --color-accent-text: oklch(0.42 0.13 268);

  /* Color: status */
  --color-success: oklch(0.55 0.12 155);
  --color-success-bg: oklch(0.96 0.025 155);
  --color-success-border: oklch(0.85 0.06 155);

  --color-warning: oklch(0.62 0.13 70);
  --color-warning-bg: oklch(0.97 0.03 80);
  --color-warning-border: oklch(0.85 0.07 75);

  --color-danger: oklch(0.55 0.18 25);
  --color-danger-bg: oklch(0.97 0.025 25);
  --color-danger-border: oklch(0.85 0.07 25);

  --color-info: oklch(0.55 0.11 230);
  --color-info-bg: oklch(0.97 0.02 230);
  --color-info-border: oklch(0.86 0.05 230);

  --color-neutral-bg: #F2F2F0;
  --color-neutral-border: #DCDCD9;
  --color-neutral-text: #4A4A48;

  /* Typography */
  --font-sans: "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 38px;
  --text-5xl: 48px;
  --text-6xl: 64px;
  --text-7xl: 80px;

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-caps: 0.08em;

  /* Spacing (4-based) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Radius */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 15, 14, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 15, 14, 0.06), 0 1px 2px rgba(15, 15, 14, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 15, 14, 0.06), 0 2px 4px rgba(15, 15, 14, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 15, 14, 0.08), 0 4px 8px rgba(15, 15, 14, 0.04);
  --shadow-popover: 0 4px 16px rgba(15, 15, 14, 0.08), 0 0 0 1px rgba(15, 15, 14, 0.04);

  --ring: 0 0 0 3px oklch(0.52 0.13 268 / 0.20);
  --ring-strong: 0 0 0 3px oklch(0.52 0.13 268 / 0.35);

  --container: 1200px;
  --container-narrow: 880px;
  --header-h: 60px;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; }

/* ============== TYPOGRAPHY UTILITIES ============== */
.h-display { font-size: var(--text-6xl); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.h-1 { font-size: var(--text-4xl); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.h-2 { font-size: var(--text-3xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.h-3 { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.h-4 { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.body-lg { font-size: var(--text-lg); line-height: 1.55; color: var(--color-ink-secondary); }
.body { font-size: var(--text-base); line-height: 1.5; color: var(--color-ink-secondary); }
.body-sm { font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-secondary); }
.meta { font-size: var(--text-sm); color: var(--color-ink-tertiary); }
.eyebrow { font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-ink-tertiary); }
.mono { font-family: var(--font-mono); font-size: 13px; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; user-select: none;
  transition: background 120ms, border-color 120ms, box-shadow 120ms;
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--color-ink); color: #fff; }
.btn-primary:hover { background: #000; }

.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-hover); }

.btn-secondary { background: var(--color-bg-elevated); border-color: var(--color-border); color: var(--color-ink); }
.btn-secondary:hover { background: var(--color-bg-hover); border-color: var(--color-border-strong); }

.btn-ghost { background: transparent; color: var(--color-ink-secondary); }
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-ink); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }

.btn-lg { height: 40px; padding: 0 18px; font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn-sm { height: 26px; padding: 0 8px; font-size: var(--text-xs); }
.btn-xs { height: 22px; padding: 0 6px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-icon { width: 28px; padding: 0; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* ============== INPUTS ============== */
.input, .select, .textarea {
  width: 100%; height: 32px;
  padding: 0 10px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-ink);
  transition: border-color 120ms, box-shadow 120ms;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--ring); }
.input::placeholder { color: var(--color-ink-quaternary); }
.textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; min-height: 80px; }
.input-lg { height: 40px; padding: 0 14px; font-size: var(--text-base); border-radius: var(--radius-lg); }

.input-search {
  background: var(--color-bg-elevated);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23767672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>");
  background-position: 10px center;
  background-repeat: no-repeat;
  padding-left: 32px;
}

.label { display: block; font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-secondary); margin-bottom: 6px; letter-spacing: 0.01em; }
.field { display: flex; flex-direction: column; gap: 4px; }
.help { font-size: var(--text-xs); color: var(--color-ink-tertiary); }

/* ============== BADGES ============== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 11.5px; font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--color-neutral-bg);
  border: 1px solid var(--color-neutral-border);
  color: var(--color-neutral-text);
  white-space: nowrap;
  letter-spacing: 0.005em;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge-success { background: var(--color-success-bg); border-color: var(--color-success-border); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); border-color: var(--color-warning-border); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); border-color: var(--color-danger-border); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); border-color: var(--color-info-border); color: var(--color-info); }
.badge-accent { background: var(--color-accent-bg); border-color: var(--color-accent-border); color: var(--color-accent-text); }
.badge-solid { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }

/* ============== CARDS ============== */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.card-padded { padding: var(--space-6); }
.card-hover { transition: border-color 120ms, box-shadow 120ms; cursor: pointer; }
.card-hover:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }

/* ============== TABLES ============== */
.table-wrap {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* Scroll a wide table horizontally instead of clipping its last
   * column (the action button got cut off at narrower widths under the
   * old `overflow: hidden`). Vertical overflow never happens — the wrap
   * auto-sizes to row height — so no spurious vertical scrollbar. */
  overflow-x: auto;
}
.table { width: 100%; }
.table th, .table td {
  text-align: left;
  padding: 10px 14px;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}
.table th {
  font-weight: 500;
  color: var(--color-ink-tertiary);
  font-size: var(--text-xs);
  background: var(--color-bg-subtle);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 80ms; }
.table tbody tr:hover { background: var(--color-bg-subtle); cursor: pointer; }
.table .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.table .mono-cell { font-family: var(--font-mono); font-size: 12.5px; color: var(--color-ink-secondary); }
/* Keep the booking window on one line — "1. Jan. – 31. Dez." was
 * wrapping into four lines in the narrow Window column. */
.table .inv-window-cell { white-space: nowrap; }

/* Inventory-title column: cap width + ellipsis the title text so a
 * 100-char listing doesn't push the rest of the row off-screen.
 * `min-width: 0` on the flex line lets the text child actually
 * shrink (default flex children don't shrink below their content). */
.table .inv-title-cell { max-width: 360px; }
.table .inv-title-cell .inv-title-line {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; min-width: 0;
}
.table .inv-title-cell .inv-title-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============== PUBLIC NAV / FOOTER ============== */
.public-nav {
  height: 64px;
  display: flex; align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(251, 251, 250, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.public-nav .nav-center { display: flex; gap: 4px; align-items: center; margin: 0 auto; }
.public-nav .nav-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.public-nav .brand-mark { width: 24px; height: 24px; font-size: 14px; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--color-ink);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 22px;
  background: var(--color-ink); color: #fff;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--color-ink-secondary);
  font-weight: 500;
}
.nav-link:hover { background: var(--color-bg-subtle); color: var(--color-ink); }
.nav-link.active { background: var(--color-bg-muted); color: var(--color-ink); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }

section { padding: 96px 0; }
.section-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-text); margin-bottom: 16px; }

.public-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  background: var(--color-bg);
}
.public-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; }
.public-footer h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-tertiary); margin-bottom: 12px; font-weight: 500; }
.public-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.public-footer a { font-size: 13px; color: var(--color-ink-secondary); }
.public-footer a:hover { color: var(--color-ink); }
.public-footer .copyright { padding-top: 32px; margin-top: 48px; border-top: 1px solid var(--color-border); font-size: 12px; color: var(--color-ink-tertiary); display: flex; justify-content: space-between; }

/* ============== UTILITIES ============== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.grow { flex: 1; }
.text-ink { color: var(--color-ink); }
.text-secondary { color: var(--color-ink-secondary); }
.text-tertiary { color: var(--color-ink-tertiary); }
.text-accent { color: var(--color-accent); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted-bg { background: var(--color-bg-subtle); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 10px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 12.5px; color: var(--color-ink-secondary);
  font-weight: 500;
}
.chip:hover { border-color: var(--color-border-strong); color: var(--color-ink); }
.chip.active { background: var(--color-accent-bg); border-color: var(--color-accent-border); color: var(--color-accent-text); }
.chip .x { color: var(--color-ink-quaternary); }
.chip .x:hover { color: var(--color-ink); }

.segmented {
  display: inline-flex;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}
.segmented button {
  height: 26px; padding: 0 10px;
  font-size: 12.5px; font-weight: 500;
  color: var(--color-ink-tertiary);
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 5px;
}
.segmented button:hover { color: var(--color-ink); }
.segmented button.active { background: var(--color-bg-elevated); color: var(--color-ink); box-shadow: var(--shadow-xs); }

.progress { height: 6px; background: var(--color-bg-muted); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--color-accent); border-radius: 999px; }

.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-bg-muted); color: var(--color-ink-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}

/* ============== LANDING PAGE ============== */
.hero { padding: 120px 0 64px; }
.hero h1 { font-size: clamp(48px, 6vw, 76px); letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; }
.hero .lede { font-size: 18px; line-height: 1.55; color: var(--color-ink-secondary); max-width: 560px; margin-top: 20px; }
.hero .ctas { display: flex; gap: 12px; margin-top: 32px; }
.hero .meta-row { display: flex; gap: 24px; margin-top: 40px; font-size: 13px; color: var(--color-ink-tertiary); flex-wrap: wrap; }
.hero .meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); }

.hero-a { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-mock {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 24px 64px -32px rgba(15, 15, 14, 0.18), 0 8px 16px -8px rgba(15, 15, 14, 0.06);
  overflow: hidden;
}
.hero-mock-bar { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--color-border); background: var(--color-bg-subtle); }
.hero-mock-bar .dot-r { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); }
.hero-mock-bar .url { margin-left: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--color-ink-tertiary); }
.hero-mock-toolbar { padding: 12px 16px; border-bottom: 1px solid var(--color-border-subtle); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stat-band { padding: 80px 0; background: var(--color-bg-subtle); border-top: 1px solid var(--color-border); }
.stat-band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stat-tile { text-align: center; }
.stat-tile .num { font-size: clamp(48px, 6.5vw, 84px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; color: var(--color-ink); font-feature-settings: "ss01", "cv11", "tnum"; }
.stat-tile .num.strike { text-decoration: line-through; color: var(--color-ink-tertiary); }
.stat-tile.featured .num { color: var(--color-accent); }
.stat-tile .label { font-size: 14px; color: var(--color-ink-secondary); margin-top: 12px; }

.why { padding: 96px 0; border-top: 1px solid var(--color-border); }
.why-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: start; }
.why h2 { font-size: 38px; letter-spacing: -0.025em; line-height: 1.15; max-width: 520px; }
.why .body-lg { margin-top: 16px; max-width: 460px; }
/* Dark inversion of the Why section. h2 stays white; body & eyebrow
 * use white at ~0.7 opacity for >=7:1 contrast on --color-ink. The
 * compare-cards sit on top as light "islands" — their own backgrounds
 * (--color-bg-elevated / --color-bg-subtle) already pop on dark. */
.why.dark { background: var(--color-ink); border-top: none; }
.why.dark h2 { color: #ffffff; }
.why.dark .eyebrow { color: rgba(255, 255, 255, 0.6); }
.why.dark .body-lg { color: rgba(255, 255, 255, 0.72); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-card { border: 1px solid var(--color-border); background: var(--color-bg-elevated); border-radius: 10px; padding: 20px; }
.compare-card.bad { background: var(--color-bg-subtle); }
.compare-card h4 { font-size: 13px; font-weight: 500; color: var(--color-ink-tertiary); margin-bottom: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.compare-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.compare-card li { display: flex; gap: 10px; color: var(--color-ink-secondary); }
.compare-card li::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; border-radius: 50%; }
.compare-card.bad li::before { background: var(--color-bg-muted); border: 1px solid var(--color-border-strong); }
.compare-card.good li::before { background: var(--color-accent); }

.how { padding: 96px 0; background: var(--color-bg-subtle); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.how-card { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 10px; padding: 24px; }
.how-card .num { font-family: var(--font-mono); font-size: 12px; color: var(--color-ink-tertiary); }
.how-card h3 { font-size: 18px; margin-top: 16px; letter-spacing: -0.01em; }
.how-card p { font-size: 14px; color: var(--color-ink-secondary); margin-top: 8px; line-height: 1.55; }
.how-card .preview { margin-top: 20px; padding: 12px; background: var(--color-bg-subtle); border-radius: 8px; border: 1px solid var(--color-border-subtle); }

.preview-section { padding: 96px 0; }
.preview-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.preview-head h2 { font-size: 32px; letter-spacing: -0.022em; }
.preview-head p { color: var(--color-ink-tertiary); font-size: 14px; margin-top: 8px; }

.proof { padding: 80px 0; border-top: 1px solid var(--color-border); }
.quote-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.quote { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 10px; padding: 28px; }
.quote p { font-size: 18px; line-height: 1.5; color: var(--color-ink); letter-spacing: -0.005em; }
.quote .who { display: flex; gap: 10px; align-items: center; margin-top: 24px; font-size: 13px; color: var(--color-ink-tertiary); }
.logo-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-top: 48px; }
.logo-mark {
  height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--color-ink-tertiary); font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  opacity: 0.7;
}

.pricing { padding: 96px 0; border-top: 1px solid var(--color-border); }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.price-card { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 12px; padding: 32px; }
.price-card.featured { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.price-card .role { font-size: 12px; color: var(--color-accent-text); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.price-card h3 { font-size: 24px; margin-top: 8px; }
.price-card .price-line { font-size: 38px; font-weight: 600; letter-spacing: -0.02em; margin-top: 16px; font-variant-numeric: tabular-nums; }
.price-card .price-line .small { font-size: 14px; color: var(--color-ink-tertiary); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--color-ink-secondary); }
.price-card li::before { content: "—"; margin-right: 8px; color: var(--color-ink-quaternary); }

/* "What you don't pay" exclusions row beneath the pricing-grid. The
 * label sits at left in ink, with strikethrough items trailing in
 * --color-ink-secondary (chosen for >=8:1 contrast on bg-elevated, so
 * the strike doesn't drop the items below WCAG2AA). */
.exclusions {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center; justify-content: center;
  padding: 20px 24px;
  margin: 32px auto 0;
  max-width: 760px;
  font-size: 14px;
  border-top: 1px solid var(--color-border);
}
.exclusions-label { font-weight: 500; color: var(--color-ink); }
.exclusions .strike { text-decoration: line-through; color: var(--color-ink-secondary); }

/* Sign-up / sign-in forms on /buyer and /publisher. Two cards on the
 * same indigo-tinted band the stat-band uses, so the auth surface
 * reads as a CTA section, not boilerplate. */
.auth { padding: 96px 0; background: var(--color-accent-bg); border-top: 1px solid var(--color-border); }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 880px; margin: 0 auto; }
.auth-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
}
.auth-card h3 { font-size: 22px; letter-spacing: -0.015em; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--color-ink-secondary); font-weight: 500; }
.auth-form .input { height: 38px; }
.auth-status {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-ink-secondary);
  min-height: 20px;
}
.auth-status[data-kind="error"] { color: var(--color-danger); }

.final-cta { padding: 120px 0; text-align: center; border-top: 1px solid var(--color-border); }
.final-cta h2 { font-size: 56px; letter-spacing: -0.03em; line-height: 1.05; }
.final-cta p { color: var(--color-ink-secondary); font-size: 17px; margin-top: 16px; }

/* ============== LEGAL PAGES ============== */
.legal-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px 96px;
  align-items: start;
}
.legal-nav { position: sticky; top: 32px; }
.legal-nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink-tertiary); font-weight: 500; padding: 12px 8px 6px; }
.legal-nav a {
  display: block;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--color-ink-secondary);
  border-radius: 4px;
  transition: background 120ms, color 120ms;
}
.legal-nav a:hover { background: var(--color-bg-subtle); color: var(--color-ink); }
.legal-nav a.active { background: var(--color-accent-bg); color: var(--color-accent-text); font-weight: 500; }

.legal-main { max-width: 680px; }
.legal-main h1 { font-size: 36px; letter-spacing: -0.025em; }
.legal-main .updated { font-family: var(--font-mono); font-size: 12px; color: var(--color-ink-tertiary); margin-top: 8px; }
.legal-main h2 { font-size: 18px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.legal-main h3 { font-size: 14px; margin-top: 24px; }
.legal-main p { margin-top: 12px; color: var(--color-ink-secondary); line-height: 1.7; font-size: 14.5px; }
.legal-main ul { margin-top: 12px; padding-left: 20px; color: var(--color-ink-secondary); line-height: 1.7; font-size: 14.5px; }
.legal-main li + li { margin-top: 6px; }
.legal-main .link { color: var(--color-accent-text); }
.legal-main .link:hover { text-decoration: underline; }
.legal-main .lede { font-size: 16px; color: var(--color-ink-secondary); line-height: 1.7; margin-top: 16px; }

.legal-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.legal-mini-card { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.legal-mini-card .summary-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-text); font-weight: 500; }
.legal-mini-card strong { font-size: 14px; color: var(--color-ink); }
.legal-mini-card p { font-size: 13px; color: var(--color-ink-secondary); line-height: 1.55; margin-top: 0; }

/* ============== DOCS PAGES ============== */
.docs-shell {
  display: grid;
  grid-template-columns: 240px 1fr 220px;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  align-items: start;
}
.docs-nav { position: sticky; top: 24px; max-height: calc(100vh - 80px); overflow-y: auto; }
.docs-nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink-tertiary); font-weight: 500; padding: 12px 8px 6px; margin-top: 8px; }
.docs-nav .group:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 6px 8px; font-size: 13px; color: var(--color-ink-secondary); border-radius: 4px; transition: background 120ms, color 120ms; }
.docs-nav a:hover { background: var(--color-bg-subtle); color: var(--color-ink); }
.docs-nav a.active { background: var(--color-accent-bg); color: var(--color-accent-text); font-weight: 500; }

.docs-main { max-width: 720px; min-width: 0; }
.docs-main .crumb { font-size: 12px; color: var(--color-ink-tertiary); margin-bottom: 12px; }
.docs-main .crumb a { color: var(--color-ink-tertiary); }
.docs-main .crumb a:hover { color: var(--color-ink); }
.docs-main h1 { font-size: 36px; letter-spacing: -0.025em; }
.docs-main .lede { font-size: 16px; color: var(--color-ink-secondary); line-height: 1.6; margin-top: 12px; }
.docs-main h2 { font-size: 22px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); letter-spacing: -0.015em; }
.docs-main h3 { font-size: 16px; margin-top: 28px; }
.docs-main p { margin-top: 12px; color: var(--color-ink-secondary); line-height: 1.7; font-size: 14.5px; }
.docs-main ul, .docs-main ol { margin-top: 12px; padding-left: 20px; color: var(--color-ink-secondary); line-height: 1.7; font-size: 14.5px; }
.docs-main li + li { margin-top: 6px; }
.docs-main pre {
  margin-top: 16px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-ink);
  overflow-x: auto;
  line-height: 1.55;
}
.docs-main code { font-family: var(--font-mono); font-size: 12.5px; background: var(--color-bg-subtle); border: 1px solid var(--color-border-subtle); border-radius: 3px; padding: 1px 5px; color: var(--color-ink); }
.docs-main pre code { background: none; border: none; padding: 0; font-size: inherit; }
.docs-main .callout {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--color-accent-bg);
  border: 1px solid var(--color-accent-border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--color-ink);
  line-height: 1.55;
}
.docs-main .callout strong { color: var(--color-accent-text); }

.docs-toc { position: sticky; top: 24px; }
.docs-toc .group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink-tertiary); font-weight: 500; padding-bottom: 8px; }
.docs-toc a { display: block; padding: 4px 0; font-size: 12.5px; color: var(--color-ink-tertiary); border-left: 2px solid transparent; padding-left: 12px; }
.docs-toc a:hover { color: var(--color-ink); border-left-color: var(--color-border-strong); }

/* Docs cards (overview page grid) */
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.doc-card { padding: 20px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-elevated); transition: border-color 120ms; display: block; }
.doc-card:hover { border-color: var(--color-accent); }
.doc-card .num { font-family: var(--font-mono); font-size: 11px; color: var(--color-ink-tertiary); }
.doc-card .t { font-weight: 600; font-size: 15px; margin-top: 6px; color: var(--color-ink); }
.doc-card .d { font-size: 13px; color: var(--color-ink-tertiary); margin-top: 6px; line-height: 1.5; }

/* Docs next/prev navigation */
.docs-next-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.np-card { padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-elevated); transition: border-color 120ms; display: block; }
.np-card:hover { border-color: var(--color-accent); }
.np-card .meta { font-size: 11px; color: var(--color-ink-tertiary); }
.np-card .t { font-weight: 600; font-size: 14px; margin-top: 4px; color: var(--color-ink); }
.np-card.right { text-align: right; }

/* App topbar (used on docs pages) */
.app-topbar {
  height: 52px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  position: sticky; top: 0; z-index: 50;
}
.app-topbar .brand-mark { width: 22px; height: 22px; font-size: 13px; }
.app-topbar .crumb { font-size: 13px; color: var(--color-ink-tertiary); }
.app-topbar .crumb strong { color: var(--color-ink); font-weight: 500; }
.app-topbar .crumb .sep { margin: 0 6px; color: var(--color-ink-quaternary); }
.h-divider { width: 1px; height: 18px; background: var(--color-border); margin: 0 4px; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--color-ink-tertiary);
}

/* ============== APP LAYOUT (sidebar + main, used in v2 console pages) ============== */
.page-shell.app-layout { display: flex; min-height: 100vh; padding: 0; max-width: none; width: 100%; margin: 0; }
body[data-page="app"] .page-shell { display: flex; min-height: calc(100vh - 92px); padding: 0; max-width: none; width: 100%; margin: 0; }
.page-main { flex: 1; min-width: 0; }
.page-content { padding: 32px 40px; max-width: 1280px; }
.page-title { font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.018em; margin: 0; }
.page-sub { color: var(--color-ink-tertiary); font-size: var(--text-sm); margin-top: 2px; }

.sidebar {
  width: 232px; flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 52px; align-self: flex-start;
  max-height: calc(100vh - 52px); overflow-y: auto;
}
.side-section { font-size: 11px; font-weight: 500; color: var(--color-ink-tertiary); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 8px 4px; }
.side-link {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  height: 28px; padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--color-ink-secondary); font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  /* Reset for `<button class="side-link">` (used for keyboard-accessible
   * filter controls). The default <button> styling would otherwise leak
   * its own background, border, and font. */
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
}
.side-link:hover { background: var(--color-bg-subtle); color: var(--color-ink); }
.side-link.active { background: var(--color-bg-muted); color: var(--color-ink); }
.side-link:focus-visible { outline: none; box-shadow: var(--ring); }
.side-link .count { margin-left: auto; font-size: 11px; color: var(--color-ink-tertiary); font-variant-numeric: tabular-nums; }

.subnav {
  display: flex; gap: 2px; align-items: center;
  height: 40px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 13px;
}
.subnav a {
  height: 40px;
  display: inline-flex; align-items: center;
  padding: 0 12px;
  color: var(--color-ink-tertiary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.subnav a:hover { color: var(--color-ink); text-decoration: none; }
.subnav a.active { color: var(--color-ink); border-bottom-color: var(--color-ink); }

.stat {
  padding: 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 12px; color: var(--color-ink-tertiary); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; color: var(--color-ink-tertiary); }
.stat-delta.up { color: var(--color-success); }
.stat-delta.down { color: var(--color-danger); }

.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.toolbar .search { width: 280px; }
.toolbar .spacer { flex: 1; }

/* Native checkboxes — picked up by .table rows in buyer-v2 (select-all
 * and per-row select). `accent-color` paints the checked fill in the
 * brand indigo while keeping the OS-native shape, focus ring, and
 * keyboard behavior. */
.table input[type="checkbox"] {
  accent-color: var(--color-accent);
  cursor: pointer;
  margin: 0;
}

.stepper { display: flex; align-items: center; gap: 16px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-ink-tertiary); }
.step .num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-bg-muted); color: var(--color-ink-tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.step.active { color: var(--color-ink); }
.step.active .num { background: var(--color-ink); color: #fff; }
.step.done .num { background: var(--color-accent); color: #fff; }
.step.done { color: var(--color-ink-secondary); }
.step-sep { width: 24px; height: 1px; background: var(--color-border); }

.empty {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--color-ink-tertiary);
  background: var(--color-bg);
}
.empty h4 { color: var(--color-ink); font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.empty p { font-size: 13px; margin-bottom: 16px; }

.tag-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-ink-tertiary);
  background: var(--color-bg-subtle);
  padding: 2px 5px;
  border-radius: 3px;
}

.link { color: var(--color-accent-text); text-decoration: none; }
.link:hover { text-decoration: underline; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 15, 14, 0.32);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 480px; max-width: 90vw;
}
.modal-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--color-border-subtle); }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--color-border-subtle); display: flex; justify-content: flex-end; gap: 8px; }

.chip .x { color: var(--color-ink-quaternary); cursor: pointer; }
.chip .x:hover { color: var(--color-ink); }

.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-bg-muted); color: var(--color-ink-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}

.toast {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; padding-right: 14px;
  background: var(--color-ink); color: #fff;
  border-radius: var(--radius-lg);
  font-size: 13px;
  box-shadow: var(--shadow-md);
}

.progress { height: 6px; background: var(--color-bg-muted); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--color-accent); border-radius: 999px; }

/* ============== ACCESSIBILITY ============== */
/* Keyboard focus ring for any focusable element that doesn't already
 * carry one — links, table rows with `tabindex`, anything with
 * role="button". `.btn`, `.input`, `.select`, `.textarea`, and
 * `.side-link` set their own ring earlier; this is the catch-all. */
a:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
.subnav a:focus-visible,
.form-nav a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* `<tr>` is a row group element with no CSS box of its own, so
 * box-shadow on it doesn't paint reliably across browsers. Use an inset
 * outline for keyboard-focusable rows (those carrying tabindex). */
.table tbody tr[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  box-shadow: none;
}

/* Two-column split utilities. Use these instead of inline
 * `grid-template-columns: …` so the layout collapses to one column
 * on phone without each page needing its own media query.
 *   .split-asym → 1.4fr / 1fr (main content + side panel)
 *   .split-even → 1fr / 1fr   (paired form fields)
 * Both fall back to a single column under 720px. */
/* minmax(0, …) everywhere: a bare `1fr` is minmax(auto, 1fr), so a
 * wide child (data table, long unbreakable string) propagates its
 * min-content into the track and pushes the grid past the viewport —
 * seen at 961–1240px where the inventory table blew the 1.4fr column
 * out by 240px+. minmax(0, …) keeps the ratio but lets children
 * shrink (tables then scroll inside .table-wrap as designed). */
.split-asym {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
}
.split-even {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 24px;
}
@media (max-width: 720px) {
  .split-asym, .split-even { grid-template-columns: minmax(0, 1fr); }
}

/* Skip-link: visually hidden until focused. Lets keyboard users jump
 * past the topbar + sidebar straight into main content. */
.skip-link {
  position: absolute;
  top: -40px; left: 8px;
  z-index: 100;
  background: var(--color-bg-elevated);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: top 100ms;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
  outline: none;
  box-shadow: var(--ring);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 960px) {
  .hero-a { grid-template-columns: 1fr; gap: 48px; }
  .why-grid { grid-template-columns: 1fr; gap: 48px; }
  /* minmax(0, …): the card's min-content (preview tables) must not
   * widen the track past the viewport. */
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .quote-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-band-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-band { padding: 56px 0; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth { padding: 64px 0; }
  .logo-strip { grid-template-columns: repeat(3, 1fr); }
  .public-footer .container { grid-template-columns: 1fr 1fr; gap: 32px; }
  .preview-head { flex-direction: column; align-items: flex-start; }
  .public-nav .nav-center { display: none; }
  .public-nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .legal-shell { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px 64px; }
  .legal-nav { position: static; }
  .docs-shell { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px 64px; }
  .docs-nav, .docs-toc { position: static; max-height: none; }
  .docs-toc { display: none; }
}

@media (max-width: 560px) {
  .public-footer .container { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .hero .ctas { flex-direction: column; align-items: stretch; }
  .hero .ctas .btn { justify-content: center; }
  .final-cta h2 { font-size: 38px; }
  /* The 38px price-line ("0% commission") is wider than a 320px card
   * can get — one unbreakable word forces the pricing grid past the
   * viewport. Scale it down on phones. */
  .price-card .price-line { font-size: 30px; }
  /* Full-width CTAs ("Create your publisher account") carry labels
   * longer than a 320px card — wrap instead of nowrap-overflowing. */
  .btn-block { white-space: normal; height: auto; min-height: 44px; text-align: center; }
  /* Nav: brand + actions don't fit on one 375px line — let the row
   * wrap instead of pushing the account button past the viewport.
   * The actions row itself may wrap too (DE labels run longer). */
  .public-nav { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px 16px; row-gap: 4px; }
  .public-nav .nav-right { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
  /* CTA rows outside the hero (proof / final-cta) are inline
   * `display:flex` without wrap — centered nowrap buttons overflow
   * both edges on phones. */
  .ctas { flex-wrap: wrap; }
}

/* ============== APP CONSOLE — RESPONSIVE ============== */
/* Tablet (and narrower): collapse the sidebar to a horizontal scroll
 * strip above the main content. This keeps every nav link reachable
 * without a hamburger toggle (which would need JS in every v2 page). */
@media (max-width: 960px) {
  .page-shell.app-layout { flex-direction: column; }
  body[data-page="app"] .page-shell { flex-direction: column; }
  /* Crumb truncation already at tablet width: between 561 and 960px a
   * long outlet/booking name in the breadcrumb otherwise pushes the
   * avatar out of the topbar (+13px horizontal scroll). The 560px block
   * below only adjusts font-size/separators on top of this. */
  .app-topbar .crumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
  .sidebar {
    width: 100%;
    max-height: none;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 12px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  /* Side-section headers ("INVENTORY", "FILTERS") look odd in a row.
   * Hide them on the horizontal strip — links carry their own labels. */
  .sidebar .side-section { display: none; }
  .side-link { white-space: nowrap; flex-shrink: 0; height: 32px; }
  .side-link .count { margin-left: 6px; }

  .page-content { padding: 20px 16px; }
  .page-title { font-size: var(--text-xl); }

  /* Tables overflow horizontally instead of forcing the whole page wide.
   * Scoped to .table-wrap: decorative mini-tables (how-card previews)
   * have no scroll wrapper — a 640px floor there blows the grid track
   * and drags the whole page wide. */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap .table { min-width: 640px; }

  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar .search { width: 100%; max-width: 320px; }

  .subnav { padding: 0 12px; overflow-x: auto; white-space: nowrap; }
  .subnav a { flex-shrink: 0; }

  /* Topbar search input: shrink + flex so it doesn't push avatar off
   * the right edge. Pages set inline width:240px / 280px on these
   * inputs; override with !important since inline styles win otherwise. */
  .app-topbar .input-search {
    width: auto !important;
    max-width: 200px;
    min-width: 0;
    flex: 1;
  }
}

/* Phone: tighter padding, simpler stepper, shrink stat cards. */
@media (max-width: 560px) {
  .page-content { padding: 16px 12px; }
  .page-title { font-size: var(--text-lg); }

  .stat { padding: 12px; }
  .stat-value { font-size: 22px; }

  /* Stepper (used on inventory-create / brief-lab) — drop the connecting
   * lines on phone, they don't survive wrapping. */
  .stepper { flex-wrap: wrap; gap: 8px; }
  .step-sep { display: none; }

  /* Topbar: drop everything except brand + breadcrumb tail + avatar.
   * The "Buyer / Marketplace / X" crumb truncates the leading parts so
   * the active page name remains visible. */
  .app-topbar { padding: 0 12px; gap: 8px; }
  .app-topbar .h-divider { display: none; }
  .app-topbar .crumb { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
  .app-topbar .crumb .sep { margin: 0 4px; }

  /* Allow page authors to opt columns out on phone. Add `class="hide-mobile"`
   * to a <th>/<td> to hide it below 560px (used sparingly on data-dense
   * tables where some cells are reference info, not action info). */
  .hide-mobile { display: none; }

  /* Topbar: drop the search input + ⌘K shortcut hint on phones.
   * The search is rarely tapped on a small screen and pushes the
   * avatar off the right edge; users can navigate via the subnav
   * instead. Saved-search workflows live in the page body. */
  .app-topbar .input-search,
  .app-topbar .kbd { display: none; }

  /* Buttons: ensure 44x44px minimum tap target on phones. Inputs
   * also get a slightly taller minimum so they're easy to focus. */
  .btn:not(.btn-sm),
  .input,
  select,
  textarea { min-height: 44px; }
  .btn-sm { min-height: 36px; }

  /* Hero (landing page): hide the side preview mock on phones — it
   * doesn't scale gracefully below ~400px and the hero copy carries
   * the message on its own. */
  .hero-mock { display: none; }
  .hero-a { gap: 0; }
}

/* ============== MOBILE — PAGE-SHELL COLLAPSES ============== */
/* The v2 pages each define their shell layout in inline `<style>`
 * blocks: `.checkout-shell`, `.bk-grid`, `.form-shell`, `.stat-grid`,
 * etc. The earlier responsive rules don't reach these because they
 * target `.split-asym` / `.split-even` helpers the v2 pages don't
 * use. These rules pick up the page-specific shells by name plus a
 * sweep of common inline-style grid patterns.
 *
 * Strategy: collapse equal-column and main+aside grids to a single
 * column on tablet (≤960). Asymmetric "icon + content" rows
 * (`64px 1fr auto` etc.) keep their structure since they reflow
 * fine inside narrow widths. */
@media (max-width: 960px) {
  /* Cart: main reservation panel + summary aside. */
  .checkout-shell {
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
  }

  /* Booking detail: main column + status aside + 4-col pacing grid. */
  .bk-grid { grid-template-columns: 1fr !important; }
  .pacing-grid { grid-template-columns: 1fr 1fr !important; }

  /* Inventory create: 3-col nav-aside / main form / preview-aside.
   * The page-section nav becomes a top scroll strip rather than a
   * left rail; the preview aside drops below the form. */
  .form-shell {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
    gap: 20px !important;
  }
  .form-shell > nav {
    overflow-x: auto;
    white-space: nowrap;
    border-right: none !important;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 4px !important;
    position: static !important;
  }
  .form-shell > nav > a { flex-shrink: 0; }

  /* Publisher / reports / payouts stat rows. The pages declare these
   * as `repeat(4, 1fr)` or `repeat(N, 1fr)` and stat tiles end up
   * mashed at narrow widths. Two columns reads well at 720–960; the
   * 560 rule below takes them down to one. */
  .stat-grid { grid-template-columns: 1fr 1fr !important; }

  /* Inline-style grid patterns the v2 pages use ad-hoc. Catching the
   * literal `style=` substring is the cleanest way to reach them
   * without having to edit every page. */
  [style*="grid-template-columns: 1fr 1fr"]:not([style*="1fr 1fr 1fr"]),
  [style*="grid-template-columns: 1fr 320px"],
  [style*="grid-template-columns: 1fr 380px"],
  [style*="grid-template-columns: 1.6fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Right-rail asides on buyer/publisher/admin pages: when the page
   * shell collapses, the aside should sit below the main content
   * full-width rather than carrying an awkward left-aligned column. */
  main > aside,
  .page-content > aside {
    width: 100% !important;
    margin-top: 24px;
  }
}

/* Phone (≤560): drop two-column stat strips to single column,
 * collapse pacing grid the rest of the way, give heading inline
 * font-sizes a sensible upper bound. */
@media (max-width: 560px) {
  .stat-grid,
  .pacing-grid,
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: 1fr !important;
  }

  /* Inline `font-size: 38px` / `42px` headings (final-cta, hero, why)
   * blow out a 360px viewport. Bound them with clamp so they scale.
   * The non-`!important` form means inline overrides still win on
   * desktop (where the rule is out of the media query). */
  h1, h2.h-1, .final-cta h2 {
    font-size: clamp(26px, 8vw, 40px) !important;
    line-height: 1.15;
  }

  /* Inline-styled max-widths on hero/CTA blocks were sized for desktop
   * and clamp the readable area on phone. Unbind the most common
   * ones — they're already inside narrow containers at this size. */
  [style*="max-width: 520px"],
  [style*="max-width: 560px"],
  [style*="max-width: 640px"],
  [style*="max-width: 720px"] {
    max-width: none !important;
  }

  /* Toolbar / filter / chip rows: wrap rather than overflow. The
   * existing `.toolbar { flex-wrap: wrap }` rule covers .toolbar;
   * this picks up the rest. */
  .filter-bar, .filter-row, .chip-row, .meta-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* ===========================================================================
 * Skeleton loaders + error states
 *
 * Shared visual primitives for "we're fetching" and "the fetch broke,
 * try again". The animated shimmer is GPU-cheap (one transform + one
 * gradient) and respects prefers-reduced-motion.
 *
 * Usage: render `<div class="skeleton-line"></div>` etc. inside a
 * placeholder, or use the `renderSkeleton()` helper in v2-shared.js
 * which composes a few sensible shapes (list, card, table-rows).
 * ========================================================================= */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-subtle) 25%,
    var(--color-bg-elevated) 50%,
    var(--color-bg-subtle) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-line { height: 12px; margin: 8px 0; width: 100%; }
.skeleton-line.short { width: 40%; }
.skeleton-line.med   { width: 70%; }
.skeleton-line.tall  { height: 18px; }

.skeleton-block { height: 80px; width: 100%; margin: 8px 0; border-radius: 8px; }
.skeleton-block.tall { height: 140px; }

.skeleton-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 10px);
  padding: 16px 18px;
  background: var(--color-bg-elevated);
  margin-bottom: 12px;
}
.skeleton-card .skeleton-line:first-child { margin-top: 0; }

.skeleton-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-subtle);
  align-items: center;
}
.skeleton-row .skeleton-line { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--color-bg-subtle);
  }
}

/* Error-with-retry block — used by renderError() in v2-shared.js */
.error-state {
  border: 1px solid var(--color-danger-border, var(--color-danger, #c0312f));
  background: var(--color-danger-bg, #fdf3f2);
  color: var(--color-ink);
  border-radius: 10px;
  padding: 22px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}
.error-state h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--color-danger, #c0312f);
}
.error-state p {
  margin: 0;
  font-size: 13px;
  color: var(--color-ink-secondary);
  line-height: 1.5;
  max-width: 460px;
}
.error-state .retry-btn { margin-top: 4px; }


/* ===== Language toggle (i18n widget) =================================
 * Two-button group used in public + app navs to flip between EN/DE.
 * Inherits the muted nav-link palette so it doesn't compete with
 * primary CTAs. Active state uses the same accent fill we use for
 * pressed segmented controls.
 * =================================================================== */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--color-line, #e2e2e0);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-surface-2, #f6f5f3);
  margin-right: 8px;
}
.lang-toggle .lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-ink-secondary, #555);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.6;
  transition: background 120ms ease, color 120ms ease;
}
.lang-toggle .lang-btn + .lang-btn {
  border-left: 1px solid var(--color-line, #e2e2e0);
}
.lang-toggle .lang-btn:hover {
  background: var(--color-surface-1, #fff);
  color: var(--color-ink, #1a1a1a);
}
.lang-toggle .lang-btn.active {
  background: var(--color-ink, #1a1a1a);
  color: var(--color-surface-1, #fff);
}
.lang-toggle .lang-btn:focus-visible {
  outline: 2px solid var(--color-accent, #0066ff);
  outline-offset: 1px;
  z-index: 1;
}

/* ===== FX-equivalent badge ===========================================
 * Small inline pill rendered next to a listed price when the buyer's
 * display currency differs from the listing's. "≈ €2,750" — not a
 * quote, just a gut-check conversion at today's ECB rate.
 * =================================================================== */
.fx-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--color-surface-2, #f6f5f3);
  border: 1px solid var(--color-line, #e2e2e0);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-ink-secondary, #555);
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;
}

/* ===== Brand-safety chips =============================================
 * Two-state chip rendered next to listing titles in the marketplace.
 * "Flagged" = publisher self-declared risk categories, no buyer conflict
 * "Blocked" = listing matches at least one of the buyer's exclusions
 * (only ever visible when the buyer opts back in via includeUnsafe=1).
 * Sized to sit inline with the title chip-row without taking over.
 * ====================================================================== */
.bs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  cursor: help;
  white-space: nowrap;
}
.bs-chip-flagged {
  background: var(--color-warning-bg, #fff5e0);
  color: var(--color-warning, #b66800);
  border: 1px solid var(--color-warning-border, #f0c97a);
}
.bs-chip-blocked {
  background: var(--color-danger-bg, #fdf3f2);
  color: var(--color-danger, #c0312f);
  border: 1px solid var(--color-danger-border, #e8a8a4);
}
