:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #65727f;
  --line: #d8e1e7;
  --accent: #0f766e;
  --accent-ink: #0b4f4a;
  --accent-soft: #d9f3ee;
  --blue: #2563eb;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(216, 225, 231, 0.9);
  background: rgba(244, 247, 248, 0.94);
  backdrop-filter: blur(10px);
}

.brand,
.site-nav nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--accent-ink);
  font-weight: 800;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: inset 0 0 0 5px var(--accent-soft);
}

.site-nav nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.site-nav nav a:hover {
  color: var(--ink);
}

.hero,
.band,
.split-section,
.final-strip {
  width: min(1180px, calc(100vw - 44px));
  margin: 0 auto;
}

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(440px, 1.05fr);
  align-items: center;
  gap: 48px;
  padding: 44px 0 72px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.lead {
  max-width: 720px;
  margin-bottom: 20px;
  color: #3d4a55;
  font-size: 21px;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 26px;
}

.workflow-strip div {
  display: grid;
  gap: 5px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(23, 33, 43, 0.07);
}

.workflow-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.workflow-strip strong {
  color: var(--ink);
  line-height: 1.12;
}

.workflow-strip small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.hero-actions,
.final-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 750;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-scene {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(216, 225, 231, 0.7) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216, 225, 231, 0.7) 1px, transparent 1px),
    #eaf1f3;
  background-size: 46px 46px;
}

.scene-window {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(23, 33, 43, 0.12);
}

.doctor-window {
  top: 54px;
  left: 42px;
  width: min(490px, calc(100% - 84px));
  padding: 18px;
}

.admin-window {
  right: 34px;
  bottom: 44px;
  width: min(360px, calc(100% - 84px));
  padding: 16px;
}

.window-top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.window-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.input-line {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  padding: 13px 14px;
}

.screen-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.patient-card-mini {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 2px solid #22c55e;
  border-radius: 8px;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  padding: 13px 14px;
}

.patient-card-mini strong {
  font-size: 17px;
}

.patient-card-mini span {
  color: #15803d;
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.segmented span {
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 700;
}

.segmented .selected {
  background: #dcfce7;
  color: #166534;
}

.timeline-mini {
  display: grid;
  gap: 6px;
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.timeline-mini span {
  border-left: 3px solid var(--line);
  padding-left: 9px;
}

.timeline-mini span:last-child {
  border-left-color: #22c55e;
  color: var(--accent-ink);
}

.record-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 74%;
  min-height: 52px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
}

.record-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.protocol-lines {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.protocol-lines span,
.table-line {
  height: 11px;
  border-radius: 999px;
  background: #d8e1e7;
}

.protocol-lines span:nth-child(2) {
  width: 82%;
}

.protocol-lines span:nth-child(3),
.table-line.short {
  width: 62%;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
}

.metric-row strong {
  color: var(--ink);
}

.table-line {
  margin-top: 18px;
}

.band {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin-bottom: 0;
}

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

.steps article,
.ops-grid article {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
}

.steps p,
.ops-grid p,
.split-section p,
.final-strip p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1fr);
  gap: 42px;
  align-items: start;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  padding: 14px 16px;
}

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

.ops-grid article {
  min-height: 170px;
}

.final-strip {
  justify-content: space-between;
  margin-bottom: 54px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.final-strip h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.final-strip p {
  margin-bottom: 0;
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #edf2f4;
  padding: 1px 5px;
  font: 0.94em ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 920px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .hero,
  .band,
  .split-section,
  .final-strip {
    width: min(100vw - 24px, 1180px);
  }

  .site-nav nav {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 18px;
  }

  .hero-scene {
    min-height: 560px;
  }

  .doctor-window,
  .admin-window {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .admin-window {
    bottom: 18px;
  }

  .record-row {
    width: 100%;
  }

  .steps,
  .ops-grid {
    grid-template-columns: 1fr;
  }
}

.doctor-picker-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.doctor-picker-page__admin {
  position: absolute;
  top: 24px;
  right: 24px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.doctor-picker-page__admin:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.doctor-picker {
  width: min(680px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(23, 33, 43, 0.12);
  padding: clamp(24px, 6vw, 52px);
}

.doctor-picker__brand {
  margin-bottom: 18px;
  color: var(--accent-ink);
  font-weight: 800;
}

.doctor-picker h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 7vw, 60px);
}

.doctor-picker__lead,
.doctor-picker__state {
  color: var(--muted);
}

.doctor-picker__state--error {
  color: var(--danger);
}

.doctor-picker__groups {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.doctor-picker__group h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.doctor-picker__doctors {
  display: grid;
  gap: 10px;
}

.doctor-picker__button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  padding: 10px 16px;
  text-align: left;
}

.doctor-picker__button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.doctor-picker__button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 620px) {
  .doctor-picker-page {
    align-content: start;
    gap: 20px;
    padding-top: 20px;
  }

  .doctor-picker-page__admin {
    position: static;
    justify-self: end;
  }
}
