:root {
  --bg: #F7F5EF;
  --surface: #FFFFFF;
  --ink: #1A1D1C;
  --ink-soft: #5A615E;
  --accent: #156B66;
  --accent-soft: #E4EFEE;
  --rule: #E2DED3;
  --rule-strong: #CBC4B2;
  --warn-bg: #FDF6E3;
  --warn-rule: #E8D9A8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141716;
    --surface: #1C201F;
    --ink: #ECEAE3;
    --ink-soft: #A2A9A6;
    --accent: #5CC3BC;
    --accent-soft: #1E2B2A;
    --rule: #2C3130;
    --rule-strong: #454C4A;
    --warn-bg: #262117;
    --warn-rule: #4A4028;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

header.masthead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 8px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.updated {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}

/* Two independent axes, stacked: language on top, section below.
   Each row is its own labelled <nav>, so the active item in one axis never
   competes with the active item in the other. */
.navstack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 0;
}

.langbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.navstack .langbar { margin: 0; }

.langbar a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Active item: filled + bolder, never colour alone.
   Matches both aria-current="page" (section axis) and "true" (language axis). */
.langbar a[aria-current] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 600;
}

/* The section row sits a step heavier than the language row, so the two
   axes read as two different kinds of choice rather than one list of four. */
.langbar--section a {
  color: var(--ink);
  border-color: var(--rule-strong);
  font-weight: 600;
}

.langbar--section a[aria-current] {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.langbar--footer a {
  font-size: 13px;
  padding: 4px 12px;
}

h2 {
  font-size: 20px;
  margin: 40px 0 10px;
  letter-spacing: -.01em;
  scroll-margin-top: 20px;
}

h3 {
  font-size: 16px;
  margin: 24px 0 6px;
}

p, li { color: var(--ink); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--accent); }

.lede {
  font-size: 17px;
  color: var(--ink-soft);
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 16px;
}

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-rule);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 15px;
}

.tablewrap { overflow-x: auto; margin: 0 0 16px; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

th {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 5px;
}

footer p { margin: 0 0 14px; }

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 14px;
}

.steps { counter-reset: s; list-style: none; padding: 0; }

.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
