:root {
  --canvas: #f7f2ef;
  --surface: #fffcfa;
  --sage: #a9c2b1;
  --sage-dark: #688577;
  --sage-deep: #1f2d27;
  --ink: #1f2d27;
  --muted: #3d4441;
  --line: #c5d4ca;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: Assistant, system-ui, sans-serif;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 226, 219, 0.65), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  line-height: 1.75;
  font-size: 1.0625rem;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -120px;
  z-index: 1000;
  background: var(--sage-deep);
  color: #fff;
  padding: 0.75rem 1.2rem;
  border-radius: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip-link:focus { top: 1rem; outline: 3px solid #fff; outline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
}

a { color: var(--sage-deep); }
img { max-width: 100%; height: auto; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 250, 0.94);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.bar {
  width: min(46rem, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.hub .bar,
.hub main { width: min(52rem, calc(100% - 2rem)); }

.nav-logo { height: 44px; width: auto; }

.bar nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

@media (max-width: 640px) {
  .bar { align-items: flex-start; }
  .bar nav {
    flex: 1 1 12rem;
    justify-content: flex-start;
  }
}

.bar nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
}

.btn {
  background: var(--sage-deep);
  color: #fff !important;
  border-radius: 0.7rem;
  padding: 0 1rem;
  user-select: none;
}
.btn:active { transform: translateY(1px); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #314840; }
  .guide:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(72, 92, 82, 0.08);
  }
}

main {
  width: min(46rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.crumbs a { font-weight: 700; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

.kicker {
  color: var(--sage-dark);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  line-height: 1.25;
  font-weight: 800;
  margin: 0.35rem 0 0.85rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--muted);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.toc {
  margin: 1.75rem 0 0.5rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.45rem;
}
.toc ol { margin-inline-start: 1.2rem; }
.toc a { font-weight: 700; }

.prose h2 {
  font-size: 1.45rem;
  line-height: 1.35;
  margin: 2.1rem 0 0.7rem;
  text-wrap: balance;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.45rem;
}
.prose p,
.prose li { margin-bottom: 0.85rem; }
.prose ul,
.prose ol { margin: 0.4rem 0 1rem; padding-inline-start: 1.25rem; }
.prose li { margin-bottom: 0.45rem; }
.prose strong { font-weight: 800; }

.note {
  margin: 1.25rem 0;
  padding: 0.95rem 1.05rem;
  background: #ebf0ed;
  border-inline-start: 4px solid var(--sage-dark);
  border-radius: 0.7rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  font-size: 0.98rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
}
th, td {
  text-align: start;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: #ebf0ed; font-weight: 800; }
tr:last-child td { border-bottom: 0; }

.faq { margin-top: 2rem; }
.faq h2 { font-size: 1.45rem; margin-bottom: 0.75rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.35rem 0.95rem;
  margin-bottom: 0.55rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}
.faq details p { margin: 0.35rem 0 0.8rem; }

.cta {
  margin-top: 2rem;
  padding: 1.15rem 1.2rem;
  background: var(--sage-deep);
  color: #f7f2ef;
  border-radius: 1rem;
}
.cta h2 { font-size: 1.25rem; margin-bottom: 0.45rem; }
.cta p { margin-bottom: 0.85rem; }
.cta a { color: #fff; font-weight: 800; }

.related { margin-top: 2rem; }
.related h2 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.related ul { list-style: none; }
.related li { margin-bottom: 0.55rem; }
.related a { font-weight: 800; }

.hub-lead { margin: 0.5rem 0 1.5rem; color: var(--muted); font-size: 1.12rem; }

.guides {
  display: grid;
  gap: 0.8rem;
}
.guide {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  touch-action: manipulation;
}
.guide .kicker { margin-bottom: 0.25rem; }
.guide h2 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.guide p { color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 0.45rem;
}
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .guide { transition: none; }
}
