/* One visit, one working surface. The original hero remains outside this scope. */
.stage-enabled .demo-stage {
  --stage-accent: #cc3049;
  min-height: 660px;
  height: 100svh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 48px;
  background: #f2f4f7;
  border-top: 1px solid #e0e3e8;
  position: relative;
}
.stage-enabled .demo-stage[data-step=consultation] { --stage-accent: #424bbb; }
.stage-enabled .demo-stage[data-step=tracking] { --stage-accent: #157961; }
.stage-enabled .journey-nav {
  position: relative; top: auto; height: 64px; padding: 0 72px;
  background: #fff; border-bottom: 1px solid #e0e3e8; gap: 36px;
  justify-content: center; overflow: visible; backdrop-filter: none;
}
.stage-enabled .journey-nav a { font-size: 14px; gap: 8px; padding: 0 12px; }
.stage-enabled .journey-nav a.active { color: var(--stage-accent); border-color: var(--stage-accent); }
.stage-enabled .journey-nav button { width: 44px; height: 44px; right: 20px; background: #f3f4f7; }
.stage-enabled .chapter {
  width: min(100%, 1344px); margin: 0 auto; padding: 22px 32px 18px;
  display: flex; flex-direction: column; gap: 18px; background: transparent;
  min-height: 0; scroll-margin-top: 0; animation: stage-enter .32s ease both;
}
.stage-enabled .chapter-heading { margin: 0; flex: 0 0 auto; }
.stage-enabled .chapter-heading .eyeline { display: none; }
.stage-enabled .chapter-heading h2 { font-size: 28px; line-height: 1.2; }
.stage-enabled .chapter-heading h2 br { display: none; }
.stage-enabled .chapter-heading h2 span::before { content: ' '; }
.stage-enabled .heading-bottom { margin-top: 8px; align-items: center; }
.stage-enabled .heading-bottom p { font-size: 14px; line-height: 1.5; }
.stage-enabled .heading-bottom p br { display: none; }
.stage-enabled .heading-bottom p br::after { content: ' '; }
.stage-enabled .demo-label { font-size: 12px; }
.stage-enabled .chapter-foot { display: none; }
.stage-enabled .arrival-stage { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 64px 280px; }
.stage-enabled .product-window { box-shadow: 0 12px 35px -22px #28324455; border-color: #d8dce6; }
.stage-enabled .reception-window { border-top: 3px solid #cf3450; }
.stage-enabled .window-bar { height: 46px; font-size: 13px; }
.stage-enabled .reception-content { padding: 16px 20px; }
.stage-enabled .desk-title small { display: none; }
.stage-enabled .desk-title h3 { font-size: 20px; margin: 0; }
.stage-enabled .desk-stats { margin: 12px 0; padding-bottom: 12px; gap: 24px; }
.stage-enabled .desk-stats strong { font-size: 24px; }
.stage-enabled .desk-stats span { font-size: 12px; }
.stage-enabled .registration-layout { gap: 24px; }
.stage-enabled .arrival-form h4 { font-size: 15px; margin-bottom: 10px; }
.stage-enabled .arrival-form>label,.stage-enabled .form-pair label,.stage-enabled .arrival-form legend { font-size: 12px; margin-bottom: 5px; }
.stage-enabled .arrival-form input:not([type]),.stage-enabled .arrival-form select { height: 40px; font-size: 14px; }
.stage-enabled .arrival-form fieldset { margin: 10px 0; }
.stage-enabled .segmented span { min-height: 34px; padding: 6px; font-size: 13px; }
.stage-enabled .arrival-form .action { min-height: 44px; font-size: 14px!important; }
.stage-enabled .form-status { font-size: 12px!important; min-height: 30px; margin-top: 8px; }
.stage-enabled .queue-person { min-height: 48px; padding: 8px 0; }
.stage-enabled .queue-person b { font-size: 13px; }
.stage-enabled .queue-person small { font-size: 12px; }
.stage-enabled .queue-person.added-person { padding: 8px; }
.stage-enabled .inbox-window { border-top: 3px solid #424bbb; }
.stage-enabled .inbox-body { min-height: 260px; padding: 20px; }
.stage-enabled .inbox-body h4 { font-size: 18px; }
.stage-enabled .inbox-body p { font-size: 13px; }
.stage-enabled .inbox-footer { font-size: 11px; }
.stage-enabled .handoff-label { font-size: 9px; width: 64px; }
.stage-enabled .handoff.sent .handoff-end { box-shadow: 0 0 0 5px #15796114; }
.stage-enabled .handoff.sending::after {
  content: '19'; position: absolute; top: 44px; left: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 6px; background: #ce3450; color: white;
  font-size: 12px; font-weight: 600; box-shadow: 0 4px 12px #ce345030;
  animation: token-delivery 1.5s cubic-bezier(.3,0,.2,1) both;
}
.stage-enabled .journey-nav a.step-complete::after { content: '\2713'; font-size: 11px; color: #157961; }
@keyframes token-delivery { from { left: -12px; opacity: 0; transform: scale(.8); } 20% { opacity: 1; } 80% { opacity: 1; } to { left: calc(100% - 18px); opacity: 0; transform: scale(1); } }
.stage-enabled .doctor-workspace { border-top: 3px solid #424bbb; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stage-enabled .doctor-workspace>.window-bar { flex-shrink: 0; }
.stage-enabled .doctor-layout { flex: 1; min-height: 0; grid-template-columns: 160px minmax(0,1fr); }
.stage-enabled .doctor-main { display: flex; flex-direction: column; }
.stage-enabled .doctor-gate { min-height: 0; flex: 1; padding: 24px; }
.stage-enabled #case-content { flex: 1; display: flex; flex-direction: column; }
.stage-enabled .case-heading { padding: 14px 22px; }
.stage-enabled .case-heading h3 { font-size: 22px; }
.stage-enabled .case-panel { min-height: 0; flex: 1; }
.stage-enabled .case-tabs button { min-height: 42px; font-size: 13px; padding: 10px 4px; }
.stage-enabled .case-notes { padding: 16px 22px; }
.stage-enabled .case-navigation { padding: 12px; }
.stage-enabled .case-navigation span { font-size: 12px; padding: 7px 10px; }
.stage-enabled .clinical-note { margin: 10px 0; padding: 10px; font-size: 13px; }
.stage-enabled .record-lines { font-size: 12px; padding: 7px 0; }
.stage-enabled .case-bottom { min-height: 44px; padding: 10px 22px; font-size: 12px; }
.stage-enabled .speciality-strip { margin: 0; padding: 0; border: 0; gap: 18px; }
.stage-enabled .speciality-no { display: none; }
.stage-enabled .speciality-strip h3 { font-size: 16px; }
.stage-enabled .speciality-strip p { font-size: 12px; margin-top: 2px; }
.stage-enabled .tracking { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px, .8fr); gap: 48px; align-items: center; }
.stage-enabled .patient-copy { min-width: 0; }
.stage-enabled .patient-copy .eyeline { margin-bottom: 16px; font-size: 11px; }
.stage-enabled .patient-copy h2 { font-size: 42px; line-height: 1.15; }
.stage-enabled .patient-copy>p { font-size: 15px; margin: 18px 0; }
.stage-enabled .patient-copy label { font-size: 13px; }
.stage-enabled .patient-copy form p { font-size: 12px; }
.stage-enabled .patient-promises { margin: 18px 0; }
.stage-enabled .patient-promises>div { margin: 8px 0; }
.stage-enabled .patient-stage { padding-top: 42px; width: 100%; max-width: 350px; margin: 0 auto; }
.stage-enabled .orbit-label { display: none; }
.stage-enabled .orbit-rail { top: 18px; }
.stage-enabled .tracker-phone { min-height: 0; height: 402px; width: 260px; padding: 14px 20px 30px; transform: none; }
.stage-enabled .phone-top { margin-bottom: 12px; }
.stage-enabled .phone-token { margin-top: 8px; padding: 8px 0; }
.stage-enabled .phone-live { margin-top: 10px; }
.stage-enabled #ahead-count { font-size: 60px; margin-top: 4px; }
.stage-enabled .wait-estimate { margin-top: 10px; padding: 8px; }
.stage-enabled .phone-update { margin: 10px 0; }
.stage-enabled .phone-privacy { bottom: 20px; font-size: 9px; }
.stage-enabled .tracker-idle-mark { height: 80px; }
.stage-enabled .queue-controls { margin-top: 16px; gap: 8px; }
.stage-enabled .queue-controls button { min-height: 40px; }
.stage-enabled .queue-controls .icon-button { width: 40px; }
.stage-footer { display: none; }
.stage-enabled .stage-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 32px; border-top: 1px solid #dce0e7; background: #fff; font-size: 12px; color: #6b7180; }
.stage-enabled #stage-progress { font-weight: 600; color: var(--stage-accent); }
.stage-enabled .stage-footer a { padding: 12px 0; color: #343a49; }
@keyframes stage-enter { from { opacity: .3; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@media(min-width:1500px) and (min-height:850px) {
  .stage-enabled .chapter { padding-top: 32px; padding-bottom: 32px; gap: 28px; }
  .stage-enabled .chapter-heading h2 { font-size: 34px; }
  .stage-enabled .reception-content { padding: 26px; }
  .stage-enabled .queue-person { min-height: 58px; }
  .stage-enabled .arrival-form fieldset { margin: 18px 0; }
  .stage-enabled .tracker-phone { height: 450px; width: 280px; }
}
@media(max-width:1100px) {
  .stage-enabled .arrival-stage { grid-template-columns: minmax(0,1fr) 36px 240px; }
  .stage-enabled .queue-preview { display: none; }
  .stage-enabled .registration-layout { grid-template-columns: 1fr; }
  .stage-enabled .demo-label { display: none; }
  .stage-enabled .chapter { padding-left: 24px; padding-right: 24px; }
  .stage-enabled .doctor-sidebar { display: none; }
  .stage-enabled .doctor-layout { grid-template-columns: 1fr; }
  .stage-enabled .heading-bottom p br { display: none; }
}
@media(max-width:700px) {
  .stage-enabled .demo-stage { min-height: 650px; grid-template-rows: 54px minmax(0,1fr) 40px; }
  .stage-enabled .journey-nav { height: 54px; padding: 0 48px 0 8px; gap: 0; justify-content: space-between; }
  .stage-enabled .journey-nav a { font-size: 13px; padding: 0 8px; }
  .stage-enabled .journey-nav a span { display: none; }
  .stage-enabled .journey-nav button { right: 6px; width: 36px; height: 36px; }
  .stage-enabled .chapter { padding: 14px 16px 12px; gap: 12px; }
  .stage-enabled .chapter-heading h2 { font-size: 22px; }
  .stage-enabled .chapter-heading h2 span { display: none; }
  .stage-enabled .heading-bottom { margin-top: 5px; }
  .stage-enabled .heading-bottom p { font-size: 12px; }
  .stage-enabled .arrival-stage { display: flex; flex-direction: column; align-items: stretch; gap: 8px; justify-content: center; }
  .stage-enabled .reception-content { padding: 12px 16px; }
  .stage-enabled .desk-title,.stage-enabled .desk-stats,.stage-enabled .arrival-form h4 { display: none; }
  .stage-enabled .window-bar { height: 40px; }
  .stage-enabled .arrival-form input:not([type]),.stage-enabled .arrival-form select { height: 42px; font-size: 16px; }
  .stage-enabled .form-pair { grid-template-columns: 1fr 1fr; }
  .stage-enabled .arrival-form fieldset { margin: 8px 0; }
  .stage-enabled .form-status { min-height: 30px; }
  .stage-enabled .handoff { height: 3px; width: 100%; margin: 0; }
  .stage-enabled .handoff-label,.stage-enabled .handoff-end { display: none; }
  .stage-enabled .handoff .signal-track { width: 100%; height: 2px; transform: none; top: 0; }
  .stage-enabled .handoff.sending::after { top: -12px; z-index: 4; }
  .stage-enabled .inbox-window { border-top-width: 1px; }
  .stage-enabled .inbox-window .window-bar,.stage-enabled .inbox-footer,.stage-enabled .inbox-body>.tiny-label { display: none; }
  .stage-enabled .inbox-body { min-height: 0; padding: 10px 12px; text-align: left; }
  .stage-enabled .inbox-empty { display: block; padding: 0; }
  .stage-enabled .inbox-empty h4 { font-size: 13px; margin: 0; }
  .stage-enabled .inbox-empty p,.stage-enabled .receiving-mark { display: none; }
  .stage-enabled #inbox-patient { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 2px 8px; align-items: center; }
  .stage-enabled .large-token { font-size: 26px; margin: 0; grid-row: 1 / 3; }
  .stage-enabled .large-token small,.stage-enabled #inbox-patient>p { display: none; }
  .stage-enabled #inbox-patient h4 { font-size: 13px; margin: 0; }
  .stage-enabled .received-status { font-size: 11px; margin: 0; grid-column: 2; }
  .stage-enabled .inbox-body .action { grid-column: 3; grid-row: 1 / 3; width: auto; margin: 0; font-size: 11px!important; min-height: 40px; padding: 8px; gap: 4px; }
  .stage-enabled .inbox-body .action span { display: none; }
  .stage-enabled .case-heading { padding: 12px 14px; }
  .stage-enabled .case-heading h3 { font-size: 18px; }
  .stage-enabled .case-panel { grid-template-columns: 1fr; }
  .stage-enabled .case-navigation { display: none; }
  .stage-enabled .case-notes { padding: 12px 14px; }
  .stage-enabled .case-tabs { padding: 0 6px; }
  .stage-enabled .case-tabs button { font-size: 11px; }
  .stage-enabled .case-bottom { padding: 10px 14px; font-size: 11px; }
  .stage-enabled .case-bottom>span { max-width: 50%; }
  .stage-enabled .speciality-strip { display: block; }
  .stage-enabled .speciality-strip h3 { font-size: 14px; }
  .stage-enabled .speciality-strip p { display: none; }
  .stage-enabled .speciality-strip a { display: inline-block; font-size: 12px; max-width: none; }
  .stage-enabled .tracking { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
  .stage-enabled .patient-copy { width: 100%; }
  .stage-enabled .patient-copy .eyeline,.stage-enabled .patient-copy>p,.stage-enabled .patient-promises { display: none; }
  .stage-enabled .patient-copy h2 { font-size: 22px; margin-bottom: 10px; }
  .stage-enabled .patient-copy h2 br { display: none; }
  .stage-enabled .patient-copy h2 span { display: none; }
  .stage-enabled .patient-copy form { max-width: none; }
  .stage-enabled .patient-copy label { display: none; }
  .stage-enabled .tracker-input { flex-wrap: nowrap; padding-bottom: 5px; gap: 8px; }
  .stage-enabled .tracker-input .action { flex-basis: auto; width: auto; min-height: 40px; }
  .stage-enabled .tracker-input input { min-height: 40px; }
  .stage-enabled .patient-copy form p { margin-top: 6px; min-height: 30px; }
  .stage-enabled .estimate-note { font-size: 10px; line-height: 1.4; max-width: none; }
  .stage-enabled .patient-stage { padding-top: 0; max-width: 350px; }
  .stage-enabled .queue-orbit { display: none; }
  .stage-enabled .tracker-phone { width: 100%; height: 252px; border-width: 3px; border-radius: 18px; padding: 12px 16px 20px; box-shadow: 0 8px 16px -12px #334f4060; }
  .stage-enabled .phone-camera,.stage-enabled .phone-top,.stage-enabled .phone-clinic,.stage-enabled .phone-token,.stage-enabled .phone-live,.stage-enabled .phone-update,.stage-enabled .nearby-note { display: none; }
  .stage-enabled .tracker-phone img { width: 90px; margin-bottom: 4px; }
  .stage-enabled #ahead-count { font-size: 48px; margin: 0; }
  .stage-enabled #ahead-label { font-size: 12px; }
  .stage-enabled .wait-estimate { margin-top: 8px; padding: 6px; }
  .stage-enabled .phone-privacy { font-size: 10px; bottom: 18px; }
  .stage-enabled .tracker-idle-mark { height: 42px; }
  .stage-enabled .tracker-phone h3 { font-size: 20px; }
  .stage-enabled .tracker-phone p { margin-top: 8px; }
  .stage-enabled .queue-controls { margin-top: 8px; }
  .stage-enabled .queue-controls>span { display: none; }
  .stage-enabled .stage-footer { padding: 0 16px; font-size: 11px; }
  .stage-enabled .stage-sample { display: none; }
}
/* Let enlarged text and very short windows reflow instead of clipping controls. */
@media(max-height:650px) {
  .stage-enabled .demo-stage { height: auto; min-height: 650px; }
  .stage-enabled .doctor-workspace { min-height: 360px; }
}
@media(prefers-reduced-motion:reduce) { .stage-enabled .chapter { animation: none; } .stage-enabled .handoff.sending::after { display: none; } }
