/* ============================================================
   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: docs
   Documentation site: left section nav, readable article column, right
   "on this page" TOC, breadcrumbs, prev/next, admonitions, copyable code.
   Best for setup / self-hosting / how-to term clusters ("self-host X",
   "X setup", "install X").
   ============================================================ */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: var(--space-10); max-width: var(--content-wide); margin: 0 auto;
  padding: var(--space-10) var(--space-6); }
.docs-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px);
  overflow: auto; font-size: var(--text-sm); }
.docs-side h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint); margin: var(--space-6) 0 var(--space-2); }
.docs-side a { display: block; padding: 6px 10px; border-radius: var(--radius-sm);
  color: var(--ink-muted); text-decoration: none; }
.docs-side a:hover { background: var(--hover); color: var(--ink); }
.docs-side a[aria-current="page"] { background: var(--signal-weak); color: var(--signal); font-weight: 600; }

.docs-main { min-width: 0; }
.breadcrumb { font-size: var(--text-xs); color: var(--ink-faint); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--ink-muted); }
.prose { max-width: 72ch; }
.prose h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.prose h2 { font-size: var(--text-xl); margin: var(--space-12) 0 var(--space-3);
  padding-top: var(--space-6); border-top: 1px solid var(--hairline-soft); }
.prose h3 { font-size: var(--text-lg); margin: var(--space-8) 0 var(--space-2); }
.prose p, .prose li { color: var(--ink-muted); line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: var(--space-3) 0; }
.prose pre { margin: var(--space-4) 0; }

.admonition { border: 1px solid var(--hairline); border-left: 3px solid var(--signal);
  background: var(--surface-1); border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5); margin: var(--space-6) 0; }
.admonition.warn { border-left-color: var(--warn); }
.admonition .title { font-weight: 600; color: var(--ink); margin-bottom: var(--space-1); }

.toc { position: sticky; top: 76px; align-self: start; font-size: var(--text-xs); }
.toc p { text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint);
  margin-bottom: var(--space-2); }
.toc a { display: block; color: var(--ink-muted); padding: 4px 0; text-decoration: none; }
.toc a:hover { color: var(--signal); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-16); }
.pager a { border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--space-4);
  text-decoration: none; color: var(--ink); }
.pager a span { display: block; font-size: var(--text-xs); color: var(--ink-faint); }
.pager a:last-child { text-align: right; }

@media (max-width: 1100px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 760px) {
  .docs-layout { grid-template-columns: 1fr; padding: var(--space-6) var(--space-4); }
  .docs-side { position: static; max-height: none; border-bottom: 1px solid var(--hairline); padding-bottom: var(--space-4); }
}

/* code blocks: full-width, padded, scrollable */
.prose pre { display: block; padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm);
  background: var(--code-bg); border: 1px solid var(--code-border); overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: var(--text-sm); }

@media (max-width: 760px) { .docs-main { order: -1; } .docs-side { border-bottom: 0; border-top: 1px solid var(--hairline); padding-top: var(--space-4); } }
/* ============================================================
   Theme: blueprint
   Light technical: cool grey-blue canvas with a faint engineering grid,
   square corners, IBM Plex throughout, tables and specs first. Feels like
   documentation written for engineers.
   Fonts (in <head>):
     https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap
   Accent: set --signal / --signal-weak in the site layer.
   ============================================================ */
:root {
  color-scheme: light;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-display: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 0.125rem; --radius-sm: 0.125rem;
  --canvas: #f4f7fb; --base: #f4f7fb; --surface: #ffffff;
  --surface-1: #eef2f8; --surface-2: #e3e9f2; --surface-3: #d6dfeb;
  --ink: #0f1b2d; --ink-strong: #081322; --ink-muted: #4b5a70; --ink-faint: #8391a5;
  --hairline: #cfd8e5; --hairline-soft: #e3e9f2;
  --signal: #0f766e; --signal-weak: rgba(15, 118, 110, 0.10);
  --ok: #1a7f37; --warn: #9a6700; --bad: #b3261e;
  --hover: rgba(15, 27, 45, 0.045); --active: rgba(15, 27, 45, 0.08);
  --selection: rgba(15, 118, 110, 0.18);
  --shadow-sm: none;
  --shadow-md: 0 0 0 1px var(--hairline);
  --shadow-lg: 0 0 0 1px var(--hairline), 0 12px 32px -20px rgba(15, 27, 45, 0.25);
  --glass-bg: rgba(244, 247, 251, 0.88); --glass-border: rgba(15, 27, 45, 0.08);
  --code-bg: #0f1b2d; --code-border: #0f1b2d;
}
body {
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: 32px 32px;
}
pre, pre code { color: #dbe6f5; }
table.cmp thead th { text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--text-xs); }

/* inline code sits on the dark code background too: keep it readable */
:not(pre) > code { background: var(--code-bg); color: #f5f5f4; border-color: var(--code-bg); padding: 0.1em 0.4em; border-radius: var(--radius-sm); }
/* ============================================================
   ccwa.css — site layer for claudecoworkalternative.com
   Identity: docs archetype x blueprint theme x accent #a01a58.
   Concept: an annotated engineering manual — cool blueprint grid, IBM Plex,
   square corners, and a red-pen accent marking the Claude Cowork -> Kortix
   migration map. Signature component: .migrate-map (8-row mapping table with
   dashed connectors and mono note numbers) + .migrate-check (square-marked
   switch checklist). No sibling site has a migration mapping component.
   ============================================================ */

:root {
  --signal: #a01a58;
  --signal-weak: rgba(160, 26, 88, 0.10);
  --selection: rgba(160, 26, 88, 0.20);
  --radius: 0.125rem;
  --radius-sm: 0.125rem;
}

/* header: keep the nav off the edge and never let it overflow a 390px phone */
.site-header .nav { gap: var(--space-3); }
.brand { min-width: 0; }
.nav-actions { flex: 0 0 auto; }
.nav-links { gap: var(--space-5); }

/* the brand mark: a small blueprint square with a migration arrow */
.brand .logo { background: var(--signal); color: #fff; }
.brand .logo svg { width: 16px; height: 16px; }

/* ---- Guide header ---- */
.guide-head { margin-bottom: var(--space-8); }
.guide-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-4);
}
.guide-eyebrow::before {
  content: ''; width: 7px; height: 7px; background: var(--signal);
}
.guide-lede { font-size: var(--text-lg); color: var(--ink); line-height: 1.6; max-width: 68ch; }

/* a small spec strip under the H1 (facts at a glance) */
.spec-strip {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  margin: var(--space-5) 0 0; padding: var(--space-3) 0;
  border-top: 1px dashed var(--hairline);
  border-bottom: 1px dashed var(--hairline);
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--ink-muted);
}
.spec-strip b { color: var(--signal); font-weight: 500; }

/* ---- Signature: the Claude Cowork -> Kortix migration map ---- */
.migrate-map {
  border: 1px solid var(--hairline); background: var(--surface);
  margin: var(--space-6) 0 var(--space-8);
}
.mm-head {
  display: grid; grid-template-columns: 1fr 44px 1.15fr;
  border-bottom: 1px solid var(--hairline); background: var(--surface-1);
}
.mm-head span {
  padding: var(--space-3) var(--space-5); font-family: var(--font-mono);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.mm-head span:last-child { color: var(--signal); }
.mm-row {
  display: grid; grid-template-columns: 1fr 44px 1.15fr;
  border-bottom: 1px solid var(--hairline-soft);
}
.mm-row:last-child { border-bottom: 0; }
.mm-cowork, .mm-kortix {
  padding: var(--space-4) var(--space-5); font-size: var(--text-sm);
  line-height: 1.55;
}
.mm-cowork {
  color: var(--ink-muted); position: relative;
  background-image: repeating-linear-gradient(135deg,
    transparent 0 7px, rgba(15, 27, 45, 0.028) 7px 8px);
}
.mm-kortix { color: var(--ink); background: var(--signal-weak); }
.mm-no {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  color: var(--signal); margin-right: var(--space-2);
}
.mm-arrow {
  display: grid; place-items: center; color: var(--signal);
  font-family: var(--font-mono);
  border-left: 1px dashed var(--hairline); border-right: 1px dashed var(--hairline);
}
@media (max-width: 760px) {
  .mm-head { display: none; }
  .mm-row { grid-template-columns: 1fr; }
  .mm-arrow { padding: 0; height: 26px; border: 0; transform: rotate(90deg); }
}

/* ---- Signature: the switch checklist ---- */
.migrate-check { counter-reset: mcheck; list-style: none; display: grid; gap: var(--space-4); max-width: 60em; margin: var(--space-5) 0; }
.migrate-check li {
  counter-increment: mcheck; position: relative;
  padding-left: calc(var(--space-10) + var(--space-2));
  color: var(--ink-muted); line-height: 1.7;
}
.migrate-check li::before {
  content: counter(mcheck, decimal-leading-zero);
  position: absolute; left: 0; top: 0.1em;
  width: var(--space-10); height: var(--space-10);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--signal); background: var(--signal-weak);
  border: 1px solid var(--signal);
}
.migrate-check li strong { color: var(--ink); }

/* ---- Comparison table on a docs page: tame the min-width ---- */
.prose .table-scroll { margin: var(--space-5) 0; border: 1px solid var(--hairline); }

/* ---- Footer ---- */
.site-footer .brand .logo { background: var(--signal); }
.site-footer .cols { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--signal); }

/* keep the kit mobile menu, restyled to the site (never re-implement) */
.nav-menu > summary { border-radius: var(--radius-sm); }
.nav-menu-panel { border-radius: var(--radius-sm); }
.nav-menu-panel a:not(.btn):hover { background: var(--signal-weak); }

/* pager accent */
.pager a:hover { border-color: var(--signal); text-decoration: none; }
.pager a:last-child { border-right: 2px solid var(--signal); }
.pager a:first-child { border-left: 2px solid var(--signal); }
