/* PulseWard landing page.

   One accent, jade, and neutrals leaning toward it. No blue: the hospital's own
   colour takes over inside the product, so the page only has to carry the name.
   The theme follows the reader's system; the toggle in the header overrides it
   and is remembered on this device only. */

:root {
  --ground: #f3f5f0;
  --surface: #ffffff;
  --surface-2: #e9ede6;
  --line: #d3dacf;
  --ink: #111914;
  --ink-2: #435048;
  --ink-3: #5c6860;
  --accent: #0a7a4f;
  --accent-strong: #06603d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 122, 79, 0.1);
  --accent-glow: rgba(10, 122, 79, 0.22);
  --warn: #a15c07;
  --warn-soft: rgba(161, 92, 7, 0.12);
  --stop: #b3261e;
  --stop-soft: rgba(179, 38, 30, 0.1);
  --trace: rgba(10, 122, 79, 0.55);
  --grid: rgba(17, 25, 20, 0.06);
  --shadow: 0 1px 2px rgba(17, 25, 20, 0.05), 0 12px 32px -12px rgba(17, 25, 20, 0.18);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --nav-h: 68px;
  --page: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0a0f0c;
    --surface: #111814;
    --surface-2: #17201b;
    --line: #25312a;
    --ink: #e5ece7;
    --ink-2: #a8b4ac;
    --ink-3: #8a968f;
    --accent: #3ccb8a;
    --accent-strong: #62dba2;
    --accent-ink: #04120b;
    --accent-soft: rgba(60, 203, 138, 0.12);
    --accent-glow: rgba(60, 203, 138, 0.28);
    --warn: #e8a64a;
    --warn-soft: rgba(232, 166, 74, 0.14);
    --stop: #f2837b;
    --stop-soft: rgba(242, 131, 123, 0.13);
    --trace: rgba(60, 203, 138, 0.7);
    --grid: rgba(229, 236, 231, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #0a0f0c;
  --surface: #111814;
  --surface-2: #17201b;
  --line: #25312a;
  --ink: #e5ece7;
  --ink-2: #a8b4ac;
  --ink-3: #8a968f;
  --accent: #3ccb8a;
  --accent-strong: #62dba2;
  --accent-ink: #04120b;
  --accent-soft: rgba(60, 203, 138, 0.12);
  --accent-glow: rgba(60, 203, 138, 0.28);
  --warn: #e8a64a;
  --warn-soft: rgba(232, 166, 74, 0.14);
  --stop: #f2837b;
  --stop-soft: rgba(242, 131, 123, 0.13);
  --trace: rgba(60, 203, 138, 0.7);
  --grid: rgba(229, 236, 231, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

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

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

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section {
  padding: clamp(72px, 11vw, 132px) 0;
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
}

.section-head p {
  color: var(--ink-2);
  font-size: 1.125rem;
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-quiet:hover {
  border-color: var(--ink-3);
  background: var(--surface);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    color 0.2s,
    background-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="true"],
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--ink-3);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .moon {
    display: block;
  }
}

.menu-toggle {
  display: none;
}

.menu-toggle .bar {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}

.menu-toggle .bars {
  display: grid;
  gap: 4px;
}

.menu-toggle[aria-expanded="true"] .bar:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* The mobile menu is the same list, dropped below the header. It is closed
   unless the header carries .menu-open, so no attribute on the list can leave
   it showing at a width where the toggle is hidden. */
@media (max-width: 860px) {
  .menu-toggle {
    display: inline-grid;
  }

  .nav-actions .btn {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 12px 16px 20px;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.25s var(--ease),
      transform 0.25s var(--ease),
      visibility 0s linear 0.25s;
  }

  .site-header.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.25s var(--ease),
      transform 0.25s var(--ease);
  }

  .nav-links a {
    padding: 14px 12px;
    font-size: 1.05rem;
    border-radius: var(--radius-s);
  }

  .nav-links .nav-cta {
    display: block;
    margin-top: 8px;
  }

  .nav-links .nav-cta a {
    background: var(--accent);
    color: var(--accent-ink);
    text-align: center;
    font-weight: 600;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (min-width: 861px) {
  .nav-links .nav-cta {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}

.trace {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 180px;
  width: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  max-width: 54ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* The ward board: a small, live-looking picture of the thing a hospital
   actually watches all day. */
.board {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-title {
  display: grid;
  gap: 2px;
}

.board-title strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.board-title span {
  font-size: 0.82rem;
  color: var(--ink-3);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.board-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  background: var(--surface-2);
  border-radius: var(--radius-s);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}

.stat b {
  font: 500 1.35rem/1.1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.76rem;
  color: var(--ink-3);
}

.beds {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bed {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ground);
  display: grid;
  align-content: space-between;
  padding: 7px;
  font: 500 0.68rem/1 var(--font-mono);
  color: var(--ink-3);
  transition:
    background-color 0.6s var(--ease),
    border-color 0.6s var(--ease),
    color 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.bed i {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  transition: background-color 0.6s var(--ease);
}

.bed[data-state="occupied"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.bed[data-state="occupied"] i {
  background: var(--accent);
}

.bed[data-state="cleaning"] {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  color: var(--warn);
}

.bed[data-state="cleaning"] i {
  background: var(--warn);
}

.bed.flash {
  transform: scale(1.06);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.legend .l-occ {
  background: var(--accent);
  border-color: var(--accent);
}

.legend .l-cln {
  background: var(--warn);
  border-color: var(--warn);
}

.feed {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  display: grid;
  gap: 6px;
  min-height: 86px;
  font-size: 0.84rem;
  overflow: hidden;
}

.feed li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  animation: feed-in 0.5s var(--ease) both;
}

.feed time {
  flex: none;
  font: 500 0.74rem/1 var(--font-mono);
  color: var(--ink-3);
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- Surfaces (the three doors) ---------- */

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

.door {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.door::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.door:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow);
}

.door:hover::after {
  opacity: 1;
}

.door-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.door-icon svg {
  width: 24px;
  height: 24px;
}

.door h3 {
  font-size: 1.4rem;
}

.door .who {
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.door p {
  color: var(--ink-2);
}

.ticks {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.ticks li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.ticks li::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--accent) 0 3px, transparent 3.5px), var(--accent-soft);
}

/* ---------- Patient journey ---------- */

.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.journey::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 4%;
  right: 4%;
  height: 2px;
  background: linear-gradient(90deg, var(--line), var(--line));
}

.journey::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 4%;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 1.8s var(--ease);
}

.journey.in::after {
  width: 92%;
}

.journey li {
  position: relative;
  display: grid;
  gap: 10px;
  counter-increment: step;
}

.journey li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  font: 500 0.95rem/1 var(--font-mono);
  color: var(--ink-2);
  position: relative;
  z-index: 1;
  transition:
    border-color 0.4s var(--ease),
    color 0.4s var(--ease),
    background-color 0.4s var(--ease);
}

.journey.in li::before {
  border-color: var(--accent);
  color: var(--accent);
}

.journey li:nth-child(1)::before {
  transition-delay: 0.1s;
}
.journey li:nth-child(2)::before {
  transition-delay: 0.4s;
}
.journey li:nth-child(3)::before {
  transition-delay: 0.7s;
}
.journey li:nth-child(4)::before {
  transition-delay: 1s;
}
.journey li:nth-child(5)::before {
  transition-delay: 1.3s;
}
.journey li:nth-child(6)::before {
  transition-delay: 1.6s;
}

.journey h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.journey p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

.journey .tag {
  justify-self: start;
  font: 500 0.7rem/1 var(--font-mono);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Hosting ---------- */

.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.band .door {
  background: var(--ground);
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: start;
}

/* The clinic plan has no beds; its grid display would otherwise override [hidden]. */
.range-row[hidden] {
  display: none;
}

.estimate-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: var(--warn-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  font-size: 0.95rem;
}

.estimate-notice strong {
  color: var(--warn);
}

.facility-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.facility-switch legend {
  margin-bottom: 10px;
  font-weight: 600;
}

.facility-switch label {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
}

.facility-switch input {
  position: absolute;
  opacity: 0;
}

.facility-switch .name {
  font-weight: 600;
}

.facility-switch .desc {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.facility-switch input:checked + .name {
  color: var(--accent);
}

.facility-switch label:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.facility-switch label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.group-bill {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.group-bill table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.group-bill caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-3);
  padding-bottom: 8px;
}

.group-bill th,
.group-bill td {
  padding: 8px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.group-bill .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.group-bill tfoot th,
.group-bill tfoot td {
  border-bottom: 0;
  font-weight: 600;
}

@media (max-width: 760px) {
  .group-bill {
    grid-template-columns: 1fr;
  }
}

.base-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  margin-bottom: 16px;
}

.base-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.base-top h2,
.base-top h3 {
  font-size: 1.35rem;
}

.price {
  font: 500 1.6rem/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.price small {
  font-size: 0.85rem;
  color: var(--ink-3);
  letter-spacing: 0;
}

.base-card .ticks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.module {
  position: relative;
}

.module label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 14px;
  align-items: start;
  height: 100%;
  padding: 16px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.module label:hover {
  border-color: var(--ink-3);
}

.module input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.module .check {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 7px;
  border: 1.5px solid var(--ink-3);
  display: grid;
  place-items: center;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.module .check svg {
  width: 14px;
  height: 14px;
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.2s,
    transform 0.2s var(--ease);
}

.module input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.module input:checked + label .check {
  background: var(--accent);
  border-color: var(--accent);
}

.module input:checked + label .check svg {
  opacity: 1;
  transform: none;
}

.module input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.module input:disabled + label {
  cursor: default;
  opacity: 0.72;
}

.module input:disabled + label:hover {
  border-color: var(--line);
}

.module .name {
  font-weight: 600;
}

.module .amount {
  font: 500 0.95rem/1.4 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.module .desc {
  grid-column: 2 / span 2;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.soon {
  font: 500 0.7rem/1 var(--font-mono);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.estimate {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-m);
  background: var(--ink);
  color: var(--ground);
  box-shadow: var(--shadow);
}

.estimate h2,
.estimate h3 {
  font-size: 1.1rem;
  color: inherit;
}

.estimate .total {
  font: 500 clamp(2.2rem, 4vw, 2.8rem) / 1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.estimate .per {
  font-size: 0.9rem;
  opacity: 0.7;
}

.estimate dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.92rem;
}

.estimate dt {
  opacity: 0.75;
}

.estimate dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.estimate hr {
  border: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.15;
  margin: 0;
}

.range-row {
  display: grid;
  gap: 10px;
}

.range-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
}

.range-row output {
  font-family: var(--font-mono);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.estimate .note {
  font-size: 0.82rem;
  opacity: 0.7;
}

.estimate .btn-primary {
  width: 100%;
}

/* ---------- Late payments ---------- */

.stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface);
}

.stage {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border-right: 1px solid var(--line);
  position: relative;
}

.stage:last-child {
  border-right: 0;
}

.stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--stage, var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.stages.in .stage::before {
  transform: scaleX(1);
}

.stages.in .stage:nth-child(2)::before {
  transition-delay: 0.25s;
}
.stages.in .stage:nth-child(3)::before {
  transition-delay: 0.5s;
}
.stages.in .stage:nth-child(4)::before {
  transition-delay: 0.75s;
}

.stage .when {
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage h3 {
  font-size: 1.25rem;
}

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

.stage.grace {
  --stage: var(--accent);
}

.stage.suspended {
  --stage: var(--warn);
}

.stage.limited {
  --stage: var(--stop);
}

.stage.never {
  --stage: var(--ink);
}

.promise {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  color: var(--ink);
}

.promise svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 2px;
}

/* ---------- Trust ---------- */

.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.trust article {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 26px;
  background: var(--ground);
  transition: background-color 0.3s var(--ease);
}

.trust article:hover {
  background: var(--surface);
}

.trust svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.trust h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

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

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

.faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  transition: border-color 0.25s var(--ease);
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-3px, -3px);
}

.faq .answer {
  padding: 0 22px 22px;
  color: var(--ink-2);
  display: grid;
  gap: 10px;
  max-width: 72ch;
}

/* ---------- Closing call ---------- */

.closing {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  padding: clamp(40px, 7vw, 80px);
  background: var(--ink);
  color: var(--ground);
  display: grid;
  gap: 22px;
  justify-items: start;
  isolation: isolate;
}

.closing::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
}

.closing h2 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  max-width: 18ch;
  color: inherit;
}

.closing p {
  max-width: 58ch;
  opacity: 0.8;
  font-size: 1.1rem;
}

.closing .btn-quiet {
  color: var(--ground);
  border-color: color-mix(in srgb, var(--ground) 30%, transparent);
}

.closing .btn-quiet:hover {
  background: color-mix(in srgb, var(--ground) 10%, transparent);
}

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

.site-footer {
  padding: 48px 0 40px;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Motion pieces ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The pulse in the logo draws itself, rests, and draws again. */
.brand-pulse {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: brand-draw 6s var(--ease) infinite;
}

@keyframes brand-draw {
  0% {
    stroke-dashoffset: 100;
  }
  22%,
  100% {
    stroke-dashoffset: 0;
  }
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.motion-toggle[hidden] {
  display: none;
}

.motion-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.motion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.motion-toggle svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.motion-toggle .i-play,
.motion-toggle[aria-pressed="false"] .i-pause {
  display: none;
}

.motion-toggle[aria-pressed="false"] .i-play {
  display: block;
}

.motion-paused .brand-pulse,
.motion-paused .live::before,
.motion-paused .bed[data-state="critical"] {
  animation: none;
}

/* ---------- Ward board game ---------- */

.board-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bed[role="button"] {
  cursor: pointer;
}

.bed[role="button"]:hover {
  border-color: var(--ink-3);
}

.bed[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bed[data-state="critical"] {
  background: var(--stop-soft);
  border-color: color-mix(in srgb, var(--stop) 55%, transparent);
  color: var(--stop);
  animation: needs-look 1.4s ease-in-out infinite;
}

.bed[data-state="critical"] i {
  background: var(--stop);
}

@keyframes needs-look {
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--stop) 22%, transparent);
  }
}

.legend .l-crit {
  background: var(--stop);
  border-color: var(--stop);
}

.bump {
  animation: bump 0.45s var(--ease);
}

@keyframes bump {
  40% {
    transform: scale(1.12);
  }
}

.stat b {
  display: inline-block;
  transform-origin: left center;
}

.board-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.board-hint[hidden] {
  display: none;
}

.board-hint .mono {
  color: var(--ink-2);
}

/* ---------- Base builder ---------- */

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

.modular-copy {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.modular-copy h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
}

.modular-copy p {
  color: var(--ink-2);
  font-size: 1.125rem;
  max-width: 52ch;
}

.colony {
  margin: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 62%), var(--ground);
}

.colony-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.colony-wide .colony-canvas {
  aspect-ratio: 16 / 7;
}

.colony figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.colony-ask {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-2);
}

.colony-ask strong {
  color: var(--ink);
}

.estimate .total {
  transform-origin: left center;
}

/* ---------- Pricing and docs pages ---------- */

.section.page-head {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.section-head h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
}

.page-head .colony {
  margin-bottom: 28px;
}

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

.docs-toc {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.docs-toc strong {
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.docs-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.docs-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--ink);
  border-left-color: var(--accent);
}

.docs-body {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  max-width: 72ch;
}

.docs-body section {
  display: grid;
  gap: 14px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.docs-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.docs-body p,
.docs-body li {
  color: var(--ink-2);
}

.docs-steps {
  margin: 0;
  padding: 0 0 0 1.3em;
  display: grid;
  gap: 8px;
}

.docs-steps li::marker {
  font-family: var(--font-mono);
  color: var(--accent);
}

.docs-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.docs-table:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.docs-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.docs-table th {
  font: 500 0.75rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Reveal on scroll ----------
   Content is visible without JavaScript. Only a page that has run the script
   (html.js) hides blocks until they scroll in, so a crawler or a reader with
   scripts off gets the whole page. */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .hero .rise,
.js .page-head .rise {
  animation: rise 0.9s var(--ease) both;
  animation-delay: var(--delay, 0s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

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

@media (max-width: 1020px) {
  .hero-grid,
  .pricing-grid,
  .modular-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .docs-toc {
    position: static;
  }

  .docs-toc ol {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .estimate {
    position: static;
  }

  .journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
  }

  .journey::before,
  .journey::after {
    display: none;
  }

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

  .stage:nth-child(2) {
    border-right: 0;
  }

  .stage:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

@media (max-width: 760px) {
  .wrap {
    padding: 0 16px;
  }

  .doors,
  .hosting,
  .modules,
  .base-card .ticks,
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .journey li {
    grid-template-columns: 46px 1fr;
    column-gap: 14px;
  }

  .journey li::before {
    grid-row: span 3;
  }

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

  .stage {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stage:last-child {
    border-bottom: 0;
  }

  /* Every bed stays on the board: hiding some would hide part of the game. */
  .beds {
    gap: 5px;
  }

  .bed {
    padding: 5px;
    font-size: 0.6rem;
  }

  .board {
    padding: 14px;
  }

  .board-head {
    flex-wrap: wrap;
  }

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

  .colony-wide .colony-canvas {
    aspect-ratio: 4 / 3;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  /* Less motion, not none: the live pieces keep slow, gentle versions, and
     the Pause button beside them stops them entirely. */
  .live::before,
  .brand-pulse {
    animation-duration: 3.2s !important;
    animation-iteration-count: infinite !important;
  }

  .brand-pulse {
    animation-duration: 12s !important;
  }

  .bed[data-state="critical"] {
    animation-duration: 2.8s !important;
    animation-iteration-count: infinite !important;
  }

  .bed,
  .bed i {
    transition-duration: 0.9s !important;
  }

  .feed li {
    animation-duration: 0.9s !important;
  }
}
