/* VetGnosis website — "the case, written properly".
   One stylesheet for every route. Palette taken from the app (scrub slate, mint) and the logo (coral).
   Coral is reserved for clinical flags: limits, connection requirements, errors. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #10282a;
  --ink-2: #3c5355;
  --ink-3: #566b6c;
  --paper: #f3f5f1;
  --paper-2: #e7ece7;
  --white: #ffffff;
  --rule: #cdd7d2;
  --rule-strong: #a9bbb3;
  --field: #758a83;
  --slate: #0f2a2b;
  --slate-deep: #0a2021;
  --slate-2: #173b3a;
  --slate-rule: rgba(196, 226, 214, 0.16);
  --on-slate: #edf4f0;
  --on-slate-2: #a9c2bb;
  --mint: #7fd3b9;
  --mint-soft: #d5f1e7;
  --teal: #0b6e5f;
  --teal-deep: #085246;
  --coral: #c8414f;
  --coral-ink: #8e2a35;
  --coral-light: #fe8c99;
  --focus: #0b6e5f;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-device: 30px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  color: inherit;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 460;
  letter-spacing: -0.012em;
  line-height: 1.06;
  text-wrap: balance;
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
}

p {
  margin: 0;
}

p + p {
  margin-top: 0.9em;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--teal-deep);
  text-decoration-thickness: 2px;
}

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

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

[hidden] {
  display: none !important;
}

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

.wrap.narrow {
  max-width: 820px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-s);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Dark contexts flip the shared tokens so buttons, links and focus stay legible. */
.site-header,
.hero,
.band-dark,
.site-footer {
  --focus: var(--mint);
  background: var(--slate);
  color: var(--on-slate);
}

.hero a:not(.button),
.band-dark a:not(.button),
.site-footer a {
  color: var(--mint);
}

.hero a:not(.button):hover,
.band-dark a:not(.button):hover,
.site-footer a:hover {
  color: var(--white);
}

/* ---------- Type helpers ---------- */

.kicker {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero .kicker,
.band-dark .kicker {
  color: var(--mint);
}

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 38em;
}

.hero .lede,
.band-dark .lede {
  color: var(--on-slate-2);
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
}

.aside-note {
  font-size: 0.95rem;
  color: var(--ink-3);
  margin-top: 20px;
}

.section-footnote {
  font-size: 0.92rem;
  color: var(--ink-3);
  margin-top: 12px;
}

.tick-list,
.dash-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tick-list li,
.dash-list li {
  position: relative;
  padding-left: 28px;
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.42em;
  width: 6px;
  height: 11px;
  border: solid var(--teal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.band-dark .tick-list li::before,
.hero .tick-list li::before {
  border-color: var(--mint);
}

.dash-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 12px;
  border-top: 2px solid var(--ink-3);
}

.flag {
  margin-top: 22px;
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--coral);
  color: var(--coral-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.95rem;
}

.button-primary {
  background: var(--slate);
  color: var(--white);
}

.button-primary:hover {
  background: var(--slate-2);
  color: var(--white);
}

.button-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--white);
}

.button-quiet {
  background: transparent;
  color: var(--ink);
  padding-inline: 6px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.button-quiet:hover {
  color: var(--teal);
}

.site-header .button-primary,
.hero .button-primary,
.band-dark .button-primary {
  background: var(--mint);
  color: var(--slate);
}

.site-header .button-primary:hover,
.hero .button-primary:hover,
.band-dark .button-primary:hover {
  background: #a3e2ce;
  color: var(--slate);
}

.hero .button-secondary,
.band-dark .button-secondary {
  border-color: var(--on-slate-2);
  color: var(--on-slate);
}

.hero .button-secondary:hover,
.band-dark .button-secondary:hover {
  background: var(--on-slate);
  color: var(--slate);
}

.hero .button-quiet,
.band-dark .button-quiet {
  color: var(--on-slate);
}

.hero .button-quiet:hover,
.band-dark .button-quiet:hover {
  color: var(--mint);
}

.button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 30px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--slate-rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-slate);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-header .brand,
.site-footer .brand {
  color: var(--on-slate);
}

.brand img {
  width: 36px;
  height: 36px;
}

.header-panel {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 24px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}

.site-nav a,
.header-login {
  color: var(--on-slate-2);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-s);
}

.site-nav a:hover,
.header-login:hover {
  color: var(--white);
}

.site-nav a[aria-current="page"] {
  color: var(--white);
  box-shadow: inset 0 -2px 0 var(--mint);
  border-radius: 0;
}

.header-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--slate-rule);
  border-radius: var(--radius-s);
  color: var(--on-slate);
  font: 600 0.95rem var(--sans);
  cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-toggle-bars {
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-bars::before {
  top: -6px;
}

.menu-toggle-bars::after {
  top: 6px;
}

.nav-open .menu-toggle-bars {
  background: transparent;
}

.nav-open .menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-open .menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: var(--slate);
    border-bottom: 1px solid var(--slate-rule);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav-open .header-panel {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    margin: 0;
  }

  .site-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--slate-rule);
    border-radius: 0;
    padding-inline: 0;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--mint);
    padding-left: 14px;
  }

  .header-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .header-login {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--slate-rule);
  }

  .header-ctas .button {
    min-height: 48px;
  }
}

/* ---------- Device frame (real app screens) ---------- */

.device {
  margin: 0;
  width: 100%;
  max-width: var(--device-w, 320px);
}

.device-screen {
  aspect-ratio: var(--screen-ratio, auto);
  overflow: hidden;
  background: #0b1f27;
  border: 9px solid #061413;
  border-radius: var(--radius-device);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 28px 50px -28px rgba(6, 22, 21, 0.6);
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.device figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.band-dark .device figcaption,
.hero .device figcaption {
  color: var(--on-slate-2);
}

/* ---------- Detail crop (enlarged region of a real screen) ---------- */

.detail {
  margin: 0;
  width: 100%;
}

.detail-frame {
  overflow: hidden;
  background: #0b1f27;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(16, 40, 42, 0.12), 0 32px 60px -34px rgba(6, 22, 21, 0.55);
}

.detail-frame img {
  width: 100%;
  height: auto;
}

.detail figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 5vw, 72px) 0 clamp(48px, 6vw, 80px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  line-height: 1.03;
  color: #f4faf6;
  max-width: 14ch;
}

.hero .lede {
  margin-top: 26px;
}

.hero-note {
  margin-top: 26px;
  padding-left: 14px;
  border-left: 2px solid var(--mint);
  font-size: 0.95rem;
  color: var(--on-slate-2);
  max-width: 34em;
}

.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 560px;
}

.hero-visual > .device,
.hero-visual-caption {
  position: relative;
  z-index: 1;
}

/* The emblem stands left of the screen; its network lines run behind the phone. */
.hero-emblem {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  width: min(66%, 390px);
  margin-left: -3%;
  pointer-events: none;
}

.hero-device-front {
  grid-column: 2;
  grid-row: 1;
  --device-w: 290px;
  width: 290px;
}

.hero-device-front .device-screen {
  box-shadow: 0 0 0 1px rgba(127, 211, 185, 0.18), 0 40px 70px -30px rgba(0, 0, 0, 0.75);
}

.hero-visual-caption {
  grid-column: 1 / -1;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--on-slate-2);
  max-width: 34em;
  justify-self: end;
}

/* ---------- Emblem (veterinary V, staff and serpent) ----------
   One orchestrated moment on load in the hero; a single draw-in for the closing mark;
   a loop only while the account is loading. Final states are the defaults, so reduced
   motion (animations off) and no-JavaScript both show the finished emblem. */

.emblem {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.em-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.em-ring,
.em-knob {
  transform-box: fill-box;
  transform-origin: center;
}

.em-pulse {
  opacity: 0;
  stroke-dasharray: 0.05 0.95;
}

/* The head rides the serpent's own path (offset-path is set inline in emblem.js). */
.em-head {
  offset-distance: 100%;
}

/* Fallback if a browser ignores offset-path on SVG: pin the head at the path end. */
.em-head-static {
  offset-path: none !important;
  transform: translate(213px, 106px) rotate(-24.4deg);
  animation: none !important;
}

.emblem-mark {
  overflow: hidden;
}

.hero-emblem .emblem {
  opacity: 0.92;
  filter: drop-shadow(0 0 18px rgba(127, 211, 185, 0.16));
  animation: em-settle 4.4s ease-out both;
}

.emblem-hero .em-halo,
.emblem-hero .em-ring {
  animation: em-bloom 1.1s 0.05s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Hero sequence (seconds): heartbeat 0.1, staff 0.55-1.35 then knob, V 0.85, serpent body and
   riding head 1.25-2.8 at constant speed with the weave timed to its crossings, tongue 2.95, pulse 3. */
.emblem-hero .em-beat {
  animation: em-draw 1.4s 0.1s cubic-bezier(0.45, 0, 0.25, 1) both;
}

.emblem-hero .em-staff {
  animation: em-draw 0.8s 0.55s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.emblem-hero .em-knob {
  animation: em-pop 0.4s 1.3s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.emblem-hero .em-v {
  animation: em-draw 1s 0.85s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.emblem-hero {
  --climb-start: 1.25s;
  --climb: 1.55s;
}

.emblem-play {
  --climb-start: 0.75s;
  --climb: 1.55s;
}

/* The tapered body is revealed by a mask stroke climbing the serpent line at constant speed;
   the head rides the same line, and each under-crossing switches on as the body reaches it
   (fractions --weave-1 / --weave-2 are measured at build time in emblem.js). */
.emblem-hero .em-reveal,
.emblem-play .em-reveal {
  animation: em-draw var(--climb) var(--climb-start) linear both;
}

.emblem-hero .em-head,
.emblem-play .em-head {
  animation: em-ride var(--climb) var(--climb-start) linear both;
}

.emblem-hero .em-weave-1,
.emblem-play .em-weave-1 {
  animation: em-fade 0.06s calc(var(--climb-start) + var(--weave-1) * var(--climb)) linear both;
}

.emblem-hero .em-weave-2,
.emblem-play .em-weave-2 {
  animation: em-fade 0.06s calc(var(--climb-start) + var(--weave-2) * var(--climb)) linear both;
}

/* One flick of the tongue once the head arrives. */
.em-tongue {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
}

.emblem-hero .em-tongue {
  animation: em-flick 0.7s 2.95s ease-in-out both;
}

.emblem-play .em-tongue {
  animation: em-flick 0.7s 2.45s ease-in-out both;
}

/* Three heartbeats along the trace, running out behind the app screen, then rest. */
.emblem-hero .em-pulse {
  animation: em-pulse 3.4s 3s cubic-bezier(0.4, 0, 0.6, 1) 3 both;
}

/* Closing mark: same sequence, 0.5s sooner, then a single heartbeat. */
.emblem-waiting .em-draw {
  stroke-dashoffset: 1;
}

.emblem-waiting .em-weave,
.emblem-waiting .em-knob,
.emblem-waiting .em-head {
  opacity: 0;
}

.emblem-play .em-beat {
  animation: em-draw 1.4s 0s cubic-bezier(0.45, 0, 0.25, 1) both;
}

.emblem-play .em-staff {
  animation: em-draw 0.8s 0.2s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.emblem-play .em-knob {
  animation: em-pop 0.4s 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.emblem-play .em-v {
  animation: em-draw 1s 0.45s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.emblem-play .em-pulse {
  animation: em-pulse 3.4s 2.45s cubic-bezier(0.4, 0, 0.6, 1) 1 both;
}

.emblem-mark .em-beat {
  stroke-width: 4;
}

.emblem-loader .em-serpent-gap {
  stroke: var(--white);
}

.emblem-loader .em-staff,
.emblem-loader .em-serpent,
.emblem-loader .em-tail {
  stroke-linecap: round;
}

.emblem-loader .em-staff,
.emblem-loader .em-serpent,
.emblem-loader .em-tail {
  stroke: var(--teal);
}

.emblem-loader .em-staff,
.emblem-loader .em-serpent,
.emblem-loader .em-serpent-gap,
.emblem-loader .em-tail {
  animation: em-loop 1.8s cubic-bezier(0.45, 0, 0.25, 1) infinite alternate;
}

@keyframes em-flick {
  0%,
  100% {
    transform: scaleX(0);
  }
  25%,
  45% {
    transform: scaleX(1);
  }
  35% {
    transform: scaleX(0.75);
  }
}

@keyframes em-ride {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 1;
  }
}

@keyframes em-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes em-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes em-loop {
  0%,
  10% {
    stroke-dashoffset: 1;
  }
  90%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes em-bloom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes em-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes em-pulse {
  0% {
    opacity: 0;
    stroke-dashoffset: 0.05;
  }
  4% {
    opacity: 1;
  }
  62% {
    opacity: 1;
    stroke-dashoffset: -0.95;
  }
  63%,
  100% {
    opacity: 0;
    stroke-dashoffset: -0.95;
  }
}

/* Bright while it draws, then steps back so the app screens stay readable. */
@keyframes em-settle {
  0%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
  }
}

.home-close-head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
}

.close-emblem {
  flex: none;
  width: clamp(96px, 11vw, 148px);
}

.account-loading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.loader-mark {
  flex: none;
  width: 22px;
  height: 62px;
}

/* ---------- Section scaffolding ---------- */

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head h2,
.page-hero h2,
.feature-copy h2,
.two-col h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.section-head p {
  margin-top: 16px;
  font-size: 1.12rem;
  color: var(--ink-2);
}

.section-head-row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 40px;
  flex-wrap: wrap;
}

.section-head-row > div {
  max-width: 44rem;
}

.soap,
.record,
.business,
.pricing-preview,
.faq-preview,
.pricing-section,
.packs,
.compare,
.start,
.walk,
.ai-io,
.reassess,
.clinic-status,
.principles,
.faq-page,
.contact-routes,
.tools {
  padding: clamp(48px, 7vw, 88px) 0;
}

.band-dark {
  padding: clamp(48px, 7vw, 88px) 0;
}

.band-tint {
  background: var(--paper-2);
  padding: clamp(56px, 7vw, 88px) 0;
}

.business,
.faq-preview,
.compare,
.tools {
  background: var(--white);
}

/* ---------- Home: SOAP spine (signature) ---------- */

.soap-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
}

.soap-rail {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.soap-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.soap-rail ol::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 34px;
  bottom: 34px;
  border-left: 1px solid var(--rule);
}

.soap-rail a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--ink-3);
}

.soap-rail-letter {
  width: 46px;
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  color: var(--rule-strong);
  background: var(--paper);
  transition: color 0.2s ease;
}

.soap-rail-term {
  font-size: 0.82rem;
  font-weight: 500;
}

.soap-rail a:hover .soap-rail-letter,
.soap-rail a[aria-current="step"] .soap-rail-letter {
  color: var(--teal);
}

.soap-rail a[aria-current="step"] {
  color: var(--ink);
}

.soap-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 4vw, 48px) 0;
  border-top: 1px solid var(--rule);
}

.soap-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.soap-copy {
  max-width: 34rem;
}

.soap-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
}

.soap-letter {
  display: none;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 0.9;
}

.soap-copy h3 {
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.soap-copy > p {
  margin-top: 16px;
  color: var(--ink-2);
}

.soap-device {
  justify-self: end;
}

/* The assessment is where the AI lives: give it a surface of its own. */
.soap-step-a {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: clamp(28px, 4vw, 48px);
  margin-block: 8px;
}

.soap-step-a {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.soap-step-a + .soap-step {
  border-top: 0;
}

.responsibility {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 48px);
  padding: 22px 26px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--coral);
  background: var(--white);
  border-radius: var(--radius-s);
}

.responsibility p {
  max-width: 60ch;
  font-weight: 500;
}

.responsibility-inline {
  margin-top: 28px;
  padding-left: 14px;
  border-left: 3px solid var(--coral);
  font-size: 0.97rem;
  font-weight: 500;
  max-width: 62ch;
}

.band-dark .responsibility-inline {
  border-left-color: var(--coral-light);
}

/* ---------- Home: offline band ---------- */

.offline-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.offline h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  max-width: 12ch;
}

.offline .lede {
  margin-top: 22px;
}

.connectivity-chart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--slate-rule);
}

.chart-col {
  padding: 22px 24px 8px 0;
}

.chart-col + .chart-col {
  padding-left: 24px;
  border-left: 1px solid var(--slate-rule);
}

.chart-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 14px;
}

.chart-head::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  flex-shrink: 0;
}

.chart-col-online .chart-head::before {
  background: transparent;
  border: 2px solid var(--coral-light);
}

.chart-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chart-col li {
  padding: 12px 0;
  border-top: 1px solid var(--slate-rule);
  color: var(--on-slate-2);
  font-size: 0.98rem;
}

/* ---------- Home: record ---------- */

.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(28px, 3vw, 44px) clamp(28px, 4vw, 56px);
  align-items: start;
}

.record-vitals {
  grid-row: span 2;
}

.record-vitals .detail {
  max-width: 420px;
}

.record-item {
  display: grid;
  gap: 18px;
}

.record-item p {
  margin-top: 6px;
  color: var(--ink-2);
}

.record-more {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  max-width: 62rem;
}

/* ---------- Home: business ---------- */

.business-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.business-copy h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.business-copy > p {
  margin-top: 18px;
  color: var(--ink-2);
}

.business-visual {
  position: relative;
  padding: 0 0 48px;
}

.business-ledger {
  --device-w: 290px;
}

.paper-doc {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(58%, 300px);
  margin: 0;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 24px 48px -24px rgba(16, 40, 42, 0.35);
}

/* ---------- Pricing ---------- */

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
}

.billing-toggle button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: 600 0.97rem var(--sans);
  cursor: pointer;
}

.billing-toggle button span {
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 4px;
}

.billing-toggle button.active,
.billing-toggle button[aria-pressed="true"] {
  background: var(--slate);
  color: var(--white);
}

.pricing-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 28px;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.pricing-card.featured {
  border: 2px solid var(--slate);
  padding: 27px;
}

.pricing-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1;
}

.plan-description {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.98rem;
  min-height: 3.2em;
}

.price-stack {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
}

.price {
  font-family: var(--serif);
  font-size: 3.1rem;
  font-weight: 450;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.price-period {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.plan-credits {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: var(--radius-s);
  display: grid;
  gap: 2px;
}

.featured .plan-credits {
  background: var(--mint-soft);
}

.plan-credits span {
  font-size: 0.88rem;
  color: var(--ink-3);
}

.plan-list {
  list-style: none;
  margin: 20px 0 28px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.97rem;
}

.plan-list li {
  position: relative;
  padding-left: 24px;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.4em;
  width: 5px;
  height: 10px;
  border: solid var(--teal);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pricing-card .button {
  margin-top: auto;
  width: 100%;
}

.pack-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.pack-row-copy p {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.pack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pack-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-s);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.pack-list a:hover {
  border-color: var(--ink);
}

.pack-list span {
  color: var(--teal);
  font-weight: 600;
}

.fine-list {
  margin: 22px 0 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 40px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.pricing-oneline {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--ink-3);
  max-width: 62rem;
}

.pack-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pack-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--white);
}

.pack-card .pack-price {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
}

.pack-card p:not(.pack-price) {
  color: var(--ink-2);
  margin-bottom: 12px;
}

.pack-card .button {
  margin-top: auto;
}

.packs {
  padding-top: 0;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.compare h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.compare-table th[scope="row"],
.compare-table thead th:first-child {
  text-align: left;
  font-weight: 500;
}

.compare-table thead th {
  background: var(--paper);
  font-weight: 600;
}

.compare-table tbody tr:last-child > * {
  border-bottom: 0;
}

.yes,
.no {
  font-size: 0;
}

.yes::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  border: solid var(--teal);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.no::before {
  content: "";
  display: inline-block;
  width: 14px;
  border-top: 2px solid var(--rule-strong);
  vertical-align: middle;
}

@media (max-width: 600px) {
  .table-scroll {
    overflow: visible;
    border: 0;
  }

  .compare-table {
    min-width: 0;
  }

  .compare-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .compare-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--rule);
    padding: 14px 0;
  }

  .compare-table th[scope="row"] {
    grid-column: 1 / -1;
    padding: 0 0 8px;
    border: 0;
  }

  .compare-table td {
    display: grid;
    justify-items: start;
    gap: 2px;
    padding: 0;
    border: 0;
    text-align: left;
    font-size: 0.92rem;
  }

  .compare-table td::before {
    content: attr(data-plan);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-3);
  }
}

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
}

.pay-grid h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.pay-grid > div > p {
  margin-top: 14px;
  color: var(--ink-2);
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.95rem;
}

/* Ordered steps: used only where order is real (getting started, paying). */
.numbered-steps,
.start-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.numbered-steps li,
.start-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  color: var(--ink-2);
}

.numbered-steps li::before,
.start-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15em;
  width: 36px;
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--teal);
  text-align: center;
}

.numbered-steps strong,
.start-steps strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

/* ---------- FAQ ---------- */

.faq-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.faq-preview h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.faq-preview-grid > div:first-child p {
  margin: 14px 0 16px;
  color: var(--ink-2);
}

.faq-list {
  border-bottom: 1px solid var(--rule);
}

.faq-list details {
  border-top: 1px solid var(--rule);
}

.faq-list summary {
  position: relative;
  display: block;
  padding: 20px 44px 20px 0;
  font-weight: 600;
  font-size: 1.06rem;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  border-top: 2px solid var(--teal);
}

.faq-list summary::after {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.faq-list summary:hover {
  color: var(--teal);
}

.faq-list details p {
  padding: 0 0 22px;
  color: var(--ink-2);
  max-width: 64ch;
}

.faq-search {
  margin-bottom: 28px;
}

.faq-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-search p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.faq-empty {
  margin-top: 24px;
  color: var(--ink-2);
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.start-grid h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

@media (max-width: 760px) {
  .start-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.avenues {
  padding: clamp(48px, 7vw, 88px) 0 0;
}

.avenues h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 28px;
}

.avenue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.avenue {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.avenue-primary {
  border: 2px solid var(--slate);
}

.avenue h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 1.1;
}

.avenue > p:not(.avenue-status) {
  color: var(--ink-2);
}

.avenue .button {
  align-self: flex-start;
  margin-top: auto;
}

.avenue-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
}

.avenue-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--teal);
}

.avenue-status.is-live {
  color: var(--teal);
}

.avenue-status.is-live::before {
  background: var(--teal);
}

@media (max-width: 760px) {
  .avenue-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.start-note {
  margin-top: 16px;
  color: var(--ink-2);
}

.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.path h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--teal);
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.install-grid h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.install-grid > div > p:not(.flag) {
  margin-top: 16px;
  color: var(--ink-2);
}

.after {
  padding: clamp(48px, 7vw, 88px) 0;
}

@media (max-width: 960px) {
  .start-grid,
  .install-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .paths {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Home: close ---------- */

.home-close-inner h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: #f4faf6;
}

.start-steps {
  margin-top: 36px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.start-steps li {
  color: var(--on-slate-2);
}

.start-steps li::before {
  color: var(--mint);
}

.start-steps strong {
  color: var(--white);
}

.home-close .actions {
  margin-top: 40px;
}

/* ---------- Supporting page hero ---------- */

.page-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.9rem);
  max-width: 17ch;
}

.page-hero .lede {
  margin-top: 22px;
}

.page-hero-inner.has-aside {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.page-hero-aside .device {
  --device-w: 300px;
  margin-left: auto;
}

.legal-hero h1 {
  max-width: 22ch;
}

/* ---------- Features ---------- */

.jump-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: rgba(243, 245, 241, 0.96);
  border-bottom: 1px solid var(--rule);
}

.jump-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.jump-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  white-space: nowrap;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.jump-nav a:hover {
  color: var(--teal);
}

.jump-nav li:first-child a {
  padding-left: 0;
}

.feature-row {
  padding: clamp(40px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--rule);
}

.feature-row:nth-of-type(even) {
  background: var(--white);
}

.feature-row-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.feature-row.reverse .feature-row-inner {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.feature-row.reverse .device,
.feature-row.reverse .detail {
  order: -1;
}

.feature-row.has-detail .feature-row-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
}

.feature-detail {
  justify-self: end;
}

.feature-copy {
  max-width: 36rem;
}

.feature-copy > p {
  margin-top: 18px;
  color: var(--ink-2);
}

.feature-link-row {
  padding-block: 20px;
}

.tools h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 32px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px clamp(24px, 3vw, 44px);
  margin: 0;
}

.tool-list > div {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.tool-list dt {
  font-weight: 600;
}

.tool-list dd {
  margin: 6px 0 0;
  color: var(--ink-2);
}

.tool-list-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

/* ---------- How it works ---------- */

.walk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 44px);
}

.walk-step .device {
  --device-w: 300px;
}

.walk-copy {
  position: relative;
  margin-top: 22px;
  padding-left: 46px;
}

.walk-number {
  position: absolute;
  left: 0;
  top: -0.2em;
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--teal);
}

.walk-copy h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.walk-copy p {
  margin-top: 6px;
  color: var(--ink-2);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 88px);
}

.two-col h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.two-col > div > p {
  margin-top: 14px;
  color: var(--ink-2);
}

.band-dark .two-col > div > p {
  color: var(--on-slate-2);
}

.two-col .text-link {
  display: inline-block;
  margin-top: 14px;
}

.two-col-media {
  align-items: center;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

/* ---------- AI page ---------- */

.ai-io-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.ai-io-col h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
}

.ai-io-col > p:first-of-type {
  margin-top: 12px;
  color: var(--ink-2);
}

.limits h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin-bottom: 36px;
}

.limit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
  margin: 0;
}

.limit-list > div {
  padding: 22px 0;
  border-top: 1px solid var(--slate-rule);
}

.limit-list dt {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white);
  line-height: 1.2;
}

.limit-list dt::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  border: 2px solid var(--coral-light);
  border-radius: 50%;
  vertical-align: 0.15em;
}

.limit-list dd {
  margin: 8px 0 0;
  color: var(--on-slate-2);
}

.reassess h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

/* ---------- Clinics ---------- */

.clinic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.status-col h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--teal);
}

.status-col-later h2 {
  border-bottom-color: var(--rule-strong);
  color: var(--ink-2);
}

.status-col .tick-list,
.status-col .dash-list {
  gap: 14px;
}

/* ---------- About ---------- */

.principle-list {
  margin: 0;
}

.principle-list > div {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}

.principle-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.principle-list dt {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
}

.principle-list dd {
  margin: 12px 0 0;
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 60ch;
}

.about-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
}

/* ---------- Closing band (supporting routes) ---------- */

.closing {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: clamp(48px, 6vw, 72px) 0;
}

.closing-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.closing h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.closing p {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 44em;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Forms ---------- */

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--field);
  border-radius: var(--radius-s);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(11, 110, 95, 0.28);
  outline-offset: 0;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--teal);
}

input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

label > span {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.form-page {
  padding: clamp(48px, 7vw, 88px) 0;
}

.form-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.form-page-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
}

.form-page-copy .lede {
  margin-top: 20px;
}

.form-page-copy h2 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 40px;
  letter-spacing: 0;
}

.demo-direct {
  margin-top: 32px;
  color: var(--ink-2);
}

.demo-form-card,
.auth-card {
  padding: clamp(22px, 4vw, 36px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.demo-form-card h2,
.auth-card h2 {
  font-size: 1.9rem;
}

.demo-form,
.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  padding: 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.checkbox-grid label,
.consent-check,
.terms-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.45;
}

.checkbox-grid label span,
.consent-check span,
.terms-check span {
  display: inline;
  font-weight: 400;
  margin: 0;
}

.honeypot-field {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-widget {
  min-height: 140px;
}

.form-note {
  font-size: 0.93rem;
  color: var(--ink-3);
}

.form-note.success {
  color: var(--teal-deep);
  font-weight: 500;
}

.form-note.error {
  color: var(--coral-ink);
  font-weight: 500;
}

.demo-form .button,
.auth-form .button {
  width: 100%;
}

/* ---------- Login ---------- */

.account-page {
  padding: clamp(48px, 7vw, 88px) 0;
}

.account-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.account-promise h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  max-width: 14ch;
}

.account-promise .lede {
  margin-top: 20px;
}

.identity-path {
  list-style: none;
  counter-reset: step;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.identity-path li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
}

.identity-path li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  width: 32px;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--teal);
  text-align: center;
}

.identity-path strong,
.identity-path small {
  display: block;
}

.identity-path small {
  color: var(--ink-3);
  font-size: 0.93rem;
}

.security-note {
  margin-top: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--teal);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--paper);
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-switch button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: 600 0.97rem var(--sans);
  cursor: pointer;
}

.auth-switch button.active,
.auth-switch button[aria-selected="true"] {
  background: var(--slate);
  color: var(--white);
}

.auth-card-heading p {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.auth-text-button {
  background: none;
  border: 0;
  padding: 6px 0;
  min-height: 44px;
  color: var(--teal);
  font: 600 0.95rem var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
}

/* ---------- Account ---------- */

.account-dashboard {
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}

.account-loading {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  font-weight: 500;
}

.account-loading.error {
  border-left: 3px solid var(--coral);
  color: var(--coral-ink);
}

.account-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.account-heading-row h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.account-heading-row .lede {
  margin-top: 10px;
  font-weight: 500;
  color: var(--ink);
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-metric {
  display: grid;
  gap: 4px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.account-metric span,
.account-metric small {
  color: var(--ink-3);
  font-size: 0.92rem;
}

.account-metric strong {
  font-family: var(--serif);
  font-weight: 460;
  font-size: 2.3rem;
  line-height: 1.05;
}

.account-metric.featured {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--white);
}

.account-metric.featured span,
.account-metric.featured small {
  color: var(--on-slate-2);
}

.account-detail-grid,
.account-commerce-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.account-commerce-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.commerce-panel {
  padding: clamp(20px, 3vw, 30px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}

.commerce-panel h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

.commerce-panel > p {
  margin-top: 12px;
  color: var(--ink-2);
}

.account-breakdown {
  margin: 16px 0 0;
}

.account-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.account-breakdown dt {
  color: var(--ink-2);
}

.account-breakdown dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.pending-purchase {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--mint-soft);
  border: 1px solid var(--teal);
  border-radius: var(--radius-s);
}

.activation-notice {
  margin-top: 16px;
  border-left: 3px solid var(--teal);
}

.activation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 18px;
  align-items: center;
}

.billing-status {
  margin: 16px 0;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.panel-heading p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.account-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.account-plan-grid article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.account-plan-grid article.recommended-plan {
  border: 2px solid var(--slate);
  padding: 17px;
}

.plan-badge {
  font-weight: 600;
  color: var(--teal);
}

.account-plan-grid strong {
  font-family: var(--serif);
  font-weight: 460;
  font-size: 1.4rem;
  line-height: 1.15;
}

.account-plan-grid p {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.purchase-row {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.account-pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.account-pack-grid article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.account-pack-grid span {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.1;
  margin-bottom: 8px;
}

.account-pack-grid .button {
  margin-top: auto;
  padding-inline: 10px;
}

/* ---------- Contact / payment support ---------- */

.payment-support-section {
  padding: clamp(40px, 6vw, 72px) 0;
}

.payment-support-section .commerce-panel {
  border-top: 3px solid var(--slate);
}

.activation-product-label {
  display: block;
  margin-top: 22px;
  margin-bottom: 6px;
  font-weight: 600;
}

.payment-facts {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--paper);
  border-radius: var(--radius-s);
  font-size: 0.97rem;
  color: var(--ink-2);
}

.contact-routes {
  background: var(--white);
  border-top: 1px solid var(--rule);
}

.contact-routes .text-link {
  display: inline-block;
  margin-top: 6px;
  word-break: break-word;
}

/* ---------- Legal ---------- */

.legal-section {
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.legal-contents {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  font-size: 0.9rem;
}

.legal-contents p {
  font-weight: 600;
  margin-bottom: 10px;
}

.legal-contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.legal-contents a {
  display: block;
  padding: 5px 0;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
}

.legal-contents a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.legal-body {
  max-width: 72ch;
}

.legal-card {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.legal-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.legal-card h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.legal-card h3 {
  margin: 18px 0 8px;
}

.legal-card p,
.legal-card li {
  color: var(--ink-2);
}

.legal-card ul,
.legal-card ol {
  padding-left: 22px;
  margin: 10px 0;
  display: grid;
  gap: 6px;
}

/* Rules on padded .wrap rows: draw inside the gutter so they align with content. */
.policy-links,
.footer-bottom {
  background: linear-gradient(var(--rule-line, var(--rule)), var(--rule-line, var(--rule))) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

.footer-bottom {
  --rule-line: var(--slate-rule);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--slate-deep);
  padding: 56px 0 28px;
  font-size: 0.95rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 40px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--on-slate-2);
  max-width: 30em;
}

.footer-contact a {
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-group h2 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--white);
  margin-bottom: 10px;
}

.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .footer-group a {
  display: inline-block;
  padding: 5px 0;
  color: var(--on-slate-2);
  text-decoration: none;
}

.site-footer .footer-group a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  margin-top: 48px;
  padding-top: 20px;
  color: var(--on-slate-2);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .soap-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .soap-rail {
    display: none;
  }

  .soap-letter {
    display: inline;
  }

  .ai-io-grid,
  .clinic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-io-grid > .device,
  .ai-io-grid > .detail,
  .clinic-grid > .device {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .ai-io-grid > .detail {
    max-width: 620px;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .offline-grid,
  .business-grid,
  .faq-preview-grid,
  .pay-grid,
  .form-page-grid,
  .account-entry-grid,
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    max-width: 560px;
  }

  .business-visual {
    max-width: 520px;
  }

  .pricing-grid,
  .pack-cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }

  .plan-description {
    min-height: 0;
  }

  .record-grid,
  .walk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-summary-grid,
  .account-detail-grid,
  .account-commerce-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-contents {
    position: static;
    max-height: none;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius-m);
  }

  .start-steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 1rem;
  }

  .soap-step,
  .feature-row-inner,
  .feature-row.reverse .feature-row-inner,
  .page-hero-inner.has-aside,
  .two-col,
  .two-col-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .soap-device,
  .feature-row .device,
  .two-col-media .device {
    justify-self: start;
    --device-w: 290px;
  }

  .feature-row.reverse .device {
    order: 0;
  }

  .page-hero-aside .device {
    margin-left: 0;
    --device-w: 260px;
  }

  .soap-step-a {
    padding: 24px 20px;
  }

  .connectivity-chart {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-col + .chart-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--slate-rule);
  }

  .record-grid,
  .soap-step-a,
  .feature-row.has-detail .feature-row-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-vitals {
    grid-row: auto;
  }

  .ai-io-grid,
  .clinic-grid,
  .limit-list,
  .tool-list,
  .tool-list-compact,
  .fine-list,
  .form-grid,
  .checkbox-grid,
  .account-plan-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-io-grid > .device,
  .clinic-grid > .device {
    justify-self: start;
  }

  .account-pack-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-pack-grid article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 12px;
  }

  .account-pack-grid span {
    margin: 0;
    grid-row: 2;
  }

  .account-pack-grid .button {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .walk-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .walk-step .device {
    --device-w: 280px;
  }

  .pack-list,
  .pack-list li {
    width: 100%;
  }

  .pack-list a {
    justify-content: space-between;
  }

  .closing-actions,
  .closing-actions .button,
  .actions .button-primary {
    width: 100%;
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-emblem {
    width: 54%;
    margin-left: -5%;
  }

  .hero-device-front {
    --device-w: 210px;
    width: 210px;
  }

  .device-screen {
    border-width: 7px;
    border-radius: 24px;
  }

  .paper-doc {
    width: 56%;
  }

  .business-ledger {
    --device-w: 230px;
  }
}

@media (max-width: 380px) {
  .brand span {
    font-size: 1.05rem;
  }

  .billing-toggle button span {
    display: none;
  }

  .hero-device-front {
    --device-w: 180px;
    width: 180px;
  }
}

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

@media print {
  .site-header,
  .jump-nav,
  .closing,
  .site-footer {
    display: none;
  }
}
