/* Demoville Dental scripted replay. Self-hosted fonts only. No inline styles. */
@font-face {
  font-family: "Sora Fallback";
  src: local("Arial");
  size-adjust: 105%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.64%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-head: "Sora", "Sora Fallback", system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, sans-serif;
  --ink: #132824;
  --ink-soft: #3D5852;
  --paper: #F3F7F5;
  --paper-deep: #E4EEEA;
  --white: #FFFCF8;
  --teal: #14685F;
  --teal-deep: #0E4B45;
  --mint: #D7EDE8;
  --miss: #9B2C2C;
  --miss-soft: #F8E8E6;
  --line: #C9D7D2;
  --focus: #C47A12;
  --shadow: 0 18px 40px -28px rgba(19, 40, 36, 0.55);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 12.5rem;
}
@media (min-width: 801px) {
  html { scroll-padding-top: 10.5rem; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #e7f3ef 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
button, a { font: inherit; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 80;
  transform: translateY(-160%);
  background: var(--focus);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { transform: none; }

.top-stack {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 247, 245, 0.96);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
}
.site-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 650;
  font-size: 0.95rem;
}
.site-bar-brand img { width: 22px; height: 22px; }
.site-bar-note {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 650;
}

.demo-label {
  margin: 0 16px 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 550;
}

.control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 0 16px 12px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.controls button {
  min-height: 44px;
  min-width: 88px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--teal-deep);
  background: var(--teal);
  color: var(--white);
  font-weight: 650;
  cursor: pointer;
}
.controls button:hover { background: var(--teal-deep); }
.controls button[disabled] {
  opacity: 0.45;
  cursor: default;
}
#btn-next, #btn-replay {
  background: var(--white);
  color: var(--teal-deep);
  border-color: var(--line);
}
#btn-next:hover, #btn-replay:hover {
  background: var(--mint);
  color: var(--teal-deep);
}
.step-meta {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.progress {
  display: flex;
  gap: 5px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.progress li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.progress li.is-done { background: var(--teal); }
.progress li.is-current { background: var(--ink); transform: scale(1.2); }

.page {
  width: min(1040px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 64px;
}
.stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}
.stage { min-width: 0; }

.phone {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 520px;
}
.phone.is-visible { display: flex; flex-direction: column; }

.phone-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--teal-deep);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.call-body {
  padding: 32px 22px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.call-name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}
.call-copy {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 28ch;
}
.call-mark {
  width: 72px;
  height: 72px;
  margin: 28px 0 16px;
  border-radius: 50%;
  background: var(--miss-soft);
  box-shadow: inset 0 0 0 3px var(--miss);
  position: relative;
}
.call-mark::before,
.call-mark::after {
  content: "";
  position: absolute;
  background: var(--miss);
  border-radius: 2px;
}
.call-mark::before {
  width: 28px;
  height: 3px;
  left: 22px;
  top: 34px;
  transform: rotate(45deg);
}
.call-mark::after {
  width: 28px;
  height: 3px;
  left: 22px;
  top: 34px;
  transform: rotate(-45deg);
}
.caption {
  margin-top: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--miss-soft);
  color: var(--miss);
  font-size: 0.85rem;
  font-weight: 650;
}

.channel-label {
  margin: 0;
  padding: 8px 16px 0;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.thread {
  list-style: none;
  margin: 0;
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.msg {
  display: none;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.95rem;
  scroll-margin-top: 12.5rem;
}
.msg.is-visible { display: block; }
.msg p { margin: 0 0 0.7em; }
.msg p:last-child { margin-bottom: 0; }
.msg-clinic {
  align-self: flex-start;
  background: var(--mint);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.msg-patient {
  align-self: flex-end;
  background: var(--teal);
  color: var(--white);
  border-bottom-right-radius: 6px;
}
.gloss {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--white);
  font-weight: 500;
  opacity: 0.92;
}

.staff-view {
  display: none;
  background: var(--white);
  border: 1px dashed var(--teal);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-top: 0;
  scroll-margin-top: 12.5rem;
}
.staff-view.is-visible { display: block; }
.staff-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
}
.staff-caption {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
}

.clinic-gets {
  margin-top: 40px;
  padding: 8px 4px 0;
  max-width: 62ch;
}
.clinic-gets h1 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.clinic-gets ul {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--ink-soft);
}
.clinic-gets li { margin: 0 0 8px; }

@media (max-width: 800px) {
  .progress { margin-left: 0; width: 100%; }
  .demo-label { font-size: 0.86rem; }
  .phone { min-height: 460px; }
}

@media (max-width: 420px) {
  .controls button { min-width: 0; flex: 1; }
  .site-bar { padding: 0 12px; }
  .demo-label, .control-bar { margin-left: 12px; margin-right: 12px; }
  .control-bar { padding-left: 0; padding-right: 0; }
  .demo-label { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress li.is-current { transform: none; }
}
