/*
 * Cockpit public website (KAN-336, docs/website.md kap. 5): tokens, layout and components.
 * Tokens mirror packages/ui/src/theme/tokens.css (--ck-*): same surfaces, text, accent and status
 * colours, same fonts. The site follows the OS theme (prefers-color-scheme); [data-theme] on <html>
 * forces one. The app mock in the hero always uses the app's default dark theme, like a screenshot.
 *
 * Fonts are self-hosted (no request to a third party): Inter and JetBrains Mono, both under the
 * SIL Open Font License 1.1 (fonts/OFL-Inter.txt, fonts/OFL-JetBrainsMono.txt), variable weight,
 * latin and latin-ext subsets from the @fontsource-variable packages 5.3.0.
 */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

:root {
  color-scheme: light;

  /* Surfaces (= --ck-bg, --ck-bg-elevated, --ck-bg-hover, --ck-border … light) */
  --site-bg: #ffffff;
  --site-bg-elevated: #f6f7f9;
  --site-bg-sunken: #eef1f5;
  --site-border: #dde2ea;
  --site-border-strong: #c3cbd8;

  /* Text */
  --site-fg: #1b1f27;
  --site-fg-muted: #5b6472;
  --site-fg-subtle: #646d7c; /* app #6f7887 reaches only 4.46:1 on white; 4.87:1 on elevated */

  /* Accent = --ck-accent (links, primary buttons, focus, the highlighted words) */
  --site-accent: #1a5fd0;
  --site-accent-hover: #164fae;
  --site-accent-fg: #ffffff;
  --site-accent-soft: rgba(26, 95, 208, 0.1);

  /* Status colours of the app, used as graphic accents only (always paired with a shape) */
  --site-working: #1a5fd0;
  --site-waiting: #f28c00;
  --site-waiting-fg: #a35a00;
  --site-idle: #8a94a6;
  --site-ok: #12a150;
  --site-ok-fg: #0e7a3d;

  --site-code-bg: #f4f6f9;
  --site-header-bg: rgba(255, 255, 255, 0.86);
  --site-glow: radial-gradient(60rem 30rem at 70% -10%, rgba(26, 95, 208, 0.1), transparent 70%);
  --site-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 12px 32px rgba(16, 24, 40, 0.1);

  /* Typography (= --ck-font-sans / --ck-font-mono; larger scale for reading) */
  --site-font-sans:
    Inter, 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --site-font-mono:
    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --site-text: 1.0625rem; /* 17px */
  --site-text-sm: 0.9375rem;
  --site-text-xs: 0.8125rem;
  --site-h1: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  --site-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  --site-h3: 1.1875rem;

  /* Spacing, radii, motion (4px base and radii of the app) */
  --site-gutter: 16px;
  --site-max: 72rem;
  --site-section: clamp(3.5rem, 2rem + 6vw, 7rem);
  --site-radius-sm: 4px;
  --site-radius-md: 8px;
  --site-radius-lg: 12px;
  --site-radius-xl: 20px;
  --site-focus-ring: 0 0 0 2px var(--site-bg), 0 0 0 4px var(--site-accent);
  --site-duration: 150ms;
  --site-easing: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --site-bg: #0f1115;
    --site-bg-elevated: #161a21;
    --site-bg-sunken: #1c2129;
    --site-border: #2a3140;
    --site-border-strong: #3d4658;
    --site-fg: #e6e9ef;
    --site-fg-muted: #9aa4b5;
    --site-fg-subtle: #7c8698;
    --site-accent: #6ea8fe;
    --site-accent-hover: #8dbbff;
    --site-accent-fg: #0b1220;
    --site-accent-soft: rgba(110, 168, 254, 0.16);
    --site-working: #4c9aff;
    --site-waiting: #ff9f1c;
    --site-waiting-fg: #ffb648;
    --site-idle: #8a94a6;
    --site-ok: #3ddc84;
    --site-ok-fg: #5fe69b;
    --site-code-bg: #12151b;
    --site-header-bg: rgba(15, 17, 21, 0.82);
    --site-glow: radial-gradient(
      60rem 30rem at 70% -10%,
      rgba(110, 168, 254, 0.14),
      transparent 70%
    );
    --site-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --site-bg: #0f1115;
  --site-bg-elevated: #161a21;
  --site-bg-sunken: #1c2129;
  --site-border: #2a3140;
  --site-border-strong: #3d4658;
  --site-fg: #e6e9ef;
  --site-fg-muted: #9aa4b5;
  --site-fg-subtle: #7c8698;
  --site-accent: #6ea8fe;
  --site-accent-hover: #8dbbff;
  --site-accent-fg: #0b1220;
  --site-accent-soft: rgba(110, 168, 254, 0.16);
  --site-working: #4c9aff;
  --site-waiting: #ff9f1c;
  --site-waiting-fg: #ffb648;
  --site-idle: #8a94a6;
  --site-ok: #3ddc84;
  --site-ok-fg: #5fe69b;
  --site-code-bg: #12151b;
  --site-header-bg: rgba(15, 17, 21, 0.82);
  --site-glow: radial-gradient(60rem 30rem at 70% -10%, rgba(110, 168, 254, 0.14), transparent 70%);
  --site-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
}

@media (min-width: 48rem) {
  :root {
    --site-gutter: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --site-duration: 0ms;
  }
  html {
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: var(--site-font-sans);
  font-size: var(--site-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--site-accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--site-accent-hover);
}

:focus-visible {
  /* Transparent, not none: forced-colours mode paints it and keeps the focus visible. */
  outline: 2px solid transparent;
  box-shadow: var(--site-focus-ring);
  border-radius: var(--site-radius-sm);
}

code,
kbd {
  font-family: var(--site-font-mono);
  font-size: 0.9em;
  background: var(--site-code-bg);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-sm);
  padding: 0.05em 0.35em;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--site-h1);
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--site-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--site-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--site-gutter);
  top: -4rem;
  z-index: 100;
  background: var(--site-accent);
  color: var(--site-accent-fg);
  padding: 0.5rem 1rem;
  border-radius: var(--site-radius-md);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--site-accent-fg);
}

.container {
  width: 100%;
  max-width: calc(var(--site-max) + 2 * var(--site-gutter));
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border-radius: var(--site-radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--site-text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--site-duration) var(--site-easing),
    border-color var(--site-duration) var(--site-easing),
    color var(--site-duration) var(--site-easing);
}

.btn--primary {
  background: var(--site-accent);
  color: var(--site-accent-fg);
}

.btn--primary:hover {
  background: var(--site-accent-hover);
  color: var(--site-accent-fg);
}

.btn--secondary {
  background: var(--site-bg);
  color: var(--site-fg);
  border-color: var(--site-border-strong);
}

.btn--secondary:hover {
  background: var(--site-bg-sunken);
  color: var(--site-fg);
}

.btn--ghost {
  color: var(--site-fg);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--site-bg-sunken);
  color: var(--site-fg);
}

/* Disabled (downloads off in the invite-only pilot, KAN-362): muted, not clickable. */
.btn:disabled,
.btn:disabled:hover {
  background: var(--site-bg-sunken);
  color: var(--site-fg-muted);
  border-color: var(--site-border);
  cursor: not-allowed;
}

.btn--lg {
  min-height: 52px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--site-header-bg);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--site-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--site-fg);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
  order: 1;
}

.brand:hover {
  color: var(--site-fg);
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand__domain {
  font-family: var(--site-font-mono);
  font-weight: 400;
  font-size: var(--site-text-xs);
  color: var(--site-fg-subtle);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  order: 2;
}

.site-nav a {
  color: var(--site-fg-muted);
  text-decoration: none;
  font-size: var(--site-text-sm);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--site-radius-md);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--site-fg);
  background: var(--site-bg-sunken);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 3;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-md);
  background: transparent;
  color: var(--site-fg);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile: with JS the links collapse behind the menu button; without JS they wrap below. */
@media (max-width: 55.99rem) {
  .site-header__inner {
    flex-wrap: wrap;
  }
  .site-nav {
    order: 4;
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
  }
  .js .nav-toggle {
    display: inline-flex;
  }
  .js .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
  }
  .js .site-header[data-open] .site-nav {
    display: flex;
  }
  .js .site-nav a {
    padding: 0.75rem;
    font-size: 1rem;
  }
  .site-header__actions .btn--ghost {
    display: none;
  }
  .site-header__actions {
    margin-left: auto;
  }
}

@media (max-width: 29.99rem) {
  .brand__domain {
    display: none;
  }
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: var(--site-section) 0;
}

.section--alt {
  background: var(--site-bg-elevated);
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__head p:not(.eyebrow) {
  margin-top: 1rem;
  color: var(--site-fg-muted);
  font-size: 1.125rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(3rem, 2rem + 5vw, 6.5rem) 0 clamp(3rem, 2rem + 4vw, 5.5rem);
  background: var(--site-glow);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 64rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

.hero__title {
  max-width: 15ch;
}

/* "Cockpit", "AI" and "dev" echo the domain cockpit·ai·dev. Decorative emphasis only. */
.hl {
  color: var(--site-accent);
  background: linear-gradient(to top, var(--site-accent-soft) 0.32em, transparent 0.32em);
  padding: 0 0.04em;
  border-radius: 2px;
}

.hero__lead {
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--site-fg-muted);
  max-width: 36rem;
}

.hero__actions {
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1rem;
  font-size: var(--site-text-sm);
  color: var(--site-fg-muted);
}

.hero__domain {
  margin-top: 2rem;
  font-family: var(--site-font-mono);
  font-size: var(--site-text-sm);
  color: var(--site-fg-subtle);
}

.hero__domain b {
  color: var(--site-accent);
  font-weight: 500;
}

/* ---------------------------------------------------------------- app mock (always dark) */

.mock-stage {
  position: relative;
  padding-bottom: 2.5rem;
  padding-right: 72px;
}

.mock {
  --m-bg: #0f1115;
  --m-elevated: #161a21;
  --m-surface: #1c2129;
  --m-hover: #242a34;
  --m-border: #2a3140;
  --m-fg: #e6e9ef;
  --m-muted: #9aa4b5;
  --m-subtle: #7c8698;
  --m-accent: #6ea8fe;
  --m-bubble: #223049;
  --m-code: #12151b;
  --m-working: #4c9aff;
  --m-waiting: #ff9f1c;
  --m-ok: #3ddc84;
  color: var(--m-fg);
  font-family: var(--site-font-sans);
  font-size: 12px;
  line-height: 1.45;
}

.mock-window {
  border-radius: var(--site-radius-lg);
  border: 1px solid var(--m-border);
  background: var(--m-bg);
  box-shadow: var(--site-shadow);
  overflow: hidden;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--m-elevated);
  border-bottom: 1px solid var(--m-border);
}

.mock-titlebar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--m-hover);
}

.mock-tabs {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  min-width: 0;
}

.mock-tab {
  padding: 3px 10px;
  border-radius: 6px 6px 0 0;
  color: var(--m-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-tab--active {
  background: var(--m-surface);
  color: var(--m-fg);
}

.mock-body {
  display: grid;
  grid-template-columns: 34% 1fr;
  min-height: 330px;
}

.mock-side {
  background: var(--m-elevated);
  border-right: 1px solid var(--m-border);
  padding: 10px 8px;
}

.mock-side__label {
  color: var(--m-subtle);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 6px 6px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.mock-row--active {
  background: var(--m-hover);
}

.mock-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-row small {
  margin-left: auto;
  color: var(--m-muted);
  font-size: 11px;
}

.mock-initial {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #0b1220;
}

.st {
  flex: none;
  font-size: 11px;
  line-height: 1;
}

.st--working {
  color: var(--m-working);
}

.st--waiting {
  color: var(--m-waiting);
}

.st--idle {
  color: var(--m-subtle);
}

.mock-chat {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.mock-bubble {
  align-self: flex-end;
  max-width: 85%;
  background: var(--m-bubble);
  padding: 8px 11px;
  border-radius: 12px 12px 4px 12px;
}

.mock-text {
  color: var(--m-fg);
}

.mock code {
  background: var(--m-hover);
  border: 0;
  color: var(--m-fg);
  font-size: 11px;
}

.mock-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  background: var(--m-code);
  border: 1px solid var(--m-border);
  border-radius: 8px;
  font-family: var(--site-font-mono);
  font-size: 11px;
  color: var(--m-muted);
  white-space: nowrap;
  overflow: hidden;
}

.mock-tool b {
  color: var(--m-fg);
  font-weight: 500;
}

.mock-tool .ok {
  margin-left: auto;
  color: var(--m-ok);
}

.mock-waiting {
  margin-top: auto;
  border: 1px solid rgba(255, 159, 28, 0.45);
  background: rgba(255, 159, 28, 0.1);
  border-radius: 10px;
  padding: 9px 11px;
}

.mock-waiting p {
  color: var(--m-fg);
}

.mock-waiting__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #ffb648 !important;
  margin-bottom: 4px !important;
}

.mock-waiting__actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.mock-waiting__actions span {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--m-border);
  color: var(--m-fg);
}

.mock-waiting__actions span:first-child {
  background: var(--m-accent);
  border-color: var(--m-accent);
  color: #0b1220;
  font-weight: 600;
}

.mock-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 168px;
  border-radius: 26px;
  border: 6px solid #232833;
  background: var(--m-bg);
  box-shadow: var(--site-shadow);
  overflow: hidden;
}

.mock-phone__notch {
  width: 54px;
  height: 14px;
  margin: 6px auto 4px;
  border-radius: 999px;
  background: #232833;
}

.mock-push {
  margin: 4px 7px 8px;
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  font-size: 10.5px;
}

.mock-push b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.mock-push b img {
  width: 13px;
  height: 13px;
}

.mock-push p {
  color: var(--m-muted);
  margin-top: 2px;
}

.mock-phone .mock-row {
  margin: 0 5px;
  font-size: 11px;
}

.mock-phone__label {
  color: var(--m-subtle);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 11px;
}

.mock-phone__spacer {
  height: 14px;
}

@media (max-width: 34rem) {
  .mock-body {
    grid-template-columns: 1fr;
  }
  .mock-side {
    display: none;
  }
  .mock-stage {
    padding-right: 40px;
  }
  .mock-phone {
    width: 138px;
    right: 0;
  }
}

/* ---------------------------------------------------------------- logos strip */

.works-with {
  padding: 2rem 0;
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
  background: var(--site-bg-elevated);
}

.works-with__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  justify-content: center;
}

.works-with__label {
  font-size: var(--site-text-sm);
  color: var(--site-fg-muted);
}

.works-with ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--site-border);
  background: var(--site-bg);
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  color: var(--site-fg);
}

/* ---------------------------------------------------------------- problem / answer */

.pairs {
  display: grid;
  gap: 1rem;
}

@media (min-width: 56rem) {
  .pairs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pair {
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-bg);
  overflow: hidden;
}

.pair__before {
  padding: 1.25rem 1.25rem 1rem;
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
  border-bottom: 1px dashed var(--site-border);
  display: flex;
  gap: 0.625rem;
}

.pair__after {
  padding: 1rem 1.25rem 1.375rem;
}

.pair__after h3 {
  margin-bottom: 0.5rem;
}

.pair__after p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

/* ---------------------------------------------------------------- feature cards */

.cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-bg);
}

.section--alt .card {
  background: var(--site-bg);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  margin-bottom: 1rem;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.badge {
  display: inline-block;
  font-family: var(--site-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--site-accent);
  color: var(--site-accent);
  vertical-align: middle;
}

.card .badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

/* ---------------------------------------------------------------- steps */

.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  counter-increment: step;
  padding-top: 1.25rem;
  border-top: 2px solid var(--site-border);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--site-font-mono);
  font-size: var(--site-text-sm);
  color: var(--site-accent);
  margin-bottom: 0.75rem;
}

.steps h3 {
  margin-bottom: 0.5rem;
}

.steps p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

/* ---------------------------------------------------------------- trust */

.trust {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .trust {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.trust-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.875rem;
}

.trust-list svg {
  width: 24px;
  height: 24px;
  color: var(--site-ok-fg);
  margin-top: 2px;
}

.trust-list b {
  display: block;
  margin-bottom: 0.25rem;
}

.trust-list p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.flow {
  margin-top: 1.5rem;
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  color: var(--site-fg-muted);
  background: var(--site-code-bg);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  white-space: pre;
  margin: 1.5rem 0 0;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- plans */

.plans {
  display: grid;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 48rem) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-xl);
  background: var(--site-bg);
}

.plan--pro {
  border: 2px solid var(--site-accent);
  box-shadow: var(--site-shadow);
}

.plan__name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plan__price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.plan__price small {
  font-size: var(--site-text-sm);
  font-weight: 500;
  color: var(--site-fg-muted);
  letter-spacing: 0;
}

.plan__desc {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: var(--site-text-sm);
}

.plan li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.5rem;
}

.plan li::before {
  content: '';
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: var(--site-ok-fg);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6.4 11.6 2.8 8l1.1-1.1 2.5 2.5 5.7-5.7L13.2 4.8z"/></svg>')
    center / contain no-repeat;
}

.plan .btn {
  margin-top: auto;
}

.plans__note {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

/* ---------------------------------------------------------------- comparison table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-bg);
}

.compare {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: var(--site-text-sm);
}

.compare th,
.compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--site-border);
}

.compare tbody tr:last-child > * {
  border-bottom: 0;
}

.compare thead th {
  color: var(--site-fg-muted);
  font-weight: 600;
  background: var(--site-bg-elevated);
}

.compare tbody th {
  font-weight: 400;
}

.compare td {
  white-space: nowrap;
}

.compare .col-pro {
  color: var(--site-fg);
  font-weight: 600;
}

/* ---------------------------------------------------------------- downloads */

.downloads {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .downloads {
    grid-template-columns: repeat(3, 1fr);
  }
}

.download {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-bg);
}

.download h3 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.download h3 svg {
  width: 22px;
  height: 22px;
}

.download p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.download .btn-row {
  margin-top: auto;
}

.download--detected {
  border-color: var(--site-accent);
  box-shadow: 0 0 0 1px var(--site-accent);
}

.download__meta {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

/* ---------------------------------------------------------------- FAQ */

.faq {
  max-width: 48rem;
  margin: 0 auto;
  border-top: 1px solid var(--site-border);
}

.faq details {
  border-bottom: 1px solid var(--site-border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  font-family: var(--site-font-mono);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--site-fg-muted);
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  padding: 0 0 1.25rem;
  color: var(--site-fg-muted);
  max-width: 42rem;
}

/* ---------------------------------------------------------------- final CTA */

.cta {
  text-align: center;
  padding: clamp(3rem, 2rem + 4vw, 5rem) var(--site-gutter);
  border-radius: var(--site-radius-xl);
  border: 1px solid var(--site-border);
  background: var(--site-glow), var(--site-bg-elevated);
}

.cta p {
  margin: 1rem auto 2rem;
  max-width: 34rem;
  color: var(--site-fg-muted);
  font-size: 1.125rem;
}

.cta .btn-row {
  justify-content: center;
}

/* ---------------------------------------------------------------- subpage */

.page-hero {
  padding: clamp(3rem, 2rem + 4vw, 5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
  background: var(--site-glow);
  border-bottom: 1px solid var(--site-border);
}

.page-hero h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  max-width: 22ch;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 40rem;
  color: var(--site-fg-muted);
  font-size: 1.125rem;
}

.breadcrumb {
  font-size: var(--site-text-sm);
  color: var(--site-fg-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--site-fg-muted);
}

.page-layout {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
}

@media (min-width: 64rem) {
  .page-layout {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 4rem;
  }
}

.toc {
  font-size: var(--site-text-sm);
}

.toc__title {
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-fg-subtle);
  margin-bottom: 0.75rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.toc a {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--site-radius-md);
  color: var(--site-fg-muted);
  text-decoration: none;
}

.toc a:hover {
  background: var(--site-bg-sunken);
  color: var(--site-fg);
}

@media (min-width: 64rem) {
  .toc {
    position: sticky;
    top: 88px;
    align-self: start;
  }
  .toc ol {
    flex-direction: column;
    border-left: 1px solid var(--site-border);
    padding-left: 0.25rem;
  }
}

.feature-block {
  scroll-margin-top: 88px;
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--site-border);
}

.feature-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.feature-block > p {
  margin-top: 0.75rem;
  color: var(--site-fg-muted);
  max-width: 44rem;
}

.feature-block h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.feature-list {
  display: grid;
  gap: 1rem 2rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-list b {
  display: block;
  margin-bottom: 0.25rem;
}

.feature-list p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.notice {
  display: block;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--site-border);
  border-left: 3px solid var(--site-waiting);
  border-radius: var(--site-radius-md);
  background: var(--site-bg-elevated);
  font-size: var(--site-text-sm);
  color: var(--site-fg-muted);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: var(--site-section);
  border-top: 1px solid var(--site-border);
  background: var(--site-bg-elevated);
  padding: 3.5rem 0 2rem;
  font-size: var(--site-text-sm);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 56rem) {
  .site-footer__grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }
}

.site-footer__brand {
  grid-column: 1 / -1;
}

@media (min-width: 56rem) {
  .site-footer__brand {
    grid-column: auto;
  }
}

.site-footer__brand p {
  margin-top: 0.75rem;
  color: var(--site-fg-muted);
  max-width: 22rem;
}

.site-footer h2 {
  font-size: var(--site-text-xs);
  font-family: var(--site-font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-fg-subtle);
  margin-bottom: 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.site-footer ul a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--site-fg-muted);
  text-decoration: none;
}

.site-footer ul a:hover {
  color: var(--site-fg);
  text-decoration: underline;
}

.site-footer__legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--site-border);
  color: var(--site-fg-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ---------------------------------------------------------------- production additions (KAN-336) */

/* Former inline styles of the prototype (the CSP allows no inline style). */
.mock-initial--blue {
  background: #6ea8fe;
}
.mock-initial--orange {
  background: #ff9f1c;
}
.mock-initial--green {
  background: #3ddc84;
}
.mock-initial--violet {
  background: #c9a7ff;
}
.mock-side__label--spaced {
  margin-top: 10px;
}
.more-link {
  margin-top: 2rem;
}
.section__head--flush {
  margin-bottom: 0;
}
.page-hero__actions {
  margin-top: 2rem;
}
.plan__title {
  font-size: var(--site-h3);
}
.notice--wide {
  max-width: 56rem;
  margin: 0 auto 2rem;
}

/* Long-form text: legal pages, docs, security, notices. */
.prose {
  max-width: 44rem;
  min-width: 0;
}

.prose--wide {
  max-width: none;
}

.prose--wide > section > p,
.prose--wide > section > ul {
  max-width: 44rem;
}

.prose section > * + * {
  margin-top: 1rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  margin-top: 2.75rem;
  scroll-margin-top: 88px;
}

.prose h3 {
  margin-top: 2rem;
  scroll-margin-top: 88px;
}

.prose h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0;
}

.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.prose li + li {
  margin-top: 0.375rem;
}

.prose blockquote {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--site-border-strong);
  background: var(--site-bg-elevated);
  border-radius: 0 var(--site-radius-md) var(--site-radius-md) 0;
}

.prose blockquote > * + * {
  margin-top: 0.75rem;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--site-border);
  margin: 2.5rem 0;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-md);
  background: var(--site-code-bg);
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  line-height: 1.5;
}

.prose pre code {
  border: 0;
  padding: 0;
  background: none;
  font-size: inherit;
}

.prose details {
  margin-top: 0.75rem;
}

.prose summary {
  cursor: pointer;
  color: var(--site-accent);
  font-size: var(--site-text-sm);
}

.prose .table-wrap {
  margin-top: 1.25rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--site-text-sm);
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--site-border);
}

.prose thead th {
  color: var(--site-fg-muted);
  font-weight: 600;
}

.legal-meta {
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  color: var(--site-fg-subtle);
}

.page-hero .legal-meta {
  margin-top: 1rem;
  font-size: var(--site-text-xs);
}

/* Download page */
.package-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--site-text-sm);
}

.package-table th,
.package-table td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--site-border);
  vertical-align: top;
}

.package-table thead th {
  color: var(--site-fg-muted);
  font-weight: 600;
}

.download__invite {
  margin-top: 1.5rem;
  text-align: center;
  font-size: var(--site-text-sm);
}

.download__invite + .download__meta {
  margin-top: 0.5rem;
}

.package-table td:last-child,
.package-table th:last-child {
  white-space: nowrap;
}

.download {
  scroll-margin-top: 88px;
}

.release {
  border-top: 1px solid var(--site-border);
  padding-top: 1.25rem;
}

.release h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.release time {
  font-family: var(--site-font-mono);
  font-size: var(--site-text-xs);
  color: var(--site-fg-subtle);
  font-weight: 400;
}

.steps-list li + li {
  margin-top: 0.5rem;
}

.guide-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-grid li {
  padding: 1rem 1.25rem;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-bg-elevated);
}

.guide-grid b {
  display: block;
  margin-bottom: 0.25rem;
}

.guide-grid p {
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.address {
  font-style: normal;
}

/* Invite-only pilot ribbon (owner's decision 2026-10-12). */
.pilot-ribbon {
  background: var(--site-bg-sunken);
  border-bottom: 1px solid var(--site-border);
  color: var(--site-fg);
  font-size: var(--site-text-sm);
  padding: 0.5rem 0;
  text-align: center;
}

.pilot-ribbon b {
  color: var(--site-waiting-fg);
}

/* Cookie consent banner (only with analytics configured). */
.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  background: var(--site-bg-elevated);
  border-top: 1px solid var(--site-border-strong);
  box-shadow: var(--site-shadow);
  padding: 1rem 0;
  font-size: var(--site-text-sm);
}

.consent[hidden] {
  display: none;
}

.consent__inner {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.consent__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (min-width: 48rem) {
  .consent__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.link-button[hidden] {
  display: none;
}

.coming-next {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--site-border-strong);
  border-radius: var(--site-radius-lg);
  color: var(--site-fg-muted);
  font-size: var(--site-text-sm);
}

.coming-next b {
  color: var(--site-fg);
}
