/* yegg — design system adapted from embroidery.io's editorial expedition */

:root {
  --paper-100: #fff7f5;
  --paper-200: #f8e8ee;
  --blush-200: #f8e8ee;
  --lavender-300: #e6c2f7;
  --burgundy-500: #5e2234;
  --burgundy-700: #391421;
  --cobalt-500: #367de2;
  --sky-300: #bbdffe;
  --mint-300: #b7dfcd;
  --acid-300: #d8d446;
  --ink-400: #9d9aaa;

  --bg: var(--lavender-300);
  --fg: var(--burgundy-500);
  --accent: var(--cobalt-500);
  --edge: color-mix(in srgb, currentColor 20%, transparent);

  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper-100);
  color: var(--burgundy-500);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 60;
  transform: translateY(-10rem);
  background: var(--paper-100); color: var(--burgundy-500);
  padding: 0.75rem 1.25rem; text-decoration: none; font-size: 0.875rem;
  transition: transform 0.15s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- expedition scaffolding ---------- */

.expedition {
  position: relative;
  height: 790svh;               /* scroll runway for 5 chapters */
  background: var(--bg);
  color: var(--fg);
  transition: background-color 0.6s var(--ease-out), color 0.6s var(--ease-out);
}
.expedition[data-tone="dark"] { color: var(--paper-100); }

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100svh;
  pointer-events: none;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5.25rem;
  margin: 0 1.5rem;
  border-bottom: 1px solid var(--edge);
}
@media (min-width: 768px) {
  .expedition { height: 840svh; }
  .site-header { height: 7rem; margin: 0 3.5rem; }
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s var(--ease-out);
}
@media (min-width: 768px) { .wordmark { font-size: 1.875rem; } }
.wordmark:hover { opacity: 0.7; }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}
@media (min-width: 768px) { .nav-desktop { display: flex; } }
@media (min-width: 1024px) { .nav-desktop { gap: 2rem; } }

.nav-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.375rem;
  transition: opacity 0.15s var(--ease-out);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.nav-link:hover { opacity: 0.6; }

.nav-item { position: relative; }
.learn-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 13rem;
  padding: 0.75rem;
  background: var(--paper-100);
  color: var(--burgundy-500);
  border: 1px solid rgba(94, 34, 52, 0.25);
  border-radius: 0.25rem;
  box-shadow: 0 8px 24px rgba(57, 20, 33, 0.12);
}
.learn-menu a {
  color: inherit;
  text-decoration: none;
  padding: 0.375rem 0.5rem;
  border-radius: 0.125rem;
  font-size: 0.8125rem;
}
.learn-menu a:hover { background: var(--blush-200); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.nav-mobile {
  position: absolute;
  z-index: 29;
  top: 5.25rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  background: var(--paper-100);
  color: var(--burgundy-500);
  border: 1px solid rgba(94, 34, 52, 0.25);
  border-radius: 0.25rem;
}
.nav-mobile a {
  color: inherit;
  text-decoration: none;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}
.nav-mobile a:hover { background: var(--blush-200); }

/* ---------- chapters ---------- */

.chapters { position: static; }

.chapter {
  position: absolute;
  z-index: 2;
  inset: 5.25rem 0 6rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.5rem;
  visibility: hidden;
  opacity: 0;
  outline: none;
  will-change: opacity, transform;
}
@media (min-width: 640px)  { .chapter { padding: 0 2rem; } }
@media (min-width: 1024px) { .chapter { padding: 0 4rem; } }
@media (min-width: 1280px) { .chapter { padding: 0 7rem; } }
@media (min-width: 768px)  { .chapter { inset: 7rem 0 8rem 0; } }

.chapter--right { align-items: flex-end; text-align: right; }

/* hero sits at the bottom of the viewport */
.chapter[data-chapter="0"] { justify-content: flex-end; padding-bottom: 1.5rem; }
@media (min-width: 768px) { .chapter[data-chapter="0"] { padding-bottom: 4rem; } }

.display {
  margin: 0;
  max-width: 68.75rem;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
@media (min-width: 640px) { .display { font-size: 3.75rem; } }
@media (min-width: 768px) {
  .display { font-size: clamp(2rem, min(7.8vw, 11svh), 7.75rem); }
  .chapter[data-chapter="0"] .display { font-size: clamp(2rem, min(6.8vw, 10svh), 6.75rem); }
}
@media (min-width: 768px) {
  .display--compact { font-size: clamp(1.5rem, min(10vw, 7svh), 7rem); }
}

.line { display: block; }
.w { display: inline-block; }
.em { color: var(--accent); font-weight: 400; }

.lede {
  margin: 1.5rem 0 0;
  max-width: 23rem;
  font-size: 0.75rem;
  line-height: 1.625;
}
@media (min-width: 768px) {
  .lede { margin-top: 2rem; max-width: 29.5rem; font-size: 0.875rem; line-height: 2; }
}

::selection { background: var(--cobalt-500); color: var(--paper-100); }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--edge);
  font-size: 0.75rem;
}
@media (min-width: 768px) {
  .site-footer { margin-top: 2.5rem; gap: 1rem; padding-top: 1.5rem; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.375rem 0.75rem; }
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s var(--ease-out);
}
.footer-links a:hover { opacity: 0.6; }

/* ---------- contact card ---------- */

.contact-card {
  position: fixed;
  z-index: 20;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.25rem;
  padding: 0.375rem;
  background: var(--paper-100);
  color: var(--burgundy-500);
  border: 1px solid rgba(94, 34, 52, 0.25);
  border-radius: 0.25rem;
}
@media (min-width: 768px) {
  .contact-card { left: auto; right: 3.5rem; bottom: 1.75rem; width: 27.5rem; }
}

.contact-row { display: flex; gap: 0.5rem; }
.contact-row input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--burgundy-500);
  background: transparent;
  border: 1px solid rgba(94, 34, 52, 0.28);
  border-radius: 0.375rem;
  transition: border-color 0.2s;
}
@media (min-width: 768px) { .contact-row input { font-size: 0.875rem; } }
.contact-row input::placeholder { color: rgba(94, 34, 52, 0.45); }
.contact-row input:hover { border-color: rgba(94, 34, 52, 0.45); }
.contact-row input:focus { outline: none; border-color: var(--burgundy-500); }

.cta {
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--burgundy-500);
  background: var(--mint-300);
  border: 0;
  border-radius: 0.125rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out);
}
.cta:hover { background: var(--acid-300); }
.cta:focus-visible { outline: 2px solid var(--burgundy-500); outline-offset: 2px; }

.contact-thanks {
  margin: 0;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
}

/* ---------- reduced motion / no-js fallback ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .expedition { height: auto; }
  .stage { position: static; height: auto; }
  #field { display: none; }
  .chapter {
    position: relative;
    inset: auto;
    min-height: 70svh;
    visibility: visible;
    opacity: 1;
  }
  .w, .lede { opacity: 1 !important; transform: none !important; transition: none; }
  .expedition { transition: none; }
  .chapter[data-chapter="1"],
  .chapter[data-chapter="3"] { background: var(--burgundy-700); color: var(--paper-100); }
  .chapter[data-chapter="1"] { --accent: var(--mint-300); }
  .chapter[data-chapter="2"] { background: var(--sky-300); }
  .chapter[data-chapter="3"] { --accent: var(--acid-300); }
  .chapter[data-chapter="4"] { background: var(--mint-300); }
}

/* ---------- inner pages ---------- */

.page-hero {
  position: relative;
  overflow: clip;
  margin: 0 1.5rem;
}
@media (min-width: 768px) { .page-hero { margin: 0 3.5rem; } }

.page-hero .field-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 45%, transparent 96%);
  mask-image: linear-gradient(to bottom, black 45%, transparent 96%);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 34svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 3rem;
}
@media (min-width: 768px) { .page-hero-inner { min-height: 42svh; padding-bottom: 4rem; } }

.page-title {
  margin: 0;
  max-width: 60rem;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
@media (min-width: 640px) { .page-title { font-size: 3.5rem; } }
@media (min-width: 768px) { .page-title { font-size: clamp(2rem, min(5.6vw, 8svh), 5rem); } }
.page-title .em { color: var(--cobalt-500); font-weight: 400; }

.page-content {
  padding: 0 1.5rem 8rem;
}
@media (min-width: 768px) { .page-content { padding: 0 3.5rem 10rem; } }
@media (min-width: 1280px) { .page-content { padding: 0 7rem 10rem; } }

.block {
  border-top: 1px solid rgba(94, 34, 52, 0.2);
  padding: 2.25rem 0 3rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .block { grid-template-columns: 14rem 1fr; gap: 2.5rem; padding: 3rem 0 4rem; }
}

.block-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.block-body { max-width: 42rem; }
.block-body h2 {
  margin: 0 0 1.25rem;
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
@media (min-width: 768px) { .block-body h2 { font-size: 2.25rem; } }
.block-body p, .block-body li {
  font-size: 0.875rem;
  line-height: 1.9;
  margin: 0 0 1rem;
  color: rgba(94, 34, 52, 0.85);
}
.block-body p:last-child { margin-bottom: 0; }
.block-body ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.block-body a { color: inherit; text-underline-offset: 0.25rem; }
.block-body a:hover { opacity: 0.6; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.125rem 0;
  border-top: 1px solid rgba(94, 34, 52, 0.2);
  text-decoration: none;
  color: inherit;
}
.row:last-child { border-bottom: 1px solid rgba(94, 34, 52, 0.2); }
.row-title {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
@media (min-width: 768px) { .row-title { font-size: 1.5rem; } }
a.row:hover .row-title { text-decoration: underline; text-underline-offset: 0.3rem; }
.row-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: rgba(94, 34, 52, 0.65);
}

.principles { display: grid; gap: 2rem; counter-reset: p; }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.principle::before {
  counter-increment: p;
  content: counter(p, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--cobalt-500);
}
.principle h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.principle p { margin: 0; font-size: 0.875rem; line-height: 1.8; color: rgba(94, 34, 52, 0.85); }

.page-footer { padding: 0 1.5rem 7rem; }
@media (min-width: 768px) { .page-footer { padding: 0 3.5rem 8rem; } }
@media (min-width: 1280px) { .page-footer { padding: 0 7rem 8rem; } }
.page-footer .site-footer { margin-top: 0; }

.note {
  font-size: 0.75rem !important;
  color: rgba(94, 34, 52, 0.55) !important;
  line-height: 1.7 !important;
}

/* ================= fx layer ================= */

/* ---------- page wipe: console nav transition ---------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  visibility: hidden;
}
.wipe.is-active { visibility: visible; }

.wipe-panel {
  position: absolute;
  inset: -2px;
  transform: translateY(103%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 247, 245, 0.04) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 55%, #4a1a2c 0%, var(--burgundy-700) 65%);
}
/* gradient seams at both edges — reads as the panel's leading/trailing edge */
.wipe-panel::before,
.wipe-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cobalt-500) 30%, var(--lavender-300) 50%, var(--cobalt-500) 70%, transparent);
  opacity: 0.9;
}
.wipe-panel::before { top: 0; }
.wipe-panel::after { bottom: 0; }

/* faint concentric tunnel rings breathing behind the status line */
.wipe-rings {
  position: absolute;
  inset: -10%;
  background: repeating-radial-gradient(circle at 50% 56%, rgba(230, 194, 247, 0.07) 0 1px, transparent 1px 72px);
  animation: wipe-zoom 1.8s linear infinite;
}
@keyframes wipe-zoom { to { transform: scale(1.08); } }

.wipe-status {
  position: relative;
  display: block;
  width: min(24rem, 78vw);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--mint-300);
  transition: opacity 0.18s var(--ease-out);
}
.wipe-line { display: block; margin-bottom: 0.875rem; white-space: nowrap; overflow: hidden; }
.wipe-ps1 { color: var(--acid-300); }
.wipe-caret { color: var(--mint-300); animation: wipe-caret 0.9s steps(2, start) infinite; }
@keyframes wipe-caret { 50% { opacity: 0; } }

.wipe-bar {
  display: block;
  height: 3px;
  background: rgba(255, 247, 245, 0.14);
  overflow: hidden;
}
.wipe-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cobalt-500), var(--mint-300));
  transition: width 0.55s cubic-bezier(0.3, 0.8, 0.4, 1);
}

/* choreography: out = slide up to cover, in = covering on arrival, leaving = exits top */
.is-out .wipe-panel { transform: translateY(0); transition: transform 0.46s cubic-bezier(0.76, 0, 0.24, 1); }
.is-in .wipe-panel { transform: translateY(0); transition: none; }
.is-in.is-leaving .wipe-panel { transform: translateY(-103%); transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1); }
.is-leaving .wipe-status { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .wipe { display: none; } }

/* ---------- scroll reveals ---------- */
.rv { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- ops feed ---------- */
.ops {
  border: 1px solid rgba(94, 34, 52, 0.3);
  border-radius: 0.375rem;
  background: var(--burgundy-700);
  color: var(--paper-100);
  overflow: hidden;
}
.ops-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid rgba(255, 247, 245, 0.14);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgba(255, 247, 245, 0.7);
}
.ops-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--mint-300);
  animation: ops-pulse 1.6s ease-in-out infinite;
}
@keyframes ops-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.ops-body {
  padding: 0.75rem 0.875rem 0.875rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  line-height: 1.85;
  min-height: 16.5rem;
}
@media (min-width: 768px) { .ops-body { font-size: 0.75rem; } }
.ops-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 247, 245, 0.82); }
.ops-dim { color: rgba(255, 247, 245, 0.42); }
.ops-warn { color: var(--acid-300); }
.ops-crit { color: #ff8a94; }
.ops-ok { color: var(--mint-300); }

/* ---------- terminal ---------- */
.term {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(23, 10, 16, 0.82);
  backdrop-filter: blur(6px);
}
.term-body {
  width: min(46rem, 100%);
  max-height: min(34rem, 82svh);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(183, 223, 205, 0.35);
  border-radius: 0.375rem;
  background: #170a10;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 0 120px rgba(94, 34, 52, 0.35);
  overflow: hidden;
}
.term-out {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.125rem 0.25rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--mint-300);
  scrollbar-width: thin;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-dim { color: rgba(183, 223, 205, 0.5); }
.term-warn { color: var(--acid-300); }
.term-crit { color: #ff8a94; }
.term-ok { color: var(--mint-300); }
.term-ps1-line { color: #bbdffe; }
.term-form {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
}
.term-ps1 { color: var(--acid-300); white-space: nowrap; }
.term-in {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font: inherit;
  color: var(--paper-100);
  caret-color: var(--mint-300);
}
.term-hint {
  margin: 0.5rem 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.625rem;
  color: rgba(255, 247, 245, 0.4);
  text-align: center;
}

/* ---------- depth gauge (home) ---------- */
.depth {
  position: absolute;
  z-index: 10;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  opacity: 0.55;
  pointer-events: none;
}
@media (min-width: 1024px) { .depth { display: flex; } }
.depth-bar {
  width: 1px;
  height: 6rem;
  background: currentColor;
  opacity: 0.35;
  position: relative;
  overflow: hidden;
}
.depth-bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(0);
  display: block;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid rgba(94, 34, 52, 0.2);
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid rgba(94, 34, 52, 0.2);
}
.stat:nth-child(-n + 2) { border-top: 0; }
@media (min-width: 768px) {
  .stat { border-top: 0; border-left: 1px solid rgba(94, 34, 52, 0.2); }
  .stat:first-child { border-left: 0; }
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .stat-num { font-size: 2.625rem; } }
.stat-label { display: block; margin-top: 0.375rem; font-size: 0.75rem; color: rgba(94, 34, 52, 0.6); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  border: 1px solid rgba(94, 34, 52, 0.3);
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.03em;
  color: rgba(94, 34, 52, 0.75);
}

/* ---------- accordions ---------- */
.acc { border-top: 1px solid rgba(94, 34, 52, 0.2); }
.acc:last-of-type { border-bottom: 1px solid rgba(94, 34, 52, 0.2); }
.acc-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 1.5rem;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.acc-title { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 0.75rem; }
@media (min-width: 768px) { .acc-title { font-size: 1.5rem; } }
.acc-title::after {
  content: "+";
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--cobalt-500);
  transition: transform 0.25s var(--ease-out);
}
.acc[data-open] .acc-title::after { transform: rotate(45deg); }
.acc-meta { display: flex; gap: 1.25rem; font-size: 0.75rem; color: rgba(94, 34, 52, 0.65); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease-out); }
.acc[data-open] .acc-panel { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-inner > div { padding: 0 0 1.75rem; max-width: 42rem; }
.acc-inner p, .acc-inner li { font-size: 0.875rem; line-height: 1.9; margin: 0 0 1rem; color: rgba(94, 34, 52, 0.85); }

/* ---------- cards ---------- */
.cards { display: grid; gap: 0; border: 1px solid rgba(94, 34, 52, 0.2); }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid rgba(94, 34, 52, 0.2);
}
.card:first-child { border-top: 0; }
@media (min-width: 768px) {
  .card { border-top: 0; border-left: 1px solid rgba(94, 34, 52, 0.2); }
  .card:first-child { border-left: 0; }
}
.card h3 { margin: 0 0 0.75rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.03em; }
.card p { margin: 0; font-size: 0.8125rem; line-height: 1.8; color: rgba(94, 34, 52, 0.8); }
.card .card-tag {
  display: block;
  margin-bottom: 0.875rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  color: var(--cobalt-500);
}

/* ---------- timeline ---------- */
.tl { border-left: 1px solid rgba(94, 34, 52, 0.3); margin-left: 0.25rem; }
.tl-item { position: relative; padding: 0 0 2rem 1.75rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -0.28125rem;
  top: 0.375rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--cobalt-500);
}
.tl-time { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.625rem; letter-spacing: 0.05em; color: var(--cobalt-500); }
.tl-item h3 { margin: 0.375rem 0 0.5rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.03em; }
.tl-item p { margin: 0; font-size: 0.8125rem; line-height: 1.8; color: rgba(94, 34, 52, 0.8); }

/* ---------- stepper ---------- */
.stepper { counter-reset: step; border-top: 1px solid rgba(94, 34, 52, 0.2); }
.step {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(94, 34, 52, 0.2);
}
@media (min-width: 768px) { .step { grid-template-columns: 8rem 1fr 1fr; gap: 2rem; align-items: baseline; } }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--cobalt-500);
}
.step h3 { margin: 0; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; }
.step p { margin: 0; font-size: 0.875rem; line-height: 1.85; color: rgba(94, 34, 52, 0.85); }

/* ---------- mono / code ---------- */
.mono, code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
}
code { background: var(--blush-200); padding: 0.1em 0.35em; border-radius: 0.2em; }
.pre {
  margin: 1rem 0;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  background: var(--burgundy-700);
  color: var(--mint-300);
  border-radius: 0.375rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.75;
  white-space: pre;
}
.pre .c-dim { color: rgba(183, 223, 205, 0.45); }
.pre .c-key { color: #bbdffe; }
.pre .c-warn { color: var(--acid-300); }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(94, 34, 52, 0.2);
  border-bottom: 1px solid rgba(94, 34, 52, 0.2);
  padding: 0.625rem 0;
}
.marquee-track {
  display: inline-flex;
  gap: 2.5rem;
  white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(94, 34, 52, 0.5);
  animation: marquee 36s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- dark hero variant ---------- */
.page-hero[data-tone="dark"] { color: var(--paper-100); background: var(--burgundy-700); }
.page-hero[data-tone="dark"] .lede { color: rgba(255, 247, 245, 0.75); }
.page-hero[data-tone="dark"] .page-title .em { color: var(--mint-300); }
.page-hero[data-tone="sky"] { background: var(--sky-300); }
.page-hero[data-tone="mint"] { background: var(--mint-300); }
.page-hero[data-tone="lavender"] { background: var(--lavender-300); }
.page-hero .lede { color: rgba(94, 34, 52, 0.8); }

/* ---------- dark page sections ---------- */
.dark-band { background: var(--burgundy-700); color: var(--paper-100); margin: 0 -1.5rem; padding: 3rem 1.5rem; }
@media (min-width: 768px) { .dark-band { margin: 0 -3.5rem; padding: 4rem 3.5rem; } }
@media (min-width: 1280px) { .dark-band { margin: 0 -7rem; padding: 4rem 7rem; } }
.dark-band .block { border-top-color: rgba(255, 247, 245, 0.18); }
.dark-band .block-body p, .dark-band .block-body li { color: rgba(255, 247, 245, 0.8); }
.dark-band .block-label { color: rgba(255, 247, 245, 0.6); }

/* ---------- misc ---------- */
.nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.375rem; }
.btn-line {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(94, 34, 52, 0.35);
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s var(--ease-out);
}
.btn-line:hover { background: var(--blush-200); opacity: 1 !important; }
.kbd {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border: 1px solid rgba(94, 34, 52, 0.35);
  border-bottom-width: 2px;
  border-radius: 0.25rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
}
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.lede-sm { font-size: 0.8125rem; color: rgba(94, 34, 52, 0.7); margin-top: 0.5rem; }

/* word-level orbit choreography needs compositing */
.w { will-change: transform, opacity; }

/* ---------- mega footer (subpages) ---------- */
.mega-footer {
  background: var(--burgundy-500);
  color: var(--paper-100);
  padding: 4rem 1.5rem 2rem;
}
@media (min-width: 768px) { .mega-footer { padding: 5rem 3.5rem 2rem; } }
@media (min-width: 1280px) { .mega-footer { padding-left: 7rem; padding-right: 7rem; } }
.mega-top { display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 1024px) { .mega-top { flex-direction: row; justify-content: space-between; gap: 5rem; } }
.mega-wordmark {
  color: inherit;
  text-decoration: none;
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
  transition: opacity 0.15s var(--ease-out);
}
@media (min-width: 1024px) { .mega-wordmark { font-size: 3.75rem; } }
.mega-wordmark:hover { opacity: 0.7; }
.mega-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 1.5rem;
}
@media (min-width: 768px) { .mega-cols { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.mega-col { display: flex; flex-direction: column; gap: 0.75rem; }
.mega-col strong { margin-bottom: 0.75rem; font-size: 0.75rem; font-weight: 400; opacity: 0.5; }
.mega-col a {
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
  transition: opacity 0.15s var(--ease-out);
}
.mega-col a:hover { opacity: 0.6; }
.mega-footer small {
  display: block;
  margin-top: 4.5rem;
  border-top: 1px solid rgba(255, 247, 245, 0.2);
  padding-top: 1.5rem;
  font-size: 0.75rem;
  opacity: 0.65;
}
.mega-footer .kbd { border-color: rgba(255, 247, 245, 0.4); }

/* ---------- blog / post ---------- */
.readbar { position: fixed; inset: 0 auto auto 0; width: 100%; height: 2px; z-index: 90; pointer-events: none; }
.readbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cobalt-500), var(--signal, #ef4050)); transition: width 0.1s linear; }

.post-meta { font: 500 0.6875rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; margin-bottom: 1.25rem; }

.post { max-width: 44rem; margin: 0 auto; padding: 0 1.5rem 5rem; }
.post-lede { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.55; color: inherit; margin-bottom: 2rem; }
.post p { line-height: 1.75; margin-bottom: 1.25rem; color: rgba(57, 20, 33, 0.82); }
.post h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; margin: 2.5rem 0 1rem; color: var(--burgundy-700, #391421); }
.post h3 { font-size: 1.125rem; font-weight: 650; margin: 2rem 0 0.75rem; }
.post ul { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.post li { line-height: 1.7; margin-bottom: 0.6rem; color: rgba(57, 20, 33, 0.82); }
.post li::marker { color: var(--cobalt-500); }
.post .pre { margin: 1.75rem 0 2rem; border-radius: 0.5rem; }
.post code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: rgba(54, 125, 226, 0.08); padding: 0.1em 0.35em; border-radius: 0.25rem; }
.post em { font-style: italic; }
.post strong { font-weight: 700; }
.post a { color: var(--cobalt-500); text-decoration: underline; text-underline-offset: 0.2em; }
.post a:hover { color: var(--signal, #ef4050); }

.post-nav { display: flex; justify-content: space-between; gap: 1rem; max-width: 44rem; margin: 0 auto; padding: 0 1.5rem 6rem; }
.post-nav .btn-line { font-size: 0.8125rem; }

/* ---------- ops console sign-in ---------- */
.console-wrap { min-height: 100svh; display: flex; align-items: center; justify-content: center; position: relative; padding: 6rem 1.5rem; }
.console-wrap .field-ambient { position: fixed; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.console-card { position: relative; width: min(34rem, 100%); background: rgba(26, 9, 15, 0.92); border: 1px solid rgba(230, 194, 247, 0.18); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7); backdrop-filter: blur(6px); }
.console-titlebar { display: flex; align-items: center; gap: 0.45rem; padding: 0.7rem 1rem; border-bottom: 1px solid rgba(230, 194, 247, 0.12); }
.console-titlebar span { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: rgba(230, 194, 247, 0.25); }
.console-titlebar span:first-child { background: var(--signal, #ef4050); }
.console-titlebar em { margin-left: auto; font: 500 0.6875rem ui-monospace, monospace; font-style: normal; color: rgba(230, 194, 247, 0.5); letter-spacing: 0.08em; }
.console-body { padding: 1.25rem 1.25rem 1.5rem; font: 400 0.8125rem/1.7 ui-monospace, "SF Mono", Menlo, monospace; }
.con-line { margin-bottom: 0.35rem; }
.con-caret { animation: blink 1.1s steps(1) infinite; color: var(--mint-300, #b7dfcd); }
@keyframes blink { 50% { opacity: 0; } }
.con-label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(230, 194, 247, 0.55); }
.con-input { width: 100%; background: rgba(255, 247, 245, 0.05); border: 1px solid rgba(230, 194, 247, 0.2); color: var(--paper, #fff7f5); font: inherit; padding: 0.6rem 0.7rem; border-radius: 0.35rem; outline: none; }
.con-input:focus { border-color: var(--mint-300, #b7dfcd); }
.con-btn { margin-top: 1.1rem; width: 100%; background: var(--mint-300, #b7dfcd); color: #391421; border: 0; font: 600 0.8125rem/1 ui-monospace, monospace; padding: 0.75rem; border-radius: 0.35rem; cursor: pointer; transition: background 0.2s; }
.con-btn:hover { background: var(--acid-300, #d8d446); }
.console-out { margin-top: 1rem; min-height: 1rem; }
.console-out b { color: var(--sky-300, #bbdffe); font-weight: 600; }

/* ---------- changelog ---------- */
.log-entry { border-top: 1px solid rgba(94, 34, 52, 0.2); padding: 1.25rem 0; }
.log-entry:last-child { border-bottom: 1px solid rgba(94, 34, 52, 0.2); }
.log-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; }
.log-ver { font: 650 0.9375rem ui-monospace, monospace; color: var(--cobalt-500); }
.log-date { font: 500 0.6875rem ui-monospace, monospace; letter-spacing: 0.1em; color: rgba(57, 20, 33, 0.55); }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { line-height: 1.7; margin-bottom: 0.4rem; color: rgba(57, 20, 33, 0.8); padding-left: 1rem; position: relative; }
.log-list li::before { content: "+"; position: absolute; left: 0; color: var(--cobalt-500); font-family: ui-monospace, monospace; }
.log-list a { color: var(--cobalt-500); }
