/* WoundEye — sand & ink design system (shared with wounds-ai.com) */
:root {
  --sand: #ECE3D1;
  --dune: #DDD0B5;
  --paper: #F7F2E8;
  --ink: #1B2433;
  --ink-2: #465063;
  --ink-3: #6B6A63;
  --rule: #B8A98D;
  --blue: #2A4A7F;
  --red: #8B2E24;
  --gold: #C9A45C;
  --serif: Cambria, Caladea, "Cambria Math", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --measure: 38rem;
  --wide: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0; background: var(--sand); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.62;
  font-feature-settings: "kern", "liga", "onum"; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 100; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.015em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.01em; }
h3 { font-size: 1.35rem; line-height: 1.25; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }

.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.small { font-family: var(--sans); font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-2); margin: 0 0 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--sand); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; position: relative; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-name em { font-style: italic; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: .1rem; font-family: var(--sans); font-size: .95rem; }
.nav > a { color: var(--ink); text-decoration: none; padding: .55rem .7rem; border-radius: 3px; }
.nav > a:hover { background: var(--dune); }
.nav > a.btn-ink { background: var(--ink); color: var(--paper); padding: .6rem 1.1rem; margin-left: .6rem; }
.nav > a.btn-ink:hover { background: var(--blue); }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); color: var(--ink); font: 600 .95rem var(--sans); padding: .45rem .8rem; border-radius: 3px; cursor: pointer; }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: .75rem var(--gutter) 1.25rem; }
  .nav.open { display: flex; }
  .nav > a { padding: .8rem .2rem; border-bottom: 1px solid var(--dune); border-radius: 0; }
  .nav > a.btn-ink { margin: 1rem 0 0; text-align: center; border-radius: 3px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 700 1rem var(--sans); text-decoration: none; padding: .8rem 1.3rem; border-radius: 3px; border: 1.5px solid var(--ink); cursor: pointer; line-height: 1.2; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--sand); border-color: var(--sand); color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Hero (ink) */
.hero { background: var(--ink); color: #E9E1D0; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero .kicker { color: #CFC7B6; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -.02em; max-width: 13ch; text-wrap: balance; }
.hero-sub { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: #E9E1D0; max-width: 34rem; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.45); }
.hero-tags { list-style: none; padding: 0; margin: 2.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; font: .95rem var(--sans); color: #D8D0BF; }
.hero-tags li { padding-left: .9rem; position: relative; }
.hero-tags li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-phones { position: relative; display: flex; justify-content: center; }
.hero-phones .phone { width: 58%; }
.hero-phones .phone + .phone { margin-left: -14%; margin-top: 18%; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phones { max-width: 26rem; margin: 0 auto; }
}

/* Phone screenshots */
.phone { border: 1px solid var(--ink); border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 24px 48px -28px rgba(27,36,51,.6); }
.hero .phone { border-color: #3A4762; }
.phone img { width: 100%; height: auto; }

/* Sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--rule); }
.section.paper { background: var(--paper); }
.section.ink { background: var(--ink); color: #E9E1D0; border-bottom: 0; }
.section.ink h2, .section.ink h3 { color: #F7F2E8; }
.section.ink .kicker, .section.ink .lede { color: #CFC7B6; }
.section.ink a { color: #C9D6EE; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.section-head h2 { max-width: 16ch; }
.section-head .lede { margin-top: .35rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* Stats */
.stats-band { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--rule); background: var(--paper); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.stat { padding: 1.1rem 1.25rem 1.25rem 0; }
.stat + .stat { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.stat .v { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; font-variant-numeric: lining-nums; margin-bottom: .5rem; }
.stat p { font-family: var(--sans); font-size: .9rem; line-height: 1.45; color: var(--ink-2); margin: 0; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat { border-bottom: 1px solid var(--rule); }
}

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2.5rem 0 0; border-top: 1px solid var(--ink); }
.pillars > div { padding: 1.4rem 1.5rem 0 0; }
.pillars > div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.pillars dt { font-family: var(--serif); font-size: 1.45rem; margin-bottom: .5rem; }
.pillars dd { margin: 0; color: var(--ink-2); }
.section.ink .pillars { border-top-color: #E9E1D0; }
.section.ink .pillars > div + div { border-left-color: #4B5468; }
.section.ink .pillars dt { color: #F7F2E8; }
.section.ink .pillars dd { color: #C8C1B1; }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .pillars > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 1.25rem; }
}
.pillars.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .pillars.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pillars.four > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 760px) { .pillars.four { grid-template-columns: 1fr; } }

/* Modules (numbered, ruled) */
.modules { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.modules > li { display: grid; grid-template-columns: 4rem minmax(0, 16rem) minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.modules .num { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--ink-3); font-variant-numeric: lining-nums; }
.modules h3 { font-size: 1.4rem; font-weight: 400; }
.modules ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); columns: 2; column-gap: 2rem; }
.modules li li { margin-bottom: .35rem; break-inside: avoid; }
@media (max-width: 760px) {
  .modules > li { grid-template-columns: 3rem minmax(0, 1fr); }
  .modules ul { grid-column: 1 / -1; columns: 1; }
}

/* Screens gallery */
.screens-group { margin-top: 2.75rem; }
.screens-group h3 { font-family: var(--sans); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-bottom: .75rem; border-bottom: 1px solid var(--ink); margin-bottom: 1.5rem; }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.75rem; }
.screens figure { margin: 0; }
.screens figcaption { font-family: var(--sans); font-size: .875rem; line-height: 1.45; color: var(--ink-2); margin-top: .75rem; }
.screens figcaption b { color: var(--ink); }

/* Body map split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.plates { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.plate { background: var(--paper); border: 1px solid var(--rule); padding: 1rem; margin: 0; }
.plate img { width: 100%; height: auto; }
.plate figcaption { font-family: var(--sans); font-size: .82rem; color: var(--ink-2); margin-top: .6rem; }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--ink); }
.checklist li { padding: .75rem 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Markets (roles) */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 2.5rem; }
.role { padding: 1.5rem 1.5rem 1.75rem 0; }
.role + .role { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.role .who { font-family: var(--sans); font-weight: 700; font-size: .8rem; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .35rem; }
.role h3 { font-size: 1.6rem; font-weight: 400; margin-bottom: .75rem; }
.role > p { color: var(--ink-2); }
.role ul { padding-left: 1.1rem; margin: 0; color: var(--ink-2); }
.role li { margin-bottom: .45rem; }
@media (max-width: 860px) {
  .roles { grid-template-columns: 1fr; }
  .role + .role { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* Integrations (ruled list) */
.ruled { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
.ruled > li { border-bottom: 1px solid var(--rule); padding: 1.25rem 0; }
.ruled h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.ruled p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .ruled { grid-template-columns: 1fr; } }

/* Partner pull */
.pull { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.35; font-style: italic; max-width: 40ch; margin: 1.5rem 0 0; padding-left: 1.25rem; border-left: 2px solid var(--ink); }
.sequence { display: flex; flex-wrap: wrap; gap: .6rem 2.2rem; margin-top: 1.75rem; font: 700 .95rem var(--sans); list-style: none; padding: 0; }
.sequence li { border: 1.5px solid var(--ink); padding: .45rem .9rem; border-radius: 3px; position: relative; }
.sequence li + li::before { content: "→"; position: absolute; left: -1.65rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 400; }

/* CTA band */
.cta-band { padding: clamp(3rem, 6vw, 4.5rem) 0; background: var(--dune); border-bottom: 1px solid var(--rule); }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem; align-items: end; }
.cta-band h2 { max-width: 22ch; }
.cta-band .btn-row { margin-top: 0; }
@media (max-width: 760px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--ink); color: #C8C1B1; padding: 3rem 0 2rem; font-family: var(--sans); font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #3A4762; }
.site-footer .brand { color: #F7F2E8; }
.site-footer .brand-name em { color: #CFC7B6; }
.foot-grid h4 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1rem; color: #F7F2E8; margin-bottom: .6rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .35rem; }
.foot-grid a { color: #E9E1D0; text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; color: #fff; }
.foot-legal { padding-top: 1.25rem; font-size: .82rem; line-height: 1.55; max-width: 60rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* 404 */
.notfound { min-height: 60vh; display: flex; align-items: center; }

/* ---------- v2 additions ---------- */

/* Photo hero */
.hero.photo-hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; isolation: isolate; padding: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; z-index: -2; filter: saturate(.85) sepia(.06); }
.photo-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,27,40,.94) 0%, rgba(20,27,40,.8) 40%, rgba(20,27,40,.35) 72%, rgba(20,27,40,.15) 100%),
              linear-gradient(0deg, rgba(20,27,40,.55) 0%, rgba(20,27,40,0) 35%); }
.photo-hero .wrap { width: 100%; padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.photo-hero .hero-copy { max-width: 40rem; }
@media (max-width: 700px) {
  .hero.photo-hero { min-height: 680px; align-items: flex-end; }
  .hero-img { object-position: 30% 30%; }
  .photo-hero::before { background: linear-gradient(0deg, rgba(20,27,40,.96) 0%, rgba(20,27,40,.84) 58%, rgba(20,27,40,.35) 100%); }
}

/* Footnote markers & references */
sup.fn a { color: var(--red); text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: .72em; padding: 0 .1em; }
sup.fn a:hover { text-decoration: underline; }
.section.ink sup.fn a, .hero sup.fn a { color: #E08A74; }
.references { font-family: var(--sans); font-size: .875rem; line-height: 1.55; color: var(--ink-2); padding-left: 1.4rem; max-width: 56rem; margin: 1.5rem 0 0; }
.references li { margin-bottom: .55rem; padding-left: .25rem; }
.references li:target { background: #E6D7B9; }
.references a { overflow-wrap: anywhere; }
.source-note { font-family: var(--sans); font-size: .82rem; color: var(--ink-3); margin-top: 1rem; }

/* Progression pathway */
.pathway { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); counter-reset: path; }
.pathway li { position: relative; padding: 1.75rem 1.25rem 1.25rem 0; counter-increment: path; }
.pathway li + li { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.pathway li::before { content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--sand); border: 2px solid var(--ink); }
.pathway li + li::before { left: 1.25rem; }
.pathway li:last-child::before { background: var(--red); border-color: var(--red); }
.pathway .stage { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .35rem; }
.pathway h3 { font-size: 1.3rem; font-weight: 400; margin-bottom: .6rem; }
.pathway p { font-family: var(--sans); font-size: .9rem; line-height: 1.5; color: var(--ink-2); margin: 0; }
.pathway .window { position: absolute; top: -2.1rem; left: 0; font: italic .95rem var(--serif); color: var(--blue); white-space: nowrap; }
@media (max-width: 960px) {
  .pathway { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--ink); margin-left: .4rem; }
  .pathway li, .pathway li + li { padding: 0 0 1.5rem 1.5rem; border-left: 0; }
  .pathway li::before, .pathway li + li::before { top: .35rem; left: -7px; }
  .pathway .window { position: static; display: block; margin-bottom: .25rem; }
}

/* Bar chart */
.chart { margin: 2rem 0 0; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.chart-title { font-family: var(--serif); font-style: italic; color: var(--ink-2); margin: 0 0 1rem; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 3.5rem; gap: .9rem; align-items: center; font-family: var(--sans); font-size: .92rem; }
.bars .track { height: 1.15rem; background: rgba(184,169,141,.25); position: relative; }
.bars .fill { position: absolute; inset: 0 auto 0 0; background: var(--rule); }
.bars li.foot .fill { background: var(--ink); }
.bars li.foot .label { font-weight: 700; color: var(--ink); }
.bars .label { color: var(--ink-2); }
.bars .val { font-variant-numeric: tabular-nums lining-nums; text-align: right; color: var(--ink); }
.chart-key { display: flex; gap: 1.5rem; font: .82rem var(--sans); color: var(--ink-2); margin-top: 1rem; flex-wrap: wrap; }
.chart-key span { display: inline-flex; align-items: center; gap: .45rem; }
.chart-key i { width: 12px; height: 12px; display: inline-block; }
@media (max-width: 600px) { .bars li { grid-template-columns: 7.5rem minmax(0, 1fr) 3rem; font-size: .85rem; } }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Big finding */
.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2rem; align-items: end; border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.finding .figure-num { font-family: var(--serif); font-size: clamp(4rem, 10vw, 7.5rem); line-height: .9; letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.finding p { margin-bottom: .4rem; font-size: 1.2rem; line-height: 1.5; max-width: 30rem; }
@media (max-width: 640px) { .finding { grid-template-columns: 1fr; gap: .75rem; } }

/* Recurrence (ink) */
.recur { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #E9E1D0; margin-top: 2.25rem; }
.recur > div { padding: 1.25rem 1.5rem 0 0; }
.recur > div + div { padding-left: 1.5rem; border-left: 1px solid #4B5468; }
.recur .v { font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; color: #F7F2E8; font-variant-numeric: lining-nums; }
.recur p { font-family: var(--sans); font-size: .95rem; color: #C8C1B1; margin: .5rem 0 0; }
@media (max-width: 700px) { .recur { grid-template-columns: 1fr; } .recur > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #4B5468; margin-top: 1.25rem; } }

/* How it works */
.how { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: how; }
.how li { counter-increment: how; }
.how .phone { max-width: 13.5rem; }
.how h3 { font-size: 1.3rem; font-weight: 400; margin: 1.25rem 0 .4rem; display: flex; align-items: baseline; gap: .6rem; }
.how h3::before { content: counter(how); font-family: var(--sans); font-weight: 700; font-size: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-grid; place-items: center; flex: 0 0 auto; transform: translateY(-.15rem); }
.how p { color: var(--ink-2); font-size: 1rem; margin: 0; }
@media (max-width: 960px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } .how .phone { max-width: 15rem; } }

/* Photo split */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; border: 1px solid var(--rule); filter: saturate(.82) sepia(.08) contrast(1.02); }
.photo figcaption { font-family: var(--sans); font-size: .85rem; color: var(--ink-2); margin-top: .6rem; }
.split-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-photo.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split-photo { grid-template-columns: 1fr; } .split-photo.flip > :first-child { order: 0; } }

/* Body map single plate */
.plate.solo { max-width: 22rem; justify-self: center; }

/* FAQ */
.faq { border-top: 1px solid var(--ink); margin-top: 2rem; max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; font-size: 1.2rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font: 400 1.5rem var(--sans); color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: 0 0 1.25rem; max-width: 46rem; }
.two-col .finding { grid-template-columns: 1fr; gap: .5rem; align-items: start; }
.two-col .finding p { max-width: 26rem; }
@media (max-width: 560px) { .screens { grid-template-columns: 1fr 1fr; gap: 1rem; } .screens figcaption { font-size: .8rem; } }

/* ---------- Body map section ---------- */
.map-steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: ms; border-top: 1px solid var(--ink); padding-top: 2rem; }
.map-steps li { counter-increment: ms; }
.map-steps .plate { background: #fff; padding: .5rem; }
.map-steps .plate img { width: 100%; max-height: 22rem; object-fit: contain; }
.map-steps h3 { font-size: 1.3rem; font-weight: 400; margin: 1.1rem 0 .4rem; display: flex; gap: .6rem; align-items: baseline; }
.map-steps h3::before { content: counter(ms); font: 700 .8rem var(--sans); width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-grid; place-items: center; flex: 0 0 auto; transform: translateY(-.15rem); }
.map-steps p { color: var(--ink-2); font-size: 1rem; margin: 0; }
@media (max-width: 860px) { .map-steps { grid-template-columns: 1fr; } .map-steps .plate img { max-height: 18rem; } }

.map-demo { margin-top: 3.5rem; background: var(--paper); border: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); }
.map-demo-head { padding: 2rem; border-right: 1px solid var(--rule); }
.map-demo-head h3 { font-size: 1.6rem; font-weight: 400; margin-bottom: .6rem; }
.map-demo-head > p:not(.kicker) { color: var(--ink-2); }
.map-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.map-tabs button { font: 700 .92rem var(--sans); background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: .5rem .95rem; cursor: pointer; min-height: 40px; }
.map-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.map-tabs button:hover { background: var(--dune); }
.map-tabs button[aria-selected="true"]:hover { background: var(--blue); border-color: var(--blue); }
.map-demo-body { padding: 2rem; display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, .8fr); gap: 1.25rem; align-items: center; }
.map-link { font: 400 2rem var(--sans); color: var(--ink-3); }
.wound-photo { margin: 0; }
.wound-photo figcaption, .map-view figcaption { font-family: var(--sans); font-size: .85rem; color: var(--ink-2); margin-top: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.map-view { background: #fff; padding: .5rem; margin: 0; }
.map-view img { width: 100%; max-height: 24rem; object-fit: contain; transition: opacity .2s; }
.selected { align-self: flex-start; background: #E3EDF9; color: #1A4E99; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; }
.reveal { position: relative; overflow: hidden; border: 1px solid var(--rule); background: var(--ink); }
.reveal img { width: 100%; height: auto; filter: blur(18px) saturate(.6); transform: scale(1.08); transition: filter .3s, transform .3s; }
.reveal.shown img { filter: none; transform: none; }
.reveal-btn { position: absolute; inset: auto 50% 50% auto; transform: translate(50%, 50%); font: 700 .92rem var(--sans); background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; padding: .6rem 1rem; cursor: pointer; }
.reveal.shown .reveal-btn { display: none; }
@media (max-width: 1000px) { .map-demo { grid-template-columns: 1fr; } .map-demo-head { border-right: 0; border-bottom: 1px solid var(--rule); } }
@media (max-width: 600px) { .map-demo-body { grid-template-columns: 1fr; } .map-link { transform: rotate(90deg); justify-self: center; } .map-view { max-width: 16rem; justify-self: center; } }

.map-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 3rem 0 0; border-top: 1px solid var(--ink); }
.map-facts > div { padding: 1.1rem 1.25rem 0 0; }
.map-facts > div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.map-facts dt { font-family: var(--serif); font-size: 2.4rem; line-height: 1; margin-bottom: .45rem; }
.map-facts dd { margin: 0; font: .9rem/1.45 var(--sans); color: var(--ink-2); }
@media (max-width: 860px) { .map-facts { grid-template-columns: 1fr 1fr; } .map-facts > div:nth-child(3) { padding-left: 0; border-left: 0; } .map-facts > div { padding-bottom: 1rem; } }

/* Hero logo lockup */
.hero-logo { display: flex; align-items: center; gap: .85rem; margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); }
.hero-logo img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 8px 22px -10px rgba(0,0,0,.6); }
.hero-logo span { font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1; letter-spacing: -.01em; color: #fff; }
.hero-logo em { font-style: italic; color: #E9E1D0; }
@media (max-width: 700px) { .hero-logo img { width: 44px; height: 44px; border-radius: 10px; } }
.hero-logo span { font-size: clamp(2.2rem, 3.4vw, 2.9rem); }

/* ---------- Hero v2: product showcase ---------- */
.hero-v2 { min-height: min(92vh, 820px); }
.hero-v2::before {
  background: linear-gradient(90deg, rgba(20,27,40,.95) 0%, rgba(20,27,40,.86) 45%, rgba(20,27,40,.72) 70%, rgba(20,27,40,.6) 100%),
              linear-gradient(0deg, rgba(20,27,40,.6) 0%, rgba(20,27,40,0) 40%);
}
.hero-v2 .hero-img { filter: saturate(.7) sepia(.08) blur(1.5px); }
.hero-v2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-v2 .hero-copy { max-width: 36rem; }

.built-for { margin-top: 2.25rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.22); display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.built-for p { margin: 0; font: italic 1rem var(--serif); color: #CFC7B6; }
.built-for ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.built-for a { display: inline-block; font: 700 .9rem var(--sans); color: #F7F2E8; text-decoration: none; border: 1px solid rgba(247,242,232,.45); border-radius: 999px; padding: .38rem .85rem; }
.built-for a:hover { background: #F7F2E8; color: var(--ink); }
.hero-v2 .hero-tags { margin-top: 1.5rem; }

.hero-stage { position: relative; height: 34rem; }
.hero-stage .phone { position: absolute; width: 15.5rem; border-color: #3A4762; border-width: 6px; border-color: #0F1522; border-radius: 30px; }
.stage-back { right: 13rem; top: 2.5rem; }
.stage-front { right: 1.5rem; top: 0; box-shadow: 0 40px 70px -30px rgba(0,0,0,.75); z-index: 2; }

.float-card { position: absolute; z-index: 3; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 22px 40px -18px rgba(0,0,0,.6); font-family: var(--sans); }
.card-map { left: -1rem; top: 1.5rem; display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem .6rem .6rem; }
.card-map img { width: 3.4rem; height: 5.2rem; object-fit: cover; object-position: center 85%; border-radius: 6px; background: #fff; border: 1px solid var(--dune); }
.fc-label { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .3rem; }
.fc-pill { display: inline-block; background: #E3EDF9; color: #1A4E99; font-weight: 700; font-size: .85rem; padding: .25rem .6rem; border-radius: 999px; }
.card-review { left: 2rem; bottom: 6.5rem; display: flex; gap: .75rem; align-items: center; padding: .85rem 1.1rem; }
.card-review strong { display: block; font-size: .95rem; }
.card-review span:not(.fc-check) { font-size: .82rem; color: var(--ink-2); }
.fc-check { width: 2rem; height: 2rem; border-radius: 50%; background: #2E7D4F; color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.card-flow { right: 0; bottom: 0; list-style: none; margin: 0; display: flex; gap: .2rem; padding: .55rem .7rem; }
.card-flow li { display: flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: 0 .35rem; }
.card-flow li + li::before { content: "→"; color: var(--ink-3); font-weight: 400; margin-right: .3rem; }
.card-flow span { width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: .7rem; }

@media (max-width: 1100px) {
  .hero-stage .phone { width: 13rem; }
  .stage-back { right: 10.5rem; }
  .hero-stage { height: 30rem; }
}
@media (max-width: 900px) {
  .hero-v2-grid { grid-template-columns: 1fr; }
  .hero-v2 .hero-copy { max-width: none; }
  .hero-stage { height: 27rem; max-width: 26rem; width: 100%; margin: 0 auto; }
  .hero-stage .phone { width: 11.5rem; }
  .stage-back { right: auto; left: 1.5rem; top: 2rem; }
  .stage-front { right: 1rem; }
  .card-map { left: -.25rem; top: auto; bottom: 7.5rem; }
  .card-review { left: 0; bottom: 1rem; }
  .card-flow { display: none; }
}
@media (max-width: 700px) {
  .hero.hero-v2 { align-items: flex-start; }
}
.card-flow li { white-space: nowrap; }
.stage-back { top: 5.5rem; }
.card-map { top: -.5rem; left: -2rem; }
@media (max-width: 1100px) { .card-flow li { font-size: .74rem; padding: 0 .2rem; } }
@media (max-width: 900px) { .stage-back { top: 2rem; } .card-map { top: auto; left: -.25rem; } }

/* ---------- Hero animation (no rotation or skew) ---------- */
.stage-back, .stage-front { transform: none; }
.stage-back { opacity: 1; }

@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pill-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(26,78,153,0); } 50% { box-shadow: 0 0 0 6px rgba(26,78,153,.18); } }
@keyframes check-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(46,125,79,0); } 50% { box-shadow: 0 0 0 7px rgba(46,125,79,.22); } }
@keyframes step-on { 0%, 22% { background: var(--gold); color: var(--ink); } 25%, 100% { background: var(--ink); color: var(--paper); } }

.hero-v2 .hero-copy > * { animation: fade-up .7s ease-out both; }
.hero-v2 .hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-v2 .hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-v2 .hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-v2 .hero-copy > :nth-child(5) { animation-delay: .32s; }
.hero-v2 .hero-copy > :nth-child(6) { animation-delay: .4s; }
.hero-v2 .hero-copy > :nth-child(7) { animation-delay: .48s; }

.stage-back  { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) .35s both; }
.stage-front { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) .65s both; }
.card-map    { animation: slide-in-left .7s ease-out 1.3s both; }
.card-review { animation: slide-in-left .7s ease-out 2s both; }
.card-flow   { animation: fade-up .7s ease-out 2.6s both; }

.card-map .fc-pill { animation: pill-glow 2.4s ease-in-out 2.1s infinite; }
.card-review .fc-check { animation: check-glow 2.4s ease-in-out 2.8s infinite; }
.card-flow li span { animation: step-on 8s linear infinite; }
.card-flow li:nth-child(1) span { animation-delay: 3.3s; }
.card-flow li:nth-child(2) span { animation-delay: 5.3s; }
.card-flow li:nth-child(3) span { animation-delay: 7.3s; }
.card-flow li:nth-child(4) span { animation-delay: 9.3s; }

/* ---------- Workflow animation (shared with wounds-ai.com) ---------- */
/* ---------- Platform flow visual ---------- */
.flow { background: var(--ink); color: #E9E1D0; border: 1px solid #0F1522; }
.flow-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem 1.25rem; border-bottom: 1px solid #2E3A52; font-family: var(--sans); }
.flow-steps, .flow-modes { display: flex; flex-wrap: wrap; gap: .35rem; }
.flow button { font: 700 .9rem var(--sans); color: #E9E1D0; background: transparent; border: 1px solid #3A4762; border-radius: 3px; padding: .5rem .8rem; cursor: pointer; min-height: 40px; }
.flow button:hover { border-color: var(--sand); }
.flow button[aria-pressed="true"] { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.flow button:focus-visible { outline: 2px solid #C9A45C; outline-offset: 2px; }
.flow-body { display: block; }
.flow-stage { position: relative; min-width: 0; }
.flow-stage svg { width: 100%; height: auto; display: block; }
.flow-side { border-top: 1px solid #2E3A52; padding: 1.4rem 1.5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .8fr); gap: 2rem; align-items: start; }
.flow-panel .panel-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; color: var(--paper); margin: 0 0 .6rem; }
.flow-panel .panel-body { font-family: var(--serif); font-size: 1.02rem; line-height: 1.55; color: #CFC7B6; margin: 0; min-height: 8em; max-width: 36rem; }
.flow-counts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem 1rem; font-family: var(--sans); }
.flow-counts div { font-size: .8rem; color: #A9A293; line-height: 1.3; }
.flow-counts b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--paper); font-variant-numeric: tabular-nums lining-nums; }
.flow-counts .flag b { color: #E08A74; }
.flow-rate { font-family: var(--sans); font-size: .85rem; color: #CFC7B6; }
.flow-rate input { width: 100%; accent-color: #C9A45C; margin-top: .4rem; }
.flow-rate .row { display: flex; justify-content: space-between; gap: .5rem; }
.flow-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .9rem 1.25rem; border-top: 1px solid #2E3A52; font: .82rem/1.4 var(--sans); color: #A9A293; }
.flow-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.flow-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.flow-legend .l-raw { border: 1.5px solid #ECE3D1; }
.flow-legend .l-read { background: #C9A45C; }
.flow-legend .l-ok { background: #F7F2E8; box-shadow: 0 0 0 2px #1B2433, 0 0 0 3.5px #F7F2E8; }
.flow-legend .l-flag { background: #E08A74; }
.flow-foot { margin-left: auto; }
@media (max-width: 1080px) { .flow-side { grid-template-columns: 1fr 1fr; } .flow-panel { grid-column: 1 / -1; } .flow-panel .panel-body { min-height: 0; } }
@media (max-width: 620px) { .flow-side { grid-template-columns: 1fr; gap: 1.25rem; } .flow-counts { grid-template-columns: repeat(2, minmax(0,1fr)); } .flow-foot { margin-left: 0; } .flow-bar { padding: .75rem; } .flow button { padding: .45rem .6rem; font-size: .85rem; } }
.flow-wide { max-width: 84rem; }
/* SVG parts */
.flow-caps text { font: 700 13px var(--sans); fill: #8C8778; letter-spacing: .02em; }
.flow .edge { fill: none; stroke: #33405C; stroke-width: 1.5; transition: opacity .3s; }
.flow .edge-flow { fill: none; stroke: #C9A45C; stroke-width: 1.6; stroke-dasharray: 3 9; opacity: .75; animation: flowdash 1.1s linear infinite; transition: opacity .3s; }
.flow .edge.loop { stroke-dasharray: 2 5; }
.flow .edge-flow.loop { stroke: #E08A74; opacity: .5; }
.flow.paused .edge-flow { animation-play-state: paused; }
@keyframes flowdash { to { stroke-dashoffset: -24; } }
.flow .dim { opacity: .18; }
.flow .edge-flow.dim { opacity: .05; }
.flow .off { opacity: .04 !important; }
.flow .loop-label { font: italic 600 15px var(--serif); fill: #F2A28C; }
.flow .is-v .loop-label { font-size: 13.5px; }
.flow .node { cursor: pointer; transition: opacity .3s; outline: none; }
.flow .node .shape { fill: #1F2A3E; stroke: #6C7893; stroke-width: 1.2; transition: stroke .2s, fill .2s; }
.flow .node:hover .shape, .flow .node:focus-visible .shape, .flow .node.focus .shape { stroke: #C9A45C; stroke-width: 2; }
.flow .node-prod .shape { fill: #F7F2E8; stroke: #F7F2E8; }
.flow .node-prod text { fill: #1B2433; }
.flow .node-prod.focus .shape, .flow .node-prod:hover .shape { stroke: #C9A45C; stroke-width: 3; }
.flow .node-out .shape { fill: #1F2A3E; stroke: #8C97AE; }
.flow .node-core .shape { fill: #C9A45C; stroke: #E6CC93; stroke-width: 1.5; }
.flow .node-core text { fill: #1B2433; }
.flow .core-ring { fill: none; stroke: #C9A45C; stroke-width: 1; opacity: .5; }
.flow .core-pulse { fill: none; stroke: #C9A45C; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: corepulse 2.6s ease-out infinite; }
.flow.paused .core-pulse { animation-play-state: paused; }
@keyframes corepulse { 0% { transform: scale(.92); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.flow .n-label { font: 400 19px var(--serif); fill: #F7F2E8; }
.flow .core-label { font-size: 17px; font-weight: 700; }
.flow .node-prod .n-label { fill: #1B2433; font-weight: 700; }
.flow .n-sub { font: 12.5px var(--sans); fill: #A9A293; }
.flow .node-prod .n-sub { fill: #465063; }
.flow .node-core .n-sub { fill: #2B3446; }
.flow .n-src { font: 14px var(--sans); fill: #E9E1D0; }
.flow .n-out { font: 700 14px var(--sans); fill: #F7F2E8; }
.flow .node-out .n-out { font-size: 14px; }
.flow .node.ping .shape { animation: ping .5s ease-out; }
@keyframes ping { 0% { stroke: #C9A45C; stroke-width: 4; } 100% { } }
.flow .pt { transition: fill .25s; }
.flow .pt-raw { fill: #1B2433; stroke: #ECE3D1; stroke-width: 1.6; }
.flow .pt-read { fill: #C9A45C; stroke: #1B2433; stroke-width: 1; }
.flow .pt-ok { fill: #F7F2E8; stroke: #1B2433; stroke-width: 1.5; }
.flow .pt-flag { fill: #E08A74; stroke: #1B2433; stroke-width: 1; }
@media (prefers-reduced-motion: reduce) { .flow .edge-flow, .flow .core-pulse { animation: none; } }
.flow .is-v .core-label { font-size: 13.5px; }
.flow .is-v .node-core .n-sub { font-size: 10.5px; }
.flow-intro { padding-top: clamp(3rem, 5vw, 4.5rem); }
/* Flow: result returned to patient and carer */
.flow .edge.result { stroke: #3F6B66; stroke-width: 1.5; }
.flow .edge-flow.result { stroke: #7FC4B8; opacity: .85; stroke-dasharray: 4 8; animation-direction: normal; }
.flow .pt-result { fill: #7FC4B8; stroke: #1B2433; stroke-width: 1.2; }
.flow .result-label { font: italic 13px var(--serif); fill: #9FCFC6; }
.flow-legend .l-result { background: #7FC4B8; }
.flow-counts .res b { color: #9FCFC6; }
/* ---------- Home: the flow visual snaps into place under the menu ---------- */
.flow-intro .flow { scroll-margin-top: calc(4.5rem + 1rem); }
/* Home: every section after the flow also snaps under the menu */
main > .hero ~ section:not(.flow-intro) { scroll-margin-top: calc(4.5rem + 1px); }
.flow-we .flow-counts { grid-template-columns: repeat(2, minmax(0,1fr)); }
.flow-wr .flow-counts { grid-template-columns: repeat(2, minmax(0,1fr)); }
.flow-title { font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; }
.flow-intro-text { color: var(--ink-2); max-width: 46rem; margin: -.4rem 0 1.1rem; }
.flow-title.mt-3 { margin-top: 3.5rem; }
.flow .out-group { fill: rgba(201,164,92,.04); stroke: rgba(201,164,92,.35); stroke-width: 1; stroke-dasharray: 4 5; cursor: pointer; transition: fill .2s, stroke .2s; }
.flow .out-group:hover, .flow .out-group.active { fill: rgba(201,164,92,.10); stroke: #C9A45C; }
.flow .out-group:focus-visible { outline: none; stroke: #F7F2E8; stroke-width: 2; }
.flow .loop-label.is-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(224,138,116,.5); text-underline-offset: 3px; }
.flow .loop-label.is-link:hover, .flow .loop-label.active { fill: #F2B3A2; }
.flow .loop-label:focus-visible { outline: none; fill: #F7F2E8; }
.flow-clock { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.flow-clock .clock-face { width: 64px; height: 64px; flex: none; }
.flow-clock .cf-rim { fill: #F7F2E8; stroke: #C9A45C; stroke-width: 2.5; }
.flow-clock .cf-tick { stroke: #8A8475; stroke-width: 1; }
.flow-clock .cf-tick.big { stroke: #1B2433; stroke-width: 2.2; }
.flow-clock .cf-hour { stroke: #1B2433; stroke-width: 5; stroke-linecap: round; }
.flow-clock .cf-min { stroke: #A8823E; stroke-width: 2.6; stroke-linecap: round; }
.flow-clock .cf-pin { fill: #1B2433; }
.flow-clock .clock-text { display: flex; flex-direction: column; line-height: 1.25; }
.flow-clock .clock-day { font-size: .8rem; color: #A9A293; }
.flow-clock .clock-time { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; color: #F7F2E8; font-variant-numeric: tabular-nums; }
.flow-clock .clock-note { font-size: .75rem; color: #A9A293; }
.flow .node-late .shape { fill: rgba(224,138,116,.07); stroke: #B9705F; stroke-dasharray: 5 4; }
.flow .node-late .n-label { fill: #F2C9BC; font-size: 17px; }
.flow .node-late .n-sub { fill: #C7A49A; }
.flow .lane-label { font: italic 600 15px var(--serif); transition: opacity .3s; }
.flow .lane-label.lane-late { fill: #F2A28C; }
.flow .lane-label.lane-early { fill: #8FD3C6; }
.flow .lane-label.dim { opacity: .2; }
.flow .is-v .lane-label { font-size: 13px; }
.flow .pt-wait { fill: #6E5A4F; stroke: #E08A74; stroke-width: 1.4; }
.flow-legend .l-wait { background: #6E5A4F; box-shadow: 0 0 0 1.5px #E08A74; }
.flow-ma .flow-counts { grid-template-columns: repeat(2, minmax(0,1fr)); }
.section.ink-soft { background: var(--sand); }
.flow-wide { max-width: 84rem; }

/* ---------- AssureStage section ---------- */
.as-logo { height: 3rem; width: auto; margin-bottom: 1.25rem; background: #fff; padding: .4rem .6rem; border: 1px solid var(--rule); border-radius: 6px; }
.as-steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); counter-reset: as; }
.as-steps li { counter-increment: as; padding: 1.4rem 1.25rem 0 0; }
.as-steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.as-steps li::before { content: counter(as, decimal-leading-zero); display: block; font: 400 1.9rem/1 var(--serif); color: var(--ink-3); margin-bottom: .7rem; }
.as-steps h3 { font-size: 1.2rem; font-weight: 400; margin-bottom: .45rem; }
.as-steps p { color: var(--ink-2); font-size: 1rem; margin: 0; }
@media (max-width: 960px) { .as-steps { grid-template-columns: 1fr 1fr; } .as-steps li:nth-child(3) { padding-left: 0; border-left: 0; } .as-steps li { padding-bottom: 1.25rem; } }
@media (max-width: 560px) { .as-steps { grid-template-columns: 1fr; } .as-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }

.as-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 3rem; border: 1px solid var(--rule); }
.as-col { padding: 1.75rem 2rem; background: var(--sand); }
.as-col.as-human { background: var(--ink); color: #E9E1D0; }
.as-col .who { font: 700 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .35rem; }
.as-human .who { color: #C9A45C; }
.as-col h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: .9rem; }
.as-human h3 { color: #F7F2E8; }
.as-col ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); }
.as-human ul { color: #D8D0BF; }
.as-col li { margin-bottom: .4rem; }
.as-note { font: italic 1rem var(--serif); margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--rule); color: var(--ink-2); }
.as-human .as-note { border-top-color: #3A4762; color: #E9E1D0; }
@media (max-width: 760px) { .as-split { grid-template-columns: 1fr; } }

/* ---------- Hero: card beside front phone, 1s phone sequence ---------- */
@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
.stage-front { right: 7rem; }
.stage-back  { right: 18.5rem; }
.card-map { left: auto; right: -1.5rem; top: 15rem; bottom: auto; }

.stage-back  { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) .3s both; }
.stage-front { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) 1.3s both; }
.card-map    { animation: fade-only .8s ease-out 2.3s both; }
.card-review { animation: slide-in-left .7s ease-out 3.1s both; }
.card-flow   { animation: fade-up .7s ease-out 3.8s both; }
.card-map .fc-pill { animation: pill-glow 2.4s ease-in-out 3.2s infinite; }
.card-review .fc-check { animation: check-glow 2.4s ease-in-out 3.9s infinite; }
.card-flow li:nth-child(1) span { animation-delay: 4.5s; }
.card-flow li:nth-child(2) span { animation-delay: 6.5s; }
.card-flow li:nth-child(3) span { animation-delay: 8.5s; }
.card-flow li:nth-child(4) span { animation-delay: 10.5s; }

@media (max-width: 1100px) {
  .stage-front { right: 5.5rem; }
  .stage-back  { right: 15rem; }
  .card-map { right: -1rem; top: 13rem; }
}
@media (max-width: 900px) {
  .stage-front { right: 1rem; }
  .stage-back  { right: auto; left: 1.5rem; }
  .card-map { right: -.25rem; left: auto; top: 9rem; }
}
.stage-front { right: 5.5rem; }
.stage-back  { right: 16rem; }
.card-map { right: -2.75rem; }
@media (max-width: 1100px) { .stage-front { right: 4.5rem; } .stage-back { right: 13.5rem; } .card-map { right: -1.5rem; } }
@media (max-width: 900px) { .stage-front { right: 1rem; } .stage-back { right: auto; left: 1.5rem; } .card-map { right: -.25rem; } }

/* ---------- Hero: new background + up-right drift for cards ---------- */
.hero-v2 .hero-img { object-position: 60% 45%; filter: saturate(.75) sepia(.06); }
@keyframes drift-up-right { from { opacity: 0; transform: translate(-28px, 28px); } to { opacity: 1; transform: translate(0, 0); } }
.card-map    { animation: drift-up-right .9s cubic-bezier(.2,.7,.2,1) 2.3s both; }
.card-review { animation: drift-up-right .9s cubic-bezier(.2,.7,.2,1) 3.1s both; }
.card-flow   { animation: drift-up-right .9s cubic-bezier(.2,.7,.2,1) 3.8s both; }

/* ---------- Hero loop (JS-driven; no rotation or skew) ---------- */
.hero-stage.js-loop .stage-back,
.hero-stage.js-loop .stage-front,
.hero-stage.js-loop .float-card { animation: none; opacity: 0; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.hero-stage.js-loop .phone { transform: translateY(28px); }
.hero-stage.js-loop .float-card { transform: translate(-28px, 28px); }
.hero-stage.js-loop .is-in { opacity: 1; transform: translate(0, 0); }
.hero-stage.js-loop .phone.is-out { opacity: 0; transform: translateY(-28px); }
.hero-stage.js-loop .float-card.is-out { opacity: 0; transform: translate(28px, -28px); }
.hero-stage.js-loop.no-anim .stage-back,
.hero-stage.js-loop.no-anim .stage-front,
.hero-stage.js-loop.no-anim .float-card { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-stage.js-loop .stage-back, .hero-stage.js-loop .stage-front, .hero-stage.js-loop .float-card { opacity: 1; transform: none; transition: none; }
}

/* AssureStage photo row (aligned with the four steps) */
.as-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.as-photos figure { margin: 0; }
.as-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--rule); filter: saturate(.85) sepia(.05); display: block; }
@media (max-width: 960px) { .as-photos { grid-template-columns: 1fr 1fr; } }
.as-photos img { height: auto; }

/* ---------- Hero layout v3: cards beside phones, flow below ---------- */
.hero-v2-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.hero-stage { height: 37rem; }
.hero-stage .phone { width: 13rem; right: auto; bottom: auto; }
.stage-back  { left: 0;    top: 3rem; }
.stage-front { left: 8rem; top: 0; }
.float-card  { right: auto; bottom: auto; }
.card-map    { left: 22.5rem; top: 5.5rem; }
.card-review { left: 22.5rem; top: 14.5rem; }
.card-flow   { left: 1rem;  top: 33.25rem; }

/* entrance / exit directions */
.hero-stage.js-loop .card-review { transform: translateX(-36px); }
.hero-stage.js-loop .card-flow   { transform: translateY(-28px); }
.hero-stage.js-loop .card-map.is-in,
.hero-stage.js-loop .card-review.is-in,
.hero-stage.js-loop .card-flow.is-in { transform: translate(0, 0); }
.hero-stage.js-loop .card-review.is-out { transform: translateX(36px); }
.hero-stage.js-loop .card-flow.is-out   { transform: translateY(28px); }

@media (max-width: 1240px) {
  .hero-stage { height: 33rem; }
  .hero-stage .phone { width: 11.5rem; }
  .stage-front { left: 7rem; }
  .card-map, .card-review { left: 19.5rem; }
  .card-review { top: 13rem; }
  .card-flow { top: 29.5rem; left: 0; }
}
@media (max-width: 1060px) {
  .hero-v2-grid { grid-template-columns: 1fr; }
  .hero-v2 .hero-copy { max-width: none; }
  .hero-stage { max-width: 36rem; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
  .hero-stage { height: 37rem; max-width: 22rem; }
  .hero-stage .phone { width: 10rem; }
  .stage-back { left: 0; top: 2rem; }
  .stage-front { left: 6.5rem; top: 0; }
  .card-map    { left: 0; top: 24rem; }
  .card-review { left: 0; top: 31rem; }
  .card-flow   { display: none; }
}
.float-card { width: max-content; max-width: none; }
.card-review div span { white-space: nowrap; }
@media (max-width: 1240px) { .stage-front { left: 6.5rem; } .card-map, .card-review { left: 19rem; } .card-flow { top: 30.5rem; } .hero-stage { height: 34rem; } }
@media (max-width: 1060px) { .hero-stage { max-width: 35rem; } }
@media (max-width: 600px) { .card-map { left: 0; top: 25rem; } .card-review { left: 0; top: 31.5rem; } .hero-stage { height: 37rem; } }
@media (max-width: 600px) { .card-review { top: 32.25rem; } .hero-stage { height: 38rem; } }
.faq details ul { color: var(--ink-2); margin: -.5rem 0 1rem; padding-left: 1.25rem; max-width: 46rem; }
.faq details li { margin-bottom: .3rem; }
.faq details p strong { color: var(--ink); }

/* Return to use cases */
#use-cases { scroll-margin-top: 7rem; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.5rem; font: 700 .85rem var(--sans); color: var(--ink-2); text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; padding: .35rem .85rem; background: var(--paper); }
.back-link:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.split-photo + .back-link, .wrap > .back-link { grid-column: 1 / -1; }

/* Use-case animations at the top of each section */
.uc-head .back-link { margin-bottom: 1.75rem; }
.uc-flow { margin-top: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
section > .source-note.wrap { margin-top: -2rem; margin-bottom: 2.5rem; display: block; }

/* Precision Routing circle: AssureStage blue */
.flow .node-core .shape { fill: #1A55C4; stroke: #8FB0EE; stroke-width: 1.5; }
.flow .node-core text, .flow .node-core .n-label { fill: #FFFFFF; }
.flow .node-core .n-sub { fill: #DCE6FA; }
.flow .core-ring, .flow .core-pulse { stroke: #5C8DE4; }

.as-photos.as-wounds { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.as-wounds figcaption { font: .82rem/1.4 var(--sans); color: var(--ink-2); margin-top: .5rem; }
@media (max-width: 960px) { .as-photos.as-wounds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .as-photos.as-wounds { grid-template-columns: 1fr 1fr; } }

/* ---------- Animations: original charcoal-navy, lightened 15% ---------- */
.flow { --bg: #354765; background: var(--bg); border-color: #263657; }
.flow-bar, .flow-side, .flow-legend { border-color: #495D83; }
.flow button { border-color: #566A92; }
.flow .edge { stroke: #4E628D; }
.flow .node .shape, .flow .node-out .shape { fill: #384D71; }
.flow .node .shape { stroke: #98A0B3; }
.flow .pt-raw { fill: var(--bg); }
.flow .pt-read, .flow .pt-ok, .flow .pt-flag, .flow .pt-result { stroke: var(--bg); }
.flow-legend .l-ok { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #F7F2E8; }
.flow-caps text { fill: #A9A293; }
.flow .node-prod .shape { fill: #F7F2E8; stroke: #F7F2E8; }
.flow .node-prod .n-sub { fill: #465063; }
.flow .node-core .shape { fill: #1A55C4; stroke: #8FB0EE; }
.flow .node-late .shape { fill: rgba(224,138,116,.1); stroke: #E08A74; }
.as-photos.as-wounds { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 960px) { .as-photos.as-wounds { grid-template-columns: 1fr 1fr; } }
