/* The home page: hero, chapters, sections and figures. */

/* Grid and flex children may shrink below their content, so a long line of code
   scrolls inside its own box instead of widening the page. Zero specificity:
   any class rule that sets a minimum wins. */
:where(.sec-body, .hero, .install) :where(div, ol, ul, li, dl, figure, label, pre, p) {
  min-width: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--head) + clamp(32px, 5vw, 64px)) 0 clamp(32px, 4vw, 48px);
  overflow: hidden;
}
.hero .glow {
  position: absolute;
  inset: -10% -10% auto;
  height: 1000px;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 72% 36%, rgba(122, 162, 247, 0.16), transparent 70%),
    radial-gradient(520px 340px at 50% 70%, rgba(0, 200, 150, 0.07), transparent 70%),
    radial-gradient(460px 320px at 14% 8%, rgba(204, 119, 34, 0.09), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 32px, 160px 100%;
  mask-image: radial-gradient(1000px 640px at 66% 42%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(1000px 640px at 66% 42%, #000 10%, transparent 75%);
  opacity: 0.45;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: clamp(28px, 3.5vw, 56px);
  align-items: center;
}
.pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: rgba(16, 18, 28, 0.7);
  color: var(--muted);
  font: 600 12px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pill i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}
@media (max-width: 479px) {
  .pill .os {
    display: none;
  }
}
.hero h1 {
  font-size: clamp(44px, 5.6vw, 86px);
}
.hero h1 span {
  display: block;
}
.pill .v {
  text-transform: none;
}
.hero h1 em.g {
  display: block;
  background: linear-gradient(96deg, #e0af68 0%, #73daca 46%, #7aa2f7 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  margin: 28px 0 32px;
  max-width: 34em;
}
.hero .cta {
  margin-bottom: 18px;
}
.hero .cmd {
  max-width: 540px;
}
.hero-copy {
  min-width: 0;
}

/* The hero's diagram: agents flowing into one index. */
.hero-map {
  margin: 0;
  min-width: 0;
}
.cv {
  width: 100%;
  height: auto;
  overflow: visible;
}
.cv-head {
  fill: var(--faint);
  font: 600 10.5px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cv-rule {
  stroke: var(--line2);
  stroke-width: 1;
  fill: none;
}
.cv-line {
  fill: none;
  stroke-width: 1.4;
  stroke-opacity: 0.42;
}
.cv-line.faint {
  stroke-width: 0.8;
  stroke-opacity: 0.16;
}
.cv-line.outl {
  stroke: #94b6ff;
  stroke-opacity: 0.45;
  stroke-width: 1.6;
}
.cv-pulse {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 4 100;
  stroke-dashoffset: 4;
  opacity: 0;
}
.cv-pulse.out {
  stroke: #c0d4ff;
}
@media (prefers-reduced-motion: no-preference) {
  .cv-pulse {
    opacity: 0.95;
    animation: cv-flow 4.2s linear infinite;
    animation-delay: var(--d, 0s);
  }
  .cv-pulse.out {
    animation-duration: 3.6s;
  }
  .cv-halo {
    animation: cv-breathe 4s ease-in-out infinite;
  }
  /* client/home.ts marks the diagram while it is off screen: endless animations cost every frame. */
  .hero-map[data-offscreen] .cv-pulse,
  .hero-map[data-offscreen] .cv-halo {
    animation-play-state: paused;
  }
}
@keyframes cv-flow {
  to {
    stroke-dashoffset: -100;
  }
}
@keyframes cv-breathe {
  50% {
    stroke-opacity: 0.12;
  }
}
.cv-minor {
  opacity: 0.85;
}
.cv-name {
  fill: var(--ink);
  font: 600 14px var(--sans);
  letter-spacing: -0.01em;
}
.cv-store {
  fill: var(--faint);
  font: 500 11px var(--mono);
}
/* A halo the color of the page keeps labels readable where lines cross them. */
.cv text {
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.cv-hub {
  color: var(--ink);
}
.cv-halo {
  fill: none;
  stroke: #7aa2f7;
  stroke-opacity: 0.32;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.cv-core {
  fill: #11141f;
  stroke: #7aa2f7;
  stroke-width: 2;
}
.cv-hubname {
  fill: var(--ink);
  font: 760 20px var(--sans);
  letter-spacing: -0.03em;
}
.cv-port {
  fill: #11141f;
  stroke: #94b6ff;
  stroke-width: 1.6;
}

/* The query demo's panel, and terminal title bars. */
.win {
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: rgba(10, 11, 18, 0.5);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 500 12.5px/1 var(--mono);
}
.win-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.win-label {
  color: var(--blue);
  font: 650 13px/1 var(--mono);
}
.win-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font: 500 16px/1 var(--mono);
  outline: none;
}
.win-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}
/* How the demo read the query. */
.sx-parse {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.sx-parse div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.sx-parse dt {
  color: var(--faint);
  font: 600 11.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sx-parse dd {
  margin: 0;
  color: var(--ink);
}
.sx-parse code {
  background: none;
  padding: 0;
  color: var(--chapter);
}
.win-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.win-chips::-webkit-scrollbar {
  display: none;
}
.win-chips button,
.win-try button,
.fg-presets button,
.mp-presets button,
.rc-tabs button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
}
.win-chips button:hover,
.win-try button:hover,
.fg-presets button:hover,
.mp-presets button:hover,
.rc-tabs button:hover {
  color: var(--ink);
  border-color: var(--line2);
}
.win-chips button[aria-pressed="true"],
.fg-presets button[aria-pressed="true"],
.mp-presets button[aria-pressed="true"],
.rc-tabs button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--chapter) 55%, transparent);
  background: color-mix(in srgb, var(--chapter) 13%, transparent);
  color: var(--ink);
}
.win-chips button[data-agent]:not([data-agent=""])[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--a) 60%, transparent);
  background: color-mix(in srgb, var(--a) 14%, transparent);
}
.glyph {
  color: var(--a, currentColor);
  font-size: 0.9em;
  line-height: 1;
}
.agent {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 620;
}
.win-results {
  height: 392px;
  overflow-y: auto;
  padding: 6px 6px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
  overscroll-behavior: contain;
}
.lanes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lane {
  padding: 8px 8px 4px;
}
.lane + .lane {
  border-top: 1px solid var(--line);
}
.lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 6px;
  font-size: 13.5px;
}
.lane-head .count {
  color: var(--faint);
  font: 12px/1 var(--mono);
}
.lane ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lane .hit {
  position: relative;
  padding: 9px 10px 9px 14px;
  border-radius: 10px;
}
.lane .hit::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--a) 70%, transparent);
}
.lane .hit:hover {
  background: rgba(255, 255, 255, 0.03);
}
.hit-title {
  color: var(--ink);
  font-weight: 620;
  font-size: 15px;
  line-height: 1.35;
}
.hit-snip {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.hit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 5px;
  color: var(--faint);
  font: 12px/1.4 var(--mono);
}
.hit-meta .score {
  margin-left: auto;
  color: var(--muted);
}
.win mark {
  background: rgba(122, 162, 247, 0.26);
  color: #fff;
  border-radius: 3px;
  padding: 0 2px;
}
.empty {
  padding: 28px 18px;
  color: var(--muted);
  font-size: 15px;
}
.win-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: 12.5px/1.3 var(--mono);
}
.win-status [data-status] {
  color: var(--muted);
}
.win-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.win-try button {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* The numbers under the hero: one band, divided into cells. */
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: clamp(8px, 2vw, 24px) 0 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
}
.stats li + li {
  border-left: 1px solid var(--line);
}
.stats a {
  display: block;
  height: 100%;
  padding: 26px clamp(16px, 2vw, 28px) 28px;
  text-decoration: none;
  transition: background 0.15s;
}
.stats a:hover {
  background: rgba(255, 255, 255, 0.025);
}
.stats b {
  display: block;
  font-size: clamp(44px, 4.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #a9b6e8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font: 600 12px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}
@media (max-width: 1099px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-map {
    max-width: 720px;
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats li:nth-child(4) {
    border-left: 0;
  }
  .stats li:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}
.cv-cap {
  display: none;
}
@media (max-width: 699px) {
  .cv-name {
    font-size: 21px;
  }
  .cv-store {
    font-size: 15px;
  }
  /* The outputs' labels move to the caption below; only the agents stay labeled. */
  .cv-node.minor text,
  .cv-node .cv-store,
  .cv-out text,
  .cv-head,
  .cv-rule {
    display: none;
  }
  .cv-cap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }
  .cv-cap .micro {
    margin-right: 4px;
  }
  .cv-cap b {
    padding: 4px 10px;
    border: 1px solid rgba(148, 182, 255, 0.4);
    border-radius: 999px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats li:nth-child(n) {
    border-left: 0;
    border-top: 0;
  }
  .stats li:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .stats li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .stats li:last-child {
    grid-column: 1 / -1;
    border-left: 0;
  }
  .win-results {
    height: 360px;
  }
  .hit-meta span:nth-child(3),
  .hit-meta span:nth-child(4) {
    display: none;
  }
  .win-status span:last-child {
    display: none;
  }
}

/* ---------- The tour: a real screenshot, numbered ---------- */
.tour {
  padding: clamp(72px, 9vw, 128px) 0 clamp(32px, 5vw, 56px);
}
.tour-head {
  max-width: 860px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}
.tour-head .lede {
  margin-top: 22px;
}
.tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.tour-shot {
  margin: 0;
}
.tour-shot a {
  position: relative;
  display: block;
  border-radius: 16px;
  background: #1a1b26;
  box-shadow:
    0 0 0 1px rgba(169, 177, 214, 0.22),
    0 0 0 6px rgba(122, 162, 247, 0.06),
    0 50px 120px -40px #000,
    0 0 140px -50px rgba(122, 162, 247, 0.6);
}
.tour-shot img {
  width: 100%;
  border-radius: 16px;
}
.tour-shot a:hover .zoom,
.tour-shot a:focus-visible .zoom {
  opacity: 1;
}
.pin {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--amber);
  color: #16130c;
  font: 800 13.5px/1 var(--sans);
  box-shadow: 0 0 0 4px rgba(224, 175, 104, 0.25), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.tour-shot .pin {
  position: absolute;
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
  .tour-shot .pin::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(224, 175, 104, 0.7);
    animation: pin-ping 2.8s ease-out infinite;
  }
  .tour-shot .pin:nth-of-type(2)::after {
    animation-delay: 0.5s;
  }
  .tour-shot .pin:nth-of-type(3)::after {
    animation-delay: 1s;
  }
  .tour-shot .pin:nth-of-type(4)::after {
    animation-delay: 1.5s;
  }
  .tour-shot .pin:nth-of-type(5)::after {
    animation-delay: 2s;
  }
  .tour-shot[data-offscreen] .pin::after {
    animation-play-state: paused;
  }
}
@keyframes pin-ping {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}
.tour-key {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tour-key li {
  display: flex;
  gap: 14px;
  padding: 14px 4px 14px 0;
  border-bottom: 1px solid var(--line);
}
.tour-key li:last-child {
  border-bottom: 0;
}
.tour-key strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.tour-key p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
@media (max-width: 1099px) {
  .tour-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tour-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }
  .tour-key li:nth-last-child(2) {
    border-bottom: 0;
  }
}
@media (max-width: 699px) {
  .tour-shot .pin {
    width: 22px;
    height: 22px;
    font-size: 11.5px;
    box-shadow: 0 0 0 3px rgba(224, 175, 104, 0.25);
  }
  .tour-key {
    grid-template-columns: minmax(0, 1fr);
  }
  .tour-key li:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Overview: six cards, one per chapter ---------- */
.ov {
  padding: clamp(56px, 8vw, 112px) 0 clamp(16px, 3vw, 32px);
}
.ov-head {
  margin-bottom: clamp(28px, 3.5vw, 44px);
}
.ov-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ov-grid > li > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line2);
  border-radius: var(--r4);
  background: linear-gradient(180deg, rgba(21, 24, 38, 0.8), rgba(12, 14, 22, 0.92));
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.ov-grid > li > a:hover {
  border-color: color-mix(in srgb, var(--chapter) 55%, transparent);
  box-shadow: 0 24px 60px -30px color-mix(in srgb, var(--chapter) 55%, transparent);
  transform: translateY(-3px);
}
.ov-art {
  position: relative;
  aspect-ratio: 400 / 190;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(420px 220px at 50% 110%, color-mix(in srgb, var(--chapter) 16%, transparent), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 24px;
  overflow: hidden;
}
.ov-art .il {
  width: 100%;
  height: 100%;
}
.ov-art img.il {
  object-fit: cover;
  object-position: left top;
  opacity: 0.92;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.ov-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
}
.ov-text .micro {
  color: var(--chapter);
}
.ov-text h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.022em;
}
.ov-text > p:not(.micro) {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.ov-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 8px 0 0;
  list-style: none;
}
.ov-tags code {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--chapter) 35%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--chapter) 8%, transparent);
  color: color-mix(in srgb, var(--chapter) 62%, #fff);
  font-size: 12.5px;
  font-weight: 600;
}
.il-mono {
  font: 500 12.5px var(--mono);
  fill: var(--text);
}
.il-mono.dim {
  fill: var(--faint);
}
.il-chip {
  fill: rgba(255, 255, 255, 0.03);
  stroke: var(--line2);
}
.il-flow {
  fill: none;
  stroke-width: 1.6;
  stroke-opacity: 0.6;
}
.il-db path,
.il-db ellipse {
  fill: color-mix(in srgb, var(--chapter) 9%, transparent);
  stroke: var(--chapter);
  stroke-width: 1.6;
}
.il-db .il-band {
  fill: none;
  stroke-opacity: 0.45;
}
.il-brace {
  font-size: 24px;
  fill: var(--faint);
}
.il-k {
  fill: #7dcfff;
}
.il-s {
  fill: #9ece6a;
}
.il-n {
  fill: #ff9e64;
}
.il-exit rect {
  fill: rgba(158, 206, 106, 0.1);
  stroke: #9ece6a;
}
.il-exit text {
  fill: #9ece6a;
}
.il-exit.warn rect {
  fill: rgba(224, 175, 104, 0.1);
  stroke: #e0af68;
}
.il-exit.warn text {
  fill: #e0af68;
}
.il-exit.info rect {
  fill: rgba(125, 207, 255, 0.1);
  stroke: #7dcfff;
}
.il-exit.info text {
  fill: #7dcfff;
}
.il-dev,
.il-hub {
  fill: color-mix(in srgb, var(--chapter) 8%, transparent);
  stroke: var(--chapter);
  stroke-width: 1.5;
}
.il-devline {
  fill: none;
  stroke: var(--chapter);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.il-led {
  fill: #9ece6a;
}
.il-ssh {
  fill: none;
  stroke: var(--chapter);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  stroke-opacity: 0.75;
}
.il-text {
  fill: rgba(169, 177, 214, 0.2);
}
.il-red {
  fill: rgba(247, 118, 142, 0.12);
  stroke: #f7768e;
}
.il-redtext {
  fill: #f7768e;
  font-size: 11.5px;
}
.il-lock rect,
.il-lock path {
  fill: none;
  stroke: #f7768e;
  stroke-width: 2.4;
}
.il-derived {
  fill: color-mix(in srgb, var(--chapter) 5%, transparent);
  stroke: var(--chapter);
  stroke-dasharray: 5 4;
  stroke-opacity: 0.8;
}
.il-source {
  fill: color-mix(in srgb, var(--chapter) 15%, transparent);
  stroke: var(--chapter);
  stroke-width: 1.8;
}
.il-strong {
  fill: var(--ink);
  font-weight: 650;
}
.il-rebuild {
  fill: none;
  stroke: var(--chapter);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 1099px) {
  .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  .ov-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Chapters ---------- */
.chapter {
  position: relative;
}
.opener {
  position: relative;
  padding: clamp(96px, 12vw, 168px) 0 clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(1000px 480px at 12% 0%, color-mix(in srgb, var(--chapter) 11%, transparent), transparent 70%),
    radial-gradient(600px 400px at 88% 40%, color-mix(in srgb, var(--chapter) 6%, transparent), transparent 70%);
  overflow: hidden;
}
.opener > .wrap {
  position: relative;
}
.opener > .wrap > .reveal {
  position: relative;
  max-width: 900px;
}
.opener .lede {
  margin-top: 24px;
}
.numeral {
  position: absolute;
  right: var(--gut);
  top: 50%;
  transform: translateY(-50%);
  font: 800 clamp(180px, 22vw, 330px) / 0.8 var(--sans);
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--chapter) 32%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chapter) 16%, transparent), transparent 80%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
}
.kick-n {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--chapter) 45%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--chapter) 12%, transparent);
  color: var(--ink);
  letter-spacing: 0.06em;
}
@media (max-width: 999px) {
  .numeral {
    display: none;
  }
}
.opener-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.opener-index a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 560;
  text-decoration: none;
}
.opener-index a:hover {
  border-color: color-mix(in srgb, var(--chapter) 60%, transparent);
  color: var(--ink);
}
.sec {
  padding: clamp(44px, 5.6vw, 80px) 0;
}
.sec-head {
  margin-bottom: clamp(24px, 3.2vw, 40px);
}
.sec-head.wide {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.sec-head.wide > div {
  max-width: 760px;
}
.kicker {
  margin-top: 16px;
  max-width: 68ch;
  color: var(--text);
  font-size: 17.5px;
  line-height: 1.65;
}
@media (max-width: 899px) {
  .sec-head.wide {
    display: block;
  }
  .sec-head .more {
    margin-top: 12px;
  }
}

/* ---------- Figures ---------- */
.fig {
  margin: 0;
  border: 1px solid var(--line2);
  border-radius: var(--r4);
  background: linear-gradient(180deg, rgba(21, 24, 38, 0.75), rgba(13, 15, 24, 0.9));
}
.fig-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.todo {
  color: var(--ink);
  font-weight: 620;
  font-size: 16px;
}
.tagged {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--muted);
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tagged::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.tagged.live {
  border-color: color-mix(in srgb, var(--chapter) 50%, transparent);
  color: var(--ink);
}
.tagged.live::before {
  background: var(--chapter);
}
.win .tagged.live {
  --chapter: var(--blue);
}
.fig-body {
  padding: 22px;
}
.fig-foot {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
  line-height: 1.55;
}
.fig-foot.plain {
  padding: 14px 2px 0;
  border: 0;
}
@media (max-width: 599px) {
  .fig-head,
  .fig-body,
  .fig-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .fig-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Controls shared by figures. */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.seg button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 580;
}
.seg button:hover {
  color: var(--ink);
}
.seg button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--chapter) 18%, var(--panel2));
  color: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chapter) 45%, transparent) inset;
}
.range {
  display: grid;
  gap: 8px;
  min-width: 180px;
}
.range > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.range b {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 13px;
}
.range output {
  color: var(--chapter);
  font: 600 13px/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
}
.range input {
  --p: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.range input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--chapter) var(--p), var(--line2) var(--p));
}
.range input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--chapter) var(--p), var(--line2) var(--p));
}
.range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 3px solid var(--chapter);
  border-radius: 50%;
  background: var(--ink);
}
.range input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--chapter);
  border-radius: 50%;
  background: var(--ink);
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
}
.toggle i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--line2);
  transition: background 0.15s;
}
.toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.15s var(--ease);
}
.toggle[aria-pressed="true"] {
  color: var(--ink);
}
.toggle[aria-pressed="true"] i {
  background: var(--chapter);
}
.toggle[aria-pressed="true"] i::after {
  transform: translateX(16px);
  background: var(--go-ink);
}
.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Connectors. */
.fmt {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}
.fmt-list ul {
  display: grid;
  gap: 2px;
  max-height: 470px;
  margin: 10px 0 0;
  padding: 0 6px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}
.fmt-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  text-align: left;
}
.fmt-list button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.fmt-list button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--a) 14%, transparent);
  color: var(--ink);
  font-weight: 600;
}
.fmt-list .glyph {
  width: 1em;
  text-align: center;
}
.fmt-list .name {
  flex: 1;
}
.has,
.has-key {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chapter);
}
.has-key {
  margin: 0 2px 1px 4px;
  vertical-align: middle;
}
.fmt-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 16px;
}
.fmt-where code {
  font-size: 13px;
}
.fmt-kind {
  color: var(--faint);
  font: 12.5px/1.3 var(--mono);
}
.fmt-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.fmt-col .micro {
  margin-bottom: 8px;
}
/* A real session file: long JSONL records wrap so the whole record stays readable. */
.fmt-col .fmt-raw {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Terminals inside other figures take the height of their output, up to a limit,
   and wrap long lines (single-line JSON, long paths) rather than scrolling sideways. */
.fmt-col .term-body,
.fu-meta .term-body,
.ex-card .term-body,
.rc-grid .term-body {
  height: auto;
  max-height: 420px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fmt-raw,
.fg-canon,
.ct-err,
.rd-pre,
.teach-code pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  scrollbar-width: thin;
}
/* Single-line JSON as cass prints it on stderr, typed commands and config lines: wrap rather than scroll sideways. */
.ct-err,
.fg-canon,
.cfg .fmt-raw {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fmt-none {
  display: grid;
  gap: 10px;
  max-width: 56ch;
  color: var(--muted);
}
@media (max-width: 899px) {
  .fmt {
    grid-template-columns: 1fr;
  }
  .fmt-list ul {
    display: flex;
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    padding: 0 0 8px;
  }
  .fmt-list li {
    flex: none;
  }
  .fmt-list button {
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
  }
  .fmt-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Text inputs in figures. */
.mp-in input,
.mp-rule input,
.mp-in select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: 500 15px/1 var(--mono);
  outline: none;
}
.mp-in input:focus,
.mp-rule input:focus,
.mp-in select:focus,
.rd textarea:focus {
  border-color: var(--chapter);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chapter) 22%, transparent);
}
.fg-presets,
.mp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
}

/* Fusion. */
.fu-controls,
.pk-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.fu-controls .range {
  width: 220px;
}
.fu-q {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
}
.fu-t {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.fu-t th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line2);
  color: var(--faint);
  font: 600 11.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}
.fu-t td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.fu-t .num,
.fu-t .rank {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.fu-t th.num,
.fu-t td.num {
  text-align: center;
}
.fu-t .t {
  color: var(--ink);
  font-weight: 560;
}
.dotted {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--a);
  vertical-align: 1px;
}
.fu-t .calc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: 12px/1.4 var(--mono);
  color: var(--muted);
}
.contrib.none {
  color: var(--faint);
}
.fu-t td.fu-score {
  width: 170px;
  font: 12.5px/1 var(--mono);
  color: var(--ink);
}
.fu-t .fu-score i {
  display: block;
  height: 6px;
  margin-bottom: 6px;
  border-radius: 3px;
  background: var(--chapter);
  transition: width 0.3s var(--ease);
}
.fu-meta,
.fu-empty {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
}
.fu-meta .term {
  margin-top: 10px;
}
.fu-empty {
  padding: 18px;
  border: 1px dashed var(--line2);
  border-radius: 12px;
}
/* On a phone the table drops the arithmetic and keeps the ranks and the fused score in view. */
@media (max-width: 639px) {
  .fu-t {
    min-width: 0;
    font-size: 13.5px;
  }
  .fu-t th:nth-child(5),
  .fu-t td:nth-child(5) {
    display: none;
  }
  .fu-t th,
  .fu-t td {
    padding: 9px 5px;
  }
  .fu-t th {
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }
  .fu-t td.fu-score {
    width: 74px;
  }
  .fu-t .dotted {
    margin-right: 6px;
  }
}

/* Terminal replay. */
.rp {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
}
.rp-steps {
  display: grid;
  align-content: start;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rp-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  text-align: left;
}
.rp-steps .n {
  color: var(--faint);
  font: 12px/1 var(--mono);
}
.rp-steps button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.rp-steps button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--chapter) 14%, transparent);
  color: var(--ink);
  font-weight: 600;
}
.rp-steps button[aria-pressed="true"] .n {
  color: var(--chapter);
}
.term {
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: #07080d;
  overflow: hidden;
}
.term-bar .exit {
  margin-left: auto;
  color: var(--green);
}
.term-bar .exit.bad {
  color: var(--red);
}
.term-body {
  height: 400px;
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  scrollbar-width: thin;
}
.term-body .ps {
  color: var(--chapter);
}
.term-body .cmd-text {
  color: var(--ink);
  font-weight: 600;
}
.term-body .out {
  color: var(--muted);
}
.term-body b {
  color: var(--ink);
}
/* On a phone, every terminal wraps: a sideways scroll inside a vertical page is easy to miss. */
@media (max-width: 599px) {
  .term-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--chapter);
}
.rp-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 16px;
}
.rp-why {
  margin-top: 6px;
  max-width: 62ch;
  color: var(--text);
  font-size: 15.5px;
}
@media (max-width: 899px) {
  .rp {
    grid-template-columns: 1fr;
  }
  .rp-steps {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .rp-steps li {
    flex: none;
  }
  .rp-steps button {
    border: 1px solid var(--line);
    white-space: nowrap;
  }
  .rp-foot {
    flex-direction: column;
  }
  .term-body {
    height: 360px;
    font-size: 12px;
  }
}

/* Forgiving parser. */
.fg-out .micro {
  margin: 0 0 8px;
}
.fg-canon {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 15px;
  border-color: color-mix(in srgb, var(--chapter) 40%, transparent);
}
.fg-canon.typed {
  border-color: var(--line);
  color: var(--text);
}
.fg-notes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fg-notes code {
  background: none;
  padding: 0;
  color: var(--amber);
  font-size: 13px;
}
.fg-notes .none {
  color: var(--muted);
  font-size: 14.5px;
}

/* Answer packs. */
.pk-controls .range {
  width: 220px;
}
.pk-meter {
  height: 6px;
  margin: 22px 0 10px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.pk-meter i {
  display: block;
  height: 100%;
  background: var(--chapter);
  transition: width 0.3s var(--ease);
}
.pk-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14.5px;
}
.pk-sum b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pk-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pk-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  transition: opacity 0.2s, border-color 0.2s;
}
.pk-list li.in {
  border-color: color-mix(in srgb, var(--chapter) 35%, transparent);
  background: color-mix(in srgb, var(--chapter) 6%, transparent);
}
.pk-list li.out {
  opacity: 0.62;
}
.pk-list .rank,
.rk-list .rank {
  color: var(--faint);
  font: 12.5px/1 var(--mono);
}
.pk-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-size: 13.5px;
}
.pk-age,
.pk-tok {
  color: var(--faint);
  font: 12px/1.4 var(--mono);
}
.tier {
  padding: 1px 8px;
  border-radius: 999px;
  font: 600 11.5px/1.5 var(--mono);
}
.tier.likely {
  background: rgba(158, 206, 106, 0.14);
  color: var(--green);
}
.tier.unverified {
  background: rgba(224, 175, 104, 0.14);
  color: var(--amber);
}
.tier.stale {
  background: rgba(247, 118, 142, 0.14);
  color: var(--red);
}
.pk-ex {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.45;
}
.pk-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--chapter);
  font: 600 12.5px/1 var(--mono);
  white-space: nowrap;
}
.pk-state svg {
  width: 15px;
  height: 15px;
}
.pk-state code {
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 699px) {
  .pk-list li {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .pk-state {
    grid-column: 2;
  }
}

/* Contracts. */
.ct {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ct-col {
  display: grid;
  gap: 16px;
  align-content: start;
}
.ct-card {
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.7);
}
.ct-card > .micro {
  margin-bottom: 12px;
}
.ct-card > p:not(.micro) {
  margin-top: 12px;
  color: var(--text);
  font-size: 15.5px;
}
.ct-self {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ct-self li {
  display: grid;
  gap: 3px;
}
.ct-self span {
  color: var(--muted);
  font-size: 14.5px;
}
.ct-blurb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ct-blurb-head .copy {
  margin: 0;
}
@media (max-width: 899px) {
  .ct {
    grid-template-columns: 1fr;
  }
}

/* Screenshots. */
/* 1.4 : 1 is the width ratio of the full screen (1600 px) to the cropped help dialog (1150 px), so
   the two side by side show their text at the same size. */
.shots {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
}
.shot {
  margin: 0;
}
.shot.wide {
  grid-column: 1 / -1;
}
.shot a {
  position: relative;
  display: block;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  overflow: hidden;
  background: #0b0c12;
}
.shot img {
  width: 100%;
}
.zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(10, 11, 18, 0.8);
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.15s;
}
.zoom svg {
  width: 18px;
  height: 18px;
}
.shot a:hover .zoom,
.shot a:focus-visible .zoom {
  opacity: 1;
}
.shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}
.shots > .shot:nth-child(2) {
  align-self: start;
}
@media (max-width: 799px) {
  .shots {
    grid-template-columns: 1fr;
  }
}
.viewer {
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: #07080d;
}
.viewer::backdrop {
  background: rgba(4, 5, 10, 0.86);
}
.viewer img {
  max-width: 96vw;
  max-height: 94vh;
  width: auto;
}
.viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: rgba(10, 11, 18, 0.85);
  color: var(--ink);
  font-weight: 600;
}

/* Ranking. */
.rk-formula {
  margin: 18px 0 14px;
  color: var(--muted);
  font: 13.5px/1.5 var(--mono);
}
.rk-formula b {
  font-weight: 600;
}
.rel {
  color: var(--chapter);
}
.rec {
  color: var(--cyan);
}
.rk-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rk-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 180px 62px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}
.rk-t {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 560;
  font-size: 15px;
}
.rk-nums {
  display: flex;
  gap: 14px;
  color: var(--faint);
  font: 12px/1.3 var(--mono);
  white-space: nowrap;
}
.rk-bars {
  display: flex;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.rk-bars i {
  display: block;
  height: 100%;
  transition: width 0.35s var(--ease);
}
.rk-bars .rel {
  background: var(--chapter);
}
.rk-bars .rec {
  background: var(--cyan);
}
.rk-score {
  color: var(--ink);
  font: 600 13px/1 var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 899px) {
  .rk-list li {
    grid-template-columns: 22px minmax(0, 1fr) 62px;
  }
  .rk-nums {
    grid-column: 2;
    grid-row: 2;
  }
  .rk-bars {
    grid-column: 2 / 4;
    grid-row: 3;
  }
  .rk-score {
    grid-column: 3;
    grid-row: 1;
  }
}

/* Keys. */
.keys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keys li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 18, 28, 0.6);
  color: var(--text);
  font-size: 15px;
}
.caps {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--faint);
}
.caps kbd {
  font-size: 12.5px;
  min-width: 2em;
}
.keys-note {
  margin-top: 18px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 15.5px;
}
@media (max-width: 899px) {
  .keys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 559px) {
  .keys {
    grid-template-columns: 1fr;
  }
}

/* Export. */
.ex {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ex-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.7);
}
.ex-facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.ex-facts li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.ex-facts b {
  color: var(--chapter);
  font: 600 11.5px/1.9 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 899px) {
  .ex {
    grid-template-columns: 1fr;
  }
}

/* Setup wizard. */
.wz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}
.cfg p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}
.cfg .micro {
  margin-bottom: 8px;
}
.wz-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wz-steps li,
.first li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
}
.wz-steps .n,
.first .n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--chapter) 50%, transparent);
  border-radius: 10px;
  color: var(--chapter);
  font: 650 14px/1 var(--mono);
}
.wz-steps strong {
  color: var(--ink);
}
.wz-steps p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 999px) {
  .wz {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Path mappings. */
.mp-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}
.mp-in label {
  display: grid;
  gap: 8px;
}
.mp-in select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.mp-rules {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}
.mp-rule {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.mp-rule.on {
  border-color: color-mix(in srgb, var(--chapter) 55%, transparent);
  background: color-mix(in srgb, var(--chapter) 7%, transparent);
}
.mp-rule .n {
  align-self: center;
  color: var(--chapter);
  font: 650 14px/1 var(--mono);
}
.mp-rule label {
  display: grid;
  gap: 6px;
}
.mp-rule input {
  height: 42px;
  font-size: 13.5px;
}
.mp-agents {
  align-self: center;
  color: var(--muted);
  font: 12.5px/1.3 var(--mono);
}
.mp-out {
  padding: 16px 18px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
}
.mp-path {
  margin: 8px 0 6px;
  overflow-wrap: anywhere;
}
.mp-path code {
  background: none;
  padding: 0;
  color: var(--chapter);
  font-size: 15.5px;
}
.mp-why {
  color: var(--muted);
  font-size: 14.5px;
}
.mp-presets {
  margin: 16px 0 0;
}
@media (max-width: 799px) {
  .mp-in {
    grid-template-columns: 1fr;
  }
  .mp-rule {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .mp-rule label,
  .mp-agents {
    grid-column: 2;
  }
}

/* Provenance. */
.pv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.pv-fields {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  overflow: hidden;
}
.pv-fields div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 18, 28, 0.7);
}
.pv-fields div:last-child {
  border: 0;
}
.pv-fields dt code {
  background: none;
  padding: 0;
  color: var(--chapter);
}
.pv-fields dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.pv-side {
  display: grid;
  gap: 10px;
  align-content: start;
}
.pv-side p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}
.keep,
.fr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.keep > div,
.fr li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
}
.keep h4,
.fr h4 {
  font-size: 17px;
  letter-spacing: -0.01em;
}
.keep p,
.fr p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.fr {
  margin-top: 0;
}
.fr li {
  display: grid;
  align-content: start;
}
.fr code {
  justify-self: start;
  margin-top: 14px;
}
@media (max-width: 899px) {
  .pv,
  .keep,
  .fr {
    grid-template-columns: 1fr;
  }
  .pv-fields div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Redaction. */
.rd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.rd-in {
  display: grid;
  gap: 8px;
  align-content: start;
}
.rd textarea {
  width: 100%;
  min-height: 300px;
  padding: 14px 16px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: 12.5px/1.6 var(--mono);
  resize: vertical;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.rd-out .micro {
  margin-bottom: 8px;
}
.rd-out .micro span {
  color: var(--chapter);
}
.rd-pre {
  min-height: 300px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
mark.secret {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(247, 118, 142, 0.18);
  color: var(--red);
  font-weight: 600;
}
.rd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.rd-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.rd-legend b {
  color: var(--red);
  font: 650 12px/1 var(--mono);
}
@media (max-width: 899px) {
  .rd {
    grid-template-columns: 1fr;
  }
  .rd textarea,
  .rd-pre {
    min-height: 220px;
  }
}

/* Network and forgetting. */
.fg2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.fg2 > div {
  display: grid;
  align-content: start;
  gap: 12px;
}
.fg2 p {
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 899px) {
  .fg2 {
    grid-template-columns: 1fr;
  }
}

/* Pipeline. */
.pl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.pl > li {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chapter) calc(4% + var(--i) * 3%), var(--panel)), var(--panel));
}
.pl > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 12px;
  height: 2px;
  background: var(--chapter);
  opacity: 0.6;
}
.pl h4 {
  margin: 8px 0 12px;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.pl ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 14.5px;
}
.pl-note {
  margin-top: 18px;
  max-width: 72ch;
  color: var(--text);
  font-size: 16px;
}
@media (max-width: 999px) {
  .pl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pl > li::after {
    display: none;
  }
}
@media (max-width: 599px) {
  .pl {
    grid-template-columns: 1fr;
  }
}

/* Recovery. */
.rc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.rc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 22px;
}
.rc-grid .micro {
  margin-bottom: 8px;
}
.rc-detect {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 16px;
}
.rc-does {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 15.5px;
}
.rc-does li::marker {
  color: var(--chapter);
  font-family: var(--mono);
}
.rc-says {
  padding: 14px 16px;
  border: 1px dashed var(--line2);
  border-radius: 12px;
  color: var(--text);
  font-size: 15.5px;
}
.rc-note,
.ex-prov {
  margin-top: 8px;
  color: var(--faint);
  font-size: 13.5px;
}
@media (max-width: 899px) {
  .rc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Suite and receipts. */
.su {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.su a {
  position: relative;
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 18px 44px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
  text-decoration: none;
  transition: border-color 0.15s;
}
.su a:hover {
  border-color: color-mix(in srgb, var(--chapter) 50%, transparent);
}
.su strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
}
.su span {
  color: var(--muted);
  font-size: 14.5px;
}
.su-go {
  position: absolute;
  top: 18px;
  right: 16px;
  color: var(--faint);
}
.su-go svg {
  width: 16px;
  height: 16px;
}
.rx {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rx li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
}
.rx b {
  display: block;
  color: var(--ink);
  font-size: 36px;
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rx strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 15px;
}
.rx span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 999px) {
  .su {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rx {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .su {
    grid-template-columns: 1fr;
  }
}


/* ---------- Summaries: chapter numbers, spec rows, chips ---------- */
.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(36px, 5vw, 56px) 0 0;
  border: 1px solid color-mix(in srgb, var(--chapter) 22%, var(--line));
  border-radius: var(--r4);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chapter) 7%, transparent), transparent);
  overflow: hidden;
}
.glance div,
.specs div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px 24px;
}
.glance div + div {
  border-left: 1px solid var(--line);
}
.glance dd,
.specs dd {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.glance dt,
.specs dt {
  color: var(--muted);
  font: 600 11.5px/1.45 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.glance div:first-child dd {
  color: var(--chapter);
}
.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
  border-block: 1px solid var(--line);
}
.specs div {
  padding: 18px 20px 18px 0;
}
.specs div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.specs dd {
  font-size: clamp(26px, 2.4vw, 34px);
  color: var(--chapter);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
}
.chips li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chapter);
  box-shadow: 0 0 8px var(--chapter);
}
@media (max-width: 899px) {
  .glance,
  .specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .glance div:nth-child(3) {
    border-left: 0;
  }
  .glance div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .specs div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .specs div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 479px) {
  .glance div {
    padding: 18px 16px;
  }
}

/* How the agents store sessions. */
.mix {
  margin: 0 0 22px;
}
.mix .micro {
  margin-bottom: 12px;
}
.mix-bar {
  display: flex;
  gap: 3px;
  height: 44px;
}
.mix-bar span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--k) 42%, transparent), color-mix(in srgb, var(--k) 22%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 60%, transparent);
  min-width: 34px;
}
.mix-bar b {
  color: #fff;
  font-size: 17px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}
.mix-key {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 20px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.mix-key strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
}
.mix-key i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--k);
}
.mix-key span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
@media (max-width: 899px) {
  .mix-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The three search modes, side by side. */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.modes li {
  padding: 20px 22px;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
}
.modes li.on {
  border-color: color-mix(in srgb, var(--chapter) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chapter) 10%, transparent), rgba(16, 18, 28, 0.6));
}
.modes h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.modes h4 span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chapter);
  color: var(--go-ink);
  font: 700 10.5px/1.6 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modes dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.modes dl div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
}
.modes dt {
  color: var(--faint);
  font: 600 11px/1.9 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modes dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
@media (max-width: 899px) {
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Robot-mode flags. */
.flags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.flags li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line2);
  border-top: 2px solid var(--chapter);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
}
.flags code {
  justify-self: start;
  color: var(--chapter);
  font-size: 14px;
}
.flags span {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
@media (max-width: 1099px) {
  .flags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 479px) {
  .flags {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Exit codes as tiles, colored by what to do next. */
.exits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.exits li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 0;
  border: 1px solid color-mix(in srgb, var(--x) 30%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--x) 7%, transparent);
}
.exits li:last-child {
  grid-column: 1 / -1;
}
.exits b {
  color: var(--x);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.exits li:last-child b {
  font-size: 18px;
}
.exits span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.x-ok {
  --x: #9ece6a;
}
.x-fix {
  --x: #e0af68;
}
.x-input {
  --x: #7dcfff;
}
.x-retry {
  --x: #7aa2f7;
}
.x-stop {
  --x: #f7768e;
}
.x-kind {
  --x: #bb9af7;
}
.exits-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13.5px;
}
.exits-key li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.exits-key i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--x);
}
@media (max-width: 559px) {
  .exits {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A day of scheduled index runs. */
.day {
  margin: 0 0 22px;
  padding: 22px 24px 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r4);
  background: rgba(16, 18, 28, 0.6);
}
.day .micro {
  margin-bottom: 18px;
}
.day .micro code {
  text-transform: none;
  letter-spacing: 0;
}
.day-track {
  position: relative;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(122, 162, 247, 0.05), rgba(125, 207, 255, 0.09), rgba(122, 162, 247, 0.05));
  box-shadow: inset 0 0 0 1px var(--line);
}
.day-track i {
  position: absolute;
  top: 16px;
  bottom: 16px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--chapter) 55%, transparent);
}
.day-track i.hour {
  top: 12px;
  bottom: 12px;
  background: var(--chapter);
}
.day-track i.full {
  top: 4px;
  bottom: 4px;
  width: 4px;
  margin-left: -2px;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}
.day-full {
  position: absolute;
  top: 50%;
  transform: translate(10px, -50%);
  padding: 4px 7px;
  border-radius: 6px;
  background: #1d1a14;
  box-shadow: 0 0 0 1px rgba(224, 175, 104, 0.45);
  color: var(--amber);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.day-hours {
  position: relative;
  height: 20px;
  margin-top: 8px;
}
.day-hours span {
  position: absolute;
  color: var(--faint);
  font: 500 11.5px/1 var(--mono);
  transform: translateX(-2px);
}
.day-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.day-key span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.day-key i {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--chapter);
}
.day-key i.f {
  width: 4px;
  background: var(--amber);
}
@media (max-width: 699px) {
  .day-hours span:nth-child(even) {
    display: none;
  }
  .day-track i:not(.hour):not(.full) {
    display: none;
  }
}

/* Where data can leave: one core, five gates. */
.nw2-core {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  border-radius: var(--r4);
  background: linear-gradient(90deg, rgba(158, 206, 106, 0.1), transparent 70%);
}
.nw2-core .micro {
  color: var(--green);
}
.nw2-core p:not(.micro) {
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 560;
}
.nw2-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chapter) 12%, transparent);
  color: var(--chapter);
}
.nw2-core .nw2-ico {
  background: rgba(158, 206, 106, 0.14);
  color: var(--green);
}
.nw2-ico svg {
  width: 22px;
  height: 22px;
}
.nw2-gates {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.nw2-gates::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -28px;
  height: 28px;
  border: 1px dashed var(--line3);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.nw2-gates li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line2);
  border-radius: var(--r3);
  background: rgba(16, 18, 28, 0.6);
}
.nw2-gates h4 {
  font-size: 16.5px;
}
.nw2-gates code {
  justify-self: start;
  font-size: 12.5px;
}
.nw2-gates p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 1099px) {
  .nw2-gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nw2-gates::before {
    display: none;
  }
  .nw2-gates {
    margin-top: 14px;
  }
}
@media (max-width: 559px) {
  .nw2-gates {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Install ---------- */
.install {
  --chapter: var(--blue);
  padding: clamp(80px, 11vw, 140px) 0 clamp(60px, 8vw, 100px);
  border-top: 1px solid var(--line);
  background: radial-gradient(900px 460px at 50% 0%, rgba(122, 162, 247, 0.1), transparent 70%);
}
.install-head {
  max-width: 760px;
  margin-bottom: 36px;
}
.install-head .lede {
  margin-top: 20px;
}
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.tabs {
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r4);
  background: rgba(16, 18, 28, 0.8);
}
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.tablist [role="tab"] {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}
.tablist [role="tab"][aria-selected="true"] {
  background: color-mix(in srgb, var(--chapter) 18%, var(--panel2));
  color: var(--ink);
}
.js .tabpanel[data-hidden] {
  display: none;
}
.tabpanel + .tabpanel {
  margin-top: 18px;
}
.js .tabpanel + .tabpanel {
  margin-top: 0;
}
.tabnote {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
}
.tabpanel .cmd pre {
  white-space: pre-wrap;
  word-break: break-all;
}
.first {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r4);
}
.first ol {
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.first code {
  background: none;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.first li p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}
.teach {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line2);
  border-radius: var(--r4);
  background: rgba(16, 18, 28, 0.7);
}
.teach > div > p {
  margin: 14px 0 22px;
  color: var(--text);
}
.teach-code pre {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
}
@media (max-width: 999px) {
  .install-grid,
  .teach {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 599px) {
  .teach {
    padding: 20px;
  }
  .tabs {
    padding: 14px;
  }
}
