/* skillzeb.io — design system v2
   Ink and paper from the zebra; signal green from the octo family.
   Light bands are for people, night bands are for agents. */

/* Self-hosted variable fonts (SIL Open Font License), latin subset */
/* Krub — the typeface of the skillzeb wordmark (slanted e bar, hooked b) */
@font-face { font-family: 'Krub'; src: url('/assets/fonts/krub-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Krub'; src: url('/assets/fonts/krub-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Krub'; src: url('/assets/fonts/krub-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-variable.woff2') format('woff2-variations'), url('/assets/fonts/dm-sans-variable.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/assets/fonts/jetbrains-mono-variable.woff2') format('woff2-variations'), url('/assets/fonts/jetbrains-mono-variable.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #13213a;
  --ink-2: #24395d;
  --night: #0b1424;
  --night-2: #12203a;
  --night-3: #1a2b4a;
  --paper: #ffffff;
  --paper-2: #eef1f6;
  --line: #d3d9e3;
  --line-night: rgba(255, 255, 255, 0.12);
  --muted: #56617a;
  --muted-night: #9aa6bf;
  --signal: #93dd3d;
  --signal-deep: #3f7a0e;
  --signal-wash: rgba(147, 221, 61, 0.18);

  --cap-a: #8a97ad;
  --cap-c: #93dd3d;
  --cap-k: #f5c842;
  --cap-n: #ff6f8a;

  --display: 'Krub', 'DM Sans', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.05rem, 3.9vw, 2.9rem);
  --step-5: clamp(2.5rem, 5.4vw, 4.2rem);

  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --r-s: 6px;
  --r-m: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--signal); color: var(--ink); }
mark { background: var(--signal-wash); color: inherit; box-shadow: inset 0 -2px 0 var(--signal); border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
}
h1 { font-size: var(--step-5); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
code, kbd, samp, pre { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; word-break: break-word; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--signal); color: var(--ink); padding: 0.6rem 1rem; font-weight: 700; }
.skip:focus { left: 1rem; top: 1rem; }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand img { height: 30px; width: auto; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 0.45rem 0.7rem; border-radius: var(--r-s);
}
.site-nav a:hover { background: var(--paper-2); }
.site-nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.site-nav .nav-agents { background: var(--ink); color: #fff; margin-left: 0.4rem; }
.site-nav .nav-agents:hover { background: var(--ink-2); }
.site-nav .nav-agents[aria-current='page'] { box-shadow: none; border-radius: var(--r-s); outline: 3px solid var(--signal); outline-offset: -3px; }
.site-nav .nav-gh { display: inline-flex; padding: 0.45rem; }
.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: 0.5rem;
    font: 600 0.95rem var(--sans); color: var(--ink); background: none; border: 2px solid var(--ink);
    border-radius: var(--r-s); padding: 0.35rem 0.75rem; cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 2px solid var(--ink); padding: 0.5rem var(--gutter) 1rem;
  }
  .site-nav a { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .nav-agents { margin: 0.75rem 0 0; text-align: center; border-radius: var(--r-s); }
  .site-head[data-open='true'] .site-nav { display: flex; }
}

/* ── bands ──────────────────────────────────────────────────────────────── */
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--tint { background: var(--paper-2); }
.band--night { background: var(--night); color: #e8edf7; }
.band--night a { text-decoration-color: var(--signal); }
.band--night .muted, .band--night .lede { color: var(--muted-night); }
.band--night :not(pre) > code { background: var(--night-3); color: #fff; }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.band-head { display: grid; gap: 1rem 3rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.band-head h2 { margin: 0; }
.band-head p { margin: 0; }
@media (max-width: 820px) { .band-head { grid-template-columns: minmax(0, 1fr); } }

/* page hero for inner pages */
.page-hero { padding-block: clamp(2.5rem, 5.5vw, 4.25rem) clamp(2rem, 3.5vw, 2.75rem); border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 15ch; }
.page-hero .lede { margin-top: 1.25rem; }
.page-hero--night { background: var(--night); color: #fff; border-bottom-color: var(--signal); }
.page-hero--night .lede { color: var(--muted-night); }
/* zebra flank: crisp stripes on a slanted edge, with the four capacity
   colours (A slate, C green, K yellow, N pink) as accents */
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero::after {
  content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 40%;
  background: repeating-linear-gradient(171deg,
    var(--ink) 0 30px, transparent 30px 46px,
    var(--signal) 46px 60px, transparent 60px 80px,
    var(--ink) 80px 104px, transparent 104px 120px,
    var(--ink) 120px 128px, transparent 128px 150px,
    var(--cap-k) 150px 158px, transparent 158px 176px,
    var(--ink) 176px 208px, transparent 208px 222px,
    var(--cap-n) 222px 230px, transparent 230px 250px,
    var(--ink) 250px 266px, transparent 266px 282px,
    var(--cap-a) 282px 290px, transparent 290px 310px);
  clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.page-hero--night::after {
  background: repeating-linear-gradient(171deg,
    rgba(255,255,255,.16) 0 30px, transparent 30px 46px,
    var(--signal) 46px 60px, transparent 60px 80px,
    rgba(255,255,255,.1) 80px 104px, transparent 104px 120px,
    rgba(255,255,255,.22) 120px 128px, transparent 128px 150px,
    var(--cap-k) 150px 156px, transparent 156px 176px,
    rgba(255,255,255,.12) 176px 208px, transparent 208px 222px,
    var(--cap-n) 222px 228px, transparent 228px 250px,
    rgba(255,255,255,.18) 250px 266px, transparent 266px 282px,
    var(--cap-a) 282px 288px, transparent 288px 310px);
}
/* on small screens the flank becomes a striped band along the bottom edge */
@media (max-width: 820px) {
  .page-hero { padding-bottom: calc(clamp(2rem, 3.5vw, 2.75rem) + 22px); }
  .page-hero::after { top: auto; height: 22px; width: 100%; clip-path: none;
    background: repeating-linear-gradient(105deg, var(--ink) 0 18px, transparent 18px 26px, var(--signal) 26px 34px, transparent 34px 44px, var(--ink) 44px 58px, transparent 58px 66px, var(--cap-k) 66px 70px, transparent 70px 80px, var(--ink) 80px 92px, transparent 92px 100px, var(--cap-n) 100px 104px, transparent 104px 114px); }
  .page-hero--night::after { background: repeating-linear-gradient(105deg, rgba(255,255,255,.2) 0 18px, transparent 18px 26px, var(--signal) 26px 34px, transparent 34px 44px, rgba(255,255,255,.14) 44px 58px, transparent 58px 66px, var(--cap-k) 66px 70px, transparent 70px 80px, rgba(255,255,255,.2) 80px 92px, transparent 92px 100px, var(--cap-n) 100px 104px, transparent 104px 114px); }
}

/* ── buttons & fields ──────────────────────────────────────────────────── */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 0.97rem/1 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--bg); color: var(--fg); border: 2px solid var(--bd);
  padding: 0.78rem 1.15rem; border-radius: var(--r-s); white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { --bg: var(--ink-2); --bd: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn--signal { --bg: var(--signal); --fg: var(--ink); --bd: var(--signal); }
.btn--signal:hover { --bg: #a6e95c; --bd: #a6e95c; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--ghost:hover { --bg: var(--ink); --fg: #fff; }
.band--night .btn--ghost, .page-hero--night .btn--ghost { --fg: #fff; --bd: rgba(255, 255, 255, 0.5); }
.band--night .btn--ghost:hover, .page-hero--night .btn--ghost:hover { --bg: #fff; --fg: var(--ink); --bd: #fff; }
.btn--small { padding: 0.5rem 0.75rem; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.field {
  width: 100%; font: 500 1.05rem var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: var(--r-s);
  padding: 0.85rem 1rem;
}
.field::placeholder { color: #7d879b; }
.field:focus { outline: 3px solid var(--signal); outline-offset: 0; }
select.field { appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313213a' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; }
textarea.field { font: 400 0.88rem/1.55 var(--mono); min-height: 16rem; resize: vertical; }
label.lbl { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }

.search-box { position: relative; }
.search-box svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-box .field { padding-left: 2.85rem; }

/* segmented control */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--r-s); background: #fff; }
.seg button {
  font: 600 0.9rem var(--sans); color: var(--ink); background: transparent; border: 0;
  padding: 0.55rem 0.8rem; cursor: pointer; border-right: 1px solid var(--line); white-space: nowrap;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; }

/* capacity badge */
.cap {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none;
  font: 700 0.8rem var(--mono); color: var(--ink); border-radius: 4px; background: var(--cap-c);
}
.cap[data-c='A'] { background: var(--cap-a); }
.cap[data-c='K'] { background: var(--cap-k); }
.cap[data-c='N'] { background: var(--cap-n); }
.lvl { font: 600 0.8rem var(--mono); border: 1.5px solid currentColor; border-radius: 4px; padding: 0.12rem 0.35rem; white-space: nowrap; }

/* ── zebra stripes (hero signature) ────────────────────────────────────── */
.zebra { position: relative; overflow: hidden; background: var(--ink); isolation: isolate; }
.zebra-field {
  position: absolute; inset: -30% -10%;
  transform: rotate(-9deg);
  display: flex; flex-direction: column;
  z-index: -1;
}
.stripe {
  flex: 1 1 0; align-items: center;
  display: flex; white-space: nowrap; overflow: hidden;
  font-family: var(--display); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1;
}
.stripe:nth-child(odd) { background: var(--ink); color: rgba(255, 255, 255, 0.92); }
.stripe:nth-child(even) { background: #fff; color: var(--ink); }
.stripe-track { display: flex; flex: none; gap: 1.5em; padding-inline: 0.75em; animation: stripe-run var(--dur, 160s) linear infinite; }
.stripe:nth-child(even) .stripe-track { animation-direction: reverse; }
.stripe span { padding: 0.18em 0; border-radius: 3px; transition: background-color 0.2s, color 0.2s; }
.stripe span.hit { background: var(--signal); color: var(--ink); padding-inline: 0.2em; }
.stripe b.m { font-weight: inherit; background: var(--signal); color: var(--ink); border-radius: 3px; padding-inline: 0.08em; }
@keyframes stripe-run { to { transform: translateX(-50%); } }
.zebra.searching .stripe span:not(.hit) { opacity: 0.38; }
.zebra.restriped .stripe-track { animation-duration: calc(var(--dur, 160s) / 2.2); }

.home-hero { min-height: min(86vh, 860px); display: grid; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero-card {
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--r-m);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  max-width: 640px;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.0);
}
.hero-card h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); max-width: 13ch; margin-bottom: 0.4em; }
.hero-card .lede { font-size: 1.15rem; margin-bottom: 1.5rem; }
.hero-results { list-style: none; margin: 0.75rem 0 0; padding: 0; max-height: 20rem; overflow: auto; }
.hero-results:empty { display: none; }
.hero-results li a {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--line); text-decoration: none;
}
.hero-results li a:hover, .hero-results li a:focus-visible { background: var(--paper-2); }
.hero-results .r-name { font-weight: 600; line-height: 1.3; }
.hero-results .r-meta { font-size: 0.82rem; color: var(--muted); }
.hero-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; font-size: 0.95rem; }
.hero-status { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; min-height: 1.3em; }

@media (prefers-reduced-motion: reduce) {
  .stripe-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── generic layouts ───────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 860px) { .split, .split--wide-left { grid-template-columns: minmax(0, 1fr); } }

/* doors: three audiences, not three identical cards */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.door { padding: 1.75rem 1.5rem 2rem 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.75rem; }
.door + .door { padding-left: 1.5rem; }
.door:last-child { border-right: 0; }
.door h3 { font-size: var(--step-2); margin: 0; }
.door p { margin: 0; color: var(--muted); }
.door .door-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.75rem; }
@media (max-width: 860px) {
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door, .door + .door { padding: 1.5rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* definition rows (interfaces, facts) */
.defs { display: grid; grid-template-columns: minmax(11rem, 0.35fr) 1fr; border-top: 1px solid var(--line); }
.defs > dt, .defs > dd { margin: 0; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.defs > dt { font-family: var(--display); font-weight: 700; font-size: 1.2rem; padding-right: 1.5rem; }
.defs > dd p:last-child { margin-bottom: 0; }
.band--night .defs, .band--night .defs > dt, .band--night .defs > dd { border-color: var(--line-night); }
@media (max-width: 700px) { .defs { grid-template-columns: minmax(0, 1fr); } .defs > dt { border-bottom: 0; padding-bottom: 0.25rem; } .defs > dd { padding-top: 0.25rem; } }

/* skill anatomy */
.anatomy { border: 3px solid var(--ink); border-radius: var(--r-m); background: #fff; overflow: hidden; }
.anatomy-head { padding: 1.5rem 1.5rem 1.25rem; display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; border-bottom: 2px solid var(--ink); }
.anatomy-head h3 { margin: 0; font-size: var(--step-3); }
.anatomy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.anatomy-grid > div { padding: 1rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.anatomy-grid > div:nth-child(3n) { border-right: 0; }
.anatomy-grid .k { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.2rem; }
.anatomy-grid .v { font-weight: 600; overflow-wrap: anywhere; }
.anatomy-grid .v.mono { font-weight: 500; font-size: 0.9rem; }
.anatomy-grid .wide { grid-column: span 3; border-right: 0; }
@media (max-width: 700px) { .anatomy-grid { grid-template-columns: 1fr 1fr; } .anatomy-grid > div:nth-child(3n) { border-right: 1px solid var(--line); } .anatomy-grid > div:nth-child(2n) { border-right: 0; } .anatomy-grid .wide { grid-column: span 2; } }

/* code + terminal */
.term {
  background: #070e1a; color: #dfe7f5; border-radius: var(--r-m);
  border: 1px solid var(--line-night); overflow: hidden; font-family: var(--mono);
}
.term-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-night); font-size: 0.82rem; color: var(--muted-night); }
.term-bar .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(147, 221, 61, 0.2); }
.term-bar .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term pre { margin: 0; padding: 1rem 1.1rem 1.25rem; overflow: auto; font-size: 0.82rem; line-height: 1.55; max-height: 28rem; white-space: pre; }
.term .k-cmd { color: var(--signal); }
.term .k-key { color: #8ec5ff; }
.term .k-str { color: #ffd88a; }
.term .k-num { color: #ff9fb3; }
.term .k-dim { color: #66748f; }
.caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: -0.2em; background: var(--signal); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

pre.code {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 1rem 1.1rem; overflow: auto; line-height: 1.55; font-size: 0.82rem; margin: 0 0 1.25rem;
}
.band--night pre.code { background: #070e1a; border-color: var(--line-night); color: #dfe7f5; }

/* pills / chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font: 500 0.85rem var(--sans); color: var(--ink); background: #fff; text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; margin-left: 0.25rem; }
.chip[aria-pressed='true'] .n { color: var(--signal); }

/* tables */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th { text-align: left; font-weight: 600; font-size: 0.85rem; color: var(--muted); padding: 0.75rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .mono { font-size: 0.8rem; color: var(--muted); }
table.data a { text-decoration-thickness: 1.5px; }
table.data code { white-space: nowrap; }
.band--night table.data th, .band--night table.data td { border-color: var(--line-night); }
.band--night table.data th, .band--night table.data .mono { color: var(--muted-night); }

/* notices */
.note {
  border-left: 4px solid var(--signal); background: var(--signal-wash); padding: 1rem 1.25rem;
  border-radius: 0 var(--r-s) var(--r-s) 0; margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }
.band--night .note { background: rgba(147, 221, 61, 0.08); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, calc(100% + 2rem));
  background: var(--ink); color: #fff; border: 2px solid var(--signal); border-radius: var(--r-s);
  padding: 0.7rem 1.1rem; font-weight: 600; z-index: 200; transition: transform 0.25s, visibility 0.25s; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ── explorer ──────────────────────────────────────────────────────────── */
.explorer { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.facets { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); display: flex; flex-direction: column; gap: 1.25rem; }
.facet h3 { font-size: 1.05rem; margin: 0 0 0.6rem; display: flex; justify-content: space-between; align-items: baseline; }
.facet h3 button { font: 500 0.82rem var(--sans); color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.facet--domains { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.domain-list { list-style: none; margin: 0.5rem 0 0; padding: 0; overflow: auto; min-height: 8rem; border-top: 1px solid var(--line); }
.domain-list label { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; padding: 0.42rem 0.2rem; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 0.93rem; line-height: 1.25; }
.domain-list label:hover { background: var(--paper-2); }
.domain-list input { accent-color: var(--ink); width: 1rem; height: 1rem; }
.domain-list .n { font: 500 0.75rem var(--mono); color: var(--muted); }
.domain-list .zero { opacity: 0.4; }
.facet .field { padding: 0.55rem 0.75rem; font-size: 0.95rem; border-width: 1.5px; }
.facet select.field { padding-right: 2rem; }
.level-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.phase-chips { margin-top: 0.6rem; }
.facets-toggle, .facets-done { display: none; }

@media (max-width: 960px) {
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .facets { display: none; }
  .facets[data-open='true'] {
    display: flex; position: fixed; z-index: 60; top: 4.25rem; left: 0; right: 0; bottom: 0; max-height: none;
    overflow: auto; background: #fff; border-top: 2px solid var(--ink); padding: 1.25rem var(--gutter) 1.5rem;
  }
  .facets-done { display: inline-flex !important; position: sticky; bottom: 0; margin-top: auto; }
  .domain-list { max-height: 18rem; }
  .facets-toggle { display: inline-flex; }
}

.results-bar { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; justify-content: space-between; margin: 1.25rem 0 0.75rem; }
.results-count { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0; }
.results-count small { font-family: var(--sans); font-weight: 400; font-size: 0.95rem; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.active-filters .chip { background: var(--paper-2); border-color: transparent; }
.active-filters .chip::after { content: '×'; margin-left: 0.4rem; color: var(--muted); }

.skill-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.skill-row { border-bottom: 1px solid var(--line); }
.skill-row > button {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center;
  padding: 0.85rem 0.35rem;
}
.skill-row > button:hover { background: var(--paper-2); }
.skill-row > button:focus-visible { outline: 3px solid var(--signal); outline-offset: -3px; }
.skill-row .s-name { display: block; font-weight: 600; line-height: 1.3; }
.skill-row .s-meta { display: block; font-size: 0.84rem; color: var(--muted); margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-row .s-right { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.skill-row[data-open='true'] > button { background: var(--paper-2); }
.skill-row mark { background: var(--signal-wash); color: inherit; box-shadow: inset 0 -2px 0 var(--signal); }
.skill-detail { padding: 0.5rem 0.35rem 1.5rem; background: var(--paper-2); }
.skill-detail .anatomy-grid { border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); }
.skill-detail .btn-row { margin-top: 1rem; }
.skill-detail .term { margin-top: 1rem; }

.more-row { text-align: center; padding: 1.5rem 0; }
.empty { padding: 3rem 0; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); }
.loading-bar { height: 3px; background: linear-gradient(90deg, var(--signal) 0 30%, transparent 30%); background-size: 200% 100%; animation: load 1s linear infinite; }
@keyframes load { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── template cards ────────────────────────────────────────────────────── */
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0; border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
.tpl {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.tpl > button { all: unset; box-sizing: border-box; cursor: pointer; padding: 1.25rem 1.25rem 1.4rem; height: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.tpl > button:hover { background: var(--paper-2); }
.tpl > button:focus-visible { outline: 3px solid var(--signal); outline-offset: -3px; }
.tpl .t-type { font: 600 0.8rem var(--mono); display: inline-flex; gap: 0.4rem; align-items: center; color: var(--muted); }
.tpl .t-type i { width: 0.65rem; height: 0.65rem; border-radius: 2px; display: inline-block; background: var(--ink); }
.tpl[data-type='community'] .t-type i { background: var(--cap-n); }
.tpl[data-type='resource'] .t-type i { background: var(--cap-k); }
.tpl[data-type='project'] .t-type i { background: var(--signal); }
.tpl[data-type='verification'] .t-type i { background: #7b9dff; }
.tpl[data-type='nextstep'] .t-type i { background: var(--cap-a); }
.tpl h3 { font-size: 1.3rem; margin: 0; line-height: 1.15; }
.tpl p { margin: 0; color: var(--muted); font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(11, 20, 36, 0.55); z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%); z-index: 100;
  background: #fff; border-left: 3px solid var(--ink); overflow: auto;
  transform: translateX(105%); transition: transform 0.28s cubic-bezier(.2, .7, .2, 1);
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-head { position: sticky; top: 0; background: #fff; z-index: 2; padding: 1.25rem 1.5rem 1rem; border-bottom: 2px solid var(--ink); display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.drawer-head h2 { font-size: var(--step-3); margin: 0.2rem 0 0; }
.drawer-body { padding: 1.5rem; }
.drawer-body h4 { margin: 1.75rem 0 0.5rem; font-size: 1.15rem; }
.drawer-body ul, .drawer-body ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.drawer-body li { margin-bottom: 0.35rem; }
.close-x { font: 600 0.95rem var(--sans); background: none; border: 2px solid var(--ink); border-radius: var(--r-s); padding: 0.4rem 0.7rem; cursor: pointer; flex: none; }
.milestone { border-left: 3px solid var(--ink); padding: 0.1rem 0 0.1rem 1rem; margin: 0 0 1.25rem; }
.milestone h5 { font: 700 1rem var(--sans); margin: 0 0 0.25rem; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop, .toast { transition: none; } }

/* ── SKILL.md page ─────────────────────────────────────────────────────── */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.compare figure { margin: 0; }
.compare figcaption { font-weight: 600; margin-bottom: 0.5rem; display: flex; gap: 0.5rem; align-items: center; }
@media (max-width: 860px) { .compare { grid-template-columns: minmax(0, 1fr); } }
.issues { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.issues li { padding: 0.55rem 0 0.55rem 1.75rem; border-bottom: 1px solid var(--line); position: relative; font-size: 0.95rem; }
.issues li::before { content: ''; position: absolute; left: 0.25rem; top: 0.95rem; width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--cap-n); }
.issues li.ok::before { background: var(--signal); }
.issues li.warn::before { background: var(--cap-k); }
.suggest-list { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 22rem; overflow: auto; border-top: 1px solid var(--line); }
.suggest-list label { display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.suggest-list input { accent-color: var(--ink); width: 1rem; height: 1rem; }
.suggest-list small { display: block; color: var(--muted); font-size: 0.8rem; }

.gallery { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.gallery li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.gallery h4 { margin: 0 0 0.3rem; font-size: 1.15rem; font-family: var(--mono); letter-spacing: 0; font-weight: 600; }
.gallery p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.gallery .tag { font: 600 0.78rem var(--sans); border-radius: 999px; padding: 0.2rem 0.6rem; background: var(--paper-2); white-space: nowrap; }

/* ── agents page ───────────────────────────────────────────────────────── */
.endpoint-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-night); }
.endpoint-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 1rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line-night); }
.endpoint-list code { background: none !important; padding: 0 !important; color: #fff; font-size: 0.9rem; }
.endpoint-list p { margin: 0; color: var(--muted-night); font-size: 0.9rem; grid-column: 1; }
.endpoint-list .btn { grid-row: span 2; }
.endpoint-list .btn[aria-pressed='true'] { --bg: var(--signal); --fg: var(--ink); --bd: var(--signal); }
.status-pill { display: inline-flex; align-items: center; gap: 0.5rem; font: 600 0.88rem var(--sans); border-radius: 999px; padding: 0.35rem 0.8rem; border: 1.5px solid var(--line-night); }
.status-pill i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--cap-a); }
.status-pill[data-on='true'] i { background: var(--signal); box-shadow: 0 0 0 3px rgba(147, 221, 61, 0.25); }

/* ── about ─────────────────────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); }
.facts > div { padding: 1.25rem 1.25rem 1.25rem 0; }
.facts > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.facts b { display: block; font-family: var(--display); font-size: var(--step-3); line-height: 1; margin-bottom: 0.35rem; }
.facts span { color: var(--muted); font-size: 0.93rem; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } .facts > div:nth-child(3) { padding-left: 0; border-left: 0; } .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.phase-bar { display: grid; grid-template-columns: 1fr 4fr 6fr 10fr; border: 2px solid var(--ink); border-radius: var(--r-s); overflow: hidden; margin: 1.5rem 0 2rem; }
.phase-bar > div { padding: 0.75rem 0.8rem; border-right: 1px solid var(--ink); min-width: 0; }
.phase-bar > div:last-child { border-right: 0; }
.phase-bar b { display: block; font-size: 0.95rem; }
.phase-bar span { font: 500 0.78rem var(--mono); color: var(--muted); }
.phase-bar > div:nth-child(1) { background: var(--paper-2); }
.phase-bar > div:nth-child(2) { background: #fff; }
.phase-bar > div:nth-child(3) { background: var(--paper-2); }
.phase-bar > div:nth-child(4) { background: var(--ink); color: #fff; }
.phase-bar > div:nth-child(4) span { color: var(--muted-night); }
@media (max-width: 700px) { .phase-bar { grid-template-columns: 1fr 1fr; } .phase-bar > div:nth-child(2) { border-right: 0; } .phase-bar > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); } }

.cap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.cap-grid > div { padding: 1.25rem 1.25rem 1.25rem 0; }
.cap-grid > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.cap-grid .cap { width: 2.4rem; height: 2.4rem; font-size: 1.1rem; margin-bottom: 0.75rem; }
.cap-grid h4 { margin: 0 0 0.35rem; }
.cap-grid p { margin: 0; font-size: 0.93rem; color: var(--muted); }
@media (max-width: 760px) { .cap-grid { grid-template-columns: 1fr 1fr; } .cap-grid > div:nth-child(3) { padding-left: 0; border-left: 0; } }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.steps li { counter-increment: step; padding: 1.25rem 1.25rem 1.5rem 0; }
.steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step, upper-alpha); display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: #fff; font: 700 1rem var(--display); margin-bottom: 0.9rem; }
.steps h4 { margin: 0 0 0.4rem; }
.steps p { margin: 0; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

.link-cols { columns: 2 18rem; column-gap: 3rem; list-style: none; padding: 0; margin: 0; }
.link-cols li { break-inside: avoid; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-foot { background: var(--night); color: #cfd8e8; padding: 3.5rem 0 2.25rem; border-top: 6px solid var(--signal); }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.foot-grid h4 { font-size: 1rem; color: #fff; margin: 0 0 0.8rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; font-size: 0.95rem; }
.foot-brand img { height: 30px; width: auto; margin-bottom: 1rem; }
.foot-brand p { color: var(--muted-night); font-size: 0.95rem; max-width: 32ch; }
.foot-base { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line-night); display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; font-size: 0.88rem; color: var(--muted-night); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: span 2; } }

@media print {
  .site-head, .site-foot, .zebra-field, .btn, .facets { display: none !important; }
  body { font-size: 11pt; }
}
