/* antjanus.com — 030 Linear-Style Product Aesthetic
   Dark-first, hairline grid, one steel-blue accent derived from brand #364f6a. */

:root {
  --max: 1200px;
  --gutter: 24px;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 150ms;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* dark (default) */
  --canvas: #08090a;
  --surface-1: #0e0f11;
  --surface-2: #141518;
  --surface-3: #1b1c20;
  --surface-4: #23252a;
  --hairline: rgba(255, 255, 255, .08);
  --hairline-strong: rgba(255, 255, 255, .14);
  --grid-line: rgba(255, 255, 255, .045);
  --ink: #f7f8f8;
  --ink-2: #c9ced6;
  --ink-3: #9197a1;
  --ink-4: #62666d;
  --accent: #86a9d6;
  --accent-strong: #b3cbea;
  --accent-ink: #08090a;
  --accent-wash: rgba(134, 169, 214, .12);
  --accent-glow: rgba(96, 137, 191, .35);
  --btn-bg: #f7f8f8;
  --btn-ink: #08090a;
  --btn-hover: #ffffff;
  --shadow-window: 0 0 0 1px rgba(255,255,255,.06), 0 30px 80px -20px rgba(0,0,0,.8), 0 0 120px -30px var(--accent-glow);
  --c-ai: #a99cf7;
  --c-dg: #5cc28e;
  --c-dt: #e5b150;
  --c-st: #f08fb8;
  --c-pr: #86a9d6;
  --c-bad: #f07a7a;
  --code-bg: #0b0c0e;
  --code-ink: #d8dde4;
  --tok-kw: #b7a6ff;
  --tok-str: #8fd6a8;
  --tok-com: #7d848e;
  --tok-tag: #86b6ec;
  --tok-num: #f0b77a;
  --tok-fn: #f2d68c;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --canvas: #fbfbfc;
  --surface-1: #ffffff;
  --surface-2: #f4f5f7;
  --surface-3: #eceef1;
  --surface-4: #e1e4e9;
  --hairline: rgba(15, 20, 30, .09);
  --hairline-strong: rgba(15, 20, 30, .16);
  --grid-line: rgba(15, 20, 30, .05);
  --ink: #0f1115;
  --ink-2: #353a43;
  --ink-3: #5c626d;
  --ink-4: #9aa0aa;
  --accent: #364f6a;
  --accent-strong: #2a3f54;
  --accent-ink: #ffffff;
  --accent-wash: rgba(54, 79, 106, .09);
  --accent-glow: rgba(54, 79, 106, .22);
  --btn-bg: #0f1115;
  --btn-ink: #ffffff;
  --btn-hover: #2a2e36;
  --shadow-window: 0 0 0 1px rgba(15,20,30,.08), 0 30px 70px -25px rgba(15,20,30,.28), 0 0 100px -30px var(--accent-glow);
  --c-ai: #6247d1;
  --c-dg: #1d7a4b;
  --c-dt: #93600a;
  --c-st: #b3306f;
  --c-pr: #364f6a;
  --c-bad: #b3312a;
  --code-bg: #0e1013;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; transition: text-decoration-color var(--t); }
p a:hover, .prose a:hover, .link:hover { text-decoration-color: var(--accent); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-wash); color: var(--ink); }

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

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 14px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }

.mono { font-family: var(--font-mono); font-feature-settings: normal; }
.tnum { font-variant-numeric: tabular-nums; }
.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; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; font-size: 0.975rem; min-height: 44px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink);
  background: linear-gradient(160deg, var(--surface-4), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--hairline-strong), inset 0 1px 0 rgba(255,255,255,.08); }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.8125rem; color: var(--ink-3); letter-spacing: 0; line-height: 1.1; }
.brand span { line-height: 1.15; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { font-size: 0.9375rem; color: var(--ink-3); padding: 8px 12px; border-radius: var(--radius-s); transition: color var(--t), background var(--t); min-height: 40px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--hairline); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cmdk-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-3); cursor: pointer; font-size: 0.9375rem; min-width: 190px; transition: border-color var(--t), color var(--t); }
.cmdk-btn:hover { border-color: var(--hairline-strong); color: var(--ink-2); }
.cmdk-btn svg { width: 16px; height: 16px; flex: none; }
.cmdk-btn .kbds { margin-left: auto; display: inline-flex; gap: 3px; }
kbd, .kbd { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1; padding: 4px 6px; min-width: 22px; text-align: center; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--hairline-strong); border-bottom-width: 2px; color: var(--ink-2); display: inline-block; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--radius-s); background: transparent; border: 1px solid transparent; color: var(--ink-3); cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--hairline); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }

.mobile-nav { display: none; border-top: 1px solid var(--hairline); padding: 8px var(--gutter) 16px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-bottom: 1px solid var(--hairline); color: var(--ink-2); font-size: 1.0625rem; }
.mobile-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.mobile-nav a .mono { color: var(--ink-3); font-size: 0.8125rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-s); font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.005em; cursor: pointer; border: 1px solid transparent; transition: background var(--t), border-color var(--t), color var(--t), transform var(--t); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--hairline-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { color: var(--ink-3); padding: 0 10px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }
.btn svg { width: 16px; height: 16px; }
.arrow { transition: transform var(--t) var(--ease); display: inline-block; }
a:hover .arrow, button:hover .arrow { transform: translateX(3px); }

/* ---------- Frame + sections (the precision grid) ---------- */
.frame { max-width: calc(var(--max) + 2px); margin: 0 auto; border-inline: 1px solid var(--hairline); position: relative; }
.section { position: relative; border-top: 1px solid var(--hairline); padding: 96px var(--gutter); }
.section.tight { padding-block: 64px; }
.section.flush { padding: 0; }
.section::before, .section::after {
  content: ""; position: absolute; top: -5px; width: 9px; height: 9px; pointer-events: none;
  background: linear-gradient(var(--ink-4), var(--ink-4)) center / 1px 100% no-repeat, linear-gradient(var(--ink-4), var(--ink-4)) center / 100% 1px no-repeat;
}
.section::before { left: -5px; }
.section::after { right: -5px; }
.section.nomarks::before, .section.nomarks::after { display: none; }

.gridlines { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%); }
.glow { position: absolute; inset: -20% 0 auto; height: 620px; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, var(--accent-glow), transparent 70%); opacity: .9; }

.eyebrow { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.03em; margin-top: 12px; }
.section-head p { color: var(--ink-3); font-size: 1.0625rem; margin-top: 10px; max-width: 58ch; }
.gradient-text { background: linear-gradient(180deg, var(--ink) 35%, color-mix(in srgb, var(--ink) 58%, var(--canvas))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-display { font-size: clamp(2.6rem, 6.4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 600; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); color: var(--ink-3); line-height: 1.55; max-width: 60ch; }

/* ---------- Announcement pill ---------- */
.pill-announce { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; min-height: 40px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: 0.9375rem; color: var(--ink-2); transition: border-color var(--t); max-width: 100%; }
.pill-announce:hover { border-color: var(--hairline-strong); }
.pill-announce .tag { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--accent-wash); color: var(--accent-strong); padding: 3px 9px; border-radius: 999px; flex: none; }
:root[data-theme="light"] .pill-announce .tag { color: var(--accent); }
.pill-announce .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { padding: 120px var(--gutter) 0; overflow: hidden; }
.hero-copy { position: relative; max-width: 900px; }
.hero-copy h1 { margin: 28px 0 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 36px; }
.hero-hint { margin-top: 20px; font-size: 0.875rem; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.hero-stage { position: relative; margin-top: 72px; perspective: 2000px; }
.hero-stage .window { transform: rotateX(9deg) scale(.985); transform-origin: 50% 0; }
.hero-stage::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -2px; height: 45%; background: linear-gradient(transparent, var(--canvas) 85%); pointer-events: none; }
.hero-beam { position: absolute; inset: 0; pointer-events: none; background: url("assets/hero-beam.webp") center top / cover no-repeat; opacity: .55; mix-blend-mode: screen; }
:root[data-theme="light"] .hero-beam { opacity: .18; mix-blend-mode: multiply; }

/* ---------- App window mock ---------- */
.window { position: relative; border-radius: 14px; background: var(--surface-1); box-shadow: var(--shadow-window); overflow: hidden; }
.window-bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-4); display: block; }
.window-bar .crumbs { margin-left: 12px; font-size: 0.875rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; overflow: hidden; white-space: nowrap; }
.window-bar .crumbs b { color: var(--ink); font-weight: 500; }
.window-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 460px; }
.w-side { border-right: 1px solid var(--hairline); padding: 14px 10px; background: var(--surface-1); }
.w-profile { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.w-profile img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; object-position: 30% 20%; background: var(--surface-3); }
.w-profile b { color: var(--ink); font-weight: 600; font-size: 0.9375rem; display: block; line-height: 1.2; }
.w-profile span { font-size: 0.8125rem; color: var(--ink-3); }
.w-group { font-size: 0.8125rem; color: var(--ink-3); padding: 14px 8px 6px; }
.w-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 0.9375rem; color: var(--ink-2); min-height: 34px; }
.w-item:hover { background: var(--surface-3); color: var(--ink); }
.w-item.on { background: var(--surface-3); color: var(--ink); }
.w-item .count { margin-left: auto; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.w-item svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.w-main { min-width: 0; }
.w-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.w-head h3 { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; margin-right: 10px; }
.w-tab { font-size: 0.875rem; padding: 4px 10px; border-radius: 6px; color: var(--ink-3); border: 1px solid transparent; }
.w-tab.on { color: var(--ink); background: var(--surface-3); border-color: var(--hairline); }
.w-group-row { display: flex; align-items: center; gap: 10px; padding: 8px 18px; background: var(--surface-2); font-size: 0.875rem; color: var(--ink-2); border-bottom: 1px solid var(--hairline); }
.w-group-row .mono { color: var(--ink-3); font-size: 0.8125rem; }

/* ---------- Issue rows (writing lists) ---------- */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 76px 18px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 0 18px; min-height: 48px; border-bottom: 1px solid var(--hairline); color: var(--ink-2); transition: background var(--t); }
.row:hover { background: var(--surface-2); }
.row:hover .row-title { color: var(--ink); }
.row:focus-visible { outline-offset: -2px; border-radius: 0; }
.row-id { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; }
.row-title { color: var(--ink); font-weight: 500; font-size: 0.96875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-labels { display: flex; gap: 6px; }
.row-date { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; min-width: 88px; text-align: right; }
.rows.lg .row { min-height: 64px; grid-template-columns: 76px 18px minmax(0, 1fr) auto 100px; }
.row-sub { display: block; font-size: 0.9375rem; color: var(--ink-3); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.rows.lg .row-title { white-space: normal; }
.rows.lg .row-main { padding: 12px 0; min-width: 0; }

.status { width: 16px; height: 16px; display: block; }
.status.pub { color: var(--accent); }
.status.plan { color: var(--ink-3); }
.status.prog { color: var(--c-dt); }

.label { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--hairline-strong); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; background: var(--surface-1); }
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lc, var(--ink-3)); flex: none; }
.l-ai { --lc: var(--c-ai); } .l-dg { --lc: var(--c-dg); } .l-dt { --lc: var(--c-dt); } .l-st { --lc: var(--c-st); } .l-pr { --lc: var(--c-pr); }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; }
a.chip:hover { border-color: var(--hairline-strong); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Stat strip (hairline gap) ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
.stat-strip.boxed { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--canvas); padding: 32px var(--gutter); }
.stat-strip.boxed .stat { background: var(--surface-1); padding: 24px; }
.stat .k { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); display: block; }
.stat .v { display: block; font-size: clamp(2.25rem, 4vw, 3.25rem); font-weight: 600; color: var(--ink); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 10px; }
.stat .s { display: block; color: var(--ink-3); font-size: 0.9375rem; margin-top: 6px; }

/* ---------- Cards / tiles ---------- */
.tiles { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius-l); overflow: hidden; }
.tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { background: var(--surface-1); padding: 28px; position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: background var(--t); }
a.tile:hover { background: var(--surface-2); }
.tile h3 { font-size: 1.1875rem; letter-spacing: -0.02em; line-height: 1.3; }
.tile p { color: var(--ink-3); font-size: 1rem; }
.tile .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.tile .foot { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.9375rem; color: var(--ink-2); }
.tile-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); background: linear-gradient(160deg, var(--surface-4), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--hairline-strong), inset 0 1px 0 rgba(255,255,255,.06); }
.tile-icon svg { width: 20px; height: 20px; }

.shot { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--hairline); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hairline); pointer-events: none; }
a:hover .shot img { transform: scale(1.025); }
.shot.term { background: #0b0c0e; }
.shot.term img { object-fit: contain; }
.placeholder-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 70% 0%, var(--accent-glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--surface-2); }
.placeholder-art span { font-family: var(--font-mono); font-size: clamp(1.25rem, 3vw, 2rem); color: var(--ink-3); letter-spacing: -0.02em; }
.placeholder-art.l-ai span { color: var(--c-ai); } .placeholder-art.l-dg span { color: var(--c-dg); } .placeholder-art.l-dt span { color: var(--c-dt); }

.card-link { display: flex; flex-direction: column; gap: 14px; }
.card-link h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.015em; }
.card-link:hover h3 { color: var(--accent-strong); }
:root[data-theme="light"] .card-link:hover h3 { color: var(--accent); }
.card-link p { color: var(--ink-3); font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.panel { border: 1px solid var(--hairline); border-radius: var(--radius-l); background: var(--surface-1); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); }
.panel-head h3 { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.panel-head .mono { font-size: 0.8125rem; color: var(--ink-3); }
.panel-body { padding: 22px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.split-3-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; align-items: start; }

.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-l); border: 1px solid var(--hairline); padding: 48px; background: radial-gradient(ellipse 60% 100% at 100% 0%, var(--accent-glow), transparent 70%), var(--surface-1); display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); letter-spacing: -0.03em; }
.cta-band p { color: var(--ink-3); margin-top: 10px; font-size: 1.0625rem; max-width: 52ch; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { border-top: 1px solid var(--hairline); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; color: var(--ink); font-weight: 500; }
.link-list a .mono { color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.link-list a:hover { color: var(--accent-strong); }
:root[data-theme="light"] .link-list a:hover { color: var(--accent); }

/* ---------- Page header ---------- */
.page-head { position: relative; padding: 96px var(--gutter) 64px; overflow: hidden; }
.page-head h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); letter-spacing: -0.045em; line-height: 1.03; margin: 20px 0 20px; max-width: 18ch; }
.page-head .lede { position: relative; }
.page-head-art { position: absolute; right: var(--gutter); top: 64px; width: min(42%, 460px); aspect-ratio: 4 / 3; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-window); background: var(--surface-2); }
.page-head-art img { width: 100%; height: 100%; object-fit: cover; }
.page-head.has-art .page-head-copy { max-width: 56%; }
.page-head-copy { position: relative; }

/* ---------- Segmented / filters ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--hairline); flex-wrap: wrap; }
.seg button, .seg a { min-height: 38px; padding: 0 14px; border-radius: 6px; background: transparent; border: 1px solid transparent; color: var(--ink-3); cursor: pointer; font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 8px; transition: color var(--t), background var(--t); }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface-4); color: var(--ink); border-color: var(--hairline); }
.seg .mono { font-size: 0.8125rem; color: var(--ink-3); }

.sticky-bar { position: sticky; top: 64px; z-index: 20; background: color-mix(in srgb, var(--canvas) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 10px var(--gutter); display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none; }
.sticky-bar::-webkit-scrollbar { display: none; }
.sticky-bar .eyebrow { flex: none; }
.sticky-bar .seg { flex-wrap: nowrap; flex: none; }

/* ---------- Writing layout (sidebar list view) ---------- */
.listview { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.lv-side { border-right: 1px solid var(--hairline); padding: 24px 14px; position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow: auto; }
.lv-side h2 { font-size: 0.8125rem; font-family: var(--font-mono); font-weight: 400; color: var(--ink-3); letter-spacing: .02em; padding: 18px 10px 8px; }
.lv-side h2:first-child { padding-top: 0; }
.filter-btn { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 6px; background: transparent; border: 1px solid transparent; color: var(--ink-2); cursor: pointer; text-align: left; font-size: 0.9375rem; }
.filter-btn:hover { background: var(--surface-2); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); border-color: var(--hairline); }
.filter-btn .count { margin-left: auto; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.filter-btn .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--lc, var(--ink-3)); flex: none; }
.lv-main { min-width: 0; }
.lv-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.lv-toolbar .status-text { font-size: 0.9375rem; color: var(--ink-3); margin-left: auto; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input { width: 100%; height: 42px; padding: 0 44px 0 38px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); font-size: 0.9375rem; transition: border-color var(--t); }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.group-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--surface-1); border-bottom: 1px solid var(--hairline); position: sticky; top: 64px; z-index: 2; font-size: 0.9375rem; color: var(--ink); font-weight: 500; }
.group-head .mono { color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.group-head .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.empty { padding: 64px 24px; text-align: center; color: var(--ink-3); }
.empty h3 { font-size: 1.125rem; margin-bottom: 6px; }
.empty[hidden] { display: none; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); box-shadow: 0 0 12px var(--accent-glow); }
.article-head { position: relative; padding: 72px var(--gutter) 48px; overflow: hidden; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { color: var(--ink-4); }
.article-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.04em; line-height: 1.05; margin: 22px 0 18px; max-width: 20ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); align-items: center; }
.article-hero { padding: 0 var(--gutter) 64px; position: relative; }
.article-hero .window { max-width: 1040px; margin: 0 auto; }
.article-hero .shot { aspect-ratio: 21 / 9; border-radius: 0; box-shadow: none; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, 680px) 260px; justify-content: space-between; gap: 48px; padding: 64px var(--gutter) 96px; }
.toc { position: sticky; top: 96px; align-self: start; }
.toc h2, .props h2 { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); letter-spacing: .02em; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hairline); }
.toc a { display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 0.9375rem; color: var(--ink-3); line-height: 1.35; transition: color var(--t), border-color var(--t); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); }
.toc-mobile { display: none; }
.props { position: sticky; top: 96px; align-self: start; }
.props dl { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; font-size: 0.9375rem; align-items: center; }
.props dt { color: var(--ink-3); }
.props dd { margin: 0; color: var(--ink); min-width: 0; }
.props .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.props .actions .btn { justify-content: flex-start; }

.prose { font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); min-width: 0; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--hairline); position: relative; }
.prose h2 .anchor { position: absolute; left: -1.2em; color: var(--ink-4); opacity: 0; transition: opacity var(--t); font-weight: 400; }
.prose h2:hover .anchor, .prose h2 .anchor:focus-visible { opacity: 1; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink); }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ol li::marker { font-family: var(--font-mono); color: var(--ink-3); font-size: .9em; }
.prose ul li::marker { color: var(--accent); }
.prose :not(pre) > code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-3); border: 1px solid var(--hairline); padding: .12em .4em; border-radius: 5px; color: var(--ink); }

.callout { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 18px 16px 50px; position: relative; background: var(--surface-1); font-size: 1.0625rem; line-height: 1.65; }
.callout::before { content: ""; position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; border-radius: 5px; background: var(--cc, var(--ink-3)); -webkit-mask: var(--ci) center / contain no-repeat; mask: var(--ci) center / contain no-repeat; }
.callout .callout-label { display: block; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: .02em; color: var(--cc); margin-bottom: 4px; }
.callout-why { --cc: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--surface-1));
  --ci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .callout-why { --cc: var(--accent); }
.callout-q { --cc: var(--c-ai); border-color: color-mix(in srgb, var(--c-ai) 35%, transparent); background: color-mix(in srgb, var(--c-ai) 7%, var(--surface-1));
  --ci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.callout-note { --cc: var(--ink-3);
  --ci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 4h14v16H5zM9 9h6M9 13h6'/%3E%3C/svg%3E"); }
.callout-skill { --cc: var(--c-dg); border-color: color-mix(in srgb, var(--c-dg) 35%, transparent); background: color-mix(in srgb, var(--c-dg) 7%, var(--surface-1));
  --ci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E"); }
.callout p + p { margin-top: .6em; }

.code { border-radius: var(--radius); overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255,255,255,.08); margin-left: -24px; margin-right: -24px; }
.code-bar { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 8px 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: #121316; }
.code-bar .lang { font-family: var(--font-mono); font-size: 0.8125rem; color: #9aa1ab; display: inline-flex; align-items: center; gap: 8px; }
.code-bar .lang::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #3178c6; }
.copy-btn { min-height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #c9ced6; font-size: 0.8125rem; font-family: var(--font-mono); cursor: pointer; transition: background var(--t), color var(--t); }
.copy-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.copy-btn.is-success { color: #8fd6a8; border-color: rgba(143,214,168,.4); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.7; color: var(--code-ink); tab-size: 2; }
.code code { font-family: inherit; }
.tok-kw { color: var(--tok-kw); } .tok-str { color: var(--tok-str); } .tok-com { color: var(--tok-com); font-style: italic; } .tok-tag { color: var(--tok-tag); } .tok-num { color: var(--tok-num); } .tok-fn { color: var(--tok-fn); }

.article-end { border-top: 1px solid var(--hairline); padding: 64px var(--gutter); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.newsletter h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.03em; }
.newsletter p { color: var(--ink-3); margin-top: 8px; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input[type="email"] { flex: 1 1 220px; height: 44px; padding: 0 14px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--hairline-strong); color: var(--ink); font-size: 1rem; }
.nl-form input::placeholder { color: var(--ink-3); }
.nl-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.nl-consent { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--ink-3); margin-top: 6px; }
.nl-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.nl-msg { flex-basis: 100%; font-size: 0.9375rem; min-height: 1.5em; }
.nl-msg.ok { color: var(--c-dg); } .nl-msg.err { color: var(--c-bad); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--hairline); }
.footer-grid { max-width: var(--max); margin: 0 auto; padding: 64px var(--gutter) 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 40px; }
.footer h2 { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); letter-spacing: .02em; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink-2); font-size: 0.9375rem; }
.footer li a:hover { color: var(--ink); }
.footer .blurb { color: var(--ink-3); font-size: 0.9375rem; margin-top: 14px; max-width: 30ch; }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--hairline); font-size: 0.875rem; color: var(--ink-3); }
.footer-bottom .status-dot { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-dg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-dg) 20%, transparent); }

/* ---------- Command palette ---------- */
.cmdk { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); padding: 0; border: 1px solid var(--hairline-strong); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 92%, transparent); color: var(--ink-2); box-shadow: 0 40px 100px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04); margin: 12vh auto auto; overflow: hidden; backdrop-filter: blur(20px); }
.cmdk::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--hairline); }
.cmdk-input svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.cmdk-input input { flex: 1; height: 58px; background: transparent; border: 0; outline: none; color: var(--ink); font-size: 1.0625rem; }
.cmdk-input input::placeholder { color: var(--ink-3); }
.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: 420px; overflow: auto; }
.cmdk-list .grp { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); padding: 10px 10px 6px; }
.cmdk-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 0.9375rem; }
.cmdk-list a .hint { margin-left: auto; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.cmdk-list a[aria-selected="true"] { background: var(--surface-4); color: var(--ink); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--hairline); font-size: 0.8125rem; color: var(--ink-3); flex-wrap: wrap; }
.cmdk-empty { padding: 28px 12px; text-align: center; color: var(--ink-3); }

/* ---------- Projects ---------- */
.feature-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border: 1px solid var(--hairline); border-radius: var(--radius-l); overflow: hidden; background: var(--surface-1); }
.feature-card .fc-copy { padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.feature-card .fc-copy h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.035em; }
.feature-card .fc-copy p { color: var(--ink-3); font-size: 1.0625rem; }
.feature-card .fc-art { position: relative; min-height: 320px; background: var(--surface-3); border-left: 1px solid var(--hairline); }
.feature-card .fc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oss-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 150px 120px; gap: 20px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--hairline); transition: background var(--t); }
.oss-row:last-child { border-bottom: 0; }
.oss-row:hover { background: var(--surface-2); }
.oss-row h3 { font-size: 1rem; letter-spacing: -0.01em; }
.oss-row p { color: var(--ink-3); font-size: 0.96875rem; }
.stars { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); justify-content: flex-end; }
.stars .bar { width: 64px; height: 4px; border-radius: 2px; background: var(--surface-4); overflow: hidden; }
.stars .bar i { display: block; height: 100%; background: var(--c-dt); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.portrait { position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-3); box-shadow: var(--shadow-window); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 10px; font-family: var(--font-mono); font-size: 0.8125rem; color: #e6eaef; background: rgba(8,9,10,.72); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); }
.career-bar { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; height: 40px; }
.career-bar span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-3); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-family: var(--font-mono); }
.career-bar span.now { background: var(--accent-wash); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--hairline-strong); }
.timeline > li { position: relative; padding: 0 0 40px 44px; }
.timeline > li::before { content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--canvas); border: 1px solid var(--hairline-strong); }
.timeline > li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.timeline .period { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.timeline h3 { font-size: 1.375rem; letter-spacing: -0.025em; margin: 6px 0 8px; }
.timeline p { color: var(--ink-3); max-width: 64ch; }
.roles { list-style: none; padding: 0; margin: 16px 0 0; border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.roles li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--surface-1); flex-wrap: wrap; }
.roles li + li { border-top: 1px solid var(--hairline); }
.roles li b { color: var(--ink); font-weight: 500; }
.roles li span { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.bullets { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.bullets li + li { margin-top: 6px; }
.bullets li::marker { color: var(--accent); }
details.disclose > summary { list-style: none; cursor: pointer; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose[open] > summary .when-closed { display: none; }
details.disclose:not([open]) > summary .when-open { display: none; }
.quote-list { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.quote-list li { counter-increment: q; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--hairline); font-size: clamp(1.1875rem, 2vw, 1.5rem); color: var(--ink); letter-spacing: -0.02em; line-height: 1.35; font-weight: 500; }
.quote-list li::before { content: counter(q, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); padding-top: .45em; letter-spacing: 0; font-weight: 400; }
.skill-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Patterns ---------- */
.pattern-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hairline); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.pcard { background: var(--canvas); padding: 22px var(--gutter) 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; position: relative; transition: background var(--t); }
.pcard:hover { background: var(--surface-1); }
.pcard h2 { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.3; }
.pcard h2 a::after { content: ""; position: absolute; inset: 0; }
.pcard p { color: var(--ink-3); font-size: 0.96875rem; }
.pcard .good { font-size: 0.9375rem; color: var(--ink-3); }
.pcard .good b { color: var(--ink-2); font-weight: 500; }
.pcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.badge { font-family: var(--font-mono); font-size: 0.8125rem; padding: 2px 8px; border-radius: 5px; border: 1px solid var(--hairline-strong); color: var(--ink-2); }
.badge.new { color: var(--c-dg); border-color: color-mix(in srgb, var(--c-dg) 45%, transparent); background: color-mix(in srgb, var(--c-dg) 10%, transparent); }
.badge.upd { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-wash); }
:root[data-theme="light"] .badge.upd { color: var(--accent); }
.pthumb { height: 150px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface-1); position: relative; overflow: hidden; padding: 16px; display: grid; }
.pthumb::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 16px 16px; }
.pthumb > * { position: relative; }
.pthumb .strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hairline-strong); border: 1px solid var(--hairline-strong); border-radius: 6px; overflow: hidden; align-self: center; }
.pthumb .strip i { height: 44px; background: var(--surface-2); display: block; }
.pthumb .strip i:nth-child(2) { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.pthumb .bars { display: flex; gap: 4px; align-items: end; height: 100%; }
.pthumb .bars i { flex: 1; background: color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 3px 3px 0 0; display: block; }
.pthumb .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: center; }
.pthumb .cards i { height: 50px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--hairline); display: block; }
.pthumb .cards i:nth-child(odd) { height: 70px; }
.pthumb .ctrls { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pthumb .ctrls i { height: 12px; border-radius: 6px; background: var(--surface-3); display: block; }
.pthumb .ctrls i:first-child { width: 60%; background: color-mix(in srgb, var(--accent) 40%, var(--surface-3)); }
.pthumb .ctrls i:nth-child(2) { width: 85%; } .pthumb .ctrls i:nth-child(3) { width: 40%; }
.pthumb .ctrls b { display: block; width: 90px; height: 28px; border-radius: 6px; background: var(--btn-bg); margin-top: 4px; }
.pthumb .form { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pthumb .form i { height: 30px; border-radius: 6px; border: 1px solid var(--hairline-strong); background: var(--surface-2); display: block; }
.pthumb .form i:last-child { width: 45%; background: color-mix(in srgb, var(--c-bad) 20%, var(--surface-2)); }
.pthumb .swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; align-content: center; }
.pthumb .swatches i { aspect-ratio: 1; border-radius: 6px; display: block; background: var(--accent); }
.pthumb .swatches i:nth-child(2) { background: var(--c-dg); } .pthumb .swatches i:nth-child(3) { background: var(--c-dt); } .pthumb .swatches i:nth-child(4) { background: var(--c-ai); } .pthumb .swatches i:nth-child(5) { background: var(--c-st); }
.pthumb .swatches i:nth-child(n+6) { opacity: .45; }
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius-l); overflow: hidden; }
.three-ways > div { background: var(--surface-1); padding: 24px; }
.three-ways h3 { font-size: 1.0625rem; display: flex; gap: 10px; align-items: center; }
.three-ways h3 .mono { color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.three-ways p { color: var(--ink-3); margin-top: 8px; font-size: 0.96875rem; }
.filters-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 18px var(--gutter); border-top: 1px solid var(--hairline); }
.filters-row .count { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); margin-left: auto; display: flex; gap: 12px; align-items: center; }
.select { height: 42px; padding: 0 36px 0 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); font-size: 0.9375rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239197a1' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

.pattern-detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 48px var(--gutter) 96px; }
.panes { border: 1px solid var(--hairline); border-radius: var(--radius-l); overflow: hidden; background: var(--surface-1); }
.panes-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); flex-wrap: wrap; }
.panes-bar [role="tablist"] { display: flex; gap: 2px; flex-wrap: wrap; }
.panes-bar [role="tab"] { min-height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 0.9375rem; }
.panes-bar [role="tab"]:hover { color: var(--ink); }
.panes-bar [role="tab"][aria-selected="true"] { background: var(--surface-4); color: var(--ink); border-color: var(--hairline); }
.panes-actions { display: flex; gap: 6px; }
.pane { padding: 28px; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.7; white-space: pre-wrap; color: var(--ink-2); }
.pane .note { font-size: 0.9375rem; color: var(--ink-3); padding: 12px 14px; border-radius: 8px; border: 1px dashed var(--hairline-strong); margin-bottom: 18px; }
.prompt-prose { font-size: 1.0625rem; line-height: 1.7; max-width: 68ch; }
.prompt-prose p + p { margin-top: 1em; }
.stage { background: var(--canvas); border-radius: 10px; border: 1px solid var(--hairline); padding: 24px; }
.stage .cap { font-size: 0.9375rem; color: var(--ink-3); margin-bottom: 12px; }
.stage .cap + .hss-strip { margin-bottom: 28px; }
.hss-strip { display: grid; gap: 1px; background: var(--hairline-strong); border: 1px solid var(--hairline-strong); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; }
.hss-tile { background: var(--surface-1); padding: 14px 16px; min-width: 0; text-align: left; border: 0; color: inherit; font: inherit; }
.hss-label { display: block; font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.hss-fig { display: block; font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.25; margin-top: 4px; }
.hss-fig.missing { color: var(--ink-4); }
.hss-note { display: block; font-size: 0.875rem; color: var(--ink-3); overflow-wrap: anywhere; }
button.hss-tile { cursor: pointer; transition: background var(--t); }
button.hss-tile:hover { background: var(--surface-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--surface-1)); box-shadow: inset 0 -2px 0 var(--accent); }
button.hss-tile:focus-visible { outline-offset: -3px; }
.dl-list { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.dl-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--surface-1); font-size: 0.9375rem; color: var(--ink); flex-wrap: wrap; }
.dl-list li + li { border-top: 1px solid var(--hairline); }
.dl-list li[hidden] { display: none; }
.dl-list .st { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.dl-list .st.done { color: var(--c-dg); } .dl-list .st.fail { color: var(--c-bad); } .dl-list .st.dl { color: var(--accent-strong); }
:root[data-theme="light"] .dl-list .st.dl { color: var(--accent); }
.live-status { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-3); }
@media (min-width: 336px) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hss-strip.four { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.use-cases { columns: 2; column-gap: 32px; margin: 12px 0 0; padding-left: 1.2em; }
.use-cases li { margin-bottom: 6px; break-inside: avoid; }
.use-cases li::marker { color: var(--accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.pager a { background: var(--surface-1); padding: 18px 20px; display: block; }
.pager a:hover { background: var(--surface-2); }
.pager .k { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); display: block; }
.pager b { color: var(--ink); font-weight: 500; }
.pager a:last-child { text-align: right; }

/* ---------- Reveal motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 700ms var(--ease) both; }
  .reveal.d1 { animation-delay: 80ms; } .reveal.d2 { animation-delay: 160ms; } .reveal.d3 { animation-delay: 240ms; } .reveal.d4 { animation-delay: 360ms; }
  .hero-stage .window { animation: tilt 1200ms var(--ease) 300ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes tilt { from { opacity: 0; transform: rotateX(24deg) scale(.94) translateY(30px); } to { opacity: 1; transform: rotateX(9deg) scale(.985); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .props { position: static; grid-column: 2; order: -1; border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px; background: var(--surface-1); }
  .props .actions { flex-direction: row; flex-wrap: wrap; }
  .code { margin-left: 0; margin-right: 0; }
}
@media (max-width: 1080px) {
  .nav a { padding: 8px 9px; }
  .cmdk-btn { min-width: 0; }
  .cmdk-btn .label-txt { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oss-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 130px; }
  .oss-row .tech { display: none; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav, .cmdk-btn { display: none; }
  .menu-btn { display: inline-grid; }
  .window-body { grid-template-columns: 1fr; }
  .w-side { display: none; }
  .hero { padding-top: 72px; }
  .hero-stage { margin-top: 48px; }
  .hero-stage .window { transform: none; }
  .tiles.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split-3-2, .newsletter, .about-hero, .feature-card { grid-template-columns: 1fr; }
  .feature-card .fc-art { min-height: 240px; border-left: 0; border-top: 1px solid var(--hairline); order: -1; }
  .listview { grid-template-columns: 1fr; }
  .lv-side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--hairline); display: flex; gap: 6px; overflow-x: auto; padding: 12px var(--gutter); scrollbar-width: none; }
  .lv-side::-webkit-scrollbar { display: none; }
  .lv-side h2 { display: none; }
  .lv-side .filter-btn { width: auto; flex: none; border-color: var(--hairline); }
  .group-head { top: 64px; }
  .page-head.has-art .page-head-copy { max-width: none; }
  .page-head-art { position: relative; right: auto; top: auto; width: 100%; margin-top: 40px; aspect-ratio: 16 / 9; }
  .article-layout { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .toc { display: none; }
  .toc-mobile { display: block; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface-1); }
  .toc-mobile summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; cursor: pointer; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); list-style: none; }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile ol { list-style: none; margin: 0; padding: 0 16px 12px; }
  .toc-mobile a { display: flex; min-height: 44px; align-items: center; color: var(--ink-2); border-top: 1px solid var(--hairline); }
  .props { grid-column: auto; }
  .pattern-detail { grid-template-columns: 1fr; }
  .oss-row { grid-template-columns: 1fr; gap: 6px; }
  .stars { justify-content: flex-start; }
  .rows.lg .row { grid-template-columns: 64px 18px minmax(0, 1fr); }
  .rows.lg .row .row-labels, .rows.lg .row .row-date { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding-block: 64px; }
  .section::before, .section::after { display: none; }
  .frame { border-inline: 0; }
  .tiles.c3, .tiles.c2, .tiles.c4, .three-ways, .pattern-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-strip:not(.boxed) .stat { padding: 22px var(--gutter); display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; }
  .stat-strip:not(.boxed) .stat .v { margin-top: 0; grid-row: span 2; font-size: 2.25rem; }
  .row { grid-template-columns: 18px minmax(0, 1fr) auto; padding: 0 var(--gutter); gap: 10px; }
  .row .row-id, .row .row-labels { display: none; }
  .rows.lg .row { grid-template-columns: 18px minmax(0, 1fr); }
  .rows.lg .row .row-id { display: none; }
  .row-date { min-width: 0; }
  .brand small { display: none; }
  .cta-band { padding: 28px; }
  .feature-card .fc-copy { padding: 24px; }
  .tile { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .use-cases { columns: 1; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
  .career-bar { flex-wrap: wrap; height: auto; background: transparent; gap: 4px; }
  .career-bar span { flex: 1 1 45% !important; height: 36px; border-radius: 6px; }
  .pane { padding: 18px; }
  .stage { padding: 14px; }
  .article-head { padding-top: 48px; }
  .hero-stage::after { height: 30%; }
  .w-head .w-tab:nth-of-type(n+2) { display: none; }
}
.cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--lc, var(--ink-3)); display: inline-block; flex: none; }
.w-item .cdot { margin: 0 4px; }
.group-head { flex-wrap: wrap; }
@media (max-width: 640px) { .group-head .mono[style] { display: none; } }
.shot img { position: relative; z-index: 1; }
.placeholder-art.l-st span { color: var(--c-st); } .placeholder-art.l-pr span { color: var(--c-pr); font-size: clamp(1rem, 2vw, 1.375rem); }
@media (max-width: 900px) { .hero-hint { display: none; } }
[hidden] { display: none !important; }
.career-bar span { flex-basis: auto; flex-shrink: 1; }
.career-bar { flex-wrap: wrap; height: auto; }
.career-bar span { height: 40px; overflow: visible; }
