/* =================================================================
   MobiDent — AI-Powered Dental Image Analysis
   Landing (index.html, body.landing): dark-blue, glassmorphism,
   editorial serif + Inter, Hummingbird-inspired two-card layout.
   Result page (result.html): light theme, shares components below.
   ================================================================= */

:root {
  /* Brand */
  --brand:        #1f66d0;
  --brand-dark:   #164f9e;
  --brand-darker: #103b78;
  --teal:         #10b3a3;
  --teal-dark:    #0e9689;
  --orange:       #f5871f;

  /* Neutrals / light-theme text (result page + action card) */
  --ink:      #0f294a;
  --text:     #33475b;
  --muted:    #5f7285;
  --line:     #dbe7f4;
  --surface:  #ffffff;
  --surface-2:#f4f9ff;

  --text-primary:   #0f294a;
  --text-secondary: #33475b;
  --text-muted:     #5f7285;
  --accent:         #0c7d70;  /* AA on white (5.0:1) for small teal text */
  --accent-soft:    rgba(16, 179, 163, 0.16);

  /* Dark landing palette */
  --dark-1: #0a2950;
  --dark-2: #0e3c72;
  --dark-3: #12508f;
  --teal-bright: #37e0cf;     /* accent on dark */
  --ink-100: #ffffff;
  --ink-200: #dcebff;         /* soft blue-white */
  --ink-300: #b6cbe6;         /* muted blue-gray (AA on the lightest bg stop) */
  --glass:        rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.16);

  /* Light-theme severity + notices (result page) */
  --mild: #16a34a; --moderate: #d97706; --severe: #dc2626;
  --warn-bg: #fff7ed; --warn-border: #fed7aa; --warn-text: #9a3412;
  --info-bg: #eff6ff; --info-border: #bfdbfe;

  /* Shape & elevation */
  --radius: 16px; --radius-sm: 12px; --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 41, 74, 0.06), 0 2px 8px rgba(15, 41, 74, 0.05);
  --shadow:    0 10px 30px rgba(19, 66, 130, 0.10), 0 2px 8px rgba(19, 66, 130, 0.06);
  --shadow-lg: 0 24px 60px rgba(12, 42, 84, 0.18);
  --shadow-dark: 0 30px 70px rgba(3, 15, 35, 0.5);

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --font-serif: var(--font); /* Inter across the whole UI for consistency */
  /* Distinctive editorial display face for headlines (Skill.md #1). */
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  /* Light background for the result page. */
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(16, 179, 163, 0.10), transparent 60%),
    radial-gradient(760px 560px at -6% 108%, rgba(31, 102, 208, 0.12), transparent 55%),
    linear-gradient(180deg, #f5faff 0%, #e7f1fc 100%);
  background-attachment: fixed;
}

img { max-width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

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

a:focus-visible, button:focus-visible, .choice:focus-within, [tabindex]:focus-visible {
  outline: 3px solid rgba(55, 224, 207, 0.7);
  outline-offset: 2px; border-radius: 8px;
}

/* -----------------------------------------------------------------
   Decorative background layer (subtle). Positioned dental SVGs on the
   result page use the .decor-* classes; empty on the landing.
   ----------------------------------------------------------------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-decor::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(31, 102, 208, 0.10) 1.2px, transparent 1.4px);
  background-size: 30px 30px; opacity: 0.5;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 25%, transparent 72%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 25%, transparent 72%);
}
.bg-decor svg { position: absolute; color: var(--brand); opacity: 0.10; }
.decor-tooth       { bottom: 4%; left: 2%;  width: 84px;  height: 84px; }
.decor-van         { bottom: 3%; right: 4%; width: 110px; height: 110px; }
.decor-house       { bottom: 9%; right: 26%; width: 64px; height: 64px; }
.decor-heartbeat   { bottom: 12%; left: 30%; width: 150px; height: 56px; }
.decor-tooth-badge { top: 20%; right: 6%;  width: 60px;  height: 60px; }
.decor-plus-1      { top: 14%; right: 18%; width: 30px;  height: 30px; }
.decor-plus-2      { top: 40%; right: 12%; width: 24px;  height: 24px; }
.decor-phone       { top: 30%; left: 3%;  width: 64px;  height: 100px; }
@media (max-width: 560px) {
  .decor-van, .decor-house, .decor-heartbeat, .decor-phone { display: none; }
  .decor-tooth { width: 60px; height: 60px; }

  /* Landing (mobile): dental icons appear ONLY in safe empty spots —
     a small sparkle-tooth in the top-right corner, miniature teeth in
     the bottom corners, the heart behind the phone, and the van at the
     very bottom. Hide the ones that would sit near the hero/card text. */
  body.landing .decor-house,
  body.landing .decor-tooth-badge,
  body.landing .decor-plus-1,
  body.landing .decor-plus-2,
  body.landing .decor-phone { display: none; }

  /* Small sparkle-tooth in the top-right corner (safe empty space). */
  body.landing .decor-sparkle { display: block; top: 1.5%; right: 2%; left: auto; width: 46px; opacity: 0.16; }

  /* Miniature teeth in the empty bottom corners of the page. */
  body.landing .decor-tooth { display: block; bottom: 7%; left: 5%;  width: 44px; opacity: 0.16; }
  body.landing .decor-care  { display: block; bottom: 6%; right: 5%; width: 52px; opacity: 0.16; top: auto; }

  /* Heartbeat "scan wave" behind the middle of the phone showcase. */
  body.landing .decor-heartbeat {
    display: block;
    top: 60%; bottom: auto; left: 50%; right: auto;
    width: 230px; transform: translateX(-50%); opacity: 0.9;
  }

  /* Background van hidden on mobile too (home-visit scene shows instead). */
  body.landing .decor-van { display: none; }
}

/* .brand-bar excluded: it uses position:sticky (relative would break it). */
.container, .stage { position: relative; z-index: 1; }

/* =================================================================
   LOGO  (action card + result.html .brand-bar)
   ================================================================= */
/* Result-page brand bar: sticks to the top while the page scrolls. */
.brand-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: clamp(10px, 2vw, 16px) clamp(16px, 4vw, 40px);
  background: rgba(245, 250, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.logo-img { height: clamp(48px, 5vw, 62px); width: auto; display: block; }

/* =================================================================
   DARK LANDING SHELL
   ================================================================= */
body.landing {
  color: var(--ink-200);
  /* Layered gradient mesh for depth + atmosphere (Skill.md #2). */
  background:
    radial-gradient(1200px 760px at 82% -4%, rgba(55, 224, 207, 0.22), transparent 56%),
    radial-gradient(760px 620px at 100% 40%, rgba(16, 179, 163, 0.14), transparent 60%),
    radial-gradient(1000px 860px at 2% 104%, rgba(31, 102, 208, 0.34), transparent 56%),
    radial-gradient(900px 900px at 50% 130%, rgba(6, 20, 44, 0.55), transparent 60%),
    linear-gradient(155deg, #0a2950 0%, #0e3c72 50%, #12508f 100%);
  background-attachment: fixed;
}
/* Fine grain/noise overlay — adds a premium texture over the flat gradient.
   Sits above the background, below all content; never blocks clicks. */
body.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
/* Keep real content above the grain layer. (Header excluded: it must keep
   position:sticky, and it already sits above the grain via its own z-index.) */
body.landing .stage { position: relative; z-index: 1; }
body.landing .bg-decor::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1.1px, transparent 1.3px);
  opacity: 0.35;
}

/* -----------------------------------------------------------------
   Dental line-art decor on the dark landing. Faint white / teal so it
   blends into the background; a few restrained motions.
   ----------------------------------------------------------------- */
body.landing .bg-decor svg { color: #ffffff; }

/* Bigger, clearly visible line-art tuned to blend with the dark bg. */
body.landing .decor-plus-1      { top: 8%;   right: 33%;   width: 26px;  height: auto; opacity: 0.14; }
body.landing .decor-plus-2      { top: 42%;  right: 1.5%;  width: 20px;  height: auto; opacity: 0.14; }
body.landing .decor-tooth-badge { top: 56%;  right: 1.5%;  width: 80px;  height: auto; opacity: 0.13; }
/* Sparkle-tooth pinned to the top-right corner of the page. */
body.landing .decor-sparkle     { top: 3%;   right: 2%;    width: 76px;  height: auto; opacity: 0.15; }
/* Phone-with-tooth decor removed (it overlapped the hero sub-header). */
body.landing .decor-phone       { display: none; }
body.landing .decor-care        { top: 50%;  left: 1.5%;   width: 98px;  height: auto; opacity: 0.14; }
body.landing .decor-tooth       { bottom: 24%; left: 3%;   width: 104px; height: auto; opacity: 0.13; }
body.landing .decor-house       { bottom: 8%; right: 8%;   width: 82px;  height: auto; opacity: 0.13; }

/* Van drives across the whole bottom, left → right. */
/* Background van/house replaced by the contained "home visit" scene
   at the bottom of the showcase card, so hide them here. */
body.landing .decor-van,
body.landing .decor-house { display: none; }

/* Plus signs twinkle. */
body.landing .decor-plus-1, body.landing .decor-plus-2 { animation: decor-twinkle 4.5s ease-in-out infinite; }
body.landing .decor-plus-2 { animation-delay: 1.3s; }
@keyframes decor-twinkle { 0%, 100% { opacity: 0.06; } 50% { opacity: 0.20; } }

/* Shield tooth gently pulses (protection). */
body.landing .decor-tooth-badge { transform-origin: 32px 32px; animation: decor-pulse 5s ease-in-out infinite; }
@keyframes decor-pulse { 0%, 100% { transform: scale(1); opacity: 0.12; } 50% { transform: scale(1.06); opacity: 0.18; } }

/* Sparkle tooth: a star twinkling ABOVE the tooth + a small accent star. */
body.landing .decor-sparkle .spark-a { transform-origin: 30px 9px; animation: spark-twinkle 2.4s ease-in-out infinite; }
body.landing .decor-sparkle .spark-b { transform-origin: 47px 18px; animation: spark-twinkle 2.4s ease-in-out infinite 1.2s; }
@keyframes spark-twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.5); } 50% { opacity: 1; transform: scale(1); } }

/* Slow float for the big tooth, phone, and the tooth-in-hand care icon. */
body.landing .decor-tooth { animation: decor-float 8s ease-in-out infinite; }
body.landing .decor-phone { animation: decor-float 9s ease-in-out infinite 1s; }
body.landing .decor-care  { animation: decor-float 7.5s ease-in-out infinite 0.5s; }
@keyframes decor-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Top header — MobiDent logo (highlighted) + tagline on one line.
   Sticks to the top so the logo stays visible while the page scrolls. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 41, 80, 0.72);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(10px, 1.6vw, 16px) clamp(18px, 4vw, 44px);
}
.site-header .logo-img { height: clamp(50px, 5vw, 66px); width: auto; display: block; }
.header-divider { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.22); }
.header-tag {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-200);
}

.stage {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 30px) clamp(20px, 5vw, 72px) clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.4vw, 40px);
}

/* -----------------------------------------------------------------
   Orchestrated page-load: staggered reveals (Skill.md #4).
   header -> badge -> title -> subtext -> showcase -> action card.
   ----------------------------------------------------------------- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
/* NOTE: the sticky header is intentionally EXCLUDED from this animation.
   A transform (used by reveal-up) turns a sticky element into its own
   containing block and breaks position:sticky — so the header would
   scroll away. Animate only the inner content; keep the header sticky. */
body.landing .hero-badge,
body.landing .hero-title,
body.landing .hero-sub,
body.landing .showcase,
body.landing .action-card {
  opacity: 0;
  animation: reveal-up 0.7s cubic-bezier(.2, .7, .3, 1) both;
}
body.landing .hero-badge  { animation-delay: 0.12s; }
body.landing .hero-title  { animation-delay: 0.24s; }
body.landing .hero-sub    { animation-delay: 0.38s; }
body.landing .action-card { animation-delay: 0.52s; }
body.landing .showcase    { animation-delay: 0.64s; }

@media (prefers-reduced-motion: reduce) {
  body.landing .hero-badge,
  body.landing .hero-title,
  body.landing .hero-sub,
  body.landing .showcase,
  body.landing .action-card { opacity: 1; animation: none; }
}

/* Centered hero block. */
.hero-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-bright);
  background: rgba(55, 224, 207, 0.10);
  border: 1px solid rgba(55, 224, 207, 0.38);
  box-shadow: 0 0 0 4px rgba(55, 224, 207, 0.06);
  padding: 7px 15px; border-radius: 999px;
}
.badge-spark { width: 13px; height: 13px; flex: none; }
.tag-spark { width: 11px; height: 11px; flex: none; }

/* Two equal columns below the hero. */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;   /* both cards share the same height */
  gap: clamp(24px, 3vw, 44px);
}
/* Desktop: phone showcase left, upload panel right (DOM order unchanged). */
.showcase { order: 1; }
.action-card { order: 2; }

/* Shared editorial eyebrow */
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

/* =================================================================
   LEFT — SHOWCASE (glass, dark)
   ================================================================= */
.showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 18px);
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid transparent;
  /* Layered depth: soft ambient + tight contact + inner top highlight. */
  box-shadow:
    0 28px 60px rgba(3, 15, 35, 0.45),
    0 6px 16px rgba(3, 15, 35, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  overflow: hidden;
}
/* Refined gradient hairline border (teal→blue), drawn via mask. */
.showcase::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(55,224,207,0.55), rgba(255,255,255,0.12) 40%, rgba(31,102,208,0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* soft accent glow inside the card */
.showcase::before {
  content: ""; position: absolute; z-index: 0;
  top: -30%; right: -20%; width: 60%; height: 70%;
  background: radial-gradient(circle, rgba(55,224,207,0.22), transparent 70%);
  pointer-events: none;
}
.showcase > * { position: relative; z-index: 1; }

.showcase-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-200);
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 6px 12px; border-radius: 999px;
  /* Keep each pill's text on a single line — never wrap "AI Analysis"
     onto two lines inside the pill (looked broken on mobile). */
  white-space: nowrap; flex: 0 0 auto;
}
.tag b { color: #fff; }
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 8px var(--teal-bright); }
.tag-ai { color: var(--teal-bright); }

/* Media area: phone on the left, glass "how it works" panel beside it so
   the full phone screen stays visible. */
.showcase-media {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;                 /* lets the CTA wrap to a full row below */
  gap: clamp(10px, 1.6vw, 18px);
  min-height: clamp(280px, 34vh, 360px);
  padding: var(--s-2) 0;
}

/* Glass "how it works" panel — beside the phone (only slightly overlapping). */
.glass-panel {
  position: relative;
  flex: 0 1 236px;
  align-self: center;
  margin-left: -14px;      /* small graceful overlap onto the phone edge */
  width: auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(11, 33, 61, 0.62);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 30px rgba(3, 15, 35, 0.4);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  animation: floaty 6s ease-in-out infinite;
  z-index: 3;
}
.glass-eyebrow {
  margin: 0 0 10px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-bright);
}
.glass-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.glass-steps li { display: flex; align-items: flex-start; gap: 10px; }
.gs-num {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #06323b;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
}
.gs-text { display: flex; flex-direction: column; line-height: 1.25; }
.gs-text b { font-size: 0.84rem; color: #fff; font-weight: 700; }
.gs-text span { font-size: 0.72rem; color: var(--ink-300); }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* (Stats chips removed — they duplicated the action card; caption carries
   the current view and the "How it works" panel explains the process.) */

/* Caption carousel */
.showcase-caption {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.caption-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.sc-title {
  margin: 2px 0 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  letter-spacing: -0.01em;
  color: #fff;
  transition: opacity 0.22s ease;
}
.sc-desc {
  margin: 0;
  max-width: 48ch;
  font-family: var(--font);
  font-size: clamp(0.85rem, 0.82rem + 0.15vw, 0.94rem);
  line-height: 1.5;
  color: var(--ink-300);
  transition: opacity 0.22s ease;
}
.dots { display: flex; gap: 8px; margin-top: 6px; }
/* Thin visual bar, but a full 44px-tall transparent hit area around it. */
.dots button {
  width: 26px; height: 44px; padding: 0; border: none; cursor: pointer;
  background: transparent;
  display: inline-flex; align-items: center;
  transition: width 0.25s ease;
}
.dots button::before {
  content: ""; display: block; width: 100%; height: 5px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.25);
  transition: background 0.25s ease;
}
.dots button.on { width: 34px; }
.dots button.on::before { background: var(--teal-bright); }

/* "Home visit" scene — fills the empty band at the bottom of the showcase.
   A van drives a dotted route toward a house-with-tooth. */
.home-visit {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hv-scene { width: 100%; max-width: 340px; height: auto; color: rgba(255, 255, 255, 0.5); overflow: visible; }
.hv-route { opacity: 0.4; }
.hv-house { color: rgba(255, 255, 255, 0.45); }
.hv-house .hv-tooth { fill: var(--teal-bright); opacity: 0.85; }
.hv-van { color: #ffffff; opacity: 0.85; }
.hv-van .hv-van-tooth { fill: var(--teal-bright); }
/* Van drives left → right, then loops. Stops short of the house. */
.hv-van { animation: hv-drive 6.5s ease-in-out infinite; }
@keyframes hv-drive {
  0%   { transform: translateX(0); opacity: 0; }
  8%   { opacity: 0.85; }
  85%  { transform: translateX(210px); opacity: 0.85; }
  100% { transform: translateX(210px); opacity: 0; }
}
/* Tooth on the house gives a gentle "arrived" pulse each loop. */
.hv-house .hv-tooth { transform-origin: 285px 56px; animation: hv-pulse 6.5s ease-in-out infinite; }
@keyframes hv-pulse {
  0%, 78% { transform: scale(1); opacity: 0.6; }
  88%     { transform: scale(1.25); opacity: 1; }
  100%    { transform: scale(1); opacity: 0.6; }
}
.hv-label {
  margin: 0;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-300);
}

/* =================================================================
   RIGHT — ACTION CARD (light glass)
   ================================================================= */
.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.8vw, 22px);
  padding: clamp(24px, 2.8vw, 40px);
  border-radius: var(--radius-lg);
  /* Very soft top-down sheen on the white surface for subtle depth. */
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  /* Layered elevation: broad ambient lift + crisp inner top highlight. */
  box-shadow:
    0 30px 64px rgba(6, 24, 54, 0.30),
    0 8px 20px rgba(6, 24, 54, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--text);
  overflow: hidden;
}
/* Faint teal glow bleeding in from the top-right, echoing the showcase. */
.action-card::before {
  content: ""; position: absolute; z-index: 0;
  top: -40%; right: -25%; width: 65%; height: 70%;
  background: radial-gradient(circle, rgba(16, 179, 163, 0.10), transparent 70%);
  pointer-events: none;
}
.action-card > * { position: relative; z-index: 1; }
.action-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--ink-100);
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
/* "AI-Powered" — sharp teal accent in an expressive italic display cut. */
.hero-accent { font-style: italic; font-weight: 600; color: var(--teal-bright); }

.hero-sub {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--ink-200);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.6;
}

/* Form */
#upload-form { display: flex; flex-direction: column; gap: var(--s-3); }

.step-label {
  display: flex; align-items: center; gap: var(--s-2);
  margin: var(--s-1) 0 0; font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 0.78rem; font-weight: 700; flex: none;
}

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.choice {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: var(--s-1); min-height: 128px; padding: var(--s-4) var(--s-3);
  text-align: center; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease, background .15s ease;
}
.choice:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 26px rgba(31, 102, 208, 0.18), 0 0 0 4px rgba(31, 102, 208, 0.08);
  transform: translateY(-2px);
}
/* Icon tile lifts + brightens on hover for a tactile feel. */
.choice:hover .choice-icon { background: #dcecff; transform: scale(1.06); }
.choice-icon { transition: background .15s ease, transform .15s ease; }
.choice.is-active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 0 0 3px rgba(31, 102, 208, 0.14), var(--shadow-sm);
}
.choice-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: #e9f2fe; color: var(--brand); margin-bottom: var(--s-1);
}
.choice-icon svg { width: 26px; height: 26px; }
.choice-title { font-weight: 700; font-size: 0.98rem; color: var(--text-primary); line-height: 1.25; }
.choice-sub   { font-size: 0.8rem; color: var(--text-muted); }
.choice-formats { display: block; margin-top: 3px; font-size: 0.72rem; color: var(--text-muted); opacity: 0.85; }
.choice-check {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--brand); color: #fff;
  display: none; align-items: center; justify-content: center;
}
.choice-check svg { width: 14px; height: 14px; }
.choice.is-active .choice-check { display: flex; }

/* Single combined "take or upload" control — horizontal card. */
.choice-single {
  flex-direction: row;
  align-items: center;
  text-align: left;
  min-height: 0;
  gap: var(--s-3);
  padding: var(--s-6) var(--s-4);
}
.choice-single .choice-icon { margin-bottom: 0; flex: none; }
.choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-single .choice-check { top: 50%; right: 12px; transform: translateY(-50%); }

/* Analyze is the full-width primary CTA. */
.btn-analyze { width: 100%; }
/* Analyze Image: deep navy that matches the dark landing background, with a
   subtle teal edge that intensifies into a glow on press/tap. Scoped to the
   landing analyze button so result-page primary buttons are unaffected. */
body.landing .btn-analyze:not(:disabled) {
  background: linear-gradient(160deg, #143a6b 0%, #0e2c52 100%);
  border: 1px solid rgba(55, 224, 207, 0.45);
  box-shadow: 0 10px 24px rgba(6, 24, 54, 0.38),
              0 0 0 3px rgba(55, 224, 207, 0.06),
              0 0 18px rgba(55, 224, 207, 0.18);
}
body.landing .btn-analyze:not(:disabled):hover {
  box-shadow: 0 16px 32px rgba(6, 24, 54, 0.46),
              0 0 0 4px rgba(55, 224, 207, 0.16),
              0 0 26px rgba(55, 224, 207, 0.36);
}
/* Teal glow edges on click / tap. */
body.landing .btn-analyze:not(:disabled):active {
  transform: translateY(0);
  border-color: rgba(55, 224, 207, 0.9);
  box-shadow: 0 6px 18px rgba(6, 24, 54, 0.40),
              0 0 0 4px rgba(55, 224, 207, 0.28),
              0 0 30px rgba(55, 224, 207, 0.55);
}
body.landing .btn-analyze:not(:disabled):focus-visible {
  outline: none;
  border-color: rgba(55, 224, 207, 0.9);
  box-shadow: 0 10px 24px rgba(6, 24, 54, 0.38),
              0 0 0 4px rgba(55, 224, 207, 0.30),
              0 0 26px rgba(55, 224, 207, 0.42);
}

/* Photo tips — subtle, modest text link with a small lightbulb + an
   understated animated underline on hover/focus. */
.btn-tips {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  margin-top: calc(-1 * var(--s-1));
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease;
}
.btn-tips-icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.btn-tips span { position: relative; }
.btn-tips span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* Teal underline reveals on hover (pointer), tap (:active — fires on touch),
   or keyboard focus. Not shown at rest. */
.btn-tips:hover,
.btn-tips:active,
.btn-tips:focus-visible { color: var(--accent); }
.btn-tips:hover span::after,
.btn-tips:active span::after,
.btn-tips:focus-visible span::after { opacity: 0.55; transform: scaleX(1); }

.selected {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.selected[hidden] { display: none; }
.selected-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.selected-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.selected-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent); }
.selected-name { font-size: 0.92rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-remove {
  flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 10px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.selected-remove svg { width: 18px; height: 18px; }
.selected-remove:hover { color: var(--severe); border-color: #f3c9c9; background: #fff5f5; }

.field-error {
  display: flex; align-items: flex-start; gap: var(--s-2); margin: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm); color: var(--warn-text); font-size: 0.9rem; font-weight: 500;
}
.field-error[hidden] { display: none; }

.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 50px; padding: 14px 30px;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: #fff;
  text-decoration: none; cursor: pointer; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 10px 22px rgba(31, 102, 208, 0.30);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease, filter .16s ease;
}
/* A soft light sweep that glides across on hover. */
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); opacity: 0;
  transition: none;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  /* dual glow: brand depth + teal accent halo */
  box-shadow: 0 16px 32px rgba(31, 102, 208, 0.40), 0 0 0 4px rgba(55, 224, 207, 0.14);
}
.btn-primary:hover:not(:disabled)::after {
  opacity: 1;
  animation: btn-sheen 0.7s ease forwards;
}
@keyframes btn-sheen { from { left: -60%; } to { left: 120%; } }
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after { display: none; }
  .btn-primary:hover:not(:disabled),
  .choice:hover, .choice:hover .choice-icon, .pill:hover { transform: none; }
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { cursor: not-allowed; background: #d7e1ec; color: #4f5f73; box-shadow: none; transform: none; }
.btn-primary.is-loading { cursor: progress; filter: saturate(0.9); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 13px 22px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; color: var(--brand-dark);
  cursor: pointer; background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color .15s ease, background .15s ease;
}
.btn-ghost:hover { border-color: var(--brand); background: rgba(31, 102, 208, 0.06); }

/* ---- Analyzing state: animated "Analyzing" pill + subtitle ----
   Dental Lottie animation + "Analyzing… this may take a few seconds." */
.analyzing-note {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  margin: var(--s-4) 0 0; text-align: center;
}
.analyzing-note[hidden] { display: none; }

.analyzing-anim {
  width: 96px;
  height: 96px;
  display: block;
}

.analyzing-sub { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.analyzing-sub b { font-weight: 700; color: var(--brand-dark); }

@media (prefers-reduced-motion: reduce) {
  .analyzing-anim { display: none; }  /* no looping motion for reduced-motion */
}

.flash {
  display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-3) var(--s-4);
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius-sm); color: var(--warn-text);
}
.flash-icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.flash p { margin: 2px 0; font-size: 0.92rem; }

/* Push the trust chips + disclaimer toward the bottom so the taller
   (stretched) action card fills its height gracefully. */
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin: auto 0 0; padding: 0; list-style: none; }
.pill {
  display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--brand-dark); background: rgba(31, 102, 208, 0.06);
  border: 1px solid rgba(31, 102, 208, 0.16); padding: 5px 12px; border-radius: 999px;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.pill:hover {
  transform: translateY(-1px);
  background: rgba(16, 179, 163, 0.10);
  border-color: rgba(16, 179, 163, 0.35);
}
.disclaimer { margin: var(--s-1) auto 0; font-size: 0.82rem; line-height: 1.55; color: var(--text-muted); max-width: 56ch; text-align: center; }

/* Care model block — fills the action card's lower space and explains
   MobiDent's mobile-dentistry service. Static content, no JS. */
.care-model {
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  text-align: center;
}
.care-eyebrow {
  margin: 0 0 var(--s-2);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.care-title {
  margin: 0 0 var(--s-6);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.45rem, 1.1rem + 1.1vw, 1.9rem);
  letter-spacing: -0.005em;
  color: var(--text-primary);
}
/* Elegant accent on "you": italic + soft underline sweep. */
.care-title em {
  position: relative;
  font-style: italic;
  color: var(--accent);
  padding: 0 2px;
}
.care-title em::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  transform: scaleX(0); transform-origin: left;
  animation: care-underline 0.7s ease 0.3s forwards;
}
@keyframes care-underline { to { transform: scaleX(1); } }

/* Three steps, connected by arrows. */
.care-journey {
  list-style: none;
  margin: 0 0 var(--s-4);
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.5vw, 14px);
}
.care-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* staggered entrance */
  opacity: 0;
  transform: translateY(14px);
  animation: care-in 0.55s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: calc(0.15s + var(--i) * 0.18s);
}
@keyframes care-in { to { opacity: 1; transform: none; } }

/* Circular icon tile — sits on the LIGHT action card, so use a soft
   blue tint with the brand-blue icon for clear contrast. */
.care-visual {
  position: relative;
  width: clamp(64px, 20vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 20%, #eaf3fe, #dbeafe);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(19,66,130,0.12);
  color: var(--brand);
  animation: care-float 4.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.6s);
}
@keyframes care-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.care-ic { width: 46%; height: 46%; }
.care-ic-van { width: 62%; }

/* Numbered badge on each tile. */
.care-badge {
  position: absolute; top: -4px; left: -4px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #06323b;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal));
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.care-name {
  font-size: clamp(0.78rem, 0.72rem + 0.2vw, 0.9rem);
  font-weight: 700;
  color: var(--text-primary);
}

/* Connecting arrows between steps. */
.care-arrow {
  flex: 0 0 auto;
  align-self: center;
  margin-top: clamp(24px, 8vw, 34px);
  color: var(--brand);
  opacity: 0;
  animation: care-arrow-in 0.5s ease forwards;
}
.care-arrow svg { width: 18px; height: 18px; display: block; }
.care-journey .care-arrow:nth-of-type(2) { animation-delay: 0.45s; }
.care-journey .care-arrow:nth-of-type(4) { animation-delay: 0.63s; }
@keyframes care-arrow-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 0.7; transform: none; } }

/* Scan sweep inside the "Analyze" tile. */
.care-step:nth-child(1) .care-visual::after {
  content: "";
  position: absolute; left: 14%; right: 14%; top: 32%;
  height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  box-shadow: 0 0 8px 1px rgba(55,224,207,0.6);
  animation: care-scan 2.6s ease-in-out infinite;
}
@keyframes care-scan { 0%,100% { top: 30%; opacity: .4; } 50% { top: 62%; opacity: 1; } }

/* "We come to you" van gets a gentle forward nudge. */
.care-step:nth-child(5) .care-visual { animation: care-float 4.5s ease-in-out infinite, care-drive 3.4s ease-in-out infinite; }
@keyframes care-drive { 0%,100% { margin-left: 0; } 50% { margin-left: 5px; } }

.care-note {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .care-step, .care-arrow { opacity: 1; transform: none; animation: none; }
  .care-title em::after { transform: scaleX(1); animation: none; }
  .care-visual { animation: none; }
  .care-step:nth-child(1) .care-visual::after { animation: none; opacity: .6; }
}

/* =================================================================
   PHONE SCANNER (inside the showcase media)
   ================================================================= */
.phone {
  position: relative;
  width: clamp(156px, 15vw, 178px);
  aspect-ratio: 1 / 2.02;
  background: linear-gradient(165deg, #0e2c52 0%, #123f70 100%);
  border-radius: 42px; padding: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 44px rgba(55, 224, 207, 0.12);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 54px; height: 6px; background: rgba(255,255,255,0.35); border-radius: 999px; z-index: 2; }

.phone-screen {
  position: relative; width: 100%; height: 100%;
  background: linear-gradient(180deg, #f5fbff 0%, #e4f1fc 100%);
  border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column; padding: 20px 14px 14px; gap: 8px;
}
.ui-top { display: flex; align-items: center; gap: 8px; }
.ui-logo { height: 26px; width: auto; display: block; border-radius: 6px; }
.ui-badge {
  flex: none; width: 27px; height: 27px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(31,102,208,0.35);
}
.ui-badge svg { width: 16px; height: 16px; color: #fff; }
.ui-brand { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.ui-name { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.ui-name .b-mobi { color: var(--brand); }
.ui-name .b-dent { color: var(--orange); }
.ui-tag { font-size: 8px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); margin-top: 2px; }

.ui-center { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.scan-frame { position: relative; width: 62%; aspect-ratio: 1; }

/* In-phone view name, synced to the current stage. */
.scan-view-label {
  margin: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 0.01em;
  color: var(--brand-dark);
  text-align: center;
  transition: opacity 0.2s ease;
}
#scan-ui.is-complete .scan-view-label { opacity: 0; }
.scan-views { position: absolute; inset: 0; }
.scan-view { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(0.96); transition: opacity 0.4s ease, transform 0.4s ease; }
#scan-ui[data-view="0"] .scan-view:nth-child(1),
#scan-ui[data-view="1"] .scan-view:nth-child(2),
#scan-ui[data-view="2"] .scan-view:nth-child(3) { opacity: 1; transform: scale(1); }
.scan-view .gum   { stroke: #c2ddf6; stroke-width: 13; stroke-linecap: round; }
.scan-view .teeth { stroke: #ffffff; stroke-linecap: round; }
.teeth-front { stroke-width: 9;  stroke-dasharray: 0.5 12; }
.teeth-arch  { stroke-width: 10; stroke-dasharray: 0.5 14; }

.scan-line {
  position: absolute; left: 6%; right: 6%; top: 12%; height: 2.5px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  box-shadow: 0 0 8px 1px rgba(16, 179, 163, 0.5); opacity: 0; transition: opacity 0.3s ease;
}
#scan-ui.is-scanning .scan-line { opacity: 1; animation: scan-sweep 1.9s ease-in-out infinite; }
@keyframes scan-sweep { 0% { top: 12%; } 50% { top: 86%; } 100% { top: 12%; } }

.markers { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; }
#scan-ui.is-scanning .markers { opacity: 1; }
.marker { position: absolute; width: 16px; height: 16px; color: var(--teal); opacity: 0; transform: scale(0.7); }
.marker svg { width: 100%; height: 100%; }
#scan-ui.is-scanning .marker { animation: marker-pop 2.6s ease-in-out infinite; }
.m1 { top: 24%; left: 20%; animation-delay: 0.2s; }
.m2 { top: 48%; left: 60%; animation-delay: 1s; }
.m3 { top: 64%; left: 34%; animation-delay: 1.7s; }
@keyframes marker-pop { 0%,100% { opacity: 0; transform: scale(0.7); } 16%,60% { opacity: 0.9; transform: scale(1); } 78% { opacity: 0; transform: scale(0.9); } }

.scan-success {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; padding: 0 6px; text-align: center;
  opacity: 0; transform: scale(0.9); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none;
}
.success-title, .success-sub { max-width: 100%; }
#scan-ui.is-complete .scan-success { opacity: 1; transform: scale(1); }
#scan-ui.is-complete .scan-views, #scan-ui.is-complete .scan-line, #scan-ui.is-complete .markers { opacity: 0; }
.success-check {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(16,179,163,0.4);
}
#scan-ui.is-complete .success-check { animation: success-pop 0.4s ease; }
@keyframes success-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.success-check svg { width: 22px; height: 22px; color: #fff; }
.success-title { font-size: 11px; font-weight: 800; color: var(--ink); }
.success-sub { font-size: 8.5px; color: var(--muted); }

.ui-bottom { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.scan-status { margin: 0; min-height: 14px; font-size: 10.5px; font-weight: 700; color: var(--brand-dark); text-align: center; line-height: 1.3; }
.scan-status span { transition: opacity 0.2s ease; }
#scan-ui.is-complete .scan-status { opacity: 0; }
.scan-dots { display: flex; gap: 6px; }
.scan-dots span { width: 6px; height: 6px; border-radius: 50%; background: #c2d3e4; transition: background 0.3s ease, transform 0.3s ease; }
.scan-dots span.on { background: var(--teal); transform: scale(1.15); }
#scan-ui.is-static .scan-line, #scan-ui.is-static .markers, #scan-ui.is-static .scan-success { opacity: 0 !important; }

/* =================================================================
   IMAGE SOURCE POPUP (camera / gallery)
   ================================================================= */
.choice-caret { width: 20px; height: 20px; color: var(--muted); flex: none; margin-left: auto; }
.choice-single { width: 100%; text-align: left; font-family: inherit; }

.sheet-overlay {
  position: fixed; inset: 0; z-index: 65; display: flex;
  align-items: center; justify-content: center; padding: var(--s-4);
  background: rgba(6, 22, 44, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.sheet-overlay[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 440px;
  background: #fff; color: var(--text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3vw, 24px);
  animation: sheet-in 0.2s ease;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-4); }
.sheet-head h2 { margin: 0; font-size: 1.1rem; color: var(--ink); }
.sheet-close {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: none; background: #f1f5fb; color: var(--muted); border-radius: 10px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sheet-close svg { width: 18px; height: 18px; }
.sheet-close:hover { background: #e6edf6; color: var(--ink); }
.sheet-options { display: flex; flex-direction: column; gap: var(--s-3); }
.sheet-note { margin: var(--s-4) 0 0; text-align: center; font-size: 0.8rem; color: var(--muted); }
.src-option {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: var(--s-4); text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius);
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.src-option:hover { border-color: var(--brand); background: #eef6ff; transform: translateY(-1px); }
.src-icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #e9f2fe; color: var(--brand);
}
.src-icon svg { width: 26px; height: 26px; }
.src-text { display: flex; flex-direction: column; line-height: 1.3; }
.src-text b { font-size: 0.98rem; font-weight: 700; color: var(--ink); }
.src-text span { font-size: 0.82rem; color: var(--text-muted); }

/* =================================================================
   PHOTO TIPS MODAL
   ================================================================= */
.tips-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: var(--s-4); background: rgba(6, 22, 44, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.tips-overlay[hidden] { display: none; }
.tips-modal {
  position: relative; width: 100%; max-width: 580px; max-height: 88vh; overflow-y: auto;
  padding: clamp(20px, 4vw, 32px); background: #fff; color: var(--text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); -webkit-overflow-scrolling: touch;
}
.tips-modal h2 { margin: 0 0 var(--s-4); padding: 0 40px; text-align: center; color: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); }
.tips-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border: none;
  background: #f1f5fb; color: var(--muted); border-radius: 10px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tips-close svg { width: 20px; height: 20px; }
.tips-close:hover { background: #e6edf6; color: var(--ink); }
.angles { margin: 0 0 var(--s-4); }
.angles img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: block; }
.angles figcaption { margin-top: var(--s-2); font-size: 0.85rem; color: var(--muted); text-align: center; }
.tips { margin: 0; padding: 0; list-style: none; }
.tips li { position: relative; padding-left: 30px; margin: var(--s-3) 0; font-size: 0.94rem; line-height: 1.55; }
.tips li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #e0f5f2;
}
.tips li::after { content: "\2713"; position: absolute; left: 4px; top: 1px; font-size: 0.8rem; font-weight: 800; color: var(--teal-dark); }
.tips li strong { color: var(--ink); font-weight: 700; }

/* =================================================================
   RESULT PAGE (result.html — light theme)
   ================================================================= */
.container { max-width: 720px; margin: 0 auto; padding: var(--s-4) clamp(16px, 4vw, 24px) var(--s-12); }
.page-header { text-align: center; padding: var(--s-6) 0 var(--s-2); }
.page-header h1 { margin: 0 0 var(--s-2); color: var(--ink); font-family: var(--font-serif); font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.1rem); font-weight: 500; letter-spacing: -0.01em; }
.subtitle { margin: 0 auto; max-width: 46ch; color: var(--muted); font-size: 0.98rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 24px); margin: var(--s-4) 0; }
.card h2 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: 1.14rem; color: var(--ink); }
.card h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
.notice-warning { background: var(--warn-bg); border-color: var(--warn-border); }
.notice-warning h2 { color: var(--warn-text); }
.notice-warning h2::before { background: var(--moderate); }
.notice-info { background: var(--info-bg); border-color: var(--info-border); }
.notice-info h2::before { background: var(--brand); }

/* Result-page "home visit" invitation card (teal accent). */
.care-cta { background: #f0fbfa; border-color: #bfeae4; }
.care-cta h2 { color: var(--teal-dark); }
.care-cta h2::before { background: var(--teal); }
.preview { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.findings { list-style: none; margin: 0; padding: 0; }
.finding { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: var(--s-4); margin: var(--s-3) 0; background: var(--surface-2); }
.finding-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.finding-name { font-weight: 700; color: var(--ink); }
.finding-obs { margin: var(--s-2) 0 0; color: var(--text); }
.finding-conf { margin: var(--s-1) 0 0; color: var(--muted); font-size: 0.85rem; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-transform: capitalize; color: #fff; white-space: nowrap; }
.badge-mild { background: var(--mild); } .badge-moderate { background: var(--moderate); } .badge-severe { background: var(--severe); }
.details { margin: 0; }
.details dt { margin-top: var(--s-3); font-weight: 700; color: var(--brand-dark); }
.details dd { margin: 2px 0 0; }
.actions { margin-top: var(--s-6); }
.actions .btn-primary { width: 100%; }
.page-footer { margin-top: var(--s-8); text-align: center; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
/* "Take a Photo" CTA — shown on BOTH mobile & desktop, on its own full-width
   row BELOW the phone (never overlapping it). Teal glowing badge style to
   echo the "Dental insights in minutes" hero badge. Scrolls to analysis. */
.m-cta {
  flex: 0 0 100%;                 /* full-width row -> wraps below phone+panel */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin: var(--s-2) auto 0;
  padding: 11px 22px; min-height: 44px;
  width: auto; max-width: max-content;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--teal-bright);
  background: rgba(55, 224, 207, 0.10);
  border: 1px solid rgba(55, 224, 207, 0.45);
  border-radius: 999px; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(55, 224, 207, 0.06), 0 0 18px rgba(55, 224, 207, 0.28);
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.m-cta svg { width: 18px; height: 18px; }
.m-cta:hover {
  background: rgba(55, 224, 207, 0.16);
  box-shadow: 0 0 0 4px rgba(55, 224, 207, 0.10), 0 0 24px rgba(55, 224, 207, 0.4);
  transform: translateY(-1px);
}

/* -----------------------------------------------------------------
   MOBILE (<=900px): one continuous scrollable page. The intro/showcase
   section flows into the analysis (action-card) section; the CTA just
   smooth-scrolls down to it. No hide/show — everything stays scrollable.
   ----------------------------------------------------------------- */
@media (max-width: 900px) {
  .cols {
    grid-template-columns: 1fr;
    gap: clamp(22px, 5vw, 34px);
  }
  /* Page 1 content (hero + showcase) first, action card second. */
  .showcase { order: 1; }
  .action-card { order: 2; }
  .action-card, .showcase { max-width: 620px; margin: 0 auto; width: 100%; }

  /* CTA uses the shared base .m-cta rule (teal badge, full-width row below the
     phone). Only the touch target is bumped a touch on small screens. */
  .m-cta { min-height: 48px; }

  .glass-panel { width: min(56%, 240px); }
}
/* Smooth in-page scrolling + offset so the sticky header doesn't cover
   the analysis section when the CTA jumps to it. */
html { scroll-behavior: smooth; }
.action-card { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 600px) {
  .form-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { width: 100%; }
  .showcase-caption { align-items: center; text-align: center; }
  .caption-row { flex-direction: column; gap: var(--s-2); }
  .showcase-media { flex-direction: column; min-height: 0; }
  /* Column layout: flex-basis maps to height, so reset it. Keep the CTA as a
     normal auto-height badge that sits below the stacked phone + panel. */
  .m-cta { flex: 0 0 auto; order: 3; margin-top: var(--s-3); }
  /* Panel stacks below the phone: reset flex/overlap so it hugs its content
     (no leftover empty space under "Insights"). */
  .glass-panel {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    margin-left: 0;
    margin-top: var(--s-3);
    animation: none;
  }
  .glass-steps li:last-child { margin-bottom: 0; }
}

@media (max-width: 430px) {
  .choice-row { grid-template-columns: 1fr; }
  .choice { min-height: 0; padding: var(--s-4) var(--s-3); }
  /* Narrow phones: tighten the scan/AI pills so both fit on one row. */
  .showcase-top { gap: 6px; }
  .tag { letter-spacing: 0.06em; padding: 6px 10px; gap: 6px; }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .scan-view:nth-child(1) { opacity: 1; }
  .scan-view:nth-child(2), .scan-view:nth-child(3) { opacity: 0; }
}

/* =================================================================
   RESULT PAGE v2 — compact, consumer-facing, mobile-first.
   Soft pastel healthcare look. body.result-page scopes it so it never
   affects the landing page.
   ================================================================= */
body.result-page {
  /* Inter across the whole result page for a clean, uniform UI look. */
  font-family: var(--font);
  /* Cinematic dark band at the top (behind the hero) fading into the light
     pastel body below — so the hero reads as a dramatic opening. */
  background:
    radial-gradient(900px 460px at 82% -10%, rgba(55, 224, 207, 0.16), transparent 62%),
    radial-gradient(760px 520px at 8% 4%, rgba(31, 102, 208, 0.28), transparent 60%),
    linear-gradient(180deg,
      var(--dark-1) 0px,
      var(--dark-2) 240px,
      #16457e 380px,
      #dbe8f8 560px,
      #f4f8ff 720px);
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--rx-slate);
}
/* Fine grain over the dark band (premium texture) — matches the landing. */
body.result-page::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 420px, transparent 640px);
          mask-image: linear-gradient(180deg, #000 0, #000 420px, transparent 640px);
}
body.result-page .result-wrap { position: relative; z-index: 1; }
/* Everything on the result page uses Inter. */
body.result-page,
body.result-page h1, body.result-page h2, body.result-page p,
body.result-page span, body.result-page a, body.result-page li,
body.result-page summary, body.result-page b, body.result-page .btn-primary {
  font-family: var(--font);
}

/* Uniform result-page typography. */
body.result-page h1, body.result-page h2 { letter-spacing: normal; }

/* Sticky logo bar — transparent over the dark hero band. */
body.result-page .brand-bar {
  position: sticky; top: 0; z-index: 40;
  padding: 10px clamp(16px, 5vw, 28px);
  background: rgba(10, 41, 80, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
body.result-page .logo { display: inline-flex; text-decoration: none; line-height: 0; }
body.result-page .logo-img { height: clamp(42px, 8vw, 52px); width: auto; display: block; }

/* =================================================================
   RESULT PAGE — pastel healthcare dashboard palette (scoped tokens)
   ================================================================= */
body.result-page {
  --rx-navy:   #243b60;   /* deep navy — headings */
  --rx-slate:  #4a5b74;   /* muted slate — body text */
  --rx-muted:  #64748b;   /* lighter slate — small print */
  --rx-line:   #e4ecf7;   /* subtle low-contrast stroke */
  --rx-shadow: 0 1px 2px rgba(36, 59, 96, 0.05), 0 6px 20px rgba(36, 59, 96, 0.06);
  /* Soft severity tones: green / amber / muted coral. */
  --rx-mild-bg: #e9f5ef;   --rx-mild-fg: #1f7a56;
  --rx-mod-bg:  #fdf1e3;   --rx-mod-fg:  #b5701a;
  --rx-sev-bg:  #fbe9e9;   --rx-sev-fg:  #c0504a;

  /* ---------------------------------------------------------------
     RESULT-PAGE TYPE SCALE (single source of truth)
     One consistent scale so every card reads with the same hierarchy.
     line-heights follow the skill's 1.5–1.75 body guidance; headings
     are tighter. Sizes in rem so they respect user zoom.
     --------------------------------------------------------------- */
  --rx-fs-display: clamp(1.7rem, 1.3rem + 2vw, 2.1rem); /* hero severity only */
  --rx-fs-title:   1.075rem;   /* card / section headings          */
  --rx-fs-lead:    1rem;       /* prominent body (summary, action) */
  --rx-fs-body:    0.94rem;    /* standard body / descriptions     */
  --rx-fs-small:   0.85rem;    /* supporting / secondary text      */
  --rx-fs-label:   0.72rem;    /* uppercase eyebrows / labels      */

  --rx-lh-title: 1.3;
  --rx-lh-body:  1.6;
}

.result-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--s-4) clamp(14px, 4vw, 20px) var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

/* ---- Soft severity badges (shared) ---- */
.rx-badge {
  display: inline-flex; align-items: center;
  padding: 3px 11px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; text-transform: capitalize;
  white-space: nowrap; flex: none;
}
.rx-badge.sev-mild     { background: var(--rx-mild-bg); color: var(--rx-mild-fg); }
.rx-badge.sev-moderate { background: var(--rx-mod-bg);  color: var(--rx-mod-fg); }
.rx-badge.sev-severe   { background: var(--rx-sev-bg);  color: var(--rx-sev-fg); }

/* per-severity accents for the hero focal card */
.sev-mild     { --rx-accent: var(--rx-mild-fg); --rx-accent-bg: var(--rx-mild-bg); }
.sev-moderate { --rx-accent: var(--rx-mod-fg);  --rx-accent-bg: var(--rx-mod-bg); }
.sev-severe   { --rx-accent: var(--rx-sev-fg);  --rx-accent-bg: var(--rx-sev-bg); }
.sev-none     { --rx-accent: var(--rx-navy);    --rx-accent-bg: #eef4ff; }

/* ---- Generic card ---- */
.rx-card {
  background: #fff;
  border: 1px solid var(--rx-line);
  border-radius: 18px;
  box-shadow: var(--rx-shadow);
  padding: var(--s-4);
}
.rx-h {
  margin: 0 0 var(--s-3);
  font-size: var(--rx-fs-title); font-weight: 700; line-height: var(--rx-lh-title);
  color: var(--rx-navy);
}
.rx-muted { margin: 0; font-size: var(--rx-fs-body); line-height: var(--rx-lh-body); color: var(--rx-muted); white-space: pre-line; }

/* ---- Inline "?" help button + collapsible note (shared) ---- */
.rx-h, .hr-block-title { display: inline-flex; align-items: center; gap: 8px; }
.rx-help-btn {
  flex: none; width: 22px; height: 22px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 999px;
  background: var(--rx-line, #e4ecf7); color: var(--rx-muted, #64748b);
  transition: background .15s ease, color .15s ease;
}
.rx-help-btn:hover { background: #d8e3f3; color: var(--rx-navy, #243b60); }
.rx-help-btn svg { width: 15px; height: 15px; display: block; }
.rx-help-note {
  margin: 0 0 var(--s-3); padding: 12px 14px;
  background: #f2f7fe; border: 1px solid var(--rx-line, #e4ecf7);
  border-radius: 12px;
  font-size: var(--rx-fs-body); line-height: var(--rx-lh-body); color: var(--rx-slate, #4a5b74);
}
.rx-help-note[hidden] { display: none; }

/* ---- 1. Overall result (focal card) ---- */
.rx-hero {
  background: #fff;
  border: 1px solid var(--rx-line);
  border-radius: 20px;
  box-shadow: var(--rx-shadow);
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.rx-hero-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.rx-eyebrow {
  margin: 0; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--rx-muted);
}
.rx-status {
  font-size: 0.74rem; font-weight: 700; color: var(--rx-mild-fg);
  background: var(--rx-mild-bg); padding: 3px 10px; border-radius: 999px;
}
.rx-hero-main { display: flex; align-items: center; gap: var(--s-4); }
.rx-thumb {
  width: 88px; height: 88px; flex: none;
  border-radius: 14px; object-fit: cover; border: 1px solid var(--rx-line);
}
.rx-hero-info { min-width: 0; flex: 1; }
.rx-sev-line { display: flex; align-items: center; gap: 8px; }
.rx-severity {
  margin: 0; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.1rem); font-weight: 700;
  color: var(--rx-accent, var(--rx-navy)); text-transform: capitalize; line-height: 1.1;
}
.rx-info-btn {
  flex: none; width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--rx-muted); cursor: pointer;
  border-radius: 50%; transition: color .15s ease, background .15s ease;
}
.rx-info-btn:hover { color: var(--rx-navy); background: #eef4ff; }
.rx-info-btn svg { width: 20px; height: 20px; }
.rx-summary { margin: var(--s-2) 0 0; font-size: var(--rx-fs-lead); line-height: var(--rx-lh-body); color: var(--rx-slate); }

/* one-line severity meaning chip (tinted to the severity) */
.rx-sev-meaning {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin: 0; padding: 6px 12px; border-radius: 999px;
  background: var(--rx-accent-bg); font-size: 0.9rem;
}
.rx-sev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rx-accent, var(--rx-navy)); }
.rx-sev-key { font-weight: 700; text-transform: capitalize; color: var(--rx-accent, var(--rx-navy)); }
.rx-sev-def { color: var(--rx-slate); }

/* collapsible full legend */
.rx-legend {
  border-top: 1px solid var(--rx-line); padding-top: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.rx-legend[hidden] { display: none; }
.rx-legend-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--rx-navy); }
.rx-legend-lead { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--rx-muted); }
.rx-legend-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.rx-legend-list li { display: flex; align-items: flex-start; gap: 10px; }
.rx-legend-text { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.rx-legend-text b { font-size: 0.9rem; color: var(--rx-navy); }
.rx-legend-text span { font-size: 0.84rem; color: var(--rx-muted); }
.rx-legend-note { margin: 2px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--rx-muted); }

.rx-quality {
  margin: 0; padding: var(--s-2) var(--s-3);
  background: #eef4ff; border: 1px solid #d8e6fb;
  border-radius: 12px; font-size: 0.88rem; color: var(--rx-navy);
}

/* ---- 2. What we noticed (compact rows, no repetitive pills) ---- */
.rx-findings { list-style: none; margin: 0; padding: 0; }
.rx-finding {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 11px 0; border-bottom: 1px solid var(--rx-line);
}
.rx-finding:first-child { padding-top: 0; }
.rx-finding:last-child { border-bottom: none; padding-bottom: 0; }
.rx-finding-name { font-size: var(--rx-fs-body); font-weight: 600; line-height: var(--rx-lh-title); color: var(--rx-navy); min-width: 0; }

/* ---- Expandable details ---- */
.rx-details { margin: var(--s-3) 0 0; }
.rx-details summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 700; color: #3f77b7;
}
.rx-details-mint summary { color: var(--rx-mild-fg); }
/* Give the "Why this matters" toggle clear breathing room from the
   timeframe pill above it, with a soft divider inside the mint card. */
.rx-next .rx-details {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid #cfe9e2;
}
.rx-details summary::-webkit-details-marker { display: none; }
.rx-details summary::before { content: "▸"; font-size: 0.72rem; transition: transform .15s ease; }
.rx-details[open] summary::before { transform: rotate(90deg); }
.rx-details > p { margin: var(--s-2) 0 0; font-size: 0.92rem; line-height: 1.55; color: var(--rx-slate); }
.rx-detail-list { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.rx-detail-list li { display: flex; flex-direction: column; gap: 3px; }
.rx-detail-head { display: flex; align-items: center; gap: 8px; }
.rx-detail-head b { color: var(--rx-navy); font-size: 0.95rem; }
.rx-detail-obs { font-size: 0.9rem; line-height: 1.5; color: var(--rx-slate); }
.rx-detail-conf { font-size: 0.82rem; color: var(--rx-muted); }

/* ---- 3. Your next step (soft mint) ---- */
.rx-next { background: #e9f5f2; border-color: #cfe9e2; }
.rx-h-next { color: #245d59; }
.rx-next-action { margin: 0; font-size: var(--rx-fs-lead); font-weight: 700; color: #1f4a47; line-height: var(--rx-lh-body); }
.rx-next-when {
  display: inline-flex; align-items: baseline; gap: 8px; align-self: flex-start;
  margin: var(--s-4) 0 0; padding: 8px 14px;
  background: #fff; border-radius: 999px;
}
.rx-next-when-label { font-size: var(--rx-fs-label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #3d766f; }
.rx-next-when-value { font-size: var(--rx-fs-body); font-weight: 700; color: #1f4a47; text-transform: capitalize; }

/* ---- 4. MobiDent home-care (pastel blue) ---- */
.rx-homecare {
  background: #eaf0ff; border-color: #d5e1ff;
  display: flex; align-items: center; gap: var(--s-3);
}
.rx-homecare-ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #3967b0;
}
.rx-homecare-ic svg { width: 26px; height: 26px; }
.rx-homecare-title { margin: 0 0 3px; font-size: var(--rx-fs-title); font-weight: 700; line-height: var(--rx-lh-title); color: #244a86; }
.rx-homecare-text { margin: 0; font-size: var(--rx-fs-body); line-height: var(--rx-lh-body); color: #385678; }

/* ---- disclaimer ---- */
.rx-disclaimer { margin: var(--s-1) 0 0; font-size: var(--rx-fs-small); line-height: var(--rx-lh-body); color: var(--rx-muted); text-align: center; }

/* ---- What's next — one primary CTA + two quieter secondary actions ----
   The download is the clear lead (filled teal); Book + Analyze are calm
   tinted secondaries side by side, so the group is compact on mobile and
   reads as an obvious hierarchy rather than three competing cards. */
.rx-next-block { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-1); }
.rx-next-title { margin: 0; font-size: var(--rx-fs-title); font-weight: 700; line-height: var(--rx-lh-title); color: var(--rx-navy); text-align: center; }

/* Primary: full-width filled download button. */
.rx-cta-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; padding: 14px 22px;
  border: none; border-radius: 14px; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, #17a598 0%, #0f8478 100%);
  color: #fff; box-shadow: 0 8px 20px rgba(16, 132, 120, 0.28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.rx-cta-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(16, 132, 120, 0.36); }
.rx-cta-primary:active { transform: translateY(0); }
.rx-cta-primary:focus-visible { outline: 3px solid rgba(23, 165, 152, 0.5); outline-offset: 3px; }
.rx-cta-ic { display: inline-flex; }
.rx-cta-ic svg { width: 20px; height: 20px; color: #fff; display: block; }
.rx-cta-label { font-size: var(--rx-fs-lead); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
/* working / done states */
.rx-cta-primary.is-working { cursor: progress; filter: saturate(0.92); }
.rx-cta-primary.is-done { background: linear-gradient(135deg, #1f9f6f 0%, #157a56 100%); }

/* Secondary: two quieter tinted actions side by side. */
.rx-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.rx-action {
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 9px; text-align: center; text-decoration: none; cursor: pointer;
  min-height: 52px; padding: 12px var(--s-3);
  border-radius: 14px; border: 1px solid var(--rx-line);
  background: #fff;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.rx-action:hover { background: #f6f9fd; border-color: #cddcf0; transform: translateY(-1px); }
.rx-action:active { transform: translateY(0); }
.rx-action:focus-visible { outline: 3px solid rgba(53, 102, 178, 0.4); outline-offset: 2px; }
.rx-action-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: #eef4fb;
}
.rx-action-ic svg { width: 18px; height: 18px; }
.rx-action-label { font-size: var(--rx-fs-body); font-weight: 700; line-height: 1.2; color: var(--rx-slate); }
/* calm clinical accents (no generic-dashboard purple) */
.rx-action-book    .rx-action-ic { color: #21836d; background: #e5f5f0; }
.rx-action-analyze .rx-action-ic { color: #3566b2; background: #eaf0ff; }

/* ---- Not-dental card ---- */
.rx-warn { text-align: center; }
.rx-warn-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: #eef4ff; color: #3967b0; margin-bottom: var(--s-2);
}
.rx-warn-ic svg { width: 27px; height: 27px; }
.rx-warn-title { margin: 0 0 var(--s-2); font-size: 1.15rem; font-weight: 700; color: var(--rx-navy); }
.rx-warn-thumb { width: 100%; max-width: 260px; height: auto; border-radius: 14px; margin: var(--s-4) auto 0; display: block; border: 1px solid var(--rx-line); }
.rx-warn-btn {
  display: inline-block; margin-top: var(--s-4); padding: 13px 24px;
  font-size: 0.98rem; font-weight: 700; text-decoration: none;
  color: #fff; background: #3967b0; border-radius: 999px;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .rx-hero-main { gap: var(--s-3); }
  .rx-thumb { width: 72px; height: 72px; }
  /* Secondary actions stay side by side; labels shrink a touch if needed. */
  .rx-action { padding: 12px 10px; }
  .rx-action-label { font-size: var(--rx-fs-small); }
}
@media (max-width: 360px) {
  /* Only on very narrow screens do the two secondaries stack. */
  .rx-action-grid { grid-template-columns: 1fr; }
}

/* ---- Dental-care Lottie animation banner (result page) ----
   Collapsed by default so a blocked/failed player leaves NO empty gap or
   broken-image icon. JS adds .is-ready once the animation actually loads,
   which reveals + sizes the banner. */
.result-anim {
  display: none;                 /* hidden until the player confirms it loaded */
  justify-content: center;
  align-items: center;
  margin: 0 auto var(--s-2);
  max-width: 300px;
  width: 100%;
}
.result-anim.is-ready { display: flex; }
.result-anim lottie-player {
  width: 100%;
  height: auto;
  aspect-ratio: 649 / 474;   /* matches the source animation */
}
@media (max-width: 600px) {
  .result-anim { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .result-anim { display: none !important; }  /* no looping motion for reduced-motion */
}

/* =================================================================
   RESULT PAGE — CINEMATIC DARK HERO (severity dial + scan sweep)
   Reuses the landing page's dark palette, glass, grain and scan motion.
   ================================================================= */

/* Severity → accent color, shared by the dial + inline scale. */
body.result-page .cx-hero.sev-mild     { --cx-accent: var(--mild);     --cx-glow: rgba(22,163,74,0.55); }
body.result-page .cx-hero.sev-moderate { --cx-accent: var(--moderate); --cx-glow: rgba(217,119,6,0.55); }
body.result-page .cx-hero.sev-severe   { --cx-accent: var(--severe);   --cx-glow: rgba(220,38,38,0.55); }
body.result-page .cx-hero.sev-none     { --cx-accent: var(--teal-bright); --cx-glow: rgba(55,224,207,0.5); }

/* ---- The dark glass hero panel ---- */
.cx-hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1px;                         /* room for the gradient hairline */
  background: linear-gradient(150deg, rgba(55,224,207,0.5), rgba(255,255,255,0.10) 42%, rgba(31,102,208,0.42));
  box-shadow: var(--shadow-dark);
  margin-top: var(--s-2);
  /* entrance */
  opacity: 0; transform: translateY(16px);
  animation: reveal-up 0.7s cubic-bezier(.2,.7,.3,1) 0.08s both;
}
.cx-hero-inner {
  position: relative;
  border-radius: calc(var(--radius-lg) - 1px);
  padding: clamp(20px, 3.4vw, 30px);
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(55,224,207,0.14), transparent 60%),
    linear-gradient(165deg, rgba(19,58,110,0.92), rgba(8,32,66,0.94));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  overflow: hidden;
}

.cx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 var(--s-4);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-200);
}
.cx-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-bright); box-shadow: 0 0 10px var(--teal-bright);
  animation: cx-blink 2.2s ease-in-out infinite;
}
@keyframes cx-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.cx-hero-grid {
  display: flex; align-items: center; gap: clamp(18px, 3vw, 34px);
}

/* ---- The severity dial ---- */
.cx-dial {
  position: relative; flex: none;
  width: clamp(150px, 40vw, 190px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.cx-dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cx-track {
  fill: none; stroke: rgba(255,255,255,0.10); stroke-width: 12; stroke-linecap: round;
}
/* Each segment: ~100° arc (dash 150) + 260° gap (390). Circumference≈540. */
.cx-seg {
  fill: none; stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 150 390;
  opacity: 0.22;                       /* dim until the dial "settles" */
  transition: opacity .5s ease, stroke-width .5s ease;
}
.cx-seg-mild     { stroke: var(--mild);     stroke-dashoffset: 0; }
.cx-seg-moderate { stroke: var(--moderate); transform: rotate(120deg); transform-origin: 100px 100px; }
.cx-seg-severe   { stroke: var(--severe);   transform: rotate(240deg); transform-origin: 100px 100px; }

/* The active segment lights up + thickens + glows once the hero is ready. */
.cx-hero.is-ready.sev-mild     .cx-seg-mild,
.cx-hero.is-ready.sev-moderate .cx-seg-moderate,
.cx-hero.is-ready.sev-severe   .cx-seg-severe {
  opacity: 1; stroke-width: 15;
  filter: drop-shadow(0 0 8px var(--cx-glow));
  animation: cx-seg-draw 1s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes cx-seg-draw {
  from { stroke-dasharray: 0 540; }
  to   { stroke-dasharray: 150 390; }
}

/* Photo (or icon) sits in the middle of the dial with a one-time scan sweep. */
.cx-photo {
  position: relative; z-index: 1;
  width: 66%; aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; border: 2px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 4px rgba(8,32,66,0.6), 0 10px 26px rgba(3,15,35,0.5);
}
.cx-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-photo-empty { display: grid; place-items: center; background: rgba(255,255,255,0.06); color: var(--ink-300); }
.cx-photo-empty svg { width: 40%; height: 40%; }
/* the sweeping scan bar — plays a couple of times, then rests */
.cx-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 26%;
  background: linear-gradient(180deg, rgba(55,224,207,0) 0%, rgba(55,224,207,0.28) 60%, rgba(55,224,207,0.85) 100%);
  box-shadow: 0 6px 14px 2px rgba(55,224,207,0.4);
  opacity: 0;
}
.cx-hero.is-ready .cx-scan { animation: cx-scan-sweep 1.5s ease-in-out 0.5s 2 both; }
@keyframes cx-scan-sweep {
  0%   { top: -26%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---- Hero text ---- */
.cx-hero-info { min-width: 0; flex: 1; }
.cx-hero-label {
  margin: 0 0 4px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-300);
}
.cx-sev-line { display: flex; align-items: center; gap: 10px; }
.cx-severity {
  margin: 0; font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 4vw, 3rem); font-weight: 600; line-height: 1.02;
  color: #fff; text-transform: capitalize;
  text-shadow: 0 0 26px var(--cx-glow);
}
.cx-info-btn {
  flex: none; width: 28px; height: 28px; padding: 0; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-300); background: rgba(255,255,255,0.08); border-radius: 50%;
  transition: color .15s ease, background .15s ease;
}
.cx-info-btn:hover { color: #fff; background: rgba(255,255,255,0.16); }
.cx-info-btn svg { width: 18px; height: 18px; }
.cx-sev-def { margin: 6px 0 0; font-size: 1rem; font-weight: 600; color: var(--cx-accent); filter: brightness(1.35); }
.cx-summary {
  margin: var(--s-3) auto 0; max-width: 52ch;
  font-size: 0.96rem; line-height: 1.6; color: var(--ink-200);
  text-align: center;
}

/* inline 3-segment scale */
.cx-scale { display: flex; gap: 6px; margin-top: var(--s-4); }
.cx-scale-seg {
  flex: 1; text-align: center; padding: 5px 4px; border-radius: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink-300); background: rgba(255,255,255,0.05);
  border: 1px solid transparent; transition: all .3s ease;
}
.cx-scale-seg.on { color: #06202c; }
.cx-scale-seg.sev-mild.on     { background: var(--mild);     color: #04240f; }
.cx-scale-seg.sev-moderate.on { background: var(--moderate); color: #2e1a02; }
.cx-scale-seg.sev-severe.on   { background: var(--severe);   color: #2e0606; }

/* quality warning + collapsible legend (on dark) */
.cx-quality {
  margin: var(--s-4) 0 0; padding: var(--s-2) var(--s-3);
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; font-size: 0.88rem; color: var(--ink-200);
}
.cx-legend {
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.cx-legend[hidden] { display: none; }
.cx-legend-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: #fff; }
.cx-legend-lead { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--ink-300); }
.cx-legend-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.cx-legend-list li { display: flex; align-items: flex-start; gap: 10px; }
.cx-legend-text { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.cx-legend-text b { font-size: 0.88rem; color: #fff; }
.cx-legend-text span { font-size: 0.82rem; color: var(--ink-300); }
.cx-legend-note { margin: 2px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--ink-300); }

/* ---- Scroll-reveal for the light cards below the hero ---- */
body.result-page .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
body.result-page .reveal.in { opacity: 1; transform: none; }

/* Slight lift for the light cards so they float over the gradient seam. */
body.result-page .rx-card, body.result-page .rx-next-block { position: relative; }

/* ---- Mobile: dial above the text ---- */
@media (max-width: 560px) {
  .cx-hero-grid { flex-direction: column; text-align: center; gap: var(--s-4); }
  .cx-sev-line { justify-content: center; }
  .cx-scale { max-width: 320px; margin-inline: auto; }
  .cx-dial { width: clamp(160px, 56vw, 210px); }
}

@media (prefers-reduced-motion: reduce) {
  .cx-hero { animation: none; opacity: 1; transform: none; }
  .cx-eyebrow-dot { animation: none; }
  .cx-hero.is-ready .cx-scan { animation: none; opacity: 0; }
  .cx-hero.is-ready .cx-seg-mild,
  .cx-hero.is-ready .cx-seg-moderate,
  .cx-hero.is-ready .cx-seg-severe { animation: none; }
  body.result-page .reveal { transition: none; opacity: 1; transform: none; }
}

/* =================================================================
   ANALYSIS LOADING OVERLAY — 6-stage animated journey
   Full-screen pastel overlay shown while the image uploads + Qwen runs.
   Card 1 once (upload) -> cards 2-5 cycle -> card 6 on real completion.
   Pure CSS/SVG; pastel healthcare palette; reduced-motion safe.
   ================================================================= */
.load-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  /* Frosted, translucent so the landing page stays visible (blurred) behind
     the loading cards — this reads as an in-place modal, not a new page. */
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(55,224,207,0.12), transparent 70%),
    linear-gradient(180deg, rgba(238,245,255,0.72) 0%, rgba(244,248,255,0.74) 60%, rgba(234,243,255,0.72) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
          backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease,
              background .45s ease, backdrop-filter .45s ease;
}
.load-overlay[hidden] { display: flex; }            /* keep flex; toggle via .is-open */
.load-overlay.is-open { opacity: 1; visibility: visible; }
.load-overlay.is-closing { opacity: 0; }
/* Final beat before the result renders: fade the frosted backdrop to a solid
   pastel so the landing page dissolves away and the result "materializes"
   out of the loader — no hard page-jump flash. */
.load-overlay.is-sealing {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(55,224,207,0.12), transparent 70%),
    linear-gradient(180deg, #eef5ff 0%, #f4f8ff 60%, #eaf3ff 100%);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
          backdrop-filter: blur(22px) saturate(1.1);
}

/* Gently blur + dim the page content behind the overlay while analyzing. */
body.is-analyzing > *:not(.load-overlay) {
  filter: blur(3px);
  transition: filter .35s ease;
}

/* The stage holds all six cards stacked; only .is-active is shown. */
.load-stage {
  position: relative;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center;
}

/* Cards are stacked; cross-fade + gentle rise between them. */
.load-card {
  position: absolute; inset: 0 0 auto 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px;
  padding: clamp(22px, 4vw, 30px) clamp(18px, 4vw, 26px) clamp(26px, 4vw, 32px);
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 20px 50px rgba(19,66,130,0.14), inset 0 1px 0 rgba(255,255,255,0.8);
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.3,1);
  pointer-events: none;
}
.load-card.is-active { position: relative; opacity: 1; transform: none; }

/* per-card pastel tints (match the reference) */
.lc-1 { background: linear-gradient(170deg, #eaf3ff, #f3f9ff); }
.lc-2 { background: linear-gradient(170deg, #efeafe, #f6f2ff); }
.lc-3 { background: linear-gradient(170deg, #e6f6f1, #eefaf6); }
.lc-4 { background: linear-gradient(170deg, #fdefe4, #fff6ef); }
.lc-5 { background: linear-gradient(170deg, #fdeaf1, #fff2f7); }
.lc-6 { background: linear-gradient(170deg, #e4f6f4, #eefaf8); }

/* numbered badge */
.lc-badge {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 800; color: #fff;
  box-shadow: 0 4px 10px rgba(19,66,130,0.18);
}
.lc-1 .lc-badge { background: #4a9be0; }
.lc-2 .lc-badge { background: #8f7fd6; }
.lc-3 .lc-badge { background: #2bb39a; }
.lc-4 .lc-badge { background: #f0925a; }
.lc-5 .lc-badge { background: #ec6f9e; }
.lc-6 .lc-badge { background: #2bb39a; }

.lc-title {
  margin: 8px 0 0; font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.2rem, 1rem + 1.4vw, 1.5rem); font-weight: 600; color: #234a86;
  line-height: 1.2;
}
.lc-sub { margin: 0; font-size: 0.92rem; line-height: 1.5; color: #5a6b86; max-width: 34ch; }

/* ---- Shared art stage ---- */
.lc-art {
  position: relative; width: 100%; height: clamp(170px, 42vw, 210px);
  margin: var(--s-3) 0 var(--s-2);
  display: flex; align-items: center; justify-content: center;
}
.lc-tooth-body { fill: #fff; stroke: #cfe0f6; stroke-width: 2; }
.lc-eye { fill: #33475b; }
.lc-cheek { fill: #ffc2cf; opacity: .8; }
.lc-smile { fill: none; stroke: #33475b; stroke-width: 2.6; stroke-linecap: round; }

/* sparkles (shared) */
.lc-spark { position: absolute; width: 10px; height: 10px; color: var(--teal); }
.lc-spark::before { content: "✦"; position: absolute; inset: 0; font-size: 12px; color: #7fd8ce; }
.lc-art .s1 { top: 12%; left: 20%; animation: lc-tw 2s ease-in-out infinite; }
.lc-art .s2 { top: 22%; right: 18%; animation: lc-tw 2s ease-in-out infinite .5s; }
.lc-art .s3 { bottom: 16%; left: 26%; animation: lc-tw 2s ease-in-out infinite 1s; }
.lc-art .s4 { bottom: 20%; right: 24%; animation: lc-tw 2s ease-in-out infinite 1.4s; }
@keyframes lc-tw { 0%,100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }

/* ---- Card 1: upload ---- */
.lc-art-upload { color: #4a9be0; }
.lc-phone { width: 108px; height: auto; filter: drop-shadow(0 10px 20px rgba(19,66,130,.18)); }
.lc-phone-body { fill: #12243b; }
.lc-phone-screen { fill: #dfe6f2; }
.lc-phone-cam { fill: #33475b; }
.lc-teeth { fill: none; stroke: #b56b7a; stroke-width: 3; stroke-linecap: round; opacity: .7; }
.lc-cloud { position: absolute; bottom: 14%; width: 52px; color: #4a9be0; animation: lc-bob 2.4s ease-in-out infinite; }
.lc-arrow { position: absolute; right: 22%; width: 8px; height: 8px; border-top: 2.4px solid #9ec8ee; border-right: 2.4px solid #9ec8ee; transform: rotate(-45deg); opacity: 0; }
.lc-arrow-a { top: 34%; animation: lc-rise 1.6s ease-in-out infinite; }
.lc-arrow-b { top: 46%; animation: lc-rise 1.6s ease-in-out infinite .5s; }
@keyframes lc-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes lc-rise { 0% { opacity: 0; transform: translateY(6px) rotate(-45deg); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px) rotate(-45deg); } }

/* ---- Card 2: orbiting tooth ---- */
.lc-tooth { width: 108px; height: auto; }
.lc-orbit {
  position: absolute; border-radius: 50%;
  border: 2px solid transparent; border-top-color: #b9a9ee; border-right-color: #d9cffb;
}
.lc-orbit-1 { width: 150px; height: 150px; animation: lc-spin 3.4s linear infinite; }
.lc-orbit-2 { width: 190px; height: 118px; border-top-color: #37e0cf; border-right-color: #a7ecff; animation: lc-spin 4.6s linear infinite reverse; }
@keyframes lc-spin { to { transform: rotate(360deg); } }

/* ---- Card 3: feature chips + wireframe tooth ---- */
.lc-art-features { color: #2bb39a; }
.lc-tooth-wire { width: 118px; height: auto; fill: none; stroke: #7fd0e8; stroke-width: 1.4; opacity: .9; animation: lc-pulse 2.6s ease-in-out infinite; }
@keyframes lc-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.lc-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #2f6b62;
  background: #fff; box-shadow: 0 6px 14px rgba(19,66,130,.12);
  opacity: 0; animation: lc-chip-in 3.2s ease-in-out infinite;
}
.lc-chip svg { width: 13px; height: 13px; color: #2bb39a; }
.lc-chip.c1 { top: 12%; left: 4%; animation-delay: 0s; }
.lc-chip.c2 { top: 14%; right: 4%; animation-delay: .5s; }
.lc-chip.c3 { bottom: 16%; left: 2%; animation-delay: 1s; }
.lc-chip.c4 { bottom: 14%; right: 2%; animation-delay: 1.5s; }
@keyframes lc-chip-in { 0%,100% { opacity: 0; transform: translateY(6px); } 18%,60% { opacity: 1; transform: none; } }

/* ---- Card 4: magnifier over tooth ---- */
.lc-art-magnify { color: #e6803f; }
.lc-tooth-sm { width: 96px; }
.lc-loupe { position: absolute; top: 40%; left: 46%; width: 60px; color: #e6803f; animation: lc-scan 3s ease-in-out infinite; }
@keyframes lc-scan { 0%,100% { transform: translate(-10px,-6px); } 50% { transform: translate(12px,10px); } }
.lc-mini {
  position: absolute; width: 34px; height: 34px; border-radius: 11px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(19,66,130,.12); color: #7aa2cf;
  animation: lc-bob 2.6s ease-in-out infinite;
}
.lc-mini svg { width: 18px; height: 18px; }
.lc-mini.m-a { top: 14%; left: 8%; }
.lc-mini.m-b { bottom: 16%; left: 6%; animation-delay: .4s; color: #6fb7ad; }
.lc-mini.m-c { top: 30%; right: 8%; animation-delay: .8s; color: #e6a06f; }

/* ---- Card 5: clipboard checklist ---- */
.lc-art-clipboard { color: #6c9be0; }
.lc-clip { width: 120px; height: auto; }
.lc-clip-body { fill: #fff; stroke: #cfe0f6; stroke-width: 2; }
.lc-clip-clip { fill: #6c9be0; }
.lc-clip-tooth { fill: #cfe6ff; }
.lc-line { stroke: #dbe7f4; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: lc-draw 3.4s ease-in-out infinite; }
.lc-line.l2 { animation-delay: .5s; } .lc-line.l3 { animation-delay: 1s; } .lc-line.l4 { animation-delay: 1.5s; }
@keyframes lc-draw { 0%,100% { stroke-dashoffset: 60; } 30%,80% { stroke-dashoffset: 0; } }
.lc-tick { fill: none; stroke-width: 2.5; opacity: 0; animation: lc-tick 3.4s ease-in-out infinite; }
.lc-tick.t1 { stroke: #37c9a6; animation-delay: .5s; }
.lc-tick.t2 { stroke: #f0b429; animation-delay: 1s; }
.lc-tick.t3 { stroke: #6c9be0; animation-delay: 1.5s; }
@keyframes lc-tick { 0%,100% { opacity: 0; transform: scale(.5); } 30%,80% { opacity: 1; transform: scale(1); } }

/* ---- Card 6: happy done tooth ---- */
.lc-art-done { color: #2bb39a; }
.lc-tooth-happy { width: 116px; height: auto; position: relative; z-index: 1; animation: lc-pop 2.4s ease-in-out infinite; }
.lc-eye-happy { fill: none; stroke: #33475b; stroke-width: 2.6; stroke-linecap: round; }
.lc-smile-open { fill: #e26a86; stroke: none; }
.lc-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(55,224,207,.35), transparent 70%); animation: lc-glow 2.4s ease-in-out infinite; }
@keyframes lc-pop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lc-glow { 0%,100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.08); opacity: .9; } }

/* ---- Six pagination dots ---- */
.load-dots { display: flex; gap: 9px; margin-top: clamp(18px, 3vw, 26px); }
.load-dots span {
  width: 8px; height: 8px; border-radius: 999px; background: #cdd9e8;
  transition: width .3s ease, background .3s ease;
}
.load-dots span.on { width: 22px; background: var(--teal); }

@media (max-width: 480px) {
  .load-stage { max-width: 340px; }
  .lc-art { height: clamp(150px, 46vw, 190px); }
}

@media (prefers-reduced-motion: reduce) {
  .load-overlay { transition: none; }
  .load-card { transition: opacity .2s ease; transform: none !important; }
  .lc-cloud, .lc-arrow, .lc-orbit, .lc-tooth-wire, .lc-chip, .lc-loupe, .lc-mini,
  .lc-line, .lc-tick, .lc-tooth-happy, .lc-glow, .lc-art .lc-spark {
    animation: none !important;
  }
  .lc-arrow, .lc-chip, .lc-tick { opacity: 1; }
  .lc-line { stroke-dashoffset: 0; }
}

/* =================================================================
   MULTI-IMAGE UPLOAD SLOTS (Smile / Upper Arch / Lower Arch)
   Three optional, labelled view slots on the light action card.
   ================================================================= */
.slots-hint {
  margin: 0 0 var(--s-3); font-size: 0.86rem; color: var(--text-muted);
}
.slots { display: flex; flex-direction: column; gap: var(--s-3); }

.slot {
  position: relative;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .12s ease;
}
/* Each view slot rests neutral; a soft teal glow edge appears only on
   interaction — hover (pointer), tap (:active), or keyboard focus — echoing
   the "Take a Photo" badge. */
.slot-add:active { transform: scale(0.995); }
.slot:hover,
.slot:active,
.slot:focus-within {
  border-color: rgba(55, 224, 207, 0.7);
  box-shadow: var(--shadow-sm), 0 0 0 4px rgba(55, 224, 207, 0.12), 0 0 22px rgba(55, 224, 207, 0.30);
}
.slot.is-filled {
  border-color: #bfe0da;
  background: linear-gradient(180deg, #ffffff, #f2fbf9);
}
.slot.has-error {
  border-color: #f0b4b4; background: #fff6f6;
}

/* the "add" trigger row */
.slot-add {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding: var(--s-3) var(--s-4);
  background: transparent; border: none; cursor: pointer; text-align: left;
  border-radius: var(--radius);
}
.slot-add:hover { background: rgba(31,102,208,0.04); }
.slot.is-filled .slot-add { display: none; }     /* hidden once a photo is set */
.slot-view { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.slot-ic {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: #e9f2fe; color: var(--brand);
}
.slot-ic svg { width: 24px; height: 24px; }
.slot-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.slot-text b { font-size: 0.98rem; font-weight: 700; color: var(--text-primary); }
.slot-text span { font-size: 0.8rem; color: var(--text-muted); }
.slot-cta {
  flex: none; font-size: 0.82rem; font-weight: 700; color: var(--brand);
  padding: 6px 12px; border-radius: 999px; background: #eaf2ff;
}

/* preview state */
.slot-preview { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); }
.slot-preview[hidden] { display: none; }
.slot-thumb {
  width: 56px; height: 56px; flex: none; border-radius: 10px;
  object-fit: cover; border: 1px solid var(--line);
}
.slot-preview::before {
  /* the view name shows via the slot label already; add a "ready" tick area */
  content: ""; 
}
.slot.is-filled .slot-preview { position: relative; }
.slot-remove {
  margin-left: auto; flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 10px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.slot-remove:hover { color: var(--severe); border-color: #f3c9c9; background: #fff5f5; }
.slot-remove svg { width: 18px; height: 18px; }

/* show the view name beside the thumbnail in the filled state */
.slot.is-filled .slot-preview .slot-name {
  font-size: 0.9rem; font-weight: 700; color: var(--text-primary);
}

.slot-error {
  margin: 0; padding: 0 var(--s-4) var(--s-3); font-size: 0.84rem;
  color: var(--warn-text); font-weight: 500;
}
.slot-error[hidden] { display: none; }

@media (max-width: 420px) {
  .slot-add { padding: var(--s-3); }
  .slot-cta { padding: 6px 10px; }
}

/* ---- Result: multi-view thumbnails + per-finding view tags ---- */
.cx-thumbs { display: flex; gap: 10px; margin-top: var(--s-3); flex-wrap: wrap; }
.cx-thumb-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cx-thumb-item img {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 14px rgba(3,15,35,0.4);
}
.cx-thumb-label { font-size: 0.66rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-300); }

/* per-finding "seen in ..." annotation (compact list) */
.rx-finding-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-finding-views { font-size: var(--rx-fs-small); line-height: var(--rx-lh-title); color: var(--rx-muted); }

/* details view: confidence + views on one meta line */
.rx-detail-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.rx-detail-views {
  font-size: 0.78rem; color: var(--rx-mild-fg); font-weight: 600;
}
@media (max-width: 560px) {
  .cx-thumbs { justify-content: center; }
}

/* =================================================================
   DETAILED REPORT — by-condition healthcare report
   Calm, elegant, plain-language. Findings are consolidated across all
   uploaded photos into ONE row per condition. Desktop = 4-column
   table; mobile = each condition stacks into a labelled mini-card.
   Reuses the --rx-* token system for consistency.
   ================================================================= */
.hr-report {
  background: #ffffff;
  border: 1px solid var(--rx-line, #e4ecf7);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(36,59,96,.05), 0 18px 44px rgba(36,59,96,.09);
  padding: clamp(18px, 3.4vw, 30px);
  margin-top: var(--s-1);
  overflow: hidden;
}
.hr-report[hidden] { display: none; }

/* subtle entrance when revealed */
.hr-report { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.3,1); }
.hr-report.in { opacity: 1; transform: none; }

/* ---- header band ---- */
.hr-head {
  text-align: center;
  padding-bottom: clamp(16px, 2.5vw, 22px);
  border-bottom: 1px solid var(--rx-line, #e4ecf7);
  margin-bottom: clamp(18px, 3vw, 26px);
}
.hr-title {
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 1.85rem); font-weight: 700;
  color: var(--rx-navy, #243b60); line-height: 1.2;
}
.hr-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 16px 0 0;
}
.hr-meta-item {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: #f2f7fe; border: 1px solid var(--rx-line, #e4ecf7);
}
/* Item 3: Date, Report ID and their values share ONE identical text style. */
.hr-meta-k, .hr-meta-v {
  margin: 0; font-size: 0.9rem; font-weight: 600;
  color: var(--rx-slate, #4a5b74); letter-spacing: normal; text-transform: none;
}

/* ---- blocks ---- */
.hr-block { margin-top: clamp(20px, 3vw, 28px); }
.hr-block-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 14px;
}
.hr-block-title {
  margin: 0; font-size: 1.06rem; font-weight: 700; color: var(--rx-navy, #243b60);
}

/* ---- images analysed strip ---- */
/* Equal-width columns that stay in ONE tidy row. auto-fit keeps every
   thumbnail the same size instead of an uneven 2-then-1 wrap. */
.hr-images {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: clamp(10px, 2.4vw, 20px);
  justify-items: center;
}
.hr-image {
  width: 100%; max-width: 200px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hr-image-photo {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--rx-line, #e4ecf7);
  box-shadow: 0 6px 18px rgba(36,59,96,.10);
}
.hr-image-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.9rem; font-weight: 700; color: var(--rx-slate, #4a5b74);
}
.hr-image-ic { display: inline-flex; }
.hr-image-ic svg { width: 20px; height: 20px; color: var(--teal, #2bb3a3); display: block; }

/* ---- severity legend ---- */
.hr-legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px;
}
.hr-legend li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.85rem; font-weight: 600; color: var(--rx-slate, #4a5b74);
}
.hr-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.hr-dot.sev-mild { background: var(--mild, #16a34a); }
.hr-dot.sev-moderate { background: var(--moderate, #d97706); }
.hr-dot.sev-severe { background: var(--severe, #dc2626); }

/* ---- what-we-noticed table ---- */
.hr-table { display: flex; flex-direction: column; }
.hr-tr {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 1.7fr;
  gap: clamp(12px, 2vw, 22px);
  align-items: center;
  padding: 16px clamp(10px, 1.6vw, 16px);
  border-radius: 14px;
}
.hr-tr + .hr-tr { border-top: 1px solid var(--rx-line, #e4ecf7); }
.hr-tr:not(.hr-tr-head):nth-child(even) { background: #f7fafe; }
.hr-tr-head {
  padding-top: 6px; padding-bottom: 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--rx-muted, #64748b);
  border-top: none;
}
.hr-cell { min-width: 0; }
.hr-cell-k { display: none; }   /* column labels only appear on mobile */
.hr-cond-name { font-size: 0.98rem; font-weight: 700; color: var(--rx-navy, #243b60); line-height: 1.4; }
.hr-c-where { font-size: 0.92rem; color: var(--rx-slate, #4a5b74); line-height: 1.5; }
.hr-c-means { font-size: 0.92rem; color: var(--rx-slate, #4a5b74); line-height: 1.6; }
.hr-muted { color: var(--rx-muted, #64748b); }

/* severity dot inside the pill (color is never the only cue — word is shown) */
.hr-sev-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; display: inline-block; }
.hr-sev-dot.sev-mild { background: var(--mild, #16a34a); }
.hr-sev-dot.sev-moderate { background: var(--moderate, #d97706); }
.hr-sev-dot.sev-severe { background: var(--severe, #dc2626); }

/* ---- footer guidance cards ---- */
.hr-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 18px);
  margin-top: clamp(22px, 3.4vw, 30px);
}
.hr-guide {
  background: #f7fafe; border: 1px solid var(--rx-line, #e4ecf7);
  border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.hr-guide-brand { background: linear-gradient(160deg, #e9fbf7, #eef6ff); }
.hr-guide-ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; border: 1px solid var(--rx-line, #e4ecf7);
  color: var(--teal, #2bb3a3);
}
.hr-guide-ic svg { width: 22px; height: 22px; display: block; }
.hr-guide-title { margin: 2px 0 0; font-size: 0.98rem; font-weight: 700; color: var(--rx-navy, #243b60); }
.hr-guide-text { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--rx-slate, #4a5b74); }
.hr-timeframe {
  align-self: flex-start; margin-top: 4px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--rx-mild-bg, #e9f5ef); color: var(--rx-mild-fg, #1f7a56);
  font-size: 0.8rem; font-weight: 700;
}

/* ---- AI disclaimer ribbon ---- */
.hr-ai-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: clamp(20px, 3vw, 26px) 0 0;
  padding: 14px 16px; border-radius: 14px;
  background: #f2f7fe; border: 1px solid var(--rx-line, #e4ecf7);
  font-size: 0.86rem; line-height: 1.55; color: var(--rx-muted, #64748b);
}
.hr-ai-ic { flex: none; color: var(--rx-slate, #4a5b74); }
.hr-ai-ic svg { width: 20px; height: 20px; display: block; }

/* ---- Download PDF Report: spinner used in the working state ---- */
.rx-spin { animation: rx-spin 0.8s linear infinite; transform-origin: center; }
@keyframes rx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rx-spin { animation: none; }
}

/* ---- Mobile: stack each condition into a labelled mini-card ---- */
@media (max-width: 720px) {
  .hr-tr-head { display: none; }
  .hr-tr {
    grid-template-columns: 1fr;
    gap: 8px; padding: 16px;
    background: #f7fafe; border: 1px solid var(--rx-line, #e4ecf7);
  }
  .hr-tr + .hr-tr { border-top: 1px solid var(--rx-line, #e4ecf7); margin-top: 12px; }
  .hr-tr:not(.hr-tr-head):nth-child(even) { background: #f7fafe; }
  .hr-cell-k {
    display: block; margin-bottom: 2px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--rx-muted, #64748b);
  }
  .hr-cards { grid-template-columns: 1fr; }
  /* keep the three thumbnails in one tidy row; shrink the label so
     "Upper Arch" / "Lower Arch" stay on a single line */
  .hr-image-label { font-size: 0.8rem; gap: 5px; text-align: center; line-height: 1.25; }
  .hr-image-ic svg { width: 17px; height: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .hr-report { opacity: 1; transform: none; transition: none; }
}
