:root {
  color-scheme: light dark;
  --canvas: #f7f8f5;
  --surface: #ffffff;
  --ink: #203d4b;
  --muted: #65747b;
  --blue: #28586d;
  --pool: #3fa6c4;
  --sky: #d9eef5;
  --yellow: #f5c252;
  --yellow-soft: #fff0bb;
  --gold: #d89b2e;
  --line: rgba(32, 61, 75, 0.15);
  --shadow: 0 1.25rem 3.5rem rgba(32, 61, 75, 0.12);
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #14212a;
    --surface: #20313d;
    --ink: #f2f6f5;
    --muted: #b8c5c8;
    --blue: #a9d8e7;
    --sky: #263f4d;
    --yellow-soft: #554b2d;
    --line: rgba(242, 246, 245, 0.15);
    --shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 0.24rem; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.shell { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}
.skip-link:focus { transform: none; }
header { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.header-inner, .brand, nav { display: flex; align-items: center; }
.header-inner { justify-content: space-between; gap: 2rem; }
.brand { gap: 0.7rem; color: var(--ink); font-size: 1.18rem; font-weight: 700; text-decoration: none; }
.brand img { width: 2.65rem; height: 2.65rem; border-radius: var(--radius-sm); }
nav { gap: clamp(0.9rem, 2vw, 1.5rem); }
nav a { min-height: 2.75rem; display: inline-flex; align-items: center; font-size: 0.88rem; font-weight: 700; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.intro { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); background: linear-gradient(180deg, var(--sky), var(--canvas)); }
.eyebrow { margin: 0 0 1rem; color: var(--blue); font: 700 0.75rem/1.3 ui-monospace, "SFMono-Regular", monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 1rem; height: 0.2rem; margin: 0 0.5rem 0.18rem 0; border-radius: 2px; background: var(--gold); }
h1, h2, h3 { margin-top: 0; text-wrap: balance; }
h1 { max-width: 50rem; margin-bottom: 1.25rem; font-size: clamp(2.7rem, 7vw, 5rem); line-height: 1; letter-spacing: -0.035em; }
.lede { max-width: 47rem; margin: 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.3rem); }
.content { padding: 0 0 clamp(4rem, 8vw, 7rem); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.prose { min-width: 0; }
.prose section { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.prose section:first-child { border-top: 0; }
.prose h2 { margin-bottom: 0.8rem; font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.12; }
.prose h3 { margin: 1.6rem 0 0.45rem; font-size: 1.15rem; }
.prose p, .prose ul, .prose ol { max-width: 47rem; margin: 0.75rem 0 0; }
.prose li + li { margin-top: 0.45rem; }
.summary {
  margin-bottom: 2rem;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-left: 0.38rem solid var(--pool);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.summary strong { display: block; margin-bottom: 0.35rem; font-size: 1.3rem; }
.summary p { margin: 0; color: var(--muted); }
.contents { position: sticky; top: 1.5rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.contents strong { display: block; margin-bottom: 0.65rem; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; }
.contents a { display: block; padding: 0.35rem 0; font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.link-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; }
.link-card strong { display: block; color: var(--ink); }
.link-card span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.9rem; }
.link-card:hover { border-color: var(--pool); }
.faq details { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; color: var(--ink); font-size: 1.08rem; font-weight: 750; }
.faq details p, .faq details ul { color: var(--muted); }
.note { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--yellow-soft); color: var(--ink); }
footer { padding: 3rem 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.footer-copy { max-width: 36rem; margin: 1rem 0 0; color: var(--muted); }
.byline { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem 1.2rem; }
.footer-links a { font-size: 0.86rem; font-weight: 700; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .contents { position: static; grid-row: 1; }
  .link-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 1.25rem, 68rem); }
  .header-inner nav a:first-child { display: none; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
