:root {
  --is-dark: 1;
  --bg: #0b0f14;
  --surface: #121821;
  --border: #1f2935;
  --text: #e6edf3;
  --muted: #8b9aad;
  --faint: #5c6b7d;
  --accent: #34d399;
  --accent-dim: #1f6f52;
  --redact: #26313e;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --is-dark: 0;
    --bg: #fbfcfd;
    --surface: #ffffff;
    --border: #e3e8ee;
    --text: #141a21;
    --muted: #5c6a7a;
    --faint: #8392a3;
    --accent: #0f8f63;
    --accent-dim: #a8e6cd;
    --redact: #ccd4dd;
  }
}

:root[data-theme="light"] {
  --is-dark: 0;
  --bg: #fbfcfd;
  --surface: #ffffff;
  --border: #e3e8ee;
  --text: #141a21;
  --muted: #5c6a7a;
  --faint: #8392a3;
  --accent: #0f8f63;
  --accent-dim: #a8e6cd;
  --redact: #ccd4dd;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 96px 16px 96px;
}

.mono { font-family: var(--mono); }

/* hero */

.tag {
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.5rem, 10vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
  font-weight: 700;
}

.lede {
  font-size: 1.14rem;
  margin: 0 0 14px;
  max-width: 33em;
}

.lede.dim { color: var(--muted); }

/* dossier */

.dossier {
  margin: 52px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 13.5px;
}

.dossier div {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
}

.dossier span {
  flex: 0 0 7.5em;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.dossier b {
  font-weight: 500;
  color: var(--text);
}

.redact {
  background: var(--redact);
  color: transparent !important;
  border-radius: 2px;
  user-select: none;
  letter-spacing: -0.08em;
}

/* sections */

section { margin-top: 58px; }

h2 {
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
}

h3 {
  font-size: 1.02rem;
  margin: 30px 0 8px;
}

p { margin: 0 0 17px; }

.quiet {
  font-size: 14.5px;
  color: var(--faint);
  font-style: italic;
}

.finds {
  list-style: none;
  margin: 22px 0 18px;
  padding: 0;
}

.finds li {
  border-left: 2px solid var(--border);
  padding: 1px 0 1px 20px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  transition: border-color .15s;
}
.finds li:hover { border-left-color: var(--accent); color: var(--text); }

.rules {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  font-size: 15.5px;
}

.rules li {
  padding: 9px 0 9px 26px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.rules li:last-child { border-bottom: 0; }
.rules li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

.stack {
  font-size: 12.5px;
  color: var(--faint);
  line-height: 2;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  letter-spacing: 0.01em;
}

footer {
  margin-top: 80px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--faint);
}
footer p { margin: 0 0 8px; }
footer p:last-child { margin: 0; }

/* theme toggle */

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--faint);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-dim); }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .wrap { padding-top: 64px; }
  .dossier div { flex-direction: column; gap: 2px; padding: 9px 0; }
  .dossier span { flex: none; }
}
