:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --sub: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #14b8a6;
  --accent-ink: #0f766e;
  --line: #e2e8f0;
  --r: 12px;
  --sh1: 0 1px 2px rgba(0, 0, 0, 0.06);
  --sh2: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }

p {
  margin: 0 0 16px;
  max-width: 70ch;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  z-index: 100;
}

.site-hdr {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--r);
  background: var(--ink);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r);
}

.nav-link:hover, .nav-link.is-active {
  color: var(--primary);
  background: var(--bg);
}

.sec {
  padding: 48px 0;
}

.sec-stage {
  padding: 24px 0 48px;
}

.sec-alt {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stage-intro {
  margin-bottom: 16px;
}

.stage-intro h1 {
  margin-bottom: 8px;
}

.stage-lead, .muted-lead {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 0;
}


.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline[aria-pressed="true"], .btn-outline[data-gf-liked] {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.dossier-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh2);
  padding: 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 4px 12px;
  border-radius: var(--r);
  margin-bottom: 12px;
}

.split-showcase {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 32px;
  align-items: center;
}

.check-list {
  margin: 16px 0 0;
  padding-left: 24px;
}

.check-list li {
  margin-bottom: 8px;
  max-width: 70ch;
}

.split-fig {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}

.split-fig figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.sec-narrow-head {
  margin-bottom: 24px;
}

.axis-ledger {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.axis-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--sh1);
}

.axis-tag {
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.axis-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.axis-tag h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.axis-latin {
  font-size: 14px;
  color: var(--muted);
}

.axis-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--bg);
  padding: 12px 16px;
  border-radius: var(--r);
}


.method-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  counter-reset: step;
}

.method-item {
  counter-increment: step;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  position: relative;
}

.method-item::before {
  content: "0" counter(step);
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.counter-callout {
  margin-top: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.counter-callout p {
  margin-bottom: 0;
  color: var(--muted);
}

.prose-wrap h2 {
  margin-top: 32px;
}

.prose-wrap h2:first-child {
  margin-top: 0;
}

.prose-wrap ul, .prose-wrap ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.prose-wrap li {
  margin-bottom: 8px;
  max-width: 70ch;
}

.prose-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.prose-wrap th, .prose-wrap td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.prose-wrap th {
  background: var(--bg);
  font-weight: 700;
}

.crumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 24px;
}

.faq-item summary {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-ans {
  margin-top: 12px;
  color: var(--muted);
}

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

.sec-head-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.engage-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.count-pill {
  font-size: 14px;
  color: var(--muted);
}

.share-toast, .form-msg {
  font-size: 14px;
  color: var(--accent-ink);
  font-weight: 600;
}

.comment-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--sh1);
}

.comment-form {
  margin-bottom: 24px;
}

.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--r);
  margin-bottom: 12px;
  font-size: 14px;
}

.comment-form[data-gf-replying] .reply-banner {
  display: flex;
}

.form-row {
  margin-bottom: 12px;
}

.field-label span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.field-label input, .field-label textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.empty-comments {
  display: none;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.comments-list[data-gf-empty] .empty-comments {
  display: block;
}

.c-item {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.c-item[data-gf-owner] {
  background: #f0fdfa;
  padding: 16px;
  border-radius: var(--r);
}

.c-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.c-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r);
}

.c-time, .c-to {
  color: var(--muted);
}

.c-replies {
  padding-left: 16px;
  border-left: 2px solid var(--line);
  margin-top: 8px;
}

.site-ftr {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 48px 0;
}

.ftr-in {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ftr-note, .ftr-copy {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.ftr-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .wrap { padding: 0 16px; }
  .hdr-row { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .dossier-shell { padding: 16px; }
  .split-showcase, .axis-row, .axis-pair, .method-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .axis-tag {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 12px;
  }
  .counter-callout {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary, .btn-outline {
    width: 100%;
  }
}
