/* AXIS Full — site styles, v4. Engineering-dossier identity: flat surfaces,
   hairline rules, IBM Plex family, square geometry, single flat accent. */
:root {
  --bg: #0e0f12;
  --bg-2: #12141a;
  --ink: #0b0c0f;
  --line: rgba(233, 231, 226, 0.10);
  --line-2: rgba(233, 231, 226, 0.22);
  --text: #e9e7e2;
  --mut: #a4a19a;
  --faint: #6f6c66;
  --red: #e5486a;
  --red-2: #c2255c;
  --green: #43b581;
  --amber: #d9a13b;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --disp: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --max: 1200px;
  --r: 3px;
  color-scheme: dark;
}

/* ---- light theme ---- */
[data-theme="light"] {
  --bg: #f2f0ea;
  --bg-2: #e9e6de;
  --line: rgba(23, 24, 29, 0.12);
  --line-2: rgba(23, 24, 29, 0.26);
  --text: #1a1b21;
  --mut: #504e48;
  --faint: #8a867c;
  --red: #c2255c;
  --red-2: #a41c4e;
  --green: #1d7a4f;
  --amber: #96660f;
  color-scheme: light;
}
/* the product UI is dark — keep its frames dark in both themes */
.mock, .term, .mini-term {
  --bg-2: #12141a; --ink: #0b0c0f;
  --line: rgba(233, 231, 226, 0.10); --line-2: rgba(233, 231, 226, 0.22);
  --text: #e9e7e2; --mut: #a4a19a; --faint: #6f6c66;
  --red: #e5486a; --red-2: #c2255c; --green: #43b581; --amber: #d9a13b;
}
[data-theme="light"] .mock { box-shadow: 16px 16px 0 rgba(23, 24, 29, 0.12); }
[data-theme="light"] .formcard { box-shadow: 14px 14px 0 rgba(23, 24, 29, 0.10); }
[data-theme="light"] .sec-head[data-ghost]::after,
[data-theme="light"] .chapter-head[data-ghost]::after { color: rgba(23, 24, 29, 0.06); }
@supports (-webkit-text-stroke: 1px #000) {
  [data-theme="light"] .sec-head[data-ghost]::after,
  [data-theme="light"] .chapter-head[data-ghost]::after {
    color: transparent; -webkit-text-stroke: 1px rgba(23, 24, 29, 0.16);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: rgba(229, 72, 106, 0.35); }

.skip {
  position: absolute; left: 12px; top: 0; transform: translateY(-120%);
  background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 20;
  text-decoration: none; font-size: 14px;
}
.skip:focus { transform: translateY(12px); }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

/* ================= header ================= */
.site-header {
  position: sticky; top: 0; z-index: 15;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand img { width: 22px; height: 22px; }
.brand-name { font-family: var(--disp); font-weight: 700; letter-spacing: 0.18em; font-size: 16px; text-transform: uppercase; }
.brand-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--red); border: 1px solid rgba(229, 72, 106, 0.5);
  padding: 2px 7px; border-radius: var(--r); text-transform: uppercase;
}
.doc-ref { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.04em; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 7px 11px; cursor: pointer; color: var(--text);
}
.nav-panel { display: flex; align-items: center; gap: 24px; }
.nav-panel a { text-decoration: none; font-size: 14px; color: var(--mut); transition: color .15s; }
.nav-panel a:hover { color: var(--text); }
.nav-panel a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-mail {
  border: 1px solid rgba(229, 72, 106, 0.55) !important;
  color: var(--red) !important;
  padding: 6px 13px; border-radius: var(--r);
  font-family: var(--mono); font-size: 11px !important; letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.nav-mail:hover { background: var(--red-2); border-color: var(--red-2) !important; color: #fff !important; }
.theme-toggle, .nav-lang {
  background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mut); padding: 6px 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; flex: none;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover, .nav-lang:hover { color: var(--text); border-color: var(--faint); }
.theme-toggle svg { width: 14px; height: 14px; display: block; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: none; }
/* theme toggle — floating chip, out of the header flow */
.theme-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: var(--bg-2); padding: 9px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle { box-shadow: 5px 5px 0 rgba(23, 24, 29, 0.14); }
.nav-panel a.nav-lang {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ================= type ================= */
h1, h2 { font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: -0.005em; margin: 0; }
h1 { font-size: clamp(46px, 7vw, 92px); line-height: 0.98; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.02; }
h3, h4 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0 0 14px; }
.eyebrow, .sec-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red); margin: 0 0 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before, .sec-num::before {
  content: ""; width: 8px; height: 8px; background: var(--red); flex: none;
}
.lede { font-size: 18px; line-height: 1.62; color: var(--mut); max-width: 46em; }
.muted { color: var(--mut); }
.mono { font-family: var(--mono); }
.acc { color: var(--red); }

/* ================= buttons ================= */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; text-decoration: none;
  font-family: var(--disp); font-size: 15px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  border-radius: var(--r);
  transition: background .15s, border-color .15s, color .15s;
}
.btn { background: var(--red-2); color: #fff; }
.btn:hover { background: var(--red); color: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: rgba(229, 72, 106, 0.6); color: var(--red); }

/* ================= hero ================= */
.hero { padding: 40px 0 0; }
.hero-rule {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.hero h1 { margin: 58px 0 26px; max-width: 11em; }
.hero h1 .accent { color: var(--red); }
.hero .lede { max-width: 54ch; }
.hero .actions { margin: 34px 0 60px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.hero-facts span {
  background: var(--bg); padding: 16px 18px 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}
.hero-facts b {
  display: block; font-family: var(--disp); font-weight: 700;
  font-size: 30px; line-height: 1; color: var(--text); margin-bottom: 7px;
}
.hero-fig { margin: 64px auto 92px; }
.hero-fig .mock { transform: translateX(-8px) rotate(-0.8deg); }

/* ================= figure / panel mockup ================= */
.mock {
  width: min(1060px, 100%);
  margin: 0 auto;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.42);
  overflow: hidden;
}
.fig-cap {
  width: min(1060px, 100%); margin: 12px auto 0;
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
  text-align: left;
}
.mock-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.mdot { width: 9px; height: 9px; background: #2c2f38; border-radius: 1px; }
.mock-url {
  flex: 1; max-width: 380px; margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r); font-family: var(--mono); font-size: 11px; color: var(--mut);
  padding: 4px 12px; text-align: center;
}
.mock-live {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--green);
  display: flex; align-items: center; gap: 6px;
}
.mock-live i { width: 6px; height: 6px; background: var(--green); }

.ptop {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  overflow-x: auto; scrollbar-width: none;
}
.ptop::-webkit-scrollbar { display: none; }
.ptab { flex: none; }
.ptop .plogo { display: flex; align-items: center; gap: 6px; margin-right: 12px; font-family: var(--disp); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.ptop .plogo img { width: 15px; height: 15px; }
.ptab { padding: 5px 11px; color: var(--faint); font-weight: 500; border-bottom: 2px solid transparent; }
.ptab.on { color: var(--text); border-bottom-color: var(--red); }
.ptop .pright { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.psearch {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: var(--r); padding: 4px 10px;
}
.pavatar {
  width: 22px; height: 22px; border-radius: var(--r);
  background: var(--red-2);
  color: #fff; font-size: 9px; font-weight: 600; font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
}

.pbody { display: grid; grid-template-columns: 1fr 300px; gap: 1px; background: var(--line); }
.pmain, .pside { background: var(--bg-2); padding: 14px; min-width: 0; }
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 12px; }
.pcard { background: var(--bg-2); padding: 10px 12px; }
.pcard .l { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--faint); display: block; }
.pcard b { font-family: var(--disp); font-size: 24px; font-weight: 700; display: block; margin-top: 3px; }
.pcard .d { font-family: var(--mono); font-size: 9.5px; }
.pcard .up { color: var(--green); } .pcard .warn { color: var(--amber); }

.ptable { border: 1px solid var(--line); overflow: hidden; }
.ptable-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--faint);
}
.ptable-head .cnt { color: var(--mut); }
.prow {
  display: grid;
  grid-template-columns: 14px 1.5fr 1.1fr 0.8fr 44px 1fr 74px;
  gap: 8px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.prow:last-child { border-bottom: 0; }
.prow.pend { background: rgba(217, 161, 59, 0.05); }
.sdot { width: 7px; height: 7px; border-radius: 1px; }
.sdot.on { background: var(--green); }
.sdot.idle { background: var(--amber); }
.sdot.off { background: #3d4048; }
.pid b { display: block; font-weight: 600; font-size: 11.5px; }
.pid span { font-family: var(--mono); font-size: 9.5px; color: var(--faint); display: block; }
.pav-badges { display: flex; gap: 3px; margin-top: 2px; }
.avb {
  font-family: var(--mono); font-size: 8px; font-weight: 500;
  padding: 1px 4px; border-radius: 1px; line-height: 1.4;
  border: 1px solid var(--line-2); color: var(--mut);
}
.pcell { font-family: var(--mono); font-size: 10.5px; color: var(--mut); }
.pflag {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  border: 1px solid var(--line-2); border-radius: 1px; padding: 2px 5px;
  color: var(--mut); text-align: center;
}
.puser { font-size: 10.5px; color: var(--mut); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptime { font-family: var(--mono); font-size: 10px; color: var(--faint); text-align: right; }
.ptime b { color: var(--mut); font-weight: 500; }
.pactions { display: flex; gap: 5px; }
.pmini {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  border-radius: 1px; padding: 3px 7px; border: 1px solid;
}
.pmini.ok { border-color: rgba(67, 181, 129, 0.5); color: var(--green); }
.pmini.no { border-color: rgba(229, 72, 106, 0.5); color: var(--red); }

.pside { display: flex; flex-direction: column; gap: 10px; }
.pwidget { border: 1px solid var(--line); padding: 10px 12px; }
.pw-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 8px; display: flex; justify-content: space-between; }
.pw-title span:last-child { color: var(--mut); }
.pmap img { width: 100%; height: auto; }
.pgeo { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-family: var(--mono); font-size: 9.5px; color: var(--mut); }
.pgeo b { color: var(--text); font-weight: 600; }
.pbar { margin-bottom: 7px; }
.pbar .r { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; color: var(--mut); margin-bottom: 3px; }
.pbar .t { height: 3px; background: rgba(233, 231, 226, 0.08); }
.pbar .t i { display: block; height: 100%; background: var(--red-2); }
.pfeed div { font-family: var(--mono); font-size: 9.8px; color: var(--mut); padding: 3px 0; border-bottom: 1px solid var(--line); }
.pfeed div:last-child { border: 0; }
.pfeed .t { color: var(--faint); }
.pfeed .r { color: var(--red); }

/* ================= sections ================= */
.section { padding: 100px 0 0; }
.section.first { padding-top: 96px; }
.sec-head { max-width: 780px; margin-bottom: 44px; border-top: 1px solid var(--line-2); padding-top: 26px; }
.sec-head p { color: var(--mut); font-size: 17px; margin-top: 12px; }
.sec-head p a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.sec-head p a:hover { color: var(--red); text-decoration-color: var(--red); }

/* datasheet grid (was bento) */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.bento.cols3 { grid-template-columns: repeat(3, 1fr); }
.cell {
  background: var(--bg);
  padding: 24px 24px 20px;
  grid-column: span 2;
  text-decoration: none;
  transition: background .15s;
  display: flex; flex-direction: column;
  min-width: 0;
}
.cell:hover { background: var(--bg-2); }
.cell:hover h3 { color: var(--red); }
.cell.wide { grid-column: span 3; }
.cell.half { grid-column: span 3; }
.cell .idx { font-family: var(--mono); font-size: 10px; color: var(--red); letter-spacing: 0.1em; margin-bottom: 12px; text-transform: uppercase; }
.cell h3 { margin-bottom: 8px; transition: color .15s; }
.cell p { color: var(--mut); font-size: 14.5px; margin-bottom: 12px; }
.cell .more { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); margin-top: auto; padding-top: 12px; }
.cell:hover .more { color: var(--red); }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  font-family: var(--mono); font-size: 10px; color: var(--mut);
  border: 1px solid var(--line); border-radius: 1px; padding: 3px 7px;
}
.chip.on { color: var(--green); border-color: rgba(67, 181, 129, 0.4); }
.mini-term {
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; font-family: var(--mono); font-size: 10.8px; line-height: 1.9;
  color: var(--mut); margin-top: 4px; overflow: hidden; white-space: pre-wrap;
}
.mini-term .p { color: var(--red); } .mini-term .g { color: var(--green); } .mini-term .c { color: var(--faint); }
.mini-term .b { color: var(--text); }
.tok-row { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 10.5px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--mut); }
.tok-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-row:last-child { border: 0; }
.tok-row .ok { color: var(--green); } .tok-row .used { color: var(--faint); text-decoration: line-through; }
.mod-row { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.8px; padding: 5px 0; color: var(--mut); border-bottom: 1px solid var(--line); }
.mod-row:last-child { border: 0; }
.mod-row i { width: 6px; height: 6px; border-radius: 1px; background: #3d4048; }
.mod-row i.on { background: var(--green); }
.mod-row span:last-child { margin-left: auto; font-size: 9.5px; color: var(--faint); }

/* index rows */
.rows { border-top: 1px solid var(--line-2); }
.row {
  display: grid; grid-template-columns: 56px minmax(190px, 280px) 1fr auto;
  gap: 18px; align-items: baseline;
  padding: 17px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; transition: background .15s;
}
a.row:hover { background: rgba(233, 231, 226, 0.02); }
a.row:hover h3 { color: var(--red); }
.row .n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.row h3 { font-size: 17px; transition: color .15s; }
.row p { margin: 0; font-size: 14.5px; color: var(--mut); }
.row .go { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* tables — booktabs */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
table.spec { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 13.5px; }
table.spec th {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--faint); font-weight: 500;
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-2);
}
table.spec td { padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--mut); }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
table.spec td .mono { font-size: 11px; }
table.spec a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
table.spec a:hover { color: var(--red); text-decoration-color: var(--red); }

/* compare table */
.cmp td, .cmp th { text-align: center !important; }
.cmp td:first-child, .cmp th:first-child { text-align: left !important; }
.cmp .axis-col { background: rgba(229, 72, 106, 0.08); color: var(--text) !important; font-weight: 600; }
.cmp th.axis-col { color: var(--red) !important; }
.cmp .y { color: var(--green); }
.cmp .p { color: var(--amber); }
.cmp .n { color: var(--faint); }
.cmp-note { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 12px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.steps b { font-family: var(--mono); font-size: 12px; color: var(--red); font-weight: 500; }
.steps strong { display: block; font-size: 16.5px; margin-bottom: 4px; font-weight: 600; }
.steps span { color: var(--mut); font-size: 15px; }

/* cols / panels */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.cols p { color: var(--mut); }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.panel { background: var(--bg); padding: 26px 28px 16px; }
.panel .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: 12px; font-weight: 500; }
.panel h3 { margin-bottom: 10px; font-size: 21px; }
.panel p, .panel li { color: var(--mut); font-size: 15px; }
.panel ul { margin: 6px 0 16px; padding-left: 18px; }

/* blog post body */
.post-body { max-width: 46em; }
.post-body h3 {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: 24px; margin: 48px 0 14px;
}
.post-body p { color: var(--mut); font-size: 16.5px; margin: 0 0 18px; }
.post-body p b { color: var(--text); }
.post-body em { color: var(--text); }

/* post attachments — code figures, stack diagrams, flows */
.post-body .fig-cap { margin: 10px 0 30px; }
.codeblock { border: 1px solid var(--line-2); background: var(--bg-2); margin: 26px 0 8px; }
.cb-h { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.cb-h b { color: var(--red); font-weight: 500; }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: var(--mut); }
.codeblock .tk-k { color: var(--red); }
.codeblock .tk-s { color: var(--text); }
.codeblock .tk-c { color: var(--faint); }
.stackfig { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line-2); margin: 26px 0 8px; }
.sl { background: var(--bg); padding: 12px 16px; display: grid; grid-template-columns: 40px minmax(150px, 220px) 1fr; gap: 14px; align-items: baseline; }
.sl .si { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--faint); }
.sl b { font-size: 13.5px; letter-spacing: 0.02em; }
.sl span { color: var(--mut); font-size: 12.5px; }
.sl.core { box-shadow: inset 3px 0 0 var(--red); }
.sl.core b { color: var(--red); }
.flowfig { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 8px; }
.flowfig .fl { border: 1px solid var(--line-2); background: var(--bg-2); padding: 9px 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.flowfig .fa { color: var(--red); font-family: var(--mono); font-size: 12px; }
.rtags { display: block; margin-top: 9px; }
.rtags span { display: inline-block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 1px; padding: 2px 7px; margin: 0 6px 4px 0; }
.panel li { margin-bottom: 7px; }
.panel .sum { font-family: var(--disp); font-size: 40px; font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 10px; text-transform: uppercase; }
.panel .sum small { font-size: 15px; color: var(--faint); font-weight: 500; }

/* flow list */
.flow { font-family: var(--mono); font-size: 12.3px; line-height: 2.1; color: var(--mut); margin: 0; }
.flow b { color: var(--text); font-weight: 600; }
.flow .r { color: var(--red); }

/* faq */
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 4px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16.5px; list-style: none; }
.faq summary::before { content: "+"; font-family: var(--mono); color: var(--red); margin-right: 12px; font-weight: 400; }
.faq details[open] summary::before { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--mut); max-width: 72ch; font-size: 15px; }
.faq a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.faq a:hover { color: var(--red); text-decoration-color: var(--red); }

.note { border-left: 2px solid var(--red); padding: 4px 0 4px 16px; color: var(--mut); font-size: 14.5px; max-width: 74ch; margin-top: 32px; }

/* term block */
.term {
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 22px; font-family: var(--mono); font-size: 12.4px; line-height: 1.8;
  color: var(--mut); overflow-x: auto; margin: 0;
}
.term .c { color: var(--faint); } .term .r { color: var(--red); } .term .b { color: var(--text); font-weight: 600; } .term .g { color: var(--green); }
.term-caption { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 10px; }

/* band — solid accent block */
.band {
  margin-top: 100px;
  background: var(--red-2);
  padding: 64px 0;
  color: #fff;
}
.band-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.band .sec-num { color: rgba(255, 255, 255, 0.85); }
.band .sec-num::before { background: #fff; }
.band h2 { color: #fff; margin-bottom: 12px; }
.band p { color: rgba(255, 255, 255, 0.88); max-width: 46em; }
.band .price { font-family: var(--disp); font-size: 44px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; text-transform: uppercase; }
.band .price small { font-size: 15px; color: rgba(255, 255, 255, 0.75); font-weight: 500; font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.band .actions { margin-top: 16px; }
.band .btn { background: var(--ink); color: #fff; }
.band .btn:hover { background: #000; }
.band .btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.band .btn-ghost:hover { border-color: #fff; color: #fff; }

/* footer */
.site-footer { border-top: 1px solid var(--line-2); padding: 48px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-weight: 700; letter-spacing: 0.16em; font-size: 16px; margin-bottom: 12px; text-transform: uppercase; }
.footer-brand img { width: 20px; height: 20px; }
.footer-blurb { color: var(--faint); font-size: 13px; max-width: 30em; margin: 0; }
.footer-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 0 0 12px; }
.footer-col a { display: block; text-decoration: none; color: var(--mut); font-size: 14px; padding: 3px 0; }
.footer-col a:hover { color: var(--red); }
.footer-meta {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.03em;
}

/* ================= sub pages ================= */
.page-head { padding: 52px 0 44px; border-bottom: 1px solid var(--line); }
.page-head .lede { max-width: 50em; }
.page-head .meta {
  margin-top: 26px; padding: 12px 0 0; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  display: flex; gap: 8px 28px; flex-wrap: wrap;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.page-head .meta b { color: var(--mut); font-weight: 500; }

/* capabilities reference */
.ref { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 48px 0 72px; align-items: start; }
.ref > * { min-width: 0; }
.ref-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; }
.ref-nav a {
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  text-decoration: none; padding: 7px 0 7px 14px;
  border-left: 1px solid var(--line-2); transition: color .15s, border-color .15s;
}
.ref-nav a:hover { color: var(--text); }
.ref-nav a.is-active { color: var(--red); border-left: 2px solid var(--red); padding-left: 13px; }

.chapter { padding-bottom: 8px; scroll-margin-top: 84px; }
.chapter + .chapter { margin-top: 56px; }
.chapter-head { border-top: 2px solid var(--line-2); padding-top: 22px; margin-bottom: 14px; }
.chapter-head .sec-num { margin-bottom: 10px; }
.chapter-head h2 { margin-bottom: 10px; font-size: 30px; }
.chapter-head p { color: var(--mut); max-width: 72ch; font-size: 15.5px; }

.entry { padding: 20px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.entry-head h3 { font-size: 18.5px; }
.entry-head .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 1px; padding: 2px 7px; }
.entry p { color: var(--mut); font-size: 15px; max-width: 78ch; }
.entry p:last-child { margin-bottom: 0; }
.entry strong { color: var(--text); }
.entry a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.entry a:hover { color: var(--red); text-decoration-color: var(--red); }
.ships {
  margin-top: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: 11.6px; line-height: 1.95; color: var(--mut);
}
.ships b { color: var(--red); font-weight: 500; font-size: 10px; letter-spacing: 0.12em; }

/* tabs (console page) */
.tabs { display: inline-flex; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 22px; overflow: hidden; }
.tabs button {
  background: none; border: 0; border-right: 1px solid var(--line);
  color: var(--mut); font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 18px; cursor: pointer; transition: background .15s, color .15s;
}
.tabs button:last-child { border-right: 0; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--red-2); color: #fff; }
.tabpane { display: none; }
.tabpane.on { display: block; }
.tabpane .fig-cap { margin-bottom: 8px; }
.tabpane .mock { width: calc(100% - 16px); margin: 0; }

/* workspace mock */
.wk { display: grid; grid-template-columns: 200px 1fr 230px; gap: 1px; background: var(--line); }
.wk > div { background: var(--bg-2); padding: 12px; min-width: 0; }
.wk-id { font-size: 11px; }
.wk-id b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.wk-id .mono { font-size: 9.5px; color: var(--faint); display: block; margin-bottom: 1px; }
.wk-nav { margin-top: 12px; }
.wk-nav .g { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; color: var(--faint); margin: 10px 0 4px; text-transform: uppercase; }
.wk-nav a { display: block; font-size: 10.5px; color: var(--mut); text-decoration: none; padding: 3.5px 7px; border-radius: 1px; }
.wk-nav a.on { color: var(--red); box-shadow: inset 2px 0 0 var(--red); }
.wk-term { font-family: var(--mono); font-size: 10.6px; line-height: 1.85; color: var(--mut); white-space: pre-wrap; }
.wk-term .pr { color: var(--green); }
.wk-term .cc { color: var(--faint); }
.wk-side .pwidget { margin-bottom: 10px; }

/* ================= v4.1 — signature details ================= */
/* print grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
}

/* ghost folios */
.sec-head, .chapter-head { position: relative; }
.sec-head > *, .chapter-head > * { position: relative; z-index: 1; }
.sec-head[data-ghost]::after, .chapter-head[data-ghost]::after {
  content: attr(data-ghost);
  position: absolute; right: -6px; top: 4px; z-index: 0;
  font-family: var(--disp); font-weight: 700; font-size: 116px; line-height: 1;
  color: rgba(233, 231, 226, 0.05);
  pointer-events: none; user-select: none;
}
@supports (-webkit-text-stroke: 1px #000) {
  .sec-head[data-ghost]::after, .chapter-head[data-ghost]::after {
    color: transparent; -webkit-text-stroke: 1px rgba(233, 231, 226, 0.15);
  }
}

/* manifesto interlude */
.interlude {
  margin-top: 100px;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  padding: 76px 0;
}
.interlude .sec-num { margin-bottom: 20px; }
.interlude-text {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 6.4vw, 84px); line-height: 1.0; letter-spacing: -0.005em;
  margin: 0; max-width: 15em;
}
.interlude-text em {
  font-family: var(--sans); font-style: italic; font-weight: 500;
  text-transform: none; color: var(--red); letter-spacing: 0;
}
.interlude-sub { margin: 20px 0 0; color: var(--mut); font-size: 17px; max-width: 46em; }

/* italic emphasis in ledes */
.lede em { font-style: italic; color: var(--text); }

/* form insert — a framed record inside the dossier */
.formcard {
  width: calc(100% - 14px);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.42);
  padding: 22px 28px 14px;
  overflow-x: auto;
}
.formcard-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px solid var(--line-2);
  padding-bottom: 11px; margin-bottom: 2px;
}
.formcard table.spec { min-width: 800px; }
.formcard .cmp-note { margin: 12px 0 4px; }

/* ================= v4.2 — hand-set details & motion ================= */
::selection { background: var(--red); color: #fff; }

html { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--bg); border-radius: 6px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* theme cross-fade — class added by JS for 420 ms around the toggle */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, fill .35s ease, stroke .35s ease !important;
}

/* reveal entrances — JS adds .js on <html>, .in on intersection */
.js .reveal { opacity: 0; translate: 0 18px; }
.js .reveal.in {
  opacity: 1; translate: 0 0;
  transition: opacity .65s cubic-bezier(.16,1,.3,1), translate .65s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--rd, 0ms);
}

/* hover lift — linked cells */
a.cell { position: relative; transition: background .15s, transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s; }
a.cell:hover { transform: translate(-3px,-3px); box-shadow: 6px 6px 0 rgba(0,0,0,.32); z-index: 2; }
[data-theme="light"] a.cell:hover { box-shadow: 6px 6px 0 rgba(23,24,29,.10); }

/* button press */
.btn, .btn-ghost { transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn:hover, .btn-ghost:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(0,0,0,.30); }
.btn:active, .btn-ghost:active { transform: translate(1px,1px); box-shadow: none; }
[data-theme="light"] .btn:hover, [data-theme="light"] .btn-ghost:hover { box-shadow: 4px 4px 0 rgba(23,24,29,.12); }

/* row affordances */
.row .go { transition: color .18s; }
a.row:hover .go { color: var(--red); }
a.row .go::after { content: " →"; opacity: 0; transition: opacity .18s; }
a.row:hover .go::after { opacity: 1; }

/* nav underline */
.nav-panel a:not(.nav-mail):not(.nav-lang):hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--red); }

/* live diode */
.mock-live i { animation: liveblink 2.4s ease-in-out infinite; }
@keyframes liveblink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* console pane switch */
.tabpane.on { animation: panein .4s cubic-bezier(.16,1,.3,1); }
@keyframes panein { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* registration marks — injected by JS */
.cropmark { position: absolute; width: 14px; height: 14px; z-index: 5; pointer-events: none; }
.cropmark.tl { top: 74px; left: 14px; border-top: 1px solid var(--faint); border-left: 1px solid var(--faint); }
.cropmark.tr { top: 74px; right: 14px; border-top: 1px solid var(--faint); border-right: 1px solid var(--faint); }
.cropmark.bl { bottom: 14px; left: 14px; border-bottom: 1px solid var(--faint); border-left: 1px solid var(--faint); }
.cropmark.br { bottom: 14px; right: 14px; border-bottom: 1px solid var(--faint); border-right: 1px solid var(--faint); }

/* rubber stamp + margin label */
.hero { position: relative; }
.stamp {
  position: absolute; right: 24px; top: 108px; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); border: 2px solid var(--red); border-radius: 2px;
  padding: 7px 12px 6px; transform: rotate(-7deg); opacity: 0.75;
}
.vlabel {
  position: absolute; right: 6px; top: 44%; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
}

/* tilted sheet — printed document, not a screen */
.mock.tilt { transform: rotate(0.55deg); }

/* right-aligned section head variant — breaks the rhythm */
.sec-head.alt { margin-left: auto; text-align: right; }
.sec-head.alt p { margin-left: auto; }
.sec-head.alt[data-ghost]::after { right: auto; left: -6px; }

/* redacted — licensed material */
.rx {
  background: var(--ink); color: var(--ink); padding: 0 5px; border-radius: 1px;
  cursor: help; user-select: none; transition: color .15s;
}
.rx:hover { color: rgba(255,255,255,0.85); user-select: text; }

/* pull line — posts */
.post-body .pull {
  margin: 40px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--red);
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(24px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -0.01em; color: var(--text);
}

@media (max-width: 1020px) {
  .stamp, .vlabel { display: none; }
}

/* responsive */
@media (max-width: 1020px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento.cols3 { grid-template-columns: 1fr 1fr; }
  .cell, .cell.wide, .cell.half { grid-column: span 1; }
  .pbody { grid-template-columns: 1fr; }
  .pside { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cols, .panels, .band-grid, .ref { grid-template-columns: 1fr; }
  .ref-nav { position: static; flex-direction: row; overflow-x: auto; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .ref-nav a { border-left: 0; padding: 5px 0; white-space: nowrap; }
  .ref-nav a.is-active { border-left: 0; border-bottom: 2px solid var(--red); padding-left: 0; }
  .wk { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cropmark { display: none; }
  .sec-head[data-ghost]::after, .chapter-head[data-ghost]::after { font-size: 64px; top: 12px; }
  .interlude { padding: 56px 0; }
  .formcard { width: calc(100% - 8px); padding: 16px 18px 10px; box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.42); }
  .tabpane .mock { width: calc(100% - 8px); }
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .nav-toggle { display: inline-block; }
  .nav-panel {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    flex-direction: column; align-items: flex-start; gap: 14px;
    background: var(--bg-2); border-bottom: 1px solid var(--line-2);
    padding: 14px 20px 20px;
  }
  .nav-panel.is-open { display: flex; }
  .doc-ref { display: none; }
  h1 { font-size: 42px; }
  .row { grid-template-columns: 40px 1fr; }
  .row p, .row .go { display: none; }
  .pcards { grid-template-columns: 1fr 1fr; }
  .prow { grid-template-columns: 12px 1.4fr 0.9fr 60px; }
  .prow .hide-m { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento.cols3 { grid-template-columns: 1fr; }
  .tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; }
  .pside { grid-template-columns: 1fr; }
  .section { padding-top: 72px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .mock { box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.42); }
  .hero-fig .mock { transform: translateX(-4px) rotate(-0.8deg); }
  [data-theme="light"] .mock { box-shadow: 8px 8px 0 rgba(23, 24, 29, 0.12); }
  [data-theme="light"] .formcard { box-shadow: 8px 8px 0 rgba(23, 24, 29, 0.10); }
  .theme-toggle { right: 14px; bottom: 14px; }
  .sl { grid-template-columns: 34px 1fr; }
  .sl span { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
  .js .reveal.in { transition: none; }
  .mock-live i, .tabpane.on { animation: none; }
  .theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: none !important; }
}

/* ================= v5 — enterprise pass ================= */
/* quiet confidence: sentence-case display type, no dossier furniture,
   soft diffuse depth, the product UI as the hero object. */

/* display type */
h1, h2 { font-family: var(--sans); font-weight: 600; text-transform: none; letter-spacing: -0.022em; }
h1 { font-size: clamp(42px, 5.4vw, 68px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; }
.chapter-head h2 { font-size: 26px; }
.interlude-text {
  font-family: var(--sans); font-weight: 600; text-transform: none;
  letter-spacing: -0.02em; font-size: clamp(34px, 4.8vw, 58px); line-height: 1.08;
}
.band .price { font-family: var(--sans); text-transform: none; font-weight: 600; }

/* dossier furniture — gone */
.doc-ref, .cropmark, .stamp, .vlabel, .hero-rule,
.sec-head[data-ghost]::after, .chapter-head[data-ghost]::after,
.cell .idx, .fig-cap span:last-child { display: none; }
/* doc-ref carried the auto-margin that pushed nav right — move it to the nav itself */
.nav-panel { margin-left: auto; }
.sec-head { border-top: 0; padding-top: 0; }
.fig-cap { justify-content: flex-start; }

/* buttons — calm, slightly rounded */
.btn, .btn-ghost {
  font-family: var(--sans); text-transform: none; letter-spacing: 0;
  font-size: 15.5px; border-radius: 6px; min-height: 46px; padding: 0 22px;
}
.btn:hover, .btn-ghost:hover { transform: none; box-shadow: none; }
.btn:active, .btn-ghost:active { transform: none; }
.btn-ghost:hover { border-color: var(--faint); color: var(--text); }
.nav-mail { background: var(--red-2); border-color: var(--red-2) !important; color: #fff !important; border-radius: 6px; }
.nav-mail:hover { background: var(--red); border-color: var(--red) !important; }

/* hero — straight, centered, breathing room */
.hero { padding-top: 88px; }
.hero h1 { margin: 0 0 24px; max-width: 13em; }
.hero .actions { margin: 32px 0 56px; }
.hero-fig { margin: 72px auto 100px; }
.hero-fig .mock { transform: none; }
.mock.tilt { transform: none; }

/* metric strip — numbers and labels, no boxes */
.hero-facts { gap: 40px; background: none; border-bottom: 0; }
.hero-facts span {
  background: none; padding: 20px 0 2px;
  font-family: var(--sans); font-size: 13.5px; letter-spacing: 0;
  text-transform: none; color: var(--mut);
}
.hero-facts b { font-family: var(--sans); font-weight: 600; font-size: 34px; margin-bottom: 5px; }

/* soft diffuse depth */
.mock {
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .mock { box-shadow: 0 30px 70px -24px rgba(23, 24, 29, 0.32), 0 4px 16px rgba(23, 24, 29, 0.10); }
.formcard { width: 100%; border-radius: 8px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5); }
[data-theme="light"] .formcard { box-shadow: 0 24px 55px -24px rgba(23, 24, 29, 0.20); }
a.cell:hover { transform: none; box-shadow: none; background: var(--bg-2); }
.theme-toggle { border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
[data-theme="light"] .theme-toggle { box-shadow: 0 8px 22px rgba(23, 24, 29, 0.14); }

@media (max-width: 720px) {
  .hero { padding-top: 56px; }
  .mock, .hero-fig .mock { box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.55); }
  [data-theme="light"] .mock, [data-theme="light"] .hero-fig .mock { box-shadow: 0 18px 40px -14px rgba(23, 24, 29, 0.25); }
  .formcard { width: 100%; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.4); }
  [data-theme="light"] .formcard { box-shadow: 0 14px 30px -14px rgba(23, 24, 29, 0.18); }
  .hero-facts { gap: 24px; }
}

/* ================= v5.1 — visual symbol layer ================= */
/* line-icon system, comprehension diagram, faint schematic backdrops */

/* icon chip — the brand's square module carrying a line icon */
.ic-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--red); margin-bottom: 16px;
  transition: border-color 0.15s;
}
.ic-chip svg { width: 20px; height: 20px; display: block; }
a.cell:hover .ic-chip { border-color: rgba(229, 72, 106, 0.55); }

/* architecture diagram — operator / teamserver / agents */
.arch {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch; gap: 16px; margin: 36px 0 46px;
}
.arch-node {
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2);
  padding: 20px 16px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.arch-node .ic-chip { margin-bottom: 12px; }
.arch-node b {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; margin-bottom: 6px;
}
.arch-node > span { font-size: 12.5px; color: var(--mut); line-height: 1.45; }
.arch-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; min-width: 118px; padding: 0 2px;
}
.arch-link > span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em;
  color: var(--faint); text-align: center; max-width: 140px; line-height: 1.5;
}
.arch-link.acc > span { color: var(--red); }
.arch-link i { display: block; width: 100%; height: 1px; background: var(--line-2); position: relative; }
.arch-link i::after {
  content: ""; position: absolute; right: -1px; top: -3.5px;
  border-left: 7px solid var(--line-2);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.arch-link.acc i { background: rgba(229, 72, 106, 0.45); }
.arch-link.acc i::after { border-left-color: rgba(229, 72, 106, 0.45); }
@media (max-width: 720px) {
  .arch { grid-template-columns: 1fr; gap: 6px; }
  .arch-link { min-width: 0; padding: 4px 0; gap: 7px; }
  .arch-link > span { max-width: none; }
  .arch-link i { width: 1px; height: 26px; }
  .arch-link i::after {
    right: -3.5px; top: auto; bottom: -1px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 7px solid var(--line-2); border-bottom: 0;
  }
  .arch-link.acc i { background: rgba(229, 72, 106, 0.45); }
  .arch-link.acc i::after { border-top-color: rgba(229, 72, 106, 0.45); border-left-color: transparent; }
}

/* faint schematic backdrops — generated, theme-aware */
.hero { overflow: hidden; overflow: clip; }
.hero::before {
  content: ""; position: absolute; top: -70px; right: -90px;
  width: 560px; height: 560px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cdefs%3E%3Cpattern id='d' width='26' height='26' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(233,231,226,0.06)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='560' height='560' fill='url(%23d)'/%3E%3Cg fill='none' stroke='rgba(233,231,226,0.08)'%3E%3Ccircle cx='430' cy='130' r='120'/%3E%3Ccircle cx='430' cy='130' r='210'/%3E%3Ccircle cx='430' cy='130' r='300'/%3E%3C/g%3E%3Ccircle cx='430' cy='130' r='3.5' fill='rgba(229,72,106,0.55)'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 68%);
}
[data-theme="light"] .hero::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cdefs%3E%3Cpattern id='d' width='26' height='26' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(23,24,29,0.06)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='560' height='560' fill='url(%23d)'/%3E%3Cg fill='none' stroke='rgba(23,24,29,0.08)'%3E%3Ccircle cx='430' cy='130' r='120'/%3E%3Ccircle cx='430' cy='130' r='210'/%3E%3Ccircle cx='430' cy='130' r='300'/%3E%3C/g%3E%3Ccircle cx='430' cy='130' r='3.5' fill='rgba(194,37,92,0.5)'/%3E%3C/svg%3E");
}
.hero .wrap { position: relative; z-index: 1; }

/* interlude — quiet dot matrix */
.interlude {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='rgba(233,231,226,0.05)'/%3E%3C/svg%3E");
}
[data-theme="light"] .interlude {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='rgba(23,24,29,0.06)'/%3E%3C/svg%3E");
}

/* band — blueprint grid on the red field */
.band {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M28 .5H.5V28' fill='none' stroke='rgba(255,255,255,0.10)'/%3E%3C/svg%3E");
}

/* ================= v5.1b — chapter visual aids ================= */
.chapter-head .ic-chip { margin-bottom: 14px; }
.chap-fig { margin: 26px 0 44px; }
.flowfig .fl.hot { border-color: rgba(229, 72, 106, 0.5); color: var(--red); }

/* ================= v5.2 guided tour ================= */
.tour-veil { position: absolute; top: 0; left: 0; width: 100%; z-index: 900; }
.tour-veil[hidden] { display: none; }
.tour-ring {
  position: absolute; top: 0; left: 0; pointer-events: none;
  border: 1.5px solid var(--red); border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(8, 9, 12, 0.62);
  transition: transform .38s cubic-bezier(.16,1,.3,1), width .38s cubic-bezier(.16,1,.3,1), height .38s cubic-bezier(.16,1,.3,1);
}
.tour-card {
  position: absolute; top: 0; left: 0; width: 340px; max-width: calc(100vw - 24px);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  transition: transform .38s cubic-bezier(.16,1,.3,1);
}
.tour-count { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--red); margin-bottom: 6px; }
.tour-card h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.tour-card p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: var(--mut); }
.tour-actions { display: flex; gap: 8px; margin: 0; }
.tour-actions button {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  transition: border-color .15s, color .15s, background .15s;
}
.tour-actions button:hover { border-color: var(--red); color: var(--red); }
.tour-actions .t-next { background: var(--red-2); border-color: var(--red-2); color: #fff; margin-left: auto; }
.tour-actions .t-next:hover { background: var(--red); border-color: var(--red); color: #fff; }
button.btn { border: 0; cursor: pointer; }
@media (max-width: 720px) {
  .tour-card { position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-ring, .tour-card { transition: none; }
}

/* ================= v5.3 faithful panel mocks ================= */
/* tab bar under the header (Dashboard · Agents · per-agent tabs) */
.ptabs { display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab2 { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 6px; font-size: 11px; color: var(--faint); border-bottom: 2px solid transparent; }
.ptab2 svg { width: 11px; height: 11px; }
.ptab2.on { color: var(--text); border-bottom-color: var(--red); }
.ptab2.agent { color: var(--mut); }
.ptab2 .tdot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.ptab2 .tx { color: var(--faint); font-size: 11px; margin-left: 2px; }
.phead-icons { display: flex; gap: 5px; margin-left: 10px; }
.phead-icons i { width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 3px; position: relative; }
.phead-icons i.dot::after { content: ""; position: absolute; top: -2px; right: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.prole { font-family: var(--mono); font-size: 8.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 2px; padding: 1px 4px; }

/* five stat cards */
.pcards.c5 { grid-template-columns: repeat(5, 1fr); }
.pcard .d.ok { color: var(--green); }
.pcard .d.bad { color: var(--red); }

/* dashboard 3-column widget grid */
.dgrid { display: grid; grid-template-columns: 1fr 1.15fr 0.85fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.dcol { background: var(--bg-2); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dcol .pwidget { margin: 0; }
/* agents-over-time bars */
.dtl { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: 4px; }
.dtl i { flex: 1; background: var(--red-2); opacity: .75; min-height: 3px; }
.dtl i.dim { opacity: .3; }
/* donut */
.ddonut { display: flex; align-items: center; gap: 12px; }
.ddonut svg { width: 74px; height: 74px; flex: none; }
.ddonut .dl { flex: 1; font-family: var(--mono); font-size: 9px; color: var(--mut); display: flex; flex-direction: column; gap: 3px; }
.ddonut .dl span { display: flex; align-items: center; gap: 5px; }
.ddonut .dl b { margin-left: auto; color: var(--text); font-weight: 600; }
.ddonut .dl i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
/* campaigns / operators strip */
.dstrip { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; color: var(--faint); flex-wrap: wrap; }
.dstrip .dz { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dcamp { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; color: var(--mut); }
.dcamp i { width: 6px; height: 6px; border-radius: 50%; }
.dcamp b { color: var(--text); font-weight: 600; }
.dops { display: inline-flex; }
.dops .pavatar { margin-left: -5px; border: 1px solid var(--bg-2); }
.dops .pavatar:first-child { margin-left: 0; }

/* agents stats bar */
.sbar { display: flex; align-items: center; gap: 14px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 9.5px; color: var(--faint); flex-wrap: wrap; }
.sbar b { color: var(--text); font-size: 11px; font-weight: 600; margin-right: 3px; }
.sbar .sep { width: 1px; height: 14px; background: var(--line); }
.sbar .g { color: var(--green); } .sbar .a { color: var(--amber); } .sbar .r { color: var(--red); }
.hlth { font-family: var(--mono); font-size: 8.5px; border-radius: 2px; padding: 2px 6px; }
.hlth.good { background: rgba(67, 181, 129, 0.12); color: var(--green); }
.hlth.stale { background: rgba(217, 161, 59, 0.12); color: var(--amber); }
.hlth.crit { background: rgba(229, 72, 106, 0.12); color: var(--red); }

/* workspace: sidebar nav + overview */
.wl { display: grid; grid-template-columns: 190px 1fr; gap: 1px; background: var(--line); }
.wl > div { background: var(--bg-2); min-width: 0; }
.wnav2 { padding: 10px 10px 12px; max-height: 430px; overflow: hidden; }
.wagent { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.wagent svg { width: 18px; height: 18px; flex: none; }
.wagent b { display: block; font-size: 11px; }
.wagent span { font-family: var(--mono); font-size: 8.5px; color: var(--faint); }
.wgrp { margin-top: 8px; }
.wgrp > span { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 2px; }
.wgrp a { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--mut); text-decoration: none; padding: 3px 7px; border-radius: 3px; }
.wgrp a.on { color: var(--text); background: var(--bg-3, rgba(233,231,226,.06)); box-shadow: inset 2px 0 0 var(--red); }
.wgrp a.warn { color: var(--amber); } .wgrp a.bad { color: var(--red); }
.wgrp a .md { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.wmain { padding: 12px; }
/* overview hero */
.ovh { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(76,29,149,.12)); }
.ovh .oico { width: 38px; height: 38px; border-radius: 9px; background: rgba(0,120,212,.18); display: flex; align-items: center; justify-content: center; flex: none; }
.ovh .oico svg { width: 20px; height: 20px; }
.ovh b { font-size: 14px; display: block; }
.ovh .osub { font-family: var(--mono); font-size: 9px; color: var(--mut); display: block; margin-top: 2px; }
.obadges { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.obdg { font-family: var(--mono); font-size: 8px; border-radius: 20px; padding: 2px 8px; border: 1px solid var(--line); color: var(--mut); }
.obdg.ok { border-color: rgba(67,181,129,.4); color: var(--green); }
.obdg.hi { border-color: rgba(217,161,59,.4); color: var(--amber); }
.ovstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.ovstat { border: 1px solid var(--line); padding: 8px 10px; }
.ovstat b { display: block; font-size: 12px; font-weight: 600; }
.ovstat span { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ovgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ovgrid .pwidget { margin: 0; }
.ovq { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.ovq span { border: 1px solid var(--line); border-radius: 4px; padding: 6px 4px; text-align: center; font-size: 9px; color: var(--mut); }
.socks-host { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(233,231,226,.05); border-radius: 4px; padding: 6px 8px; font-family: var(--mono); font-size: 10px; margin-bottom: 6px; }
.socks-host code { color: var(--green); font-weight: 600; }
.socks-stop { font-family: var(--mono); font-size: 8px; color: var(--red); border: 1px solid rgba(229,72,106,.4); border-radius: 3px; padding: 2px 7px; }
/* builder modal */
.bwrap { padding: 18px 14px; display: flex; justify-content: center; background: rgba(8,9,12,.35); }
.bmod { width: 100%; max-width: 760px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.bmod-h { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.bmod-h span { color: var(--faint); }
.btabs2 { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.btabs2 span { font-size: 10px; color: var(--faint); padding: 6px 10px 5px; border-bottom: 2px solid transparent; }
.btabs2 span.on { color: var(--text); border-bottom-color: var(--red); }
.bbody { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1px; background: var(--line); }
.bform, .bside2 { background: var(--bg-2); padding: 12px; min-width: 0; }
.bsec { margin-bottom: 10px; }
.bsec > span { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 4px; }
.brow { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 9.5px; color: var(--mut); padding: 3px 0; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: 0; }
.brow b { color: var(--text); font-weight: 500; }
.brow .chk { color: var(--green); }
.bbuild { margin-top: 4px; }
.bbuild span { display: inline-block; background: var(--red-2); color: #fff; font-size: 10px; font-weight: 600; border-radius: 4px; padding: 6px 16px; }
.blog2 { font-family: var(--mono); font-size: 9.3px; line-height: 1.7; color: var(--mut); }
.blog2 .t { color: var(--faint); }
.blog2 .ok { color: var(--green); }
.barts { margin-top: 10px; }
.barts .prow { grid-template-columns: 14px 1.6fr 0.9fr 0.6fr; }
/* mobile: stack the mock grids */
@media (max-width: 720px) {
  .dgrid, .wl, .bbody { grid-template-columns: 1fr; }
  .pcards.c5 { grid-template-columns: repeat(2, 1fr); }
  .wnav2 { max-height: none; }
  .ovstats { grid-template-columns: repeat(2, 1fr); }
  .ovgrid { grid-template-columns: 1fr; }
  .ovq { grid-template-columns: repeat(3, 1fr); }
}

/* ================= v5.4 — professional polish pass ================= */
/* aligned numerals, micro-interactions, layered depth — no layout changes */

/* tabular numerals wherever numbers carry meaning */
.mock, .pcard b, .sbar, .spec, .ovstats, .row .n, .tok-row, .mod-row,
.blog2, .prow, .strow, .evrow, .tok b, .hero-facts b, .card-grid b {
  font-variant-numeric: tabular-nums;
}

/* capability entries — editorial hover: quiet red margin bar + drift */
.entry { transition: background 0.18s ease, padding-left 0.18s ease, box-shadow 0.18s ease; }
.entry:hover {
  background: rgba(233, 231, 226, 0.015);
  box-shadow: inset 2px 0 0 var(--red);
  padding-left: 12px;
}
[data-theme="light"] .entry:hover { background: rgba(23, 24, 29, 0.02); }

/* spec chips — faint lift on hover */
.chip { transition: color 0.15s, border-color 0.15s, background 0.15s; }
.chip-cloud:hover .chip { border-color: var(--line-2); }
.chip-cloud .chip:hover { color: var(--text); border-color: rgba(229, 72, 106, 0.45); background: rgba(229, 72, 106, 0.06); }

/* buttons — tactile micro-lift */
.btn, .btn-ghost { transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(229, 72, 106, 0.55); }
  .btn-ghost:hover { transform: translateY(-1px); }
}

/* icon chips — a whisper of brand tint inside the square */
.ic-chip {
  background: linear-gradient(160deg, rgba(229, 72, 106, 0.08), rgba(229, 72, 106, 0.015) 55%, transparent);
}
a.cell:hover .ic-chip { background: linear-gradient(160deg, rgba(229, 72, 106, 0.14), rgba(229, 72, 106, 0.03) 60%, transparent); }

/* mock tables — rows respond like the real console */
.prow, .strow, .evrow { transition: background 0.12s; }
.prow:hover, .strow:hover, .evrow:hover { background: rgba(233, 231, 226, 0.03); }
[data-theme="light"] .prow:hover, [data-theme="light"] .strow:hover, [data-theme="light"] .evrow:hover { background: rgba(23, 24, 29, 0.03); }

/* stat cells — values settle, labels stay put */
.ovstat, .pcard { transition: background 0.15s; }
.pcard:hover { background: rgba(233, 231, 226, 0.025); }
[data-theme="light"] .pcard:hover { background: rgba(23, 24, 29, 0.02); }

/* index rows — the number marks the hovered line */
.row .n { transition: color 0.15s; }
a.row:hover .n { color: var(--text); }

/* footer + nav links — consistent, quick fades */
.nav a, .foot a { transition: color 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .entry, .chip, .btn, .btn-ghost, .prow, .strow, .evrow, .pcard { transition: none; }
  .entry:hover { padding-left: 0; }
}

/* ================= v5.4.1 — band pricing legibility ================= */
/* calmer price line, note on its own baseline */
.band .price { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; line-height: 1.15; }
.band .price small { display: block; margin-top: 8px; font-size: 15px; line-height: 1.4; }

/* ================= v5.5 — evidence lab ================= */
/* rev pin in the hero, evaluation-matrix mock */
.rev-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--mut); margin: 20px 0 0;
}
.rvdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 3px rgba(67, 181, 129, 0.15); }
.rev-note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.rev-note a:hover { color: var(--red); text-decoration-color: var(--red); }

.labrow {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 8px; align-items: center;
  padding: 7px 10px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; color: var(--mut);
  transition: background 0.12s;
  font-variant-numeric: tabular-nums;
}
.labrow:last-child { border-bottom: 0; }
.labrow:hover { background: rgba(233, 231, 226, 0.03); }
[data-theme="light"] .labrow:hover { background: rgba(23, 24, 29, 0.03); }
.labrow.lab-head { font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.labrow .leng { color: var(--text); font-weight: 600; font-size: 10.5px; }
.labrow .lok {
  color: var(--green); border: 1px solid rgba(67, 181, 129, 0.4); border-radius: 3px;
  padding: 2px 8px; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
}
.lab-note {
  font-size: 12px; color: var(--mut); line-height: 1.7; margin: 12px 0 0;
  border-left: 2px solid var(--green); padding-left: 12px;
}
.pcards.c3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .pcards.c3 { grid-template-columns: 1fr; }
  .labrow { grid-template-columns: 1.2fr 0.7fr 0.7fr 0.7fr; }
  .labrow .lok { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .labrow { transition: none; } }

/* ================= v5.6 — visual layer ================= */
/* hand-built svg figures, theme-aware */
.svgfig { border: 1px solid var(--line-2); background: var(--bg-2); margin: 26px 0 8px; padding: 18px 16px; overflow-x: auto; }
.svgfig svg { display: block; width: 100%; min-width: 640px; height: auto; color: var(--mut); }
.svgfig .sf-box { fill: var(--bg); stroke: var(--line-2); }
.svgfig .sf-hot { stroke: var(--red); }
.svgfig .sf-ok { stroke: var(--green); }
.svgfig .sf-fill-hot { fill: rgba(229, 72, 106, 0.07); }
.svgfig .sf-fill-ok { fill: rgba(67, 181, 129, 0.07); }
.svgfig .sf-fill-dim { fill: var(--bg-2); }
.svgfig text { font-family: var(--mono); fill: var(--mut); }
.svgfig .sf-t { fill: var(--text); font-weight: 600; }
.svgfig .sf-dim { fill: var(--faint); }
.svgfig .sf-red { fill: var(--red); }
.svgfig .sf-grn { fill: var(--green); }
.svgfig .sf-ln { stroke: var(--line-2); }
.svgfig .sf-ln-red { stroke: var(--red); }
.svgfig .sf-ln-grn { stroke: var(--green); }
.svgfig .sf-dash { stroke-dasharray: 5 4; }
@media (max-width: 720px) {
  .svgfig { padding: 12px 10px; }
  .svgfig svg { min-width: 560px; }
}

/* reading progress — injected by JS on blog posts */
.read-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--red); z-index: 90; transition: width 0.08s linear; }

/* arch diagram — packet pulse */
.arch-link i::before {
  content: ""; position: absolute; left: -22%; top: 0; height: 100%; width: 22%;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0; animation: archflow 3.8s ease-in-out infinite;
}
.arch-link.acc i::before { animation-delay: 1.9s; }
@keyframes archflow {
  0% { left: -22%; opacity: 0; }
  18% { opacity: 0.9; }
  62% { opacity: 0.9; }
  100% { left: 100%; opacity: 0; }
}
@media (max-width: 720px) {
  .arch-link i::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .read-progress { transition: none; }
  .arch-link i::before { animation: none; display: none; }
}

/* ================= v5.7 — entry deep links ================= */
.entry h3 .anchor {
  opacity: 0; margin-left: 9px; font-family: var(--mono); font-size: 0.72em; font-weight: 400;
  color: var(--faint); text-decoration: none; transition: opacity 0.15s, color 0.15s;
}
.entry:hover h3 .anchor, .entry h3 .anchor:focus-visible { opacity: 1; }
.entry h3 .anchor:hover { color: var(--red); }
@media (hover: none) { .entry h3 .anchor { opacity: 0.55; } }

/* ================= v5.8 — full reference index (features) ================= */
.refx { border-top: 1px solid var(--line-2); }
.refx-row {
  display: grid; grid-template-columns: 44px minmax(180px, 260px) 1fr;
  gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line);
}
.refx-row .n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.refx-row h3 { font-size: 16px; margin: 0; }
.refx-row h3 a { color: var(--text); text-decoration: none; transition: color 0.15s; }
.refx-row h3 a:hover { color: var(--red); }
.refx-row .rlist { margin: 0; font-size: 13.5px; line-height: 2; color: var(--mut); }
.refx-row .rlist a {
  color: var(--mut); text-decoration: none;
  border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.refx-row .rlist a:hover { color: var(--red); border-bottom-color: var(--red); }
.refx-row .rlist .sep { color: var(--faint); }
@media (max-width: 720px) {
  .refx-row { grid-template-columns: 34px 1fr; }
  .refx-row .rlist { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .refx-row h3 a, .refx-row .rlist a { transition: none; }
}
.entry:target { box-shadow: inset 2px 0 0 var(--red); padding-left: 12px; background: rgba(233, 231, 226, 0.015); }
[data-theme="light"] .entry:target { background: rgba(23, 24, 29, 0.02); }
@media (prefers-reduced-motion: reduce) { .entry h3 .anchor { transition: none; } }
