/* Dr. Bob Harding, MD. Newsreader for headings, Hanken Grotesk for text. */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --head: "Newsreader", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --ui: var(--text);
  --paper: #ffffff;
  --spruce: #0b3652;
  --deep: #06283d;
  --sage: #e8f0f7;
  --wash: linear-gradient(145deg, #e3edf6, #f8fbfd 72%);
  --ochre: #2a6fa8;
  --button: #c8462e;
  --button-hover: #a93824;
  --ink: #102b37;
  --soft: #5a6b7a;
  --rule: #d6e1eb;
  --link: #1f62a0;
  --link-hover: #0b3652;
  --side: 15rem;
  --measure: 39rem;
  --section-y: clamp(3.5rem, 2.5rem + 3vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
main:focus { outline: none; }
[id] { scroll-margin-top: 1.5rem; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.skip-link { position: absolute; left: -999rem; }
.skip-link:focus { position: fixed; left: 1rem; top: 1rem; background: var(--paper); color: var(--ink); padding: 0.5rem 0.75rem; border-radius: 4px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.25); z-index: 100; }

/* Header: spruce, joins the home hero */
.site-header { background: var(--deep); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 2rem; padding-block: 1.25rem; }
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow 0.25s; }
.site-header .wrap { transition: padding 0.25s ease-out; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--head); color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 2.75rem; height: 2.75rem; flex: none; color: #fff; transition: width 0.25s ease-out, height 0.25s ease-out; }
.brand-name { display: flex; flex-direction: column; font-size: 1.35rem; font-weight: 500; line-height: 1.1; transition: font-size 0.25s ease-out; }
.brand-name small { font-family: var(--ui); font-size: 0.8rem; font-weight: 400; letter-spacing: 0.04em; color: #a8cbd4; max-height: 1.2em; overflow: hidden; transition: max-height 0.25s ease-out, opacity 0.2s; }
.is-condensed .site-header { box-shadow: 0 2px 12px rgb(0 0 0 / 0.25); }
.is-condensed .site-header .wrap { padding-block: 0.5rem; }
.is-condensed .brand-mark { width: 2rem; height: 2rem; }
.is-condensed .brand-name { font-size: 1.15rem; }
.is-condensed .brand-name small { max-height: 0; opacity: 0; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; font-family: var(--ui); font-size: 1.02rem; }
.site-nav a { color: #fff; text-decoration: none; padding: 0.3rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 0.3em; }
.site-nav a.nav-request { font-weight: 600; padding: 0.45rem 1.1rem; border: 2px solid var(--button); border-radius: 999px; }
.site-nav a.nav-request:hover { background: var(--button-hover); border-color: var(--button-hover); text-decoration: none; }
.site-header :focus-visible { outline-color: #fff; }

/* Headings: roman, one colour, sentence case */
h1, h2, h3 { font-family: var(--head); font-weight: 500; color: var(--spruce); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem); line-height: 1.1; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0 0 1.05em; max-width: 65ch; }
strong { font-weight: 600; }

/* Home hero: one spruce band with the header */
.hero { background: var(--deep); color: #fff; }
.hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6vw, 5rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero h1 { color: #fff; font-size: clamp(2.75rem, 1.6rem + 2.6vw, 4rem); line-height: 1.05; max-width: 17ch; margin-bottom: 1.25rem; }
.hero p { font-size: 1.3rem; line-height: 1.5; max-width: 32ch; color: #dce8f3; }
.hero .action { margin-top: 2rem; }
.hero :focus-visible, .band.spruce .btn:focus-visible, .site-header .btn:focus-visible { outline-color: #fff; }
.hero-photo { margin: 0; width: 21rem; max-width: 100%; justify-self: end; border-radius: 50%; box-shadow: 0 0 0 8px rgb(255 255 255 / 0.08); }
.hero-photo img { aspect-ratio: 1; width: 100%; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: fade 0.6s ease-out both; }
  .site-nav a.nav-request { transition: translate 0.25s ease-out, visibility 0.25s; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
.prose figure { margin: 0; }
figcaption { font-family: var(--ui); font-size: 0.95rem; color: var(--soft); margin-top: 0.55rem; line-height: 1.4; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--button);
  border: 0;
  border-radius: 999px;
  padding: 0 1.75rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--button-hover); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--spruce); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.action { margin: 1.6rem 0 0; }

/* Sections: heading in the margin, text beside it */
.part { display: grid; grid-template-columns: minmax(14rem, 4fr) 8fr; gap: 0 3rem; border-top: 1px solid var(--rule); margin: 0; padding-block: var(--section-y); }
.part > h2 { padding-top: 0.1rem; }
.part h3 { margin: 1.5em 0 0.2em; }
.part h3 a { color: inherit; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; }
.part h3:first-child { margin-top: 0; }
.part figure { margin: 0.4rem 0 1.6rem; }
.part ul, .prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.2em; }
.part li, .prose li { margin-bottom: 0.35em; }
.plain { list-style: none; padding-left: 0 !important; }

/* Collapsible questions */
.qa { border-bottom: 1px solid var(--rule); }
.qa:first-of-type { border-top: 1px solid var(--rule); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.9rem 0; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--ui); font-size: 1.4rem; line-height: 1; color: var(--spruce); }
.qa[open] summary::after { content: "\2212"; }
.qa summary h3, .prose .qa summary h3 { margin: 0; font-size: 1.2rem; }
.qa > :not(summary) { margin-top: 0; }
.qa > :last-child { margin-bottom: 1.1rem; }
.qa + p { margin-top: 1.2rem; }

/* Inner pages */
.crumbs { font-family: var(--ui); font-size: 1rem; color: var(--soft); list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin: 2rem 0 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; }
.crumbs a { color: var(--soft); }
.page { max-width: 44rem; padding: 1.5rem 0 3rem; }
.page h1 { margin-bottom: 1.4rem; }
.page .first { font-size: 1.3rem; line-height: 1.5; margin-bottom: 1.6rem; }
.prose h2 { margin: 2.2em 0 0.55em; }
.prose h3 { margin: 1.6em 0 0.25em; }
.prose > :first-child { margin-top: 0; }
.prose .after { border-top: 1px solid var(--rule); margin-top: 2.8rem; padding-top: 0.2rem; }
.draft-flag { font-family: var(--ui); font-size: 1rem; background: #fbeee8; color: #6e2f14; padding: 0.75rem 1rem; border-radius: 0.5rem; margin: 1.2rem 0 0; }
mark.todo { background: #f7e3b5; padding: 0 0.2em; }

.table-wrap { overflow-x: auto; margin: 1.4rem 0 1.6rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--ui); font-size: 1.02rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 1px solid var(--ink); font-weight: 600; }
tbody th { font-weight: 600; }

/* Request form */
.request-form { margin-top: 0.4rem; font-family: var(--ui); font-size: 1.05rem; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.optional { font-weight: 400; color: var(--soft); }
.field-hint { font-size: 1rem; color: var(--soft); margin: 0 0 0.4rem; line-height: 1.4; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #8d969b;
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.form-trap { position: absolute; left: -999rem; }
.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { color: #9a2c14; }
.request-form.is-sent .form-fields { display: none; }

/* Footer */
.site-footer { background: #f3f7fb; border-top: 1px solid var(--rule); padding: 2.75rem 0 3rem; font-family: var(--ui); font-size: 1rem; line-height: 1.5; color: var(--soft); }
.site-footer p { max-width: 50rem; }
.site-footer .who { color: var(--spruce); font-family: var(--head); font-size: 1.25rem; }
.foot-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 2rem; margin: 1.75rem 0 2.25rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.foot-head { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--spruce); margin: 0 0 0.75rem; }
.foot-nav ul { list-style: none; padding: 0; margin: 0; }
.foot-nav li { margin: 0 0 0.55rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.foot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.75rem 2rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.9rem; }
.foot-bar p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer a:hover { color: var(--spruce); text-decoration: underline; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* Full-width bands and photo rows */
.band { padding-block: 0; }
.band .part { border-top: 0; }
.band .part + .part { border-top: 1px solid var(--rule); }
.band.sage { background: var(--wash); }
.band.sage .part + .part { border-top-color: #c9d9e8; }
.band.tide { background: #1d5a8c; color: #fff; }
.band.tide h2 { color: #fff; }
.band.tide p { font-family: var(--head); font-size: 1.35rem; line-height: 1.45; color: #fff; }
.band.spruce { background: var(--deep); color: #fff; }
.band.spruce h2, .band.spruce a, .band.spruce .optional, .band.spruce .field-hint { color: #fff; }
.band.spruce :focus-visible { outline-color: #fff; }
.band.spruce .form-status.is-error { color: #ffd9cf; }
.band.spruce .field input, .band.spruce .field select, .band.spruce .field textarea { border-color: #fff; }
.band + .wrap > .part:first-child, .row + .part { border-top: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; margin: 0; padding-block: var(--section-y); }
.row figure { margin: 0; }
.row h2 { margin-bottom: 1rem; }

/* Home: services, credentials, video, links */
#care { border-top: 1px solid var(--rule); }
#care h3 { font-size: 1.3rem; }
#care h3 a::after { content: "\2009\2192"; content: "\2009\2192" / ""; }
.creds { list-style: none; padding: 0 !important; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 2rem; font-family: var(--ui); font-weight: 600; color: var(--spruce); }
.creds li { margin: 0; padding-left: 1.6rem; position: relative; }
.creds li::before { content: "✓"; position: absolute; left: 0; color: var(--ochre); font-weight: 700; }
.part-lead { grid-column: 1 / -1; margin: -0.75rem 0 0; color: var(--soft); }
main :is(.row, .part) a:not(.btn) { color: var(--spruce); text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
main .band.spruce a:not(.btn) { color: #fff; }
#story figure > a { position: relative; display: block; border-radius: 0.5rem; overflow: hidden; }
#story figure > a img { display: block; width: 100%; }
#story figure > a::after { content: ""; position: absolute; left: 1rem; bottom: 1rem; width: 3.5rem; aspect-ratio: 1; border-radius: 50%; background: rgb(6 40 61 / 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 4l10 6-10 6z' fill='%23fff'/%3E%3C/svg%3E") 55% 50% / 1.25rem no-repeat; }

@media (min-width: 861px) {
  html { scroll-padding-top: 5rem; }
  #care { grid-template-columns: 1fr; row-gap: 2rem; }
  #care > div { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 2rem; }
  #care h3 { margin: 0 0 0.5rem; padding-top: 1rem; border-top: 2px solid var(--ochre); }
}

@media (max-width: 860px) {
  .part { display: block; }
  .part > h2 { margin-bottom: 0.8rem; }
  .hero .wrap { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-photo { order: -1; width: 7rem; margin-bottom: 1.25rem; justify-self: auto; box-shadow: 0 0 0 5px rgb(255 255 255 / 0.08); }
  .row { grid-template-columns: 1fr; gap: 1.75rem; }
  #story { display: flex; flex-direction: column; }
  #story > div { order: -1; }
  body { padding-bottom: 5rem; }
  html { scroll-padding-top: 7rem; }
  .site-header .wrap { display: block; padding-block: 0.75rem 0.25rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-name { font-size: 1.15rem; }
  .is-condensed .site-header .wrap { padding-block: 0.4rem 0; }
  .is-condensed .brand-mark { width: 1.6rem; height: 1.6rem; }
  .is-condensed .brand-name { font-size: 1rem; }
  .is-condensed .site-nav { margin-top: 0; }
  .is-condensed .site-nav a { min-height: 40px; }
  .site-nav { flex-wrap: nowrap; justify-content: space-between; gap: 0 0.5rem; margin-top: 0.35rem; font-size: 0.875rem; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .site-nav a.nav-request {
    position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 60;
    min-height: 3rem; justify-content: center; padding: 0 1.75rem; border: 0; border-radius: 999px;
    background: var(--button); color: #fff; font-size: 1rem; text-decoration: none;
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.2);
    visibility: hidden; translate: 0 150%;
  }
  .show-cta:not(.cta-away) .site-nav a.nav-request { visibility: visible; translate: 0; }
  .site-nav a.nav-request:focus-visible { outline-color: var(--spruce); }
}
@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .wrap { padding: 0 1.15rem; }
  .field-row { grid-template-columns: 1fr; }
  .hero p, .page .first { font-size: 1.2rem; }
}

@media (max-width: 360px) {
  .site-nav { gap: 0 0.5rem; font-size: 0.875rem; }
}

/* Diagrams */
figure.dgm { margin: 2rem 0 2.25rem; padding: 1.5rem 0 0; border-top: 1px solid var(--rule); font-family: var(--ui); }
.dgm figcaption { margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.dgm ul, .dgm ol { list-style: none; margin: 0; padding: 0; }
.dgm li { margin: 0; }
.dgm strong { display: block; font-family: var(--head); font-size: 1.15rem; font-weight: 500; line-height: 1.2; color: var(--spruce); }
.dgm li > span, .dgm div > span { display: block; margin-top: 0.3rem; font-size: 0.95rem; line-height: 1.45; color: var(--soft); }
.dgm p { margin: 0; max-width: none; }

.dgm-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.5rem; }
.dgm-steps li { position: relative; padding-top: 2.6rem; }
.dgm .dgm-n { position: absolute; top: 0; left: 0; margin: 0; font-family: var(--head); font-size: 1.6rem; line-height: 1; color: var(--ochre); }
.dgm-steps li:not(:last-child)::after { content: ""; position: absolute; top: 0.8rem; left: 1.6rem; right: -0.75rem; height: 1px; background: var(--rule); transform-origin: left; }
.dgm-after { margin-top: 1.25rem !important; color: var(--ink); }
.dgm-lead { margin-top: 1.75rem !important; margin-bottom: 0.6rem !important; font-weight: 600; color: var(--spruce); }
.dgm-options { display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; }
.dgm-options li { position: relative; padding-left: 1rem; font-family: var(--head); font-size: 1.15rem; color: var(--spruce); }
.dgm-options li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--ochre); }

.dgm-top { width: min(100%, 24rem); margin: 0 auto 1rem; text-align: center; }
.dgm-top::after { content: ""; display: block; width: 1px; height: 1.25rem; margin: 0.75rem auto 0; background: var(--soft); }
.dgm-base ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dgm-base li { padding: 0.25rem 1.25rem 1rem; border-left: 1px solid var(--rule); }
.dgm-base li:first-child { border-left: 0; padding-left: 0; }
.dgm-base p { padding-top: 0.6rem; border-top: 2px solid var(--spruce); text-align: center; font-weight: 600; color: var(--spruce); }

.dgm-orbit { position: relative; width: min(100%, 34rem); aspect-ratio: 1; margin: 0 auto; }
.dgm-wheel .dgm-spokes { position: absolute; inset: 0; margin: 0; padding: 0; }
.dgm-wheel .dgm-spokes::before { content: ""; position: absolute; inset: 14%; border: 1px solid var(--rule); border-radius: 50%; }
.dgm-spokes li { position: absolute; left: calc(50% + 36% * sin(var(--a))); top: calc(50% - 36% * cos(var(--a))); translate: -50% -50%; width: 9rem; padding: 0.5rem; text-align: center; background: var(--paper); }
.dgm-hub { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; display: grid; place-content: center; width: 9.5rem; aspect-ratio: 1; padding: 1rem; text-align: center; background: var(--paper); border: 1.5px solid var(--spruce); border-radius: 50%; }
.dgm-hub strong { font-size: 1.35rem; }

.dgm-circles { position: relative; display: flex; justify-content: center; padding: 0.5rem 0 3.5rem; }
.dgm-c { display: flex; flex-direction: column; justify-content: center; width: 15rem; aspect-ratio: 1; border-radius: 50%; text-align: center; }
.dgm-c1 { padding: 0 4.75rem 0 1.75rem; border: 1.5px solid var(--spruce); }
.dgm-c2 { margin-left: -4rem; padding: 0 1.75rem 0 4.75rem; border: 1.5px solid var(--ochre); background: rgb(42 111 168 / 0.06); }
.dgm-mid { position: absolute; left: 50%; bottom: 0; translate: -50% 0; white-space: nowrap; font-family: var(--head); font-size: 1.2rem; color: var(--spruce); }
.dgm-mid::before { content: ""; position: absolute; left: 50%; top: -1.6rem; width: 1px; height: 1.3rem; background: var(--soft); }

.dgm-sum { display: flex; align-items: stretch; gap: 1rem; }
.dgm-sum li { flex: 1; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.dgm-sum .dgm-op { flex: 0 0 auto; align-self: center; padding: 0; border: 0; font-family: var(--head); font-size: 1.75rem; color: var(--ochre); }
.dgm-sum .dgm-result { border-top: 2px solid var(--spruce); }

.dgm-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.dgm-in li { padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.dgm-out { position: relative; margin-top: 2.75rem; padding-top: 0.75rem; border-top: 2px solid var(--spruce); text-align: center; }
.dgm-out::before { content: ""; position: absolute; left: 50%; top: -2.25rem; width: 1px; height: 1.75rem; background: var(--soft); }

.dgm-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.dgm-track::before { content: ""; position: absolute; top: 0.45rem; left: 0.45rem; right: 0; height: 1px; background: var(--spruce); transform-origin: left; }
.dgm-track li { position: relative; padding-top: 1.75rem; }
.dgm-track strong { font-size: 1.05rem; }
.dgm .dgm-dot { position: absolute; top: 0; left: 0; width: 0.9rem; height: 0.9rem; margin: 0; background: var(--paper); border: 2px solid var(--spruce); border-radius: 50%; box-sizing: border-box; }


@media (max-width: 600px) {
  .dgm-steps { grid-template-columns: 1fr; gap: 1.1rem; }
  .dgm-steps li { padding: 0 0 0 2.25rem; min-height: 2.5rem; }
  .dgm-steps li:not(:last-child)::after { top: 2.1rem; bottom: -0.85rem; left: 0.45rem; right: auto; width: 1px; height: auto; transform-origin: top; }
  .dgm-base ul, .dgm-in { grid-template-columns: 1fr; }
  .dgm-base li, .dgm-base li:first-child { padding: 0.75rem 0; border-left: 0; border-top: 1px solid var(--rule); }
  .dgm-orbit { aspect-ratio: auto; width: auto; }
  .dgm-wheel .dgm-spokes { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .dgm-wheel .dgm-spokes::before { display: none; }
  .dgm-spokes li { position: static; translate: none; width: auto; }
  .dgm-hub { position: static; translate: none; width: 8.5rem; margin: 0 auto 1rem; }
  .dgm-circles { flex-direction: column; align-items: center; }
  .dgm-c { width: 13rem; justify-content: flex-start; }
  .dgm-c1 { padding: 2.25rem 1.5rem 4.5rem; }
  .dgm-c2 { margin: -4rem 0 0; padding: 4.75rem 1.5rem 2rem; }
  .dgm-circles { padding-bottom: 0.5rem; }
  .dgm-mid { top: 50%; bottom: auto; translate: -50% -50%; }
  .dgm-mid::before { display: none; }
  .dgm-sum { flex-direction: column; }
  .dgm-track { grid-template-columns: 1fr; }
  .dgm-track::before { top: 0.55rem; bottom: 0.5rem; left: 0.45rem; right: auto; width: 1px; height: auto; transform-origin: top; }
  .dgm-track li { padding: 0 0 0 2rem; }
  .creds { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.site-nav a.nav-request, .site-nav a.nav-request:hover { background: var(--button); color: #fff; }
.site-nav a.nav-request:hover { background: var(--button-hover); }

/* Concentric rings, as on his current site */
.hero-photo { position: relative; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 72px rgb(255 255 255 / 0.035), 0 0 0 144px rgb(255 255 255 / 0.022); }
@media (max-width: 860px) { .hero-photo::before { box-shadow: 0 0 0 32px rgb(255 255 255 / 0.035), 0 0 0 64px rgb(255 255 255 / 0.022); } }
.hero, .band.tide, .band.spruce { position: relative; overflow: hidden; overflow: clip; isolation: isolate; }
.band.tide::after, .band.spruce::after {
  content: ""; position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 1px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 0 0 70px rgb(255 255 255 / 0.035), 0 0 0 140px rgb(255 255 255 / 0.025);
}
.band.tide::after { width: 30rem; top: -12rem; right: -6rem; }
.band.spruce::after { width: 34rem; bottom: -16rem; left: -10rem; }
.band.sage { position: relative; overflow: hidden; overflow: clip; isolation: isolate; }
.band.sage::before {
  content: ""; position: absolute; z-index: -1; width: 40rem; aspect-ratio: 1; top: -14rem; right: -16rem; border-radius: 50%; pointer-events: none;
  border: 1px solid rgb(42 111 168 / 0.12);
  box-shadow: 0 0 0 70px rgb(42 111 168 / 0.03), 0 0 0 140px rgb(42 111 168 / 0.02);
}
@media (min-width: 1000px) {
  main:has(> .wrap > .page) { position: relative; overflow: hidden; overflow: clip; isolation: isolate; }
  main:has(> .wrap > .page)::before {
    content: ""; position: absolute; z-index: -1; width: 34rem; aspect-ratio: 1; top: -8rem; right: -8rem; border-radius: 50%; pointer-events: none;
    border: 1px solid rgb(42 111 168 / 0.14);
    box-shadow: 0 0 0 64px rgb(42 111 168 / 0.035), 0 0 0 128px rgb(42 111 168 / 0.022);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header .wrap, .brand-mark, .brand-name, .brand-name small { transition: none; }
}

/* Motion. Hero plays once on load; diagrams are tied to scroll position, so a
   screenshot or a quick scroll always shows them complete once they are on screen. */
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0; } }
@keyframes draw-x { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes draw-y { from { scale: 1 0; } to { scale: 1 1; } }
@keyframes appear { from { opacity: 0; } }
@keyframes ring-out { to { scale: 1.3; opacity: 0.4; } }
@keyframes ring-in { from { scale: 0.7; opacity: 0.3; } }
@keyframes join-l { from { translate: -18% 0; } to { translate: 0 0; } }
@keyframes join-r { from { translate: 18% 0; } to { translate: 0 0; } }
@keyframes pop { from { scale: 0.8; opacity: 0; } to { scale: 1; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero p, .hero .action { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero p { animation-delay: 0.12s; }
  .hero .action { animation-delay: 0.24s; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .dgm { view-timeline: --dgm block; }
    /* Rings: the ones at the top widen as you scroll down; the rest grow in as their band arrives. */
    .hero-photo::before, main:has(> .wrap > .page)::before { animation: ring-out linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
    .band.tide, .band.spruce, .band.sage { view-timeline: --band block; }
    .band.tide::after, .band.spruce::after, .band.sage::before { animation: ring-in ease-out both; animation-timeline: --band; animation-range: entry 0% cover 50%; }
    .dgm [style*="--i"], .dgm-c, .dgm-hub, .dgm-out { animation-timeline: --dgm; animation-fill-mode: both; animation-timing-function: ease-out; animation-range: entry 10% entry calc(55% + var(--i, 0) * 9%); }
    .dgm [style*="--i"] { animation-name: rise; }
    .dgm .dgm-mid { animation-name: appear; }
    .dgm-steps li:not(:last-child)::after, .dgm-track::before { animation: draw-x linear both; animation-timeline: --dgm; animation-range: entry 25% entry 90%; }
    .dgm-c1 { animation-name: join-l; }
    .dgm-c2 { animation-name: join-r; }
    .dgm-hub, .dgm-out, .dgm .dgm-spokes li { animation-name: pop; }
    .dgm-hub, .dgm-out { --i: 3; }
  }
  @media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
    .dgm-steps li:not(:last-child)::after, .dgm-track::before { animation-name: draw-y; }
  }
}
/* Diagrams already on screen at load play a short timed intro instead. */
@media (prefers-reduced-motion: no-preference) {
  .dgm-intro [style*="--i"] { animation: rise 0.7s ease-out both; animation-delay: calc(var(--i, 0) * 110ms + 0.2s); }
  .dgm-intro .dgm-mid { animation-name: appear; }
  .dgm-intro .dgm-hub, .dgm-intro .dgm-out, .dgm-intro .dgm-spokes li { animation: pop 0.7s ease-out both; animation-delay: calc(var(--i, 0) * 110ms + 0.2s); }
  .dgm-intro .dgm-c1 { animation: join-l 0.9s ease-out both 0.2s; }
  .dgm-intro .dgm-c2 { animation: join-r 0.9s ease-out both 0.2s; }
  .dgm-intro .dgm-steps li:not(:last-child)::after, .dgm-intro .dgm-track::before { animation: draw-x 0.9s ease-out both 0.3s; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
  .dgm-intro .dgm-steps li:not(:last-child)::after, .dgm-intro .dgm-track::before { animation-name: draw-y; }
}
