:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", Inter, "Segoe UI", system-ui, sans-serif;
  --bg: #9eb6d4;
  --bg-bottom: #7e96b4;
  --paper: #f6f6f8;
  --paper-2: #fbfbfc;
  --text: #1d1d1f;
  --muted: #3a3a40;
  --faint: #3a3a40;
  --line: #c8c8ce;
  --edge: rgba(0, 0, 0, 0.18);
  --edge-strong: rgba(0, 0, 0, 0.28);
  --heading: #1d1d1f;
  --accent: #0b4fb8;
  --btn: #1a6bdf;
  --btn-text: #ffffff;
  --pro: #0b6b3a;
  --con: #b22020;
  --warn-ink: #6b3500;
  --info-ink: #0b3d91;
  --radius: 11px;
  --radius-sm: 8px;
  --wrap: min(1120px, calc(100% - 32px));
  --titlebar-h: 28px;
  --window-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 24px 48px rgba(20, 32, 54, 0.28),
    0 8px 18px rgba(20, 32, 54, 0.16),
    0 1px 2px rgba(20, 32, 54, 0.2);
  --focus: 0 0 0 3px rgba(26, 107, 223, 0.45);
  --motion: 160ms ease;
  --texture:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.86  0 0 0 0 0.86  0 0 0 0 0.88  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --linen:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.0) 0 2px, rgba(255,255,255,0.07) 2px 3px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.0) 0 2px, rgba(0,0,0,0.025) 2px 3px);
  --titlebar-bg:
    linear-gradient(180deg, #f8f8fa 0%, #ececef 46%, #dcdce1 100%);
  --traffic:
    radial-gradient(circle at 18px 14px, #ff8a84 0 4px, #ff5f57 4.2px 6px, #c4453e 6.2px 6.8px, transparent 7px),
    radial-gradient(circle at 36px 14px, #ffe08a 0 4px, #febc2e 4.2px 6px, #c48a12 6.2px 6.8px, transparent 7px),
    radial-gradient(circle at 54px 14px, #8af0a0 0 4px, #28c840 4.2px 6px, #1a8f2c 6.2px 6.8px, transparent 7px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 520px at 18% -10%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(210, 230, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #c5d8ee 0%, #9eb6d4 42%, #7f98b6 100%);
  background-attachment: scroll;
  min-height: 100%;
}
img, svg { max-width: 100%; height: auto; }
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
  font-weight: 600;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .btn-secondary:focus-visible, .nav-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.022em;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--heading);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 300;
  border: 1px solid var(--edge-strong);
}
.skip:focus { top: 36px; }

/* —— Menu bar —— */
.wrap { width: var(--wrap); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(236, 236, 240, 0.78) 100%);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 8px rgba(20, 30, 50, 0.08);
}
.site-header .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 18px;
  width: var(--wrap);
  margin: 0 auto;
  min-height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 13px;
  padding: 0 4px 0 0;
  margin-right: 6px;
}
.logo:hover { text-decoration: none; color: #000; }
.logo-mark {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
}
.nav-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid #8d8d92;
  background: linear-gradient(180deg, #ffffff 0%, #e8e8ec 100%);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 0 #fff inset, 0 1px 1px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle:active,
.nav-check:checked ~ .nav-toggle {
  background: linear-gradient(180deg, #d8d8de 0%, #c8c8ce 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25) inset, 0 1px 0 rgba(255, 255, 255, 0.5);
}
.site-nav { margin-left: 0; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  text-decoration: none;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(0, 0, 0, 0.07);
  color: #000;
  text-decoration: none;
  box-shadow: none;
  border: 0;
}
.site-nav a:active {
  background: rgba(26, 107, 223, 0.16);
  text-decoration: none;
}

/* —— Window chrome (shared) —— */
.mac-window,
.hero,
.section-card,
article.guide,
.trust,
.bento-card,
.home-hero-card,
.home-stats,
footer.site-footer .inner {
  position: relative;
  background-color: var(--paper-2);
  background-image: var(--linen), var(--texture);
  background-blend-mode: multiply, normal;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: var(--window-shadow);
  overflow: hidden;
}
.hero,
.section-card,
article.guide,
.trust,
footer.site-footer .inner {
  padding: calc(var(--titlebar-h) + 22px) 28px 24px;
}
.bento-card,
.home-stats {
  /* padding set in home.css / component rules; keep titlebar space there */
}
.hero::before,
.section-card::before,
article.guide::before,
.trust::before,
.bento-card::before,
.home-hero-card::before,
.home-stats::before,
footer.site-footer .inner::before,
.window-chrome {
  content: attr(data-window);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--titlebar-h);
  line-height: var(--titlebar-h);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #2c2c30;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid #b0b0b6;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
  background-image: var(--traffic), var(--titlebar-bg);
  background-repeat: no-repeat, no-repeat;
  background-position: left top, 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 72px;
  z-index: 2;
}
.mac-window { margin: 0 0 22px; }
.mac-window > .window-chrome {
  content: none;
  position: relative;
}
.mac-window .window-title {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mac-window .traffic {
  position: absolute;
  left: 10px;
  top: 0;
  height: var(--titlebar-h);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}
.mac-window .traffic i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0.5px 0.5px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}
.mac-window .traffic .close {
  background: radial-gradient(circle at 35% 30%, #ff8a84, #ff5f57 55%, #d6453e);
  border: 1px solid #b3342e;
}
.mac-window .traffic .min {
  background: radial-gradient(circle at 35% 30%, #ffe08a, #febc2e 55%, #d19a16);
  border: 1px solid #a37810;
}
.mac-window .traffic .zoom {
  background: radial-gradient(circle at 35% 30%, #8af0a0, #28c840 55%, #1a9a30);
  border: 1px solid #17862a;
}
.window-body { padding: 22px 28px 24px; }

main { padding: 18px 0 8px; }
.hero { margin: 16px 0 24px; padding: calc(var(--titlebar-h) + 28px) 32px 32px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--heading);
  font-weight: 700;
}
.lede { font-size: 1.05rem; color: var(--muted); margin: 0 0 18px; max-width: 66ch; }
.meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #8a8a90;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.12) inset;
  background: linear-gradient(180deg, #fafafa, #e6e6ea);
}
.pill {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 0%, #ececef 100%);
  border-radius: 0;
  padding: 6px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  border: 0;
  border-right: 1px solid #c0c0c6;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.pill:last-child { border-right: 0; }

/* Aqua primary */
.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--btn-text);
  text-shadow: 0 -1px 0 rgba(0, 30, 80, 0.4);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 18px 9px;
  border-radius: 8px;
  border: 1px solid #0a3e99;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.18) 44%, rgba(0, 20, 80, 0.08) 46%, rgba(0, 20, 80, 0.18) 100%),
    linear-gradient(180deg, #6aa8ff 0%, #1a6bdf 48%, #0d4db8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 -2px 4px rgba(0, 30, 90, 0.28) inset,
    0 2px 3px rgba(0, 0, 0, 0.22);
  transition: filter var(--motion), box-shadow var(--motion), transform var(--motion);
}
.btn:hover {
  color: var(--btn-text);
  text-decoration: none;
  filter: brightness(1.06);
}
.btn:active {
  text-decoration: none;
  filter: brightness(0.95);
  box-shadow: 0 3px 6px rgba(0, 20, 60, 0.45) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(1px);
}

/* Bevelled push button */
.btn-secondary {
  display: inline-block;
  text-decoration: none;
  color: var(--heading);
  text-shadow: 0 1px 0 #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 18px 9px;
  border-radius: 8px;
  border: 1px solid #7a7a80;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f3 45%, #dcdce1 100%);
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: filter var(--motion), box-shadow var(--motion), transform var(--motion);
}
.btn-secondary:hover {
  color: var(--heading);
  text-decoration: none;
  filter: brightness(1.03);
}
.btn-secondary:active {
  text-decoration: none;
  background: linear-gradient(180deg, #d0d0d6 0%, #e8e8ec 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28) inset, 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(1px);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.grid { display: grid; gap: 20px; margin: 0 0 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .panel { padding: 24px; }
.card, .panel, .callout {
  background-color: var(--paper);
  background-image: var(--linen), var(--texture);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(0, 0, 0, 0.08);
}
.card h2, .panel h2, .section-head h2 {
  margin: 0 0 10px;
  color: var(--heading);
  letter-spacing: -0.02em;
  font-size: 1.35rem;
  font-weight: 700;
}
.card h3, .panel h3, article h2, article h3 {
  color: var(--heading);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head { margin: 8px 0 16px; }
.section-head p { margin: 0; color: var(--muted); max-width: 70ch; }
.callout { padding: 16px 18px; margin: 0 0 20px; }
.callout.warn {
  background: linear-gradient(180deg, #fff8e8, #f7ecd0);
  border-color: #d2b36a;
}
.callout.info {
  background: linear-gradient(180deg, #eef5ff, #dce9fb);
  border-color: #8aa8d4;
}
.callout.warn .lead { color: var(--warn-ink); font-weight: 700; margin: 0 0 6px; }
.callout.info .lead { color: var(--info-ink); font-weight: 700; margin: 0 0 6px; }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin: 0; }
.trust p { margin: 0; color: var(--muted); }
.trust { margin: 8px 0 28px; }
article.guide, .section-card { margin: 0 0 24px; }
article.guide h1 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  font-weight: 700;
}
article.guide h2 { font-size: 1.25rem; margin: 24px 0 8px; }
article.guide h3 { font-size: 1.05rem; margin: 18px 0 6px; color: var(--heading); }
article.guide p, article.guide li { max-width: 75ch; }
article.guide ol, article.guide ul { margin: 0 0 14px; padding-left: 1.3rem; }
article.guide li { margin: 0 0 6px; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sources li {
  background: linear-gradient(180deg, #fff, #f3f3f6);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 1px 0 #fff inset, 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sources a { font-weight: 700; text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .site { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 500; word-break: break-all; }
.guide-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.guide-list a.block {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: var(--paper-2);
  background-image: var(--linen), var(--texture);
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 6px 14px rgba(20, 32, 54, 0.12), 0 1px 2px rgba(20, 32, 54, 0.12);
  transition: box-shadow var(--motion), transform var(--motion);
}
.guide-list a.block:hover { box-shadow: 0 1px 0 #fff inset, 0 10px 20px rgba(20, 32, 54, 0.18); text-decoration: none; }
.guide-list a.block:active { transform: translateY(1px); }
.guide-list h3 { margin: 0 0 6px; color: var(--heading); font-size: 1.08rem; }
.guide-list p { margin: 0; color: var(--muted); }
footer.site-footer { padding: 8px 0 40px; color: var(--muted); font-size: 0.92rem; }
footer.site-footer p { margin: 0 0 10px; max-width: 75ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.foot-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--heading);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid #8a8a90;
  background: linear-gradient(180deg, #fff, #e8e8ec);
  box-shadow: 0 1px 0 #fff inset, 0 1px 1px rgba(0,0,0,0.15);
  text-shadow: 0 1px 0 #fff;
}
.foot-nav a:hover {
  background: linear-gradient(180deg, #f7f7fa, #dddde2);
  color: var(--heading);
  text-decoration: none;
}
.small { color: var(--muted); font-size: 0.88rem; }
.logo-mark { border-radius: 4px; }

@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --wrap: min(1120px, calc(100% - 20px)); --titlebar-h: 30px; }
  body { font-size: 16px; }
  .nav-toggle { display: inline-block; }
  .site-header .bar {
    flex-wrap: wrap;
    min-height: 44px;
    padding: 6px 0;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
    padding-bottom: 8px;
  }
  .nav-check:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 8px 11px; }
  .hero, article.guide, .section-card,
  .trust, footer.site-footer .inner {
    padding: calc(var(--titlebar-h) + 16px) 16px 18px;
  }
  .window-body { padding: 16px 16px 18px; }
  .card, .panel { padding: 16px; }
  .meta { display: flex; width: 100%; }
  .pill { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .btn-secondary:active { transform: none; }
}
