﻿/* ==========================================================================
   Meta-Health — marketing site
   Design language: "clinical instrument", full dark — the near-black navy of
   the product itself, glow accents, the app's action blue, and the logo's
   cyan/magenta circuit traces as thin connective accents (never washes).
   Product panels recreate the real app UI; clinical data renders in mono
   with tabular numerals, exactly as it does in the product.
   ========================================================================== */

/* Full-dark theme: near-black clinical navy, matching the product itself.
   "paper" tokens now mean page/elevation surfaces on the dark scale. */
:root {
  --paper: hsl(225 45% 4.5%);
  --paper-2: hsl(224 34% 7%);
  --card: hsl(224 30% 8.5%);
  --ink: hsl(213 32% 94%);
  --ink-2: hsl(225 34% 11%);
  --ink-3: hsl(224 26% 16%);
  --text: hsl(215 22% 86%);
  --text-muted: hsl(221 12% 62%);
  --text-inv: hsl(214 32% 93%);
  --text-inv-muted: hsl(221 12% 64%);
  --blue: hsl(223 80% 58%);
  --blue-deep: hsl(223 72% 50%);
  --blue-link: hsl(223 100% 74%);
  --blue-soft: hsl(223 80% 60% / 0.12);
  --cyan: #29b9ea;
  --magenta: #ef2a62;
  --green: hsl(145 55% 45%);
  --green-inv: hsl(145 60% 55%);
  --amber: hsl(40 90% 55%);
  --line: hsl(224 16% 20%);
  --line-soft: hsl(224 16% 14%);
  --line-inv: hsl(224 15% 22%);
  --radius: 8px;
  --radius-lg: 14px;
  --font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --shadow-card: 0 1px 2px hsl(226 60% 2% / 0.5), 0 10px 32px hsl(226 60% 2% / 0.4);
  --shadow-deep: 0 2px 6px hsl(226 60% 2% / 0.55), 0 24px 64px hsl(226 60% 2% / 0.5);
}

/* --- Reset / base ------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: hsl(223 68% 50% / 0.18); }

.wrap {
  max-width: 1176px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 36px);
}

.section { padding-block: clamp(64px, 8.5vw, 108px); }
.section-tight { padding-block: clamp(44px, 6vw, 72px); }
.section-alt { background: var(--paper-2); }

/* Elevated dark bands (slightly lifted from the page, with a soft glow) */
.band-ink {
  background:
    radial-gradient(900px 420px at 85% -10%, hsl(223 70% 30% / 0.35), transparent 65%),
    hsl(224 36% 6.5%);
  border-block: 1px solid var(--line-soft);
  color: var(--text-inv);
}
.band-ink .eyebrow { color: var(--text-inv-muted); }
.band-ink .h2, .band-ink h2, .band-ink h3 { color: #fff; }
.band-ink p { color: var(--text-inv-muted); }

/* --- Typography --------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 740;
  font-size: clamp(2.35rem, 4.8vw, 3.55rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  color: var(--ink);
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 650;
  font-size: 1.16rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  color: var(--ink);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 28px;
}

p { margin: 0 0 16px; }
.muted { color: var(--text-muted); }

/* Eyebrow with circuit-trace marker (line + hollow node, from the logo) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 40px;
  height: 8px;
  flex: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'><line x1='0' y1='4' x2='30' y2='4' stroke='%2329b9ea' stroke-width='2'/><circle cx='35' cy='4' r='2.6' fill='none' stroke='%2329b9ea' stroke-width='2'/></svg>");
  background-repeat: no-repeat;
}
.eyebrow.mgnt::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'><line x1='0' y1='4' x2='30' y2='4' stroke='%23ef2a62' stroke-width='2'/><circle cx='35' cy='4' r='2.6' fill='none' stroke='%23ef2a62' stroke-width='2'/></svg>");
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }

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

.band-ink .btn-ghost { color: var(--text-inv); border-color: var(--line-inv); }
.band-ink .btn-ghost:hover { border-color: var(--text-inv); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }

/* --- Nav ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(225 45% 4.5% / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}
.nav-logo { flex: none; display: inline-flex; align-items: center; gap: 11px; }
.nav-logo img { height: 34px; width: auto; }
.nav-logo .brand-word {
  font-family: var(--font-display);
  font-stretch: 120%;
  font-weight: 780;
  font-size: 1.08rem;
  letter-spacing: 0.015em;
  color: var(--ink);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  font-weight: 550;
  font-size: 0.93rem;
  color: var(--text);
  padding: 9px 13px;
  border-radius: 6px;
}
.nav-links a:not(.btn):hover { background: var(--blue-soft); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--blue-link); }
.nav-links .btn { margin-left: 10px; padding: 11px 18px; color: #fff; }

.nav-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ink);
}
.nav-burger svg { width: 18px; height: 14px; }

@media (max-width: 840px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px clamp(20px, 4vw, 36px) 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links .btn { margin: 8px 0 0; }
}

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

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 420px at 18% -12%, hsl(196 80% 50% / 0.13), transparent 65%),
    radial-gradient(860px 520px at 82% 8%, hsl(223 85% 55% / 0.16), transparent 62%),
    radial-gradient(520px 380px at 92% 92%, hsl(340 80% 50% / 0.07), transparent 60%);
}
.hero-flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line);
  background: hsl(224 30% 9% / 0.7);
  border-radius: 999px;
  padding: 8px 15px;
  margin: 0 0 22px;
}
.hero-flag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
}
.hl-cyan {
  background: linear-gradient(92deg, var(--cyan), hsl(210 95% 66%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 96px);
}
.hero-copy { position: relative; z-index: 2; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* Circuit traces pinned to the console (logo motif, drawn in on load) */
.console-slot { position: relative; }
.ctrace {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.ctrace path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ctrace circle { fill: var(--paper); stroke-width: 2; }
.ctrace-top { top: -70px; right: 34px; }
.ctrace-bottom { bottom: -64px; left: 40px; }
.js .trace-draw {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: trace-in 1.2s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}
.js .trace-draw.t2 { animation-delay: 0.3s; }
@keyframes trace-in { to { stroke-dashoffset: 0; } }
@media (max-width: 960px) { .ctrace { display: none; } }

/* --- Ops console (hero signature) --------------------------------------- */

.console {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, hsl(225 32% 10%), hsl(225 42% 6%));
  border: 1px solid var(--line-inv);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-inv);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
}
.console-head .live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-inv);
}
.console-head .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-inv);
}
.js .console-head .live::before { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.oplog {
  list-style: none;
  margin: 0;
  padding: 14px 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}
.oplog li {
  display: grid;
  grid-template-columns: 62px 76px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 6px;
}
.oplog li:hover { background: hsl(224 30% 50% / 0.08); }
.oplog .t { color: hsl(222 12% 46%); }
.oplog .tag { font-weight: 600; font-size: 0.7rem; letter-spacing: 0.05em; }
.oplog .d { color: var(--text-inv); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oplog .d small { color: var(--text-inv-muted); font-size: inherit; }
.oplog .s {
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
  border: 1px solid var(--line-inv);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.oplog .s.ok { color: var(--green-inv); border-color: hsl(145 60% 55% / 0.35); }
.tag-cyan { color: var(--cyan); }
.tag-blue { color: hsl(223 100% 74%); }
.tag-mgnt { color: hsl(343 88% 68%); }
.tag-green { color: var(--green-inv); }

.oplog .cursor-line { color: var(--text-inv-muted); }
.oplog .cursor-line .caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  vertical-align: -2px;
  background: var(--cyan);
}
.js .oplog .cursor-line .caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* JS reveals the log line by line; without JS everything is visible */
.js .oplog li { opacity: 0; transform: translateY(5px); }
.js .oplog li.on {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .oplog li { grid-template-columns: 54px 70px 1fr auto; gap: 8px; padding: 8px 10px; }
  .oplog { font-size: 0.72rem; }
}
@media (max-width: 480px) {
  .oplog li { grid-template-columns: 64px 1fr auto; }
  .oplog .t { display: none; }
}

/* --- Scroll reveal ------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* --- Section headers ----------------------------------------------------- */

.sec-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head .lead { margin-bottom: 0; }

/* --- Module grid --------------------------------------------------------- */

.mod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1020px) { .mod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .mod-grid { grid-template-columns: 1fr; } }

.mod-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 20px;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.mod-card:hover {
  text-decoration: none;
  border-color: hsl(223 68% 50% / 0.45);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.mod-key {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 7px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mod-card:hover .mod-key { color: var(--blue); border-color: hsl(223 68% 50% / 0.4); }
.mod-card .h3 { margin: 0; }
.mod-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* --- Architecture (tenancy) --------------------------------------------- */

.arch {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 44px;
}
.arch-node {
  flex: 1;
  background: hsl(225 30% 14% / 0.75);
  border: 1px solid var(--line-inv);
  border-radius: var(--radius);
  padding: 24px 22px;
  min-width: 0;
}
.arch-node .mono-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 10px;
}
.arch-node:nth-child(5) .mono-label { color: var(--magenta); }
.arch-node strong {
  display: block;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-size: 1.08rem;
  color: #fff;
  margin-bottom: 6px;
}
.arch-node p { font-size: 0.88rem; line-height: 1.55; margin: 0; }

.arch-link {
  flex: 0 0 clamp(28px, 4vw, 64px);
  position: relative;
}
.arch-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  right: 9px;
  height: 2px;
  margin-top: -1px;
  background: var(--line-inv);
}
.arch-link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 7px;
  height: 7px;
  margin-top: -4.5px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: var(--paper);
}
.arch-link.mgnt::after { border-color: var(--magenta); }

@media (max-width: 780px) {
  .arch { flex-direction: column; }
  .arch-link { flex-basis: 34px; }
  .arch-link::before { left: 32px; right: auto; width: 2px; top: -1px; bottom: 9px; height: auto; margin: 0; }
  .arch-link::after { top: auto; bottom: 0; left: 29.5px; right: auto; margin: 0; }
}

/* --- Deep-dive rows ------------------------------------------------------ */

.dive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(40px, 5vw, 64px);
}
.dive + .dive { border-top: 1px solid var(--line-soft); }
.dive.flip .dive-copy { order: 2; }
.dive.flip .dive-visual { order: 1; }
.dive-copy .lead { margin-bottom: 18px; font-size: 1.02rem; }
.dive-points { list-style: none; margin: 0 0 22px; padding: 0; }
.dive-points li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: 0.95rem;
  color: var(--text);
}
.dive-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
}
.dive-points.mgnt li::before { border-color: var(--magenta); }

@media (max-width: 900px) {
  .dive { grid-template-columns: minmax(0, 1fr); }
  .dive.flip .dive-copy { order: 1; }
  .dive.flip .dive-visual { order: 2; }
}

/* --- Product panels ------------------------------------------------------
   Dive visuals recreate the actual product UI: dark clinical workspace,
   uppercase mono panel headers, tabular data, status chips. Faithful to the
   app, not illustrative. */
.panel {
  background: linear-gradient(180deg, hsl(223 34% 9%), hsl(224 40% 6%));
  border: 1px solid var(--line-inv);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  color: var(--text-inv);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-inv);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
}
.panel-body { padding: 14px; overflow-x: auto; }


/* Claim table */
.claim-table { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.76rem; width: 100%; border-collapse: collapse; }
.claim-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-inv);
}
.claim-table td {
  padding: 9px 10px;
  border-bottom: 1px solid hsl(224 15% 18% / 0.7);
  white-space: nowrap;
  color: var(--text-inv);
}
.claim-table tr:last-child td { border-bottom: 0; }
.claim-table .num { text-align: right; }
.claim-table .code { color: hsl(223 100% 74%); }

/* Ward board */
.ward { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.bed {
  aspect-ratio: 1.15;
  border-radius: 6px;
  border: 1px solid hsl(224 15% 20%);
  background: hsl(224 24% 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-inv-muted);
}
.bed.occ { background: hsl(223 80% 60% / 0.16); border-color: hsl(223 80% 60% / 0.4); color: hsl(223 100% 78%); font-weight: 600; }
.bed.alert { background: hsl(350 80% 55% / 0.14); border-color: hsl(350 80% 55% / 0.4); color: hsl(350 90% 70%); font-weight: 600; }
.ward-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
}
.ward-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ward-legend i { width: 9px; height: 9px; border-radius: 3px; }

/* Scribe (transcript → SOAP) */
.scribe { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.scribe-col {
  border: 1px solid hsl(224 15% 20%);
  border-radius: 7px;
  padding: 13px 14px;
  min-width: 0;
}
.scribe-col .mono-label,
.trend .mono-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
  display: block;
  margin-bottom: 10px;
}
.wave { display: flex; align-items: flex-end; gap: 3px; height: 42px; margin-bottom: 10px; }
.wave i { flex: 1; background: hsl(223 90% 66% / 0.6); border-radius: 2px; }
.scribe-quote { font-size: 0.78rem; color: var(--text-inv-muted); font-style: italic; margin: 0; }
.scribe-arrow {
  align-self: center;
  font-family: var(--font-mono);
  color: var(--magenta);
  font-size: 0.9rem;
}
.soap { font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.7; color: var(--text-inv); }
.soap b { color: hsl(343 88% 68%); font-weight: 600; }
@media (max-width: 540px) {
  .scribe { grid-template-columns: 1fr; }
  .scribe-arrow { transform: rotate(90deg); justify-self: center; }
}

/* CTA band with console alongside copy */
.cta-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.cta-split .lead { margin-bottom: 26px; }
@media (max-width: 900px) { .cta-split { grid-template-columns: minmax(0, 1fr); } }

/* Rounded glowing CTA shell (closing card) */
.cta-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(640px 320px at 12% -20%, hsl(196 85% 50% / 0.14), transparent 62%),
    radial-gradient(760px 420px at 88% 120%, hsl(223 85% 55% / 0.18), transparent 60%),
    hsl(224 34% 8%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(32px, 5vw, 64px);
  box-shadow: var(--shadow-deep);
}
.cta-shell .h2 { color: #fff; }
.cta-shell p { color: var(--text-inv-muted); }

/* --- Feature tiles (security teaser, etc.) ------------------------------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 960px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tile-grid { grid-template-columns: 1fr; } }

.tile {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.tile .h3 { font-size: 1.02rem; }
.tile p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

.band-ink .tile { background: hsl(225 30% 14% / 0.75); border-color: var(--line-inv); }
.band-ink .tile .h3 { color: #fff; }
.band-ink .tile p { color: var(--text-inv-muted); }

/* --- CTA band ------------------------------------------------------------ */

.cta-band { text-align: center; }
.cta-band .h2 { margin-inline: auto; max-width: 620px; }
.cta-band .lead { margin-inline: auto; margin-bottom: 30px; }
.cta-band .hero-ctas { justify-content: center; margin-bottom: 0; }

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

.footer {
  background: hsl(226 48% 3.5%);
  border-top: 1px solid var(--line-soft);
  color: var(--text-inv-muted);
  padding-block: clamp(48px, 6vw, 72px) 32px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-inv);
  margin-bottom: 26px;
}
@media (max-width: 840px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-mark {
  font-family: var(--font-display);
  font-stretch: 122%;
  font-weight: 780;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 12px;
}
.footer-mark .dot-c { color: var(--cyan); }
.footer-mark .dot-m { color: var(--magenta); }
.footer p { font-size: 0.86rem; line-height: 1.6; max-width: 34ch; }

.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
  margin: 0 0 14px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--text-inv); font-weight: 500; }
.footer a:hover { color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

/* --- Page hero (subpages) ------------------------------------------------ */

.page-hero { padding-block: clamp(52px, 7vw, 84px) clamp(36px, 5vw, 56px); }
.page-hero .display { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-hero .lead { margin-bottom: 0; }

/* --- Platform page ------------------------------------------------------- */

.group { padding-block: clamp(36px, 5vw, 56px); }
.group + .group { border-top: 1px solid var(--line-soft); }
.group-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.group-head .h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.group-head .count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }

.feat {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.feat .h3 { font-size: 1.02rem; }
.feat ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.87rem;
  color: var(--text-muted);
}
.feat li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  line-height: 1.5;
}
.feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
}

/* --- Security page ------------------------------------------------------- */

.sec-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(36px, 5vw, 52px);
}
.sec-row + .sec-row { border-top: 1px solid var(--line-soft); }
.sec-row .h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); position: sticky; top: 92px; }
@media (max-width: 820px) {
  .sec-row { grid-template-columns: minmax(0, 1fr); }
  .sec-row .h2 { position: static; }
}
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.sec-list li:first-child { padding-top: 4px; }
.sec-list li:last-child { border-bottom: 0; }
.sec-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 3px; }
.sec-list span { font-size: 0.92rem; color: var(--text-muted); line-height: 1.55; }

/* --- Contact page -------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.contact-side .sec-list li { border-bottom: 0; padding: 10px 0; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 3.5vw, 36px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 14px 0 0;
}

/* ---------------------------------------------------------------------------
   App window — pixel-faithful recreation of the Meta-Health portal shell,
   dark theme, taken from the product source at its 15px root font.
   Tokens: bg #030711 · card #060E23 · border #2C313A · fg #E1E7EF ·
   muted #9BA0AB · brand #618df9 · primary #5C8AFF · radius 5.625px ·
   card shadow 0 1px 2px rgb(0 0 0 / .30) · mono "Cascadia Code"/Consolas.
   Composition: TitleBar 33.75px → middle row (rail 45px | explorer | main
   column: tab strip 30px → allergies bar → content p-3) → status bar 22.5px. */

.appwin {
  --aw-bg: #030711;
  --aw-card: #060e23;
  --aw-border: #2c313a;
  --aw-fg: #e1e7ef;
  --aw-muted: #9ba0ab;
  --aw-accent: #618df9;
  --aw-primary: #5c8aff;
  --aw-muted-bg: #1f2229;
  --aw-red: #f87171;
  --aw-mono: "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
  --aw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --aw-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--aw-bg);
  border: 1px solid var(--aw-border);
  border-radius: 10px;
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--aw-fg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
.appwin-wide { box-shadow: 0 0 140px hsl(223 85% 55% / 0.14), var(--shadow-deep); }
.appwin [hidden] { display: none !important; }

/* lucide icon sizing (24 viewBox, stroke currentColor, sw 2, round caps) */
.appwin .ic { width: 15px; height: 15px; flex: none; }
.appwin .ic19 { width: 19px; height: 19px; }
.appwin .ic18 { width: 18.75px; height: 18.75px; }
.appwin .ic13 { width: 13.125px; height: 13.125px; }
.appwin .ic11 { width: 11.25px; height: 11.25px; }
.appwin .ic22 { width: 22.5px; height: 22.5px; }
.appwin .ic45 { width: 45px; height: 45px; }

/* --- Title bar (h-9 = 33.75px, bg card) ---------------------------------- */
.appwin-titlebar {
  display: flex;
  align-items: center;
  gap: 3.75px;
  height: 33.75px;
  flex: none;
  padding: 0 7.5px;
  background: var(--aw-card);
  border-bottom: 1px solid var(--aw-border);
  box-shadow: var(--aw-shadow);
  user-select: none;
  white-space: nowrap;
}
.appwin-titlebar .tb-left,
.appwin-titlebar .tb-right { display: flex; align-items: center; gap: 1.875px; flex: 1 1 0; min-width: 0; }
.appwin-titlebar .tb-right { justify-content: flex-end; }
.appwin-titlebar .brand {
  display: inline-flex;
  align-items: center;
  gap: 5.625px;
  margin-right: 5.625px;
  padding-left: 1.875px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--aw-fg);
  flex: none;
}
.brand-chip {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5.625px;
  background: var(--aw-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.appwin .tbtn {
  display: inline-grid;
  place-items: center;
  width: 24.375px;
  height: 22.5px;
  border-radius: 5.625px;
  color: var(--aw-muted);
  flex: none;
}
.appwin .tbtn.on { background: rgb(97 141 249 / 0.15); color: var(--aw-accent); }
.appwin .tbtn.dis { opacity: 0.3; }
.appwin-titlebar .tb-divider { width: 1px; height: 15px; margin: 0 5.625px; background: var(--aw-border); flex: none; }
.appwin-titlebar .facility {
  display: inline-flex;
  align-items: center;
  gap: 5.625px;
  height: 22.5px;
  max-width: 240px;
  min-width: 0;
  padding: 0 5.625px;
  border-radius: 5.625px;
  font-size: 12px;
  font-weight: 500;
  color: var(--aw-fg);
}
.appwin-titlebar .facility .fac-ic { color: var(--aw-accent); }
.appwin-titlebar .facility .fname { overflow: hidden; text-overflow: ellipsis; }
.appwin-titlebar .facility .fchev { color: var(--aw-muted); }

/* Command centre (centre search pill) */
.appwin-search {
  display: flex;
  align-items: center;
  gap: 7.5px;
  height: 22.5px;
  flex: 0 1 460px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--aw-border);
  border-radius: 5.625px;
  background: var(--aw-bg);
  padding-right: 7.5px;
  font-size: 12px;
  color: var(--aw-muted);
}
.appwin-search .stripe { width: 3px; height: 100%; flex: none; background: var(--aw-accent); }
.appwin-search > .ic { margin-left: 3.75px; }
.appwin-search .q { display: flex; align-items: baseline; gap: 5.625px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.appwin-search .q b { font-size: 12px; font-weight: 600; color: var(--aw-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appwin-search .q small { font-family: var(--aw-mono); font-size: 11px; color: var(--aw-muted); }
.appwin-search kbd {
  font-family: var(--aw-mono);
  font-size: 9.5px;
  line-height: 14px;
  border: 1px solid var(--aw-border);
  border-radius: 5.625px;
  background: var(--aw-card);
  padding: 0 3.75px;
  color: var(--aw-muted);
  flex: none;
}
/* The hero window is too narrow for the command centre — demo window keeps it */
.console-slot .appwin-search { display: none; }
.console-slot .allergy-pill:nth-of-type(n+2) { display: none; }

/* --- Middle row: rail | explorer | main column --------------------------- */
.appwin-mid { display: flex; align-items: stretch; flex: 1 1 auto; min-height: 0; }

/* Activity rail (w-12 = 45px, items 41.25px tall, icons 19px) */
.appwin-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45px;
  flex: none;
  padding: 3.75px 0;
  background: var(--aw-card);
  border-right: 1px solid var(--aw-border);
  box-shadow: var(--aw-shadow);
  color: var(--aw-muted);
}
.appwin-rail .ric {
  position: relative;
  display: grid;
  place-items: center;
  width: 45px;
  height: 41.25px;
  border-left: 2px solid transparent;
  color: var(--aw-muted);
}
.appwin-rail .ric.on { border-left-color: var(--aw-accent); color: var(--aw-fg); }
.appwin-rail .spacer { margin-top: auto; }
.appwin-rail .rbadge {
  position: absolute;
  top: 5.625px;
  right: 5.625px;
  display: grid;
  place-items: center;
  height: 13.125px;
  min-width: 13.125px;
  padding: 0 3.75px;
  border-radius: 999px;
  background: var(--aw-accent);
  box-shadow: 0 0 0 2px var(--aw-card);
  font-family: var(--aw-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.appwin-rail .rbadge.red { background: #fb2c36; }
.appwin-rail .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aw-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Explorer sidebar (w-64 = 240px, bg muted/40) */
.appwin-side {
  display: flex;
  flex-direction: column;
  width: 240px;
  flex: none;
  overflow: hidden;
  border-right: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.4);
}
.console-slot .appwin-side { width: 180px; } /* miniature hero window */
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  flex: none;
  padding: 0 3.75px 0 11.25px;
}
.side-head .side-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--aw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-head .side-x { display: grid; place-items: center; width: 22.5px; height: 22.5px; border-radius: 5.625px; color: var(--aw-muted); }
.side-scroll { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 3.75px 0 11.25px; }
.side-group-head {
  display: flex;
  align-items: center;
  gap: 3.75px;
  height: 22px;
  padding: 0 7.5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--aw-muted);
}
.side-group-head .n { margin-left: auto; font-family: var(--aw-mono); font-size: 10px; font-weight: 400; opacity: 0.7; }
.srow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5.625px;
  height: 22px;
  padding: 0 7.5px 0 26.25px;
  font-size: 12px;
  color: var(--aw-muted);
  white-space: nowrap;
}
.srow > .ic { width: 13px; height: 13px; }
.srow .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.srow .chev { margin-left: auto; display: inline-flex; color: var(--aw-muted); transform: rotate(-90deg); transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.srow .chev.open { transform: none; }
.srow.sub { padding-left: 48.75px; }
.srow.on { background: rgb(97 141 249 / 0.1); color: var(--aw-fg); }
.srow.on > .ic { color: var(--aw-accent); }
.srow.patient {
  height: 22.5px;
  padding-left: 18.75px;
  padding-right: 3.75px;
  font-size: 12.5px;
  color: var(--aw-fg);
}
.srow.patient .pdot { width: 5.625px; height: 5.625px; border-radius: 50%; background: var(--aw-accent); flex: none; }
.srow.patient.p2 .pdot { background: #e06c75; }
.srow.patient.active { background: rgb(97 141 249 / 0.12); }
.srow.patient.active::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 1.875px; background: var(--aw-accent); }

/* Main column: tab strip + allergies bar + content */
.appwin-main-col { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow: hidden; }

/* Tab strip (h-8 = 30px, bg card; active tab opens into the page) */
.appwin-tabs {
  display: flex;
  align-items: stretch;
  height: 30px;
  flex: none;
  background: var(--aw-card);
  border-bottom: 1px solid var(--aw-border);
  box-shadow: var(--aw-shadow);
  overflow: hidden;
}
.appwin-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5.625px;
  min-width: 132px;
  max-width: 210px;
  flex: none;
  padding-left: 9.375px;
  padding-right: 5.625px;
  border-right: 1px solid var(--aw-border);
  font-size: 12px;
  color: var(--aw-muted);
  white-space: nowrap;
}
.appwin-tab .tdot { width: 5.625px; height: 5.625px; border-radius: 50%; background: var(--aw-accent); flex: none; }
.appwin-tab.t2 .tdot { background: #e06c75; }
.appwin-tab .tlabel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.appwin-tab .tclose {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 5.625px;
  color: var(--aw-muted);
  flex: none;
  opacity: 0;
}
.appwin-tab.active { background: var(--aw-bg); color: var(--aw-fg); }
.appwin-tab.active .tclose { opacity: 1; }
.appwin-tab.active::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1.875px; background: var(--aw-accent); }
.appwin-tab.settings { font-style: italic; }
.appwin-tab.settings > .ic { opacity: 0.7; }
.console-slot .appwin-tab { min-width: 0; padding-left: 7.5px; }
.console-slot .appwin-tab:not(.active) .tclose { display: none; }

/* Allergies safety strip (transparent over the page bg) */
.allergy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 15px;
  row-gap: 3.75px;
  flex: none;
  padding: 5.625px 11.25px;
  border-bottom: 1px solid var(--aw-border);
}
.allergy-bar .al-label {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aw-muted);
}
.allergy-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 5.625px; min-width: 0; }
.allergy-pill {
  display: inline-flex;
  align-items: center;
  gap: 3.75px;
  border-radius: 999px;
  border: 1px solid rgb(153 27 27 / 0.6);
  background: rgb(127 29 29 / 0.3);
  padding: 1.875px 7.5px;
  font-size: 11.25px;
  line-height: 15px;
  font-weight: 500;
  color: rgb(248 113 113);
  white-space: nowrap;
}
.allergy-pill .sev { opacity: 0.7; }

/* Content canvas (p-3 = 11.25px on #030711) */
.appwin-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 11.25px;
  background: var(--aw-bg);
  overflow: hidden;
}

/* --- Status bar (h-6 = 22.5px, all items left-aligned) ------------------- */
.appwin-status {
  display: flex;
  align-items: center;
  height: 22.5px;
  flex: none;
  padding: 0 3.75px;
  border-top: 1px solid var(--aw-border);
  background: var(--aw-card);
  box-shadow: var(--aw-shadow);
  font-size: 11px;
  color: var(--aw-muted);
  white-space: nowrap;
  user-select: none;
  overflow: hidden;
}
.appwin-status .sit { display: inline-flex; align-items: center; gap: 5.625px; height: 100%; padding: 0 7.5px; min-width: 0; }
.appwin-status .sit span { overflow: hidden; text-overflow: ellipsis; }
.appwin-status .sit.warn { font-weight: 600; color: #ffb900; }

/* --- Appointments (portal PatientAppointmentsPage) -----------------------
   Shared with the dive-panel recreations, so colors are literal. */
.appt-group {
  border: 1px solid #2c313a;
  border-radius: 5.625px;
  background: #060e23;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  overflow: hidden;
}
.appt-group + .appt-group { margin-top: 11.25px; }
.appt-group .list-label { padding: 7.5px 11.25px; border-bottom: 1px solid #2c313a; }
.appt-group .appt-list { margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.list-label {
  display: flex;
  align-items: center;
  gap: 7.5px;
  padding: 11.25px 11.25px 5.625px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #9ba0ab;
}
.list-label .n { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.appt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #2c313a;
  border-radius: 5.625px;
  background: #060e23;
  overflow: hidden;
}
.appt {
  display: flex;
  align-items: center;
  gap: 11.25px;
  padding: 9.375px 11.25px;
  border-bottom: 1px solid rgb(44 49 58 / 0.6);
}
.appt:last-child { border-bottom: 0; }
.appt-date { width: 52.5px; flex: none; text-align: center; font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.appt-date .m { display: block; font-size: 11px; letter-spacing: 0.025em; text-transform: uppercase; color: #9ba0ab; }
.appt-date .d { display: block; font-size: 16.875px; font-weight: 600; line-height: 1; color: #e1e7ef; }
.appt-date .y { display: block; font-size: 10px; color: #9ba0ab; }
.appt-sep { width: 1px; height: 33.75px; flex: none; background: #2c313a; }
.appt-main { min-width: 0; flex: 1 1 auto; }
.appt-main .when {
  display: flex;
  align-items: center;
  gap: 7.5px;
  font-size: 13px;
  color: #e1e7ef;
  white-space: nowrap;
  overflow: hidden;
}
.appt-main .when b { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.appt-main .who {
  display: flex;
  align-items: center;
  gap: 5.625px;
  margin-top: 1.875px;
  font-size: 11px;
  color: #9ba0ab;
  white-space: nowrap;
  overflow: hidden;
}
.appt-main .who svg { width: 11.25px; height: 11.25px; flex: none; }

/* Status chips — the portal's STATUS_STYLES vocabulary */
.pill {
  display: inline-block;
  flex: none;
  border-radius: 5.625px;
  padding: 1.875px 5.625px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #9ba0ab;
  background: #1f2229;
}
.pill.booked { color: #60a5fa; background: rgb(43 127 255 / 0.12); }
.pill.ok { color: #34d399; background: rgb(16 185 129 / 0.12); }
.pill.pend { color: #fbbf24; background: rgb(245 158 11 / 0.15); }
.pill.bad { color: #f87171; background: rgb(251 44 54 / 0.12); }

/* --- Demo machinery ------------------------------------------------------ */
.demo-main {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 500px;
  background: var(--aw-bg);
}
.demo-scene { display: none; flex: 1 1 auto; min-height: 0; padding: 11.25px; }
.demo-scene.on { display: block; animation: scene-in 0.3s ease; }
@keyframes scene-in { from { opacity: 0; } to { opacity: 1; } }

/* Fake cursor */
.demo-cursor {
  position: absolute;
  z-index: 30;
  width: 17px;
  height: 17px;
  pointer-events: none;
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1), top 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.6));
}
.demo-cursor.click { animation: cursor-click 0.3s ease; }
@keyframes cursor-click { 50% { transform: scale(0.78); } }
@media (prefers-reduced-motion: reduce) { .demo-cursor { display: none; } }

/* Shared animation vocabulary (portal Tailwind equivalents) */
@keyframes aw-spin { to { transform: rotate(360deg); } }
@keyframes aw-pulse { 50% { opacity: 0.5; } }
@keyframes aw-bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
@keyframes aw-bars { 0%, 100% { height: 9px; } 50% { height: 32px; } }

/* --- SectionCard (Latest Vitals / Vital Trends / AI summary cards) ------- */
.vcard {
  border: 1px solid var(--aw-border);
  border-radius: 7.5px;
  background: var(--aw-card);
  box-shadow: var(--aw-shadow);
  overflow: hidden;
  min-width: 0;
}
.vcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11.25px;
  min-height: 33.75px;
  padding: 3.75px 11.25px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.4);
}
.vh-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.25;
  color: var(--aw-muted);
}
.vcard-head .plus-btn { display: grid; place-items: center; width: 22.5px; height: 22.5px; border-radius: 5.625px; color: var(--aw-muted); flex: none; }
.vcard-body { display: flex; flex-direction: column; gap: 7.5px; padding: 11.25px; min-width: 0; }

/* Segmented control (Radix Tabs / note view switch) */
.seg {
  display: inline-flex;
  align-items: center;
  height: 22.5px;
  padding: 1.875px;
  border-radius: 5.625px;
  background: var(--aw-muted-bg);
}
.seg span {
  display: inline-flex;
  align-items: center;
  height: 18.75px;
  padding: 0 7.5px;
  border-radius: 4.69px;
  font-size: 11px;
  font-weight: 500;
  color: var(--aw-muted);
  white-space: nowrap;
}
.seg span.on { background: var(--aw-bg); color: var(--aw-fg); box-shadow: var(--aw-shadow-sm); }
.seg .badge-n { font-family: var(--aw-mono); opacity: 0.6; margin-left: 3.75px; padding: 0; height: auto; }

/* --- Vitals scene -------------------------------------------------------- */
.scene-vitals.on { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 11.25px; }
.scene-vitals.on.as-open { grid-template-columns: 300px minmax(0, 1fr) 340px; }

/* The workspace section escapes the site's normal column so the window gets
   portal-like breathing room */
.wrap-wide { max-width: 1500px; }

.vitals-list { list-style: none; margin: 0; padding: 0; }
.vitals-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7.5px;
  padding: 5.625px 7.5px 5.625px 9.375px;
  border-bottom: 1px solid rgb(44 49 58 / 0.6);
}
.vitals-list li:last-child { border-bottom: 0; }
.vitals-list li.crit { background: rgb(239 68 68 / 0.08); }
.vitals-list li.sel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 1.875px; background: var(--aw-accent); }
.vitals-list .vic { color: var(--aw-muted); }
.vitals-list li.crit .vic { color: #ef4444; }
.vitals-list .vn { flex: 0 1 auto; min-width: 0; font-size: 11.5px; color: var(--aw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vitals-list .vt { flex: none; font-size: 9.5px; color: rgb(155 160 171 / 0.7); }
.vitals-list .vv {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 3.75px;
  flex: none;
  font-family: var(--aw-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--aw-fg);
  white-space: nowrap;
}
.vitals-list .vv small { font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 9.5px; font-weight: 400; color: var(--aw-muted); }
.vitals-list li.crit .vv { color: var(--aw-red); }
.vitals-list .vflag {
  width: 33.75px;
  flex: none;
  text-align: right;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--aw-red);
}

/* Trend panel */
.trend-head { display: flex; align-items: center; gap: 5.625px; min-width: 0; }
.trend-head .t-ic { color: var(--aw-accent); }
.trend-head .t-name { font-size: 13px; font-weight: 600; color: var(--aw-fg); white-space: nowrap; }
.trend-head .t-chip { display: inline-flex; align-items: center; gap: 1.875px; font-size: 10px; color: var(--aw-muted); white-space: nowrap; }
.trend-head .t-meta { margin-left: auto; flex: none; font-size: 10px; color: var(--aw-muted); }
.trend-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 15px;
  row-gap: 3.75px;
  border: 1px solid var(--aw-border);
  border-radius: 5.625px;
  background: rgb(31 34 41 / 0.4);
  padding: 5.625px 9.375px;
}
.trend-stats .st { display: inline-flex; align-items: baseline; gap: 3.75px; white-space: nowrap; }
.trend-stats .sl { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.025em; color: var(--aw-muted); }
.trend-stats .sv { font-family: var(--aw-mono); font-size: 12.5px; font-weight: 600; color: var(--aw-fg); }
.trend-stats .sv.crit { color: var(--aw-red); }
.trend-stats .su { font-size: 9px; color: var(--aw-muted); }
.trend-chart {
  border: 1px solid var(--aw-border);
  border-radius: 5.625px;
  background: rgb(31 34 41 / 0.4);
  padding: 7.5px;
  min-width: 0;
}
.trend-chart svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; align-items: center; justify-content: center; gap: 15px; padding-top: 11.25px; font-size: 11.25px; color: var(--aw-fg); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5.625px; }
.chart-legend i { width: 7.5px; height: 7.5px; border-radius: 2px; }
.zone-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 11.25px; font-size: 10px; color: var(--aw-muted); }
.zone-legend span { display: inline-flex; align-items: center; gap: 5.625px; }
.zone-legend i.dot { width: 7.5px; height: 7.5px; border-radius: 50%; opacity: 0.6; }
.zone-legend i.dash { width: 5.625px; height: 0; border-top: 1px dashed var(--aw-muted); }

/* Recent readings sub-block (inside the Vital Trends card body) */
.readings { border: 1px solid var(--aw-border); border-radius: 5.625px; overflow: hidden; }
.readings-head {
  padding: 3.75px 9.375px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.4);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--aw-muted);
}
.readings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7.5px;
  padding: 3.75px 9.375px;
  border-bottom: 1px solid rgb(44 49 58 / 0.5);
  font-size: 11px;
}
.readings-row:last-child { border-bottom: 0; }
.readings-row .rt { color: var(--aw-muted); }
.readings-row .rv { display: inline-flex; align-items: baseline; gap: 3.75px; font-family: var(--aw-mono); font-weight: 600; color: var(--aw-fg); }
.readings-row .rv.crit { color: var(--aw-red); }
.readings-row .rv small { font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 9px; font-weight: 400; color: var(--aw-muted); }

/* Compact the vitals/trends columns only when the viewport can't give the
   window portal-like width (full labels + timestamps stay above 1360px) */
@media (max-width: 1360px) {
  .scene-vitals.as-open .vitals-list .vt { display: none; }
  .scene-vitals.as-open .vitals-list .vn { font-size: 11px; }
  .scene-vitals.as-open .vitals-list .flag,
  .scene-vitals.as-open .vitals-list .vflag .flag { display: none; }
  .scene-vitals.as-open .vitals-list .vflag { width: auto; }
  .scene-vitals.as-open .trend-head .t-meta { display: none; }
  .scene-vitals.as-open .seg span { padding: 0 5.625px; font-size: 10px; }
  .scene-vitals.on.as-open { grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr) 340px; }
}

/* --- Assistant panel (AI scribe, dense copilot) -------------------------- */
.assistant {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--aw-border);
  border-radius: 5.625px;
  background: rgb(31 34 41 / 0.4);
  overflow: hidden;
  font-size: 12px;
}
.assistant-col { display: none; min-width: 0; }
.scene-vitals.as-open .assistant-col { display: block; animation: scene-in 0.3s ease; }
.assistant-col .assistant { height: 100%; }
.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  flex: none;
  padding: 0 3.75px 0 11.25px;
}
.assistant-head .ah-l {
  display: inline-flex;
  align-items: center;
  gap: 5.625px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--aw-muted);
}
.assistant-head .ah-l .ic { color: var(--aw-accent); }
.assistant-head .ah-x { display: grid; place-items: center; width: 22.5px; height: 22.5px; border-radius: 5.625px; color: var(--aw-muted); }
.working-on {
  flex: none;
  border-top: 1px solid var(--aw-border);
  border-bottom: 1px solid var(--aw-border);
  border-left: 2px solid var(--aw-accent);
  background: var(--aw-card);
  box-shadow: var(--aw-shadow);
  padding: 7.5px 11.25px;
}
.working-on .wl { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--aw-muted); }
.working-on .wn { display: block; font-size: 12.5px; font-weight: 500; color: var(--aw-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.working-on .wd { display: block; font-size: 11px; color: var(--aw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assistant-tabs {
  display: flex;
  align-items: center;
  height: 30px;
  flex: none;
  padding: 0 3.75px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.3);
}
.assistant-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 3.75px;
  padding: 3.75px 11.25px;
  border-radius: 4.69px;
  font-size: 11px;
  font-weight: 500;
  color: var(--aw-muted);
  white-space: nowrap;
}
.assistant-tabs span.on { background: var(--aw-bg); color: var(--aw-fg); box-shadow: var(--aw-shadow-sm); }

/* Recorder states */
.as-state { display: none; }
.as-state.on { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; animation: scene-in 0.25s ease; }
.lang-row { display: flex; align-items: center; gap: 5.625px; flex: none; padding: 5.625px 7.5px; border-bottom: 1px solid var(--aw-border); }
.lang-row > .ic { color: var(--aw-muted); }
.dd {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5.625px;
  height: 22.5px;
  border: 1px solid var(--aw-border);
  border-radius: 4.69px;
  padding: 0 7.5px 0 11.25px;
  font-size: 11px;
  color: var(--aw-fg);
  white-space: nowrap;
  box-shadow: var(--aw-shadow-sm);
}
.dd .ic { opacity: 0.5; }
.dd.grow-dd { flex: 1 1 auto; min-width: 0; }
.dd.w90 { width: 90px; flex: none; }
.as-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 15px;
}

/* Idle */
.rec-wrap { position: relative; margin-bottom: 11.25px; }
.rec-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgb(255 100 103 / 0.2);
  filter: blur(24px);
  transform: scale(1.5);
}
.js .rec-glow { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.rec-big {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52.5px;
  height: 52.5px;
  border-radius: 50%;
  background: linear-gradient(to bottom right, #fb2c36, #e7000b);
  color: #fff;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.rec-title { margin-bottom: 3.75px; font-size: 12.5px; font-weight: 600; color: var(--aw-fg); }
.rec-sub { font-size: 11px; line-height: 1.375; color: var(--aw-muted); max-width: 32ch; }
.rec-or { display: flex; align-items: center; gap: 11.25px; width: 100%; max-width: 300px; margin-top: 11.25px; font-size: 10px; color: var(--aw-muted); }
.rec-or::before, .rec-or::after { content: ""; height: 1px; flex: 1 1 auto; background: var(--aw-border); }
.as-idle .btn-mini { margin-top: 7.5px; }

/* Recording */
.rec-live-wrap { position: relative; margin-bottom: 22.5px; }
.rec-live {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.75px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(to bottom right, #fb2c36, #e7000b);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.rec-live i { width: 5.625px; height: 12px; border-radius: 999px; background: #fff; }
.js .rec-live i { animation: aw-bars 1s ease-in-out infinite; }
.js .rec-live i:nth-child(2) { animation-delay: 0.12s; }
.js .rec-live i:nth-child(3) { animation-delay: 0.24s; }
.js .rec-live i:nth-child(4) { animation-delay: 0.36s; }
.js .rec-live i:nth-child(5) { animation-delay: 0.48s; }
.timer-chip {
  margin-bottom: 22.5px;
  font-family: var(--aw-mono);
  font-size: 16.875px;
  font-weight: 600;
  color: #f8fafc;
  background: var(--aw-muted-bg);
  border-radius: 4.69px;
  padding: 1.875px 9.375px;
}
.rec-controls { display: flex; align-items: center; gap: 11.25px; }
.rec-controls .btn-mini { height: 33.75px; padding: 0 15px; gap: 7.5px; font-size: 13.125px; }
.btn-mini.stop { background: #811d1d; border-color: transparent; color: #e1e7ef; }

/* Processing overlay */
.as-proc.on { background: linear-gradient(135deg, rgb(22 36 86 / 0.95), rgb(30 26 77 / 0.95), rgb(60 3 102 / 0.95)); }
.brain-wrap { position: relative; margin-bottom: 22.5px; }
.brain-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(to right, #51a2ff, #ad46ff);
  filter: blur(24px);
  opacity: 0.3;
  transform: scale(1.5);
}
.js .brain-glow { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.orbit { position: absolute; inset: 0; }
.js .orbit { animation: aw-spin 8s linear infinite; }
.js .orbit.o2 { animation-duration: 6s; animation-direction: reverse; }
.js .orbit.o3 { animation-duration: 10s; }
.orbit i { position: absolute; border-radius: 50%; }
.orbit.o1 i { top: -7.5px; left: 50%; transform: translateX(-50%); width: 7.5px; height: 7.5px; background: #51a2ff; }
.orbit.o2 i { top: 50%; right: -7.5px; transform: translateY(-50%); width: 5.625px; height: 5.625px; background: #c27aff; }
.orbit.o3 i { bottom: -3.75px; left: 25%; width: 5.625px; height: 5.625px; background: #7c86ff; }
.brain {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(to bottom right, #2b7fff, #615fff, #9810fa);
  color: #fff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
.js .brain .ic { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.proc-status { display: flex; align-items: center; gap: 7.5px; margin-bottom: 15px; font-size: 16.875px; font-weight: 500; color: var(--aw-fg); }
.proc-status .ic { color: #615fff; }
.js .proc-status .ic { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.proc-dots { display: flex; gap: 7.5px; margin-bottom: 22.5px; }
.proc-dots i { width: 7.5px; height: 7.5px; border-radius: 50%; background: linear-gradient(to right, #2b7fff, #ad46ff); }
.js .proc-dots i { animation: aw-bounce 0.8s infinite; }
.js .proc-dots i:nth-child(2) { animation-delay: 0.1s; }
.js .proc-dots i:nth-child(3) { animation-delay: 0.2s; }
.js .proc-dots i:nth-child(4) { animation-delay: 0.3s; }
.js .proc-dots i:nth-child(5) { animation-delay: 0.4s; }
.green-pill {
  display: inline-flex;
  align-items: center;
  gap: 7.5px;
  max-width: 100%;
  font-size: 12.5px;
  color: #05df72;
  background: rgb(13 84 43 / 0.2);
  padding: 7.5px 15px;
  border-radius: 999px;
}

/* Transcript / generated-note state */
.as-meta {
  display: flex;
  align-items: center;
  gap: 3.75px;
  flex: none;
  padding: 5.625px 7.5px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.3);
}
.as-meta .words { flex: none; font-size: 10px; color: var(--aw-muted); white-space: nowrap; }
.as-meta .icl { margin-left: auto; display: inline-flex; align-items: center; gap: 1.875px; flex: none; }
.as-meta .ib { display: grid; place-items: center; width: 22.5px; height: 22.5px; border-radius: 5.625px; color: var(--aw-muted); }
.tr-toggle {
  display: flex;
  align-items: center;
  gap: 5.625px;
  flex: none;
  padding: 3.75px 7.5px;
  background: var(--aw-muted-bg);
  border-bottom: 1px solid var(--aw-border);
  font-size: 11px;
  font-weight: 500;
  color: var(--aw-fg);
}
.tr-toggle > .ic { color: var(--aw-accent); }
.tr-toggle .cnt { font-size: 10px; font-weight: 400; color: var(--aw-muted); white-space: nowrap; }
.tr-toggle .chev-d { margin-left: auto; display: inline-flex; color: var(--aw-muted); }
.tr-block {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 260px;
  padding: 7.5px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent);
  mask-image: linear-gradient(180deg, #000 80%, transparent);
}
.tr-block .th {
  margin-bottom: 1.875px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--aw-accent);
}
.tr-block .th:not(:first-child) { margin-top: 7.5px; }
.tr-block p { margin: 0 0 2px; font-size: 12px; line-height: 1.375; color: var(--aw-fg); }
.as-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  border-top: 1px solid var(--aw-border);
  padding: 5.625px 7.5px;
  margin-top: auto;
}

/* Outline button (shadcn Button variant=outline size=sm at 15px root) */
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3.75px;
  height: 26.25px;
  padding: 0 11.25px;
  border-radius: 4.69px;
  border: 1px solid var(--aw-border);
  background: var(--aw-bg);
  color: var(--aw-fg);
  font-size: 11.25px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--aw-shadow-sm);
}
.btn-mini .acc { color: var(--aw-accent); }
.btn-mini.primary { background: var(--aw-primary); border-color: transparent; color: #fff; }
.btn-mini.signed { background: rgb(20 83 45 / 0.3); border-color: rgb(74 222 128 / 0.4); color: #4ade80; }

/* --- Note scene ---------------------------------------------------------- */
.scene-note.on { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 11.25px; align-items: start; }
.note-left { min-width: 0; }
.note-top { display: flex; align-items: center; gap: 5.625px; margin-bottom: 11.25px; }
.note-top .sp { flex: 1 1 auto; }
.note-card {
  border: 1px solid var(--aw-border);
  border-radius: 7.5px;
  background: var(--aw-card);
  box-shadow: var(--aw-shadow);
  overflow: hidden;
}
.note-title {
  display: flex;
  align-items: center;
  gap: 7.5px;
  padding: 11.25px 22.5px;
  border-bottom: 1px solid var(--aw-border);
}
.note-title .nt-file, .note-title .nt-pencil { color: var(--aw-muted); }
.note-title .nt-text { font-size: 13.125px; font-weight: 600; color: var(--aw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-title .actions { margin-left: auto; display: inline-flex; align-items: center; gap: 5.625px; flex: none; }
.note-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.875px;
  padding: 3.75px 7.5px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.3);
}
.note-toolbar .tg { display: inline-flex; align-items: center; gap: 1.875px; padding-right: 7.5px; border-right: 1px solid var(--aw-border); }
.note-toolbar .tg + .tg { margin-left: 1.875px; }
.note-toolbar .tbn { display: grid; place-items: center; width: 26.25px; height: 26.25px; border-radius: 4.69px; color: var(--aw-fg); }
.note-toolbar .tbn.dis { opacity: 0.5; }
.note-editor { min-height: 210px; padding: 15px; font-size: 15px; line-height: 1.5; color: var(--aw-fg); }
.note-editor .caret {
  display: inline-block;
  width: 1.5px;
  height: 15px;
  margin-left: 1.875px;
  vertical-align: -2px;
  background: var(--aw-fg);
}
.js .note-editor .caret { animation: blink 1.1s steps(1) infinite; }

/* --- AI Summary: thinking scene ------------------------------------------ */
.scene-ai-think.on {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 15px;
}
.scene-ai-think .brain-wrap { margin-bottom: 30px; }
.ai-thinking-t { margin-bottom: 7.5px; font-size: 18.75px; font-weight: 600; color: var(--aw-fg); }
.ai-scan { display: flex; align-items: center; gap: 7.5px; min-height: 26.25px; margin-bottom: 22.5px; font-size: 13.125px; color: var(--aw-muted); }
.js .ai-scan .ic { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.ai-dots { display: flex; gap: 5.625px; margin-bottom: 22.5px; }
.ai-dots i { width: 7.5px; height: 7.5px; border-radius: 50%; background: linear-gradient(to right, #2b7fff, #ad46ff); }
.js .ai-dots i { animation: aw-bounce 0.6s infinite; }
.js .ai-dots i:nth-child(2) { animation-delay: 0.15s; }
.js .ai-dots i:nth-child(3) { animation-delay: 0.3s; }
.skel-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 840px;
  margin-top: 7.5px;
  opacity: 0.4;
}
.skel-row i { height: 82px; border-radius: 5.625px; background: var(--aw-muted-bg); }
.js .skel-row i { animation: aw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.js .skel-row i:nth-child(2) { animation-delay: 0.2s; }
.js .skel-row i:nth-child(3) { animation-delay: 0.4s; }
.ai-privacy {
  display: flex;
  align-items: center;
  gap: 7.5px;
  margin-top: 22.5px;
  max-width: 420px;
  font-size: 11.25px;
  color: var(--aw-muted);
  text-align: center;
}
.ai-privacy .ic { color: #00a63e; }

/* --- AI Summary: loaded scene -------------------------------------------- */
.scene-ai-sum.on { display: flex; flex-direction: column; gap: 15px; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 11.25px; }
.ai-id { display: flex; align-items: center; gap: 11.25px; min-width: 0; }
.ai-id .sq {
  display: grid;
  place-items: center;
  padding: 7.5px;
  border-radius: 5.625px;
  background: rgb(97 141 249 / 0.1);
  color: var(--aw-accent);
  flex: none;
}
.ai-id b { display: block; font-size: 15px; font-weight: 600; color: var(--aw-fg); }
.ai-id small { display: block; font-size: 11.25px; color: var(--aw-muted); }
.ai-actions { display: inline-flex; align-items: center; gap: 7.5px; flex: none; }
.ai-actions .btn-mini { height: 30px; gap: 5.625px; }
.conf-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--aw-border);
  border-radius: 4.69px;
  padding: 1.875px 9.375px;
  font-size: 11.25px;
  font-weight: 600;
  color: var(--aw-fg);
  white-space: nowrap;
}
.attn, .ai-sumcard {
  border: 1px solid var(--aw-border);
  border-radius: 7.5px;
  background: var(--aw-card);
  box-shadow: var(--aw-shadow);
  overflow: hidden;
}
.attn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11.25px;
  min-height: 33.75px;
  padding: 3.75px 11.25px;
  border-bottom: 1px solid var(--aw-border);
  background: rgb(31 34 41 / 0.4);
}
.attn-head .tl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.25;
  color: var(--aw-muted);
}
.attn-head .tl small {
  display: block;
  margin-top: 1.875px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: rgb(155 160 171 / 0.7);
}
.attn-high {
  flex: none;
  border: 1px solid transparent;
  border-radius: 4.69px;
  background: #811d1d;
  color: #e1e7ef;
  padding: 0 7.5px;
  font-size: 11.25px;
  font-weight: 600;
  line-height: 15px;
  box-shadow: var(--aw-shadow-sm);
}
.attn-body { padding: 22.5px; }
.attn-alert {
  display: flex;
  align-items: flex-start;
  gap: 11.25px;
  padding: 11.25px 15px;
  border: 1px solid #991b1b;
  border-left-width: 4px;
  border-radius: 5.625px;
  background: rgb(127 29 29 / 0.3);
}
.attn-alert > .ic { margin-top: 1.875px; color: #f87171; }
.attn-alert .attn-txt { min-width: 0; }
.attn-alert b { display: block; font-size: 13.125px; font-weight: 600; color: #fca5a5; }
.attn-alert span { display: block; margin-top: 1.875px; font-size: 11.25px; color: var(--aw-muted); }
.ai-sumcard p { margin: 0; padding: 22.5px; font-size: 13.125px; line-height: 1.625; color: var(--aw-fg); }

/* --- Responsive collapse -------------------------------------------------- */
@media (max-width: 1120px) {
  .assistant-col { display: none !important; }
  .scene-vitals.on.as-open { grid-template-columns: 360px minmax(0, 1fr); }
  .scene-note.on { grid-template-columns: minmax(0, 1fr); }
  .scene-note .assistant { display: none; }
}
@media (max-width: 1000px) {
  .scene-vitals.on, .scene-vitals.on.as-open { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .scene-vitals.on, .scene-vitals.on.as-open { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .appwin-wide .appwin-side { display: none; }
}
@media (max-width: 640px) {
  .appwin-titlebar .brand-word { display: none; }
  .appwin-search kbd { display: none; }
}
@media (max-width: 560px) {
  .appwin-rail { display: none; }
  .console-slot .appwin-side { display: none; }
  .attn-body { padding: 11.25px; }
  .ai-sumcard p { padding: 11.25px; }
}


/* --- Inspo-structure components ------------------------------------------
   Centered section rhythm, department cards, big framed workspace, bento
   grid and use-case cards — the blueticked.com structural language. */

.sec-head.center { text-align: center; margin-inline: auto; }
.sec-head.center .eyebrow { display: flex; justify-content: center; }
.sec-head.center .lead { margin-inline: auto; }
.eyebrow.plain { color: var(--cyan); letter-spacing: 0.2em; }
.eyebrow.plain::before { content: none; }
.eyebrow.plain.mg { color: hsl(343 88% 68%); }

/* Department cards (the "stop juggling" row) */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 980px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .dept-grid { grid-template-columns: 1fr; } }
.dept {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.dept-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: hsl(223 80% 60% / 0.12);
  border: 1px solid hsl(223 80% 60% / 0.3);
  color: var(--blue-link);
  margin-bottom: 14px;
}
.dept-icon svg { width: 20px; height: 20px; }
.dept:nth-child(2) .dept-icon { background: hsl(196 80% 55% / 0.12); border-color: hsl(196 80% 55% / 0.3); color: var(--cyan); }
.dept:nth-child(3) .dept-icon { background: hsl(340 80% 55% / 0.1); border-color: hsl(340 80% 55% / 0.3); color: hsl(343 88% 68%); }
.dept:nth-child(4) .dept-icon { background: hsl(145 60% 45% / 0.1); border-color: hsl(145 60% 45% / 0.3); color: var(--green-inv); }
.dept .h3 { font-size: 1.05rem; }
.dept p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }


/* Bento (built for the shape of SA healthcare) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 960px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .bento-grid { grid-template-columns: 1fr; } }
.tile-key {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.tile-key.mg { color: hsl(343 88% 68%); }

/* Use-case cards (from GP rooms to hospital groups) */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1000px) { .uc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .uc-grid { grid-template-columns: 1fr; } }
.uc {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uc .h3 { margin: 0; font-size: 1.02rem; }
.uc p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.uc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-chips .chip { font-size: 0.58rem; padding: 4px 9px; }

.center-link { text-align: center; margin: 32px 0 0; }

/* --- Real product screenshots — the portal itself ------------------------ */
.shot-frame,
.shot-player {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #030711;
  box-shadow: var(--shadow-deep);
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-video { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 820; background: #030711; }
.shot-player { box-shadow: 0 0 140px hsl(223 85% 55% / 0.14), var(--shadow-deep); }
.shot-stack { position: relative; aspect-ratio: 1600 / 820; }
.shot-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.shot-stack img.on { opacity: 1; }
.shot-caption {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background: #060e23;
  min-height: 39px;
}
.shot-caption span {
  position: absolute;
  inset: 11px 16px auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-caption span.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .shot-stack img, .shot-caption span { transition: none; }
}

/* --- Hero media: cropped live portal video + overlapping phone ------------ */
.hero-media { position: relative; z-index: 1; }
.hero-screen video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 820;
  background: #030711;
}
.hero-media .hero-phone {
  position: absolute;
  z-index: 2;
  right: -14px;
  bottom: -30px;
  width: 128px;
  padding: 6px;
  border-radius: 24px;
  box-shadow: 0 0 60px hsl(196 80% 50% / 0.2), var(--shadow-deep);
}
.hero-media .hero-phone video { border-radius: 18px; aspect-ratio: 1080 / 2400; }
@media (max-width: 960px) {
  .hero-media .hero-phone { right: 4px; bottom: -20px; width: 118px; }
}

/* --- Patient app (phone-framed live recording) ---------------------------- */
.phone-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 860px) {
  .phone-wrap { grid-template-columns: minmax(0, 1fr); }
  .phone-shell { margin-inline: auto; }
}
.phone-shell {
  width: 300px;
  border-radius: 38px;
  border: 1px solid var(--line);
  background: hsl(224 45% 7%);
  padding: 10px;
  box-shadow: 0 0 120px hsl(196 80% 50% / 0.12), var(--shadow-deep);
}
.phone-shell video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  aspect-ratio: 1080 / 2400;
  background: #fff;
}
.phone-caption {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Video loading shimmer ------------------------------------------------
   While a demo video buffers, its frame shows a branded shimmer + label
   instead of a black rectangle; fades out on canplay (site.js). */
.media-wait { position: relative; }
.media-wait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(110deg, transparent 30%, hsl(223 70% 40% / 0.14) 46%, transparent 62%),
    hsl(224 45% 6.5%);
  background-size: 220% 100%, auto;
  animation: media-shimmer 1.5s linear infinite;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
  z-index: 2;
}
.media-wait::before {
  content: "Loading live demo…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
  z-index: 3;
}
.media-wait.media-ready::after,
.media-wait.media-ready::before { opacity: 0; }
/* the workspace player's caption bar stays visible below the shimmer */
.shot-player.media-wait::after,
.shot-player.media-wait::before { bottom: 39px; }
@keyframes media-shimmer { to { background-position: -220% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .media-wait::after { animation: none; } }

/* --- Utilities / a11y ---------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .oplog li,
  .js .reveal { opacity: 1; transform: none; }
  .js .trace-draw { stroke-dashoffset: 0; }
}
