/*
 * site.css: the one design system for sourcectl.com and every product site under it.
 *
 * Every value comes from a fixed scale (spacing 4·8·12·16·24·32·48·64·96·128, type
 * 12·14·16·18·20·24·30·36·48·60·72, five shadows). Colours are tokens on :root; the dark
 * theme is the default look, the light theme follows the system or the toggle. A product site
 * sets `data-brand` on <html> and only the accent hue changes, so all sites work alike.
 *
 * Do not add one-off values. Move one step up or down the scale instead.
 */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }

/* ---------- Tokens ---------- */

:root {
  /* Accent hue and saturation. Product sites override these two only. */
  --accent-h: 211;
  --accent-s: 100%;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --t-12: 0.75rem; --t-14: 0.875rem; --t-16: 1rem; --t-18: 1.125rem; --t-20: 1.25rem;
  --t-24: 1.5rem; --t-30: 1.875rem; --t-36: 2.25rem; --t-48: 3rem; --t-60: 3.75rem; --t-72: 4.5rem;

  --radius-control: 8px;
  --radius-card: 16px;
  --radius-panel: 24px;
  --width-page: 1200px;
  --width-text: 68ch;

  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Dark theme (default). Cool greys, hue 224. */
  color-scheme: dark;
  --bg: hsl(226 45% 5%);
  --bg-raised: hsl(225 36% 8%);
  --surface-1: hsl(224 32% 10%);
  --surface-2: hsl(224 28% 13%);
  --surface-3: hsl(224 24% 17%);
  --line: hsl(224 24% 18%);
  --line-strong: hsl(224 20% 26%);
  --text-1: hsl(220 40% 97%);
  --text-2: hsl(222 18% 74%);
  --text-3: hsl(222 13% 58%);
  --accent-300: hsl(var(--accent-h) var(--accent-s) 80%);
  --accent-400: hsl(var(--accent-h) var(--accent-s) 72%);
  --accent-500: hsl(var(--accent-h) var(--accent-s) 64%);
  --accent-600: hsl(var(--accent-h) var(--accent-s) 56%);
  --accent-tint: hsl(var(--accent-h) var(--accent-s) 64% / 0.12);
  --accent-glow: hsl(var(--accent-h) var(--accent-s) 60% / 0.28);
  --on-accent: hsl(226 50% 6%);
  --link: var(--accent-400);
  --success: hsl(152 60% 62%);
  --success-tint: hsl(152 60% 50% / 0.12);
  --danger: hsl(358 90% 74%);
  --danger-tint: hsl(358 90% 60% / 0.12);
  --warning: hsl(40 95% 66%);
  --shadow-1: 0 1px 2px hsl(226 60% 2% / 0.5);
  --shadow-2: 0 2px 6px hsl(226 60% 2% / 0.5), 0 1px 2px hsl(226 60% 2% / 0.4);
  --shadow-3: 0 8px 20px hsl(226 60% 2% / 0.5), 0 2px 6px hsl(226 60% 2% / 0.3);
  --shadow-4: 0 16px 36px hsl(226 60% 2% / 0.55), 0 4px 10px hsl(226 60% 2% / 0.3);
  --shadow-5: 0 28px 64px hsl(226 60% 2% / 0.6), 0 8px 16px hsl(226 60% 2% / 0.3);
  --header-bg: hsl(226 45% 5% / 0.72);
  --grid-line: hsl(220 40% 90% / 0.05);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: hsl(220 33% 98%);
    --bg-raised: hsl(220 30% 96%);
    --surface-1: hsl(0 0% 100%);
    --surface-2: hsl(220 30% 96%);
    --surface-3: hsl(220 24% 92%);
    --line: hsl(220 22% 90%);
    --line-strong: hsl(220 18% 82%);
    --text-1: hsl(226 42% 11%);
    --text-2: hsl(224 16% 34%);
    --text-3: hsl(224 11% 44%);
    --accent-300: hsl(var(--accent-h) var(--accent-s) 40%);
    --accent-400: hsl(var(--accent-h) var(--accent-s) 38%);
    --accent-500: hsl(var(--accent-h) var(--accent-s) 44%);
    --accent-600: hsl(var(--accent-h) var(--accent-s) 38%);
    --accent-tint: hsl(var(--accent-h) var(--accent-s) 50% / 0.1);
    --accent-glow: hsl(var(--accent-h) var(--accent-s) 55% / 0.18);
    --on-accent: hsl(0 0% 100%);
    --link: hsl(var(--accent-h) var(--accent-s) 36%);
    --success: hsl(152 70% 28%);
    --success-tint: hsl(152 60% 40% / 0.12);
    --danger: hsl(358 70% 44%);
    --danger-tint: hsl(358 80% 50% / 0.1);
    --warning: hsl(32 90% 36%);
    --shadow-1: 0 1px 2px hsl(226 40% 20% / 0.08);
    --shadow-2: 0 2px 6px hsl(226 40% 20% / 0.08), 0 1px 2px hsl(226 40% 20% / 0.06);
    --shadow-3: 0 8px 20px hsl(226 40% 20% / 0.1), 0 2px 6px hsl(226 40% 20% / 0.06);
    --shadow-4: 0 16px 36px hsl(226 40% 20% / 0.12), 0 4px 10px hsl(226 40% 20% / 0.06);
    --shadow-5: 0 28px 64px hsl(226 40% 20% / 0.16), 0 8px 16px hsl(226 40% 20% / 0.08);
    --header-bg: hsl(220 33% 98% / 0.8);
    --grid-line: hsl(226 40% 20% / 0.06);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: hsl(220 33% 98%);
  --bg-raised: hsl(220 30% 96%);
  --surface-1: hsl(0 0% 100%);
  --surface-2: hsl(220 30% 96%);
  --surface-3: hsl(220 24% 92%);
  --line: hsl(220 22% 90%);
  --line-strong: hsl(220 18% 82%);
  --text-1: hsl(226 42% 11%);
  --text-2: hsl(224 16% 34%);
  --text-3: hsl(224 11% 44%);
  --accent-300: hsl(var(--accent-h) var(--accent-s) 40%);
  --accent-400: hsl(var(--accent-h) var(--accent-s) 38%);
  --accent-500: hsl(var(--accent-h) var(--accent-s) 44%);
  --accent-600: hsl(var(--accent-h) var(--accent-s) 38%);
  --accent-tint: hsl(var(--accent-h) var(--accent-s) 50% / 0.1);
  --accent-glow: hsl(var(--accent-h) var(--accent-s) 55% / 0.18);
  --on-accent: hsl(0 0% 100%);
  --link: hsl(var(--accent-h) var(--accent-s) 36%);
  --success: hsl(152 70% 28%);
  --success-tint: hsl(152 60% 40% / 0.12);
  --danger: hsl(358 70% 44%);
  --danger-tint: hsl(358 80% 50% / 0.1);
  --warning: hsl(32 90% 36%);
  --shadow-1: 0 1px 2px hsl(226 40% 20% / 0.08);
  --shadow-2: 0 2px 6px hsl(226 40% 20% / 0.08), 0 1px 2px hsl(226 40% 20% / 0.06);
  --shadow-3: 0 8px 20px hsl(226 40% 20% / 0.1), 0 2px 6px hsl(226 40% 20% / 0.06);
  --shadow-4: 0 16px 36px hsl(226 40% 20% / 0.12), 0 4px 10px hsl(226 40% 20% / 0.06);
  --shadow-5: 0 28px 64px hsl(226 40% 20% / 0.16), 0 8px 16px hsl(226 40% 20% / 0.08);
  --header-bg: hsl(220 33% 98% / 0.8);
  --grid-line: hsl(226 40% 20% / 0.06);
}

/* Product accents. Each product keeps its own hue; nothing else changes. */
:root[data-brand="diametheus"] { --accent-h: 252; --accent-s: 92%; }
:root[data-brand="keryx"] { --accent-h: 216; --accent-s: 86%; }
:root[data-brand="ariadne"] { --accent-h: 326; --accent-s: 84%; }
:root[data-brand="theseus"] { --accent-h: 216; --accent-s: 48%; }

/* ---------- Base ---------- */

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: var(--t-16);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
}

main { flex: 1; }

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
figure { margin: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
h1 { font-size: var(--t-48); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: var(--t-36); letter-spacing: -0.028em; }
h3 { font-size: var(--t-20); letter-spacing: -0.012em; line-height: 1.3; }
h4 { font-size: var(--t-16); }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-300); }

:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--accent-glow); color: var(--text-1); }

code, kbd { font-family: var(--font-mono); font-size: 0.92em; }

@media (min-width: 900px) {
  h1 { font-size: var(--t-60); }
  h2 { font-size: var(--t-48); }
}
@media (min-width: 1280px) {
  .hero h1 { font-size: var(--t-72); }
}

.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(--s-4); top: -64px; z-index: 100;
  padding: var(--s-2) var(--s-4); border-radius: var(--radius-control);
  background: var(--accent-500); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.container { width: min(100% - 2 * var(--s-5), var(--width-page)); margin-inline: auto; }
@media (max-width: 480px) { .container { width: calc(100% - 2 * var(--s-4)); } }

/* ---------- Text roles ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-400);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-500); box-shadow: 0 0 12px var(--accent-500);
}
.eyebrow--plain::before { display: none; }

.lead { font-size: var(--t-18); line-height: 1.6; color: var(--text-2); max-width: 60ch; }
@media (min-width: 900px) { .lead { font-size: var(--t-20); } }

.muted { color: var(--text-2); }
.quiet { color: var(--text-3); font-size: var(--t-14); }
.mono { font-family: var(--font-mono); }

.gradient-text {
  background: linear-gradient(100deg, var(--text-1) 10%, var(--accent-300) 60%, var(--accent-500) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-5);
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: inherit; font-size: var(--t-16); font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.button svg { width: 20px; height: 20px; flex: none; }
.button--primary {
  background: var(--accent-500); color: var(--on-accent);
  box-shadow: var(--shadow-2), 0 0 0 0 var(--accent-glow), inset 0 1px 0 hsl(0 0% 100% / 0.25);
}
.button--primary:hover {
  background: var(--accent-400); color: var(--on-accent);
  box-shadow: var(--shadow-3), 0 8px 32px var(--accent-glow), inset 0 1px 0 hsl(0 0% 100% / 0.25);
  transform: translateY(-1px);
}
.button--secondary { background: var(--surface-2); color: var(--text-1); border-color: var(--line); }
.button--secondary:hover { background: var(--surface-3); color: var(--text-1); border-color: var(--line-strong); }
.button--small { min-height: 40px; padding: var(--s-2) var(--s-4); font-size: var(--t-14); }
/* A label longer than the screen wraps instead of pushing its container wider. */
.button { max-width: 100%; }
@media (max-width: 599px) { .button { white-space: normal; text-align: center; } }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 600; text-decoration: none; color: var(--link);
}
.link-arrow::after { content: "→"; transition: transform 160ms ease; }
.link-arrow:hover::after { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header__row { display: flex; align-items: center; gap: var(--s-5); min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--text-1); text-decoration: none; font-weight: 600; font-size: var(--t-18); letter-spacing: -0.01em; }
.brand:hover { color: var(--text-1); }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; }
.brand__parent { font-weight: 400; color: var(--text-3); font-size: var(--t-14); }
@media (max-width: 419px) { .brand__parent { display: none; } }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.site-nav a {
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-control);
  color: var(--text-2); text-decoration: none; font-size: var(--t-14); font-weight: 500;
}
.site-nav a:hover { color: var(--text-1); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text-1); background: var(--surface-2); }

.header-tools { display: flex; align-items: center; gap: var(--s-2); }

.icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-control); border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-button:hover { background: var(--surface-2); color: var(--text-1); }
.icon-button svg { width: 20px; height: 20px; }
.theme-icon-light { display: none; }
:root[data-theme="light"] .theme-icon-light { display: block; }
:root[data-theme="light"] .theme-icon-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-icon-light { display: block; }
  :root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
}

.menu-button { display: none; }
.nav-panel {
  margin: 0; inset: 72px 0 auto auto; width: min(100vw, 360px);
  padding: var(--s-4); border: 1px solid var(--line); border-radius: 0 0 0 var(--radius-card);
  background: var(--bg-raised); color: var(--text-1); box-shadow: var(--shadow-5);
}
.nav-panel nav { display: grid; gap: var(--s-1); }
.nav-panel a {
  padding: var(--s-3) var(--s-4); border-radius: var(--radius-control);
  color: var(--text-1); text-decoration: none; font-weight: 500;
}
.nav-panel a:hover, .nav-panel a[aria-current="page"] { background: var(--surface-2); }
.nav-panel .button { margin-top: var(--s-3); width: 100%; }

@media (max-width: 899px) {
  .site-nav, .header-cta { display: none; }
  .menu-button { display: inline-grid; }
  .header-tools { margin-left: auto; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--s-9); }
.section--tight { padding-block: var(--s-8); }
.section--raised { background: var(--bg-raised); border-block: 1px solid var(--line); }
@media (max-width: 699px) { .section { padding-block: var(--s-8); } }

.section-head { display: grid; gap: var(--s-4); max-width: 760px; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head p { color: var(--text-2); font-size: var(--t-18); }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding-block: var(--s-9) var(--s-9); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 900px; height: 600px; left: 50%; top: -320px; transform: translateX(-30%);
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(20px);
}
.hero__layout { display: grid; gap: var(--s-8); align-items: center; }
.hero__copy { display: grid; gap: var(--s-5); justify-items: start; }
.hero__copy .actions { margin-top: var(--s-3); }
.hero__note { color: var(--text-3); font-size: var(--t-14); }
@media (min-width: 1000px) {
  .hero { padding-block: var(--s-10) var(--s-9); }
  .hero__layout { grid-template-columns: 1.15fr 1fr; }
  .hero__layout--single { grid-template-columns: 1fr; max-width: 880px; }
}

.page-hero { position: relative; overflow: hidden; padding-block: var(--s-9) var(--s-8); isolation: isolate; }
.page-hero::after {
  content: ""; position: absolute; z-index: -1; width: 720px; height: 480px; right: -160px; top: -280px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
}
.page-hero__copy { display: grid; gap: var(--s-5); justify-items: start; }
.page-hero__copy > * { max-width: 820px; }
.page-hero h1 { font-size: var(--t-48); }
@media (min-width: 900px) { .page-hero h1 { font-size: var(--t-60); } }

.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-14); color: var(--text-3); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-1); }
.breadcrumb span[aria-hidden] { color: var(--text-3); }

/* ---------- Console visual (the hero picture) ---------- */

.console {
  position: relative; border-radius: var(--radius-panel);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-5);
  overflow: hidden; font-family: var(--font-mono); font-size: var(--t-14);
}
.console::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, var(--accent-glow), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.console__bar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); color: var(--text-3); font-size: var(--t-12); }
.console__dots { display: flex; gap: 6px; margin-right: var(--s-2); }
.console__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.console__body { display: grid; gap: var(--s-2); padding: var(--s-5); }
.console__line { display: flex; gap: var(--s-3); align-items: baseline; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__line b { font-weight: 500; color: var(--text-1); }
.console__line > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { .console__line, .console__line > span:last-child { white-space: normal; } }
.console__tag { flex: none; min-width: 72px; font-size: var(--t-12); font-weight: 600; letter-spacing: 0.04em; }
.console__tag--ok { color: var(--success); }
.console__tag--warn { color: var(--warning); }
.console__tag--bad { color: var(--danger); }
.console__tag--info { color: var(--accent-400); }
.console__meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: var(--s-2); }
.console__meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-600), var(--accent-300)); }
.console__footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); color: var(--text-3); font-size: var(--t-12); }
.console__cursor::after { content: "▍"; color: var(--accent-400); animation: console-blink 1.1s steps(1) infinite; }
@keyframes console-blink { 50% { opacity: 0; } }

/* ---------- Grids and cards ---------- */

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card {
  position: relative; display: grid; align-content: start; gap: var(--s-3);
  padding: var(--s-6); border-radius: var(--radius-card);
  background: var(--surface-1); border: 1px solid var(--line);
  color: var(--text-1); text-decoration: none;
}
.card p { color: var(--text-2); }
a.card { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease; }
a.card:hover { color: var(--text-1); transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-4); }
a.card:hover .link-arrow::after { transform: translateX(3px); }
.card .link-arrow { margin-top: auto; padding-top: var(--s-3); }

.card--feature { padding: var(--s-7) var(--s-6); overflow: hidden; isolation: isolate; }
.card--feature::after {
  content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -160px; top: -200px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%); opacity: 0.7;
  transition: opacity 200ms ease;
}
a.card--feature:hover::after { opacity: 1; }

/* A single wide card: stacked on phones, icon / text / link in one row when there is room. */
.card-row { margin-top: var(--s-5); container-type: inline-size; }
.card--row { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); align-items: center; }
.card--row .link-arrow { grid-column: 1 / -1; }
@container (min-width: 560px) {
  .card--row .link-arrow { grid-column: auto; }
  .card--row { grid-template-columns: auto 1fr auto; align-items: center; column-gap: var(--s-5); }
  .card--row .link-arrow { margin-top: 0; padding-top: 0; }
}

.icon-tile {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent-400);
  box-shadow: inset 0 0 0 1px hsl(var(--accent-h) var(--accent-s) 64% / 0.2);
}
.icon-tile svg { width: 24px; height: 24px; }
/* An icon sits on the title's line, left of it, never alone above it. */
.icon-title { display: flex; align-items: center; gap: var(--s-4); }
.icon-title .icon-tile { flex: none; }
.icon-tile--small { width: 40px; height: 40px; border-radius: 10px; }
.icon-tile--small svg { width: 20px; height: 20px; }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag {
  display: inline-flex; align-items: center; padding: var(--s-1) var(--s-3); border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: var(--t-12); font-weight: 500;
}
.tag--accent { background: var(--accent-tint); color: var(--accent-300); }

.check-list { list-style: none; display: grid; gap: var(--s-3); }
.check-list li { position: relative; padding-left: var(--s-6); color: var(--text-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-tint);
}
.check-list li::after {
  content: ""; position: absolute; left: 3px; top: calc(0.3em + 3px); width: 12px; height: 12px;
  background: var(--accent-400);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check-list li strong { color: var(--text-1); font-weight: 600; }

/* ---------- Practice rows (consulting overview) ---------- */

.practice {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding: var(--s-7); border-radius: var(--radius-panel);
  background: var(--surface-1); border: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate;
}
.practice::after {
  content: ""; position: absolute; z-index: -1; inset: auto -200px -260px auto; width: 520px; height: 520px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%); opacity: 0.6;
}
.practice__head { display: grid; gap: var(--s-4); align-content: start; justify-items: start; }
.practice__head p { color: var(--text-2); }
.practice__head h2 { font-size: var(--t-36); }
@media (max-width: 599px) { .practice__head h2 { font-size: var(--t-24); } }
@media (max-width: 599px) { .practice { padding: var(--s-5); } }
@media (min-width: 960px) { .practice { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); padding: var(--s-8); } }

/* ---------- Logo wall ---------- */

.logo-wall { display: grid; gap: var(--s-5); justify-items: center; text-align: center; }
.logo-wall__label { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.logo-wall ul {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-7);
  font-size: var(--t-20); font-weight: 600; letter-spacing: -0.01em; color: var(--text-3);
}
.logo-wall li { transition: color 200ms ease; }
.logo-wall li:hover { color: var(--text-1); }

/* ---------- Steps ---------- */

.steps { list-style: none; display: grid; gap: var(--s-5); counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(var(--steps, 4), 1fr); } }
.step { position: relative; display: grid; gap: var(--s-3); padding-top: var(--s-6); border-top: 1px solid var(--line-strong); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--t-14); font-weight: 600; color: var(--accent-400);
}
.step::after { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 1px; background: var(--accent-500); box-shadow: 0 0 12px var(--accent-500); }
.step p { color: var(--text-2); }

/* ---------- Split layout ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--s-9); }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--main-first { grid-template-columns: 7fr 5fr; }
}
.split__sticky { display: grid; gap: var(--s-4); }
@media (min-width: 960px) { .split__sticky { position: sticky; top: 120px; } }

/* ---------- Definition-style rows ---------- */

.rows { display: grid; }
.row { display: grid; gap: var(--s-2); padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.rows { container-type: inline-size; }
.row p { color: var(--text-2); }
@container (min-width: 560px) { .row { grid-template-columns: 200px 1fr; gap: var(--s-6); } }

/* ---------- Engagement cards ---------- */

.engagement { display: grid; gap: var(--s-4); }
.engagement__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.engagement ul { margin-top: var(--s-2); }

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

.faq { display: grid; gap: var(--s-3); max-width: 880px; }
.faq details { border-radius: var(--radius-card); background: var(--surface-1); border: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-5) var(--s-6); cursor: pointer; list-style: none; font-weight: 600; font-size: var(--t-18);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: var(--t-24); font-weight: 400; color: var(--text-3); transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 var(--s-6) var(--s-5); color: var(--text-2); display: grid; gap: var(--s-3); max-width: var(--width-text); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: var(--s-5); justify-items: center; text-align: center;
  padding: var(--s-9) var(--s-6); border-radius: var(--radius-panel);
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line-strong);
}
.cta-band::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
}
.cta-band p { color: var(--text-2); max-width: 56ch; font-size: var(--t-18); }
.cta-band h2 { max-width: 20ch; }
.cta-band .actions { justify-content: center; }
@media (max-width: 599px) { .cta-band { padding: var(--s-8) var(--s-5); } }

/* ---------- Product cards ---------- */

.product-card { grid-template-columns: auto 1fr; column-gap: var(--s-5); align-items: start; }
.product-card img { width: 56px; height: 56px; border-radius: 14px; grid-row: span 3; }
.product-card h3 { display: flex; align-items: center; gap: var(--s-2); }
.product-card .link-arrow { grid-column: 2; }

/* ---------- Forms ---------- */

.form { display: grid; gap: var(--s-5); container-type: inline-size; }
.form-row { display: grid; gap: var(--s-5); }
@container (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label, .field legend { font-size: var(--t-14); font-weight: 600; color: var(--text-1); }
.field .hint { font-size: var(--t-14); color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-control); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text-1); font: inherit; font-size: var(--t-16);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: var(--s-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 4px var(--accent-tint); }
.input:user-invalid, .textarea:user-invalid { border-color: var(--danger); }

.choice-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border: 0; padding: 0; margin: 0; }
.choice-grid legend { margin-bottom: var(--s-2); }
.choice {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: var(--surface-2);
  cursor: pointer; font-size: var(--t-14); font-weight: 500; color: var(--text-2);
}
.choice:hover { border-color: var(--text-3); color: var(--text-1); }
.choice input { accent-color: var(--accent-500); width: 16px; height: 16px; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent-500); background: var(--accent-tint); color: var(--text-1); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-500); outline-offset: 2px; }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { display: flex; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--radius-control); font-weight: 500; }
.notice--success { background: var(--success-tint); color: var(--success); }
.notice--error { background: var(--danger-tint); color: var(--danger); }
.notice--info { background: var(--accent-tint); color: var(--accent-300); }

.panel { display: grid; gap: var(--s-5); align-content: start; padding: var(--s-7); border-radius: var(--radius-panel); background: var(--surface-1); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.panel--narrow { max-width: 560px; margin-inline: auto; }
.panel h1 { font-size: var(--t-36); }
@media (max-width: 599px) { .panel { padding: var(--s-5); } }

/* ---------- Contact aside ---------- */

.contact-aside { display: grid; gap: var(--s-6); align-content: start; }
.contact-aside dl { display: grid; gap: var(--s-5); margin: 0; }
.contact-aside dt { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-1); }
.contact-aside dd { margin: 0; color: var(--text-1); }

/* ---------- Prose (legal, story, release notes) ---------- */

.prose { max-width: var(--width-text); display: grid; gap: var(--s-4); color: var(--text-2); font-size: var(--t-18); line-height: 1.7; }
.prose h2 { font-size: var(--t-30); color: var(--text-1); margin-top: var(--s-6); }
.prose h3 { font-size: var(--t-20); color: var(--text-1); margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: var(--s-5); display: grid; gap: var(--s-2); }
.prose strong { color: var(--text-1); font-weight: 600; }
.prose code { padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-1); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--surface-1); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-14); }
.table th, .table td { padding: var(--s-4) var(--s-5); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td { color: var(--text-2); }
.table td:first-child { color: var(--text-1); font-weight: 500; }

/* ---------- Pricing ---------- */

.price-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.price-card { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--s-4); padding: var(--s-6); border-radius: var(--radius-card); background: var(--surface-1); border: 1px solid var(--line); }
.price-card--featured { border-color: var(--accent-500); box-shadow: 0 0 0 1px var(--accent-500), var(--shadow-4), 0 16px 48px var(--accent-glow); }
.price-card__price { font-size: var(--t-48); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.price-card__price small { font-size: var(--t-16); font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.price-card .button { width: 100%; }

/* ---------- Media frame ---------- */

.media-frame { border-radius: var(--radius-panel); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow-5); background: var(--surface-1); }
.media-frame video, .media-frame img { width: 100%; }

/* ---------- Footer ---------- */

.site-footer { margin-top: var(--s-9); padding-block: var(--s-8) var(--s-6); border-top: 1px solid var(--line); background: var(--bg-raised); font-size: var(--t-14); }
.footer-grid { display: grid; gap: var(--s-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.footer-brand { display: grid; gap: var(--s-3); align-content: start; grid-column: 1 / -1; max-width: 360px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--text-3); }
.footer-col { display: grid; gap: var(--s-2); align-content: start; }
.footer-col h2 { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-2); }
.footer-col a { color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--text-1); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--text-3); }

/* ---------- Reveal on scroll (progressive: content is visible without JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal.reveal--instant { transition: none; }
}
