:root {
  --bg: #f4f9fe;
  --card: #ffffff;
  --ink: #142b3a;
  --muted: #5f7b8d;
  --line: #dce8ef;
  --accent: #0b5fa5;
  --accent-deep: #083f73;
  --accent-soft: #dceefc;
  --info: #2f6fa0;
  --info-soft: #e8f3fa;
  --warn: #a15a08;
  --warn-soft: #fff3dc;
  --danger: #bc3930;
  --danger-soft: #fdeaea;
  --ok: #167a4a;
  --ok-soft: #e6f7ee;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(11, 95, 165, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 15% -10%, #d7eafb 0, transparent 42%), var(--bg);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

html[dir="rtl"] body { font-family: "Geeza Pro", "Noto Naskh Arabic", -apple-system, sans-serif; }

.icon { width: 20px; height: 20px; display: block; flex: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 22px;
  background: rgba(244, 249, 254, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  box-shadow: 0 6px 14px rgba(11, 95, 165, .22);
}
.brand-mark .icon { width: 18px; height: 18px; }

.brand strong { display: block; font-size: 16px; }
.brand-sub { display: block; color: var(--muted); font-size: 12px; }

.ghost {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}

.ghost:hover { background: var(--accent-soft); }

.tabs { display: flex; gap: 6px; padding: 10px 20px 0; max-width: 1100px; margin: 0 auto; }

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 10px 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(255, 255, 255, .8); }

.notice {
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #c8e0f4;
}

main { max-width: 1100px; margin: 0 auto; padding: 20px; }

.page-head { margin-bottom: 18px; }
.page-head h1 { margin: 0 0 4px; font-size: 23px; letter-spacing: -.3px; }
.page-head p { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h2 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card.wide { grid-column: 1 / -1; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  transition: transform .12s ease, filter .12s ease;
}

.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f72bd, var(--accent-deep));
  box-shadow: 0 8px 18px rgba(11, 95, 165, .2);
}
.btn.soft { background: var(--accent-soft); color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions .hint { flex-basis: 100%; }

.sample {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f8fbff;
}

.sample:last-child { margin-bottom: 0; }

.sample-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sample-id { font-weight: 700; font-size: 15px; letter-spacing: .4px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .3px; }

.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.chip.info { background: var(--info-soft); color: var(--info); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }

.meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.meta b { color: var(--ink); font-weight: 600; }

.qr-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; flex-wrap: wrap; }
.qr { width: 118px; height: 118px; border: 1px solid var(--line); border-radius: 8px; }

.timeline { list-style: none; padding: 0; margin: 14px 0 0; }
.timeline li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 13px; color: var(--muted); }
.timeline li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-top: 5px; flex: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--accent); }
.timeline li.current { color: var(--accent); font-weight: 600; }
.timeline li.current::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.bad { color: var(--danger); font-weight: 600; }
.timeline li.bad::before { background: var(--danger); }

.sla {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sla .icon { width: 16px; height: 16px; }
.sla.warn { background: var(--warn-soft); color: var(--warn); }
.sla.bad { background: var(--danger-soft); color: var(--danger); }

.field { margin-bottom: 11px; }
.field label, .choice-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }

input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfe0ef;
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}

textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }

.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }

.result {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fbff;
}

.result span { display: block; font-size: 11px; color: var(--muted); }
.result strong { display: block; font-size: 17px; margin: 3px 0; }
.result small { font-size: 11px; color: var(--muted); }
.result-chip { margin-top: 8px; }

.safety {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: #7a4a05;
  font-size: 13px;
}
.safety strong { display: block; margin-bottom: 6px; }
.safety p { margin: 0 0 10px; }

.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Mobile-style patient app */
.app-shell {
  width: min(100%, 440px);
  height: min(860px, calc(100vh - 160px));
  min-height: 600px;
  margin: 22px auto 40px;
  background: #f4f9fe;
  border: 1px solid #cfe0ef;
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(8, 63, 115, .18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 20px 20px 18px;
  color: var(--ink);
  background: linear-gradient(140deg, #dceefc, #f7fbff);
  border-bottom: 1px solid var(--line);
  flex: none;
}

.app-header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-brand { display: flex; align-items: center; gap: 10px; }

.app-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  border: 1px solid rgba(11, 95, 165, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.app-mark .icon { width: 18px; height: 18px; }

.app-brand-text strong { display: block; font-size: 15px; }
.app-brand-text small { display: block; font-size: 11px; color: var(--muted); }

.icon-btn, .back-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
}
.icon-btn .icon, .back-btn .icon { width: 18px; height: 18px; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.secure-icon {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
}
.secure-icon .icon { width: 14px; height: 14px; }

.app-heading { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; }
.app-heading h1 { margin: 0; font-size: 24px; letter-spacing: -.4px; line-height: 1.2; }
.app-heading p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.secure-pill .icon { width: 13px; height: 13px; }

.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 26px;
  scrollbar-width: thin;
}

.screen { display: flex; flex-direction: column; gap: 14px; }
.auth-screen { padding-top: 6px; }
.hero-icon { width: 62px; height: 62px; margin: 6px auto 0; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.hero-icon .icon { width: 30px; height: 30px; }

.form-card, .detail-card, .id-card, .hero-card, .report-card, .trust-card, .empty-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(11, 95, 165, .05);
}

.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.switch-line { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.link { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
.link.quiet { display: block; margin: 14px auto 0; color: var(--muted); font-weight: 500; }
.profile-links { display: flex; justify-content: space-between; gap: 12px; }
.profile-links .link.quiet { margin: 14px 0 0; font-size: 12px; }
.trust-inline { display: flex; align-items: flex-start; gap: 8px; padding: 0 4px; color: var(--muted); font-size: 12px; }
.trust-inline .icon { width: 16px; height: 16px; color: var(--accent); }

.demo-card { border: 1px dashed var(--accent); border-radius: 16px; padding: 14px 16px; background: linear-gradient(180deg, #eaf5ff, #f8fbff); }
.demo-card-head { display: flex; align-items: center; gap: 8px; color: var(--accent-deep); font-size: 13px; }
.demo-card-head .icon { width: 16px; height: 16px; }
.demo-card > p { margin: 8px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.demo-credentials { display: grid; gap: 6px; margin-bottom: 12px; }
.demo-credentials > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.demo-credentials span { color: var(--muted); font-size: 11px; }
.demo-credentials b { color: var(--ink); font-size: 12px; }
.demo-card .btn.soft { border: 1px solid var(--line); }

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  font-size: 13px;
  cursor: pointer;
}
.consent-item .icon { color: var(--accent); width: 18px; height: 18px; }
.consent-item input { width: 18px; height: 18px; margin-inline-start: auto; accent-color: var(--accent); flex: none; }

.trust-card { display: flex; gap: 12px; background: linear-gradient(135deg, #dceefc, #f7fbff); border-color: #c8e0f4; }
.trust-card .icon { color: var(--accent); width: 22px; height: 22px; }
.trust-card strong { display: block; font-size: 13px; }
.trust-card p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.learn-card { display: flex; gap: 12px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 16px rgba(11, 95, 165, .05); }
.learn-thumb { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, var(--accent), var(--accent-deep)); color: #fff; }
.learn-thumb .icon { width: 20px; height: 20px; }
.learn-card-body { flex: 1; }
.learn-meta { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 8px; }
.learn-card h3 { margin: 7px 0 0; font-size: 14px; }
.learn-card p { margin: 5px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.learn-entry { margin-top: 12px; }
.learn-guest .actions { margin-top: 4px; }
.learn-guest .actions .btn { flex: 1; }

.quiz-entry { display: flex; gap: 12px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #0f72bd, var(--accent-deep)); color: #fff; }
.quiz-entry-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .16); }
.quiz-entry .learn-meta { background: rgba(255, 255, 255, .18); color: #fff; }
.quiz-entry h3 { margin: 7px 0 0; font-size: 15px; }
.quiz-entry p { margin: 5px 0 0; font-size: 12px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.quiz-entry .btn.primary { width: auto; margin-top: 12px; background: #fff; color: var(--accent); box-shadow: none; }

.quiz-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 4px 16px rgba(11, 95, 165, .05); }
.quiz-progress { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.quiz-bar { height: 6px; margin: 8px 0 18px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.quiz-card h2 { margin: 0 0 14px; font-size: 17px; line-height: 1.4; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { padding: 12px 14px; text-align: start; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.quiz-option:hover, .quiz-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.quiz-band { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.quiz-band.low { background: var(--ok-soft); color: var(--ok); }
.quiz-band.moderate { background: var(--warn-soft); color: var(--warn); }
.quiz-band.high { background: var(--danger-soft); color: var(--danger); }
.quiz-result p { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.quiz-result .actions .btn { flex: 1; width: auto; }

.empty-card { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-card .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--accent); }
.empty-card strong { display: block; color: var(--ink); font-size: 15px; }
.empty-card p { margin: 6px 0 0; font-size: 13px; }

.section-label, .sub-label { font-size: 12px; font-weight: 700; color: var(--ink); margin: 2px 0 -4px 4px; }

.action-tile, .order-row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; box-shadow: 0 4px 16px rgba(11, 95, 165, .05); font-family: inherit; }
.action-tile:hover, .order-row:hover { border-color: #9ec9e9; }
.tile-icon, .order-row-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.action-tile strong, .order-row strong { display: block; font-size: 14px; }
.action-tile small, .order-row small { display: block; font-size: 12px; color: var(--muted); }
.tile-arrow { margin-inline-start: auto; font-size: 22px; color: var(--muted); }
.order-row { border-radius: 14px; padding: 12px; }
.order-row-icon { width: 38px; height: 38px; }
.order-row-main { flex: 1; font-size: 13px; }

.address-preview { display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin: 4px 0 14px; border-radius: 12px; background: #f4f9fe; border: 1px solid var(--line); }
.address-preview .icon { color: var(--accent); width: 18px; height: 18px; }
.address-preview div { flex: 1; }
.address-preview span { display: block; font-size: 11px; color: var(--muted); }
.address-preview strong { display: block; font-size: 12px; font-weight: 600; }

.choice-group { margin: 14px 0; }
.choice { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; font-size: 13px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }

.hero-card { background: linear-gradient(140deg, #dceefc, #f7fbff); color: var(--ink); border: 1px solid #c8e0f4; }
.hero-card .chip { background: #fff; color: var(--accent); }
.hero-card .chip.warn { background: var(--warn-soft); color: var(--warn); }
.hero-card .chip.danger { background: var(--danger-soft); color: var(--danger); }
.hero-card .chip.ok { background: var(--ok-soft); color: var(--ok); }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.hero-card-body { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.hero-card-body > .icon { width: 26px; height: 26px; color: var(--accent); }
.hero-card-body strong { display: block; font-size: 16px; }
.hero-card-body span { display: block; font-size: 12px; color: var(--muted); }
.hero-card .sla { background: #fff; color: var(--accent); }
.hero-card .sla.warn { background: var(--warn-soft); color: var(--warn); }
.hero-card .sla.bad { background: var(--danger-soft); color: var(--danger); }
.hero-card .actions .btn.primary { width: auto; background: linear-gradient(135deg, #0f72bd, var(--accent-deep)); color: #fff; box-shadow: 0 8px 18px rgba(11, 95, 165, .2); }
.hero-card .actions .btn.soft { background: #fff; color: var(--accent); border-color: var(--line); }

.id-card { background: linear-gradient(140deg, #dceefc, #f7fbff); color: var(--ink); border: 1px solid #c8e0f4; }
.id-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.id-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
.id-value { display: block; font-size: 22px; letter-spacing: 1px; }
.copy { color: var(--accent); font-size: 12px; }
.id-card .qr { width: 94px; height: 94px; padding: 5px; background: #fff; border: 1px solid var(--line); }
.id-card .hint { color: var(--muted); }

.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-top small { color: var(--muted); font-size: 12px; }
.detail-line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-line .icon { color: var(--accent); width: 18px; height: 18px; }
.detail-line span { display: block; font-size: 11px; color: var(--muted); }
.detail-line strong { display: block; font-size: 13px; }
.detail-line small { display: block; font-size: 11px; color: var(--muted); }
.detail-card .timeline li { font-size: 12px; padding: 4px 0 4px 20px; }
.detail-card .timeline li::before { width: 7px; height: 7px; inset-inline-start: 3px; top: 8px; margin: 0; }
.detail-card .timeline li::after { content: ""; position: absolute; inset-inline-start: 6px; top: 17px; bottom: -4px; width: 1px; background: var(--line); }
.detail-card .timeline li:last-child::after { display: none; }
.alert { margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }

.report-card .report-id { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.report-card .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.safety .btn { background: #7a4a05; }

.app-nav { display: flex; gap: 4px; padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); flex: none; }
.nav-item { flex: 1; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 0; border-radius: 12px; font: 600 11px/1 inherit; cursor: pointer; }
.nav-item .icon { width: 21px; height: 21px; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }

html[dir="rtl"] .brand-mark { order: 2; }
html[dir="rtl"] .sample-id { letter-spacing: 0; }
html[dir="rtl"] .tile-arrow { transform: scaleX(-1); }

@media (max-width: 560px) {
  .topbar { padding: 8px 12px; }
  .brand strong, .brand-sub { display: none; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
  .brand-mark .icon { width: 15px; height: 15px; }
  .ghost { padding: 6px 10px; font-size: 12px; }
  .tabs { padding: 6px 12px 0; gap: 4px; }
  .tab { padding: 8px 12px; font-size: 12px; border-bottom-width: 2px; }
  main { padding: 0; }
  .notice { margin: 8px 12px 0; }
  .app-shell { width: 100%; max-width: none; height: calc(100dvh - 84px); min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .app-header { padding: 12px 16px 11px; }
  .app-brand { gap: 8px; }
  .app-mark { width: 30px; height: 30px; border-radius: 9px; }
  .app-mark .icon { width: 16px; height: 16px; }
  .app-brand-text strong { font-size: 14px; }
  .app-brand-text small { display: none; }
  .header-tools { gap: 6px; }
  .secure-icon { display: grid; }
  .secure-pill { display: none; }
  .icon-btn, .back-btn { width: 30px; height: 30px; border-radius: 9px; }
  .app-heading { margin-top: 8px; align-items: center; gap: 8px; }
  .app-heading h1 { font-size: 17px; letter-spacing: -.2px; }
  .app-heading p { display: none; }
  .app-body { padding: 12px 14px 20px; }
}

/* Patient app redesign */
body:has(.app-shell) .topbar { display: none; }
body:has(.app-shell) .tabs { justify-content: center; }
.app-shell { width: min(100%, 460px); height: min(880px, calc(100dvh - 100px)); min-height: min(570px, calc(100dvh - 100px)); }
.app-header { background: #fff; }
.app-heading h1 { letter-spacing: normal; }
.app-heading h1:focus { outline: none; }
.screen-sub { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.icon-btn, .back-btn { min-width: 44px; min-height: 44px; }
html[dir="rtl"] .back-btn .icon { transform: scaleX(-1); }
.mono { direction: ltr; unicode-bidi: isolate; }
.welcome-card, .journey-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid #cfe2f1;
  border-radius: 24px;
  background: linear-gradient(145deg, #e1f0fc, #fff 78%);
}
.welcome-card h2, .journey-card h2, .report-card h2 { margin: 0; line-height: 1.15; font-size: 26px; }
.welcome-card p, .journey-card p, .report-card > p { margin: 0; color: var(--muted); line-height: 1.5; }
.welcome-card .link { min-height: 44px; justify-self: center; }
.welcome-symbol, .journey-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
}
.welcome-symbol .icon, .journey-icon .icon { width: 24px; height: 24px; }
.patient-links { display: grid; gap: 8px; }
.patient-links .action-tile { margin: 0; }
.patient-links .tile-arrow { margin-inline-start: auto; }
.privacy-panel, .demo-disclosure, .patient-feedback {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.privacy-panel summary { cursor: pointer; color: var(--accent-deep); font-weight: 700; }
.privacy-panel p { margin: 10px 0 0; color: var(--muted); }
.demo-disclosure { margin: 0; }
.patient-feedback { margin-bottom: 12px; }
.form-card .privacy-panel, .measurement-panel { margin-block: 12px; }
.prep-list { margin: 0; padding-inline-start: 22px; line-height: 1.6; }
.prep-list li + li { margin-top: 10px; }
.measurement-panel .results-grid { margin-top: 12px; }
.detail-card .timeline li { padding-inline: 20px 0; }
#view .app-shell .btn, #view .app-shell .nav-item { min-height: 44px; }
@media (max-width: 560px) {
  .app-shell { width: 100%; height: calc(100dvh - 48px); min-height: 0; }
  .app-heading h1 { font-size: 20px; }
  .screen-sub { font-size: 13px; }
  .welcome-card, .journey-card { padding: 19px; }
}

/* Guided patient journey and optional short-form learning. */
.demo-controls { position: relative; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.demo-controls > summary { padding: 10px 18px; min-height: 44px; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; }
.demo-controls[open] .tabs { margin: 0; justify-content: center; }
.demo-controls[open] { position: relative; }
.app-shell { height: min(900px, calc(100dvh - 78px)); min-height: 0; }
.screen { gap: 16px; }
.video-card { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); text-align: start; font: inherit; cursor: pointer; }
.video-card:hover { border-color: var(--accent); background: #f6fbff; }
.video-card.featured { border-color: #bad5eb; background: linear-gradient(115deg, #e6f2fc, #fff); }
.video-art { display: grid; place-items: center; gap: 8px; flex: 0 0 65px; min-height: 80px; padding: 12px; border-radius: 13px; background: var(--accent-deep); color: white; }
.video-art > span { font-size: 11px; font-weight: 700; }
.video-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.video-copy small { color: var(--accent); font-size: 10px; letter-spacing: .04em; font-weight: 700; }
.video-copy strong { font-size: 16px; line-height: 1.3; }
.video-copy > span { color: var(--muted); font-size: 13px; }
.video-placeholder { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 24px; border-radius: 20px; color: var(--accent-deep); background: var(--accent-soft); }
.video-placeholder .icon { width: 40px; height: 40px; }
.video-placeholder p { margin: 0; }
.guide-video { display: block; width: auto; height: min(52svh, 720px); max-width: 100%; aspect-ratio: 9 / 16; margin-inline: auto; border-radius: 20px; background: #102b40; }
.guide-preview { position: relative; display: block; width: auto; height: min(52svh, 720px); max-width: 100%; aspect-ratio: 9 / 16; margin-inline: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: #102b40; color: white; font: inherit; cursor: pointer; }
.guide-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.guide-preview > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(transparent 30%, #102b4055); text-shadow: 0 1px 5px #102b40; }
.guide-preview .icon { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: #083f73ed; box-shadow: 0 4px 24px #102b4040; }
.guide-preview strong { padding: 8px 12px; border-radius: 10px; background: #083f73ed; font-size: 14px; }
.guide-preview:focus-visible, .guide-close:focus-visible { outline: 3px solid #79c7ff; outline-offset: 4px; }
body.guide-playing { overflow: hidden; }
.guide-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #081722; color: white; overscroll-behavior: contain; }
.guide-lightbox[open] { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; }
.guide-lightbox::backdrop { background: #081722; }
.guide-lightbox .guide-video, .guide-video:fullscreen { min-width: 0; min-height: 0; width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: auto; object-fit: contain; border-radius: 0; background: #081722; }
.guide-close { position: absolute; z-index: 1; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffff60; border-radius: 50%; background: #081722c9; color: white; font: inherit; font-size: 30px; cursor: pointer; }
.guide-feed-heading { position: absolute; z-index: 1; top: max(78px, calc(env(safe-area-inset-top) + 60px)); inset-inline: 16px 74px; width: fit-content; max-width: calc(100% - 90px); padding: 9px 12px; border-radius: 12px; background: #081722b8; color: white; pointer-events: none; }
.guide-feed-heading strong { display: block; font-size: 15px; line-height: 1.4; }
.guide-feed-heading small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; color: #e1eff8; }
.guide-feed-nav { position: absolute; z-index: 1; right: max(12px, env(safe-area-inset-right)); top: 42%; display: grid; gap: 12px; }
.guide-feed-nav button { width: 44px; height: 44px; border: 1px solid #ffffff60; border-radius: 50%; color: white; background: #081722c9; font: inherit; font-size: 25px; cursor: pointer; }
.guide-feed-nav button:disabled { opacity: .3; cursor: default; }
.guide-feed-nav button:focus-visible { outline: 3px solid #79c7ff; outline-offset: 3px; }
.guide-lightbox[data-feed] .guide-video { touch-action: pan-x; }
.guide-video::cue { background: rgba(20, 43, 58, .92); color: #fff; }
.transcript h2, .section-intro h2 { margin: 8px 0; font-size: 20px; line-height: 1.3; }
.transcript p { line-height: 1.8; }
.section-intro p { margin: 0; color: var(--muted); }
.service-steps { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0 0 20px; }
.service-steps li { display: flex; gap: 12px; align-items: flex-start; }
.service-steps li > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; border-radius: 50%; }
.service-steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.booking-progress { list-style: none; padding: 0; display: flex; gap: 8px; margin: 0; }
.booking-progress li { display: flex; flex: 1; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.booking-progress li span { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; height: 24px; width: 24px; flex: 0 0 24px; }
.booking-progress [aria-current] { color: var(--accent-deep); font-weight: 700; }
.booking-progress [aria-current] span { color: #fff; background: var(--accent); }
.booking-summary dt { color: var(--muted); font-size: 13px; margin-top: 12px; }
.booking-summary dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.care-message { padding: 14px; border-radius: 14px; background: var(--info-soft); color: var(--accent-deep); }
.care-message p { margin: 5px 0 0; font-size: 14px; }
.form-card h2 { margin-top: 0; font-size: 21px; }
.form-card > .btn + .btn { margin-top: 10px; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.quiz-band.guide { background: var(--info-soft); color: var(--accent-deep); }
@media (max-width: 560px) {
  .app-shell { height: calc(100dvh - 44px); }
  body:has(.demo-controls[open]) .app-shell { height: calc(100dvh - 88px); }
  .video-card { gap: 10px; padding: 12px; }
  .video-art { flex-basis: 54px; min-height: 72px; }
}
.handoff-time { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
body:has(.app-shell) main { padding: 16px; }
.app-shell { margin: 0 auto; height: min(900px, calc(100dvh - 78px)); }
body:has(.demo-controls[open]) .app-shell { height: min(900px, calc(100dvh - 130px)); }
@media (max-width: 560px) {
  body:has(.app-shell) main { padding: 0; }
  .app-shell { height: calc(100dvh - 44px); }
  body:has(.demo-controls[open]) .app-shell { height: calc(100dvh - 88px); }
}

/* Sirr wordmark and welcome sign-in. */
.app-brand-text .wordmark { display: block; font-size: 32px; font-weight: 800; letter-spacing: -1.4px; line-height: 1.05; color: var(--accent-deep); }
.app-brand-text .brand-tagline { display: block; margin-top: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--muted); }
.app-header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-signin { border: 0; border-radius: 10px; min-height: 44px; padding: 8px 10px; background: var(--accent-soft); color: var(--accent-deep); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.welcome-header .app-header-row { direction: ltr; }
html[dir="rtl"] .wordmark { letter-spacing: 0; }
html[dir="rtl"] .welcome-header .app-brand-text { direction: rtl; }
@media (max-width: 360px) {
  .welcome-header .app-header-tools { gap: 4px; }
  .welcome-header .header-signin { padding-inline: 7px; }
  .welcome-header .brand-tagline { font-size: 10px; }
}

/* Compact journey, illustrated preparation and report explanations. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.home-progress { padding: 14px 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.home-progress .sub-label { display: block; margin: 0 0 14px; font-size: 12px; text-align: start; }
.home-progress ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.home-progress li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.3; }
.home-progress li:not(:last-child)::after { content: ''; position: absolute; height: 2px; width: calc(100% - 28px); inset-inline-start: calc(50% + 14px); top: 14px; background: var(--line); }
.home-progress li.done::after { background: var(--accent); }
.progress-dot { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 50%; background: #f4f9fe; color: var(--muted); font-weight: 700; }
.progress-dot .icon { width: 16px; height: 16px; }
.home-progress .done .progress-dot { background: var(--accent); color: white; border-color: var(--accent); }
.home-progress .current { color: var(--accent-deep); font-weight: 700; }
.home-progress .current .progress-dot { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.home-progress .stopped .progress-dot { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); box-shadow: none; }
.home-progress .progress-recovery { margin-top: 14px; color: var(--warn); font-size: 12px; }
.illustrated-prep { display: grid; gap: 14px; list-style: none; padding: 0; margin: 20px 0; }
.illustrated-prep li { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.illustrated-prep li:last-child { border: 0; padding-bottom: 0; }
.prep-illustration { width: 104px; flex: 0 0 104px; color: var(--accent); }
.illustrated-prep h2 { margin: 4px 0 6px; font-size: 16px; line-height: 1.35; }
.illustrated-prep p { margin: 0; color: var(--muted); font-size: 13px; }
.measurement-help { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); text-align: start; }
.measurement-help summary { min-height: 44px; display: flex; align-items: center; font-size: 12px; cursor: pointer; color: var(--accent-deep); }
.measurement-help summary::before { content: '+'; margin-inline-end: 6px; font-size: 18px; }
.measurement-help[open] summary::before { content: '−'; }
.measurement-help p { margin: 4px 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
.measurement-source { display: block; color: var(--accent); font-size: 12px; line-height: 1.6; margin-top: 16px; }
.demo-controls .demo-menu { position: absolute; top: 100%; inset-inline: 0; max-height: 65dvh; overflow-y: auto; background: #fff; box-shadow: 0 16px 30px #083f7326; border-bottom: 1px solid var(--line); }
.scenario-panel { max-width: 680px; padding: 12px 18px 18px; margin: auto; }
.scenario-panel p { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.scenario-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scenario-buttons button { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
body:has(.demo-controls[open]) .app-shell { height: min(900px, calc(100dvh - 78px)); }
@media (max-width: 560px) {
  body:has(.demo-controls[open]) .app-shell { height: calc(100dvh - 44px); }
}
@media (max-width: 360px) {
  .prep-illustration { width: 76px; flex-basis: 76px; }
  .illustrated-prep li { gap: 10px; }
  .home-progress { padding-inline: 5px; }
  .home-progress li { font-size: 10px; }
  .report-card .results-grid { grid-template-columns: 1fr; }
}
.result .chip { white-space: normal; max-width: 100%; }
.result strong { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .report-card .results-grid { grid-template-columns: 1fr; }
}
/* Keep screen-reader labels inside their scrollable cards. */
.app-body, .measurement-help summary { position: relative; }
.sr-only { top: 0; inset-inline-start: 0; }

/* Unified Sirr: quiet progress, clear choices, one next action. */
:root { --bg: #f1f5fa; --ink: #16324b; --muted: #576e82; --line: #dfe7ef; --radius: 20px; }
body { font-size: 16px; background: radial-gradient(ellipse at 20% 20%, #e4effb, transparent 55%), #f3f6fa; }
body:has(.app-shell) main { display: grid; grid-template-columns: minmax(270px, 1fr) minmax(390px, 470px); align-items: center; gap: 80px; max-width: 1050px; padding: 24px 32px; min-height: calc(100dvh - 44px); }
.app-shell, body:has(.demo-controls[open]) .app-shell { width: 100%; margin: 0; height: min(940px, calc(100dvh - 92px)); border: 1px solid #d8e3ee; border-radius: 30px; box-shadow: 0 24px 80px #183c6812, 0 3px 12px #183c6808; background: #f7f9fc; }
.app-header { padding: 22px 24px 18px; border-bottom: 1px solid #e9eef4; }
.app-brand-text .wordmark { color: #16466f; font-size: 34px; }
.app-brand-text .brand-tagline { font-size: 12px; }
.app-body { padding: 20px 20px 28px; }
.header-session { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.app-heading h1 { font-size: 22px; }
.screen-sub { font-size: 14px; }
.screen { gap: 18px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .13em; color: #426580; line-height: 1.6; }
.companion-panel { padding: 20px 0; align-self: center; }
.companion-logo { display: flex; align-items: center; gap: 10px; color: #174c78; margin-bottom: 58px; }
.companion-logo > .icon { width: 30px; height: 30px; }
.companion-logo strong { font-size: 33px; letter-spacing: -1.5px; }
.companion-panel h2 { font-size: clamp(32px, 3.3vw, 45px); line-height: 1.16; font-weight: 700; letter-spacing: -1.8px; margin: 14px 0 20px; color: #183b5b; }
.companion-intro { color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 360px; }
.companion-steps { display: grid; gap: 27px; margin: 40px 0 46px; }
.companion-steps > div { display: flex; gap: 15px; align-items: flex-start; }
.companion-steps > div > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #fff; color: var(--accent); border: 1px solid #dce6f0; flex-shrink: 0; }
.companion-steps strong { font-size: 15px; font-weight: 650; }
.companion-steps p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 4px 0 0; max-width: 280px; }
.companion-footer { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.companion-footer .icon { width: 15px; height: 15px; }
.welcome-card { border: 1px solid #d9e6f2; background: linear-gradient(145deg, #eaf3fc, #f2f8fe 78%); border-radius: 24px; padding: 24px; gap: 13px; }
.welcome-card h2 { font-size: 35px; line-height: 1.12; letter-spacing: -1.3px; font-weight: 700; }
.welcome-card p { font-size: 15px; line-height: 1.7; }
.path-art { width: 100%; height: 90px; margin: 0; }
.btn { font-size: 15px; border-radius: 13px; padding: 13px 18px; min-height: 48px; transition: background .15s, transform .15s; }
.btn.primary { background: #0b5fa5; box-shadow: 0 5px 12px #0b5fa514; }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.quick-time { display: flex; align-items: center; justify-content: center; gap: 6px; color: #506e87; font-size: 12px; }
.quick-time .icon { width: 13px; height: 13px; }
.welcome-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.welcome-choices > button { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); padding: 18px 15px; text-align: start; font: inherit; cursor: pointer; }
.welcome-choices > button:hover { border-color: #8eb4d2; }
.welcome-choices > button > .icon { color: var(--accent); width: 23px; height: 23px; }
.welcome-choices strong { display: block; font-size: 14px; line-height: 1.5; }
.welcome-choices small { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 6px; }
.prototype-note { text-align: center; font-size: 11px; color: var(--muted); margin: 0; }
.app-nav { padding-block: 8px 12px; background: #fff; border-top: 1px solid var(--line); }
.nav-item.active { background: #eaf3fc; border-radius: 13px; }
.home-welcome { padding: 2px 2px 0; }
.home-welcome h2 { font-size: 22px; margin: 6px 0 0; letter-spacing: -.5px; }
.journey-card { background: #fff; border-color: var(--line); border-radius: 22px; gap: 16px; padding: 22px; }
.journey-card h2 { font-size: 25px; letter-spacing: -.6px; }
.home-progress { border: 0; background: #f5f8fc; border-radius: 14px; }
.home-progress li { font-size: 11px; }
.home-progress .sub-label { display: none; }
.home-progress ol { padding-block: 4px; }
.learning-card { background: #fff; padding: 18px; border: 1px solid var(--line); border-radius: 20px; }
.learning-head { display: flex; align-items: center; gap: 10px; }
.learning-head strong { font-size: 14px; display: block; }
.learning-head small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.learning-symbol { color: #b57a20; display: grid; place-items: center; font-size: 27px; background: #fff4df; width: 43px; height: 43px; border-radius: 14px; flex: none; }
.dismiss-learning { margin-inline-start: auto; background: none; border: 0; color: var(--muted); font-size: 22px; padding: 8px; cursor: pointer; min-width: 36px; min-height: 44px; }
.learning-track { display: flex; gap: 7px; margin: 18px 0 10px; }
.learning-track > span { height: 8px; flex: 1; border-radius: 5px; background: #e9eff5; }
.learning-track > .complete { background: #e5b469; }
.learning-track .icon { display: none; }
.learning-footer { display: flex; justify-content: space-between; align-items: center; }
.learning-footer > span { font-size: 12px; color: var(--muted); }
.learning-footer .link { font-size: 12px; padding: 0 8px; min-height: 36px; }
.quiz-card { border: 1px solid var(--line); background: #fff; padding: 22px; border-radius: 22px; }
.quiz-card h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.6px; }
.quiz-progress { align-items: center; color: var(--muted); font-size: 12px; }
.quiz-progress .icon { width: 17px; height: 17px; color: var(--accent); }
.quiz-bar { height: 5px; margin: 15px 0 23px; background: #edf2f7; }
.quiz-bar i { transition: width .2s; }
.question-hint { font-size: 14px; line-height: 1.6; margin: 10px 0 20px; color: var(--muted); }
.quiz-options { gap: 10px; margin-bottom: 22px; }
.quiz-option { display: flex; align-items: center; gap: 12px; padding: 15px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; font-size: 14px; min-height: 54px; }
.quiz-option.selected { border-color: var(--accent); background: #edf5fd; box-shadow: 0 0 0 1px var(--accent); }
.option-circle { display: grid; place-items: center; width: 19px; height: 19px; border: 1.5px solid #b8c8d5; border-radius: 50%; flex: none; }
.selected .option-circle { background: var(--accent); color: white; border-color: var(--accent); }
.option-circle .icon { width: 12px; height: 12px; }
.quiz-card > .link { display: block; margin: 8px auto 0; }
.session-note { display: flex; align-items: flex-start; gap: 10px; padding: 0 10px; color: var(--muted); }
.session-note > .icon { width: 17px; height: 17px; margin-top: 3px; }
.session-note p { margin: 0; font-size: 12px; line-height: 1.65; }
.session-note strong { display: block; color: #46627b; margin-bottom: 3px; }
.quiz-result { text-align: start; }
.quiz-result > p { color: var(--muted); line-height: 1.7; }
.result-emblem { display: grid; place-items: center; width: 52px; height: 52px; background: #e6f3ee; border-radius: 17px; margin-bottom: 20px; color: #237858; }
.result-emblem .icon { width: 26px; height: 26px; }
.quiz-result .eyebrow { display: block; margin-bottom: 10px; }
.route-reasons { background: #f4f7fb; padding: 17px; border-radius: 14px; margin: 22px 0; }
.route-reasons > strong { font-size: 14px; }
.route-reasons ul { padding-inline-start: 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.route-reasons small { font-size: 11px; color: var(--muted); }
.quiz-result .btn + .btn { margin-top: 10px; }
.urgent-result { border-color: #edc5b7; }
.urgent-result .result-emblem { background: #fff0e9; color: #a34729; }
.urgent-boundary { background: #fff0e9; padding: 15px; border-radius: 13px; color: #8b3b23 !important; }
.journal-intro { padding: 8px 4px; }
.journal-emblem { background: #e8effc; color: var(--accent); width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; }
.journal-intro h2 { font-size: 24px; line-height: 1.35; letter-spacing: -.5px; margin: 0 0 10px; }
.journal-intro p { font-size: 12px; color: var(--muted); }
.form-card > label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
#journal-input { width: 100%; font: inherit; padding: 13px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; margin-bottom: 14px; color: var(--ink); }
.question-list ol { list-style: none; padding: 0; margin: 0 0 15px; display: grid; gap: 10px; counter-reset: questions; }
.question-list li { display: flex; align-items: flex-start; gap: 12px; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.question-list li::before { counter-increment: questions; content: counter(questions, decimal-leading-zero); color: #87a0b6; font-size: 12px; padding-top: 3px; }
.question-list p { flex: 1; margin: 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.question-list li > button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 20px; cursor: pointer; min-width: 36px; min-height: 36px; }
.empty-journal { padding: 20px; text-align: center; border: 1px dashed #ccd9e7; border-radius: 15px; color: var(--muted); font-size: 14px; }
.suggestion-list h3, .faq-section h3 { font-size: 15px; margin: 8px 0 14px; }
.suggestion-list { display: grid; gap: 8px; }
.suggestion-list > button { display: flex; gap: 10px; align-items: center; text-align: start; font: inherit; font-size: 14px; color: #315876; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px; cursor: pointer; }
.suggestion-list > button > span { color: var(--accent); font-size: 20px; }
.faq-section { display: grid; gap: 8px; }
.faq-section h3 { margin-bottom: 4px; }
.faq-section summary { font-size: 14px; line-height: 1.6; }
.care-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 22px 0; }
.care-stats > div { display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: #fff; }
.care-stats strong { font-size: 34px; color: var(--accent-deep); }
.care-stats span { color: var(--muted); font-size: 14px; }
.review-case { padding: 24px; }
.review-case textarea { max-width: 100%; }
.review-case .field { margin-top: 20px; }
.review-measurements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.review-measurements > div { display: grid; padding: 12px; background: #f5f8fc; border-radius: 10px; gap: 6px; }
.review-measurements span { font-size: 12px; color: var(--muted); }
.review-measurements strong { font-size: 15px; }
.care-audit { margin-top: 20px; }
.audit-row { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14px; }
.review-stamp { display: flex; align-items: center; gap: 10px; padding: 14px; background: #eaf5ef; border-radius: 14px; color: #236b4e; margin: 15px 0; }
.review-stamp strong { display: block; font-size: 13px; }
.review-stamp small { display: block; font-size: 11px; margin-top: 2px; }
.review-patient-note { white-space: pre-wrap; font-size: 14px; line-height: 1.7; padding: 14px; background: #f4f7fb; border-radius: 12px; }
.patient-feedback { background: #eaf5ef; color: #236b4e; border-color: #cce4d5; font-size: 13px; }
html[dir="rtl"] .companion-panel h2, html[dir="rtl"] .welcome-card h2 { letter-spacing: 0; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
@media (max-width: 900px) {
  body:has(.app-shell) main { gap: 35px; padding: 20px; grid-template-columns: minmax(220px, 1fr) minmax(360px, 440px); }
  .companion-panel h2 { font-size: 33px; }
  .companion-logo { margin-bottom: 35px; }
}
@media (max-width: 740px) {
  .companion-panel { display: none; }
  body:has(.app-shell) main { display: block; padding: 16px; min-height: auto; max-width: 500px; }
}
@media (max-width: 560px) {
  body:has(.app-shell) main { padding: 0; max-width: none; }
  .app-shell, body:has(.demo-controls[open]) .app-shell { border: 0; border-radius: 0; height: calc(100dvh - 44px); max-height: none; }
  .app-header { padding: 16px 20px; }
  .app-body { padding: 18px 18px 26px; }
  .welcome-card { padding: 22px; }
  .welcome-card h2 { font-size: 34px; }
  .care-stats { gap: 8px; }
  .care-stats > div { padding: 14px; }
  .care-stats span { font-size: 12px; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .app-body { padding-inline: 12px; }
  .welcome-card, .quiz-card { padding: 18px; }
  .welcome-card h2 { font-size: 30px; }
  .learning-head strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Keep the presenter strip exactly 44px so mobile never gains a page scrollbar. */
.demo-controls { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }

/* Learn: an optional, tactile three-station schematic inspired by fertility-screening. */
.learn-explorer { overflow: hidden; border: 1px solid #d5e3ed; border-radius: 23px; background: #fff; }
.explorer-heading { padding: 22px 22px 0; }
.explorer-heading h2 { font-size: 25px; line-height: 1.25; margin: 7px 0 8px; letter-spacing: -.7px; color: var(--ink); }
.explorer-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.learn-model { display: block; width: 100%; height: auto; padding: 4px 12px 2px; background: radial-gradient(ellipse at center, #e8f1f8 0, #f8fbfd 60%, #fff 77%); }
.visual-station { opacity: .62; transition: opacity .2s; }
.visual-station.is-selected { opacity: 1; }
.station-outline { stroke: transparent; }
.is-selected .station-outline { stroke: #3f80af; }
.station-badge { fill: #e1eaf2; stroke: #fff; stroke-width: 2; }
.station-number { fill: #526e86; }
.is-selected .station-badge { fill: var(--accent); }
.is-selected .station-number { fill: #fff; }
.explorer-tabs { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 5px; margin: 0 18px 18px; padding: 5px; background: #f0f5fa; border-radius: 13px; }
.explorer-tabs > button { display: flex; justify-content: center; align-items: center; gap: 5px; min-height: 46px; border: 1px solid transparent; border-radius: 9px; background: transparent; font: inherit; font-size: 12px; font-weight: 650; color: var(--muted); padding: 7px 3px; cursor: pointer; }
.explorer-tabs > button > span { font-size: 10px; opacity: .7; }
.explorer-tabs > button[aria-pressed="true"] { background: #fff; border-color: #d3e2ee; color: var(--accent-deep); box-shadow: 0 2px 6px #16324b08; }
.explorer-explanation { padding: 0 22px; min-height: 204px; }
.explorer-explanation h3 { font-size: 18px; line-height: 1.4; margin: 0 0 8px; letter-spacing: -.25px; }
.explorer-explanation > p { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0 0 16px; }
.explorer-takeaway { border-inline-start: 3px solid #d7af6c; padding: 2px 0 2px 13px; padding-inline: 13px 0; margin-bottom: 18px; }
.explorer-takeaway strong { font-size: 12px; color: #7e602b; }
.explorer-takeaway p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 4px 0 0; }
.explorer-question { width: calc(100% - 44px); margin: 0 22px 18px; padding: 11px 14px; min-height: 46px; border: 1px solid #d1e1ee; border-radius: 12px; background: #eff6fc; color: var(--accent-deep); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; display: flex; align-items: center; justify-content: space-between; text-align: start; }
.explorer-question > span { font-size: 21px; font-weight: 400; }
.explorer-footnote { display: grid; gap: 6px; border-top: 1px solid #e9eff4; padding: 14px 22px; background: #fafcfe; font-size: 11px; line-height: 1.6; color: var(--muted); }
.explorer-footnote a { color: #446f90; text-underline-offset: 3px; }
html[dir="rtl"] .explorer-heading h2 { letter-spacing: 0; }
@media (max-width: 360px) {
  .explorer-heading { padding-inline: 18px; }
  .explorer-tabs { margin-inline: 12px; }
  .explorer-explanation { padding-inline: 18px; }
  .explorer-tabs > button { font-size: 11px; }
}

/* Ask Sirr: session-only conversational concept, with an honest local-demo label. */
.chat-screen { gap: 15px; }
.chat-concept { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #5c567a; background: #efedf7; border: 1px solid #e2deef; border-radius: 9px; padding: 8px 11px; }
.chat-spark { font-size: 18px; color: #7c6aab; }
.chat-privacy { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 11px; line-height: 1.65; margin: 0 3px; }
.chat-privacy .icon { width: 14px; height: 14px; margin-top: 2px; }
.chat-welcome { padding: 20px 7px 8px; }
.chat-emblem { display: grid; place-items: center; width: 48px; height: 48px; background: #e8effb; color: #466da1; font-size: 28px; border-radius: 17px; margin-bottom: 17px; }
.chat-welcome h2 { font-size: 26px; letter-spacing: -.7px; margin: 0 0 10px; }
.chat-welcome p { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; }
.chat-messages { display: grid; gap: 17px; }
.chat-messages:empty { display: none; }
.chat-message { border: 1px solid var(--line); border-radius: 18px; padding: 16px; max-width: 96%; background: #fff; }
.chat-message.user { margin-inline-start: 26px; background: #e7f0fc; border-color: #dae6f7; border-end-end-radius: 5px; }
.chat-message.assistant { margin-inline-end: 12px; border-end-start-radius: 5px; }
.chat-message.urgent { background: #fff5ed; border-color: #edc9af; }
.chat-author { font-size: 11px; font-weight: 700; color: #557591; display: block; margin-bottom: 7px; }
.chat-message p { font-size: 14px; color: var(--ink); line-height: 1.75; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-sources { display: grid; gap: 5px; margin-top: 13px; padding-top: 10px; border-top: 1px solid #e8edf3; font-size: 11px; color: var(--muted); }
.chat-sources a { color: #416b8e; text-underline-offset: 3px; }
.chat-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chat-suggestions > small { color: var(--muted); font-size: 11px; }
.chat-suggestions button { background: #fff; border: 1px solid #d5e2ee; border-radius: 13px; color: #365f83; text-align: start; font: inherit; font-size: 13px; min-height: 44px; padding: 11px 14px; cursor: pointer; }
.chat-suggestions button:hover { background: #f0f6fc; border-color: #9ebbd5; }
.chat-compose { display: flex; align-items: flex-end; gap: 9px; border: 1px solid #becfe0; background: #fff; padding: 9px; border-radius: 17px; box-shadow: 0 3px 10px #143e6a05; }
.chat-compose textarea { border: 0; background: transparent; padding: 7px; width: 100%; min-width: 0; resize: vertical; font: inherit; font-size: 14px; color: var(--ink); line-height: 1.5; min-height: 58px; max-height: 170px; }
.chat-compose textarea:focus-visible { outline: none; }
.chat-compose:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-compose > button { border: 0; width: 44px; height: 44px; border-radius: 13px; flex: none; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-compose .icon { width: 23px; height: 23px; }
.chat-boundary { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; margin: 0 7px; }
.chat-reset { font-size: 12px; align-self: center; min-height: 44px; }
html[dir="rtl"] .chat-welcome h2 { letter-spacing: 0; }
/* Keep the composer within reach while only the conversation scrolls. */
.app-body:has(.chat-screen) { display: flex; overflow: hidden; padding-bottom: 12px; }
.chat-screen { width: 100%; min-height: 0; flex: 1; gap: 11px; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 2px 2px 12px; }
.chat-scroll .chat-suggestions { margin-top: 16px; }
.chat-scroll > .chat-suggestions:first-child { margin-top: 0; }
.chat-concept > button { margin-inline-start: auto; border: 0; background: transparent; color: #746b8d; font-size: 22px; cursor: pointer; min-width: 32px; min-height: 28px; }
.chat-compose { flex: none; }
.chat-compose textarea { min-height: 48px; }
.chat-boundary { flex: none; }
.chat-scroll { position: relative; }
.app-shell:has(.chat-screen) .app-header { padding: 14px 20px; }
.app-shell:has(.chat-screen) .brand-tagline, .app-shell:has(.chat-screen) .screen-sub { display: none; }
.app-shell:has(.chat-screen) .wordmark { font-size: 27px; }
.app-shell:has(.chat-screen) .app-heading { margin-top: 9px; align-items: center; }
.app-shell:has(.chat-screen) .app-heading h1 { font-size: 20px; }
.app-shell:has(.chat-screen) .back-btn { min-width: 36px; min-height: 36px; }
