:root {
  --bg: #f7f5f0;
  --ink: #1d2128;
  --muted: #545b66;
  --rule: #d9d5cc;
  --accent: #2b4466;      /* muted navy, the only accent */
  --accent-soft: #e6e9ee;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Layout: one reading column, TOC to its left on wide screens */
.layout {
  max-width: calc(65ch + 15rem + 4rem);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { max-width: 65ch; outline: none; }

.toc { display: none; }

@media (min-width: 64rem) {
  .layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 65ch);
    gap: 4rem;
    justify-content: center;
  }
  .toc {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    padding-top: 6.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
  }
  .toc-title {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
  .toc li { margin: 0; }
  .toc a {
    display: block;
    padding: 0.3rem 0 0.3rem 0.9rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
  }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
}

/* Intro */
.intro { padding-top: 4rem; }
.kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.4rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lede { margin: 0; color: var(--muted); }

/* Footage slot */
figure { margin: 0; }
.footage { margin: 2.5rem 0 1rem; }
.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder { margin: 0; color: var(--muted); font-size: 0.95rem; }
figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.875rem; }

/* Questions */
section { padding-top: 3rem; }
h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1rem; }

/* Comparison table */
.table-wrap {
  margin: 1.5rem 0 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 0.975rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--ink); }
thead th:last-child { color: var(--accent); }
tbody th { font-weight: 600; width: 22%; }
tbody td:last-child { color: var(--accent); font-weight: 500; }

/* Phone: stack table rows */
@media (max-width: 36rem) {
  table, thead, tbody, tr, th, td { display: block; width: auto; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  tbody tr:first-child { border-top: 2px solid var(--ink); }
  tbody th, tbody td { border: 0; padding: 0.1rem 0; }
  tbody th { width: auto; margin-bottom: 0.2rem; }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 400;
  }
  tbody td + td { margin-top: 0.35rem; }
}

/* Who */
.who { margin: 0; }
.who dt { font-weight: 600; margin-top: 1rem; }
.who dt:first-child { margin-top: 0; }
.who dd { margin: 0.1rem 0 0; }

/* Field test placeholders */
.results { padding-left: 1.2rem; margin: 0 0 1.5rem; }
.results li { margin-bottom: 0.25rem; }
.ph {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  white-space: nowrap;
}
.frame-photo { aspect-ratio: 16 / 9; }
.frame-photo .placeholder { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent); }

/* Contact */
.contact { margin-top: 1.25rem; }
button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
}
button:hover { background: #22374f; }
button.quiet {
  background: transparent;
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
}
button.quiet:hover { background: var(--accent-soft); }
.email-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 1rem 0 0;
}
.email-out[hidden] { display: none; }
.email-text {
  font-size: 1.1rem;
  font-weight: 600;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}
.copy-status { color: var(--muted); font-size: 0.875rem; }

.foot {
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot p { margin: 0; }

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