/*
 * Compiled Health — shared finishing layer
 *
 * The site is intentionally quiet. Full-width bands provide the canvas;
 * typography, whitespace, and the evidence itself provide the hierarchy.
 */

@font-face {
  font-family: "Merlo";
  src: url("/Merlo-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Two-family system: Merlo for editorial copy, the platform UI face for
   * navigation and every secondary/utilitarian label. */
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Merlo", Georgia, serif;
  --paper: #ffffff;
  --wt: #ffffff;
  --ink: #282828;
  --mid: #504945;
  --soft: #76716b;
  --rule: #e3e1de;
  --warrant: #12395e;
  --sample: #6f6194;
  --alarm: #a4463b;
  --page-gutter: clamp(1rem, 1.8vw, 1.3rem);
  --mast-gutter: clamp(0.75rem, 1vw, 1rem);
  --composition: 72rem;
  --wide-composition: 88rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: auto;
}

/*
 * Motion is not part of the visual hierarchy. Interactive state changes remain
 * available, but they resolve immediately and every figure ships at rest.
 */

*,
*::before,
*::after {
  animation: none !important;
  transition: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
}

::selection {
  background: rgba(18, 57, 94, 0.18);
  color: inherit;
}

/* Merlo ships here in its intended regular cut; titles should not synthesize
 * heavier weights that the typeface does not provide. */
body[class] :is(h1, h2, h3, h4, h5, h6) {
  font-weight: 400 !important;
}

html.nav-open,
html.nav-open body {
  overflow: hidden;
}

a {
  text-underline-offset: 0.16em;
}

:focus-visible {
  outline: 2px solid var(--warrant);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  z-index: 100;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: var(--ink);
  color: #fff;
  font: 600 0.78rem/1 var(--sans);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

/* Shared shell */

.mast {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 0;
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.mast .in {
  width: 100%;
  max-width: none;
  min-height: 55px;
  margin: 0;
  padding: 0.2rem var(--mast-gutter);
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  max-width: calc(100% - 3.75rem);
  line-height: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  width: clamp(13rem, 18vw, 17rem);
  max-width: 100%;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.5vw, 1.55rem);
  margin-left: auto;
}

.nav a,
.btn,
.bmini,
.rmodal .btn.pri,
#citecopy,
.verify,
.switch button,
.cs-seg button,
.cs-crit button {
  font-family: var(--sans);
  letter-spacing: 0.01em;
}

.nav a {
  padding: 0.55rem 0;
  color: var(--mid);
  font-size: 0.82rem;
  text-transform: none;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink) !important;
}

.navtoggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  flex: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.navtoggle span {
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

.navtoggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.navtoggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.navtoggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Full-width canvas, restrained inner compositions */

.wrap {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.page-home #hero {
  width: 100%;
  max-width: var(--wide-composition);
  margin-inline: auto;
  display: block;
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.page-home #hero .txtcol {
  width: min(100%, 39rem);
  margin-inline: auto;
  text-align: left;
}

.page-home #hero .mani p {
  max-width: none;
}

.page-home #hero .newline {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.page-home #hero h1.dsp {
  text-align: center;
}

.page-home .home-assembly .pz {
  transform: none !important;
}

.page-home .home-assembly .seamA,
.page-home .home-assembly .seamB {
  opacity: 0 !important;
}

.page-home .band > .wrap,
.page-home .pstrip > .wrap,
.page-product .band > .wrap,
.page-product .gstrip > .wrap,
.page-product > main > .wrap {
  max-width: var(--composition);
}

.page-home .rescard {
  max-width: 78rem;
  margin-inline: auto;
}

.page-research .rhead .wrap,
.page-research #writing .wrap,
.page-not-found .rhead .wrap,
.page-not-found main > .wrap {
  max-width: 54rem;
}

.band {
  padding: clamp(6.5rem, 9vw, 9rem) 0;
  border-top: 0;
}

.band.white {
  background: var(--paper);
}

/* Keep the content, remove the containers around it. */

.pstrip {
  padding: 3.3rem 0 3.8rem;
  border: 0;
  background: transparent;
}

.pbox {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pbox > .k {
  display: block;
  margin-bottom: 1.8rem;
  text-align: left;
}

.lwm {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  overflow: visible;
}

.lwt {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem clamp(1.6rem, 3.5vw, 3.5rem);
  animation: none !important;
  transform: none !important;
}

.lwt img {
  width: auto;
  height: 21px;
  margin: 0 !important;
  flex: none;
  filter: grayscale(1);
  opacity: 0.58;
}

.lwt img:nth-child(1) { order: 1; }
.lwt img:nth-child(2) { order: 2; }
.lwt img:nth-child(3) { order: 3; }
.lwt img:nth-child(4) { order: 7; }
.lwt img:nth-child(5) { order: 5; }
.lwt img:nth-child(6) { order: 6; }
.lwt img:nth-child(7) { order: 4; }

.page-home #pcare .pcopy {
  width: 100%;
  max-width: none;
  margin: 0;
}

.page-home #pcare .pcare-wordmark {
  display: inline-block;
  width: auto;
  height: 0.78em;
  vertical-align: -0.06em;
}

.page-home .closeband > .wrap {
  max-width: var(--composition);
}

.page-home .closeband h2,
.page-home .closeband .closesub {
  max-width: none;
}

.prow + .prow {
  border-top: 0;
}

.figframe {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.figframe .cap {
  padding: 0.7rem 0 0;
  border-top: 0;
  background: transparent;
}

/*
 * Figure system
 *
 * These are explanatory instruments, not miniature product interfaces.
 * Geometry carries the argument; colour only identifies semantic roles.
 */

.figure-system {
  --figure-ink: var(--ink);
  --figure-muted: var(--soft);
  --figure-hairline: color-mix(in srgb, var(--rule) 82%, transparent);
  --figure-grid: color-mix(in srgb, var(--rule) 55%, transparent);
  --figure-blue-wash: color-mix(in srgb, var(--warrant) 7%, transparent);
  --figure-violet-wash: color-mix(in srgb, var(--sample) 8%, transparent);
  position: relative;
  isolation: isolate;
  color: var(--figure-ink);
}

svg.figure-system {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.figure-system .viz-axis {
  fill: none;
  stroke: var(--figure-ink);
  stroke-width: 1.1;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.figure-system .viz-grid {
  fill: none;
  stroke: var(--figure-grid);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.figure-system .viz-rule {
  fill: none;
  stroke: var(--figure-hairline);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.figure-system .viz-warrant {
  color: var(--warrant);
}

.figure-system .viz-warrant:not([fill]) {
  fill: var(--warrant);
}

.figure-system .viz-warrant:not([stroke]) {
  stroke: var(--warrant);
}

.figure-system .viz-sample {
  color: var(--sample);
}

.figure-system .viz-sample:not([fill]) {
  fill: var(--sample);
}

.figure-system .viz-sample:not([stroke]) {
  stroke: var(--sample);
}

.figure-system .viz-alarm {
  color: var(--alarm);
}

.figure-system .viz-alarm:not([fill]) {
  fill: var(--alarm);
}

.figure-system .viz-alarm:not([stroke]) {
  stroke: var(--alarm);
}

.figure-system .viz-surface {
  fill: var(--figure-blue-wash);
  stroke: var(--warrant);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.figure-system .viz-focus {
  fill: var(--paper);
  stroke: var(--figure-ink);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.figure-system .viz-label,
.figure-system .viz-note,
.figure-system .viz-value {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums lining-nums;
}

.figure-system .viz-label {
  fill: var(--mid);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.figure-system .viz-note {
  fill: var(--figure-muted);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.figure-system .viz-value {
  fill: var(--figure-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.figure-ledger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem 1rem;
  align-items: baseline;
  padding-block: 0.8rem;
  border-block: 1px solid var(--rule);
  font: 500 0.68rem/1.45 var(--sans);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.figure-ledger > :nth-child(3n + 1) {
  color: var(--soft);
}

.figure-ledger > :nth-child(3n + 2) {
  color: var(--mid);
}

.figure-ledger > :nth-child(3n) {
  color: var(--ink);
  text-align: right;
}

.figure-action {
  appearance: none;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--mid);
  cursor: pointer;
  font: 600 0.64rem/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.figure-action:hover {
  color: var(--warrant);
}

.figure-action[disabled] {
  border-bottom-color: transparent;
  color: var(--soft);
  cursor: default;
}

.rescard {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rc-side {
  border-left: 1px solid var(--rule);
}

/* Product pages: technical boundaries remain, ornamental boxes do not. */

.gstrip {
  border: 0;
  background: transparent;
}

.glance {
  border: 0;
}

.gcell {
  border: 0 !important;
  background: transparent;
}

.mpanel {
  padding: 1.2rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.insp {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.insp-h {
  border-bottom: 1px solid var(--rule);
}

.insp-f {
  border-top: 1px solid var(--rule);
  background: transparent;
}

.irail {
  background: transparent;
}

.dfig,
.dt {
  border-radius: 0;
}

.ccard,
.ocard,
.vcard {
  background: transparent;
}

/* One quiet, editorial close rather than a promotional slab. */

.closeband {
  padding: clamp(6.5rem, 9vw, 9rem) 0;
  border: 0;
  background: var(--paper);
  text-align: left;
}

.closeband > .wrap {
  max-width: 48rem;
}

.closeband h2 {
  max-width: 26ch;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.closeband .closesub {
  max-width: 36rem;
  margin: 0 0 2.2rem;
  color: var(--mid);
}

.closeband .ctas {
  justify-content: flex-start;
  margin: 0;
}

.closeband .btn.pri,
.closeband .btn.pri:hover {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
}

.closeband .btn.sec,
.closeband .btn.sec:hover {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
}

.closeband .mail,
.closeband .mail:hover {
  color: var(--mid);
  border-bottom-color: currentColor;
}

.closeband :focus-visible {
  outline-color: var(--warrant);
}

.closeband ::selection {
  background: rgba(18, 57, 94, 0.18);
}

.btn,
.bmini {
  border-radius: 0;
}

.btn.sec {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
}

.page-home a.btn.pri,
.page-product a.btn.pri,
.page-research a.btn.pri {
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
}

.page-home .newline .tag {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--soft);
}

.page-home .shead.center,
.page-home #research .shead.compact {
  text-align: left;
}

.page-home .shead.center .stand {
  margin-left: 0;
}

.page-home .shead .hl {
  display: none;
}

.rmodal {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Research and essay */

.resrow {
  margin: 0;
  padding: 1.8rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
}

.resrow:hover {
  background: transparent;
  color: var(--warrant);
}

.page-research .resrow .rtag {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--soft);
  font-weight: 600;
}

.page-research .resrow .go {
  display: none;
}

.page-essay .cert {
  padding: 1.4rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
}

.page-essay .pull {
  padding: 0;
  border: 0;
  font-size: 1.42rem;
}

.page-essay figure {
  padding: 0;
  background: transparent;
}

/* The 404 trace is information, not a loading effect. */

#trace span {
  opacity: 1 !important;
  transform: none !important;
}

/* Policy pages */

.page-policy {
  font: 400 1rem/1.7 var(--serif);
}

.policy-main {
  width: 100%;
  padding: clamp(5rem, 9vw, 8.5rem) var(--page-gutter) clamp(7rem, 11vw, 11rem);
}

.policy {
  max-width: 44rem;
  margin: 0 auto;
}

.policy .eyebrow {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--soft);
  font: 600 0.68rem/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.policy h1 {
  margin: 0 0 1.2rem;
  font: 500 clamp(2.25rem, 6vw, 3.5rem)/1.02 var(--serif);
  letter-spacing: -0.025em;
}

.policy .updated {
  margin: 0 0 clamp(3.5rem, 7vw, 5.5rem);
  color: var(--soft);
  font: 500 0.75rem/1.5 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.policy h2 {
  margin: 3.2rem 0 0.85rem;
  font: 600 clamp(1.35rem, 3vw, 1.7rem)/1.2 var(--serif);
  letter-spacing: -0.015em;
}

.policy p,
.policy li {
  color: var(--mid);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.08rem);
}

.policy p {
  margin: 0 0 1.2rem;
}

.policy ul {
  margin: 0.5rem 0 1.4rem;
  padding-left: 1.2rem;
}

.policy a {
  color: var(--warrant);
}

@media (max-width: 940px) {
  .page-home .band > .wrap,
  .page-home .pstrip > .wrap,
  .page-product .band > .wrap,
  .page-product .gstrip > .wrap,
  .page-product > main > .wrap {
    max-width: none;
  }

  .rc-side {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .mast .in {
    min-height: 50px;
  }

  .brand,
  .navtoggle {
    position: relative;
    z-index: 42;
  }

  .brand img {
    width: min(14rem, calc(100vw - 5.5rem));
  }

  .navtoggle {
    display: flex;
  }

  .nav {
    position: fixed;
    z-index: 41;
    inset: 0;
    min-height: 100dvh;
    margin: 0;
    padding: clamp(6.5rem, 18vh, 9rem) var(--page-gutter) max(2rem, env(safe-area-inset-bottom));
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.25rem;
    overflow-y: auto;
    border: 0;
    box-shadow: none;
    background: var(--paper);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    min-height: auto;
    padding: 0.65rem 0;
    color: var(--ink);
    font: 400 clamp(1.35rem, 6vw, 2rem)/1.25 var(--sans);
    letter-spacing: 0;
    text-transform: none;
  }

  .band,
  .closeband {
    padding: 4.75rem 0;
  }

  .pstrip {
    padding: 2.8rem 0 3.25rem;
  }

  .lwt {
    justify-content: center;
    gap: 1.25rem 1.75rem;
  }

  .lwt img {
    height: 19px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .navtoggle span {
    transition: none;
  }

  .lwt {
    animation: none !important;
  }

  .figure-system *,
  .figure-system *::before,
  .figure-system *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  html,
  body {
    background: #fff;
  }

  .mast,
  .navtoggle,
  .closeband,
  .artctl {
    display: none !important;
  }
}
