:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #5f5b53;
  --line: #e6e2d9;
  --accent: #c2410c;
  --accent-soft: #fff1e8;
  --ok: #15803d;
  --bad: #b91c1c;
  --code: #f3f0ea;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1d1b18;
    --text: #f2efe9;
    --muted: #a8a296;
    --line: #34302a;
    --accent: #fb923c;
    --accent-soft: #2a1d14;
    --ok: #4ade80;
    --bad: #f87171;
    --code: #24221e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.lang {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.lang:hover { color: var(--text); border-color: var(--muted); }

/* Hero */
.hero { padding: 48px 0 8px; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.pron { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

.definition {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
}
.definition strong { color: var(--accent); }
.definition .pos { color: var(--muted); font-style: italic; font-weight: 400; }

/* Sections */
section { padding: 36px 0 4px; }
h2 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Listing demo */
.demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 10px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.card-title {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
  margin: 0 0 10px;
}
.fields { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.fields li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px dashed var(--line);
}
.fields li:first-child { border-top: 0; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--accent);
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}
.stat p:last-child { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Steps */
.steps { margin: 0 0 14px; padding-left: 22px; }
.steps li { margin: 0 0 10px; padding-left: 4px; }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* Comparison */
.compare { display: grid; gap: 10px; margin: 8px 0 14px; }
.compare .row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.compare .row.hl { border-color: var(--accent); background: var(--accent-soft); }
.compare .term { font-weight: 700; }
.compare p { margin: 0; font-size: 15px; }

/* Callout */
.note {
  background: var(--code);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  margin: 0 0 14px;
}

/* FAQ */
details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: outside;
}
details p { margin: 10px 0 0; }

/* Citation */
.cite {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--code);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  margin: 0 0 14px;
}

/* Footer */
footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
footer p { margin: 0 0 6px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 32px; }
  .definition { font-size: 17px; padding: 16px 18px; }
  .demo, .stats { grid-template-columns: 1fr; }
  .compare .row { grid-template-columns: 1fr; gap: 4px; }
}
