:root {
  --ink: #15211d;
  --ink-soft: #45554e;
  --paper: #eef1ee;
  --surface: #e2e8e2;
  --accent: #2f6b57;
  --accent-bright: #1f8f6f;
  --accent-wash: #dbe8e2;
  --line: #cdd6cc;
  --shadow: rgba(21, 33, 29, 0.08);

  --display: "Bricolage Grotesque", "IBM Plex Sans", sans-serif;
  --body: "IBM Plex Sans", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9efec;
    --ink-soft: #a9b8b1;
    --paper: #0f1613;
    --surface: #16201c;
    --accent: #5fbd9d;
    --accent-bright: #7bd6b4;
    --accent-wash: #1b2b25;
    --line: #253530;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --ink: #e9efec; --ink-soft: #a9b8b1; --paper: #0f1613; --surface: #16201c;
  --accent: #5fbd9d; --accent-bright: #7bd6b4; --accent-wash: #1b2b25;
  --line: #253530; --shadow: rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] {
  --ink: #15211d; --ink-soft: #45554e; --paper: #eef1ee; --surface: #e2e8e2;
  --accent: #2f6b57; --accent-bright: #1f8f6f; --accent-wash: #dbe8e2;
  --line: #cdd6cc; --shadow: rgba(21, 33, 29, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
::selection { background: var(--accent); color: var(--paper); }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.75rem;
  position: relative;
}

#ridge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 560px;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

em { font-style: normal; color: var(--accent); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

/* header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav { display: flex; gap: 1.6rem; }
.nav a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--accent); }

/* hero */
.hero {
  padding: 5.5rem 1.75rem 3.5rem;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.15rem);
  max-width: 15ch;
}
.lede {
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 1.4rem 0 0;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  margin: 2.1rem 0 2.8rem;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.hero-stats dt {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.hero-stats dd span {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-left: 0.2rem;
}

/* dividers -- ridgeline echo, small */
.divider {
  height: 34px;
  background:
    linear-gradient(135deg, transparent 49.3%, var(--line) 49.3%, var(--line) 50.7%, transparent 50.7%) 0 0/34px 34px,
    linear-gradient(45deg, transparent 49.3%, var(--line) 49.3%, var(--line) 50.7%, transparent 50.7%) 0 0/34px 34px;
  background-repeat: repeat-x;
  opacity: 0.55;
}
.divider.flip { transform: scaleY(-1); }

/* bands */
.band { padding: 4rem 0; position: relative; z-index: 1; }
.band.alt { background: var(--surface); }
.band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 22ch;
  margin-bottom: 1.1rem;
}
.prose p { max-width: 62ch; color: var(--ink-soft); }
.prose-p { max-width: 62ch; color: var(--ink-soft); margin-top: 0; }
.prose em { font-weight: 600; }

/* comparison table */
.table-wrap { overflow-x: auto; margin-top: 1.6rem; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.92rem;
  min-width: 480px;
}
table.compare th, table.compare td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
table.compare th {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
table.compare td.bad { color: #b1503f; }
table.compare td.good { color: var(--accent); font-weight: 500; }
table.compare .note { color: var(--ink-soft); font-weight: 400; }
.fine { font-size: 0.9rem; color: var(--ink-soft); max-width: 62ch; margin-top: 1.3rem; }

/* architecture list */
.arch-list {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem 2rem;
}
.arch-list li { border-top: 1px solid var(--line); padding-top: 1rem; }
.arch-list h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.arch-list p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--accent-wash);
  padding: 0.1em 0.35em;
}

/* stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin: 1.8rem 0 0;
  padding: 1.6rem 0 0;
  border-top: 1px solid var(--line);
}
.stat-grid dt { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.stat-grid dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

/* live panel */
.live-panel {
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  padding: 1.5rem;
  background: var(--surface);
}
.live-row { display: flex; align-items: center; gap: 0.65rem; font-family: var(--mono); font-size: 0.9rem; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-soft);
  flex-shrink: 0;
}
.live-dot.on { background: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-wash); }
.live-dot.off { background: #b1503f; }
.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin: 1.3rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.live-stats dt { font-size: 0.76rem; color: var(--ink-soft); margin-bottom: 0.25rem; }
.live-stats dd { margin: 0; font-family: var(--mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mono-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* plain lists */
.plain-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; max-width: 64ch; }
.plain-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--accent);
}

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 2.2rem 0 3rem; }
.foot-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  .nav { display: none; }
  .hero { padding-top: 4rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 1.1rem; }
}
