:root {
  color-scheme: light;
  --guide-bg: #f3f6f8;
  --guide-ink: #16202d;
  --guide-heading: #142033;
  --guide-brand: #19375d;
  --guide-link: #126b5a;
  --guide-accent: #15725f;
  --guide-muted: #526173;
  --guide-muted-2: #5c6a78;
  --guide-line: #cfdae2;
  --guide-header: #ffffff;
  color: #16202d;
  background: var(--guide-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { margin: 0; line-height: 1.65; }

a { color: var(--guide-link); text-underline-offset: 0.18em; }

.site-header {
  min-height: 72px;
  padding: 16px max(24px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--guide-line);
  background: var(--guide-header);
}

.brand { color: var(--guide-brand); font-weight: 800; text-decoration: none; }

.site-header-brand { min-width: 0; display: flex; align-items: center; gap: 12px; }
.site-header > nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-header nav a { color: var(--guide-muted); font-size: 0.9rem; font-weight: 700; }

.mobile-guide-menu { display: none; position: relative; flex: 0 0 auto; }
.mobile-guide-menu summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--guide-line);
  border-radius: 8px;
  color: var(--guide-heading);
  background: var(--guide-header);
  cursor: pointer;
  list-style: none;
}
.mobile-guide-menu summary::-webkit-details-marker { display: none; }
.mobile-guide-menu summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--guide-link) 25%, transparent); outline-offset: 2px; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { position: absolute; left: 0; content: ""; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.mobile-guide-menu nav {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  padding: 6px;
  border: 1px solid var(--guide-line);
  border-radius: 8px;
  background: var(--guide-header);
  box-shadow: 0 12px 30px rgba(20, 32, 51, 0.16);
}
.mobile-guide-menu nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.mobile-guide-menu nav a:hover, .mobile-guide-menu nav a:focus-visible {
  color: var(--guide-heading);
  background: var(--guide-bg);
  outline: 0;
}

main { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 72px; }

.guide-header { padding-bottom: 36px; border-bottom: 1px solid var(--guide-line); }
.eyebrow { margin: 0 0 8px; color: var(--guide-accent); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; }
h1 { max-width: 720px; margin: 0; color: var(--guide-heading); font-size: 2.7rem; line-height: 1.08; letter-spacing: 0; }
.guide-header > p:not(.eyebrow) { max-width: 700px; margin: 18px 0; color: var(--guide-muted); font-size: 1.08rem; }
.calculator-link { display: inline-block; color: #fff; background: var(--guide-brand); padding: 10px 16px; border-radius: 6px; font-weight: 800; text-decoration: none; }

.toc { padding: 32px 0; border-bottom: 1px solid var(--guide-line); }
.toc h2, .source-list h2 { margin: 0 0 14px; font-size: 1.35rem; }
.toc ol { margin: 0; padding-left: 1.4rem; columns: 2; column-gap: 44px; }
.toc li { break-inside: avoid; margin: 0 0 10px; padding-left: 4px; }
.toc a { font-weight: 700; }

.faq-item { padding: 42px 0; border-bottom: 1px solid var(--guide-line); scroll-margin-top: 24px; }
.faq-item h2 { margin: 5px 0 16px; font-size: 1.55rem; line-height: 1.25; }
.faq-item > p { max-width: 780px; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.privacy-table table { width: 100%; min-width: 720px; border-collapse: collapse; }
.privacy-table th, .privacy-table td {
  padding: 10px;
  border-bottom: 1px solid var(--guide-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.privacy-table th { color: var(--guide-muted); font-size: 0.74rem; text-transform: uppercase; }
.answer-label { margin: 0; color: var(--guide-accent); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.citations { color: var(--guide-muted-2); font-size: 0.86rem; }
.back-to-top { font-size: 0.82rem; font-weight: 800; }

.source-list { padding-top: 48px; }
.source-list > p { color: var(--guide-muted-2); }
.source-list ol { padding-left: 1.4rem; }
.source-list li { margin: 0 0 18px; }
.source-list li a { display: block; font-weight: 800; }
.source-list li span { display: block; color: var(--guide-muted-2); font-size: 0.88rem; }

@media (max-width: 720px) {
  .site-header { min-height: 68px; padding: 12px 16px; }
  .site-header-brand { width: 100%; justify-content: space-between; }
  .site-header > .desktop-guide-links { display: none; }
  .mobile-guide-menu { display: block; }
  main { width: min(100% - 32px, 880px); padding-top: 36px; }
  h1 { font-size: 2.1rem; }
  .toc ol { columns: 1; }
  .faq-item { padding: 34px 0; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --guide-bg: #0f141b;
    --guide-ink: #eef3f8;
    --guide-heading: #f5f8fb;
    --guide-brand: #9fc7ef;
    --guide-link: #67cfb0;
    --guide-accent: #55c7a4;
    --guide-muted: #b2bdca;
    --guide-muted-2: #a8b4c2;
    --guide-line: #34404e;
    --guide-header: #171e27;
    color: var(--guide-ink);
  }

  .calculator-link {
    color: #f7fbff;
    background: #294f7b;
  }
}
