/* ============================================================
   Site kit — base.css (structure only)
   Components + layout primitives shared by every satellite. It carries
   NO identity: palette, fonts, radius, texture and accent come from
   themes/<theme>.css and the site's own layer. Load order:
     base.css -> archetypes/<archetype>.css -> themes/<theme>.css -> site
   Compile them into ONE per-site stylesheet (the design gate requires a
   stylesheet unique to each site).
   ============================================================ */

:root {
  /* --- Type scale (fluid) --- */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem, 0.79rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.91rem + 0.2vw, 1rem);
  --text-lg:   clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --text-xl:   clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --text-2xl:  clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --text-3xl:  clamp(1.875rem, 1.3rem + 2.6vw, 3rem);
  --text-hero: clamp(2.25rem, 1.4rem + 4vw, 3.75rem);

  /* --- Spacing (4px system) --- */
  --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;

  /* --- Motion --- */
  --duration-fast: 120ms;
  --duration-normal: 180ms;
  --duration-slow: 320ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* defaults a theme overrides */
:root {
  --radius: 0.625rem;
  --radius-sm: 0.4375rem;
  --radius-full: 9999px;
  --font-body: -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--space-16) + var(--space-4));
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, var(--signal-weak), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255,255,255,0.03), transparent 55%);
}

::selection { background: var(--selection); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; font-weight: 650; letter-spacing: -0.02em; }
p, li { text-wrap: pretty; }

a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, kbd { font-family: var(--font-mono); }
code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--code-bg); border: 1px solid var(--code-border); }
pre { overflow-x: auto; }

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

.wrap { max-width: var(--content-wide); margin: 0 auto; padding-inline: var(--space-6); }

/* ---- Motion: interactive transitions ---- */
a, button, [role='button'], input, summary {
  transition: color var(--duration-normal) var(--ease),
              background-color var(--duration-normal) var(--ease),
              border-color var(--duration-normal) var(--ease),
              box-shadow var(--duration-normal) var(--ease),
              transform var(--duration-normal) var(--ease),
              opacity var(--duration-normal) var(--ease);
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 0.7s var(--ease-spring),
              transform 0.7s var(--ease-spring),
              filter 0.7s var(--ease-spring);
  will-change: opacity, transform, filter;
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--canvas);
}
.brand .logo svg { width: 16px; height: 16px; }
.brand .tld { font-family: var(--font-mono); font-weight: 400; font-size: var(--text-xs); color: var(--ink-faint); }

.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ---- Guides dropdown ---- */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  color: var(--ink-muted); cursor: pointer; padding: 0; border: none; background: none;
  line-height: 1;
}
.nav-dropdown-toggle:hover { color: var(--ink); }
.nav-dropdown-toggle .chev { transition: transform var(--duration-normal) var(--ease); }
.nav-dropdown.open .nav-dropdown-toggle .chev { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 272px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: var(--space-2);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity var(--duration-normal) var(--ease),
              transform var(--duration-normal) var(--ease),
              visibility var(--duration-normal);
  z-index: 60;
}
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: none;
}
.nav-dropdown-menu a {
  display: block; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--ink-muted);
  font-weight: 500; white-space: nowrap; line-height: 1.5;
}
.nav-dropdown-menu a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav-dropdown-menu a.cur { color: var(--ink); }

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

.theme-toggle {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--hairline); background: var(--hover); }
.theme-toggle svg { width: 17px; height: 17px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--canvas); }
.btn-primary:hover { background: var(--ink); opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--ink-muted); background: var(--hover); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24)) var(--space-16);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-12);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--signal);
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-weak);
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: var(--space-6);
  max-width: 16ch;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--ink) 20%, var(--ink-muted) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: 44ch;
  line-height: 1.55;
  margin-bottom: var(--space-8);
}
.hero .cta-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.hero .meta {
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---- Terminal demo (echo of Kortix's cli-demo) ---- */
.terminal {
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--hairline-soft);
}
.terminal-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-head .dot.r { background: #ff5f57; }
.terminal-head .dot.y { background: #febc2e; }
.terminal-head .dot.g { background: #28c840; }
.terminal-head .title {
  margin-left: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
.terminal-body {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.terminal-body .line { white-space: pre-wrap; }
.terminal-body .prompt { color: var(--signal); }
.terminal-body .cmd { color: var(--ink); }
.terminal-body .out { color: var(--ink-muted); }
.terminal-body .ok { color: var(--ok); }
.terminal-body .dim { color: var(--ink-faint); }
.terminal-body .cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: var(--signal);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
  border-top: 1px solid var(--hairline-soft);
}
.section-head { max-width: 46em; margin-bottom: var(--space-12); }
.section-head h2 {
  font-size: var(--text-3xl);
  font-weight: 660;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.section-head .sub { font-size: var(--text-lg); color: var(--ink-muted); }
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--signal);
  margin-bottom: var(--space-3);
}

/* ---- Comparison table ---- */
.table-wrap {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.table-scroll { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 720px; }
table.cmp thead th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--ink-muted);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-1);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0;
}
table.cmp thead th.hl {
  color: var(--ink);
  font-weight: 700;
}
table.cmp thead th.hl::after {
  content: '← open';
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--signal);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}
table.cmp tbody td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
  line-height: 1.5;
}
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp tbody tr:hover { background: var(--hover); }
table.cmp td.dim {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  white-space: nowrap;
  padding-top: var(--space-5);
}
table.cmp td small { display: block; color: var(--ink-muted); font-weight: 400; margin-top: 2px; font-family: var(--font-body); }
.flag-open, .flag-partial, .flag-closed { font-weight: 600; }
.flag-open { color: var(--ok); }
.flag-partial { color: var(--warn); }
.flag-closed { color: var(--bad); }
.footnote { font-size: var(--text-xs); color: var(--ink-faint); margin-top: var(--space-4); }

/* ---- Platform cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-5); }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  transition: transform var(--duration-normal) var(--ease),
              border-color var(--duration-normal) var(--ease),
              box-shadow var(--duration-normal) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--ink-muted);
  box-shadow: var(--shadow-md);
}
.card .tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  background: var(--surface-1);
}
.card h3 { font-size: var(--text-xl); font-weight: 650; letter-spacing: -0.02em; }
.card .site {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--signal);
  margin-bottom: var(--space-1);
}
.card p { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.6; }
.card ul { list-style: none; display: grid; gap: var(--space-2); }
.card li {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  padding-left: var(--space-5);
  position: relative;
}
.card li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--signal);
  opacity: 0.7;
}

/* ---- Callouts ---- */
.callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  margin-top: var(--space-6);
}
.callout .ic {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--signal-weak);
  color: var(--signal);
}
.callout p { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.65; }
.callout strong { color: var(--ink); }

/* ---- Steps ---- */
ol.steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-5); max-width: 56em; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: calc(var(--space-10) + var(--space-2));
  font-size: var(--text-base);
  color: var(--ink-muted);
  line-height: 1.6;
}
ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--signal);
  width: var(--space-10); height: var(--space-10);
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
ol.steps li strong { color: var(--ink); }

/* ---- FAQ ---- */
details.faq {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .chev {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
  color: var(--ink-muted);
  transition: transform var(--duration-normal) var(--ease);
}
details.faq[open] summary .chev { transform: rotate(45deg); color: var(--signal); border-color: var(--signal); }
details.faq .faq-body { padding: 0 var(--space-6) var(--space-6); }
details.faq .faq-body p { font-size: var(--text-base); color: var(--ink-muted); line-height: 1.65; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--space-12) var(--space-16);
  background: var(--base);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.site-footer .brand { margin-bottom: var(--space-4); }
.site-footer p { font-size: var(--text-sm); color: var(--ink-muted); }
.disclaimer { font-size: var(--text-xs); color: var(--ink-faint); max-width: 56em; margin-top: var(--space-4); line-height: 1.6; }
.footer-src { font-size: var(--text-xs); color: var(--ink-faint); }
.footer-src a { color: var(--ink-muted); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-10); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: var(--space-4); }
  .footer-grid { flex-direction: column; }
}


/* ---- Display type (themes pick a display face; editorial uses a serif) ---- */
h1, h2, h3, .hero h1, .section-head h2 { font-family: var(--font-display); }

/* ---- Small screens: compact header ---- */
@media (max-width: 560px) {
  .nav-actions .btn { padding: 6px 12px; font-size: var(--text-xs); white-space: nowrap; }
  .brand > span:not(.logo):not(.tld) { max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand .tld { display: none; }
}

/* ---- Mobile menu (no JS): <details class="nav-menu"> in .nav-actions ----
   Hidden on desktop; below 900px .nav-links hide and this takes over.
   Put EVERY primary nav link and the CTA inside .nav-menu-panel. */
.nav-menu { display: none; position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 40px; height: 40px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  color: var(--ink); background: var(--surface); }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
  display: grid; gap: 2px; padding: var(--space-2); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 50; }
.nav-menu-panel a:not(.btn) { display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; }
.nav-menu-panel a:not(.btn):hover { background: var(--hover); }
.nav-menu-panel .btn { margin-top: var(--space-2); justify-content: center; text-align: center; }
@media (max-width: 900px) { .nav-menu { display: block; } }
@media (max-width: 560px) { .nav-actions > .btn { display: none; } }
/* ============================================================
   Archetype: comparison-hub
   Two-column hero (claim + product artifact such as a terminal, a config
   file or a decision widget), the comparison table as the centrepiece,
   a verdict band, alternative cards, FAQ. Best for "X alternatives" and
   "open source X" head terms.
   ============================================================ */
.hero { padding: var(--space-20) 0 var(--space-16); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-12); align-items: center; }

/* verdict band: the answer, stated once, above the fold of the table */
.verdict { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-6);
  align-items: center; padding: var(--space-6) var(--space-8);
  border: 1px solid var(--hairline); border-left: 4px solid var(--signal);
  border-radius: var(--radius); background: var(--surface-1); margin: var(--space-8) 0; }
.verdict .label { font-family: var(--font-mono); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--signal); }
.verdict p { font-size: var(--text-lg); color: var(--ink); }

/* sticky first column + highlighted Kortix column */
table.cmp thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-1); }
table.cmp td:first-child, table.cmp th:first-child { position: sticky; left: 0;
  background: var(--surface); z-index: 1; }
table.cmp td.hl-col { background: var(--signal-weak); }

.alt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .alt-grid { grid-template-columns: 1fr 1fr; }
  .verdict { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .alt-grid { grid-template-columns: 1fr; } }
/* ============================================================
   Theme: graphite
   Dark with colour: deep blue-violet graphite surfaces, a soft glow behind
   the hero, rounded 14px cards, geometric grotesque display. Feels like a
   modern devtool launch page.
   Fonts (in <head>):
     https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&family=Fira+Code:wght@400&display=swap
   Accent: set --signal / --signal-weak in the site layer.
   ============================================================ */
:root {
  color-scheme: dark;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'Fira Code', ui-monospace, monospace;
  --radius: 0.875rem; --radius-sm: 0.625rem;
  --canvas: #0d0f1a; --base: #10131f; --surface: #161a29;
  --surface-1: #161a29; --surface-2: #1e2336; --surface-3: #272d44;
  --ink: #eef0fa; --ink-strong: #ffffff; --ink-muted: #a3a9c2; --ink-faint: #676e8c;
  --hairline: #2a3049; --hairline-soft: #1c2133;
  --signal: #8b7bff; --signal-weak: rgba(139, 123, 255, 0.14);
  --ok: #30d158; --warn: #ff9f0a; --bad: #ff453a;
  --hover: rgba(238, 240, 250, 0.05); --active: rgba(238, 240, 250, 0.09);
  --selection: rgba(139, 123, 255, 0.30);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, 0.8);
  --glass-bg: rgba(13, 15, 26, 0.75); --glass-border: rgba(238, 240, 250, 0.08);
  --code-bg: #10131f; --code-border: #2a3049;
}
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% 10% auto; height: 420px; z-index: -1;
  background: radial-gradient(closest-side, var(--signal-weak), transparent 70%);
  filter: blur(20px);
}
.card { background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); }
/* ============================================================
   opensourceaiagentplatform.com — site layer
   signature: "company-as-one-git-repo" artifact (kortix.yaml + file tree)
   plus a CSS-only constraint -> mechanism decision scorecard.
   Accent: acid chartreuse #b7ec3c (hue ~78deg), chosen >30deg from every
   live sibling accent. Theme: graphite.
   ============================================================ */
:root {
  --signal: #b7ec3c;
  --signal-weak: rgba(183, 236, 60, 0.13);
  --selection: rgba(183, 236, 60, 0.25);
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* dot-grid over the theme's hero glow: the site's own texture */
body {
  background-image:
    radial-gradient(1200px 600px at 50% -10%, var(--signal-weak), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 255, 255, 0.035), transparent 55%),
    radial-gradient(rgba(238, 240, 250, 0.05) 1px, transparent 1.4px);
  background-size: auto, auto, 22px 22px;
}
.hero h1 .accent {
  background: linear-gradient(115deg, var(--ink) 25%, var(--signal) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head h2 { letter-spacing: -0.032em; }
.kicker, .eyebrow { color: var(--signal); }
a { text-underline-offset: 3px; }

/* --- signature artifact: the company as one git repo ------------------- */
.repo-card {
  background: var(--code-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.repo-card .repo-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--hairline-soft);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted);
}
.repo-card .repo-head .spark { width: 9px; height: 9px; border-radius: 2px; background: var(--signal); }
.repo-card .repo-head .branch { margin-left: auto; color: var(--ink-faint); }
.repo-tree {
  display: grid; gap: 2px;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-xs);
  border-bottom: 1px dashed var(--hairline-soft);
}
.repo-tree .row { display: flex; gap: var(--space-3); color: var(--ink-muted); }
.repo-tree .row .ic { width: 14px; color: var(--ink-faint); }
.repo-tree .row.dir { color: var(--ink); }
.repo-tree .row.mine { color: var(--signal); }
.repo-card pre {
  margin: 0; padding: var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.75;
  color: var(--ink-muted); overflow-x: auto;
}
.repo-card pre .key { color: var(--signal); }
.repo-card pre .cm { color: var(--ink-faint); }
.repo-card pre .str { color: var(--ink); }

/* --- signature component: constraint -> mechanism scorecard (CSS-only) -- */
.scorecard {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow: hidden;
}
.scorecard > input { position: absolute; opacity: 0; pointer-events: none; }
.scorecard-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.scorecard-tabs label {
  flex: 1 1 0; min-width: 140px;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-muted); cursor: pointer; text-align: center;
  border-right: 1px solid var(--hairline-soft);
}
.scorecard-tabs label:last-child { border-right: none; }
.scorecard-tabs label:hover { color: var(--ink); background: var(--hover); }
.scorecard-panels { padding: var(--space-8); }
.scorecard .panel { display: none; }
.scorecard .panel h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.scorecard .panel p { color: var(--ink-muted); max-width: 60ch; }
.scorecard .panel .mech {
  display: inline-block; margin-bottom: var(--space-4);
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--signal); border: 1px solid var(--signal);
  border-radius: var(--radius-full); padding: 3px 10px;
}
.scorecard .panel .why { margin-top: var(--space-3); font-size: var(--text-sm); }
#prio-own:checked ~ .scorecard-tabs label[for="prio-own"],
#prio-model:checked ~ .scorecard-tabs label[for="prio-model"],
#prio-connect:checked ~ .scorecard-tabs label[for="prio-connect"],
#prio-host:checked ~ .scorecard-tabs label[for="prio-host"],
#prio-gate:checked ~ .scorecard-tabs label[for="prio-gate"] {
  color: var(--canvas); background: var(--signal);
}
#prio-own:checked ~ .scorecard-panels .panel-own,
#prio-model:checked ~ .scorecard-panels .panel-model,
#prio-connect:checked ~ .scorecard-panels .panel-connect,
#prio-host:checked ~ .scorecard-panels .panel-host,
#prio-gate:checked ~ .scorecard-panels .panel-gate { display: block; }

/* --- supporting patterns unique to this site --------------------------- */
.lead-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.lead-grid .card h3 { font-size: var(--text-lg); }
.node-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.fact-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4); margin-top: var(--space-8);
}
.fact-strip .fact {
  border-top: 2px solid var(--signal); padding-top: var(--space-3);
}
.fact-strip .fact .n {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-2xl); letter-spacing: -0.03em;
}
.fact-strip .fact .l { font-size: var(--text-xs); color: var(--ink-muted); }
.article { max-width: 62rem; }
.article h2 { font-size: var(--text-2xl); margin: var(--space-12) 0 var(--space-4); }
.article h3 { font-size: var(--text-xl); margin: var(--space-8) 0 var(--space-3); }
.article p { margin-bottom: var(--space-5); color: var(--ink-muted); line-height: 1.7; }
.article ul, .article ol { margin: 0 0 var(--space-5) var(--space-6); display: grid; gap: var(--space-3); }
.article li { color: var(--ink-muted); line-height: 1.65; }
.article strong { color: var(--ink); }
.article a { color: var(--signal); }
.article .table-wrap { margin: var(--space-6) 0; }
.article code { color: var(--ink); }
.article pre {
  background: var(--code-bg); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: var(--space-5); margin: var(--space-6) 0;
  font-size: var(--text-xs); line-height: 1.7; color: var(--ink-muted);
}
.read-next {
  margin-top: var(--space-12);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: var(--space-5) var(--space-6); background: var(--surface-1);
  font-size: var(--text-sm);
}
.read-next .kicker { margin-bottom: var(--space-2); }
.read-next a { color: var(--signal); }
.page-hero { padding: var(--space-16) 0 var(--space-8); border-bottom: 1px solid var(--hairline-soft); }
.page-hero h1 { font-size: var(--text-3xl); max-width: 22ch; }
.page-hero .lede { max-width: 62ch; }
.breadcrumb {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--ink-faint); margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--ink-muted); }

@media (max-width: 900px) {
  .lead-grid, .fact-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lead-grid, .fact-strip { grid-template-columns: 1fr; }
  .scorecard-tabs label { min-width: 0; }
  .hero h1 { max-width: none; }
}

/* --- CTA band (comparison-hub skeleton uses one; base has no rule) ----- */
.cta-band {
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface-1), var(--canvas));
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
  text-align: center;
}
.cta-band h2 { font-size: var(--text-3xl); letter-spacing: -0.03em; margin-bottom: var(--space-4); }
.cta-band .btn { margin-top: var(--space-3); }

/* --- inner-page hero rhythm -------------------------------------------- */
.page-hero h1 { margin-bottom: 0; }
.page-hero .lede { margin-top: var(--space-5); font-size: var(--text-lg); color: var(--ink-muted); line-height: 1.55; }
