:root {
  color-scheme: light;
  --ink: #18343a;
  --muted: #52666a;
  --paper: #f4f7f2;
  --surface: #ffffff;
  --line: #d6e1dc;
  --accent: #087f73;
  --accent-dark: #075d56;
  --signal: #d9ef79;
  --max: 70rem;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: var(--accent-dark); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner, .page, .footer-inner { width: min(calc(100% - 2.5rem), var(--max)); margin-inline: auto; }
.header-inner { min-height: 5.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.025em; }
.brand-mark { position: relative; display: inline-block; width: 1.8rem; height: 1.8rem; border: 2px solid var(--ink); border-radius: .25rem; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: .72rem; height: .55rem; border: 2px solid var(--accent); background: var(--paper); border-radius: .12rem; }
.brand-mark::before { left: .28rem; top: .31rem; }
.brand-mark::after { left: .48rem; top: .51rem; background: var(--signal); }
.nav { display: flex; flex-wrap: wrap; gap: clamp(.8rem, 3vw, 1.8rem); font-size: .94rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .45rem; }

.page { padding-block: clamp(3rem, 8vw, 6.25rem); }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(14rem, .85fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.home-copy { max-width: 42rem; }
.kicker { margin: 0 0 1rem; color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 13ch; margin-bottom: 1.25rem; font-size: clamp(2.6rem, 7vw, 5.3rem); line-height: .99; letter-spacing: -.065em; }
.lede { max-width: 39rem; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.65; }
.diagram { position: relative; min-height: 19rem; display: grid; place-items: center; isolation: isolate; }
.diagram::before { content: ""; position: absolute; width: min(76%, 17rem); aspect-ratio: 1; border: 1px solid #acc3ba; border-radius: 50%; z-index: -1; }
.layer { position: absolute; width: min(72%, 16rem); min-height: 4rem; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--surface); box-shadow: 0 .7rem 1.5rem rgb(24 52 58 / 8%); font-weight: 650; }
.layer::before { content: ""; flex: 0 0 .75rem; width: .75rem; height: .75rem; border-radius: 2px; background: var(--accent); }
.layer-one { transform: translate(-1.15rem, -3.25rem); }
.layer-two { transform: translate(1.1rem, 0); background: var(--signal); }
.layer-two::before { background: var(--ink); }
.layer-three { transform: translate(-1.15rem, 3.25rem); }
.intro { max-width: 47rem; margin-top: clamp(3.5rem, 8vw, 6rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.intro h2 { max-width: 20ch; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.03em; }
.intro p { max-width: 44rem; color: var(--muted); }
.page-copy { max-width: 48rem; }
.page-copy h1 { max-width: 17ch; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.page-copy .lede { margin-bottom: 2.5rem; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.4rem; margin-bottom: .55rem; font-size: 1.23rem; line-height: 1.3; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: .45rem; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .9rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); }

@media (max-width: 700px) {
  .header-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 1rem; gap: .9rem; }
  .nav { gap: 1rem; font-size: .88rem; }
  .nav a[aria-current="page"] { text-underline-offset: .3rem; }
  .home-hero { grid-template-columns: 1fr; gap: 1.2rem; }
  .diagram { min-height: 15rem; }
  .layer { width: min(68%, 15rem); min-height: 3.5rem; }
  .page { padding-block: 3.25rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
