:root {
  --bg: #eeeaf2;
  --paper: #f8f6fa;
  --ink: #242228;
  --muted: #5d5866;
  --accent: #8e2e57;
  --accent-soft: #f2dfe8;
  --line: #d7d0dd;
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 7vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

.wrap {
  width: min(100% - 2.25rem, 64rem);
  margin-inline: auto;
}

.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 1.1rem;
  margin-left: auto;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.page { padding-block: 2.2rem 3.2rem; }

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.05rem, 2.3vw, 1.28rem);
  max-width: 46rem;
  color: var(--muted);
}

.hero { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }

.section { margin-top: 2.6rem; }

.section-intro { max-width: 44rem; color: var(--muted); }

.alpha {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.55rem;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.alpha span {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  line-height: 1;
  color: #a9a1b0;
}

.alpha span.on { color: var(--accent); font-weight: 700; }

.entries { list-style: none; margin: 1.4rem 0 0; padding: 0; }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.4rem 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.entry:last-child { border-bottom: 1px solid var(--line); }
.entry-term h3 { margin-bottom: 0.1rem; }
.pos { color: var(--muted); font-style: italic; font-size: 0.9rem; margin: 0; }
.entry-body p:last-child { margin-bottom: 0; }

.pairs { font-size: 0.92rem; color: var(--muted); }
.pairs strong { color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 1.1rem 1.2rem;
}

.card h3 { margin-bottom: 0.4rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.card-number {
  display: block;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.steps { list-style: none; padding: 0; margin-top: 1.4rem; counter-reset: step; }

.steps li {
  position: relative;
  padding: 0.4rem 0 1.1rem 3.1rem;
  border-left: 1px solid var(--line);
  margin: 0;
}

.steps li:last-child { border-left-color: transparent; }

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
}

.steps h3 { margin-bottom: 0.2rem; }
.steps p:last-child { margin-bottom: 0; }

.notice {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 1.4rem 0;
}

.notice p:last-child { margin-bottom: 0; }

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin-inline: 0.4rem; }

.doc-list { list-style: none; padding: 0; margin-top: 1.4rem; }

.doc-list li {
  margin: 0;
  border-top: 1px solid var(--line);
}

.doc-list li:last-child { border-bottom: 1px solid var(--line); }

.doc-list a {
  display: block;
  padding: 0.9rem 0;
  text-decoration: none;
  color: var(--ink);
}

.doc-list a:hover { color: var(--accent); }
.doc-list strong { display: block; font-family: var(--serif); font-size: 1.15rem; }
.doc-list small { color: var(--muted); }

dl.fields { margin: 1.4rem 0; }

dl.fields dt {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.9rem;
}

dl.fields dd { margin: 0.15rem 0 0; color: var(--muted); }

.code {
  display: block;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #29242d;
  color: #f7f0f5;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 1.2rem 0;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 1rem 0;
}

.status-row span {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.status-row b { color: var(--accent); font-weight: 400; }

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.6rem 0;
  max-width: 42rem;
}

.site-foot {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem 1.6rem;
  padding-block: 1.8rem 1rem;
}

.foot-col h2 {
  font-size: 0.82rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.foot-col ul { list-style: none; padding: 0; font-size: 0.87rem; }
.foot-col li { margin-bottom: 0.3rem; }
.foot-col a { color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--accent); text-decoration: underline; }

.foot-end {
  border-top: 1px solid var(--line);
  padding-block: 0.9rem 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .head-inner { justify-content: flex-start; }
  .site-nav { justify-content: flex-start; margin-left: 0; }
}

@media (max-width: 380px) {
  .wrap { width: min(100% - 1.5rem, 64rem); }
  .brand span { font-size: 1.2rem; }
  .foot-grid { gap: 1rem; }
}
