/* ==========================================================================
   aimadeit – design prototype (phase 2.5)
   Single source for tokens and components. Values follow docs/DESIGN_SYSTEM.md.
   Layout concept: dark, quiet surfaces; one light source per viewport;
   the "Prüfspur" (review trail) runs along the left edge of every page.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens -------------------------------------------------------- */
:root {
  color-scheme: dark; /* D-005: dark only */

  /* primitives */
  --night-950: #0B0B1A;
  --night-925: #120F26;
  --night-900: #191337;
  --night-850: #221A4A;
  --night-800: #2C2360;
  --violet-300: #BCA5FF;
  --violet-500: #8559FF;
  --violet-600: #6A3BEF;
  --violet-650: #7546F3;
  --violet-700: #5F31E0;
  --slate-200: #C8C4E0;
  --slate-400: #A09BC2;
  --slate-500: #7D76A8;
  --slate-600: #6F6A92;
  --green-300: #5BE3A4;
  --amber-300: #FFC966;
  --rose-300: #FF8091;
  --mint-300: #8FE3BF;
  --cloud-white: #F7F7FC;

  /* semantic */
  --bg-base: var(--night-950);
  --bg-sunken: var(--night-925);
  --surface-1: var(--night-900);
  --surface-2: var(--night-850);
  --surface-3: var(--night-800);
  --surface-glass: rgb(25 19 55 / 0.8);
  --surface-accent: rgb(133 89 255 / 0.14);

  --text-primary: var(--cloud-white);
  --text-secondary: var(--slate-200);
  --text-tertiary: var(--slate-400);
  --text-accent: var(--violet-300);
  --text-disabled: var(--slate-600);

  --border-subtle: rgb(188 165 255 / 0.10);
  --border-default: rgb(188 165 255 / 0.18);
  --border-control: var(--slate-500);
  --border-accent: var(--violet-500);
  --focus-ring: var(--violet-300);

  --action-primary: var(--violet-600);
  --action-primary-hover: var(--violet-650);
  --action-primary-active: var(--violet-700);
  --action-secondary: rgb(247 247 252 / 0.04);

  --success: var(--green-300);
  --warning: var(--amber-300);
  --danger: var(--rose-300);

  --gradient-brand: linear-gradient(135deg, var(--violet-500), var(--violet-300));
  --gradient-text: linear-gradient(90deg, var(--cloud-white), var(--violet-300));
  --gradient-fade-line: linear-gradient(180deg, rgb(133 89 255 / 0.9), rgb(133 89 255 / 0));

  --glow-sm: 0 0 0 1px rgb(133 89 255 / 0.4), 0 0 16px rgb(133 89 255 / 0.25);
  --glow-md: 0 0 32px rgb(133 89 255 / 0.35);
  --glow-lg: 0 0 120px rgb(133 89 255 / 0.35);
  --highlight: inset 0 1px 0 rgb(247 247 252 / 0.05);
  --elevation-1: var(--highlight), 0 1px 2px rgb(0 0 0 / 0.4);
  --elevation-2: var(--highlight), 0 8px 24px rgb(0 0 0 / 0.45);
  --elevation-3: var(--highlight), 0 24px 64px rgb(0 0 0 / 0.55);

  /* type */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-display: clamp(2.5rem, 1.671rem + 3.536vw, 4.5rem);
  --text-h1: clamp(2.25rem, 1.732rem + 2.21vw, 3.5rem);
  --text-h2: clamp(1.875rem, 1.513rem + 1.547vw, 2.75rem);
  --text-h3: clamp(1.375rem, 1.219rem + 0.663vw, 1.75rem);
  --text-h4: clamp(1.125rem, 1.073rem + 0.221vw, 1.25rem);
  --text-lead: clamp(1.125rem, 1.073rem + 0.221vw, 1.25rem);
  --text-body: clamp(1rem, 0.974rem + 0.11vw, 1.0625rem);
  --text-body-sm: 0.9375rem;
  --text-caption: 0.8125rem;
  --text-label: 0.9375rem;
  --text-eyebrow: clamp(0.75rem, 0.724rem + 0.11vw, 0.8125rem);
  --text-code: clamp(0.8125rem, 0.787rem + 0.11vw, 0.875rem);

  /* space (4px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;
  --space-32: 8rem; --space-40: 10rem;

  --gutter: 20px;
  --section-y: var(--space-16);
  --w-prose: 680px;
  --w-form: 720px;
  --w-content: 1200px;
  --w-wide: 1360px;
  --header-h: 64px;

  --radius-xs: 6px; --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px; --radius-full: 9999px;

  --duration-instant: 100ms; --duration-fast: 160ms; --duration-base: 240ms;
  --duration-slow: 400ms; --duration-deliberate: 640ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}
@media (min-width: 768px) { :root { --gutter: 32px; --section-y: var(--space-24); } }
@media (min-width: 1024px) { :root { --gutter: 40px; --header-h: 72px; } }
@media (min-width: 1280px) { :root { --section-y: var(--space-32); } }

/* ---------- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg-base);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  overflow-x: clip;
}
/* fine grain against gradient banding (DS 2.4) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; color: var(--text-primary); }
p { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgb(133 89 255 / 0.45); color: var(--cloud-white); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .btn, .card, .choice, .chip, .field__control { border: 1px solid CanvasText; }
}

.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(--space-4); top: -100px; z-index: 200;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  background: var(--action-primary); color: var(--cloud-white); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

.container { width: min(100% - 2 * var(--gutter), var(--w-content)); margin-inline: auto; }
.container--wide { width: min(100% - 2 * var(--gutter), var(--w-wide)); }
.container--prose { width: min(100% - 2 * var(--gutter), var(--w-prose)); }
.container--form { width: min(100% - 2 * var(--gutter), var(--w-form)); }

/* ---------- Type helpers -------------------------------------------------- */
.t-display { font-size: var(--text-display); line-height: 1.05; letter-spacing: -0.035em; }
.t-h1 { font-size: var(--text-h1); line-height: 1.1; letter-spacing: -0.03em; }
.t-h2 { font-size: var(--text-h2); line-height: 1.15; letter-spacing: -0.025em; }
.t-h3 { font-size: var(--text-h3); line-height: 1.25; letter-spacing: -0.015em; }
.t-h4 { font-size: var(--text-h4); line-height: 1.35; letter-spacing: -0.005em; }
.t-lead { font-size: var(--text-lead); line-height: 1.6; color: var(--text-secondary); }
.t-small { font-size: var(--text-body-sm); line-height: 1.55; }
.t-caption { font-size: var(--text-caption); line-height: 1.45; color: var(--text-tertiary); font-weight: 500; }
.t-secondary { color: var(--text-secondary); }
.t-tertiary { color: var(--text-tertiary); }
.mono { font-family: var(--font-mono); }
.accent-word {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@media (forced-colors: active) { .accent-word { color: CanvasText; background: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-eyebrow); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
  color: var(--text-accent);
}
.eyebrow__slash { color: var(--text-tertiary); }

/* inline link (C-02) */
.link {
  color: var(--text-accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgb(188 165 255 / 0.5);
  transition: color var(--duration-fast) var(--ease-standard), text-decoration-color var(--duration-fast);
}
.link:hover { color: var(--text-primary); text-decoration-color: var(--violet-500); }
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--text-accent); font-weight: 500; text-decoration: none;
  font-size: var(--text-body-sm);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--duration-fast) var(--ease-standard); }
.link-arrow:hover { color: var(--text-primary); }
.link-arrow:hover svg { transform: translateX(4px); }

/* placeholders for owner input (UX 9) */
.ph {
  font-family: var(--font-mono); font-size: 0.85em; font-weight: 500;
  color: var(--warning);
  background: rgb(255 201 102 / 0.08);
  border: 1px dashed rgb(255 201 102 / 0.45);
  border-radius: var(--radius-xs);
  padding: 0 0.35em;
  white-space: nowrap;
}
.ph--block { white-space: normal; display: inline; }
html.show-tbc .tbc {
  text-decoration: underline dotted rgb(255 201 102 / 0.8);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* ---------- Prototype bar ------------------------------------------------- */
.proto-bar {
  position: relative; z-index: 60;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.4;
  color: var(--text-tertiary);
}
.proto-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5);
  padding-block: var(--space-2);
}
.proto-bar__tag {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--warning); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.proto-bar__tag::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--warning); }
.proto-bar nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.proto-bar a { color: var(--text-secondary); text-decoration: none; padding: 4px 0; }
.proto-bar a[aria-current="page"] { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.proto-bar a:hover { color: var(--text-primary); }
.proto-bar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-secondary); }
.proto-bar input { accent-color: var(--violet-500); width: 14px; height: 14px; margin: 0; }
.proto-bar__spacer { flex: 1; }
@media (max-width: 639px) { .proto-bar__hide-sm { display: none; } }

/* ---------- Buttons (C-01) ------------------------------------------------ */
.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h);
  padding: 0 var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--text-label); font-weight: 600; line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-instant) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--duration-fast) var(--ease-standard); }
.btn:active { transform: scale(0.98); }
.btn--sm { --btn-h: 40px; padding: 0 var(--space-4); font-weight: 500; }
.btn--lg { --btn-h: 56px; padding: 0 28px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--action-primary);
  color: var(--cloud-white);
  border-color: rgb(188 165 255 / 0.3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(0 0 0 / 0.4);
}
.btn--primary:hover {
  background: var(--action-primary-hover);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), var(--glow-sm), 0 8px 28px rgb(106 59 239 / 0.35);
}
.btn--primary:hover svg { transform: translateX(3px); }
.btn--primary:active { background: var(--action-primary-active); }

.btn--secondary {
  background: var(--action-secondary);
  color: var(--text-primary);
  border-color: var(--border-control);
}
.btn--secondary:hover { background: var(--surface-2); border-color: var(--slate-400); }
.btn--secondary:active { background: var(--surface-3); }

.btn--ghost { background: transparent; color: var(--text-accent); padding-inline: var(--space-3); }
.btn--ghost:hover { background: rgb(133 89 255 / 0.12); color: var(--text-primary); }
.btn--ghost:active { background: rgb(133 89 255 / 0.18); }

.btn--icon { --btn-h: 44px; width: 44px; padding: 0; background: transparent; color: var(--text-primary); }
.btn--icon:hover { background: rgb(133 89 255 / 0.12); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--surface-3); color: var(--text-disabled); border-color: transparent;
  box-shadow: none; cursor: not-allowed; transform: none;
}
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading::after {
  content: attr(data-loading-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--cloud-white);
}
.btn.is-loading::before {
  content: ""; position: absolute; left: calc(50% - 74px); top: calc(50% - 8px);
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.35); border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges (C-03) ------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
.badge--demo { background: rgb(133 89 255 / 0.16); color: var(--text-accent); box-shadow: inset 0 0 0 1px rgb(188 165 255 / 0.25); }
.badge--demo::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--violet-500); box-shadow: 0 0 8px var(--violet-500); }
.badge--status { color: var(--text-secondary); background: rgb(247 247 252 / 0.04); box-shadow: inset 0 0 0 1px var(--border-default); }
.badge--status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.badge--illustration { height: auto; padding: 0; color: var(--text-tertiary); background: none; letter-spacing: 0.1em; font-size: 11px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: var(--radius-xs); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary);
}

/* ---------- Icon container (C-04) ---------------------------------------- */
.icon-box {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  color: var(--text-accent);
  transition: box-shadow var(--duration-fast) var(--ease-standard), background var(--duration-fast);
}
.icon-box svg { width: 22px; height: 22px; }
@media (min-width: 768px) { .icon-box { width: 48px; height: 48px; } .icon-box svg { width: 24px; height: 24px; } }
.i { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Wordmark ------------------------------------------------------ */
.wordmark {
  display: inline-flex; align-items: baseline;
  font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1;
  color: var(--cloud-white); text-decoration: none;
}
.wordmark__ai { color: var(--violet-300); }
.wordmark__i { position: relative; display: inline-block; }
.wordmark__dot {
  position: absolute; left: 50%; top: -0.02em;
  width: 0.2em; height: 0.2em; transform: translateX(-50%);
  border-radius: 1.5px; background: var(--violet-500);
  box-shadow: 0 0 8px rgb(133 89 255 / 0.9);
}

/* ---------- Header (C-14) ------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--header-h);
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base), backdrop-filter var(--duration-base);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--border-subtle);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background: var(--surface-1); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header.is-scrolled { background: var(--surface-1); backdrop-filter: none; }
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: var(--space-6); }
.site-header .wordmark { margin-right: auto; }
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--space-1); }
.nav__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 var(--space-3);
  border: 0; background: none; border-radius: var(--radius-sm);
  font-size: var(--text-body-sm); font-weight: 500; color: var(--text-secondary);
  text-decoration: none; cursor: pointer;
  transition: color var(--duration-fast), background-color var(--duration-fast);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text-primary); background: rgb(247 247 252 / 0.04); }
.nav__link[aria-current="page"] { color: var(--text-primary); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--gradient-brand);
}
.nav__link svg { width: 14px; height: 14px; transition: transform var(--duration-base) var(--ease-standard); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.header-cta-sm { display: inline-flex; }
@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-toggle, .header-cta-sm { display: none !important; }
}

/* mega menu (C-15) */
.has-mega { position: relative; }
.mega {
  position: absolute; left: 50%; top: calc(100% + 14px);
  width: min(760px, 90vw);
  transform: translateX(-42%);
  padding: var(--space-3);
  display: grid; grid-template-columns: 1fr 1fr 0.9fr; gap: var(--space-2);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: var(--elevation-3), inset 0 0 0 1px var(--border-default);
  animation: pop-in var(--duration-base) var(--ease-out-expo);
}
.mega[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translate(-42%, -6px); } }
.mega__item {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3); border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--duration-fast);
}
.mega__item:hover { background: rgb(247 247 252 / 0.04); }
.mega__item:hover .icon-box { box-shadow: inset 0 0 0 1px var(--border-accent); }
.mega__item .icon-box { width: 40px; height: 40px; }
.mega__item .icon-box svg { width: 20px; height: 20px; }
.mega__title { display: block; font-size: var(--text-body-sm); font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.mega__desc { display: block; font-size: var(--text-caption); color: var(--text-tertiary); line-height: 1.45; margin-top: 2px; }
.mega__all { grid-column: 1 / 3; padding: var(--space-2) var(--space-3); }
.mega__aside {
  grid-column: 3; grid-row: 1 / 5;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5); border-radius: var(--radius-md);
  background:
    radial-gradient(120% 80% at 100% 0%, rgb(133 89 255 / 0.28), transparent 60%),
    var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--border-default);
}
.mega__aside p { font-size: var(--text-body-sm); color: var(--text-secondary); line-height: 1.5; }
.mega__aside strong { display: block; color: var(--text-primary); font-size: var(--text-h4); line-height: 1.3; margin-bottom: var(--space-2); }

/* mobile menu (C-16) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background:
    radial-gradient(90% 50% at 80% 0%, rgb(133 89 255 / 0.22), transparent 70%),
    var(--bg-base);
  animation: menu-in var(--duration-base) var(--ease-out-expo);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.mobile-menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.mobile-menu__list { display: grid; padding-block: var(--space-6); }
.mobile-menu__list > li { border-bottom: 1px solid var(--border-subtle); }
.mobile-menu__link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 64px; padding: 0; border: 0; background: none;
  font-size: var(--text-h3); font-weight: 600; letter-spacing: -0.015em; color: var(--text-primary);
  text-decoration: none; cursor: pointer; text-align: left;
}
.mobile-menu__link svg { width: 20px; height: 20px; color: var(--text-tertiary); transition: transform var(--duration-base); }
.mobile-menu__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-menu__sub { display: grid; gap: 2px; padding-bottom: var(--space-4); }
.mobile-menu__sub a {
  display: flex; align-items: center; gap: var(--space-3); min-height: 48px;
  color: var(--text-secondary); text-decoration: none; font-size: 1rem;
}
.mobile-menu__sub a::before { content: ""; width: 6px; height: 6px; border-radius: 2px; border: 1px solid var(--violet-300); }
.mobile-menu__foot { margin-top: auto; padding-block: var(--space-6) var(--space-8); display: grid; gap: var(--space-4); }
.mobile-menu__foot p { text-align: center; }
body.is-locked { overflow: hidden; }

/* ---------- Sections & review trail (C-10 / D-008) ----------------------- */
.section { position: relative; padding-block: calc(var(--section-y) / 2); }
main > .section:last-child { padding-bottom: var(--section-y); }
.section--band { background: linear-gradient(180deg, transparent, rgb(25 19 55 / 0.55) 12%, rgb(25 19 55 / 0.55) 88%, transparent); }
.section-head { display: grid; align-content: start; gap: var(--space-3); max-width: 720px; margin-bottom: var(--space-10); }
@media (min-width: 1024px) { .section-head { margin-bottom: var(--space-12); } }
.section-head .t-lead { margin-top: var(--space-1); max-width: 640px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* inline review node in eyebrows (all widths) */
.node {
  position: relative; display: inline-block; flex: none;
  width: 8px; height: 8px; border-radius: 2px;
  border: 1px solid var(--violet-300);
  transition: background-color var(--duration-slow) var(--ease-standard), box-shadow var(--duration-slow), border-color var(--duration-slow);
}
.is-checked .node, .node.is-checked {
  background: var(--violet-500); border-color: var(--violet-500);
  box-shadow: 0 0 10px rgb(133 89 255 / 0.9);
}

/* page-wide trail rail (wide screens only) */
.trail-rail, .trail-dot, .trail-label { display: none; }
@media (min-width: 1400px) {
  main { position: relative; }
  .trail-rail {
    display: block; position: absolute; z-index: 0; pointer-events: none;
    top: 0; bottom: 0;
    left: calc((100% - var(--w-content)) / 2 - 48px);
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border-default) 4%, var(--border-default) 96%, transparent);
  }
  .trail-rail__fill {
    position: absolute; left: 0; top: 0; width: 1px; height: 0;
    background: linear-gradient(180deg, rgb(133 89 255 / 0), var(--violet-500) 8%, var(--violet-300));
    box-shadow: 0 0 12px rgb(133 89 255 / 0.6);
    transition: height 900ms var(--ease-out-expo);
  }
  .trail-dot, .trail-label { top: calc(var(--section-y) / 2 + 5px); }
  .hero > .trail-dot, .hero > .trail-label { top: calc(var(--space-24) + 5px); }
  .page-hero > .trail-dot, .page-hero > .trail-label { top: calc(var(--space-16) + 5px); }
  .trail-dot, .trail-label { display: block; }
  .trail-dot {
    position: absolute; left: calc((100% - var(--w-content)) / 2 - 52px);
    width: 9px; height: 9px; border-radius: 2px;
    background: var(--bg-base); border: 1px solid var(--violet-300);
    transition: background-color var(--duration-slow), box-shadow var(--duration-slow), border-color var(--duration-slow);
    z-index: 1;
  }
  .is-checked > .trail-dot { background: var(--violet-500); border-color: var(--violet-500); box-shadow: 0 0 12px rgb(133 89 255 / 0.9); }
  .trail-label {
    position: absolute; left: calc((100% - var(--w-content)) / 2 - 64px); transform: translateX(-100%);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-tertiary);
    white-space: nowrap; line-height: 9px;
  }
}

/* ---------- Aurora -------------------------------------------------------- */
.aurora { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.hero > .aurora { -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.aurora::before, .aurora::after { content: ""; position: absolute; border-radius: 50%; filter: blur(10px); }
.aurora::before {
  width: 900px; height: 700px; left: 50%; top: -260px; transform: translateX(-20%);
  background: radial-gradient(closest-side, rgb(133 89 255 / 0.35), rgb(133 89 255 / 0.08) 55%, transparent);
}
.aurora::after {
  width: 600px; height: 500px; left: 8%; top: 30%;
  background: radial-gradient(closest-side, rgb(188 165 255 / 0.12), transparent);
}
.aurora--center::before { left: 50%; top: -120px; transform: translateX(-50%); width: 1100px; height: 640px; }
.aurora--center::after { left: auto; right: 0; top: 50%; }

/* ---------- Cards (C-06) -------------------------------------------------- */
.card {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: var(--elevation-1), inset 0 0 0 1px var(--border-subtle);
  padding: var(--space-6);
}
@media (min-width: 1024px) { .card { padding: var(--space-8); } }
.card--interactive {
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), background-color var(--duration-fast);
}
.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-2), inset 0 0 0 1px rgb(133 89 255 / 0.55), var(--glow-md);
}
.card--interactive:hover .icon-box { box-shadow: inset 0 0 0 1px var(--border-accent); background: linear-gradient(135deg, rgb(133 89 255 / 0.22), rgb(188 165 255 / 0.08)), var(--surface-2); }
.card--interactive:hover .link-arrow svg { transform: translateX(4px); }
.card--interactive:hover .link-arrow { color: var(--text-primary); }
.card--interactive:focus-within { box-shadow: var(--elevation-2), inset 0 0 0 1px rgb(133 89 255 / 0.55); }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.card--highlight {
  background:
    linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
    linear-gradient(135deg, rgb(133 89 255 / 0.85), rgb(188 165 255 / 0.15) 45%, rgb(188 165 255 / 0.05)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--elevation-1), 0 0 60px rgb(133 89 255 / 0.14);
}
.card--glass {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card--glass { background: var(--surface-1); } }
@media (prefers-reduced-transparency: reduce) { .card--glass { background: var(--surface-1); backdrop-filter: none; } }

/* check list with review nodes */
.checklist { display: grid; gap: var(--space-3); padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 16px 1fr; gap: var(--space-3); align-items: baseline; }
.checklist li::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; translate: 2px 0;
  background: var(--violet-500); box-shadow: 0 0 8px rgb(133 89 255 / 0.7);
}
.checklist--open li::before { background: transparent; border: 1px solid var(--violet-300); box-shadow: none; }
.checklist--neutral li::before { background: var(--slate-500); box-shadow: none; }

/* ---------- Hero ---------------------------------------------------------- */
.hero { position: relative; padding-block: var(--space-12) var(--space-10); overflow: clip; }
@media (min-width: 1024px) { .hero { padding-block: var(--space-24) var(--space-16); } }
.hero__grid { position: relative; z-index: 1; display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); } }
.hero__copy { display: grid; gap: var(--space-6); min-width: 0; }
.hero__copy .t-lead { max-width: 560px; }
.hero__ctas { display: grid; gap: var(--space-3); }
@media (min-width: 480px) { .hero__ctas { display: flex; flex-wrap: wrap; } }
.hero__micro { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--text-caption); color: var(--text-tertiary); }
.hero__micro span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero__micro span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--violet-500); }

/* ---------- Review editor (C-11) ----------------------------------------- */
.editor {
  position: relative; min-width: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: var(--elevation-3), inset 0 0 0 1px var(--border-default), 0 0 120px rgb(133 89 255 / 0.22);
  overflow: hidden;
}
.editor::before { /* gradient edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgb(133 89 255 / 0.8), transparent 35%, transparent 70%, rgb(188 165 255 / 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.editor__bar {
  display: flex; align-items: center; gap: var(--space-1);
  padding: 10px var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 12px;
}
.editor__tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 10px; border-radius: 8px 8px 0 0;
  color: var(--text-tertiary);
}
.editor__tab--active { color: var(--text-primary); background: var(--bg-sunken); box-shadow: inset 0 2px 0 var(--violet-500); }
.editor__count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgb(133 89 255 / 0.2); color: var(--text-accent); font-size: 11px;
}
.editor__bar .badge--illustration { margin-left: auto; padding-bottom: 6px; }
.editor__code {
  position: relative;
  background: var(--bg-sunken);
  padding: var(--space-4) 0;
  font-family: var(--font-mono); font-size: var(--text-code); line-height: 1.9;
  counter-reset: ln;
}
.code-line {
  position: relative;
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: center;
  padding-right: var(--space-4);
  white-space: pre;
  transition: opacity var(--duration-slow) var(--ease-out-expo), transform var(--duration-slow) var(--ease-out-expo), background-color var(--duration-base);
}
.code-line::before {
  counter-increment: ln; content: counter(ln);
  color: var(--slate-600); text-align: right; padding-right: 1em; user-select: none;
}
.code-line__src { overflow: hidden; text-overflow: clip; }
.code-line--added { background: linear-gradient(90deg, rgb(255 201 102 / 0.10), transparent 70%); box-shadow: inset 2px 0 0 var(--warning); }
.k { color: var(--violet-300); }
.s { color: var(--mint-300); }
.f { color: var(--cloud-white); }
.c { color: var(--slate-400); }
.p { color: var(--slate-200); }
.note {
  display: inline-flex; align-items: center; gap: 8px; margin-left: var(--space-3);
  font-size: 11.5px; color: var(--text-tertiary);
  transition: opacity var(--duration-base) var(--ease-standard);
}
.note::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; flex: none;
  background: var(--violet-500); box-shadow: 0 0 10px rgb(133 89 255 / 0.9);
}
.note--added { color: var(--warning); }
.note--added::before { background: var(--warning); box-shadow: 0 0 10px rgb(255 201 102 / 0.7); }
.editor__scan {
  position: absolute; left: 0; right: 0; top: var(--space-4); height: 1.9em;
  background: linear-gradient(90deg, rgb(133 89 255 / 0.18), rgb(133 89 255 / 0.04) 60%, transparent);
  box-shadow: inset 2px 0 0 var(--violet-500);
  opacity: 0; pointer-events: none;
  transition: transform 420ms var(--ease-standard), opacity var(--duration-base);
}
.editor .editor__review { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); font-size: var(--text-body-sm); }
.editor__review li { transition: opacity var(--duration-base), transform var(--duration-base) var(--ease-out-expo); }
.editor__status {
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: 10px var(--space-5); border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-tertiary);
}
.editor__status b { font-weight: 500; color: var(--success); }

/* sequence states (JS adds .is-playing then .s1…s4). Without JS: final state. */
.editor.is-playing .code-line { opacity: 0; transform: translateY(6px); }
.editor.is-playing .code-line--added { display: none; }
.editor.is-playing .note, .editor.is-playing .editor__review li { opacity: 0; }
.editor.is-playing .editor__review li { transform: translateY(4px); }
.editor.is-playing .editor__status b { color: var(--text-tertiary); }
.editor.s1 .code-line { opacity: 1; transform: none; }
.editor.s1 .code-line:nth-child(2) { transition-delay: 80ms; }
.editor.s1 .code-line:nth-child(3) { transition-delay: 160ms; }
.editor.s1 .code-line:nth-child(4) { transition-delay: 240ms; }
.editor.s1 .code-line:nth-child(5) { transition-delay: 320ms; }
.editor.s1 .code-line:nth-child(6) { transition-delay: 400ms; }
.editor.s1 .code-line:nth-child(7) { transition-delay: 480ms; }
.editor.s2 .editor__scan { opacity: 1; }
.editor .note.is-on, .editor .editor__review li.is-on { opacity: 1; transform: none; }
.editor .code-line--added.is-on { display: grid; animation: line-in var(--duration-slow) var(--ease-out-expo); }
@keyframes line-in { from { opacity: 0; transform: translateX(-8px); background-color: rgb(255 201 102 / 0.25); } }
.editor.s4 .editor__status b { color: var(--success); }

@media (max-width: 479px) {
  .editor__code { font-size: 11px; }
  .code-line { grid-template-columns: 2.2em minmax(0, 1fr) auto; padding-right: var(--space-3); }
  .editor__tab:not(.editor__tab--active) .editor__tab-name { display: none; }
  .note span { display: none; }
  .note { margin-left: var(--space-2); }
  .editor__review { padding-inline: var(--space-4); }
}

/* ---------- Grids --------------------------------------------------------- */
.grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .grid { gap: var(--space-6); } }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.split { display: grid; gap: var(--space-10); }
@media (min-width: 1024px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--space-16); }
  .split--rev { grid-template-columns: 7fr 5fr; }
  .split--4-8 { grid-template-columns: 4fr 8fr; }
  .sticky-col { position: sticky; top: calc(var(--header-h) + var(--space-10)); align-self: start; }
}
.split > * { min-width: 0; }

/* ---------- Pillars (S3) -------------------------------------------------- */
.pillar { display: grid; gap: var(--space-3); align-content: start; }
.pillar h3 { font-size: var(--text-h4); line-height: 1.35; margin-top: var(--space-2); }
.pillar p { font-size: var(--text-body-sm); color: var(--text-secondary); }
.copy-stack { display: grid; gap: var(--space-5); align-content: start; }
.copy-stack p:not(.t-lead) { color: var(--text-secondary); }

/* ---------- Service cards (C-07) ----------------------------------------- */
.services { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); } .services > :last-child { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .services { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .services > * { grid-column: span 2; }
  .services > :nth-child(4), .services > :nth-child(5) { grid-column: span 3; }
}
.service { display: flex; flex-direction: column; gap: var(--space-4); }
.service__head { display: grid; justify-items: start; gap: var(--space-5); }
.service h3 { font-size: var(--text-h3); line-height: 1.25; letter-spacing: -0.015em; }
.service > p { color: var(--text-secondary); }
.service .checklist { font-size: var(--text-body-sm); color: var(--text-secondary); gap: var(--space-2); }
.service .link-arrow { margin-top: auto; padding-top: var(--space-2); }
.services__more { margin-top: var(--space-8); color: var(--text-secondary); }

/* ---------- Situations (C-08) -------------------------------------------- */
.situations { list-style: none; padding: 0; border-top: 1px solid var(--border-subtle); }
.situation {
  position: relative;
  display: grid; grid-template-columns: 20px 1fr; gap: var(--space-2) var(--space-4);
  padding: var(--space-6) var(--space-4) var(--space-6) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--duration-fast);
}
@media (min-width: 768px) { .situation { padding: var(--space-8) var(--space-6) var(--space-8) var(--space-2); } }
.situation .node { margin-top: 0.55em; justify-self: center; }
.situation:hover { background: linear-gradient(90deg, rgb(25 19 55 / 0.9), transparent); }
.situation:hover .node { background: var(--violet-500); border-color: var(--violet-500); box-shadow: 0 0 10px rgb(133 89 255 / 0.9); }
.situation q { font-size: var(--text-h4); font-weight: 600; line-height: 1.4; letter-spacing: -0.005em; quotes: "„" "“"; color: var(--text-primary); text-wrap: balance; }
.situation p, .situation .link-arrow { grid-column: 2; }
.situation p { color: var(--text-secondary); }
.situations__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-10); }
.situations__cta p { color: var(--text-secondary); }

/* ---------- Demo cards (C-09) -------------------------------------------- */
.demo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.demo__visual {
  position: relative; aspect-ratio: 16 / 10; max-width: 100%;
  background:
    radial-gradient(80% 90% at 85% 0%, rgb(133 89 255 / 0.30), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-sunken));
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}
.demo__visual > .badge { position: absolute; top: var(--space-4); left: var(--space-4); z-index: 2; }
.demo__visual::after { /* fine grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(188 165 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(188 165 255 / 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(80% 80% at 70% 30%, #000, transparent);
}
.demo__body { display: grid; gap: var(--space-3); padding: var(--space-6); align-content: start; flex: 1; }
.demo__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.demo h3 { font-size: var(--text-h4); line-height: 1.35; }
.demo p { font-size: var(--text-body-sm); color: var(--text-secondary); }
.demo__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); }
.demo__soon { white-space: nowrap; font-size: var(--text-caption); color: var(--text-tertiary); font-family: var(--font-mono); }

/* mini illustrations inside demo visuals */
.mini { position: absolute; inset: 52px 22px 18px; display: grid; gap: 8px; align-content: center; z-index: 1; font-size: 11.5px; line-height: 1.35; }
.mini__bubble { max-width: 78%; padding: 8px 11px; border-radius: 12px; background: var(--surface-3); color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.mini__bubble--me { justify-self: end; background: rgb(106 59 239 / 0.85); color: var(--cloud-white); border-bottom-right-radius: 4px; }
.mini__bubble--bot { border-bottom-left-radius: 4px; }
.mini__handoff { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-accent); padding: 4px 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgb(188 165 255 / 0.35); }
.mini__handoff::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.mini__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; color: var(--text-secondary); }
.mini__track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mini__track i { display: block; height: 100%; border-radius: inherit; background: var(--gradient-brand); }
.mini__total { margin-top: 4px; display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px dashed var(--border-default); color: var(--text-tertiary); font-family: var(--font-mono); font-size: 10.5px; }
.mini__total b { font-family: var(--font-sans); font-size: 18px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mini__flow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; align-items: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary); }
.mini__flow .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--violet-500); box-shadow: 0 0 8px rgb(133 89 255 / 0.8); }
.mini__flow .dot--wait { background: transparent; border: 1px solid var(--violet-300); box-shadow: none; }
.mini__flow em { font-style: normal; color: var(--text-tertiary); }
.mini__flow .line { grid-column: 1 / -1; height: 1px; background: var(--border-subtle); }

/* ---------- KI transparency (S7, C-12) ----------------------------------- */
.ki { position: relative; overflow: clip; }
.ki .container { position: relative; z-index: 1; }
.ki__body { max-width: 760px; margin: 0 auto var(--space-12); display: grid; gap: var(--space-5); text-align: center; }
.ki__body p { color: var(--text-secondary); }
.compare { display: grid; gap: var(--space-4); align-items: stretch; }
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
.compare h3 { font-size: var(--text-h4); display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.compare .checklist { gap: 0; }
.compare .checklist li { padding-block: var(--space-3); border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.compare .card--highlight .checklist li { color: var(--text-primary); }
.compare__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 500; }
.compare .card--highlight .compare__label { color: var(--text-accent); }
.ki__quote { margin-top: var(--space-16); text-align: center; display: grid; gap: var(--space-3); justify-items: center; }
.ki__quote blockquote { font-size: var(--text-h2); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; max-width: 18ch; }
.ki__quote .claim { font-family: var(--font-mono); color: var(--text-accent); font-size: var(--text-body-sm); }

/* ---------- Portrait (C-26) ---------------------------------------------- */
.portrait { display: grid; gap: var(--space-10); align-items: center; }
@media (min-width: 1024px) { .portrait { grid-template-columns: 5fr 7fr; gap: var(--space-16); } }
.portrait__photo {
  position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 420px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 30% 20%, rgb(133 89 255 / 0.35), transparent 70%),
    repeating-linear-gradient(135deg, rgb(188 165 255 / 0.05) 0 1px, transparent 1px 14px),
    var(--surface-1);
  box-shadow: var(--elevation-2), inset 0 0 0 1px var(--border-default);
  display: grid; place-items: center; overflow: hidden;
}
@media (max-width: 1023px) { .portrait__photo { max-width: 320px; } }
.portrait__photo .ph { position: absolute; bottom: var(--space-5); left: var(--space-5); }
.portrait__photo .portrait__mark { font-size: 96px; font-weight: 600; letter-spacing: -0.04em; color: rgb(247 247 252 / 0.08); }
.portrait__copy { display: grid; gap: var(--space-5); }
.portrait__copy p { color: var(--text-secondary); }
.portrait__role { font-family: var(--font-mono); font-size: var(--text-body-sm); color: var(--text-accent); }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Process trail (S9 / L5, C-10) -------------------------------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: var(--space-2) var(--space-5); padding-bottom: var(--space-8); }
.step:last-child { padding-bottom: 0; }
.step::before { /* line */
  content: ""; position: absolute; left: 11.5px; top: 18px; bottom: -6px; width: 1px;
  background: linear-gradient(180deg, rgb(133 89 255 / 0.7), rgb(188 165 255 / 0.18));
}
.step:last-child::before { display: none; }
.step__node {
  position: relative; z-index: 1; justify-self: center; margin-top: 6px;
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--bg-base); border: 1px solid var(--violet-300);
  transition: background-color var(--duration-slow), box-shadow var(--duration-slow), border-color var(--duration-slow);
}
.is-checked .step__node { background: var(--violet-500); border-color: var(--violet-500); box-shadow: 0 0 12px rgb(133 89 255 / 0.9); }
.is-checked .step:nth-child(2) .step__node { transition-delay: 120ms; }
.is-checked .step:nth-child(3) .step__node { transition-delay: 240ms; }
.is-checked .step:nth-child(4) .step__node { transition-delay: 360ms; }
.is-checked .step:nth-child(5) .step__node { transition-delay: 480ms; }
.step__num { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-accent); letter-spacing: 0.06em; }
.step h3 { font-size: var(--text-h4); line-height: 1.35; }
.step p { grid-column: 2; color: var(--text-secondary); font-size: var(--text-body-sm); }
.step__head { display: grid; gap: 2px; }
@media (min-width: 1024px) {
  .steps--h { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-6); }
  .steps--h .step { grid-template-columns: 1fr; padding-bottom: 0; gap: var(--space-3); align-content: start; }
  .steps--h .step::before { left: 18px; right: calc(-1 * var(--space-6)); top: 6px; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, rgb(133 89 255 / 0.7), rgb(188 165 255 / 0.18)); }
  .steps--h .step:last-child::before { display: none; }
  .steps--h .step__node { justify-self: start; margin: 0; }
  .steps--h .step p { grid-column: 1; }
  .steps--h .step__head { margin-top: var(--space-3); }
}
.steps__cta { margin-top: var(--space-12); }

/* ---------- Benefits (S10) ----------------------------------------------- */
.benefit { display: grid; gap: var(--space-3); align-content: start; }
.benefit h3 { font-size: var(--text-h4); line-height: 1.35; margin-top: var(--space-2); }
.benefit p { color: var(--text-secondary); font-size: var(--text-body-sm); }

/* ---------- FAQ (C-13) --------------------------------------------------- */
.faq { border-top: 1px solid var(--border-subtle); }
.faq__item { border-bottom: 1px solid var(--border-subtle); }
.faq__q { margin: 0; font-size: var(--text-h4); line-height: 1.35; }
.faq__btn {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
  width: 100%; min-height: 64px; padding: var(--space-5) 0;
  border: 0; background: none; text-align: left; cursor: pointer;
  font-size: inherit; font-weight: 600; letter-spacing: -0.005em; color: var(--text-primary);
}
.faq__btn:hover { color: var(--text-accent); }
.faq__icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border-default); transition: background-color var(--duration-fast), box-shadow var(--duration-fast); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; translate: -50% -50%; border-radius: 1px; transition: rotate var(--duration-base) var(--ease-standard), opacity var(--duration-base); }
.faq__icon::after { rotate: 90deg; }
.faq__btn[aria-expanded="true"] .faq__icon { background: rgb(133 89 255 / 0.16); box-shadow: inset 0 0 0 1px rgb(133 89 255 / 0.5); }
.faq__btn[aria-expanded="true"] .faq__icon::after { rotate: 0deg; opacity: 0; }
.faq__a { padding: 0 var(--space-12) var(--space-6) 0; color: var(--text-secondary); max-width: 68ch; }
.faq__a:not([hidden]) { animation: fade-down var(--duration-base) var(--ease-out-expo); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- CTA band (C-23) ---------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  display: grid; gap: var(--space-5); justify-items: center;
  background:
    linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
    linear-gradient(135deg, rgb(133 89 255 / 0.9), rgb(188 165 255 / 0.15) 40%, rgb(188 165 255 / 0.05) 70%, rgb(133 89 255 / 0.5)) border-box;
  border: 1px solid transparent;
}
@media (min-width: 768px) { .cta-band { padding: var(--space-20) var(--space-12); } }
.cta-band::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -60%; width: 120%; height: 120%; translate: -50% 0;
  background: radial-gradient(closest-side, rgb(133 89 255 / 0.38), rgb(133 89 255 / 0.06) 60%, transparent);
}
.cta-band h2 { max-width: 20ch; }
.cta-band p { color: var(--text-secondary); max-width: 52ch; }
.cta-band__alt { font-size: var(--text-body-sm); color: var(--text-tertiary); }

/* ---------- Footer (C-24) ------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border-subtle); padding-block: var(--space-20) var(--space-8); }
.footer-grid { display: grid; gap: var(--space-10); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-8); } }
.footer-brand { display: grid; gap: var(--space-4); align-content: start; max-width: 340px; }
.footer-brand .claim { font-family: var(--font-mono); font-size: var(--text-body-sm); color: var(--text-accent); }
.footer-brand p { font-size: var(--text-body-sm); color: var(--text-tertiary); }
.footer-col h2 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 500; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.footer-col a { display: inline-flex; min-height: 32px; align-items: center; color: var(--text-secondary); text-decoration: none; font-size: var(--text-body-sm); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { margin-top: var(--space-16); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8); justify-content: space-between; font-size: var(--text-caption); color: var(--text-tertiary); }
.footer-bottom .transparency { display: inline-flex; align-items: center; gap: var(--space-2); }
.footer-bottom .transparency::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--violet-500); box-shadow: 0 0 8px rgb(133 89 255 / 0.9); }

/* ---------- Service detail page ------------------------------------------ */
.breadcrumb { font-size: var(--text-caption); color: var(--text-tertiary); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); color: var(--slate-600); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: underline; }
.page-hero { position: relative; overflow: clip; padding-block: var(--space-10); }
@media (min-width: 1024px) { .page-hero { padding-block: var(--space-16); } }
.page-hero__grid { position: relative; z-index: 1; display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 1024px) { .page-hero__grid { grid-template-columns: 7fr 5fr; gap: var(--space-16); } }
.page-hero__copy { display: grid; gap: var(--space-6); min-width: 0; }

.flow { padding: var(--space-6); }
.flow__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-5); font-family: var(--font-mono); font-size: 11.5px; color: var(--text-tertiary); }
.flow__list { list-style: none; padding: 0; display: grid; }
.flow__item { position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.flow__item::before { content: ""; position: absolute; left: 13.5px; top: 50%; height: 100%; width: 1px; background: linear-gradient(180deg, rgb(133 89 255 / 0.7), rgb(133 89 255 / 0.25)); }
.flow__item:last-child::before { display: none; }
.flow__node { position: relative; z-index: 1; justify-self: center; width: 10px; height: 10px; border-radius: 3px; background: var(--violet-500); box-shadow: 0 0 10px rgb(133 89 255 / 0.8); }
.flow__label { font-size: var(--text-body-sm); color: var(--text-primary); }
.flow__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.flow__item--human { margin-top: var(--space-2); padding: var(--space-3); margin-left: -12px; margin-right: -12px; padding-left: 12px; border-radius: var(--radius-sm); background: rgb(133 89 255 / 0.12); box-shadow: inset 0 0 0 1px rgb(133 89 255 / 0.45); }
.flow__item--human .flow__node { width: 14px; height: 14px; background: var(--violet-300); box-shadow: 0 0 14px rgb(188 165 255 / 0.9); }
.flow__item--human .flow__meta { color: var(--text-accent); }
.flow__item--human::before { display: none; }

.problem-list { list-style: none; padding: 0; display: grid; }
.problem-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); font-size: var(--text-lead); line-height: 1.5; }
.problem-list li:first-child { border-top: 1px solid var(--border-subtle); }
.problem-list .node { margin-top: 0.6em; justify-self: center; }
.problem-close { margin-top: var(--space-6); font-size: var(--text-h4); font-weight: 600; color: var(--text-accent); }

.usecase { display: grid; gap: var(--space-3); align-content: start; }
.usecase h3 { font-size: var(--text-h4); line-height: 1.35; margin-top: var(--space-2); }
.usecase p { color: var(--text-secondary); font-size: var(--text-body-sm); }

.versus { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .versus { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
.versus h3 { font-size: var(--text-h4); margin-bottom: var(--space-5); }
.versus .checklist li { padding-block: var(--space-3); border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }

.control-list { list-style: none; padding: 0; display: grid; gap: var(--space-5); }
.control-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-4); }
.control-list li::before { content: ""; width: 10px; height: 10px; margin-top: 0.5em; border-radius: 3px; background: var(--violet-500); box-shadow: 0 0 10px rgb(133 89 255 / 0.8); justify-self: center; }
.control-list strong { color: var(--text-primary); font-weight: 600; }
.control-list span { color: var(--text-secondary); }
.notice { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-md); background: rgb(133 89 255 / 0.10); box-shadow: inset 3px 0 0 var(--violet-500), inset 0 0 0 1px var(--border-subtle); font-size: var(--text-body-sm); color: var(--text-secondary); }
.notice svg { width: 20px; height: 20px; color: var(--text-accent); margin-top: 2px; }

.glossary { display: grid; gap: 0; margin: 0; }
@media (min-width: 768px) { .glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-12); } }
.glossary div { padding-block: var(--space-5); border-top: 1px solid var(--border-subtle); display: grid; gap: var(--space-2); }
.glossary dt { font-weight: 600; display: flex; align-items: center; gap: var(--space-3); }
.glossary dt span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-accent); font-weight: 500; }
.glossary dd { color: var(--text-secondary); font-size: var(--text-body-sm); }

.demo--wide { display: grid; }
@media (min-width: 768px) { .demo--wide { grid-template-columns: 1.1fr 1fr; } .demo--wide .demo__visual { aspect-ratio: auto; min-height: 280px; border-bottom: 0; border-right: 1px solid var(--border-subtle); } }
.demo--wide .demo__body { padding: var(--space-8); gap: var(--space-4); align-content: center; }
.demo--wide h3 { font-size: var(--text-h3); }

/* ---------- Form (C-17…C-22) --------------------------------------------- */
.form-shell { padding-block: var(--space-8) var(--space-24); position: relative; }
.form-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-8); }
.form-panel {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--elevation-2), inset 0 0 0 1px var(--border-subtle);
  padding: var(--space-6) var(--space-5);
}
@media (min-width: 768px) { .form-panel { padding: var(--space-10); } }

.stepper { list-style: none; padding: 0; margin: 0 0 var(--space-6); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.stepper li { display: grid; gap: var(--space-2); }
.stepper__bar { position: relative; height: 2px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.stepper__bar::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: var(--gradient-brand); transition: transform var(--duration-slow) var(--ease-out-expo); }
.stepper li.is-done .stepper__bar::after, .stepper li.is-current .stepper__bar::after { transform: scaleX(1); }
.stepper li.is-current .stepper__bar::after { box-shadow: 0 0 10px var(--violet-500); }
.stepper__label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-caption); color: var(--text-tertiary); font-weight: 500; background: none; border: 0; padding: 4px 0; text-align: left; }
.stepper__label .node { width: 9px; height: 9px; }
.stepper li.is-current .stepper__label { color: var(--text-primary); }
.stepper li.is-current .node { box-shadow: 0 0 0 3px rgb(133 89 255 / 0.25); border-color: var(--violet-300); }
.stepper li.is-done .node { background: var(--violet-500); border-color: var(--violet-500); }
.stepper li.is-done .stepper__label { color: var(--text-secondary); cursor: pointer; }
.stepper li.is-done .stepper__label:hover { color: var(--text-primary); }
.stepper__label .n { font-family: var(--font-mono); }
@media (max-width: 379px) { .stepper li:not(.is-current) .stepper__text { display: none; } }
.step-count { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--text-tertiary); margin-bottom: var(--space-2); }

.fstep { display: grid; gap: var(--space-6); }
.fstep[hidden] { display: none; }
.fstep.is-entering { animation: step-in var(--duration-base) var(--ease-out-expo); }
.fstep.is-entering.from-right { animation-name: step-in-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-16px); } }
.fstep__title { font-size: var(--text-h3); line-height: 1.25; letter-spacing: -0.015em; }
.fstep__title:focus { outline: none; }
.fstep__title:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

.choices { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
@media (min-width: 640px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; min-height: 72px; padding: var(--space-4) var(--space-5) var(--space-4) var(--space-4); border-radius: var(--radius-md); background: var(--bg-base); box-shadow: inset 0 0 0 1px var(--border-control); cursor: pointer; transition: box-shadow var(--duration-fast), background-color var(--duration-fast), transform var(--duration-instant); }
@media (min-width: 640px) { .choice { min-height: 88px; } }
.choice:hover { box-shadow: inset 0 0 0 1px var(--slate-400); background: rgb(25 19 55 / 0.6); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .icon-box { width: 40px; height: 40px; }
.choice .icon-box svg { width: 20px; height: 20px; }
.choice__title { display: block; font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--text-primary); }
.choice__desc { display: block; font-size: var(--text-caption); line-height: 1.45; color: var(--text-tertiary); margin-top: 2px; }
.choice__ind { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-control); display: grid; place-items: center; transition: background-color var(--duration-fast), box-shadow var(--duration-fast); }
.choice__ind svg { width: 12px; height: 12px; color: var(--cloud-white); opacity: 0; transform: scale(0.6); transition: opacity var(--duration-fast), transform var(--duration-fast) var(--ease-out-expo); }
.choice:has(input:checked) { background: var(--surface-accent); box-shadow: inset 0 0 0 2px var(--border-accent), 0 0 24px rgb(133 89 255 / 0.18); }
.choice:has(input:checked) .icon-box { box-shadow: inset 0 0 0 1px var(--border-accent); color: var(--cloud-white); background: linear-gradient(135deg, rgb(133 89 255 / 0.5), rgb(106 59 239 / 0.3)); }
.choice:has(input:checked) .choice__ind { background: var(--violet-600); box-shadow: inset 0 0 0 1.5px var(--violet-300); }
.choice:has(input:checked) .choice__ind svg { opacity: 1; transform: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.choices.is-invalid .choice { box-shadow: inset 0 0 0 1px rgb(255 128 145 / 0.6); }

.field { display: grid; gap: var(--space-2); }
.field__label { font-size: var(--text-label); font-weight: 500; color: var(--text-primary); line-height: 1.4; }
.field__opt { color: var(--text-tertiary); font-weight: 400; }
.field__hint { font-size: var(--text-body-sm); color: var(--text-tertiary); line-height: 1.5; }
.field__control {
  width: 100%; min-height: 52px; padding: 13px var(--space-4);
  border: 1px solid var(--border-control); border-radius: var(--radius-sm);
  background: var(--bg-base); color: var(--text-primary);
  font-size: 1rem; line-height: 1.5;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
textarea.field__control { min-height: 140px; max-height: 320px; resize: vertical; field-sizing: content; }
textarea.field__control--short { min-height: 96px; }
.field__control::placeholder { color: var(--text-tertiary); opacity: 1; }
.field__control:hover { border-color: var(--slate-400); }
.field__control:focus { outline: none; border-color: var(--border-accent); box-shadow: 0 0 0 1px var(--border-accent), 0 0 0 4px rgb(188 165 255 / 0.25); }
.field__control[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field__error { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--danger); font-size: var(--text-body-sm); line-height: 1.45; }
.field__error svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.field__error[hidden] { display: none; }
.field__meta { display: flex; justify-content: space-between; gap: var(--space-3); }
.counter { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); margin-left: auto; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--warning); }
.field-row { display: grid; gap: var(--space-6); }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-4);
  border-radius: var(--radius-full); box-shadow: inset 0 0 0 1px var(--border-control);
  font-size: var(--text-body-sm); color: var(--text-secondary); cursor: pointer;
  transition: box-shadow var(--duration-fast), background-color var(--duration-fast), color var(--duration-fast);
  font-variant-numeric: tabular-nums;
}
.chip span::before { content: ""; width: 0; height: 12px; overflow: hidden; transition: width var(--duration-fast) var(--ease-out-expo); background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F7F7FC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.chip span:hover { box-shadow: inset 0 0 0 1px var(--slate-400); color: var(--text-primary); }
.chip input:checked + span { background: var(--surface-accent); box-shadow: inset 0 0 0 2px var(--border-accent); color: var(--text-primary); }
.chip input:checked + span::before { width: 12px; }
.chip input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.disclosure { justify-self: start; }
.disclosure svg { transition: transform var(--duration-base); }
.disclosure[aria-expanded="true"] svg { transform: rotate(45deg); }

.error-summary { padding: var(--space-5); border-radius: var(--radius-md); background: rgb(255 128 145 / 0.10); box-shadow: inset 4px 0 0 var(--danger), inset 0 0 0 1px rgb(255 128 145 / 0.25); }
.error-summary:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.error-summary[hidden] { display: none; }
.error-summary h3 { font-size: 1rem; display: flex; gap: var(--space-2); align-items: center; color: var(--text-primary); }
.error-summary h3 svg { width: 18px; height: 18px; color: var(--danger); }
.error-summary ul { margin: var(--space-3) 0 0; padding-left: 26px; display: grid; gap: var(--space-1); font-size: var(--text-body-sm); }
.error-summary a { color: var(--danger); text-underline-offset: 3px; }
.error-summary p { margin-top: var(--space-2); font-size: var(--text-body-sm); color: var(--text-secondary); }

.summary { border-radius: var(--radius-md); background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border-subtle); padding: var(--space-5); display: grid; gap: 0; }
.summary__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: var(--space-3); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.summary__row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--border-subtle); align-items: start; }
.summary__row dt { font-size: var(--text-caption); color: var(--text-tertiary); font-weight: 500; }
.summary__row dd { grid-column: 1; color: var(--text-primary); font-size: var(--text-body-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.summary__row dd.summary__edit { grid-column: 2; grid-row: 1 / 3; align-self: center; display: block; overflow: visible; }
.summary__edit .btn { --btn-h: 36px; font-size: var(--text-caption); }
.privacy { font-size: var(--text-body-sm); color: var(--text-tertiary); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
.form-actions .btn--primary { margin-left: auto; }
@media (max-width: 639px) {
  .form-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html.has-sticky-bar { scroll-padding-bottom: 104px; }
  .form-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0;
    padding: var(--space-3) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2);
    border-top: 1px solid var(--border-default);
  }
  .form-actions .btn--primary { flex: 1; }
}
.form-header { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); }
.form-footer { padding-block: var(--space-8); border-top: 1px solid var(--border-subtle); font-size: var(--text-caption); color: var(--text-tertiary); display: flex; gap: var(--space-6); }
.form-footer a { color: var(--text-secondary); text-decoration: none; }

.success { text-align: center; display: grid; gap: var(--space-5); justify-items: center; padding-block: var(--space-6); }
.success__mark { position: relative; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, rgb(133 89 255 / 0.35), rgb(106 59 239 / 0.15)); box-shadow: inset 0 0 0 1px rgb(188 165 255 / 0.4), 0 0 60px rgb(133 89 255 / 0.45); }
.success__mark svg { width: 34px; height: 34px; color: var(--cloud-white); stroke-dasharray: 30; stroke-dashoffset: 0; animation: draw 640ms 120ms var(--ease-out-expo) backwards; }
@keyframes draw { from { stroke-dashoffset: 30; } }
.success p { color: var(--text-secondary); max-width: 52ch; }
.success .steps { text-align: left; margin-top: var(--space-4); width: 100%; max-width: 420px; }
.success__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: center; font-size: var(--text-body-sm); }

/* ---------- Reveal (D-009) ----------------------------------------------- */
.js-motion .reveal-pre { opacity: 0; transform: translateY(12px); }
.js-motion .reveal-in { opacity: 1; transform: none; transition: opacity var(--duration-slow) var(--ease-out-expo), transform var(--duration-slow) var(--ease-out-expo); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  .card--interactive:hover { transform: none; }
  .btn:active { transform: none; }
}
@media print {
  .proto-bar, .site-header, .site-footer, .aurora, body::after { display: none !important; }
  body { background: #fff; color: #000; }
}

/* active section in nav (detail pages) */
.nav__link--active { color: var(--text-primary); }
.nav__link--active::after {
  content: ""; position: absolute; left: var(--space-3); right: 28px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--gradient-brand);
}
.mega__item[aria-current="page"] { background: rgb(133 89 255 / 0.10); box-shadow: inset 0 0 0 1px rgb(133 89 255 / 0.35); }

/* ==========================================================================
   Phase 2.5 review round 1 (owner feedback): offer-led hero, website concept,
   featured website offer, 7-step process, person + AI transparency
   ========================================================================== */

/* hero: offer first, editor calmer and smaller (feedback 2 + 5) */
.hero__claim {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-lead); font-weight: 500; letter-spacing: -0.01em; line-height: 1.4;
  color: var(--text-accent);
}
.t-hero { font-size: var(--text-h1); line-height: 1.08; letter-spacing: -0.03em; hyphens: manual; }
.hero__sub { display: block; margin-top: 0.15em; color: var(--text-secondary); }
.hero__sub .accent-word { color: transparent; }
.aurora--soft { opacity: 0.6; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-16); }
  .editor--calm { justify-self: end; width: 100%; max-width: 440px; }
}
.editor--calm { box-shadow: var(--elevation-2), inset 0 0 0 1px var(--border-subtle); }
.editor--calm::before { opacity: 0.45; }
.editor--calm .editor__code { font-size: 12.5px; padding-block: var(--space-3); }
.editor--calm .editor__review { font-size: var(--text-caption); gap: 6px; padding-block: var(--space-3) var(--space-4); color: var(--text-secondary); }
.editor--calm .editor__review li::before { width: 6px; height: 6px; box-shadow: none; }
.editor--calm .editor__status { color: var(--text-tertiary); }
.editor--calm .editor__scan { top: var(--space-3); }

/* website concept (feedback 3) */
.concept-wrap { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 1024px) { .concept-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-16); } }
.concept-copy .checklist { color: var(--text-secondary); }
.concept-copy__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.concept-copy .btn { justify-self: start; }
.concept { position: relative; margin: 0; padding-bottom: 14%; padding-right: 13%; min-width: 0; }
.concept__browser {
  container-type: inline-size;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface-1);
  box-shadow: var(--elevation-3), inset 0 0 0 1px var(--border-default), 0 0 80px rgb(133 89 255 / 0.18);
}
.concept__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-sunken); }
.concept__url { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); padding: 3px 10px; border-radius: var(--radius-full); background: rgb(247 247 252 / 0.04); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.concept__phone {
  container-type: inline-size;
  position: absolute; right: 0; bottom: 0; width: 24%; min-width: 96px;
  border-radius: 18px; padding: 5px; background: #0E0D14;
  box-shadow: var(--elevation-3), inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.concept__phone .mh { border-radius: 14px; }

/* fictional client site: warm, light, own look – scales with its container */
.mh {
  --mh-bg: #F5F2ED; --mh-ink: #221D18; --mh-muted: #5E554C; --mh-line: #E2DBD1; --mh-oak: #A8703E; --mh-card: #FFFFFF;
  container-type: inline-size;
  display: grid; gap: 0;
  background: var(--mh-bg); color: var(--mh-ink);
  font-family: var(--font-sans);
}
.mh__nav { display: flex; align-items: center; justify-content: space-between; gap: 2cqi; padding: 2.2cqi 3.5cqi; border-bottom: 1px solid var(--mh-line); }
.mh__logo { display: inline-flex; align-items: center; gap: 1cqi; font-weight: 700; font-size: 2.3cqi; letter-spacing: -0.02em; }
.mh__logo i { width: 2.2cqi; height: 2.2cqi; border-radius: 0.5cqi; background: linear-gradient(135deg, var(--mh-oak), #6E4523); }
.mh__links { display: flex; gap: 3cqi; font-size: 1.6cqi; color: var(--mh-muted); margin-left: auto; margin-right: 2cqi; }
.mh__btn { display: inline-flex; align-items: center; justify-content: center; padding: 1.3cqi 2.4cqi; border-radius: 1cqi; background: var(--mh-ink); color: #fff; font-size: 1.6cqi; font-weight: 600; white-space: nowrap; }
.mh__btn--sm { padding: 1cqi 2cqi; font-size: 1.5cqi; }
.mh__hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5cqi; align-items: center; padding: 5cqi 3.5cqi 4cqi; }
.mh__copy { display: grid; gap: 1.8cqi; justify-items: start; }
.mh__kicker { font-size: 1.4cqi; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mh-oak); }
.mh__title { font-size: 4.1cqi; line-height: 1.08; font-weight: 700; letter-spacing: -0.035em; text-wrap: balance; }
.mh__text { font-size: 1.75cqi; line-height: 1.5; color: var(--mh-muted); }
.mh__ctas { display: flex; align-items: center; gap: 2.4cqi; margin-top: 0.6cqi; }
.mh__link { font-size: 1.6cqi; font-weight: 600; text-decoration: underline; text-underline-offset: 0.4cqi; }
.mh__img {
  position: relative; aspect-ratio: 4 / 3.4; border-radius: 1.6cqi; overflow: hidden;
  background:
    radial-gradient(120% 70% at 30% 20%, rgb(255 236 210 / 0.5), transparent 60%),
    repeating-linear-gradient(97deg, rgb(70 40 15 / 0.0) 0 2.2cqi, rgb(70 40 15 / 0.10) 2.2cqi 2.5cqi, rgb(70 40 15 / 0.0) 2.5cqi 4.6cqi, rgb(70 40 15 / 0.06) 4.6cqi 4.8cqi),
    repeating-radial-gradient(ellipse at 70% 120%, rgb(110 69 35 / 0.10) 0 1.2cqi, transparent 1.2cqi 2.6cqi),
    linear-gradient(160deg, #C99A6A, #9A6537 55%, #7A4B26);
  display: flex; align-items: flex-end; padding: 1.6cqi;
}
.mh__img span { font-family: var(--font-mono); font-size: 1.2cqi; color: rgb(255 255 255 / 0.9); background: rgb(30 20 10 / 0.45); padding: 0.5cqi 1cqi; border-radius: 0.6cqi; }
.mh__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqi; padding: 0 3.5cqi 4.5cqi; }
.mh__tile { display: grid; gap: 0.6cqi; padding: 2.2cqi; border-radius: 1.2cqi; background: var(--mh-card); box-shadow: 0 0 0 1px var(--mh-line); font-size: 1.5cqi; color: var(--mh-muted); }
.mh__tile b { font-size: 1.85cqi; color: var(--mh-ink); }
/* mobile variant inside the phone frame */
.mh--mobile { gap: 4cqi; padding-bottom: 7cqi; }
.mh--mobile .mh__nav { padding: 5cqi 6cqi; }
.mh--mobile .mh__logo { font-size: 8cqi; gap: 3cqi; }
.mh--mobile .mh__logo i { width: 7cqi; height: 7cqi; border-radius: 2cqi; }
.mh__burger { width: 9cqi; height: 6cqi; background: linear-gradient(var(--mh-ink) 0 0) top / 100% 1.2cqi no-repeat, linear-gradient(var(--mh-ink) 0 0) center / 100% 1.2cqi no-repeat, linear-gradient(var(--mh-ink) 0 0) bottom / 70% 1.2cqi no-repeat; }
.mh--mobile > :not(.mh__nav) { margin-inline: 6cqi; }
.mh__img--m { aspect-ratio: 4 / 3; border-radius: 4cqi; }
.mh--mobile .mh__kicker { font-size: 5cqi; }
.mh--mobile .mh__title { font-size: 11cqi; }
.mh__btn--block { padding: 4cqi; border-radius: 3cqi; font-size: 6cqi; }
.mh--mobile .mh__tile { padding: 5cqi; border-radius: 3cqi; }
.mh--mobile .mh__tile b { font-size: 6cqi; }
@media (max-width: 639px) {
  .concept { padding-right: 0; padding-bottom: 0; display: grid; gap: var(--space-4); }
  .concept__phone { position: relative; width: 52%; margin-left: auto; margin-right: auto; }
  .mh__links { display: none; }
}

/* featured website offer (feedback 3 + owner pricing) */
.offer { display: grid; gap: var(--space-8); padding: var(--space-6); }
@media (min-width: 1024px) { .offer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); padding: var(--space-10); } }
.offer__main { display: grid; gap: var(--space-4); align-content: start; justify-items: start; }
.offer__main > p { color: var(--text-secondary); }
.offer__main .checklist { color: var(--text-secondary); font-size: var(--text-body-sm); gap: var(--space-2); margin-bottom: var(--space-2); }
.package { border-radius: var(--radius-md); background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border-subtle); padding: var(--space-6); display: grid; gap: var(--space-2); align-content: start; }
@media (min-width: 768px) { .package { padding: var(--space-8); } }
.package__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-accent); }
.package__name { font-size: var(--text-h4); font-weight: 600; }
.package__price { font-size: var(--text-h1); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.package__price span { font-size: var(--text-h4); font-weight: 500; color: var(--text-secondary); letter-spacing: 0; margin-right: 0.2em; }
.package__note { font-size: var(--text-caption); color: var(--text-tertiary); }
.package__cols { display: grid; gap: var(--space-6); margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
@media (min-width: 640px) { .package__cols { grid-template-columns: 1.15fr 1fr; } }
.package__h { font-size: var(--text-caption); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-3); text-transform: none; }
.package .checklist { font-size: var(--text-body-sm); gap: var(--space-2); color: var(--text-secondary); }
.package__excl { color: var(--text-tertiary); }
.package__foot { margin-top: var(--space-4); font-size: var(--text-caption); color: var(--text-tertiary); }

.more-head { font-size: var(--text-h4); margin: var(--space-12) 0 var(--space-5); color: var(--text-secondary); font-weight: 500; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mini-service { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-6); }
.mini-service h4 { font-size: 1.0625rem; line-height: 1.35; margin-top: var(--space-1); }
.mini-service p { font-size: var(--text-body-sm); color: var(--text-secondary); }

/* 7-step process: horizontal only where it fits (feedback 4) */
@media (min-width: 1024px) and (max-width: 1239px) {
  .steps--7 { grid-template-columns: 1fr; gap: 0; }
  .steps--7 .step { grid-template-columns: 24px 1fr; padding-bottom: var(--space-6); gap: var(--space-2) var(--space-5); }
  .steps--7 .step::before { left: 11.5px; right: auto; top: 18px; bottom: -6px; width: 1px; height: auto; background: linear-gradient(180deg, rgb(133 89 255 / 0.7), rgb(188 165 255 / 0.18)); }
  .steps--7 .step__node { justify-self: center; margin-top: 6px; }
  .steps--7 .step p { grid-column: 2; }
  .steps--7 .step__head { margin-top: 0; }
}
@media (min-width: 1240px) {
  .steps--7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-4); }
  .steps--7 .step::before { right: calc(-1 * var(--space-4)); }
  .steps--7 h3 { font-size: 1.0625rem; }
}

/* person + AI transparency (feedback 4) */
.ki-block { margin-top: var(--space-16); padding-top: var(--space-12); border-top: 1px solid var(--border-subtle); }
.ki-block__head { display: grid; gap: var(--space-3); max-width: 720px; margin-bottom: var(--space-8); }
.ki-block__head p { color: var(--text-secondary); }
.compare h4 { font-size: var(--text-h4); display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.ki-block__claim { margin-top: var(--space-8); font-family: var(--font-mono); font-size: var(--text-body-sm); color: var(--text-accent); }

/* contact row in final CTA (feedback 3) */
.contact-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-10); margin: var(--space-4) 0 0; padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); width: min(100%, 560px); }
.contact-row div { display: grid; gap: 2px; }
.contact-row dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.contact-row dd { margin: 0; }

/* form: review round 1 (feedback 1, 6, 7) */
.t-form-title { font-size: var(--text-h2); line-height: 1.12; letter-spacing: -0.025em; }
@media (min-width: 768px) { .t-form-title { font-size: var(--text-h1); } }
.form-head { gap: var(--space-2); margin-bottom: var(--space-6); }
.form-head__lead { color: var(--text-secondary); }
.demo-note {
  display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3); align-items: start;
  margin-bottom: var(--space-5); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: rgb(255 201 102 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 201 102 / 0.35);
  font-size: var(--text-body-sm); line-height: 1.45; color: var(--text-secondary);
}
.demo-note svg { width: 18px; height: 18px; color: var(--warning); margin-top: 1px; }
.demo-note strong { color: var(--warning); font-weight: 600; }
.fstep__group { display: grid; gap: var(--space-6); }
.price-hint { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.chips.is-invalid .chip span { box-shadow: inset 0 0 0 1px rgb(255 128 145 / 0.7); }
.summary dl { margin: 0; }
.summary__head { padding-bottom: var(--space-3); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }

/* compact error summary */
.error-summary { padding: var(--space-4) var(--space-5); }
.error-summary__head { display: flex; gap: var(--space-2); align-items: center; font-weight: 600; font-size: var(--text-body-sm); color: var(--text-primary); }
.error-summary__head svg { width: 18px; height: 18px; color: var(--danger); flex: none; }
.error-summary ul { list-style: none; margin: var(--space-2) 0 0; padding: 0 0 0 26px; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.error-summary > p:not(.error-summary__head) { margin-top: var(--space-2); }

/* success: demo result, never a real confirmation */
.badge--demo-state { color: var(--warning); }
.badge--demo-state::before { background: var(--warning); }
.success__mark--demo { background: linear-gradient(135deg, rgb(133 89 255 / 0.25), rgb(106 59 239 / 0.1)); box-shadow: inset 0 0 0 1px rgb(188 165 255 / 0.3); }
.step__node--open, .is-checked .step__node--open { background: var(--bg-base); border-color: var(--violet-300); box-shadow: none; }

/* mobile: fixed action bar steps aside while the on-screen keyboard is likely open */
@media (max-width: 639px) {
  html.is-typing .form-actions { position: static; padding: var(--space-6) 0 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid var(--border-subtle); }
  html.is-typing .form-shell { padding-bottom: var(--space-12); }
  .form-panel { padding: var(--space-5) var(--space-4); }
  .stepper { margin-bottom: var(--space-4); }
}
