/* Geist / Developer Minimal — antjanus.com redesign 031 */

:root {
  /* primitives */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #fafafa;
  --gray-100: #f2f2f2;
  --gray-150: #ebebeb;
  --gray-300: #d4d4d4;
  --gray-500: #666666;
  --gray-600: #4d4d4d;
  --gray-900: #171717;
  --slate-600: #364f6a;
  --slate-300: #9dbbdc;

  /* semantic (light) */
  --bg: var(--white);
  --bg-2: var(--gray-50);
  --fill: var(--gray-100);
  --fill-hover: var(--gray-150);
  --line: #ebebeb;
  --line-strong: #d4d4d4;
  --dot: #d9d9d9;
  --text: var(--gray-900);
  --text-2: var(--gray-600);
  --text-3: var(--gray-500);
  --accent: var(--slate-600);
  --accent-fill: #eef2f7;
  --accent-line: #c5d2e1;
  --invert-bg: var(--gray-900);
  --invert-text: var(--white);
  --code-bg: var(--gray-50);
  --ok: #0a7a3c;
  --ok-dot: #1fa05a;
  --warn: #8a5a00;
  --warn-dot: #e0a100;
  --violet: #6d3fc0;
  --violet-fill: #f4effc;
  --violet-line: #d9c9f3;
  --bad: #b3261e;
  --shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 2px rgba(0,0,0,.04), 0 8px 16px -4px rgba(0,0,0,.04);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 6px;
  --radius-lg: 12px;
  --frame: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: var(--black);
  --bg-2: #0a0a0a;
  --fill: #111111;
  --fill-hover: #1f1f1f;
  --line: #242424;
  --line-strong: #333333;
  --dot: #2a2a2a;
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #8f8f8f;
  --accent: var(--slate-300);
  --accent-fill: #0f1824;
  --accent-line: #2a3d54;
  --invert-bg: #ededed;
  --invert-text: #0a0a0a;
  --code-bg: #0a0a0a;
  --ok: #4ad38a;
  --ok-dot: #3fcf8e;
  --warn: #f2c14e;
  --warn-dot: #f2c14e;
  --violet: #b99cf2;
  --violet-fill: #160f24;
  --violet-line: #3b2a5e;
  --bad: #ff8a80;
  --shadow: 0 0 0 1px rgba(255,255,255,.1);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--black);
    --bg-2: #0a0a0a;
    --fill: #111111;
    --fill-hover: #1f1f1f;
    --line: #242424;
    --line-strong: #333333;
    --dot: #2a2a2a;
    --text: #ededed;
    --text-2: #a1a1a1;
    --text-3: #8f8f8f;
    --accent: var(--slate-300);
    --accent-fill: #0f1824;
    --accent-line: #2a3d54;
    --invert-bg: #ededed;
    --invert-text: #0a0a0a;
    --code-bg: #0a0a0a;
    --ok: #4ad38a;
    --ok-dot: #3fcf8e;
    --warn: #f2c14e;
    --warn-dot: #f2c14e;
    --violet: #b99cf2;
    --violet-fill: #160f24;
    --violet-line: #3b2a5e;
    --bad: #ff8a80;
    --shadow: 0 0 0 1px rgba(255,255,255,.1);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "ss01" on;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
p a, .prose a, .link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a:hover, .prose a:hover, .link:hover { text-decoration-thickness: 2px; color: var(--accent); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius); }
::selection { background: var(--accent); color: var(--bg); }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 600; }
p { margin: 0; }
code, kbd, pre { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--invert-bg); color: var(--invert-text); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.display { font-size: clamp(2.6rem, 6.4vw, 5.25rem); line-height: 1; letter-spacing: -0.055em; font-weight: 600; }
.h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.05em; font-weight: 600; }
.h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.04em; }
.h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.025em; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--text-2); letter-spacing: -0.01em; max-width: 60ch; }
.muted { color: var(--text-2); }
.label {
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); font-weight: 500;
}
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- frame + guides (Geist grid) ---------- */
.frame {
  max-width: var(--frame);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
}
.band { position: relative; border-bottom: 1px solid var(--line); }
.band > .frame { padding: 72px var(--gutter); }
.band.tight > .frame { padding: 40px var(--gutter); }
.band.flush > .frame { padding: 0; }
.cross { position: absolute; width: 21px; height: 21px; pointer-events: none; z-index: 2; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--text-3); }
.cross::before { left: 10px; top: 0; width: 1px; height: 21px; }
.cross::after { top: 10px; left: 0; height: 1px; width: 21px; }
.cross.tl { left: -11px; top: -11px; }
.cross.tr { right: -11px; top: -11px; }
.cross.bl { left: -11px; bottom: -11px; }
.cross.br { right: -11px; bottom: -11px; }
.dots {
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 16px 16px;
  background-position: -1px -1px;
}
.dots-fade { -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }

/* ---------- header / nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .frame { display: flex; align-items: center; gap: 20px; height: 64px; padding: 0 var(--gutter); border-color: transparent; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.03em; font-size: 1rem; flex-shrink: 0; }
.brand svg { width: 28px; height: 28px; }
.brand .slash { color: var(--line-strong); font-weight: 300; font-size: 1.4rem; margin: 0 2px; }
.brand .crumb { color: var(--text-2); font-weight: 500; font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a {
  position: relative; padding: 8px 12px; font-size: 0.9375rem; color: var(--text-2); border-radius: var(--radius);
  transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--fill); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--text); }
.nav a.ai-pill { color: var(--text); font-weight: 500; }
.nav a.ai-pill span { display: inline-flex; align-items: center; gap: 6px; }
.nav a.ai-pill span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: conic-gradient(from 180deg, #6d8fb8, #a37cf0, #3fcf8e, #6d8fb8); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 12px; min-width: 220px;
  border-radius: var(--radius); background: var(--bg); box-shadow: 0 0 0 1px var(--line-strong); color: var(--text-3); font-size: 0.9375rem;
}
.search input { border: 0; background: transparent; color: var(--text); font: inherit; width: 100%; outline: none; }
.search input::placeholder { color: var(--text-3); }
.search:focus-within { box-shadow: 0 0 0 1px var(--text-3), 0 0 0 4px var(--fill-hover); }
kbd { font-size: 0.8125rem; padding: 1px 6px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-strong); color: var(--text-3); background: var(--bg-2); line-height: 1.5; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius);
  background: transparent; border: 0; color: var(--text-2); cursor: pointer; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.menu-btn { display: none; }
.mobile-menu { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: var(--radius); font-size: 0.9375rem; font-weight: 500; border: 0; cursor: pointer; font-family: inherit;
  transition: background-color .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.btn-primary { background: var(--invert-bg); color: var(--invert-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--invert-bg) 85%, var(--bg)); color: var(--invert-text); }
.btn-secondary { background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.btn-secondary:hover { background: var(--fill); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--fill); color: var(--text); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 0.875rem; }
.btn.is-success { color: var(--ok); }
.arrow { transition: transform .15s; }
a:hover .arrow { transform: translateX(2px); }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-2); background: var(--fill); white-space: nowrap;
}
a.chip:hover { background: var(--fill-hover); color: var(--text); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 500; font-family: var(--font-mono); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2);
}
.badge.ai { color: var(--violet); background: var(--violet-fill); box-shadow: inset 0 0 0 1px var(--violet-line); }
.badge.garden { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--bg)); }
.badge.tools { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--bg)); }
.badge.accent { color: var(--accent); background: var(--accent-fill); box-shadow: inset 0 0 0 1px var(--accent-line); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--text); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-dot) 25%, transparent); }
.status.warn::before { background: var(--warn-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn-dot) 25%, transparent); }
.status.bad::before { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); border-radius: 2px; }
.status.idle::before { background: var(--text-3); box-shadow: none; }

/* ---------- section heads ---------- */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.sec-head .label { margin-bottom: 10px; display: block; }
.sec-head p { color: var(--text-2); margin-top: 8px; font-size: 1.0625rem; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9375rem; color: var(--text-2); padding: 8px 0; }
.more:hover { color: var(--text); }

/* ---------- hairline grids (gap = line) ---------- */
.hair {
  display: grid; gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line);
}
.hair > * { background: var(--bg); min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- cards ---------- */
.card {
  display: flex; flex-direction: column; position: relative; background: var(--bg);
  transition: background-color .15s;
}
a.card:hover, .card.linked:hover { background: var(--bg-2); }
.card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--fill); border-bottom: 1px solid var(--line); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
a.card:hover .thumb img { transform: scale(1.02); }
.card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.02em; }
.card p { color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.card .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card .foot { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.date { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.panel { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }

/* ---------- list rows (deployment-list style) ---------- */
.rows { border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--bg); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 18px 22px; border-top: 1px solid var(--line); transition: background-color .15s;
}
.row:first-child { border-top: 0; }
a.row:hover { background: var(--bg-2); }
.row h3 { font-size: 1.0625rem; letter-spacing: -0.015em; line-height: 1.35; }
.row p { color: var(--text-2); font-size: 1rem; margin-top: 4px; }
.row .end { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

/* ---------- stats ---------- */
.stat { padding: 22px 24px; }
.stat .v { font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { margin-top: 10px; }

/* ---------- home hero ---------- */
.hero .frame { padding: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.hero-copy { padding: 88px var(--gutter) 72px 48px; border-right: 1px solid var(--line); position: relative; }
.hero-copy .display { margin: 22px 0 24px; }
.hero-copy .display em { font-style: normal; color: var(--text-3); }
.hero-cta { display: flex; gap: 12px; align-items: center; margin-top: 36px; flex-wrap: wrap; }
.deploy { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.deploy .panel { overflow: hidden; }
.deploy .shot { aspect-ratio: 4 / 3.2; background: var(--fill); overflow: hidden; }
.deploy .shot img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; filter: grayscale(1) contrast(1.05); transition: filter .4s; }
.deploy .panel:hover .shot img { filter: none; }
.kv { display: grid; grid-template-columns: auto 1fr; }
.kv dt, .kv dd { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.kv dt { color: var(--text-3); font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; }
.kv dd { text-align: right; }
.term {
  margin-top: 28px; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line-strong); background: var(--bg-2);
  font-family: var(--font-mono); font-size: 0.875rem; padding: 12px 14px; display: flex; gap: 10px; align-items: center; max-width: 560px; overflow-x: auto;
}
.term .p { color: var(--text-3); user-select: none; }
.term code { white-space: normal; overflow-wrap: anywhere; color: var(--text); }
.term .c { color: var(--accent); }

/* ---------- page hero (inner pages) ---------- */
.page-hero .frame { padding: 72px var(--gutter) 56px 48px; }
.page-hero .h1 { margin: 16px 0 16px; }
.page-hero .split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/10; background: var(--fill); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- tabs (Vercel dashboard underline) ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 12px 12px; font-size: 0.9375rem; color: var(--text-2); background: none; border: 0; cursor: pointer;
  font-family: inherit; white-space: nowrap; border-radius: var(--radius) var(--radius) 0 0; display: inline-flex; gap: 8px; align-items: center;
}
.tab:hover { color: var(--text); background: var(--fill); }
.tab[aria-selected="true"], .tab[aria-current="true"] { color: var(--text); }
.tab[aria-selected="true"]::after, .tab[aria-current="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--text); }
.tab .count { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3); background: var(--fill); padding: 0 6px; border-radius: 999px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line-strong); background: var(--bg); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 0.875rem; height: 32px; padding: 0 12px;
  border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--text); background: var(--fill); }
.seg button[aria-pressed="true"] { background: var(--fill-hover); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.seg svg { width: 16px; height: 16px; }

/* ---------- callouts ---------- */
.callout {
  display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 1rem; line-height: 1.6;
}
.callout .ico { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.callout.why { background: var(--accent-fill); box-shadow: inset 0 0 0 1px var(--accent-line); }
.callout.why .ico { color: var(--accent); }
.callout.ask { background: var(--violet-fill); box-shadow: inset 0 0 0 1px var(--violet-line); }
.callout.ask .ico { color: var(--violet); }
.callout.skill { background: var(--bg-2); }
.callout.skill .ico { color: var(--ok); }
.callout.note .ico { color: var(--warn); }

/* ---------- article ---------- */
.article-head .frame { padding: 56px var(--gutter) 48px 48px; }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9375rem; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.article-head .h1 { margin: 20px 0 16px; max-width: 18ch; }
.article-meta { display: flex; gap: 0; flex-wrap: wrap; margin-top: 28px; box-shadow: 0 0 0 1px var(--line); border-radius: var(--radius-lg); overflow: hidden; width: fit-content; max-width: 100%; }
.article-meta > div { padding: 10px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.article-meta > div:last-child { border-right: 0; }
.article-meta .v { font-size: 0.9375rem; }
.article-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.article-banner { aspect-ratio: 21 / 8; overflow: hidden; background: var(--fill); border-bottom: 1px solid var(--line); }
.article-banner img { width: 100%; height: 100%; object-fit: cover; }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; }
.docs > aside { padding: 40px 24px; }
.docs .toc-col { border-right: 1px solid var(--line); }
.docs .aside-r { border-left: 1px solid var(--line); }
.sticky { position: sticky; top: 96px; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-2); font-size: 0.9375rem; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--text); font-weight: 500; }
.toc-mobile { display: none; }
.prose { padding: 48px 56px 72px; font-size: 1.125rem; line-height: 1.75; color: var(--text); max-width: 800px; }
.prose > * + * { margin-top: 1.25em; }
.prose p { color: color-mix(in srgb, var(--text) 88%, var(--bg)); }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.035em; line-height: 1.2; margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); position: relative; }
.prose h2 .hash { position: absolute; left: -1.1em; color: var(--text-3); opacity: 0; font-weight: 400; text-decoration: none; }
.prose h2:hover .hash, .prose h2 .hash:focus { opacity: 1; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--text-3); font-family: var(--font-mono); font-size: .9em; }
.prose :not(pre) > code { font-size: .88em; padding: 2px 6px; border-radius: 4px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.prose em { font-style: italic; }
.code {
  border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line-strong); background: var(--code-bg); overflow: hidden; margin-left: -8px; margin-right: -8px;
}
.prose > .code { margin-top: 1.6em; margin-bottom: 1.6em; }
.code-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.code-head .file { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.code-head .file b { font-weight: 500; color: var(--text-3); background: var(--fill); padding: 0 6px; border-radius: 4px; }
.code pre { margin: 0; padding: 16px 0; overflow-x: auto; font-size: 0.875rem; line-height: 1.7; counter-reset: ln; }
.code pre code { display: block; min-width: fit-content; }
.code .ln { display: block; padding: 0 20px 0 0; }
.code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.2em; padding-right: 1.2em; text-align: right; color: var(--text-3); opacity: .6; user-select: none; }
.tk-k { color: #c41562; } .tk-s { color: #0a7a3c; } .tk-c { color: var(--text-3); font-style: italic; } .tk-f { color: #6d3fc0; } .tk-t { color: #0060c7; } .tk-n { color: #a35200; }
:root[data-theme="dark"] .tk-k { color: #ff4d8d; } :root[data-theme="dark"] .tk-s { color: #62d99a; } :root[data-theme="dark"] .tk-f { color: #c4a5ff; } :root[data-theme="dark"] .tk-t { color: #52a8ff; } :root[data-theme="dark"] .tk-n { color: #ffb35c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tk-k { color: #ff4d8d; } :root:not([data-theme="light"]) .tk-s { color: #62d99a; } :root:not([data-theme="light"]) .tk-f { color: #c4a5ff; } :root:not([data-theme="light"]) .tk-t { color: #52a8ff; } :root:not([data-theme="light"]) .tk-n { color: #ffb35c; }
}
.side-block + .side-block { margin-top: 32px; }
.side-block ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.side-block li a { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.9375rem; padding: 6px 0; }
.side-block li a:hover { color: var(--text); }
.side-block svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- newsletter ---------- */
.news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.news form { display: flex; gap: 8px; flex-wrap: wrap; }
.field {
  flex: 1; min-width: 200px; height: 44px; padding: 0 14px; border-radius: var(--radius); border: 0; font: inherit; font-size: 1rem;
  background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong);
}
.field::placeholder { color: var(--text-3); }
.field:focus { outline: none; box-shadow: 0 0 0 1px var(--text-3), 0 0 0 4px var(--fill-hover); }
.form-msg { width: 100%; font-size: 0.9375rem; min-height: 1.5em; color: var(--text-2); }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--text-2); width: 100%; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--text); }

/* ---------- footer ---------- */
.site-footer .frame { padding: 56px var(--gutter) 0 48px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 48px; }
.foot-grid h2 { font-size: 0.9375rem; font-weight: 500; margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.foot-grid li a { color: var(--text-2); font-size: 0.9375rem; display: inline-block; padding: 5px 0; }
.foot-grid li a:hover { color: var(--text); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.foot-bottom p { font-size: 0.9375rem; color: var(--text-3); }

/* ---------- patterns ---------- */
.pthumb { height: 168px; background: var(--bg-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; padding: 20px; }
.pthumb.dots { background-color: var(--bg-2); }
.mini { width: 100%; max-width: 240px; display: grid; gap: 6px; }
.mini i { display: block; height: 10px; border-radius: 3px; background: var(--line-strong); }
.mini i.a { background: var(--accent); }
.mini i.v { background: var(--violet); opacity: .8; }
.mini i.g { background: var(--ok-dot); }
.mini i.w { background: var(--warn-dot); }
.mini .r { display: flex; gap: 6px; }
.mini .r > i { flex: 1; }
.mini .box { background: var(--bg); border-radius: 6px; box-shadow: 0 0 0 1px var(--line-strong); padding: 8px; display: grid; gap: 6px; }
.mini .strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-strong); border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong); }
.mini .strip > span { background: var(--bg); height: 38px; padding: 6px; display: grid; gap: 4px; align-content: start; }
.mini .strip > span i { height: 6px; }
.mini .strip > span i + i { height: 10px; width: 70%; background: var(--text); }
.mini .dots-row { display: flex; gap: 5px; }
.mini .dots-row b { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.mini .dots-row b.a { background: var(--accent); } .mini .dots-row b.g { background: var(--ok-dot); } .mini .dots-row b.w { background: var(--warn-dot); border-radius: 2px; }
.pcard .body { gap: 8px; }
.pcard .cat { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pcard .good { font-size: 0.9375rem; color: var(--text-2); }
.pcard .good b { color: var(--text); font-weight: 500; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 24px; }
.toolbar .search { min-width: 0; flex: 1 1 360px; height: 44px; }
.select { height: 44px; padding: 0 12px; border-radius: var(--radius); border: 0; font: inherit; font-size: 0.9375rem; background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.result-line { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 0.9375rem; color: var(--text-2); }
.empty { padding: 64px 24px; text-align: center; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--text-2); margin-bottom: 20px; }
[hidden] { display: none !important; }

/* pattern detail */
.panes { border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; background: var(--bg); }
.panes-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panes-bar .tabs { border-bottom: 0; }
.panes-bar .acts { display: flex; gap: 8px; padding: 8px 0; }
.stage { padding: 40px 32px; }
.pane-code pre { margin: 0; padding: 20px 24px; overflow-x: auto; font-size: 0.875rem; line-height: 1.7; background: var(--code-bg); }
.pane-note { padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--text-2); background: var(--bg-2); }
.pane-prompt { padding: 28px 32px; font-size: 1.0625rem; line-height: 1.7; max-width: 76ch; }
.pane-prompt p + p { margin-top: 1em; }
.uses { columns: 2; column-gap: 32px; padding: 0; margin: 12px 0 0; list-style: none; }
.uses li { padding: 8px 0 8px 22px; border-bottom: 1px solid var(--line); position: relative; break-inside: avoid; }
.uses li::before { content: "→"; position: absolute; left: 0; color: var(--text-3); font-family: var(--font-mono); }

/* the demo pattern itself */
.hss-cap { font-size: 0.9375rem; color: var(--text-2); margin: 0 0 12px; }
.hss-strip { display: grid; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, minmax(0,1fr)); } .hss-strip.five { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.hss-tile { background: var(--bg); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; border: 0; font: inherit; color: inherit; }
button.hss-tile { cursor: pointer; transition: background-color .15s; border-radius: 0; }
button.hss-tile:hover { background: var(--bg-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); box-shadow: inset 0 -2px 0 var(--accent); }
.hss-k { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); overflow-wrap: anywhere; }
.hss-v { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.15; }
.hss-v.none { color: var(--text-3); }
.hss-s { font-size: 0.875rem; color: var(--text-2); }
.hss-list { list-style: none; margin: 16px 0 0; padding: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.hss-list li:first-child { border-top: 0; }
.hss-live { margin-top: 12px; font-size: 0.9375rem; color: var(--text-2); }

/* ---------- misc components ---------- */
.feature { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.feature .img { background: var(--fill); min-height: 320px; overflow: hidden; }
.feature .img img { width: 100%; height: 100%; object-fit: cover; }
.feature .txt { padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.alt .feature:nth-child(even) .img { order: 2; }
.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.table td { padding: 16px 20px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table td.r, .table th.r { text-align: right; }
.table a { font-weight: 500; }
.table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.scroll-x { overflow-x: auto; }
.invert-card { background: var(--invert-bg) !important; color: var(--invert-text); }
.invert-card h3, .invert-card .h3 { color: var(--invert-text); }
.invert-card p { color: color-mix(in srgb, var(--invert-text) 75%, var(--invert-bg)); }
.invert-card .btn { background: var(--invert-text); color: var(--invert-bg); }
.icon-tile { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--bg); color: var(--text); }
.icon-tile svg { width: 20px; height: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.timeline h3 { font-size: 1.25rem; letter-spacing: -0.025em; }
.timeline .roles { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.timeline .roles li { display: flex; justify-content: space-between; gap: 16px; font-size: 1rem; flex-wrap: wrap; }
.timeline .roles li span:last-child { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-3); }
.careerbar { display: grid; grid-template-columns: 1.2fr 1.1fr 1fr 0.7fr 2fr 3fr 1fr 2.2fr; gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); border-radius: 8px; overflow: hidden; margin: 24px 0 8px; }
.careerbar span { background: var(--bg); padding: 10px 10px; font-size: 0.8125rem; font-family: var(--font-mono); min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.careerbar span b { display: block; font-family: var(--font-sans); font-weight: 500; color: var(--text); font-size: 0.875rem; }
.careerbar span:first-child { background: var(--accent-fill); }
details.history > summary { list-style: none; cursor: pointer; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] .show-lbl { display: none; }
details.history:not([open]) .hide-lbl { display: none; }
.quote-list { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.quote-list li { counter-increment: q; display: grid; grid-template-columns: 56px minmax(0,1fr); padding: 22px 0; border-top: 1px solid var(--line); font-size: clamp(1.25rem, 2.2vw, 1.625rem); letter-spacing: -0.03em; line-height: 1.3; font-weight: 500; }
.quote-list li::before { content: "0" counter(q); font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-3); padding-top: 6px; letter-spacing: 0; font-weight: 400; }
.skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.portrait { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--fill); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.story-note { font-size: 0.9375rem; color: var(--warn); display: flex; gap: 8px; align-items: center; }
.pad { padding: 24px; }
.stack > * + * { margin-top: 16px; }
.split-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: start; }
.jump { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.jump .frame { padding: 0 var(--gutter) 0 40px; }
.jump .tabs { border-bottom: 0; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.series-steps { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.series-steps > * { background: var(--bg); padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.series-steps a:hover { background: var(--bg-2); }
.series-steps .bar { height: 4px; border-radius: 2px; background: var(--ok-dot); }
.series-steps .soon .bar { background: var(--line-strong); }
.series-steps .soon h3 { color: var(--text-2); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .docs { grid-template-columns: 220px minmax(0, 1fr); }
  .docs .aside-r { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .nav, .header-tools .search { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-menu[data-open="true"] { display: block; border-top: 1px solid var(--line); padding: 12px var(--gutter) 20px; }
  .mobile-menu a { display: flex; align-items: center; min-height: 48px; font-size: 1.125rem; border-bottom: 1px solid var(--line); color: var(--text-2); }
  .mobile-menu a[aria-current="page"] { color: var(--text); font-weight: 500; }
  .mobile-menu .search { margin-top: 16px; min-width: 0; height: 44px; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .frame { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .deploy { padding: 32px var(--gutter); }
  .deploy .panel { max-width: 560px; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs .toc-col { display: none; }
  .toc-mobile { display: block; margin: 24px var(--gutter) 0; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line-strong); }
  .toc-mobile summary { padding: 14px 18px; cursor: pointer; font-weight: 500; }
  .toc-mobile .toc { padding: 0 18px 16px; }
  .page-hero .split, .news, .split-2, .feature { grid-template-columns: 1fr; }
  .alt .feature:nth-child(even) .img { order: 0; }
  .feature .img { min-height: 0; aspect-ratio: 16/9; }
  .careerbar { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .series-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .frame { border-left: 0; border-right: 0; }
  .cross { display: none; }
  .band > .frame { padding: 48px var(--gutter); }
  .hero-copy { padding: 48px var(--gutter) 40px; }
  .page-hero .frame, .article-head .frame { padding: 44px var(--gutter) 36px; }
  .site-footer .frame { padding: 40px var(--gutter) 0; }
  .brand .crumb, .brand .slash { display: none; }
  .cols-4, .cols-3, .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .stats.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stats .stat { padding: 16px 14px; }
  .stats .stat .k { font-size: 0.8125rem; }
  .row { grid-template-columns: minmax(0,1fr); gap: 6px; padding: 16px 18px; }
  .row .end { justify-content: flex-start; flex-wrap: wrap; }
  .prose { padding: 32px var(--gutter) 56px; }
  .prose h2 .hash { display: none; }
  .code { margin-left: 0; margin-right: 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; }
  .uses { columns: 1; }
  .careerbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .series-steps { grid-template-columns: 1fr; }
  .feature .txt { padding: 24px; }
  .stage { padding: 24px 16px; }
  .pane-prompt { padding: 20px; }
  .quote-list li { grid-template-columns: 40px minmax(0,1fr); }
  .article-meta > div { padding: 8px 12px; }
  .jump .frame { padding: 0 8px; }
  .kv dt, .kv dd { padding: 10px 16px; }
}

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