:root {
  color-scheme: light;
  --ink: #102a43;
  --muted: #526777;
  --line: #d8e2e8;
  --sky: #075985;
  --sky-dark: #034b70;
  --mint: #0f766e;
  --wash: #f4f8fa;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: var(--sky); }
.container { width: min(920px, calc(100% - 32px)); margin-inline: auto; }
.wide { width: min(1120px, calc(100% - 32px)); }
.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--sky); color: white; font-weight: 900; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.nav .tool-link { padding: 8px 12px; border-radius: 6px; background: var(--sky); color: white; }
.hero { padding: 62px 0 58px; border-top: 1px solid #e7eff3; background: linear-gradient(180deg, #edf8fb 0%, #fff 100%); }
.eyebrow { margin: 0 0 10px; color: var(--mint); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; color: #09263a; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; }
.lede { max-width: 760px; margin: 20px 0 0; color: var(--muted); font-size: 19px; }
.article { padding: 54px 0 76px; }
.article h2 { margin: 48px 0 12px; color: #0b2e43; font-size: clamp(26px, 4vw, 36px); line-height: 1.22; }
.article h3 { margin: 30px 0 8px; color: #12384e; font-size: 21px; line-height: 1.35; }
.article p, .article li { color: var(--muted); }
.article ul, .article ol { padding-left: 24px; }
.article li { margin-bottom: 8px; }
.callout { margin: 26px 0; padding: 20px 22px; border-left: 4px solid var(--mint); background: #edf7f5; color: #174b49; }
.formula { margin: 18px 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: #f8fbfc; color: #174b49; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.example { margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.example h3 { margin-top: 0; }
.cta { margin-top: 48px; padding: 30px; border-radius: 9px; background: #082f49; color: white; }
.cta h2 { margin: 0 0 8px; color: white; }
.cta p { margin: 0 0 18px; color: #c5dce7; }
.cta a { display: inline-block; padding: 10px 15px; border-radius: 6px; background: white; color: #08334d; font-weight: 800; text-decoration: none; }
.related { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 8px; color: var(--sky); font-weight: 800; text-decoration: none; }
.related a span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 500; }
footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 680px) {
  .container, .wide { width: min(100% - 22px, 920px); }
  .nav > a:not(.tool-link) { display: none; }
  .hero { padding: 42px 0; }
  .article { padding: 36px 0 56px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}
