/*
  Claudia Kavisse — Product Designer Portfolio
  Font: Eudoxus Sans (via Fontshare CDN, loaded in <head>).
  Fallback stack: 'Plus Jakarta Sans' (Google Fonts) / 'Manrope' — used automatically
  if the Fontshare CDN is unreachable in the visitor's network, since both are
  geometric sans-serifs with proportions close to Eudoxus Sans.
*/

:root {
  --color-black: #25282b;
  --color-teal: #00aaa1;
  --color-teal-dark: #1597a1;
  --color-navy: #011e41;
  --color-white: #ffffff;
  --color-bg: #f2f8f7;
  --color-muted: rgba(37, 40, 43, 0.65);

  --color-marketplace-cover: #dfeef5;
  --color-realplus-cover: #00aaa1;
  --color-secondopinions-cover: #f3f7ff;
  --color-real-cover: #12253b;
  --color-real-accent: #ffb600;
  --color-clalit-cover: #ccefFC;
  --color-clalit-accent: #00aeef;

  --font-family: "Eudoxus Sans", "Plus Jakarta Sans", "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  /* Style-guide rule: --font-family (Eudoxus Sans) is reserved for the
     portfolio's own explanatory text and titles (h2/h3 section headings,
     case-study prose, .case-ds-subhead sub-labels). Any text that
     reproduces an actual product component — a live app-mockup
     reproduction (.mp-app, .real-ui, .so-* mockups, .phone-screen) or a
     Design System component showcase (buttons, icons, checkboxes,
     fields, rows, etc.) on ANY of the 5 project pages — uses this
     font instead, site-wide, regardless of what font that project's own
     real product actually uses. One shared variable so this can be
     changed in one place if the style guide changes again. */
  --component-font: "Roboto", "Inter", "Plus Jakarta Sans", sans-serif;

  --shadow-button: 2px 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-card: 0px 3px 20px rgba(0, 0, 0, 0.07);
  --shadow-project: 2px 2px 8px rgba(0, 0, 0, 0.25);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 15px;
  --radius-xl: 20px;

  --container-max: 1800px;
  --side-margin: 120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-black);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Site-wide 80% scale: shrinks type, spacing, images, and layout
     proportionally together (like browser zoom) across every page —
     home page and all 5 project case studies share this stylesheet. */
  zoom: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--side-margin);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.5;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--color-teal);
  color: var(--color-black);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background: #25282b;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-black);
}

.btn-outline:hover {
  background: #25282b;
  color: #ffffff;
}

/* Browsers draw a blue default focus ring on buttons after they're
   clicked/tabbed to — replace it with a black ring matching this button's
   own black outline, so it doesn't clash on click. */
.btn-outline:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

.btn-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #ffffff;
  padding: 18px 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* On case-study pages the header sits fixed at the true top edge,
   floating over the header ornament instead of being pushed below it.
   Uses a general sibling selector (not adjacent) so it keeps working
   no matter what markup gets inserted between the wave and the header. */
.header-wave ~ .site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
}

.header-wave ~ .site-header.site-header--scrolled {
  background: #ffffff;
}

.nav-home {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 20px;
  color: var(--color-black);
  padding: 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.nav-home:hover,
.nav-home:focus-visible {
  background: var(--color-black);
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 70px;
}

.nav-link {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-black);
  padding: 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--color-black);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--color-black);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 120px;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-teal);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 28px;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-teal);
  flex-shrink: 0;
}

.hero-headline {
  font-size: 64px;
  line-height: 1.2;
  margin: 0 0 28px;
  font-weight: 500;
  color: var(--color-black);
}

.hero-headline strong {
  font-weight: 700;
  display: block;
}

.hero-sub {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--color-black);
  margin: 0 0 44px;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero .hero-tag,
.hero .hero-headline,
.hero .hero-sub,
.hero .hero-actions {
  opacity: 0;
  animation: heroFadeUp 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero .hero-tag { animation-delay: 0.1s; }
.hero .hero-headline { animation-delay: 0.4s; }
.hero .hero-sub { animation-delay: 0.7s; }
.hero .hero-actions { animation-delay: 1.1s; }

@keyframes heroVisualIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.hero .hero-visual-img {
  opacity: 0;
  transform-origin: center right;
  animation: heroVisualIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-tag,
  .hero .hero-headline,
  .hero .hero-sub,
  .hero .hero-actions,
  .hero .hero-visual-img {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 720px;
  max-width: 42vw;
  aspect-ratio: 720 / 635;
}

.hero-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top right;
}

.hero-visual-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---------- Section title pattern ---------- */
.section-title {
  font-weight: 500;
  font-size: 40px;
  color: var(--color-black);
  margin: 0 0 16px;
  text-align: center;
}

.section-underline {
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-teal);
  margin: 0 auto 48px;
}

section {
  padding: 80px 0;
}

/* ---------- About ---------- */
.about-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 64px 80px;
  text-align: left;
  width: 1680px;
  max-width: 100%;
  margin: 0 auto;
}

.about-text {
  font-size: 24px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--color-black);
  margin: 0 0 44px;
}

/* ---------- Projects ---------- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-card[hidden] {
  display: none;
}

.project-card {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-project);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 520px;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: none;
}

.project-card:hover .project-cta {
  background: var(--color-black);
  color: #ffffff;
}

.project-content {
  order: 2;
  flex: 1 1 50%;
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  background: #ffffff;
}

/* content on the left, cover on the right */
.project-card--flip .project-content {
  order: 1;
}

.project-card--flip .project-cover {
  order: 2;
}

.project-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 40px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--color-teal-dark);
  width: fit-content;
}

.project-logo--img {
  background: transparent;
  padding: 0;
  justify-content: flex-start;
}

.project-logo--img img {
  height: 40px;
  width: auto;
  display: block;
  margin-left: 0;
}

.logo-clalit-badge {
  border-radius: 20px;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.project-logo--clalit {
  color: var(--color-clalit-accent);
  font-size: 20px;
  font-weight: 700;
  background: transparent;
  padding: 0;
}

.projects-toggle-wrap {
  display: flex;
  justify-content: center;
}

.projects-toggle {
  min-width: 147px;
}

/* Accordion reveal for the "Show More" project cards: grid-template-rows
   0fr -> 1fr animates smoothly to the content's real height without
   JS ever measuring pixels, and overflow:hidden on the inner wrapper
   clips it mid-transition. */
.projects-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects-more.is-open {
  grid-template-rows: 1fr;
}

.projects-more.no-transition {
  transition: none;
}

.projects-more-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 80px;
  min-height: 0;
}

/* Project logo shown above the case-study title, left-aligned. Takes over
   the 24px top spacing previously held by .project-title-block (moved here
   since the logo is now the first element), and uses a 20px bottom margin
   to match .case-tags' own margin-top — i.e. the same gap the title has to
   the tags row below it, per the design reference. */
.project-title-logo {
  margin-top: 24px;
  margin-bottom: 20px;
}

.project-title-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.project-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.project-title {
  font-size: 40px;
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
  opacity: 0;
  animation: caseTitleSlideIn 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes caseTitleSlideIn {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .project-title {
    animation: none;
    opacity: 1;
  }
}

.project-title b {
  font-weight: 700;
}

.project-underline {
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal));
}

.project-desc {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 400;
}

.project-actions {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 20px;
  padding: 20px;
  color: var(--color-black);
  background: transparent;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  transition: background 0.2s ease, color 0.2s ease;
}

.project-cover {
  order: 1;
  flex: 1 1 50%;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- per-project cover accent backgrounds ---- */
.cover-marketplace {
  background: var(--color-marketplace-cover);
}

.cover-realplus {
  background: var(--color-realplus-cover);
}

.cover-secondopinions {
  background: var(--color-secondopinions-cover);
}

.cover-marketplace img,
.cover-realplus img,
.cover-real img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Clalit's cover: solid brand-blue background with a halftone-dot
   ornament and a single phone screenshot bleeding off the bottom edge. */
.cover-clalit {
  background: var(--color-clalit-accent);
}

.cover-clalit img {
  position: absolute;
  width: auto;
  object-fit: unset;
}

/* Scoped with the extra .cover-clalit ancestor class so these beat
   .project-cover img's (class+element) specificity — a single class
   selector alone was silently losing to it, which is why width/height
   edits here weren't visibly taking effect before. */
.cover-clalit .clalit-cover-img--front {
  left: 10%;
  top: 6%;
  width: 60.32%;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
}

.cover-clalit .clalit-cover-ornament {
  right: -2%;
  top: -4%;
  width: 50%;
  height: auto;
  z-index: 1;
  opacity: 0.95;
}

.project-card--clickable {
  cursor: pointer;
}

/* Matches the Marketplace/REAL+ cards' actual natural height (measured via
   DevTools: 471.84px on-screen at the site's 0.8 body zoom => 589.8px in
   un-zoomed CSS px, the unit this stylesheet's own min-height:520px works
   in). Scoped to this card only so width/flex rules are untouched. */
#projectsLastDefaultCard.project-card {
  min-height: 589.8px;
}

.project-card--image-only {
  display: block;
  padding: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  transition: transform 0.2s ease;
}

.project-card--image-only:hover {
  transform: translateY(-4px);
  box-shadow: none;
}

.project-card--image-only img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.so-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Scoped with the .cover-secondopinions ancestor class to beat
   .project-cover img's (class+element) specificity — same trap documented
   above for .cover-clalit; a bare .so-photo class alone loses to it. */
.cover-secondopinions .so-photo {
  position: relative;
  z-index: 1;
  width: 87%;
  height: auto;
  margin-left: 10%;
  align-self: flex-end;
  border-radius: 24px 0 0 0;
  object-fit: cover;
}

.so-actions {
  gap: 55px;
}

.so-logo {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.so-logo-line {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.so-mini-card {
  position: absolute;
  z-index: 2;
  top: 42px;
  left: 40px;
  width: 237px;
  background: #ffffff;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 26px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.so-mini-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  background: #ffffff;
  border-radius: 16px;
}

.so-mini-card .so-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #425cc7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  flex-shrink: 0;
}

.so-mini-card .so-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* Full-bleed decorative layer (light panel + blob + squiggle line),
   extracted straight from the reference cover SVG so the shapes keep the
   same relative composition as the source regardless of card size. Sits
   behind the photo and mini-card (z-index: 0). */
.so-squiggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.so-readmore {
  font-size: 11px;
  font-weight: 600;
  color: #425cc7;
  text-decoration: none;
  margin-top: -2px;
}

.so-mini-card h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1d2b4f;
}

.so-mini-card .so-underline {
  width: 32px;
  height: 2px;
  background: #d30b59;
  border-radius: 2px;
}

.so-mini-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #011e41;
}

.so-mini-card .so-cta {
  display: block;
  margin-top: 4px;
  background: #425cc7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 10px;
}

/* ---------- Contact ---------- */
.contact-cards {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.contact-card {
  flex: 1 1 340px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: box-shadow 0.15s ease;
}

.contact-card:hover {
  box-shadow: none;
}

.contact-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.contact-card:hover .contact-icon-circle {
  background: #25282b;
}

.contact-icon-circle img {
  width: 26px;
  height: 26px;
}

.contact-card-label {
  font-size: 16px;
  color: var(--color-muted);
  margin: 0 0 6px;
  font-weight: 500;
}

.contact-card-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0;
  word-break: break-word;
}

#contact {
  padding-bottom: 0;
}

.contact-wave {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1920 / 434;
  display: block;
}

.contact-wave img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  z-index: 0;
  display: block;
}

/* Real interactive buttons positioned exactly over the static icon
   glyphs baked into wave.svg (percentages derived from its 1920x434
   viewBox), so only the live, hoverable version is visible. */
.contact-wave-btn {
  position: absolute;
  top: 70.85%;
  width: 2.76vw;
  height: 2.76vw;
  aspect-ratio: 1 / 1;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #25282b;
  border-radius: 8px;
  color: #25282b;
  transition: background 0.15s ease, color 0.15s ease;
}

.contact-wave-btn svg {
  width: 135%;
  height: 135%;
}

.contact-wave-btn:hover {
  background: #25282b;
  color: #ffffff;
}

.contact-wave-btn--linkedin {
  left: 46.17%;
}

.contact-wave-btn--behance {
  left: 51.07%;
}

.contact-wave-copyright {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.2%;
  z-index: 1;
  margin: 0;
  text-align: center;
  color: #25282b;
  font-size: 13px;
  font-family: var(--font-family);
}

.icon-inline {
  width: 18px;
  height: 18px;
}

/* ---------- Jump to top ---------- */
.jump-top {
  position: fixed;
  right: 40px;
  bottom: 82px;
  z-index: 50;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-black);
  padding: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.jump-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.jump-top:hover,
.jump-top:focus-visible {
  background: var(--color-black);
  color: #ffffff;
}

.jump-top-icon {
  width: 12px;
  height: 12px;
}

@media (max-width: 860px) {
  .jump-top {
    right: 16px;
    bottom: 66px;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* "My Role" / "Project Stakeholders" — heading fades in slowly, then each
   icon card reveals one after another. */
.case-subheading:has(+ .case-icon-grid) {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.case-subheading.in-view:has(+ .case-icon-grid) {
  opacity: 1;
  transform: translateY(0);
}

.case-icon-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.case-icon-grid.in-view .case-icon-card {
  opacity: 1;
  transform: translateY(0);
}

.case-icon-grid.in-view .case-icon-card:nth-child(1) { transition-delay: 0s; }
.case-icon-grid.in-view .case-icon-card:nth-child(2) { transition-delay: 0.1s; }
.case-icon-grid.in-view .case-icon-card:nth-child(3) { transition-delay: 0.2s; }
.case-icon-grid.in-view .case-icon-card:nth-child(4) { transition-delay: 0.3s; }
.case-icon-grid.in-view .case-icon-card:nth-child(5) { transition-delay: 0.4s; }
.case-icon-grid.in-view .case-icon-card:nth-child(6) { transition-delay: 0.5s; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  :root {
    --side-margin: 64px;
  }
  .hero-headline {
    font-size: 52px;
  }
  .hero-sub,
  .about-text {
    font-size: 20px;
  }
}

@media (max-width: 1100px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-visual {
    max-width: 100%;
    width: 460px;
    align-self: center;
  }
  .project-card {
    flex-direction: column;
    min-height: 0;
  }
  .project-cover,
  .project-card--flip .project-cover {
    order: -1;
    min-height: 280px;
  }

  .project-content,
  .project-card--flip .project-content {
    order: 2;
  }
  .about-card {
    padding: 48px 32px;
  }
}

@media (max-width: 860px) {
  :root {
    --side-margin: 28px;
  }
  .site-header {
    padding: 16px 20px;
    flex-wrap: wrap;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    display: none;
    gap: 4px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .hero {
    padding: 60px 0 80px;
  }
  .hero-headline {
    font-size: 38px;
  }
  .hero-sub {
    font-size: 18px;
  }
  .hero-tag {
    font-size: 16px;
  }
  .section-title {
    font-size: 32px;
  }
  .about-card {
    padding: 32px 20px;
  }
  .about-text {
    font-size: 18px;
  }
  .project-content {
    padding: 28px;
    gap: 28px;
  }
  .project-title {
    font-size: 24px;
  }
  .project-desc {
    font-size: 17px;
  }
  .contact-card {
    flex: 1 1 100%;
  }
}

/* ---------- Video modal (project pages) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 40, 43, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  max-width: 1100px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
  opacity: 1;
}

/* Title bar: shows the title of the prototype card whose "Watch" button
   opened this modal (set via JS in script.js). Sits on the same row as
   the close button, so it's given right padding to clear it. */
.modal-title-block {
  padding-right: 56px;
}

.modal-title {
  position: relative;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-black);
  margin: 0 0 24px;
  padding-bottom: 10px;
  display: inline-block;
}

.modal-title:empty {
  display: none;
}

.modal-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  border-radius: 1px;
  background: #1597a1;
}

.modal-box video {
  width: 100%;
  display: block;
  border-radius: 12px;
  max-height: 75vh;
  background: #000;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  color: #0d2024;
  transition: background 0.15s ease;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #ecf2fc;
}

/* ---------- Case study page ---------- */
.header-wave {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1920 / 434;
  display: block;
  line-height: 0;
}

.header-wave img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.page-title-kicker {
  position: absolute;
  top: 248px;
  left: 0;
  width: 100%;
  z-index: 2;
  text-align: center;
}

.page-title-kicker .section-title {
  margin: 0 0 20px;
  font-weight: 700;
}

.page-title-kicker .section-underline {
  margin: 0 auto;
}

.breadcrumb-wrap {
  position: absolute;
  top: 400px;
  left: 0;
  width: 100%;
  z-index: 5;
}

.case-hero {
  padding: 60px 0 40px;
}

.case-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 14px;
  color: var(--color-black);
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.case-nav-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.case-nav-btn:hover,
.case-nav-btn:focus-visible {
  background: var(--color-black);
  color: #ffffff;
}

/* Label is always visible (not hover-revealed) — the button always
   reads "Previous Project" / "Next Project" alongside its arrow. */
.case-nav-btn-label {
  white-space: nowrap;
}

/* Previous/Next project navigation — sits in normal flow at the bottom
   of each case-study page's content, aligned to the same left/right
   edges as every other page element (not floating), so it can never
   overlap page content. */
.case-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 60px 0 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-teal-dark);
  margin-bottom: 32px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  margin-bottom: 20px;
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00aaa1;
  font-weight: 400;
  transition: color 0.15s ease;
}

.breadcrumb-home:hover,
.breadcrumb-home:focus-visible {
  color: #25282b;
  font-weight: 700;
}

.breadcrumb-arrow {
  width: 11px;
  height: 14px;
  flex-shrink: 0;
}

.breadcrumb-current {
  color: #00aaa1;
  font-weight: 400;
}

.case-cover {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-project);
  margin: 40px 0 80px;
}

.case-meta {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  margin: 40px 0 80px;
  padding: 40px;
  background: #f7fafa;
  border-radius: 20px;
}

.case-meta-item h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-teal-dark);
  margin: 0 0 8px;
}

.case-meta-item p {
  font-size: 18px;
  margin: 0;
  max-width: 320px;
}

/* content-visibility: auto (skip rendering off-screen sections) was tried
   here as a scroll-performance optimization, tuned three separate times
   (default placeholder, per-section accurate placeholder, then disabled
   just for Design System) and confirmed broken in a new way each time —
   blank gaps, sections that never render, glitchy pop-in with stale
   elements left overlapping. This page leans heavily on absolutely
   positioned, layered mockup elements (browser-window mockups, comparison
   sliders), and that combination is fundamentally unreliable with
   content-visibility's size containment. Removed outright, for every
   section, rather than tuned again: always-correct rendering matters far
   more here than the scroll-performance gain. */
.case-section {
  margin-bottom: 80px;
}

.case-section h2 {
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 12px;
  text-align: center;
}

/* Typewriter reveal for every centered section title (.section-title on the
   homepage, .case-section h2 on the case-study pages), matching the
   uploaded "Animation for main titles" reference: a hard-edged left-to-right
   reveal (no cursor, no per-letter fade/blur) that types the title in once,
   the first time it scrolls into view. script.js wraps each title's text in
   a .title-typewriter span at runtime so the reveal is clipped to the
   text's own width rather than the full (centered) heading width — a plain
   clip-path on the heading itself would reveal blank space before the
   centered text starts. Same "add .in-view via IntersectionObserver, then
   unobserve" mechanism used everywhere else on this site. */
.title-typewriter {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.3s ease-out;
}
.section-title.in-view .title-typewriter,
.case-section h2.in-view .title-typewriter {
  clip-path: inset(0 0 0 0);
}

.case-section .section-underline {
  margin-bottom: 28px;
  background: var(--case-accent, var(--color-teal));
}

.case-section p {
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-black);
  max-width: 900px;
}

.case-placeholder {
  border: 1.5px dashed rgba(0, 170, 161, 0.5);
  background: rgba(0, 170, 161, 0.05);
  border-radius: 14px;
  padding: 32px;
  font-size: 15px;
  color: var(--color-muted);
  max-width: 900px;
}

.video-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.video-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border-radius: 999px;
  border: none;
  background: var(--color-teal);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.video-trigger:hover,
.video-trigger:focus-visible {
  background: var(--color-black);
  color: #ffffff;
  transform: translateY(-1px);
}

.play-icon {
  width: 12px;
  height: 12px;
}

.case-watch-card .play-icon {
  width: 20.4px;
  height: 20.4px;
}

.case-cta {
  text-align: center;
  padding: 80px 0;
  background: #f7fafa;
  border-radius: 20px;
  margin-bottom: 80px;
}

.case-cta h3 {
  font-size: 30px;
  margin: 0 0 24px;
}

/* ---------- Case study — use cases / goals / process / problems-solutions ---------- */
.case-section p + p {
  margin-top: 16px;
}

.case-usecases {
  margin-top: 24px;
  border: 1px solid var(--case-accent, #4e59a4);
  border-radius: 20px;
  padding: 34px;
}

.case-usecases h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 16px;
  text-align: center;
}

.case-usecase + .case-usecase {
  margin-top: 32px;
}

.case-usecase h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
}

.case-usecase p {
  position: relative;
  padding-left: 22px;
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 10px;
  max-width: none;
  /* Reveal-on-scroll: each bullet slides in slowly from the left, one
     after another across the whole Use cases block (both "Direct to
     Clinician" and "Screening Provider" groups share one running stagger
     via --use-i, set per-<p> in script.js). Clalit's Usability Testing
     bullet lists (.case-goal-list li, inside the same .case-usecases
     structure) share this exact same reveal — see the shared --use-i
     assignment and IntersectionObserver in script.js. */
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  transition-delay: calc(var(--use-i, 0) * 0.18s);
}

.case-usecase .case-goal-list li {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  transition-delay: calc(var(--use-i, 0) * 0.18s);
}

.case-usecases.in-view .case-usecase p,
.case-usecases.in-view .case-usecase .case-goal-list li {
  opacity: 1;
  transform: translateX(0);
}

.case-usecase p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--case-accent, var(--color-teal-dark));
}

.case-goal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-goal-list li {
  position: relative;
  padding-left: 26px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-black);
}

/* Entrance animation, scoped to The Main Goals section only: for each bullet,
   the circle marker fades in first, then — only once that finishes — its
   text slides in from the left and fades in. Only after THAT finishes does
   the next bullet's circle start. This is driven entirely by script.js
   (see revealGoalList/mainGoalsObserver), which toggles the goal-circle-in
   and goal-text-in classes one step at a time via chained setTimeouts keyed
   to these exact transition durations — a fixed CSS transition-delay can't
   guarantee "wait for the previous step to actually finish" the way a JS
   chain can, so this replaced an earlier nth-child/calc()-delay version
   that let items visibly overlap. (Clalit's Usability Testing bullet lists
   use a different, non-sequential version of this — see
   #usability-testing rules further down — where the circle and its text
   appear together, not one after the other.) */
#the-main-goals .case-goal-list li::before {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
#the-main-goals .case-goal-list li > span {
  display: inline-block;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
#the-main-goals .case-goal-list li.goal-circle-in::before {
  opacity: 1;
  transform: scale(1);
}
#the-main-goals .case-goal-list li.goal-text-in > span {
  opacity: 1;
  transform: translateX(0);
}

.case-goal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--case-accent, var(--color-teal-dark));
}

.case-lead-bullet {
  position: relative;
  padding-left: 26px;
}

.case-lead-bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--case-accent, var(--color-teal-dark));
}

/* Lead-in line above the Reflection & Impact stat panel: spans the same
   full width as the white .case-ri-panel behind the cards, instead of
   the usual 900px prose column. */
.case-section .case-ri-lead {
  max-width: none;
}

/* Lead-in line above the Site Map diagram: spans the full container width
   like the other wide lead paragraphs above, instead of the usual 900px
   prose column. */
#site-map .case-lead-bullet {
  max-width: none;
}

/* Caption paragraph between a Before/After block's title and its pixlane
   slider: spans the full container width, same as the other wide lead
   paragraphs (.case-ps-lead, e.g. above Usability Testing), instead of
   the usual 900px prose column. Flush left (no auto-centering) so it
   starts at the same edge as the h3 title above it. */
.case-section .case-slider-caption {
  max-width: none;
  margin: 0 0 20px;
}

/* Lead-in line above a full-width bordered box (.case-problems-solutions,
   .case-ps-box, .case-usecases, etc.) or the .case-hr divider: spans the
   same full width as that box/divider, instead of the usual 900px prose
   column. Used above "Identify the Problems and suggest Solutions" on all
   5 pages, and above the Usability Testing findings box. */
.case-section .case-ps-lead {
  max-width: none;
}

.case-process-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.case-process-step {
  min-width: 0;
  perspective: 1400px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.case-process-steps.in-view .case-process-step {
  opacity: 1;
  transform: translateY(0);
}

.case-process-steps.in-view .case-process-step:nth-child(1) { transition-delay: 0s; }
.case-process-steps.in-view .case-process-step:nth-child(2) { transition-delay: 0.12s; }
.case-process-steps.in-view .case-process-step:nth-child(3) { transition-delay: 0.24s; }
.case-process-steps.in-view .case-process-step:nth-child(4) { transition-delay: 0.36s; }
.case-process-steps.in-view .case-process-step:nth-child(5) { transition-delay: 0.48s; }
.case-process-steps.in-view .case-process-step:nth-child(6) { transition-delay: 0.6s; }

/* True 3D card flip: .case-process-flip rotates 180deg on the Y axis;
   the two faces are stacked absolutely and each hidden when facing
   away from the viewer (backface-visibility), so the front (number +
   title) turns away as the back (accent-colored panel + description)
   turns into view — matching the reference "Front Side / Back Side"
   card-flip video, not a flap/reveal animation.
   Dimensions match the "design process unit" Figma spec exactly:
   189.036 x 154.38 card (aspect-ratio ~1.2245), 6.3px corner radius,
   18px padding on every side on both faces, soft ambient drop shadow
   (blur 5, 25% black, no offset). */
.case-process-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 189.036 / 154.38;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.case-process-step:hover .case-process-flip,
.case-process-step:focus-within .case-process-flip {
  transform: rotateY(180deg);
}

.case-process-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  padding: 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  backface-visibility: hidden;
  box-sizing: border-box;
  overflow: hidden;
}

.case-process-front {
  background: #ffffff;
}

.case-process-back {
  background: var(--case-accent, #4e59a4);
  transform: rotateY(180deg);
  justify-content: flex-start;
}

.case-process-num {
  display: block;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: var(--case-accent, #4e59a4);
  margin: 0;
}

.case-process-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--case-accent, #4e59a4);
  margin: 0;
}

.case-process-back p {
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
  color: var(--color-black);
  width: 100%;
}

/* Marketplace, REAL+, and SecondOpinions' accent colors are dark/mid
   tones where white reads better on the flipped card back than the
   sitewide default black. REAL and Clalit keep the default. */
.case-accent-marketplace .case-process-back p,
.case-accent-realplus .case-process-back p,
.case-accent-secondopinions .case-process-back p {
  color: #ffffff;
}

.case-problems-solutions {
  border: 1px solid var(--case-accent, #4e59a4);
  border-radius: 20px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.ps-heading {
  margin-bottom: 20px;
}

.ps-heading span {
  font-size: 19px;
  font-weight: 500;
}

.ps-underline {
  width: 60px;
  height: 2px;
  border-radius: 2px;
  margin-top: 8px;
}

.ps-underline-red {
  background: #d31715;
}

.ps-underline-green {
  background: #0db14b;
}

.ps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ps-list li {
  position: relative;
  padding-left: 24px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-black);
}

.ps-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ps-heading.ps-problems ~ .ps-list li::before {
  background: #d31715;
}

.ps-heading.ps-solutions ~ .ps-list li::before {
  background: #0db14b;
}

/* Problems & Solutions — flip-card layout (piloted on REAL+, since rolled
   out to Marketplace too — see --case-ps-tint on each .case-accent-X
   wrapper for the per-page color hook; other pages keep their original
   layout unless/until asked).
   A third layout alongside the two documented in the design-system skill
   (two-column .ps-column list; stacked .case-ps-box) — no section titles;
   each row is its own independently-flipping card, defaulting to its
   "Problem" face. Flipping is CLICK-driven (a "Show Solution"/"Show
   Problem" pill button that only appears on hover of the row), not a plain
   hover-triggers-flip — .ps-flip-row.is-flipped toggled by script.js on
   button click controls the rotation, so the card stays on whichever face
   was last chosen even after the mouse leaves. Reuses the same 3D-flip
   MECHANISM as .case-process-flip (transform-style: preserve-3d,
   backface-visibility: hidden, 180deg rotation) but rotates around the X
   axis (vertical/top-to-bottom), not Y (left-to-right) like Design Process —
   per explicit request. Rows are numbered 1-N (paired problem/solution
   share a number) instead of a plain colored dot marker. */
.case-problems-solutions.ps-flip-layout {
  display: block;
}

.ps-flip-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-flip-row {
  perspective: 1400px;
  /* Reveal-on-scroll: each row slides in slowly from the left, one after
     another. Lives on the row (not .ps-flip-card) because the card itself
     already owns `transform` for the 3D flip (rotateX) — animating a
     translateX on the same element would fight that. --row-i is set
     per-row in script.js (its index within .ps-flip-list), so the stagger
     scales to however many problem/solution rows a page has, the same
     fix applied to the Main Goals list's circle+text reveal. */
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  transition-delay: calc(var(--row-i, 0) * 0.18s);
}
.ps-flip-list.in-view .ps-flip-row {
  opacity: 1;
  transform: translateX(0);
}

/* display: grid + grid-area: 1/1 on both faces (below) stacks them in the
   same cell instead of position:absolute/inset:0 — the card's height
   auto-fits to whichever face is taller (problem/solution copy lengths
   don't match 1:1), with no risk of the shorter face's fixed height
   clipping the longer face's text. */
.ps-flip-card {
  position: relative;
  display: grid;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.ps-flip-row.is-flipped .ps-flip-card {
  transform: rotateX(180deg);
}

.ps-flip-face {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 14px 24px;
  box-sizing: border-box;
  backface-visibility: hidden;
}

.ps-flip-back {
  transform: rotateX(180deg);
}

.ps-flip-front-text,
.ps-flip-back-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.ps-flip-back-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ps-label {
  font-size: 14px;
  font-weight: 700;
}

.ps-label-problem {
  color: #d31715;
}

.ps-label-solution {
  color: #0db14b;
}

.ps-num {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}

.ps-num-red { color: #d31715; }
.ps-num-green { color: #0db14b; }

.ps-flip-face p {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-black);
}

/* "Show Solution"/"Show Problem" pill — visually matches the site's dark
   floating "Next project" nav button, but always solid (not a hover-reveal
   icon-to-pill expansion like .case-nav-btn — this one just fades in/out
   with the row hover, already showing its full label). Hidden until the
   row is hovered/focused so it doesn't compete with the card's text at
   rest, per the reference screenshot. */
/* Reveals left-to-right via clip-path (inset from the right edge going to
   0), the same soft "grow" feel as .case-nav-btn's label expanding out
   from its fixed icon on hover — not a plain instant opacity swap.
   pointer-events stays off at rest so the still-clipped (but still laid
   out) button can't intercept clicks/hover before it's actually visible. */
.ps-flip-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #20293c;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  transition: clip-path 0.4s cubic-bezier(0.4, 0.2, 0.2, 1), opacity 0.4s ease, background 0.15s ease;
}

.ps-flip-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Some Problem cards (SecondOpinions) carry a second button alongside
   "Show Solution" — one that opens the prototype video instead of
   flipping. Both share .ps-flip-btn's exact look/reveal animation; this
   wrapper just keeps them as a single flex item so .ps-flip-face's
   justify-content: space-between (text on the left, this group on the
   right) still only sees two children. */
.ps-flip-btn-group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ps-flip-row:hover .ps-flip-btn {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

.ps-flip-row:hover .ps-flip-face {
  box-shadow: none;
}

.ps-flip-btn:hover,
.ps-flip-btn:focus-visible {
  background: #000000;
}

@media (max-width: 1100px) {
  .case-process-steps {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 32px;
  }

  .case-problems-solutions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Card keeps its exact 189:154.38 aspect-ratio at every size — width
     shrinks with the 2-column layout and height follows proportionally.
     Number/title/paragraph font-sizes are further auto-fit by
     fitCaseProcessCards() in script.js so long copy never overflows a
     narrower card. */

  /* Most mobile browsers trigger :hover on first tap (and :focus-within
     via tabindex covers the rest), so the flip still works on touch —
     tapping elsewhere flips it back. */
}

/* ---------- Case study — tags, dividers, icon grids, accents ---------- */
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.case-tag {
  background: rgba(37, 40, 43, 0.06);
  color: var(--color-black);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 40px;
  opacity: 0;
  animation: caseTitleSlideIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.case-tags .case-tag:nth-child(1) { animation-delay: 0.4s; }
.case-tags .case-tag:nth-child(2) { animation-delay: 0.5s; }
.case-tags .case-tag:nth-child(3) { animation-delay: 0.6s; }
.case-tags .case-tag:nth-child(4) { animation-delay: 0.7s; }
.case-tags .case-tag:nth-child(5) { animation-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .case-tag {
    animation: none;
    opacity: 1;
  }
}

.case-hr {
  border: none;
  border-top: 1px solid #00aaa1;
  margin: 56px 0;
}

.case-subheading {
  position: relative;
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  padding-bottom: 12px;
  margin: 24px 0 16px;
}

.case-subheading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal));
}

.case-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.case-icon-card {
  width: 148px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 22px 12px;
  text-align: center;
}

.case-icon-card .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: #f2f8f7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #25282b;
}

.case-icon-card .icon-circle svg {
  width: 28px;
  height: 28px;
}

.case-icon-card span {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--case-accent, var(--color-teal-dark));
}

/* Marketplace & Clalit use a tinted icon chip instead of the default
   neutral one. Marketplace's icon matches its accent; Clalit's icon uses
   its own dark navy while the label uses the accent blue. */
.case-accent-marketplace .icon-circle {
  background: var(--color-marketplace-cover);
  color: var(--case-accent);
}

/* "My Role" / "Project Stakeholders" toggle buttons + collapsible dark
   panels (Marketplace, pilot page — see project-marketplace.html).
   Replaces the old always-visible .case-subheading + .case-icon-grid
   pair with two buttons stacked vertically; clicking one reveals its
   own icon-card panel directly below it and closes whichever panel was
   already open (script.js handles the mutual-exclusivity). */
.case-role-toggles {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  /* Top margin matches the gap from the button row down to the open
     panel's icon cards below (4px flex gap + .case-role-panel's own
     24px top padding = 28px), so the Use Cases box sits the same
     distance above the buttons as the buttons sit above the cards. */
  margin: 28px 0 44px;
}

/* Buttons sit in their own horizontal row, grouped above all three
   accordion panels (moved out of the old vertical button-then-panel
   interleaving) — whichever panel is open still expands full-width
   below the whole row. */
.case-role-buttons-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Button: identical visual style + hover behavior to .jump-top (site's
   established "pill link" pattern) — transparent by default, solid dark
   fill + white text on hover/focus, same padding/radius/gap/type scale.
   Unlike .jump-top this one sits inline in normal flow (not
   position:fixed), so those rules are intentionally omitted. */
.case-role-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-black);
  padding: 14px 20px;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Bold + accent-blue label while its panel is open — a persistent cue
   (unlike hover, which stays transient) so it's clear which iconography
   category is currently showing below the row. Uses the page's own
   --case-accent (Marketplace's purple-blue) rather than a hardcoded
   color, matching every other per-page accent hook on the site. Placed
   before the :hover rule below so hover still wins (same visual style +
   hover behavior as Jump to Top, per the original request) even when
   hovering a button that's currently active. */
.case-role-btn[aria-expanded="true"] {
  font-weight: 700;
  color: var(--case-accent, var(--color-teal));
}

.case-role-btn:hover,
.case-role-btn:focus-visible {
  background: var(--color-black);
  color: #ffffff;
}

.case-role-btn-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

/* Arrow rotates to point down while its panel is open — the only visual
   cue that persists after the mouse leaves (hover itself stays
   transient, matching Jump to Top exactly, per the request). */
.case-role-btn[aria-expanded="true"] .case-role-btn-icon {
  transform: rotate(90deg);
}

/* Accordion collapse: same grid-template-rows 0fr -> 1fr technique used
   site-wide (.projects-more, .rp-intray-accordion-body) — animates
   smoothly to the panel's real content height with no JS measurement. */
.case-role-accordion {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  width: 100%;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-role-accordion.is-open {
  grid-template-rows: 1fr;
}

.case-role-accordion.no-transition {
  transition: none;
}

.case-role-accordion-inner {
  overflow: hidden;
  min-height: 0;
}

.case-role-panel {
  /* .case-role-accordion / .case-role-accordion-inner both need
     overflow: hidden for the height-collapse animation (see above), but
     that also clips anything that pokes outside this panel's own box —
     including each card's own box-shadow (--shadow-card has a 20px
     blur). With zero padding here the cards sat flush against that
     clipping edge, cropping the shadow unevenly and making it read as
     heavier/different from the same card elsewhere on the site. This
     padding is just breathing room for the shadow to render in full;
     it does not bring back the dark background that was removed. */
  margin: 8px 0 4px;
  padding: 24px 8px 28px;
}

.case-role-panel .case-role-icon-grid {
  margin-bottom: 0;
}

.case-accent-clalit .icon-circle {
  background: #cceffc;
  color: #061c3f;
}

/* per-project accent overrides */
.case-accent-marketplace { --case-accent: #4e59a4; --case-ri-tint: #dfeef5; --case-ps-tint: #dfeef5; }
.case-accent-realplus { --case-accent: #226979; --case-ri-tint: #b4dbde; --case-ps-tint: #f2f8f7; }
.case-accent-secondopinions { --case-accent: #425cc7; --case-ri-tint: #a5c5ed; }
/* Every hotspot dot on this page uses the project's own accent blue by
   default, rather than needing a one-off scoped class per instance. */
.case-accent-secondopinions .mp-indicator-dot,
.case-accent-secondopinions .mp-indicator-dot::before {
  background: #425cc7;
}
.case-accent-clalit { --case-accent: #00aeef; }
/* Before/After hotspots written for only one design (data-pixlane-design
   old/new): hidden by script.js whenever the other design is the one
   showing under them. */
.mp-indicator.is-design-hidden { display: none; }
/* Clalit hotspot dots use the project's official accent blue. */
.case-accent-clalit .mp-indicator-dot,
.case-accent-clalit .mp-indicator-dot::before {
  background: var(--case-accent);
}
.case-accent-real { --case-accent: #ffb600; --case-ri-tint: #f7e8c4; }

/* ---------- Case study — full-width figure blocks (real cropped screenshots) ---------- */
.case-figure {
  margin: 32px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  max-width: 1200px;
}

.case-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.case-figure-caption {
  padding: 14px 24px;
  font-size: 14px;
  color: var(--color-muted);
  border-top: 1px solid rgba(37, 40, 43, 0.08);
}

.case-figure-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
  max-width: 1400px;
}

.case-figure-row .case-figure {
  margin: 0;
}

@media (max-width: 1100px) {
  .case-figure-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Case study — subsection label (e.g. "Menu", "Navigation") ---------- */
.case-subsection {
  margin: 40px 0 24px;
}

.case-subsection h3 {
  position: relative;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  display: inline-block;
  padding-bottom: 10px;
}

.case-subsection h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal));
}

/* ---------- Case study — pie chart data (real transcribed percentages) ---------- */
.case-pie-block {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 28px 0 40px;
}

.case-pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Entrance animation: one slice at a time — a slice fills in with its
   color, THEN its matching legend row (swatch + value + label) appears,
   THEN the next slice starts. Both the per-slice growth and the per-row
   reveal are sequenced explicitly in script.js (setTimeout chain, one
   slice/row pair fully finishing before the next begins) rather than via
   CSS nth-child delays, since the reveal order must exactly track which
   slice just finished — not a fixed preset stagger. Slices are always at
   full opacity while growing (only their stroke-dasharray length animates,
   duration set inline by script.js); legend rows get a plain opacity
   fade-in toggled via .is-visible, added one row at a time. */
.case-pie-arc {
  opacity: 0;
  transform-origin: 16px 16px;
}
.case-pie-block.in-view .case-pie-arc { opacity: 1; }

.case-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-pie-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.case-pie-legend li.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.case-pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.case-pie-question {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 4px;
  /* Subtle slide-in-from-the-left reveal, same mechanism/values as the
     .case-goal-list text reveal — opacity + translateX toggled by .in-view,
     added to the DOM one question at a time by the sequencer in script.js
     (not a plain scroll IntersectionObserver per element) so each question
     only appears once the previous question+pie pair has fully finished. */
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}
.case-pie-question.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Case study — Design System colors ---------- */
.case-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin-bottom: 40px;
}

.case-color-swatch {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}

.case-color-fill {
  height: 90px;
}

.case-color-label {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--color-black);
}

.case-type-scale {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 40px;
}

.case-type-scale span {
  font-weight: 700;
  color: var(--color-navy);
}

/* ---------- Case study — wireframe / feature screenshot + callout blocks ---------- */
.case-shot {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 24px 0;
}

.case-shot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Clalit "Final Design" — a single tall reference composite (phone
   mockups + decorative blobs, flattened from Figma) with its caption
   text (title + bullet, per screen group) erased from the PNG pixels and
   replaced with live HTML so it's real, selectable Eudoxus Sans text
   instead of flattened raster type. Each .fd-caption is positioned with
   left/top/width as percentages (set inline per block, one per screen
   group) — percentages so the captions stay locked to their exact spot
   on the image at every viewport width, since the image itself scales
   via width:100% and percentages resolve against that same scaled box. */
.fd-shot-wrap {
  position: relative;
  max-width: 1154px;
  margin: 24px auto;
}
.fd-shot-wrap > img {
  display: block;
  width: 100%;
  height: auto;
}
.fd-caption {
  position: absolute;
}
.fd-caption h4 {
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 700;
  color: #25282b;
  margin: 0 0 8px;
}
.fd-caption .case-goal-list {
  gap: 0;
}
.fd-caption .case-goal-list li {
  font-family: var(--font-family);
  font-weight: 400;
}

/* Word-by-word scale+fade reveal, per the reference recording — script.js
   wraps every word of each .fd-caption's h4 and li text in a .fd-word
   span and sets --word-i (a single running index across the title +
   bullet together), then toggles .in-view on the .fd-caption itself via
   IntersectionObserver. */
.fd-caption .fd-word {
  display: inline-block;
  opacity: 0;
  transform: scale(1.4);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  transition-delay: calc(var(--word-i, 0) * 0.05s);
}
.fd-caption.in-view .fd-word {
  opacity: 1;
  transform: scale(1);
}

/* Individual phone screens in the Final Design composite — real <img>
   overlays (not baked into the base PNG) so each can reveal on its own,
   per the reference recording: every screen starts as a blurred/faded
   placeholder and sharpens into place, one screen at a time within its
   group (Login Screens, Home Screen, Medical Documents Screens, Doctors
   Screens). script.js groups phones by data-fd-group, watches the first
   phone of each group with IntersectionObserver, and adds .in-view to
   every phone in that group at once — the stagger itself comes from
   transition-delay keyed to each phone's own --fd-i (its order within
   the group), not from separate trigger times. */
.fd-phone {
  position: absolute;
  height: auto;
  display: block;
  opacity: 0;
  filter: blur(16px) drop-shadow(0 5px 14px rgba(17, 43, 85, 0.18));
  transform: scale(0.96);
  transition: opacity 0.55s ease-out, filter 0.55s ease-out, transform 0.55s ease-out;
  transition-delay: calc(var(--fd-i, 0) * 0.35s);
}
.fd-phone.in-view {
  opacity: 1;
  filter: blur(0) drop-shadow(0 5px 14px rgba(17, 43, 85, 0.18));
  transform: scale(1);
}

.case-feature-block {
  margin: 40px 0;
}

.case-feature-block h3 {
  position: relative;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 12px;
}
/* "Patient Record - Treatment recommendations": only the "Patient
   Record - " prefix stays at the heading's own bold weight (via <b>,
   which inherits it) — "Treatment recommendations" itself renders
   regular. Scoped to this one h3's own span class rather than the
   shared .case-feature-block h3 rule, so no other feature-block title
   on the site is affected. */
.rp-tr-h3-regular {
  font-weight: 400;
}

.case-feature-block h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal));
}

.case-feature-block .case-shot,
.case-feature-block .mp-app {
  margin-top: 0;
}

/* Wireframes section spacing: all 5 "images" in this subsection (the
   sketch + the 3 feature blocks that follow it, one of which itself
   renders as multiple screens) need the exact same 20px gap between
   them, set explicitly on every edge rather than left to margin
   collapsing. mp-wireframe-first (the sketch block) keeps
   margin-bottom: 0 so the gap down to the next block is controlled
   solely by that block's own margin-top. (The "Show More" accordion
   these blocks used to be revealed by has been removed — every
   wireframe image now renders inline, one below the other, always.) */
.mp-wireframe-first {
  margin-bottom: 0;
}

/* The "select folder" / "checking progress" / "found scans" screens are 3
   of the 5 "images" in this subsection but live as sibling children inside
   ONE .case-feature-block (their shared narrative flow), each normally
   spaced only 18px apart via .mp-modal-card/.mp-flow-side-note's own
   margin-bottom. Bump that to 20px here so every one of the 5 images reads
   as equally spaced, and zero out the last child's margin so it doesn't
   double up with the next case-feature-block's own spacing. */
.case-feature-block > .mp-modal-card,
.case-feature-block > .mp-flow-side-note {
  margin-bottom: 20px;
}

.case-feature-block > .mp-modal-card:last-child,
.case-feature-block > .mp-flow-side-note:last-child {
  margin-bottom: 0;
}

/* Design System "Show More" — its own accordion, unrelated to the former
   Marketplace Wireframes toggle above (now removed); its own spacing
   since case-ds-group/case-ds-image-block children already carry their
   own top margin via case-section h3 rules. */
.case-ds-more {
  margin-top: 4px;
}

.case-ds-more[hidden] {
  display: none;
}

.case-ds-more .projects-more-inner {
  gap: 0;
}

.case-ds-toggle-wrap {
  margin-top: 32px;
}



/* ---------- Case study — Final Design screenshots ---------- */
.case-final-block {
  margin: 36px 0;
}

.case-final-block-head {
  /* align-items:flex-start (not center) — the title's own box includes
     12px of padding-bottom to make room for its underline, so centering
     against that full box would sit the switch too low relative to just
     the "Home Page" text. Top-aligning both, then nudging the switch down
     by margin-top (see .hotspot-toggle) lines it up with the text itself
     instead. gap:20px (not space-between) puts the switch a fixed 20px to
     the right of the title, not flush with the row's far edge. */
  display: flex;
  align-items: flex-start;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.case-final-block h3 {
  position: relative;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 12px;
  display: inline-block;
}

.case-final-block-head h3 {
  margin-bottom: 0;
}
/* The "-head" variant (title + "Hide hotspots" toggle sharing a row) zeroes
   the title's own margin-bottom above so flex-aligning it against the
   toggle doesn't push the whole row down — but that also meant nothing
   was left providing the usual 16px gap before whatever comes next,
   making title-to-content spacing inconsistent depending on whether a
   given instance happens to use the plain h3 (still 16px) or this head
   wrapper (0, unless something else downstream happened to add its own
   margin — which is exactly why some titles across the site ended up
   visibly closer to their content than others). Moving that same 16px
   onto the wrapper itself restores one consistent gap either way. */
.case-final-block-head {
  margin-bottom: 16px;
}
/* Belt-and-suspenders: whatever immediately follows a title/head — an
   image, a live mockup, a table, anything — must never add its OWN
   margin-top on top of the above, or the gap grows unpredictably per
   instance depending on that element's own defaults (this is exactly
   what made SecondOpinions' Before/After titles read with more space
   than REAL+'s Main Tabs/Letters Generation before this fix). The h3's
   margin-bottom (or .case-final-block-head's, above) is the single
   source of truth for this gap; !important guards it against inline
   margin styles some instances already carry. */
.case-final-block > h3 + *,
.case-final-block > .case-final-block-head + *,
.case-feature-block > h3 + *,
.case-feature-block > .case-final-block-head + * {
  margin-top: 0 !important;
}

/* "Hide hotspots" switch — one per Before/After comparison block, scoped
   to that block only so each section's hotspots toggle independently.
   Colors sampled directly from the 4 reference PNGs (inactive / active /
   hover-inactive / hover-active): #d8d8d8 default, #00aaa1 once switched
   on, #226979 on hover in EITHER state. */
.hotspot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 16px;
  /* Nudges the switch down to align with the title text's own vertical
     center (see .case-final-block-head for why flex-start alone isn't
     enough — the title's box is taller than just its text, because of
     the padding reserved for its underline). */
  margin-top: 4px;
}

.hotspot-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hotspot-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #d8d8d8;
  transition: background 0.2s ease;
}

.hotspot-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(1, 30, 65, 0.25);
  transition: transform 0.2s ease;
}

.hotspot-toggle:hover .hotspot-toggle-track {
  background: #25282b;
}

.hotspot-toggle-input:checked + .hotspot-toggle-track {
  background: #00aaa1;
}

.hotspot-toggle-input:checked + .hotspot-toggle-track .hotspot-toggle-thumb {
  transform: translateX(18px);
}

.hotspot-toggle:hover .hotspot-toggle-input:checked + .hotspot-toggle-track {
  background: #25282b;
}

.hotspot-toggle-input:focus-visible + .hotspot-toggle-track {
  outline: 2px solid #00aaa1;
  outline-offset: 2px;
}

.hotspot-toggle-label {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  color: #25282b;
}

/* Disabled state (e.g. Second Opinions' Registration before/after, which
   has no hotspots to hide) — grayed out and inert, with hover/focus
   effects suppressed so it doesn't look interactive. */
.hotspot-toggle-input:disabled ~ .hotspot-toggle-track {
  background: #eceeef;
}
.hotspot-toggle-input:disabled ~ .hotspot-toggle-label {
  color: #9aa0a6;
}
.hotspot-toggle:has(.hotspot-toggle-input:disabled) {
  cursor: not-allowed;
}
.hotspot-toggle:has(.hotspot-toggle-input:disabled):hover .hotspot-toggle-track {
  background: #eceeef;
}

/* Hides every hotspot dot + tooltip inside just this comparison block.
   Also matches .case-feature-block (e.g. REAL+'s "Main Tabs" and "Patient
   Record" screenshots), which reuses this same toggle component next to
   its own <h3> even though it isn't a Before/After comparison block.
   Clalit's Before & After section uses a different, always-visible
   annotation style instead of hover .mp-indicator dots (highlight box +
   line + dot + caption text, all prefixed .pixlane-annot-*), but the same
   toggle hides those too when checked. */
.case-final-block.hotspots-hidden .mp-indicator,
.case-feature-block.hotspots-hidden .mp-indicator,
.case-final-block.hotspots-hidden .pixlane-annot-box,
.case-final-block.hotspots-hidden .pixlane-annot-line,
.case-final-block.hotspots-hidden .pixlane-annot-dot,
.case-final-block.hotspots-hidden .pixlane-annot-text {
  display: none;
}

.case-final-block h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 99px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal));
}

.case-final-shot {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-project);
}

.case-final-shot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Case study — Design System ---------- */
.case-ds-group {
  margin-bottom: 56px;
}

/* Design System shown as the exact reference screenshots supplied by
   Claudia, placed as-is rather than recreated in HTML/CSS, so the
   section always matches her source file exactly. */
.case-ds-image-block {
  margin-bottom: 56px;
  text-align: left;
}

/* Group titles ("Colors", "Icons", "Buttons"...) are live text in the
   portfolio's own font (Eudoxus Sans / --font-family), not flattened
   into the reference screenshots — the images are cropped to start right
   below where their own title used to be. */
.case-ds-image-title {
  /* display:block (not inline-block) — inline-block here sat on the same
     line box as the image below it (also inline-block), so the browser
     baseline-aligned the short title against the tall image and dragged
     the text down near the image's bottom edge instead of stacking above
     it. width:fit-content keeps the underline sized to the text only,
     without needing inline-block. */
  display: block;
  width: fit-content;
  font-family: var(--font-family);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--case-accent, var(--color-teal));
}
.case-ds-image-block img {
  /* max-width (not width:100%) so the browser never upscales these PNGs
     past their native resolution — this page's content column (up to
     1800px) is wider than the source screenshots, and width:100% was
     stretching/upscaling them, which is what made them look soft/low-res.
     Capping at native size and only shrinking on narrower viewports keeps
     every pixel crisp. */
  display: inline-block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
}
.case-ds-image-block:last-child {
  margin-bottom: 0;
}

/* Sub-labels inside a Design System image block, live in Eudoxus Sans
   like the group title, sitting between image slices that have had this
   same text cropped out of them. Colors sampled from the reference PNGs:
   text #25282b, underline var(--case-accent) (this page's own blue). */
.case-ds-image-subhead {
  display: block;
  width: fit-content;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  color: #25282b;
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--case-accent, var(--color-teal));
}
.case-ds-image-title + .case-ds-image-subhead {
  margin-top: 0;
}

/* Group labels ("Basic without icon – Desktop", "Default chatbot
   Desktop"...) — no underline, slightly larger/bolder than a subhead. */
.case-ds-image-label {
  display: block;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 700;
  color: #25282b;
  margin: 28px 0 16px;
}
.case-ds-image-title + .case-ds-image-label {
  margin-top: 0;
}

/* Clalit Design System — reference SVG renders cropped to just the
   component art (title + subhead text baked in the source file is
   cropped out and replaced by the live .case-ds-image-title /
   .case-ds-image-subhead text above), per the same technique used for
   Marketplace/SecondOpinions' Design System sections. Capped at native
   resolution (max-width, not width:100%) so upscaling never softens
   them. */
.case-ds-image-block-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 0 8px;
}
/* Buttons/Cards/Fields reference images render smaller than their column
   would otherwise allow (Icons/Typography/Colors are unaffected — this
   class is only added to those three groups' <img> tags, never to the
   subhead titles above them). Capping max-width to a percentage of the
   column, rather than relying on the source PNG's own pixel size,
   guarantees the reduction is visible at every viewport: when the column
   is wide, native size alone kept these images below 100% width already,
   so shrinking only the file made no visual difference; max-width forces
   the smaller display regardless of which constraint (column width vs.
   native size) would otherwise bind. Compounded two rounds of a 30%
   reduction (0.7 x 0.7 = 0.49) to bring these elements down closer to
   the Icons section's scale. */
.ds-img-shrink {
  max-width: 49%;
}
/* Fields' Filled/Error pair lives in a 2-column row (.ds-image-cols-2,
   cell = (1560-40)/2 = 760px) while Default/Typing/Focused live in a
   3-column row (.ds-image-cols-3, cell = (1560-80)/3 = 493.3px). Both
   use the same 49% cap, but 49% of a wider cell is a wider — and
   visually bigger, since the field mockups share one underlying scale —
   result. This class targets the same absolute width the 3-column cap
   already lands on (241.7px = 49% of 493.3px), expressed as a
   percentage of the 2-column cell it's actually placed in
   (241.7 / 760 ≈ 31.8%), so every field in the Fields group renders at
   the same size regardless of which row it sits in. */
.ds-img-shrink-2col-match {
  max-width: 31.8%;
}
/* "Error" (2nd cell of the 2-column Fields row) and "Typing" (2nd cell
   of the 3-column Fields row) sit in different grids, so their column-2
   start positions don't naturally match: 3-col col2 starts at
   493.3+40=533.3px from the shared left edge, 2-col col2 starts at
   760+40=800px — a 266.7px gap. Pulling the whole "Error" cell (title +
   image together, so they keep moving as one unit) left by that gap,
   expressed as a % of its own 760px cell (266.7/760≈35.09%), lines its
   title up with "Typing"'s title above. */
.ds-field-error-align {
  margin-left: -35.09%;
}
.ds-image-cols-2,
.ds-image-cols-3 {
  display: grid;
  gap: 0 40px;
  align-items: start;
  margin-bottom: 40px;
}
.ds-image-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.ds-image-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.ds-image-cols-2 > div,
.ds-image-cols-3 > div {
  min-width: 0;
}
.ds-image-cols-2 .case-ds-image-subhead:first-child,
.ds-image-cols-3 .case-ds-image-subhead:first-child {
  margin-top: 0;
}

/* Clalit's Design System component text reproduces the real app's own
   typeface (Open Sans Hebrew) rather than the sitewide --component-font
   (Roboto) every other project's Design System uses — see the
   Typography group's own spec ("Opens Sans Hebrew") supplied by
   Claudia. Titles/subheads stay on the portfolio's own font via the
   .case-ds-image-title / .case-ds-image-subhead rules above, which is
   unaffected since inheritance always loses to a rule on the element
   itself. */
.case-accent-clalit .case-ds-group {
  font-family: "Open Sans Hebrew", "Open Sans", sans-serif;
}

/* Style guide (site-wide, all 5 project pages): component text inside
   any Design System showcase uses --component-font (Roboto), never the
   portfolio's own --font-family (Eudoxus Sans) — titles/subheads stay on
   the site's default font since those are the portfolio's own copy, not
   reproduced product UI. Previously this was Marketplace-only with a
   hardcoded Inter stack; now applies to .case-ds-group on every page. */
.case-ds-group {
  font-family: var(--component-font);
}

.case-ds-group h3:not(.case-ds-image-title),
.case-ds-group h4,
.case-ds-subhead {
  /* !important on .case-ds-subhead specifically: REAL+'s Actions/Icons
     "Default"/"Hover" labels sit inside .rp-ds-actions-grid, which
     .case-accent-realplus .rp-ds-actions-grid separately switches to
     --component-font (Roboto) for the actual icon rows — confirmed via
     devtools that this was winning over this rule despite .case-ds-subhead
     targeting the label element directly, which should have been enough
     on its own. !important removes any doubt so every .case-ds-subhead
     label stays on the portfolio's own --font-family like its siblings
     (e.g. the Buttons section's "Ghost Default" labels). */
  font-family: var(--font-family) !important;
}

.case-ds-group h3:not(.case-ds-image-title) {
  /* Category titles (Colors, Icons, Buttons, Elements...) are bold on
     every project — matches .case-ds-image-title's own font-weight: 700
     (SecondOpinions/Clalit), which this rule previously didn't (500).
     State labels (Hover, Filled, Default...) are a separate class
     (.case-ds-subhead / .case-ds-image-subhead) and untouched by this. */
  font-size: 20px;
  font-weight: 700;
  border-bottom: 2px solid var(--case-accent, var(--color-teal-dark));
  padding-bottom: 8px;
  display: inline-block;
  margin: 0 0 16px;
}

/* Every element description/state sub-label (Primary/Secondary, 8px/
   10px/14px, Default/Hover, Arrow Default/Arrow Hover White...) matches
   the small gray label style already used for the Buttons showcase
   items (.mp-showcase-item label: 11px, var(--color-muted), regular) —
   only the category titles above (Colors, Icons, Buttons —
   .case-ds-group h3, bold) are meant to stand out. */
.case-ds-subhead {
  font-size: 11px;
  font-weight: 400;
  color: #25282BA6;
  margin: 0 0 16px;
}

.case-ds-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

/* Flat color swatches, not cards: spec shows a plain square of color with
   plain text underneath — no white card background, shadow, or rounded
   corners around the whole swatch. */
.case-ds-swatch {
  width: 160px;
  text-align: center;
}

.case-ds-swatch-color {
  height: 160px;
  width: 100%;
}

.case-ds-swatch p {
  margin: 0;
  padding: 10px 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-black);
}

.case-ds-swatch span {
  display: block;
  font-weight: 700;
}

.case-ds-shot {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 1100px;
}

.case-ds-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.case-ds-viewers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-ds-viewer-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}

.case-ds-viewer-card .case-ds-shot {
  max-width: none;
}

@media (max-width: 1100px) {
  .case-ds-viewers {
    grid-template-columns: 1fr;
  }
}

/* ---------- Case study — annotated old/new website screenshots ---------- */
.case-annotate-group {
  margin-bottom: 48px;
}

.case-annotate-block {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.case-annotate-shot {
  flex: 1 1 480px;
  max-width: 620px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.case-annotate-shot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Modifier for a shot with no accompanying annotation list: let it take the
   section's full width instead of being capped/half-split for a side-by-side
   list layout. */
.case-annotate-shot-full {
  flex: 1 1 100%;
  max-width: 100%;
}

.case-annotate-list {
  flex: 1 1 320px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-annotate-list li {
  position: relative;
  padding-left: 24px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-black);
}

.case-annotate-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--case-accent, #4e59a4);
}

@media (max-width: 900px) {
  .case-annotate-block {
    flex-direction: column;
  }
  .case-annotate-shot {
    max-width: 100%;
  }
}

/* ---------- Before/after comparison slider handle ---------- */
.pixlane-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.15s ease;
}
.pixlane-handle:hover {
  box-shadow: none;
}

.pixlane-divider {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}

/* Figma-style annotation callouts on top of a Before/After screenshot:
   a small filled dot, an elbow connector line (one vertical + one
   horizontal segment), and a text label — reproduced as live DOM
   elements (not baked into the screenshot) from the source SVGs' own
   vector geometry, converted to % of the 1294-wide canvas so they stay
   pinned to the right spot at any container width. Position/size for
   each instance is set inline per annotation; only the shared visual
   styling (color, thickness, dot size, type) lives here. */
.pixlane-annot-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #00aeef;
  pointer-events: none;
}

.pixlane-annot-line {
  position: absolute;
  background: #00aeef;
  pointer-events: none;
}

/* Soft shadow under every Before/After comparison image (same rule, same
   value, applied uniformly to every .pixlane-compare block — User Profile,
   Menu, Navigation, Results filter, Doctor search results — so they all
   read consistently). No border-radius here on purpose: just the shadow,
   corners stay exactly as they are. */
.pixlane-compare {
  box-shadow: 0 10px 34px rgba(13, 32, 36, 0.16);
}

.pixlane-compare .pixlane-annot-text {
  position: absolute;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-black);
  pointer-events: none;
}

/* Hotspots annotating the old Second Opinions homepage screenshot, inside
   the Before/After slider's clipped "old" layer (see markup: each
   .mp-indicator is nested inside .pixlane-img-after alongside its <img>,
   so it gets clipped/hidden together with the old screenshot as the
   slider reveals the new design underneath, rather than staying visible
   as a separate always-on overlay). Color comes from the page-wide
   .case-accent-secondopinions .mp-indicator-dot rule now (see near the
   --case-accent declaration), so every hotspot on this page — here and
   in the New Website Design mockup below — stays consistent from one
   shared rule instead of a one-off scoped class per instance. */

/* ---------- Case study — Watch-video cards (Prototypes grid + inline problem callouts) ---------- */
.case-watch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
  row-gap: 32px;
  margin: 8px auto 0;
}

.case-watch-grid .case-watch-card {
  width: 100%;
}

.case-watch-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transition: box-shadow 0.15s ease;
}

.case-watch-card:hover {
  box-shadow: none;
}

.case-watch-card-text h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.case-watch-underline {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-teal-dark);
  margin-bottom: 10px;
}

.case-watch-card-text p {
  margin: 0;
  font-size: 20px;
  color: var(--color-muted);
}

.case-watch-card .video-trigger {
  flex-shrink: 0;
  border-radius: 8px;
}

.video-trigger-static {
  opacity: 0.55;
  cursor: default;
}

.video-trigger-static:hover {
  background: var(--color-teal);
  color: var(--color-black);
  transform: none;
}

.case-watch-inline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 0 4px;
}

.case-problems-solutions .case-watch-underline {
  background: #d31715;
}

.case-watch-inline .case-watch-card {
  width: 100%;
}

@media (max-width: 900px) {
  .case-watch-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- REAL+ Prototypes carousel ---------- */
/* Play/prev/next controls reproduce the uploaded design's exact vectors
   (a white circle + dark icon by default, inverted to a dark circle +
   white icon on hover/focus) via a shared bg/icon fill swap instead of
   swapping whole SVGs, plus a soft glow (matching the source files' own
   feGaussianBlur drop-shadow) via CSS filter: drop-shadow(). */
/* Title + dots live inside one white card (.case-proto-panel); the
   prev/next arrows sit OUTSIDE that card, absolutely positioned off the
   relatively-positioned .case-proto-carousel wrapper, matching the
   reference design. */
.case-proto-carousel {
  position: relative;
  margin-top: 4px;
}

/* The visual "player" card is intentionally narrower than the carousel's
   own full-width positioning box — originally shrunk to 70%, then bumped
   +20% (70% * 1.2 = 84%) — while every element inside it (title font-size,
   dot size, play/arrow icon size) stays at its existing fixed px value;
   only the card's own footprint changes. The arrows sit outside this card
   entirely (see .case-proto-arrow below), so their size and position are
   unaffected by this width change. */
.case-proto-panel {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 12px 21px;
  width: 84%;
  margin: 0 auto;
}

.case-proto-header {
  margin-bottom: 5px;
}

/* Carousel title underline follows each project's own accent color
   (via --case-accent, set on the page's .case-accent-X wrapper) instead
   of the site-wide teal .case-watch-underline default, so it matches the
   project's official palette like the active dot indicator already does. */
.case-proto-header .case-watch-underline {
  background: var(--case-accent, var(--color-teal-dark));
}


.case-proto-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  transition: opacity 0.2s ease;
}

/* Wraps just the media box (not the title/dots), and is the arrows'
   positioning ancestor — so top: 50% (below) always centers each arrow
   on the actual video/image, exactly, with no JS/runtime measurement
   needed. */
.case-proto-media {
  position: relative;
}

/* Arrows are children of .case-proto-media, so top: 50% + translateY(-50%)
   centers them on the video/image itself automatically and exactly, at
   any breakpoint. Horizontal placement, though, needs to reach the
   carousel's full-width edge (the same edge the section divider sits on)
   from inside the narrower, centered .case-proto-panel (84% width, 21px
   padding) that .case-proto-media lives in — expressed here as an exact
   calc(), not a runtime measurement or an eyeballed offset:
     panel width fraction p = 0.84, panel padding = 21px
     carousel width C, media width Mw = p*C - 2*padding
     gap from media's edge to the carousel's edge = (1-p)/(2p) * Mw + padding/p
                                                   = (2/21) * Mw + 25px   [exact]
   left: 0 / 100% place the calc's reference point at media's own edges;
   the calc offsets from there by that exact gap; translateX(-50%) then
   centers the arrow itself on the resulting point. If the panel's width
   percentage or padding ever changes, this formula must be recalculated
   to match (see the mobile override below for the p=1/pad=10px case,
   where the percentage term drops out entirely). */
.case-proto-arrow {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.25));
}

.case-proto-arrow svg {
  width: 52px;
  height: 53px;
}

/* Pulled 50px closer to the media box (in from the exact divider-edge
   offset derived above) per request. */
.case-proto-arrow--prev {
  left: calc(-100% * 2 / 21 - 25px + 50px);
}

.case-proto-arrow--next {
  left: calc(100% + 100% * 2 / 21 + 25px - 50px);
}

.case-proto-arrow-bg {
  fill: #ffffff;
  transition: fill 0.15s ease;
}

.case-proto-arrow-icon {
  fill: #25282b;
  transition: fill 0.15s ease;
}

.case-proto-arrow:hover .case-proto-arrow-bg,
.case-proto-arrow:focus-visible .case-proto-arrow-bg {
  fill: #25282b;
}

.case-proto-arrow:hover .case-proto-arrow-icon,
.case-proto-arrow:focus-visible .case-proto-arrow-icon {
  fill: #ffffff;
}

/* aspect-ratio matches the actual REAL+ prototype recordings (measured
   ~2.2:1 across all 6 source files — wider than 16:9), not a generic
   16:9 guess. With a mismatched box, object-fit: contain was leaving
   visible empty bands above/below the video; sizing the box to the
   video's own ratio removes that letterboxing entirely. */
.case-proto-slides {
  position: relative;
  width: 100%;
  border-radius: 7px;
  overflow: hidden;
  background: #f7fafa;
  aspect-ratio: 2.2 / 1;
}

.case-proto-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-proto-slide.is-active {
  opacity: 1;
  visibility: visible;
}

/* object-fit: contain (not cover) so the full video frame is always
   visible, never cropped, even if its aspect ratio doesn't exactly match
   the 16:9 stage. */
.case-proto-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f7fafa;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Browsers (Safari especially) draw their own default black focus
   outline around a <video> element once it's been clicked/focused —
   remove it explicitly rather than relying on the base rule above being
   enough, since :focus can win the cascade in some browsers. */
.case-proto-slide video:focus,
.case-proto-slide video:focus-visible {
  outline: none;
}

.case-proto-slide video::-webkit-media-controls {
  display: none !important;
}

/* Static-image slides (Wireframes): no video, no Play button — just the
   image, contained so nothing is ever cropped. Background is white
   rather than the video stage's light gray, since these wireframe PNGs
   already have white backgrounds and don't need contrast from the page. */
.case-proto-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.case-proto-slides--static {
  aspect-ratio: 2 / 1;
  background: #ffffff;
}

/* SecondOpinions' Prototypes carousel: measured source videos are ~1.39:1
   (consultation-type-card-new-functionality) and ~1.7:1 (the other 3),
   both much narrower than the shared 2.2:1 stage sized for REAL+'s
   videos — with the default ratio, object-fit: contain left visible gray
   bands down the left/right sides instead of top/bottom. Sized to 1.7:1
   (the majority ratio) removes the side gaps entirely for 3 of the 4
   videos and shrinks them to a minor top/bottom letterbox for the 4th,
   rather than guessing a generic ratio. */
.case-proto-slides--so-proto {
  aspect-ratio: 1.7 / 1;
}

/* Static by default: the custom Play button only appears on hover/focus
   of the slide, and disappears once playback has started (.is-playing,
   set by script.js). Playback happens on this same <video> element in
   place — no modal, no separate layer. */
/* Shown by default (not hover-only) at 2x the source asset's native
   size; only hidden once playback has actually started. */
.case-proto-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.46);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
}

.case-proto-slide.is-playing .case-proto-play {
  opacity: 0 !important;
  pointer-events: none !important;
}

.case-proto-play-bg {
  fill: #ffffff;
  transition: fill 0.15s ease;
}

.case-proto-play-icon {
  fill: #25282b;
  transition: fill 0.15s ease;
}

.case-proto-play:hover .case-proto-play-bg,
.case-proto-play:focus-visible .case-proto-play-bg {
  fill: #25282b;
}

.case-proto-play:hover .case-proto-play-icon,
.case-proto-play:focus-visible .case-proto-play-icon {
  fill: #ffffff;
}

.case-proto-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

/* Restored to a clearly visible size after repeated across-the-board
   shrinks left these indicators too small to register as clickable dots
   (down to 4px/14px) — kept at this readable size regardless of any
   further "shrink the player component" requests, since the dots are a
   navigation control the user needs to see and target, not passive
   chrome. */
.case-proto-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: #d9dcdf;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.case-proto-dot:hover {
  background: #b9bec3;
}

.case-proto-dot.is-active {
  width: 24px;
  background: var(--case-accent, var(--color-teal));
}

@media (max-width: 700px) {
  /* Full width on narrow viewports — the 84% desktop shrink would leave
     too little room for the card to be usable on a phone-width screen.
     With panel width fraction p = 1 (full width), the general formula in
     .case-proto-arrow above collapses to a flat padding/p = 10px, with no
     percentage term at all (there's no side gap to cross once the panel
     matches the carousel's own width) — so the arrows just clear the
     panel's own smaller mobile padding. */
  .case-proto-panel {
    width: 100%;
    padding: 10px;
  }
  /* Same 50px "pull closer" applied to the mobile base gap (10px) would
     go negative (-40px) and sit the arrows well inside the media box,
     overlapping the video/image — so on mobile only, clamp the pull-in
     at the base gap itself (0: flush with the media's own edge) rather
     than pushing past it. */
  .case-proto-arrow--prev {
    left: 0;
  }
  .case-proto-arrow--next {
    left: 100%;
  }
  .case-proto-arrow svg {
    width: 42px;
    height: 42.6px;
  }
}

/* ---------- Case study — Problems & Solutions (stacked, matches real layout) ---------- */
.case-ps-box {
  margin-top: 40px;
  border: 1px solid var(--case-accent, #4e59a4);
  border-radius: 20px;
  padding: 36px 40px;
}

.case-ps-box > h3 {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 16px;
}

.case-ps-section-label {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 2px solid #d31715;
}

.case-ps-section-label.is-solutions {
  border-bottom-color: #0db14b;
}

.case-ps-divider {
  border: none;
  border-top: 1px solid rgba(78, 89, 164, 0.35);
  margin: 32px 0;
}

.case-section-divider {
  border-top-color: #00aaa1;
  /* Extra breathing room before the next section's title — measured off
     a reference screenshot (divider-to-title gap ≈2.7x the divider's own
     top margin), overriding just the bottom side of .case-ps-divider's
     32px margin shorthand. */
  margin-bottom: 64px;
}

.case-ps-box .case-goal-list {
  max-width: none;
}

/* Problems items + the two prototype cards' underline default to red;
   the Solutions list (after the divider) overrides to green. */
.case-ps-box .case-goal-list li::before {
  background: #d31715;
}

.case-ps-box .case-watch-underline {
  background: #d31715;
}

.case-ps-divider ~ .case-goal-list li::before {
  background: #0db14b;
}

.case-ps-box .case-ps-divider {
  border-top-color: var(--case-accent, #4e59a4);
}

/* ---------- Case study — sitemap / wide reference screenshots ---------- */
.case-wide-shot {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 1400px;
  margin: 24px 0;
}

.case-wide-shot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Clalit case study — coded UI components (real Hebrew UI text/RTL,
   phone mockups, flow diagrams, competitor cards, design-system specimens)
   ========================================================================== */

/* ---------- phone mockups (Before/After, Final Design) ---------- */
.phone-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 24px 0;
}

.phone-row-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 28px 0 4px;
}

.phone-frame {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 30px;
  border: 6px solid #141b23;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.phone-frame.is-wire {
  border: 2px solid #22262b;
  border-radius: 18px;
  box-shadow: none;
}

.phone-screen {
  padding: 14px 12px 18px;
  min-height: 300px;
  background: #fff;
  font-size: 12px;
  line-height: 1.4;
  /* Style guide: component-reproduction text uses --component-font, not
     the portfolio's own --font-family. */
  font-family: var(--component-font);
}

.phone-screen[dir="rtl"] {
  text-align: right;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}

.phone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  margin: 4px 0 14px;
}

.phone-hero {
  background: linear-gradient(135deg, #e8f7f6, #dcf0fb);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 12px;
}

.phone-hero strong {
  display: block;
  font-size: 14px;
  color: var(--color-navy);
  margin-top: 6px;
}

.phone-btn {
  display: block;
  width: 100%;
  background: var(--case-accent, var(--color-teal-dark));
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin: 8px 0;
  border: none;
  font-family: var(--component-font);
}

.phone-btn.is-outline {
  background: #fff;
  color: var(--color-navy);
  border: 1px solid #d1d7dd;
  font-weight: 600;
}

.phone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.phone-list-item {
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
}

.phone-card {
  background: #eaf6f8;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 12px;
}

.phone-card strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 2px;
  color: var(--color-navy);
}

.phone-card small {
  color: var(--color-muted);
  font-size: 11px;
}

.phone-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.phone-chip {
  background: #f2f5f8;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10.5px;
  border: 1px solid #e6eaee;
}

.phone-chip.is-active {
  background: var(--case-accent, var(--color-teal-dark));
  color: #fff;
  border-color: transparent;
}

.phone-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.phone-grid-4 div {
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  font-size: 9.5px;
}

.phone-caption {
  font-size: 12.5px;
  color: var(--color-muted);
  margin: 8px 0 0;
  max-width: 240px;
  align-self: center;
}

.phone-annotation {
  font-size: 13px;
  color: var(--color-muted);
  max-width: 220px;
  align-self: center;
  padding-top: 40px;
}

/* ---------- low-fi wireframe phones ---------- */
.wire-title {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.wire-title.is-accent {
  color: var(--case-accent, #d9822b);
}

.wire-box {
  border: 1.5px solid #1c1c1e;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  text-align: center;
}

.wire-pill-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}

.wire-pill {
  border: 1.5px solid #1c1c1e;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 10.5px;
}

.wire-avatar {
  width: 40px;
  height: 40px;
  border: 1.5px solid #1c1c1e;
  border-radius: 50%;
  margin: 0 auto 10px;
}

/* ---------- application structure flow diagram ---------- */
/* Rebuilt as pure CSS — no JavaScript measurement at all. The earlier
   version measured each node's rendered position with getBoundingClientRect
   and drew an SVG line between every pair; that depends on measuring at
   the exact right moment (after webfonts swap in, after any reflow), and
   kept drifting out of sync with the actual boxes no matter how many
   timing fixes were added. This version uses the well-known CSS-only
   "org chart" technique instead: every node is centered within its own
   flex column by the column's own `align-items:center`/`justify-content:
   center`, so a connector line only needs to center ITSELF on its own box
   (`left:50%`) to always land correctly — no cross-element measurement,
   no timing dependency, correct on first paint and every reflow after. */
.app-flow {
  margin: 32px 0;
  overflow-x: auto;
  text-align: center;
}

.app-flow-diagram {
  position: relative;
  display: inline-block;
}

.flow-node {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #25282b;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  background: transparent;
  text-align: center;
  white-space: nowrap;
  position: relative;
}

.flow-branch .flow-node {
  white-space: normal;
  width: 150px;
}

/* ---- root chain: Family Screen -> User Selection ---- */
.flow-root {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-root .flow-node + .flow-node {
  margin-top: 40px;
}

.flow-root .flow-node + .flow-node::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 0;
  height: 40px;
  border-left: 1.5px solid #25282b;
}

/* ---- fan-out: User Selection -> 5 branch heads ----
   Previously each .flow-branch drew its OWN half-width horizontal segment
   (border-top on the left/right 50% of its own box only), which left the
   24px flex `gap` between adjacent branches completely undrawn — the
   horizontal bar visibly broke into disconnected pieces at every branch
   boundary instead of reading as one continuous line. Fixed by drawing
   ONE single unbroken bar on the .flow-branches container itself, inset
   exactly 75px from each edge (half of a branch's own 150px width) so it
   starts at branch 1's center and ends at branch 5's center regardless of
   how many branches there are or how wide the middle one grows (the
   Medicines Prescriptions split makes its own branch column wider, but
   that doesn't shift branch 1 or branch 5's own center, since left/right
   insets are anchored to the container's own edges, not to cumulative
   sibling widths). Each branch then only needs a short vertical stem down
   from that shared bar to its own box — no more first/last special-casing. */
.flow-branches {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: nowrap;
  position: relative;
  margin-top: 40px;
}

.flow-branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 75px;
  right: 75px;
  height: 0;
  border-top: 1.5px solid #25282b;
}

.flow-branches::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 0;
  height: 40px;
  border-left: 1.5px solid #25282b;
  transform: translateX(-50%);
}

.flow-branches-dot {
  position: absolute;
  top: -3.5px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25282b;
  transform: translateX(-50%);
}

.flow-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 150px;
  position: relative;
  padding-top: 40px;
}

.flow-branch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 40px;
  border-left: 1.5px solid #25282b;
}

/* ---- within-branch chains ----
   Uses the direct-child combinator (>) rather than a plain descendant
   selector on purpose: a plain `.flow-branch .flow-node + .flow-node`
   also matched "Frequent Medicines" (an adjacent-sibling .flow-node
   nested inside .flow-split, several levels down), and — because that
   selector has higher specificity than `.flow-split .flow-node::before`
   — it was winning the cascade and replacing the split's intended
   horizontal join-line with a stray 44px vertical stem, visibly cutting
   through that box. Scoping to direct children excludes nested split
   nodes from this rule entirely instead of trying to out-specificity it. */
.flow-branch > .flow-node + .flow-node {
  margin-top: 44px;
}

.flow-branch > .flow-node + .flow-node::before {
  content: "";
  position: absolute;
  top: -44px;
  left: 50%;
  width: 0;
  height: 44px;
  border-left: 1.5px solid #25282b;
}

/* ---- Medicines Prescriptions: split into 2, then merge back into 1 ---- */
.flow-split-track {
  position: relative;
  margin-top: 44px;
}

.flow-split-track::before {
  content: "";
  position: absolute;
  top: -44px;
  left: 50%;
  width: 0;
  height: 24px;
  border-left: 1.5px solid #25282b;
  transform: translateX(-50%);
}

/* Same continuous-bar fix as the fan-out above: one unbroken horizontal
   bar on the .flow-split container (inset 75px per side — half of each
   150px-wide split node — so it spans exactly from node 1's center to
   node 2's center, bridging the 16px gap that used to be left undrawn),
   instead of each node drawing only its own half. */
.flow-split {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
}

.flow-split::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 75px;
  right: 75px;
  height: 0;
  border-top: 1.5px solid #25282b;
}

.flow-split-dot {
  position: absolute;
  top: -23.5px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25282b;
  transform: translateX(-50%);
}

.flow-split .flow-node {
  width: 150px;
  position: relative;
}

.flow-split .flow-node::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 0;
  height: 20px;
  border-left: 1.5px solid #25282b;
}

.flow-merge-track {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
  height: 20px;
  margin-top: 20px;
}

/* Same continuous-bar fix again: one unbroken horizontal bar on the
   .flow-merge-track container itself (inset 75px per side, same 150px
   node width + 16px gap geometry as the split above), instead of each
   span drawing only its own half. */
.flow-merge-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 75px;
  right: 75px;
  height: 0;
  border-top: 1.5px solid #25282b;
}

.flow-merge-dot {
  position: absolute;
  top: -3.5px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25282b;
  transform: translateX(-50%);
}

.flow-merge-track span:not(.flow-merge-dot) {
  width: 150px;
  position: relative;
}

.flow-merge-track span:not(.flow-merge-dot)::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 0;
  height: 20px;
  border-left: 1.5px solid #25282b;
}

.flow-merge-track::after {
  /* Runs from the merge point (top:0, where the two incoming stems join
     via the .flow-merge-track::before horizontal bar) all the way down to
     the next node's top edge (track's own 20px height + that node's 40px
     margin-top = 60px total) — previously this started at top:20px with
     height:20px, which only covered the track's own box and left a 20px
     stretch of nothing between the track and "Send the request", so the
     line visibly stopped short of the box instead of reaching it. */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 60px;
  border-left: 1.5px solid #25282b;
  transform: translateX(-50%);
}

.flow-merge-track + .flow-node {
  margin-top: 40px;
}

/* ---- junction dots at every point where a line meets a box, per the
   reference design. Each selector below is the specific free pseudo-
   element slot on that element (its other slot is already used to draw
   the connecting line itself), so these never collide with the line
   rules above. The T-junction dots for the fan-out, split and merge bars
   are separate real elements instead (.flow-branches-dot/.flow-split-dot/
   .flow-merge-dot) — those containers' own ::before and ::after are both
   already spoken for by the continuous horizontal bar and the vertical
   stem, so there's no free pseudo-element slot left to draw a dot with. */
.flow-root .flow-node + .flow-node::after,
.flow-branch > .flow-node:first-child::before,
.flow-branch > .flow-node + .flow-node::after,
.flow-merge-track + .flow-node::before {
  content: "";
  position: absolute;
  top: -3.5px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25282b;
  transform: translateX(-50%);
}

/* ---------- competitor comparison rows ---------- */
/* Rebuilt per "Competitors.svg": each competitor is a small pill-shaped
   chip carrying the brand's own real logo mark, followed by a row of real
   app screenshots (no bullet feature list) — replacing the earlier
   3-column card layout entirely. The whole group sits inside ONE shared
   white rounded panel (per the SVG's own outer white rx=20 background,
   which the very first build of this rebuild had dropped), and screenshots
   are sized to a fixed height rather than stretched to fill the panel —
   stretching them earlier made them oversized compared to the reference. */
/* Sized and padded exactly like every other project's carousel player
   card — 84% width, centered, 12px/21px padding, same as
   .case-proto-panel (e.g. REAL+'s Wireframes carousel) — rather than
   its own larger padding. No overflow-x: auto: the screenshots are
   sized to always fit inside this box (see .competitor-screens-row img
   below), so there's nothing left to scroll. */
.competitor-panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 12px 21px;
  margin: 28px auto;
  width: 84%;
}

.competitor-rows {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Fixed pill size so all 3 brand chips render as the SAME shape/size
   regardless of each logo's own aspect ratio (Maccabi/Leumit/Meuhedet are
   different widths and heights natively) — the logo image scales down to
   fit inside via object-fit:contain rather than the pill sizing itself
   around the logo. */
.competitor-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 76px;
  padding: 10px 16px;
  border-radius: 38px;
  background: #fff;
  border: 1px solid #d8d8d8;
  margin-bottom: 20px;
}

.competitor-chip img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Screenshots are sized to a fixed height (not stretched to fill the row
   via flex-grow) and centered as a group — a slide with only 3 screens
   (Meuhedet) and one with 5 (Maccabi) both end up sized consistently and
   always fit inside the 84%-wide panel, with no horizontal scrollbar,
   rather than every slide's images stretching to fill the same total row
   width regardless of count. 420px comfortably fits even the busiest
   (5-image) slide within the panel's content width at this site's
   container size — recheck this value if the container width or panel
   padding ever changes. */
.competitor-screens-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.competitor-screens-row img {
  flex: 0 0 auto;
  height: 420px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: block;
}

/* Matches .case-proto-panel's own mobile breakpoint/padding exactly
   (700px / 10px), not a separate value, now that the two panels share
   the same desktop padding too. */
@media (max-width: 700px) {
  .competitor-panel {
    width: 100%;
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .competitor-screens-row img {
    height: 180px;
  }
}

/* Research Competitors carousel (Clalit): reuses the site's generic
   [data-proto-carousel] JS module (title-tracking, dots, arrow nav — see
   script.js) and the shared .case-proto-title / .case-proto-dots /
   .case-proto-arrow parts, but each slide holds a full row of real app
   screenshots (.competitor-screens-row) rather than a single
   video/image, so it can't use .case-proto-slides' fixed-aspect-ratio,
   object-fit box. Slides are shown/hidden with plain display:none/flex
   instead of the shared module's absolute-stack + opacity crossfade, so
   each slide's own screenshot count (3/5/4 here) sizes the panel
   naturally instead of needing a fixed height. */
.competitor-media {
  position: relative;
}

.competitor-media .case-proto-slide {
  position: static;
  opacity: 1;
  visibility: visible;
  display: none;
}

.competitor-media .case-proto-slide.is-active {
  display: flex;
}

/* .competitor-panel now matches .case-proto-panel exactly — same 84%
   width and same 12px/21px padding — so the arrow offset no longer
   needs its own formula; the shared .case-proto-arrow--prev/--next
   rules (derived for this exact width/padding combination) already
   apply correctly with no override needed here. */

/* ---------- design-system specimen grids (icons/buttons/cards/fields) ---------- */
/* Style guide: component-reproduction text uses --component-font, not
   the portfolio's own --font-family. Covers every ds-* specimen grid on
   this page (Icons/Buttons/Cards/Fields), whether inside the Design
   System section or reused inline in a live mockup (.ds-field,
   .ds-action-card appear in both places). */
.ds-specimen-block,
.ds-btn-grid,
.ds-app-card-grid,
.ds-field,
.ds-action-card {
  font-family: var(--component-font);
}
.ds-specimen-block {
  margin: 20px 0 40px;
}

.ds-specimen-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  margin: 0 0 12px;
  display: inline-block;
  border-bottom: 2px solid var(--case-accent, var(--color-teal));
  padding-bottom: 3px;
}

.ds-icon-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ds-icon-chip {
  border-radius: 8px;
  background: #eef6f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--case-accent, var(--color-teal-dark));
}

.ds-icon-chip svg {
  stroke: currentColor;
}

.ds-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 16px 0 32px;
}

.ds-btn-item h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  margin: 0 0 8px;
}

.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #cceffc;
  color: var(--color-navy);
}

.ds-pill.is-outline {
  background: #fff;
  border: 1px solid #d1d7dd;
}

.ds-pill.is-active {
  background: var(--case-accent, var(--color-teal-dark));
  color: #fff;
}

.ds-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-action-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  max-width: 420px;
}

.ds-action-card {
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
}

.ds-partner-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ds-partner-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e2e8ee;
  font-size: 13px;
  font-weight: 600;
}

.ds-app-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 16px 0 32px;
}

.ds-app-card {
  border: 1px solid #e2e8ee;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.ds-app-card p {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
}

.ds-app-card small {
  color: var(--color-muted);
  font-size: 11px;
}

.ds-field {
  margin-bottom: 8px;
}

.ds-field label {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.ds-field-input {
  border-bottom: 1.5px solid #d1d7dd;
  padding-bottom: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.ds-field.is-focused .ds-field-input,
.ds-field.is-filled .ds-field-input {
  border-bottom-color: var(--case-accent, var(--color-teal-dark));
  color: var(--color-navy);
}

.ds-field.is-error .ds-field-input {
  border-bottom-color: #d31715;
  color: var(--color-navy);
}

.ds-field-help {
  font-size: 11px;
  margin-top: 6px;
  color: var(--color-muted);
}

.ds-field.is-error .ds-field-help {
  color: #d31715;
}

/* =========================================================================
   Marketplace case study — coded UI components (replace screenshot crops)
   Namespaced with "mp-" to avoid collisions with shared classes.
   ========================================================================= */

:root {
  --mp-blue: #4e59a4;
  --mp-blue-dark: #0d2024;
  --mp-violet-light: #c2c5dd;
  --mp-gray-light: #d8d8d8;
  --mp-gray-mid: #757575;
  --mp-green-light: #d5f0d4;
  --mp-blue-panel: #f1f6ff;
  --mp-orange: #ff7201;
  --mp-yellow: #ffd200;
  --mp-green: #1a932e;
  --mp-red: #d24b4b;
  --mp-edp-section-bg: #f5f7fc;
  --mp-edp-header-bg: #dfeef5;
}

.mp-block {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #ffffff;
  max-width: 1100px;
  margin: 24px 0;
  padding: 28px;
}

.mp-block-wide { max-width: 1300px; }
.mp-block-narrow { max-width: 640px; }

/* ---------- Use cases: Direct to Clinician / Screening Provider tabs ----------
   Per "Direct to Clinician/Screening Provider active/hover tab.svg" (435x43,
   rx 8): a gray (#D8D8D8) segmented-control track with a single white
   (rx 8) pill that slides to sit behind whichever tab is active. Text is
   always #25282B in both states — only font-weight changes (400 inactive,
   700 active) — an inactive tab also goes bold on hover as a preview
   affordance. display:inline-flex (not a stretched block) keeps the bar's
   own width fit-to-content so it sits flush at the left edge of the
   diagram card below it, rather than being centered under the (centered)
   "Use cases" h2 title. */
.mp-usecase-tabs {
  position: relative;
  display: flex;
  background: #d6e9e9;
  border-radius: 8px;
  padding: 10px;
  margin: 28px auto 0;
  gap: 0;
  width: fit-content;
}
/* Both tabs are locked to one shared fixed width (--mp-usecase-tab-w,
   measured once by JS at load/resize using the wider tab's BOLD rendering
   width, never re-measured on click), so a click only ever toggles the
   .is-second-active class below — a pure CSS transform transition with
   no layout read in the critical path (avoids the snap/jump a per-click
   offsetWidth/offsetLeft read would cause when it races the font-weight
   change that also happens on click). */
.mp-usecase-tab-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  height: calc(100% - 20px);
  width: var(--mp-usecase-tab-w, 0px);
  background: #fff;
  border-radius: 8px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  transform: translateX(0);
}
.mp-usecase-tabs.is-second-active .mp-usecase-tab-pill {
  transform: translateX(var(--mp-usecase-tab-w, 0px));
}
.mp-usecase-tab {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--mp-usecase-tab-fs, 20px);
  font-weight: 400;
  color: #25282b;
  padding: 10px;
  width: var(--mp-usecase-tab-w, auto);
  text-align: center;
  border-radius: 8px;
  white-space: nowrap;
  box-sizing: border-box;
}
.mp-usecase-tab:hover:not(.is-active) { font-weight: 700; }
.mp-usecase-tab.is-active { font-weight: 700; color: #25282b; }

/* ---------- Workflow use-case cards ---------- */
.mp-usecase-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 70px;
}
/* Inside the Workflow carousel slide, the card no longer sits directly
   under the tabs/paragraph (that's what the 70px above was for) — the
   carousel's own header (case-proto-header, 5px margin-bottom) already
   provides spacing, so the extra 70px here left too large a gap under
   the "Workflow" title. */
.mp-usecase-media .mp-usecase-card {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 16px;
}
/* .mp-usecase-card sets display:flex unconditionally, and author CSS
   always beats the UA stylesheet's own [hidden] { display: none },
   regardless of specificity — so the plain hidden attribute on the
   Screening Provider card wasn't actually hiding it once this rule was
   in play (both cards rendered stacked under the Direct to Clinician
   tab). Same fix already used elsewhere on this site ([data-tab-panel]
   [hidden], .project-card[hidden], .mp-wireframe-more[hidden]) for the
   identical reason. */
.mp-usecase-card[hidden] { display: none; }

/* Flow-diagram title ("Workflow"), top-left of each use-case card —
   same label + accent-underline pattern as the Prototypes carousel's
   .case-proto-title/.case-watch-underline, reused verbatim rather than
   a new one-off style. .mp-usecase-card is a centered flex column, so
   this header needs its own full width + left text-align to sit flush
   at the card's left edge instead of centering with its siblings. */
.mp-usecase-diagram-header {
  width: 100%;
  text-align: left;
}

.mp-usecase-diagram-header .case-watch-underline {
  background: var(--case-accent, var(--color-teal-dark));
}

.mp-usecase-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin: 28px 0 0;
}
/* Same author-CSS-beats-UA-[hidden] issue as .mp-usecase-card[hidden]
   above — .mp-usecase-text also sets display:flex unconditionally. */
.mp-usecase-text[hidden] { display: none; }

/* Match the tabs-to-paragraph gap (28px, from .mp-usecase-text's own
   margin-top above) for the paragraph-to-carousel gap below it, instead
   of .case-proto-carousel's generic 4px (tuned for sitting right under
   an h2 + underline elsewhere, e.g. Prototypes/Research Competitors). */
.mp-usecase-text + .case-proto-carousel {
  margin-top: 28px;
}

.mp-usecase-text p {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0.34px;
  margin: 0;
}

.mp-usecase-diagram {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mp-usecase-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

.mp-usecase-diagram--wide img { max-width: 847px; }
.mp-usecase-diagram--narrow img { max-width: 676px; }

/* ---------- "Workflow / Wireframes / Workflow Statuses Definition" carousel ----------
   Reuses the site's generic [data-proto-carousel] module (script.js) and
   .case-proto-panel/.case-proto-header/.case-proto-title/.case-watch-
   underline/.case-proto-arrow/.case-proto-dots as-is, same as the
   Prototypes and Clalit Research Competitors carousels. Each slide holds
   real, variable-height content rather than a single fixed-aspect-ratio
   video, so it needs the same display:none/flex slide-swap override as
   .competitor-media uses. */
.mp-usecase-media .case-proto-slide {
  position: static;
  opacity: 1;
  visibility: visible;
  display: none;
  flex-direction: column;
  gap: 28px;
}

.mp-usecase-media .case-proto-slide.is-active {
  display: flex;
}

/* The "Workflow" slide's flow-diagram canvases (.mp-flow-canvas) are a
   fixed px size (965x760 / 460x482, absolutely-positioned children) that
   don't reflow like real text/table content, so they can't just rely on
   the carousel's narrower 84% panel the way the Wireframes/Workflow
   Statuses Definition slides do. [data-usecase-scale] marks the wrapper
   script.js measures and scales (via CSS transform) so the diagram
   shrinks to fit the available panel width instead of overflowing it;
   the wrapper's own height is set inline to the scaled result so it
   doesn't leave leftover blank space below the shrunk diagram. */
[data-usecase-scale] {
  overflow: hidden;
}

[data-usecase-scale] .mp-flow-canvas {
  transform-origin: top left;
}

/* ---------- Flow diagrams ---------- */
.mp-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 460px;
  margin: 0 auto;
}

.mp-flow-step {
  width: 100%;
  border: 1px solid var(--mp-blue-dark);
  border-radius: 8px;
  padding: 12px 18px;
  text-align: center;
  font-size: 12px;
  background: #fff;
  position: relative;
}

.mp-flow-step strong { font-weight: 700; }

.mp-flow-arrow {
  width: 1px;
  height: 22px;
  background: var(--mp-blue-dark);
  position: relative;
}

.mp-flow-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--mp-blue-dark);
}

.mp-flow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.mp-flow-row .mp-flow-step { flex: 1; }

.mp-flow-side {
  border: 1px solid var(--mp-blue-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  background: #fff;
  white-space: nowrap;
  text-align: center;
}

.case-section .mp-flow-note {
  font-size: 10px;
  color: var(--color-muted);
  white-space: nowrap;
  max-width: none;
}

.mp-flow-chip {
  display: inline-block;
  border: 1px solid var(--mp-blue-dark);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  background: #fff;
  color: var(--color-black);
}

.mp-flow-chip--bold { font-weight: 700; }

.mp-flow-branches {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-left: 24px;
}

.mp-flow-groupbox {
  width: 100%;
  background: var(--mp-blue-panel);
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0;
}

.case-section .mp-flow-groupbox-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--mp-blue-dark);
  margin: 0 0 8px;
  max-width: none;
}

.mp-flow-groupbox-label span {
  font-weight: 400;
  color: var(--color-muted);
}

.mp-flow-groupbox .mp-flow-step {
  border-color: rgba(13, 32, 36, 0.5);
  margin-bottom: 10px;
}

.mp-flow-groupbox .mp-flow-step:last-child { margin-bottom: 0; }

.case-section .mp-flow-transition {
  font-size: 10px;
  color: var(--color-muted);
  text-align: center;
  padding: 4px 0;
  max-width: none;
}

/* ---------- Flow diagram canvas (precise connector lines) ---------- */
.mp-flow-canvas {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}

.mp-flow-canvas .mp-node {
  position: absolute;
  border: 1px solid var(--mp-blue-dark);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 12px;
  box-sizing: border-box;
  white-space: nowrap;
}

.mp-flow-canvas .mp-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mp-blue-dark);
}

.mp-flow-canvas .mp-node strong { font-weight: 700; }

.mp-flow-canvas .mp-line {
  position: absolute;
  background: var(--mp-blue-dark);
}

.mp-flow-canvas .mp-line--arrow::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid var(--mp-blue-dark);
}

.case-section .mp-flow-canvas .mp-pill {
  position: absolute;
  background: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--color-muted);
  white-space: nowrap;
  z-index: 1;
  max-width: none;
  margin: 0;
}

.mp-flow-canvas .mp-groupbox-abs {
  position: absolute;
  left: 0;
  background: #dfeef5;
  border-radius: 12px;
  padding: 14px;
  box-sizing: border-box;
}

.mp-flow-canvas .mp-groupbox-abs .mp-flow-groupbox-label {
  font-size: 12px;
  height: 16px;
  line-height: 16px;
  margin: 0 0 8px;
  overflow: hidden;
}

.mp-flow-canvas .mp-groupbox-abs .mp-flow-step {
  height: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  margin-bottom: 10px;
  border-color: rgba(13, 32, 36, 0.5);
}

.mp-flow-canvas .mp-groupbox-abs .mp-flow-step:last-child { margin-bottom: 0; }

/* ---------- Flow diagram: neutral (black/gray) variant, per Screening Provider SVG spec ---------- */
.mp-flow-canvas--neutral .mp-flow-step,
.mp-flow-canvas--neutral .mp-groupbox-abs .mp-flow-step {
  border-color: #25282b;
  color: #25282b;
  font-size: 12px;
}

.mp-flow-canvas--neutral .mp-line,
.mp-flow-canvas--neutral .mp-dot {
  background: #25282b;
}

.mp-flow-canvas--neutral .mp-line--arrow::after {
  border-top-color: #25282b;
}

.case-section .mp-flow-canvas--neutral .mp-pill {
  border-radius: 999px;
  padding: 2px 8px;
}

.case-section .mp-flow-canvas--neutral .mp-pill--dark {
  color: #25282b;
}

.mp-flow-canvas--neutral .mp-flow-groupbox-label,
.mp-flow-canvas--neutral .mp-flow-groupbox-label span {
  color: #25282b;
}

.mp-flow-canvas--neutral .mp-groupbox-abs {
  padding: 10.35px;
}

.mp-flow-canvas--neutral .mp-groupbox-abs .mp-flow-groupbox-label {
  margin-bottom: 13px;
  font-size: 10px;
  height: auto;
  line-height: 14px;
  overflow: visible;
  white-space: nowrap;
}

.mp-flow-canvas--neutral .mp-groupbox-abs .mp-flow-step {
  height: 32.3px;
  margin-bottom: 50.7px;
}

.mp-flow-canvas--neutral .mp-groupbox-abs .mp-flow-step:last-child {
  margin-bottom: 0;
}

/* ---------- Generic data tables (status definitions) ---------- */
.mp-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.mp-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 860px;
  font-size: 12.5px;
  background: #fff;
}

.mp-table caption {
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--mp-blue-dark);
}

.mp-table th,
.mp-table td {
  border: 1px solid #cfd3da;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.mp-table thead th {
  background: #eef0f5;
  font-weight: 700;
}

.mp-table tbody tr.mp-row-green td { background: var(--mp-green-light); }
.mp-table tbody tr.mp-row-strike td { text-decoration: line-through; color: var(--color-muted); }
.mp-table td em { font-style: italic; }

/* ---------- App shell mockups (exams table screens) ---------- */
.mp-app {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid #e3e6ee;
  background: #fff;
  width: 100%;
  /* Match the width of the section dividers (.case-ps-divider), which run
     the full content-column width of .container — not a smaller fixed cap. */
  max-width: 100%;
  margin: 24px 0;
  font-size: 12.5px;
  /* Style guide: component-reproduction text uses --component-font, not
     the portfolio's own --font-family (Eudoxus Sans). Set here on the
     shared shell so every .mp-app instance (Marketplace's own mockups,
     and REAL+'s .rp-intray, which already reinforces the same var on
     itself) inherits it consistently. */
  font-family: var(--component-font);
}

/* Grid Design rebuild (Exam Grid + its embedded panel): the real app UI
   uses Inter, not the portfolio's own Eudoxus Sans — scoped to this one
   mockup instance only. */
.mp-app-grid-design {
  font-family: var(--component-font);
  background: #f5f7fc;
}

.mp-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #eceef3;
}

/* Exam Grid topbar — fixed 120px height to fit the doubled logo + full
   credits/notifications/menu row, matching the Figma header reference.
   Scoped so the Wireframes/preview .mp-app instances keep their compact
   original topbar. */
.mp-app-grid-design .mp-app-topbar {
  height: 70px;
  padding: 0 24px;
  background: #fff;
}

.mp-app-logo {
  height: 26px;
  width: auto;
  display: block;
}

.mp-app-grid-design .mp-app-logo { height: 52px; }

/* Text-based logo fallback (used only where no logo asset applies) */
span.mp-app-logo {
  font-weight: 700;
  font-size: 13px;
  color: var(--mp-blue-dark);
  letter-spacing: 0.02em;
  height: auto;
}

span.mp-app-logo span { color: var(--mp-blue); }

.mp-app-bell {
  position: relative;
  display: inline-flex;
}

.mp-app-bell-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  border-radius: 7px;
  background: var(--mp-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.mp-app-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}

.mp-app-grid-design .mp-app-topbar-right { gap: 22px; }

.mp-app-credits { text-align: left; line-height: 1.4; color: #0d2024; }
.mp-app-credits b { color: var(--mp-green); }
.mp-app-credits .mp-committed-num { color: var(--mp-gray-mid); }

.mp-app-credit-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.mp-app-credit-icon { flex-shrink: 0; }

.mp-app-divider { flex-shrink: 0; }

.mp-app-user { text-align: left; line-height: 1.3; }
.mp-app-user b { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 14px; }
.mp-app-user span { color: var(--mp-blue); font-size: 14px; }
.mp-app-user-arrow { flex-shrink: 0; }

.mp-app-tabs {
  display: flex;
  gap: 40px;
  padding: 0 20px;
  border-bottom: 1px solid #eceef3;
  font-size: 13px;
  color: var(--mp-gray-mid);
}

.mp-app-tabs .active {
  position: relative;
  color: var(--mp-blue-dark);
  font-weight: 600;
  padding: 10px 0;
  margin-bottom: -1px;
}

.mp-app-tabs .active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--mp-blue);
}

.mp-app-tabs span:not(.active) { padding: 10px 0; }

/* Exam Grid tabs — sized/typeset/hover-stated to match the Figma prototype
   (Tabs component: 200px-wide cells, bold 16px, active #4E59A4, inactive
   #757575, filled-pill hover on inactive tabs). Scoped to .mp-app-grid-design
   only so the untouched Wireframes/preview .mp-app instances elsewhere on
   this page keep their original compact tab styling. */
.mp-app-grid-design .mp-app-tabs {
  gap: 0;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 700;
}

.mp-app-grid-design .mp-app-tabs > span {
  width: 200px;
  flex-shrink: 0;
  text-align: center;
}

.mp-app-grid-design .mp-app-tabs .active {
  color: var(--mp-blue);
  font-weight: 700;
  padding: 14px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mp-app-grid-design .mp-app-tabs .active:hover {
  background: var(--mp-blue);
  color: #fff;
}

.mp-app-grid-design .mp-app-tabs .active:hover::after {
  opacity: 0;
}

.mp-app-grid-design .mp-app-tabs .active::after {
  width: 200px;
  height: 3px;
  border-radius: 1.5px;
}

.mp-app-grid-design .mp-app-tabs span:not(.active) {
  padding: 14px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mp-app-grid-design .mp-app-tabs span:not(.active):hover {
  background: var(--mp-blue);
  color: #fff;
}

.mp-app-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.mp-app-search {
  flex: 0 0 26%;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--mp-gray-mid);
  font-size: 12.5px;
}

.mp-app-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  background: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  min-width: 160px;
  font-size: 12.5px;
  /* Gray (--mp-gray-mid, #757575) is the default/placeholder look — same
     color already used for .mp-app-search's own placeholder text — since
     every .mp-app-select on the site currently shows unselected default
     copy ("Select Monitoring Type", "Select Reader", etc.) except one
     (Marketplace's Exam Status "New", an actual filled value): give that
     one .is-filled for real --mp-blue-dark text instead of touching every
     placeholder instance individually. */
  color: var(--mp-gray-mid);
}
.mp-app-select.is-filled { color: var(--mp-blue-dark); }

.mp-app-field-icon {
  flex-shrink: 0;
  padding: 3px;
  border-radius: 5px;
  transition: background 0.15s ease;
}

.mp-app-field-icon:hover {
  background: #f1f6ff;
}

.mp-app-select-label {
  font-size: 11px;
  color: var(--mp-blue);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* Equal-width filter-field group (Search / Exam Status / Reader), used only
   where the search box is paired with a label the same way the dropdowns
   are — the two older .mp-app toolbars (Home/Marketplace-card previews)
   keep their original unlabeled search + More Filters layout untouched. */
.mp-app-field {
  flex: 1 1 0;
  min-width: 180px;
  max-width: 260px;
}

.mp-app-field .mp-app-search {
  flex: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.mp-app-field .mp-app-select {
  width: 100%;
}

.mp-app-btn {
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 400;
  background: var(--mp-blue);
  color: #fff;
  cursor: default;
  white-space: nowrap;
}

.mp-app-btn-ghost {
  background: transparent;
  border: 1px solid var(--mp-blue);
  color: var(--mp-blue);
}

.mp-app-link {
  font-size: 12px;
  color: var(--mp-gray-mid);
  text-decoration: underline;
}

.mp-app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #eceef3;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  color: var(--mp-blue-dark);
}
.mp-app-grid-design .mp-app-footer { background: #fff; }
.mp-app-footer-left, .mp-app-footer-right { display: flex; align-items: center; gap: 12px; }
.mp-app-footer-divider { width: 1px; height: 14px; background: #d7dbe4; }
.mp-app-footer-copyright { color: var(--mp-gray-mid); font-size: 9px; margin-left: 12px; }

.mp-app-body { display: flex; gap: 20px; padding: 0 20px; }
.mp-app-grid-design .mp-app-body { padding-bottom: 14px; align-items: stretch; }

/* ---------- Interaction states (matches Grid Interactions.mov / Figma prototype) ---------- */
.mp-app-select,
.mp-app-search {
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.mp-app-select:hover,
.mp-app-search:hover {
  box-shadow: 0 2px 8px rgba(13, 32, 36, 0.15);
}

.mp-app-btn:not(.mp-app-btn-ghost) {
  cursor: pointer;
  transition: filter 0.15s ease;
}
.mp-app-btn:not(.mp-app-btn-ghost):hover { filter: brightness(0.9); }

/* Ghost/outline buttons fill solid with the (lighter) accent blue on hover,
   clearly distinct from filled buttons' hover (which go to the much darker
   --mp-blue-dark below) rather than a near-white tint that can disappear
   against light backgrounds. Applies to every ghost button on the
   Marketplace page (Cancel, More Filters, etc). */
.mp-app-btn-ghost {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mp-app-btn-ghost:hover {
  background: var(--mp-blue);
  color: #fff;
}

/* Exam Grid "+ Add New Exam" — matches Add new exam button hover effect.mov:
   background swaps from --mp-blue to --mp-blue-dark on hover (not just a
   brightness dip), text stays white. */
.mp-app-grid-design .mp-app-btn:not(.mp-app-btn-ghost) {
  transition: background 0.15s ease;
}
.mp-app-grid-design .mp-app-btn:not(.mp-app-btn-ghost):hover {
  background: var(--mp-blue-dark);
  filter: none;
}

/* Cancel (ghost) button in this modal matches the solid button's hover —
   same --mp-blue-dark fill, not the lighter --mp-blue used by ghost
   buttons elsewhere on the page. */
.mp-app-grid-design .mp-app-btn-ghost:hover {
  background: var(--mp-blue-dark);
  color: #fff;
}

.mp-app-link { cursor: pointer; transition: color 0.15s ease; }
.mp-app-link:hover { color: var(--mp-blue-dark); }

.mp-app-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mp-app-menu-icon:hover { background: var(--mp-blue-panel); }

.mp-app-user { cursor: pointer; transition: color 0.15s ease; }
.mp-app-user:hover b { color: var(--mp-blue); }

.mp-app-bell { cursor: pointer; transition: filter 0.15s ease; }
.mp-app-bell:hover { filter: brightness(0.85); }

.mp-app-table-wrap { flex: 1; overflow-x: auto; }
/* Height-matching without a guessed pixel value: `contain: size` tells the
   browser to size this box as if it had no content (so its 61 rows never
   inflate the row's height), while the sibling .mp-panel keeps its normal
   content-based height. With .mp-app-body's align-items: stretch, the flex
   line's height is then set purely by the panel, and this box is stretched
   to that exact same height — so the two panels are always pixel-equal,
   automatically, even if the panel's content height changes later. The
   list's own rows (which no longer fit inside that height) scroll via
   overflow-y: auto, with the scrollbar hidden across engines so it reads as
   a plain fixed-height panel. */
.mp-app-grid-design .mp-app-table-wrap {
  contain: size;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}
.mp-app-grid-design .mp-app-table-wrap::-webkit-scrollbar { display: none; /* Chrome/Safari/new Edge */ }

.mp-app-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.mp-app-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--mp-gray-mid);
  font-weight: 600;
  border-bottom: 1px solid #eceef3;
  white-space: nowrap;
}

.mp-app-grid-design .mp-app-table th {
  color: var(--mp-blue);
  font-weight: 400;
  border-bottom: none;
}

/* Sticky column-header row: stays pinned to the top of the scrolling list
   instead of scrolling away with the rows. Needs its own opaque background
   (matching the panel's F5F7FC backdrop) since rows scroll underneath it. */
.mp-app-grid-design .mp-app-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f7fc;
}

.mp-exam-status-failed { color: var(--mp-red); }

.mp-app-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f2f6;
  white-space: nowrap;
}

.mp-app-table tbody tr.selected { background: var(--mp-blue-panel); box-shadow: inset 3px 0 0 var(--mp-blue); }
.mp-app-table tbody tr:not(.selected) { cursor: pointer; transition: background 0.15s ease; }
.mp-app-table tbody tr:not(.selected):hover { background: var(--mp-blue-panel); }

/* Exam Grid rows — each row rendered as its own rounded 8px card with 8px
   gaps between rows (border-collapse:separate + border-spacing, since
   border-radius on <tr> itself isn't reliably supported — the corners are
   applied to the first/last <td> instead). Scoped to .mp-app-grid-design so
   the Wireframes preview table keeps its plain flat-row styling. */
.mp-app-grid-design .mp-app-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.mp-app-grid-design .mp-app-table td {
  border-bottom: none;
  background: #fff;
}

.mp-app-grid-design .mp-app-table td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.mp-app-grid-design .mp-app-table td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Selected row — fill #DFEEF5 (same tint as --mp-edp-header-bg). The accent
   bar is painted as a hard-stop background gradient on the first cell
   (instead of a separate ::before shape) so it is clipped by the exact same
   border-radius as the cell itself — a separate absolutely-positioned bar
   risked a subpixel misalignment against the cell's own rounded corner,
   which is what made the left edge look "off". No box-shadow: applying one
   per-cell created a visible seam between adjacent columns since each cell
   cast its own shadow into its neighbor's area. */
.mp-app-grid-design .mp-app-table tbody tr.selected {
  background: transparent;
  box-shadow: none;
}
.mp-app-grid-design .mp-app-table tbody tr.selected td {
  background: var(--mp-edp-header-bg);
}
.mp-app-grid-design .mp-app-table tbody tr.selected td:first-child {
  background: linear-gradient(to right, var(--mp-blue) 0 9px, var(--mp-edp-header-bg) 9px 100%);
  padding-left: 21px;
}
.mp-app-grid-design .mp-app-table tbody tr:not(.selected):hover td { background: var(--mp-edp-header-bg); }

.mp-icon-cell { color: var(--mp-gray-mid); }
.mp-icon-cell.alert { color: var(--mp-red); }
.mp-icon-cell.ai { color: var(--mp-red); font-weight: 700; font-size: 11px; border: 1px solid var(--mp-red); border-radius: 4px; padding: 1px 4px; }
.mp-icon-cell.ok { color: var(--mp-green); }

/* ---------- Detail / right panel ---------- */
.mp-panel {
  flex: 0 0 380px;
  border-left: 1px solid #eceef3;
  padding: 14px 18px;
  font-size: 12px;
}

.mp-panel-standalone {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid #e3e6ee;
  max-width: 620px;
  margin: 24px 0;
  padding: 16px 18px;
  font-size: 12px;
  background: #fff;
}

.mp-panel-title {
  background: var(--mp-blue-panel);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin: -14px -18px 14px;
}

.mp-panel-standalone .mp-panel-title { margin: -16px -18px 14px; }

.mp-panel-section {
  border: 1px solid #eceef3;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.mp-panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid #eceef3;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.mp-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.mp-panel-grid div span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mp-blue);
  margin-bottom: 2px;
}

.mp-panel-mini-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mp-panel-mini-table th { text-align: left; color: var(--mp-gray-mid); font-weight: 600; padding: 4px 6px; }
.mp-panel-mini-table td { padding: 6px; border-top: 1px solid #f1f2f6; }

.mp-textarea-placeholder {
  background: #eceef1;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--mp-gray-mid);
  font-size: 11.5px;
  font-style: italic;
  margin-top: 4px;
}

.mp-field-note {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mp-blue-dark);
  margin-bottom: 4px;
}

/* ---------- Status badges ---------- */
.mp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.mp-badge-new { background: var(--mp-blue-panel); color: var(--mp-blue); }
.mp-badge-progress { color: var(--mp-blue); font-weight: 600; }
.mp-badge-completed { color: var(--mp-green); font-weight: 600; }
.mp-badge-failed { color: var(--mp-red); font-weight: 600; }
.mp-badge-pending { color: var(--mp-gray-mid); font-style: italic; }

/* ---------- Wizard / stepper ---------- */
.mp-wizard {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  font-size: 11.5px;
}

/* The step's own flex box is just the dot (position:relative anchor) — the
   label is pulled out of flow with position:absolute so it floats above
   the connector line instead of pushing the line rightward. This lets the
   connector start right at the dot's edge instead of after the label. */
.mp-wizard-step {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--mp-gray-light);
  white-space: nowrap;
}

.mp-wizard-step .label {
  position: absolute;
  left: calc(100% + 8px);
  bottom: 50%;
  white-space: nowrap;
}

.mp-wizard-step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--mp-gray-light);
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.mp-wizard-step.done .dot,
.mp-wizard-step.current .dot {
  background: var(--mp-blue);
  color: #fff;
}

/* Current step gets a white-gap + blue outer ring "halo" around the solid
   dot, matching steps.svg (an outer stroke circle sits outside the filled
   circle with a visible white gap between them). */
.mp-wizard-step.current .dot {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--mp-blue);
}

/* Terminal, unlabeled step: solid gray dot with a small centered light dot
   instead of a number. */
.mp-wizard-step .dot.dot-end::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.mp-wizard-step.done span.label,
.mp-wizard-step.current span.label { color: var(--mp-blue); font-weight: 400; }

.mp-wizard-connector {
  flex: 1;
  height: 1.5px;
  background: var(--mp-gray-light);
  margin: 0 4px;
  min-width: 20px;
}

.mp-wizard-connector.done { background: var(--mp-blue); }

/* Connector right after the current step: half-filled to blue, matching
   steps.svg's partial-progress line. */
.mp-wizard-connector.half {
  background: linear-gradient(to right, var(--mp-blue) 50%, var(--mp-gray-light) 50%);
}

/* ---------- Modal-style cards ---------- */
.mp-modal-card {
  border: 1px solid #e3e6ee;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 18px;
  background: #fff;
}

.mp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.mp-modal-header .x { color: var(--mp-gray-mid); font-size: 16px; }

.mp-modal-dropzone {
  background: var(--mp-blue);
  color: #fff;
  text-align: center;
  padding: 22px;
  border-radius: 6px;
  font-size: 14px;
}

.mp-progress-bar {
  height: 14px;
  border-radius: 8px;
  border: 1px solid var(--mp-blue);
  background: #fff;
  overflow: hidden;
}

.mp-progress-bar-fill {
  height: 100%;
  background: var(--mp-blue);
}

.mp-warning {
  color: var(--mp-red);
  font-size: 12px;
  margin-top: 10px;
}

.mp-compat-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0; }
.mp-compat-table th { text-align: left; color: var(--mp-blue); padding: 6px; font-size: 11.5px; }
.mp-compat-table td { padding: 6px; border-top: 1px solid #eceef3; }
.mp-compat-ok { color: var(--mp-green); }
.mp-compat-fail { color: var(--mp-red); }

.mp-algo-list { display: flex; gap: 24px; font-size: 12.5px; margin: 10px 0 16px; }
.mp-algo-list label { display: flex; align-items: center; gap: 6px; }

.mp-modal-btn-wrap { text-align: center; padding: 26px 0; }

.mp-modal-btn {
  display: inline-block;
  background: var(--mp-blue);
  color: #fff;
  padding: 13px 32px;
  border-radius: 8px;
  font-size: 14px;
}

.mp-flow-side-note {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.mp-flow-side-note > .mp-modal-card { flex: 1; margin-bottom: 0; min-width: 0; }

.mp-flow-side-note-text {
  font-size: 12px;
  color: var(--color-muted);
  padding-top: 22px;
  line-height: 1.6;
  white-space: nowrap;
}

/* ---------- Exam Upload modal (Final Design), matches
   "Marketplace Exam Upload Modal.svg" ---------- */
.mp-upload-modal {
  max-width: 980px;
  background: var(--mp-blue-panel);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #e3e6ee;
  box-shadow: var(--shadow-card);
}

.mp-upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  color: var(--mp-blue-dark);
  padding: 4px 6px 18px;
}

.mp-upload-modal-close {
  display: inline-flex;
  color: var(--mp-blue-dark);
}

.mp-upload-modal-close svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mp-upload-modal-body {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* The last card's own margin-bottom stacked on top of the body's own
   bottom padding, making the gap below "Select the exams..." larger than
   the gap above the wizard at the top. Drop it so both edges match. */
.mp-upload-modal-body > .mp-modal-card:last-child {
  margin-bottom: 0;
}

.mp-upload-modal .mp-wizard {
  margin-bottom: 2px;
  position: relative;
}

/* Hotspot for the whole stepper component sits inline next to the last
   step's dot. Its tooltip opens downward (.mp-tooltip-info--below below)
   instead of the default upward/beside direction, so it never covers the
   wizard row itself, and right-aligns to the indicator so it stays inside
   the modal instead of overflowing past the right edge. */
.mp-upload-modal .mp-wizard-step .mp-indicator {
  margin-left: 6px;
}

/* .mp-tooltip-info (single class, defined later in the cascade) would
   otherwise win over a same-specificity .mp-tooltip-info--below rule and
   silently keep the upward-opening top/bottom/transform values — same
   cascade-order bug fixed earlier for .mp-tooltip-dark. Combined selector
   boosts specificity so the downward flip actually applies. */
.mp-tooltip-info.mp-tooltip-info--below {
  top: 100%;
  bottom: auto;
  left: auto;
  right: -8px;
  margin-left: 0;
  margin-top: 14px;
  transform: translate(0, -6px);
}
.mp-indicator:hover .mp-tooltip-info.mp-tooltip-info--below,
.mp-indicator:focus-within .mp-tooltip-info.mp-tooltip-info--below {
  transform: translate(0, 0);
}
.mp-tooltip-info.mp-tooltip-info--below::after {
  top: auto;
  bottom: 100%;
  left: auto;
  right: 10px;
  margin-left: 0;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.mp-upload-modal .mp-wizard-step .dot {
  width: 33px;
  height: 33px;
  font-size: 13px;
}

.mp-upload-modal .mp-wizard-step.done .dot,
.mp-upload-modal .mp-wizard-step.current .dot {
  background: var(--mp-blue);
  color: #fff;
}

/* Matches "Step unit in process.svg": the current dot's own solid fill is
   smaller than the other states' dots, with a white gap + blue ring drawn
   around it via box-shadow so the total footprint lines back up with the
   done/disabled dots. */
.mp-upload-modal .mp-wizard-step.current .dot {
  width: 29px;
  height: 29px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--mp-blue);
}

.mp-upload-modal .mp-wizard-step span.label {
  font-size: 14px;
  line-height: 1;
}

.mp-upload-modal .mp-wizard-step .label {
  left: calc(100% + 4px);
  bottom: calc(50% + 6px);
}

.mp-upload-modal .mp-wizard-connector {
  margin: 0 4px;
}

.mp-modal-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--mp-blue-dark);
  border-bottom: 1.5px solid var(--mp-blue-dark);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.mp-exam-row {
  padding: 6px 0;
}

.mp-exam-row-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mp-exam-row-top > .mp-check-box {
  margin-top: 2px;
}

.mp-exam-row-fields {
  display: grid;
  /* Explicit per-column sizing (not equal 1fr) matching each field's actual
     content width from the source design — Patient Name/Procedure Group
     need the most room, Age/Modality the least. Widened gap plus the
     modal's own wider max-width give enough total room that no field's
     label or value needs to wrap (see .mp-exam-row-fields div / div span
     white-space: nowrap below). */
  grid-template-columns:
    minmax(120px, 1.3fr)
    minmax(85px, 1fr)
    minmax(55px, 0.7fr)
    minmax(85px, 1fr)
    minmax(120px, 1.3fr)
    minmax(55px, 0.7fr)
    minmax(95px, 1fr)
    minmax(45px, 0.6fr);
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.mp-exam-row-fields div span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mp-blue);
  margin-bottom: 3px;
  white-space: nowrap;
}

.mp-exam-row-fields div {
  font-size: 14px;
  color: var(--mp-blue-dark);
  font-weight: 400;
  white-space: nowrap;
}

.mp-exam-compat {
  margin-top: 12px;
  padding-left: 28px;
  font-size: 14px;
  color: var(--mp-blue-dark);
}

.mp-exam-compat-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mp-blue);
  margin-bottom: 8px;
}

.mp-exam-compat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.mp-exam-compat-row b {
  font-weight: 400;
  margin-right: 2px;
}

.mp-compat-badge {
  width: 12px;
  height: 12px;
  display: inline-flex;
  flex-shrink: 0;
}

.mp-compat-badge svg { display: block; }
.mp-exam-compat-fail-text { color: var(--mp-red); font-weight: 600; }

/* Generic inline hover-tooltip trigger: reuses the same .mp-tooltip
   positioning/arrow mechanics as .mp-indicator's tooltips, but for plain
   inline text rather than a dot. */
.mp-hover-tip {
  position: relative;
  cursor: default;
}

.mp-hover-tip:hover,
.mp-hover-tip:focus-within {
  z-index: 100;
}

.mp-hover-tip:hover .mp-tooltip,
.mp-hover-tip:focus-within .mp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.mp-tooltip-dark::after { background: var(--mp-blue-dark); }
/* Same specificity issue as the background fix above: the base
   .mp-tooltip::after (later in the cascade) sets a white arrow, so bump
   specificity to guarantee the dark arrow wins on the hover-tooltip. */
.mp-tooltip.mp-tooltip-dark::after { background: var(--mp-blue-dark); }

/* On the hover-tooltip (as opposed to the static side-note usage of
   .mp-tooltip-dark, which keeps its fixed 190px wrapping width), size to
   content and force one line so short strings like this never wrap. */
.mp-tooltip.mp-tooltip-dark {
  width: auto;
  max-width: none;
  white-space: nowrap;
  padding: 10px 14px;
}

.mp-exam-row-divider {
  border: none;
  border-top: 1px solid #eceef3;
  margin: 14px 0;
}

.mp-upload-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 18px 6px 4px;
}

/* ---------- Patient Report validation (Final Design), matches
   "Patient Report validation.svg" ---------- */
.mp-prv-body {
  padding: 24px;
}

/* Reuses the shared .mp-app-btn.mp-app-btn-ghost component (border/color/
   hover already come from there — including the black-bg/white-text hover
   scoped to .mp-app-grid-design, the standard for every ghost button in
   Marketplace's design examples) rather than a one-off style; this class
   only adds the icon layout on top. */
.mp-prv-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  vertical-align: middle;
}
.mp-prv-back-btn svg { flex-shrink: 0; }

.mp-prv-back-indicator {
  margin-left: 8px;
  margin-bottom: 18px;
  vertical-align: middle;
}

/* Confirmed requirement: the Questions/approval box's bottom edge must
   land exactly on the Radiologist Report panel's bottom edge. Columns
   stay top-aligned here (not CSS stretch — stretch grows the shorter
   column instead of shrinking the taller one, see script.js), and
   script.js measures the Radiologist Report panel's real height and sets
   the CCS image window's height from it so the two bottoms match exactly
   at any viewport width. */
/* Pure-CSS height match (no JS): align-items:stretch (flex default) makes
   both columns the height of the taller one, which is always the left
   (Radiologist Report) column — the right column's own natural height
   can't out-grow it because .mp-prv-image-wrap below uses flex-basis:0,
   so it contributes ~0 to the right column's own natural/hypothetical
   height instead of its full (much taller) intrinsic image height. Once
   stretched to a definite height, that same flex-basis:0 + min-height:0
   lets it grow to fill exactly whatever space is left after the title,
   controls, padding and the Questions/approval box below — so the
   approval box's bottom edge always lands on the Radiologist Report
   panel's bottom edge, at any viewport width or content length, with no
   measurement/timing to get wrong. */
.mp-prv-columns {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.mp-prv-col {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-prv-panel {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}

.mp-prv-panel-ccs {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Underline color matches the source SVG's own stroke value (#20293C) for
   these two panel titles specifically — a distinct dark navy from the
   site's usual var(--mp-blue-dark), confirmed against the source, not a
   substitution. */
.mp-prv-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--mp-blue-dark);
  border-bottom: 1.5px solid #20293c;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.mp-prv-report-box {
  border: 1px solid var(--mp-gray-light);
  border-radius: 8px;
  padding: 16px 18px;
}

.mp-prv-report-entry p {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--mp-blue-dark);
}
.mp-prv-report-entry p:last-child { margin-bottom: 0; }

.mp-prv-report-divider {
  border: none;
  border-top: 1px solid var(--mp-gray-light);
  margin: 14px 0;
}

/* Scrollable window onto the full CCS report image (header, patient
   details, CAC gauge, cardiac solution description, radiologist comments,
   and both result images) — the image itself stays taller than this
   window, so it's only ever partially visible here, the rest reachable by
   scrolling. flex: 1 1 0 (not auto) is the key to the pure-CSS height
   match on .mp-prv-columns above: a 0 flex-basis means this element's own
   intrinsic image height doesn't inflate the right column's natural
   size, so the column stretches to match the LEFT column instead; once
   stretched, flex-grow expands this element to fill whatever's left over
   after the title, controls and the approval box below. min-height:0
   overrides the flex default that would otherwise refuse to shrink below
   content size. Scrollbar is hidden across engines (same pattern as
   .mp-app-table-wrap) so it reads as mouse-wheel-scrollable content,
   never a visible scroll track. */
.mp-prv-image-wrap {
  border: 1px solid var(--mp-gray-light);
  border-radius: 6px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}
.mp-prv-image-wrap::-webkit-scrollbar { display: none; /* Chrome/Safari/new Edge */ }
.mp-prv-image { width: 100%; display: block; }

/* Dots + prev/next arrows sit in their own row BELOW the image (matching
   the source spec's own layout), not overlaid on top of it. Dots are
   centered via absolute positioning within this relative row so they sit
   in the middle regardless of the nav buttons' width on the right. */
.mp-prv-image-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
  flex-shrink: 0;
}

.mp-prv-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mp-prv-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mp-gray-light);
}
.mp-prv-dots .dot.active { background: var(--mp-blue); }

.mp-prv-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Right arrow (enabled/default) matches "Arrow active.svg": white bg,
   drop shadow instead of a border, dark arrow glyph. Hover matches
   "Arrow hover.svg": same shadow, background swaps to --mp-blue-panel
   (#F1F6FF). Radius/shadow values are scaled up from the source SVGs'
   12.28px box to this component's 22px box, same ratio. */
.mp-prv-nav-btn {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: #fff;
  border: none;
  box-shadow: 0 1.5px 3px rgba(13, 32, 36, 0.135);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mp-blue-dark);
  padding: 0;
  transition: background 0.15s ease;
}
.mp-prv-nav-btn:hover { background: var(--mp-blue-panel); }

/* Left arrow (disabled) matches "Arrow disabled.svg": flat white bg, no
   shadow, no border, gray glyph (baked into the icon's own fill), and no
   hover/active interaction at all. */
.mp-prv-nav-btn--disabled {
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
.mp-prv-nav-btn--disabled:hover { background: #fff; }

/* Sits directly below the CCS Patient Report panel within the right
   column only (matching "Radiologist report and Patient report
   layout.svg" — the footer shares the exact same width as the CCS card
   above it, not the full two-column row). Matches "Validation approval
   section.svg": question on its own row, radios stacked BELOW it (not
   inline with it), Submit spanning the full height on the right, disabled
   by default until a radio is picked. */
.mp-prv-approval {
  background: #fff;
  border: 1px solid var(--mp-gray-light);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.mp-prv-approval-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-prv-approval-question {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-blue);
}
.mp-prv-radio-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mp-prv-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--mp-blue-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.mp-prv-radio:hover .mp-prv-radio-dot { background: var(--mp-blue); }
.mp-prv-radio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--mp-blue);
  flex-shrink: 0;
  transition: background 0.15s ease;
}
/* Disabled state (default, until a radio is picked): muted gray text
   instead of dark, no border/outline, not-allowed cursor, no hover
   feedback — fill matches the source spec's #F3F4F4, text its #757575. */
.mp-prv-submit {
  border: none;
  background: #f3f4f4;
  color: var(--mp-gray-mid);
  border-radius: 5px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.mp-prv-submit:disabled {
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .mp-prv-columns { flex-direction: column; }
  /* Stacked columns no longer share a row, so there's no sibling height
     to match — let the image window revert to its natural aspect-ratio
     height instead of trying to flex-grow inside an unconstrained
     (auto-height) column, which would otherwise collapse it to 0. */
  .mp-prv-image-wrap { flex: 0 0 auto; max-height: 420px; }
}

.mp-tooltip-dark {
  background: var(--mp-blue-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 2px;
  width: 190px;
  flex-shrink: 0;
}

/* Sit closer to the "Not compliant" trigger text — the base .mp-tooltip's
   14px offset (tuned for the larger indicator-dot tooltips) left too much
   gap above this inline-text trigger. */
.mp-tooltip.mp-tooltip-dark {
  bottom: calc(100% + 6px);
}

/* Arrow on the dark tooltip is shorter and wider than the default
   .mp-tooltip::after triangle, matching "Not compliant Tooltip.svg"
   (base ~10.3, height ~3.7 at the reference's scale). Scoped to
   .mp-tooltip-dark only so other (non-dark) tooltips keep their own arrow. */
.mp-tooltip-dark::after,
.mp-tooltip.mp-tooltip-dark::after {
  width: 14px;
  height: 5px;
  margin-left: -7px;
}

/* Higher specificity than the base .mp-tooltip rule (which sets a white
   background later in the cascade) so the dark background actually wins
   when both classes are combined on the hover-tooltip variant. */
.mp-tooltip.mp-tooltip-dark {
  background: var(--mp-blue-dark);
  color: #fff;
}

.mp-tooltip-dark strong { display: block; margin-bottom: 2px; }

.mp-tooltip-mark {
  display: block;
  font-size: 14px;
  margin-top: 6px;
  font-weight: 700;
}

.mp-tooltip-mark.ok { color: #4ade80; }
.mp-tooltip-mark.fail { color: #f87171; }

.mp-toast-stack {
  position: absolute;
  top: 78px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
}

.mp-toast {
  background: #e3f2f1;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(13, 32, 36, 0.15);
}

.mp-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 8px;
  color: var(--mp-blue-dark);
}

.mp-toast-header .x { color: var(--mp-gray-mid); font-size: 13px; }

.mp-toast-row { display: flex; align-items: center; gap: 8px; }
.mp-toast-row .mp-progress-bar { flex: 1; height: 10px; border-color: var(--color-teal-dark); }
.mp-toast-row .mp-progress-bar-fill { background: var(--color-teal-dark); }

.mp-toast-abort {
  font-size: 10.5px;
  color: #fff;
  background: var(--color-teal-dark);
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- Icon showcase ---------- */
.mp-icon-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 30px;
  max-width: 1300px;
  margin: 20px 0;
}

.mp-icon-chip {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-blue-dark);
}

.mp-icon-chip svg { width: 14px; height: 14px; }

/* ---------- Button / element / field showcases ---------- */
.mp-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 16px;
  margin: 20px 0;
}

.mp-showcase-item label {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 8px;
  white-space: nowrap;
}

.mp-ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: default;
}

.mp-ds-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mp-ds-btn.filled { background: var(--mp-blue); color: #fff; }
.mp-ds-btn.filled.hover { background: var(--mp-blue-dark); }
.mp-ds-btn.filled.disabled { background: #eef0f2; color: #b7bcc4; }
.mp-ds-btn.ghost { background: transparent; border: 1px solid var(--mp-blue); color: var(--mp-blue); }
.mp-ds-btn.ghost.hover { background: var(--mp-blue-dark); border-color: var(--mp-blue-dark); color: #fff; }
.mp-ds-btn.ghost.disabled { border-color: var(--mp-gray-light); color: var(--mp-gray-mid); }

.mp-elements-col h4, .case-ds-group h4 { font-size: 15px; font-weight: 400; margin: 0 0 14px; }
.mp-elements-row { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 28px; }
.mp-elements-row-outer { gap: 90px; }
.mp-elements-cell { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; text-align: center; font-size: 11px; color: var(--color-muted); }
.mp-elements-cell .swatch { display: flex; align-items: center; justify-content: center; height: 26px; }
.mp-elements-cell.labeled { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.mp-elements-cell.labeled .row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mp-blue-dark); }

.mp-radio-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #c2c5dd;
  box-sizing: border-box;
  background: transparent;
  position: relative;
}
.mp-radio-dot.hover { background: var(--mp-blue); border-color: var(--mp-blue); }
.mp-radio-dot.selected { border-color: var(--mp-blue); background: transparent; }
.mp-radio-dot.selected::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--mp-blue); }
.mp-radio-dot.disabled { border-color: var(--mp-gray-light); opacity: .5; }

.mp-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid #c2c5dd;
  box-sizing: border-box;
  background: transparent;
}
.mp-check-box.hover { background: var(--mp-blue); border-color: var(--mp-blue); }
.mp-check-box.selected { background: var(--mp-blue); border-color: var(--mp-blue); position: relative; }
.mp-check-box.selected::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.mp-check-box.partial { background: var(--mp-blue); border-color: var(--mp-blue); }
.mp-check-box.partial::after { content: ""; width: 7px; height: 1.5px; background: #fff; }
.mp-check-box.disabled { border-color: var(--mp-gray-light); opacity: .5; background: transparent; }
.mp-check-box.disabled.selected { background: var(--mp-gray-light); border-color: var(--mp-gray-light); }
.mp-check-box.disabled.selected::after { border-color: #fff; }

.mp-tab-demo { display: flex; gap: 30px; margin-top: 10px; }
.mp-tab-demo .tab { font-size: 15px; font-weight: 700; padding-bottom: 6px; color: var(--mp-gray-light); }
.mp-tab-demo .tab.active { color: var(--mp-blue); border-bottom: 3px solid var(--mp-blue); }
.mp-tab-demo .tab.hover { background: var(--mp-blue); color: #fff; padding: 8px 16px; border-radius: 6px; }

.mp-showcase-item label.title { display: block; font-size: 14px; font-weight: 400; margin-bottom: 8px; color: #011e41; }
.mp-field-sample .mp-field-label { display: block; font-size: 12px; font-weight: 700; color: var(--mp-blue); margin-bottom: 6px; }
.mp-field-sample .mp-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d7dbe4;
  border-radius: 4px;
  padding: 9px 12px;
  height: 46px;
  box-sizing: border-box;
  font-size: 14px;
  color: var(--mp-blue-dark);
  background: #fff;
}
.mp-field-sample .mp-field.error { border-color: var(--mp-red); }
.mp-field-sample .mp-field.disabled { background: #d8d8d8; color: var(--mp-gray-mid); }
.case-section .error-text { color: var(--mp-red); font-size: 10px; margin-top: 4px; max-width: none; }
.mp-field-sample .placeholder { color: var(--mp-gray-mid); }
.mp-field-eye { display: inline-flex; color: var(--mp-blue-dark); }
.mp-field-eye svg { width: 16px; height: 16px; }
.mp-field-box {
  border: 1px solid #d7dbe4;
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  height: 119px;
  box-sizing: border-box;
  color: var(--mp-gray-mid);
  background: #fff;
}
.mp-field-box.error { border-color: var(--mp-red); color: var(--mp-blue-dark); }
.mp-field-box.filled { color: var(--mp-blue-dark); }
.mp-field-box.disabled { background: #d8d8d8; color: var(--mp-gray-mid); }
.mp-field-box-label { display: block; font-size: 12px; font-weight: 700; color: var(--mp-blue); margin-bottom: 8px; }
.mp-field-box-label.disabled { color: var(--mp-gray-mid); }

/* ---------- Reflection & Impact stat cards ---------- */
.case-ri-panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 60px;
  margin-top: 56px;
  box-sizing: border-box;
}
.case-ri-grid {
  display: grid;
  /* Card width stays at its original size (as if column-gap were still 17%);
     only the gap between cards was reduced. Centering the row absorbs the
     leftover space evenly on both sides instead of growing the cards. */
  grid-template-columns: repeat(3, calc((100% - 34%) / 3));
  column-gap: 8.5%;
  row-gap: 70px;
  justify-content: center;
}
.case-ri-card {
  background: var(--case-ri-tint, #dfeef5);
  border-radius: 16px;
  padding: 32px 30px;
  display: flex;
  align-items: stretch;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 242 / 188;
}
.case-ri-bar {
  flex-shrink: 0;
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--case-accent, #4e59a4);
}
.case-ri-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.case-section .case-ri-number {
  margin: 0;
  font-size: 44px;
  max-width: none;
  font-weight: 700;
  line-height: 1;
  color: #25282b;
  white-space: nowrap;
}
.case-ri-number--min .case-ri-min-suffix { font-size: 44px; margin-left: 4px; }
.case-section .case-ri-desc {
  margin: 0;
  font-size: 20px;
  max-width: none;
  font-weight: 500;
  line-height: 1.4;
  color: #25282b;
}
@media (max-width: 900px) {
  .case-ri-panel { padding: 28px; }
  .case-ri-grid { grid-template-columns: 1fr; row-gap: 24px; column-gap: 0; }
  .case-ri-card { aspect-ratio: auto; }
  .case-section .case-ri-number { font-size: 36px; }
}

/* ---------- Report validation split view ---------- */
.mp-report-shell { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-project); border: 1px solid #e3e6ee; max-width: 1100px; margin: 24px 0; }
.mp-report-topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #eceef3; font-size: 12px; }
.mp-report-back { font-size: 12px; color: var(--mp-blue); border: 1px solid var(--mp-blue); border-radius: 6px; padding: 6px 12px; }
.mp-report-body { display: flex; gap: 1px; background: #eceef3; }
.mp-report-col { background: #fff; flex: 1; padding: 14px 16px; font-size: 11px; }
.mp-report-col h5 { font-size: 12.5px; margin: 0 0 10px; }
.mp-report-text { white-space: pre-line; line-height: 1.6; color: var(--mp-blue-dark); font-size: 11px; }
.mp-report-scan-panel { display: flex; gap: 12px; margin-top: 10px; }
.mp-report-patient-box { flex: 0 0 120px; border: 1px solid #eceef3; border-radius: 6px; padding: 8px; font-size: 10px; }
.mp-report-cac-box { flex: 0 0 90px; border: 1px solid #eceef3; border-radius: 6px; padding: 8px; font-size: 10px; }
.mp-report-scan-img { flex: 1; border-radius: 6px; overflow: hidden; border: 1px solid #eceef3; }
.mp-report-scan-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-report-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid #eceef3; font-size: 12px; background: #fff; }
.mp-report-footer label { display: flex; align-items: center; gap: 6px; margin-right: 16px; }
.mp-report-submit { background: var(--mp-blue); color: #fff; border: none; border-radius: 6px; padding: 8px 20px; font-size: 12px; font-weight: 600; }

@media (max-width: 900px) {
  .mp-app-body { flex-direction: column; }
  .mp-panel { flex: none; border-left: none; border-top: 1px solid #eceef3; }
  .mp-report-body { flex-direction: column; }
}

/* =========================================================================
   Exam Details Panel ("mp-edp-") — pilot rebuild of the Final Design panel,
   sourced from "Exam Details Panel.svg" (colors/spacing/indicator geometry
   measured directly from the SVG's own rects). Deliberately namespaced and
   kept separate from the existing .mp-panel-* classes used by the
   Clinician/Screening Provider/Radiologist subsections below, so this pilot
   doesn't change anything outside the two "Exam Grid" / "Exam Details
   Panel" subsections until it's approved as the new standard.
   ========================================================================= */

.case-section .mp-lead-full { max-width: none; }

.mp-edp {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid #e3e6ee;
  background: #fff;
  max-width: 720px;
  margin: 24px 0;
}

.mp-edp-header {
  background: var(--mp-edp-header-bg);
  padding: 14px 20px;
  font-size: 13px;
  color: var(--mp-blue-dark);
}

.mp-edp-body { padding: 18px 20px 20px; }

.mp-edp-section {
  background: var(--mp-edp-section-bg);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.mp-edp-section:last-child { margin-bottom: 0; }

.mp-edp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--mp-blue-dark);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.mp-edp-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: var(--mp-blue-dark);
}

.mp-edp-chevron {
  display: inline-flex;
  color: var(--mp-blue-dark);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.mp-edp-chevron:hover { opacity: 0.6; }

.mp-edp-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 28px;
  flex: 1 1 auto;
  min-width: 0;
}

.mp-edp-grid > div {
  flex: 1 1 0;
  min-width: 0;
}

.mp-edp-grid div span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mp-blue);
  margin-bottom: 3px;
}

.mp-edp-grid div { font-size: 12.5px; color: var(--mp-blue-dark); font-weight: 500; }

.mp-edp-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mp-edp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}

.mp-edp-icon-btn {
  width: 28px;
  height: 27px;
  border-radius: 4px;
  background: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-blue-dark);
  box-shadow: 0 1px 2px rgba(13, 32, 36, 0.08);
  flex-shrink: 0;
}

.mp-edp-icon-btn[disabled] { color: #c7cbd6; }
.mp-edp-icon-btn:not([disabled]) { cursor: pointer; transition: background 0.15s ease, box-shadow 0.15s ease; }
.mp-edp-icon-btn:not([disabled]):hover { background: var(--mp-blue-panel); box-shadow: 0 2px 4px rgba(13, 32, 36, 0.16); }

.mp-edp-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-edp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mp-edp-table th {
  text-align: left;
  color: var(--mp-blue);
  font-weight: 700;
  font-size: 11.5px;
  padding: 0 0 8px;
  border-bottom: 1.5px solid var(--mp-gray-light);
}
.mp-edp-table th:last-child { text-align: right; }
.mp-edp-table td { padding: 12px 0; border-top: 1px solid #e4e7f1; vertical-align: middle; }
.mp-edp-table tr:first-child td { border-top: none; }
.mp-edp-table td:last-child { text-align: right; }

.mp-edp-sent-time em { color: var(--mp-gray-mid); font-style: italic; font-size: 11px; margin-left: 4px; }

.mp-edp-status-failed { color: var(--mp-red); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.mp-edp-status-completed { color: var(--mp-blue-dark); font-weight: 500; }
.mp-edp-status-progress { color: var(--mp-blue-dark); font-weight: 500; }

.mp-edp-progress {
  display: block;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: var(--mp-gray-light);
  margin-bottom: 6px;
  overflow: hidden;
}
.mp-edp-progress span { display: block; height: 100%; background: var(--mp-blue); border-radius: 2px; }

.mp-edp-italic { font-style: italic; color: var(--mp-blue-dark); }

/* ---- Notification indicator: soft pulsing halo + solid dot + hover tooltip ----
   The indicator is an annotation overlay, not part of the underlying product
   design — it is taken out of normal flow and layered above the design on its
   own stacking context so it never shifts the position of real design
   elements (title text, chevrons, action buttons stay exactly where the
   source design/SVG places them). */
.mp-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  z-index: 6;
}

/* Each indicator is its own stacking context (position:relative + z-index),
   so a tooltip's high z-index only wins against elements INSIDE that same
   indicator — not against other indicators elsewhere on the panel painted
   later in DOM order. Boosting the ACTIVE indicator's own z-index above
   every other indicator's resting z-index (6) guarantees its open tooltip
   always paints on the very top layer, never covered by another section's
   dot or content. */
.mp-indicator:hover,
.mp-indicator:focus-within {
  z-index: 100;
}

.mp-edp-section-title .mp-indicator,
.mp-edp-actions .mp-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 8px;
  transform: translateY(-50%);
}

.mp-indicator-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mp-blue);
}

.mp-indicator-dot::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--mp-blue);
  opacity: 0;
  animation: mpIndicatorPulse 2s ease-out infinite;
}

.mp-indicator-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5px;
  height: 2.5px;
  margin: -1.25px 0 0 -1.25px;
  border-radius: 50%;
  background: #fff;
}

@keyframes mpIndicatorPulse {
  0% { opacity: 0.55; transform: scale(1); }
  70% { opacity: 0; }
  100% { opacity: 0; transform: scale(2.4); }
}

.mp-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 30;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(13, 32, 36, 0.22);
  text-align: left;
  cursor: auto;
}

.mp-indicator:hover .mp-tooltip,
.mp-indicator:focus-within .mp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.mp-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.mp-tooltip--right { left: auto; right: -6px; transform: translate(0, 6px); }
.mp-indicator:hover .mp-tooltip--right,
.mp-indicator:focus-within .mp-tooltip--right { transform: translate(0, 0); }
.mp-tooltip--right::after { left: auto; right: 10px; margin-left: 0; }

/* Section-info tooltips open to the RIGHT of their indicator dot (not
   centered above it), with a left-pointing arrow — matching the reference
   video/prototype. By default they open downward (top: -16px overlaps the
   tooltip's top 16px into the indicator's own row, so the arrow at 24px
   down from the tooltip's top lands exactly on the dot's vertical center).
   Sections near the BOTTOM of a panel get the .mp-tooltip--up modifier,
   which mirrors this from the bottom edge instead, so the tooltip opens
   upward and never gets clipped by the panel's bottom edge. */
/* --tt-offset drives how far the tooltip box sits from the indicator (its
   top when opening downward, its bottom when .mp-tooltip--up flips it to
   open upward). The arrow (::after) is derived from the SAME variable via
   calc(8px - var(--tt-offset)), so the two can never drift apart: whatever
   vertical position a tooltip is nudged to (e.g. to clear a panel edge),
   the arrow automatically re-anchors to the indicator dot. To manually
   reposition a tooltip site-wide, set `--tt-offset: <value>;` inline on
   the .mp-tooltip element itself — never set `top`/`bottom` directly, or
   the arrow will stop tracking it. */
.mp-tooltip-info {
  --tt-offset: -16px;
  width: 280px;
  padding: 18px 20px;
  left: 100%;
  right: auto;
  top: var(--tt-offset);
  bottom: auto;
  margin-left: 14px;
  transform: translate(-6px, 0);
  /* .mp-wizard-step sets white-space:nowrap and it inherits down into any
     tooltip nested inside a wizard step's indicator, forcing the sentence
     onto one unwrapped line that spills past this box's fixed width.
     Reset explicitly so the tooltip always wraps regardless of ancestor. */
  white-space: normal;
}
.mp-indicator:hover .mp-tooltip-info,
.mp-indicator:focus-within .mp-tooltip-info {
  transform: translate(0, 0);
}
.mp-tooltip-info::after {
  top: calc(8px - var(--tt-offset));
  bottom: auto;
  left: -6px;
  margin-left: 0;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.mp-tooltip-info.mp-tooltip--up {
  top: auto;
  bottom: var(--tt-offset);
}
.mp-tooltip-info.mp-tooltip--up::after {
  top: auto;
  bottom: calc(8px - var(--tt-offset));
}

/* Right-column sections (e.g. the CCS Patient Report title inside
   .mp-prv-panel-ccs) sit right up against .mp-app's own overflow:hidden
   edge, so the default rightward-opening tooltip above would get clipped.
   This modifier flips it to open leftward instead, arrow included.
   Combined-class selector for the same cascade-order reason as
   .mp-tooltip-info--below above. */
.mp-tooltip-info.mp-tooltip-info--left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 14px;
  transform: translate(6px, 0);
}
.mp-indicator:hover .mp-tooltip-info.mp-tooltip-info--left,
.mp-indicator:focus-within .mp-tooltip-info.mp-tooltip-info--left {
  transform: translate(0, 0);
}
.mp-tooltip-info.mp-tooltip-info--left::after {
  left: auto;
  right: -6px;
  margin-left: 0;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
}
.mp-tooltip-info p,
.mp-tooltip-info .mp-tooltip-info-text {
  display: block;
  margin: 0;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--mp-blue-dark);
}

.mp-tooltip-actions { width: 220px; padding: 14px 18px; }
.mp-tooltip-actions strong { display: block; font-size: 13px; font-weight: 700; color: var(--mp-blue-dark); margin-bottom: 8px; }
.mp-tooltip-actions-group { padding: 8px 0; border-top: 1px solid var(--mp-gray-light); }
.mp-tooltip-actions-group:first-of-type { border-top: none; padding-top: 0; }
.mp-tooltip-actions-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mp-blue-dark);
  padding: 6px 0;
}
.mp-tooltip-actions-item svg { flex-shrink: 0; width: 15px; height: 15px; }
.mp-tooltip-actions-item.is-delete { color: var(--mp-red); }

@media (max-width: 640px) {
  .mp-tooltip-info, .mp-tooltip-actions { width: 220px; }
}

/* =========================================================================
   REAL case study — coded UI components (replace screenshot crops).
   Namespaced with "real-" to avoid collisions with shared classes.
   Colors reuse the REAL product's own transcribed design-system tokens.
   ========================================================================= */

.real-ui {
  --real-bg: #20293c;
  --real-panel: #2f3b52;
  --real-teal: #1597a1;
  --real-teal-dark: #226979;
  --real-orange: #ff7201;
  --real-yellow: #ffbb37;
  --real-green: #1a932e;
  --real-red: #d24b4b;
  background: var(--real-bg);
  border-radius: 14px;
  padding: 20px;
  color: #e7ecf3;
  box-shadow: var(--shadow-card);
  margin: 24px 0;
  max-width: 900px;
  font-size: 13px;
  /* Style guide: component-reproduction text uses --component-font, not
     the portfolio's own --font-family. */
  font-family: var(--component-font);
}

.real-ui * { box-sizing: border-box; }
.real-ui-wide { max-width: 1160px; }

.real-ui.is-wireframe {
  --real-bg: #ffffff;
  --real-panel: #f2f4f7;
  --real-teal: #555b66;
  --real-teal-dark: #1c1c1e;
  --real-orange: #888;
  --real-yellow: #aaa;
  --real-green: #888;
  --real-red: #888;
  color: #1c1c1e;
  border: 1px solid #d7dbe1;
}

/* ---------- browser chrome (wireframe) ---------- */
.real-browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e9e9e9;
  border: 1px solid #ccc;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  font-size: 11px;
  color: #888;
  margin: -20px -20px 18px;
}

.real-browser-chrome .url {
  flex: 1;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 10px;
}

/* ---------- top navbar / product dropdown ---------- */
.real-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.real-navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 14px;
}

.real-navbar-left .brand-x { color: #fff; }
.real-navbar-left .brand-ai { color: var(--real-orange); }
.real-navbar-left .brand-app { font-weight: 400; color: #b7c0ce; margin-left: 4px; }

.real-navbar-dropdown { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b7c0ce; }

.real-navbar-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--real-panel);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
}

.real-navbar-dropdown-btn svg { width: 12px; height: 12px; }

.real-dropdown-menu {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  background: var(--real-panel);
  border-radius: 8px;
  width: 250px;
}

.real-dropdown-menu li {
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 6px;
  color: #d7dee8;
}

.real-dropdown-menu li.is-active { color: var(--real-teal); background: rgba(21, 151, 161, 0.15); }

.real-navbar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--real-teal);
  font-size: 13px;
  text-decoration: none;
}
.real-navbar-logout svg { width: 14px; height: 14px; }

/* ---------- search field ---------- */
.real-search-row { display: flex; gap: 20px; flex-wrap: wrap; }
.real-search-field { display: flex; flex-direction: column; gap: 6px; }

.real-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--real-panel);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 230px;
  border: 1px solid transparent;
}

.real-search-input-wrap.has-error { border-color: var(--real-red); }

.real-search-input-wrap input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  flex: 1;
  font-family: inherit;
}

.real-search-input-wrap input::placeholder { color: #8791a3; }

.real-search-input-wrap svg.clear { width: 14px; height: 14px; color: #8791a3; }

.real-search-btn {
  background: var(--real-teal);
  border: none;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.real-search-btn svg { width: 15px; height: 15px; }

.real-search-error { color: var(--real-red); font-size: 12px; margin: 0; }

/* ---------- filters panel ---------- */
.real-filters-panel {
  background: var(--real-bg);
  border-radius: 12px;
  max-width: 340px;
}

.real-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.real-filters-header svg { width: 16px; height: 16px; color: #8791a3; }

.real-filter-group {
  background: var(--real-panel);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.real-filter-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.real-filter-group-head svg { width: 14px; height: 14px; color: var(--real-teal); }

.real-date-range { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 14px; color: #d7dee8; }
.real-date-range .sep { color: #8791a3; }
.real-date-range .clear { color: var(--real-teal); margin-left: auto; font-size: 12px; }

.real-preset-pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.real-pill {
  border: 1px solid var(--real-teal);
  color: var(--real-teal);
  background: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
}

.real-calendar { margin-top: 16px; }
.real-calendar-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.real-calendar-head svg { width: 12px; height: 12px; color: #8791a3; }

.real-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; font-size: 11.5px; color: #b7c0ce; }
.real-calendar-grid .dow { color: #8791a3; font-weight: 600; padding-bottom: 4px; }
.real-calendar-grid .day { padding: 5px 0; border-radius: 4px; }
.real-calendar-grid .day.in-range { background: rgba(21, 151, 161, 0.3); }
.real-calendar-grid .day.range-end { background: var(--real-teal); color: #fff; font-weight: 700; }

.real-check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 12px; color: #d7dee8; }
.real-check-row:first-of-type { margin-top: 14px; }

.real-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1.5px solid var(--real-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.real-checkbox.is-checked { background: var(--real-teal); border-color: var(--real-teal); }
.real-checkbox svg { width: 10px; height: 10px; color: #fff; }

.real-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 151, 161, 0.18);
  color: #b9e0e3;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
}
.real-tag svg { width: 11px; height: 11px; cursor: default; }

.real-filter-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }

/* ---------- buttons ---------- */
.real-btn {
  font-family: inherit;
  font-size: 13px;
  border-radius: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.real-btn-ghost { background: none; border-color: var(--real-teal); color: var(--real-teal); }
.real-btn-basic { background: #fff; color: var(--real-bg); border-color: #fff; }
.real-btn-teal { background: var(--real-teal-dark); color: #fff; }
.real-btn-light { background: #edf1f5; color: #8791a3; }
.real-btn svg { width: 14px; height: 14px; }

/* ---------- result / feedback / viewer ---------- */
.real-result-card {
  background: var(--real-panel);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 14px;
}

.real-feedback-card { background: var(--real-panel); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.real-feedback-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.real-feedback-title svg { width: 15px; height: 15px; color: #8791a3; }
.real-feedback-options { display: flex; align-items: center; gap: 24px; font-size: 13px; color: #d7dee8; }
.real-feedback-options label { display: flex; align-items: center; gap: 8px; }
.real-feedback-options svg { width: 15px; height: 15px; }

.status-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.status-badge--high { background: var(--real-red); }
.status-badge--medium { background: var(--real-yellow); color: #3a2e00; }
.status-badge--low { background: var(--real-green); }
.status-badge--anomaly { background: var(--real-yellow); color: #3a2e00; }

.real-viewer { background: #000; border-radius: 10px; padding: 16px; position: relative; overflow: hidden; }
.real-viewer-meta { position: absolute; top: 16px; right: 18px; text-align: right; font-size: 11px; color: #8791a3; line-height: 1.6; }
.real-viewer-scale { position: absolute; top: 16px; left: 16px; background: var(--real-panel); border-radius: 8px; padding: 10px; font-size: 11px; width: 108px; z-index: 2; }
.real-viewer-scale-value { background: #fff; color: #20293c; font-weight: 700; border-radius: 4px; padding: 2px 6px; display: inline-block; margin: 4px 0; font-size: 12px; }
.real-viewer-scale-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--real-green), var(--real-yellow), var(--real-orange), var(--real-red)); margin: 6px 0; }
.real-viewer-hu-box { position: absolute; top: 16px; left: 16px; background: var(--real-panel); border-radius: 8px; padding: 10px 14px; z-index: 2; }
.real-viewer-hu-box .label { font-size: 11px; color: #d7dee8; }
.real-viewer-hu-box .value { font-size: 18px; font-weight: 700; color: var(--real-yellow); }

.real-scan-frame { position: relative; margin-top: 40px; }
.real-viewer-scan { width: 100%; display: block; border-radius: 4px; }
.real-viewer-footnote { font-size: 10px; color: #8791a3; max-width: 230px; line-height: 1.5; margin-top: 10px; }
.real-viewer-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #b7c0ce; margin-top: 10px; }
.real-viewer-toolbar { display: flex; align-items: center; gap: 16px; margin-top: 14px; color: var(--real-teal); }
.real-viewer-toolbar svg { width: 18px; height: 18px; }
.real-viewer-toolbar .toggle { width: 34px; height: 18px; border-radius: 9px; background: var(--real-teal); position: relative; margin-left: 4px; }
.real-viewer-toolbar .toggle::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 2px; right: 2px; }

/* ---------- decision / accordion panels (bone viewer) ---------- */
.real-accordion { background: var(--real-panel); border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; }
.real-accordion-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; }
.real-accordion-head svg { width: 13px; height: 13px; color: var(--real-teal); }
.real-accordion-body { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; color: #d7dee8; }
.real-select { background: rgba(0, 0, 0, 0.2); border-radius: 6px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; }
.real-select svg { width: 11px; height: 11px; color: var(--real-teal); }
.real-accordion-body label { display: flex; align-items: center; gap: 8px; }
.real-apply-btn { margin-left: auto; background: #cfd6de; color: #3a4457; border: none; border-radius: 6px; padding: 8px 18px; font-size: 13px; font-family: inherit; }

/* ---------- login screen ---------- */
.real-login-shell { display: flex; min-height: 380px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-project); max-width: 1000px; margin: 24px 0; }
.real-login-photo { flex: 1 1 54%; position: relative; }
.real-login-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.real-login-photo-overlay { position: absolute; left: 8%; bottom: 12%; color: #fff; max-width: 80%; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
.real-login-photo-overlay .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 14px; font-size: 15px; }
.real-login-photo-overlay .brand .brand-ai { color: var(--real-orange); }
.real-login-photo-overlay h3 { font-size: 28px; margin: 0 0 10px; font-weight: 800; }
.real-login-photo-overlay p { font-size: 14px; margin: 0; opacity: 0.92; line-height: 1.5; }
.real-login-form-side { flex: 1 1 46%; background: #20293c; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; }
.real-login-card { background: var(--real-panel, #2f3b52); border-radius: 12px; padding: 22px; width: 100%; max-width: 300px; color: #e7ecf3; }
.real-login-card h4 { margin: 0 0 16px; font-size: 15px; font-weight: 700; }
.real-login-field-box { background: rgba(0, 0, 0, 0.18); border-radius: 8px; padding: 16px; }
.real-login-field-box p { font-size: 12px; color: #d7dee8; margin: 0 0 14px; line-height: 1.5; }
.real-login-field-box label { display: block; font-size: 11px; color: #8791a3; margin-bottom: 6px; }
.real-login-field-box input { width: 100%; background: none; border: none; border-bottom: 1px solid var(--real-teal, #1597a1); color: #fff; padding: 6px 0; font-size: 13px; outline: none; font-family: inherit; }
.real-login-submit { display: flex; justify-content: flex-end; margin-top: 18px; }
.real-login-video-note { position: absolute; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 8px; color: var(--real-teal, #1597a1); font-size: 12px; }
.real-login-video-note svg { width: 20px; height: 20px; }

/* ---------- main page study table ---------- */
.real-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.real-table-toolbar-left { display: flex; align-items: center; gap: 18px; font-size: 13px; color: #d7dee8; }
.real-table-count { font-size: 13px; color: #d7dee8; }
.real-table-wrap { background: var(--real-bg); border-radius: 12px; padding: 4px; overflow-x: auto; }
.real-table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: #d7dee8; min-width: 640px; }
.real-table th { text-align: left; font-size: 11.5px; color: #8791a3; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap; }
.real-table td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); white-space: nowrap; }
.real-table tr.is-selected td { background: rgba(21, 151, 161, 0.14); box-shadow: inset 3px 0 0 var(--real-teal); }
.real-table td.truncate { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- two-column app layout (main page) ---------- */
.real-app-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.real-app-layout .real-table-col { flex: 2 1 480px; min-width: 0; }
.real-app-layout .real-side-col { flex: 1 1 260px; min-width: 240px; }

/* ---------- icon showcase (light section) ---------- */
.real-icon-showcase { display: flex; flex-wrap: wrap; gap: 22px 18px; }
.real-icon-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px; color: var(--color-navy); }
.real-icon-chip svg { width: 20px; height: 20px; }
.real-icon-chip span { font-size: 10.5px; text-align: center; color: var(--color-muted); }

/* ---------- elements showcase (light section) ---------- */
.real-elements-group { margin-bottom: 30px; }
.real-elements-group h4 { font-size: 15px; margin: 0 0 14px; color: var(--color-navy); }
.real-elements-row { display: flex; gap: 34px; flex-wrap: wrap; }
.real-element-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--color-muted); }
.real-radio, .real-checkbox-demo {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--color-teal-dark, #226979);
  display: inline-flex; align-items: center; justify-content: center;
}
.real-checkbox-demo { border-radius: 4px; }
.real-radio.is-hover { background: var(--color-teal-dark, #226979); }
.real-radio.is-checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-teal-dark, #226979); }
.real-checkbox-demo.is-checked, .real-checkbox-demo.is-hover { background: var(--color-teal-dark, #226979); border-color: var(--color-teal-dark, #226979); }
.real-checkbox-demo svg { width: 11px; height: 11px; color: #fff; }
.real-element-item.labeled { flex-direction: row; align-items: center; gap: 8px; }

@media (max-width: 720px) {
  .real-login-shell { flex-direction: column; }
  .real-navbar { flex-direction: column; align-items: flex-start; }
}

/* ---------- Case study — REAL plus: Site Map ---------- */
/* Matches the source diagram exactly: a teal root box per top-level area
   (var(--case-accent) — REAL plus's own #226979, confirmed against the
   source SVG's own fill value, not a coincidence) connected by a single
   continuous vertical trunk line + a short horizontal tick + dot to each
   child item below it. Root boxes with no children (Export to FLS-DB)
   simply omit .rp-sitemap-branches. Box widths are content-fit (padding,
   not literal Figma px) rather than hardcoded per-label widths, matching
   this site's other diagram component (.so-sitemap) — the visual rhythm
   is what's being reproduced exactly, not literal per-box pixel widths. */
.rp-sitemap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 33px;
  padding: 8px 0 24px;
}
.rp-sitemap-col {
  display: flex;
  flex-direction: column;
}

/* Entrance animation: each category (root box + its subtabs, moved
   together since they're one flex-column unit) slides in from the left
   and fades in, one after another — same staggered-reveal mechanism as
   .case-process-steps (parent gets .in-view via IntersectionObserver in
   script.js, transition-delay staggers per child via nth-child), just
   translateX instead of translateY since this reads left-to-right.
   Second Opinions' .so-sitemap reuses this exact same animation block
   (see script.js) — only the box styling above differs per page. */
.rp-sitemap-col,
.so-sitemap-col {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rp-sitemap.in-view .rp-sitemap-col,
.so-sitemap.in-view .so-sitemap-col {
  opacity: 1;
  transform: translateX(0);
}
.rp-sitemap.in-view .rp-sitemap-col:nth-child(1),
.so-sitemap.in-view .so-sitemap-col:nth-child(1) { transition-delay: 0s; }
.rp-sitemap.in-view .rp-sitemap-col:nth-child(2),
.so-sitemap.in-view .so-sitemap-col:nth-child(2) { transition-delay: 0.12s; }
.rp-sitemap.in-view .rp-sitemap-col:nth-child(3),
.so-sitemap.in-view .so-sitemap-col:nth-child(3) { transition-delay: 0.24s; }
.rp-sitemap.in-view .rp-sitemap-col:nth-child(4),
.so-sitemap.in-view .so-sitemap-col:nth-child(4) { transition-delay: 0.36s; }
.rp-sitemap.in-view .rp-sitemap-col:nth-child(5),
.so-sitemap.in-view .so-sitemap-col:nth-child(5) { transition-delay: 0.48s; }
.so-sitemap.in-view .so-sitemap-col:nth-child(6),
.rp-sitemap.in-view .rp-sitemap-col:nth-child(6) { transition-delay: 0.6s; }

/* Clalit's Application Architecture flow chart (.app-flow-diagram) reuses
   this exact same slide-in-from-the-left entrance animation — root box
   first, then each branch column staggered in turn. .flow-branch:nth-of-type
   (not nth-child) since each .flow-branch sits alongside a non-branch
   sibling (.flow-branches-dot) inside .flow-branches; nth-of-type counts
   only same-tag (div) siblings, so it still lines up 1st/2nd/3rd... branch
   correctly despite that extra sibling. */
.app-flow-diagram .flow-root,
.app-flow-diagram .flow-branch {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.app-flow-diagram.in-view .flow-root,
.app-flow-diagram.in-view .flow-branch {
  opacity: 1;
  transform: translateX(0);
}
.app-flow-diagram.in-view .flow-root { transition-delay: 0s; }
.app-flow-diagram.in-view .flow-branches .flow-branch:nth-of-type(1) { transition-delay: 0.12s; }
.app-flow-diagram.in-view .flow-branches .flow-branch:nth-of-type(2) { transition-delay: 0.24s; }
.app-flow-diagram.in-view .flow-branches .flow-branch:nth-of-type(3) { transition-delay: 0.36s; }
.app-flow-diagram.in-view .flow-branches .flow-branch:nth-of-type(4) { transition-delay: 0.48s; }
.app-flow-diagram.in-view .flow-branches .flow-branch:nth-of-type(5) { transition-delay: 0.6s; }

.rp-sitemap-root {
  background: var(--case-accent);
  color: #fff;
  text-align: center;
  width: 215px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.rp-sitemap-branches {
  position: relative;
  margin-top: 15px;
  margin-left: 20px;
  display: grid;
  grid-template-columns: max-content;
  row-gap: 15px;
}
.rp-sitemap-branches::before {
  content: "";
  position: absolute;
  left: 0;
  top: -15px;
  bottom: 16px;
  width: 1px;
  background: #25282b;
}
/* Uniform width per category: grid-template-columns: max-content sizes the
   single column to the widest subtab's natural width, and the default
   justify-items: stretch then expands every subtab in that category to
   match it — so "Physician Information" and "FLS Clinician Information"
   (the longest in that group) end up the same width, without hardcoding
   a px value that would need updating if the copy ever changes. */
.rp-sitemap-leaf {
  position: relative;
  margin-left: 32px;
  border: 1px solid #25282b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #25282b;
  white-space: nowrap;
}
.rp-sitemap-leaf::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 32px;
  height: 1px;
  background: #25282b;
}
.rp-sitemap-leaf::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #25282b;
  transform: translate(-50%, -50%);
}

/* ---------- Case study — REAL plus: Final Design tab overview cards ---------- */
.case-final-design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1300px;
}

.case-final-design-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-final-design-card .fd-step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--case-accent, var(--color-teal-dark));
}

.case-final-design-card h4 {
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  color: var(--color-black);
}

.case-final-design-card .fd-underline {
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--case-accent, var(--color-teal-dark));
}

.case-final-design-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-final-design-card li {
  font-size: 20px;
  line-height: 1.55;
  color: var(--color-muted);
}

.case-final-design-card li b {
  color: var(--color-black);
}

/* =========================================================================
   REAL plus case study — Final Design: "In tray Patients Tab" live mockup.
   Reuses the shared .mp-app shell/topbar/tabs/table/footer component
   pattern built for Marketplace (via the .rp-intray scoping class, same
   technique as .mp-app-grid-design) so it inherits the same structural and
   scrollable-table rules, overriding only colors to match this screen's own
   palette (navy topbar, #1597a1 teal — the same accent already used as the
   --case-accent fallback elsewhere on this page). A few sub-components
   (summary panel, cards, accordions) have no shared equivalent yet and are
   defined fresh below.
   ========================================================================= */
.rp-intray {
  font-family: var(--component-font);
  background: #f5f7fc;
  font-size: 12px;
  /* This mockup's own external corners are square, unlike the rounded
     .mp-app shell used elsewhere — override the shared radius here only. */
  border-radius: 0;
}

/* ---------- topbar ---------- */
.rp-intray .mp-app-topbar { background: #20293c; padding: 12px 20px; }
.rp-intray-logo { display: flex; align-items: center; }
.rp-intray-logo img { display: block; height: 22px; width: auto; }

/* Reference video shows "Go to FLS workspace" and "Download" as solid teal
   fills, same treatment as "+ Add New Patient" — none of the three action
   buttons in this mockup use the ghost/outline style. Hover per
   "green Button hover.svg": background switches to #226979 (not just a
   brightness dip), text stays white. */
.rp-intray .mp-app-btn {
  background: #1597a1;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.rp-intray .mp-app-btn:hover { background: #226979; filter: none; }
/* .mp-app-select-label is a shared class also used by Marketplace's own
   filter toolbar, where it's hardcoded to --mp-blue (Marketplace's
   #4e59a4 accent) — Marketplace should keep that color. REAL+ reuses the
   same class for its own filter labels (Search / Monitoring Type /
   Pathway Status / Date Range) but needs its own teal accent instead, so
   it's overridden here, scoped to this page's .rp-intray wrapper only. */
.rp-intray .mp-app-select-label { color: #1597a1; }
.rp-intray-download-btn img { display: block; height: 13px; width: auto; }
/* Image height reasoned from the asset's own "Log out" glyph bounding box
   (extracted by rendering the SVG and measuring the text pixels) scaled up
   so the baked-in text reads at ~12.5px — the same font-size as
   "Go to FLS workspace"/"+ Add New Patient", per request. */
.rp-intray-logout { display: inline-flex; align-items: center; cursor: pointer; transition: opacity 0.15s ease; }
.rp-intray-logout img { display: block; height: 30px; width: auto; }
.rp-intray-logout:hover { opacity: 0.75; }

/* ---------- tabs row ---------- */
/* Equal breathing room above and below the tabs strip: 16px between the
   navy header and the tabs, 16px between the tabs and the table/panel
   below (via .rp-intray-body's own 16px top padding) — padding-bottom is 0
   here so that second gap comes from exactly one source, matching the
   first. */
.rp-intray-tabs { align-items: center; gap: 0; padding: 16px 20px 0; }
.rp-intray-tabs .active { color: #1597a1; }
.rp-intray-tabs span {
  position: relative;
  width: 200px;
  text-align: center;
  padding: 9px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rp-intray-tabs .active { margin-bottom: 0; }
/* Selected-tab appearance per "tab selected.svg": no fill, just bold teal
   text with a full-width, rounded-cap teal bar under it (not the shared
   .mp-app-tabs 48px-wide underline). */
.rp-intray-tabs .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  width: 200px;
  bottom: 0;
  height: 3px;
  border-radius: 1.5px;
  background: #1597a1;
}
.rp-intray-tabs span:hover { background: #1597a1; color: #fff; }
.rp-intray-tabs .active:hover::after { opacity: 0; }
/* .rp-intray-tabs span (the tab-pill sizing rule right above) matches
   ANY span descendant — which also caught the annotation dot and its
   tooltip nested inside these tabs, inflating the dot into a full
   200px/9px-padding tab-shaped pill and squashing the tooltip's own
   280px/18px-20px sizing down to match. Reset every property that leaks
   in, scoped to just these two, so they keep their real Marketplace
   .mp-indicator/.mp-tooltip-info sizing regardless of which row they
   sit in. */
.rp-intray-tabs .mp-indicator {
  width: 16px !important;
  height: 16px !important;
  text-align: left !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.rp-intray-tabs .mp-indicator:hover,
.rp-intray-tabs span:hover .mp-indicator {
  background: transparent;
  color: inherit;
}
/* .mp-indicator-dot is a <span> too, and .rp-intray-tabs span's own
   width: 200px was beating its real width: 8px at equal-ish specificity
   (0,1,1 vs. the dot rule's 0,1,0) — that's what stretched the little
   circle into a 200px-wide oval blob behind the tab text. Same for its
   ::before pulse ring, sized off the dot's own (broken) box.
   !important on the geometry here specifically because this exact leak
   already survived one non-!important override attempt — this removes
   any doubt about which rule wins regardless of cascade order. */
.rp-intray-tabs .mp-indicator-dot {
  width: 8px !important;
  height: 8px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}
.rp-intray-tabs .mp-tooltip {
  /* Reset to Marketplace's own .mp-tooltip-info values exactly (280px,
     18px 20px padding, 12px radius, white bg) — .rp-intray-tabs span's
     200px width / 9px 0 padding / center-align / pointer cursor were
     leaking onto this span at higher specificity and squashing it into a
     narrow, tab-shaped strip. No invented sizing here, just Marketplace's
     real numbers restored.
     .rp-intray-tabs span ALSO sets position:relative on every span it
     matches, including this one, beating .mp-tooltip's own
     position:absolute at the same specificity tier — so the tooltip was
     staying in normal document flow instead of being lifted out of it,
     which made its top/left percentage offsets resolve against the wrong
     containing block entirely (not .mp-indicator's 16px box), throwing
     off every position value including the --below fix. Reclaiming
     absolute here is the actual fix for the top-clipping. */
  position: absolute !important;
  width: 280px !important;
  text-align: left !important;
  padding: 18px 20px !important;
  border-radius: 12px !important;
  cursor: auto !important;
  /* .rp-intray-tabs span:hover (the tab-fill hover rule) also matches
     this span when the tooltip itself — or anything inside it — is
     hovered, which is exactly what happens while someone's reading it.
     That painted the whole box teal. Needs its own explicit background,
     not just relying on .mp-tooltip's own (lower-specificity) white. */
  background: #fff !important;
  color: #20293c !important;
}
.rp-intray-tabs .mp-tooltip:hover,
.rp-intray-tabs span:hover .mp-tooltip {
  background: #fff !important;
  color: #20293c !important;
}
/* Annotation dot for the "In tray" tab. This used to live INSIDE the tab's
   own <span data-tab="intray">, which meant hovering the dot also counted
   as hovering the tab itself (a nested element's :hover always bubbles to
   its DOM ancestors, no matter how the descendant is positioned on
   screen) — the tab's own teal hover-fill would trigger every time
   someone tried to read the tooltip, and the two controls' hover states
   visibly overlapped. A :has() rule used to paper over the resulting
   color clash; removed now that the real fix (below) makes it moot.
   Real fix: .rp-intray-tab-wrap holds the tab span and the dot as
   SIBLINGS (not parent/child), so hovering one never touches the other's
   :hover state at all — no workaround rule needed. The dot sits
   position: absolute, centered above the tab pill (bottom: 100%, small
   gap), outside the pill's own rendered box, matching the request to
   keep the two hover areas from overlapping.
   Tooltip direction: opens downward (not the default upward) since the
   dot sits at the very top of the mockup, right under .mp-app-topbar —
   opening upward would run it off/behind that bar. The shared
   .mp-tooltip-info--below modifier was tried first but it ALSO flips the
   horizontal side to right-aligned/left-opening (right: -8px), meant for
   indicators near a panel's RIGHT edge — this dot is above the FIRST tab,
   near the mockup's LEFT edge, so a 280px-wide box opening leftward from
   there ran straight off the left side of the page. Scoped rule below
   keeps .mp-tooltip-info's own default horizontal side (left: 100%, opens
   rightward — correct for a left-edge indicator) and overrides only the
   vertical (top/bottom) to open down instead of up. */
.rp-intray-tab-indicator .mp-tooltip-info {
  top: 100%;
  bottom: auto;
  margin-top: 14px;
  transform: translate(-6px, -6px);
}
/* No separate hover-trigger rule needed here — the shared
   .mp-indicator:hover .mp-tooltip-info / :focus-within one (above) already
   resets transform to translate(0, 0) on reveal, which is the exact same
   end value this closed-state translate(-6px, -6px) needs to settle to. */
.rp-intray-tab-indicator .mp-tooltip-info::after {
  top: auto;
  bottom: 100%;
  left: 10px;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
/* Only the ACTIVE tab's own hotspot stays visible — with all 5 tab
   dots shown at once regardless of which panel is open, the top strip
   reads as cluttered/noisy before the user has even picked a tab. Each
   .rp-intray-tab-indicator is hidden by default and only revealed when
   its sibling tab span (in the same .rp-intray-tab-wrap) carries
   .active — that class is already kept in sync with the active panel
   by showTab() in script.js, so no extra JS is needed here. */
.rp-intray-tab-wrap .rp-intray-tab-indicator { display: none !important; }
.rp-intray-tab-wrap:has(> .active) .rp-intray-tab-indicator { display: inline-flex !important; }
.rp-intray-tab-wrap { position: relative; display: inline-flex; }
.rp-intray-tabs .rp-intray-tab-wrap {
  width: auto;
  padding: 0;
  cursor: default;
}
.rp-intray-tabs .rp-intray-tab-wrap:hover {
  background: transparent;
  color: inherit;
}
.rp-intray-tab-indicator {
  position: absolute !important;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  /* Was 6px; moved 10px closer to the tab per request (6 - 10 = -4, so
     the dot now sits 4px into the tab's own top edge rather than fully
     clear of it — still outside the pill's hover-triggering box below,
     since the dot's :hover is scoped to its own element, not the pill's,
     per the sibling-not-child restructure above). */
  margin-bottom: -4px;
}
/* The auto-margin that pushes this group to the tab row's right edge
   now lives on the indicator (the first of the pair in DOM order) so
   the button itself sits exactly where it always did — right at the
   row's right edge — with the dot just to its left instead of after it. */
/* Annotation dot for the "Add New Patient" CTA, reusing Marketplace's
   .mp-indicator/.mp-tooltip-info pattern (see the Exam Details Panel)
   rather than building a new one — same pulsing-dot + hover-tooltip
   mechanics, just recolored to this project's own accent (#226979, the
   real-plus value) instead of Marketplace's blue, and opening left
   (.mp-tooltip-info--left, confirmed against the uploaded "Add New
   Patient tooltip.svg" reference: arrow points right, box sits to the
   dot's left) since the dot sits at the tab row's right edge, where a
   rightward-opening tooltip would run off .mp-app's edge. */
/* Hard rule (site-wide): a hotspot must never be an in-flow sibling of the
   real element it annotates, even with the real element's own margin doing
   the positioning — that's exactly what was here before (margin-left:auto
   on the indicator itself), and it meant the "Add New Patient" button had
   nothing pushing it to the row's right edge once the indicator was
   display:none'd, so the button visibly jumped left when hotspots were
   hidden. Fixed by wrapping indicator+button in .rp-intray-add-wrap: the
   wrapper (not the indicator) carries margin-left:auto, and the indicator
   is position:absolute anchored off the wrapper's own left edge — so it
   contributes zero width to the wrapper's box, and the button's position
   is identical whether the indicator is shown or hidden. */
.rp-intray-add-wrap {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}
/* .rp-intray-tabs span (the generic tab-pill sizing rule above) matches
   ANY span descendant, including this new wrapper — without this reset it
   would inflate the wrapper into a 200px-wide tab-shaped pill with a teal
   hover fill, same leak already called out for .mp-indicator/.mp-tooltip
   above. */
.rp-intray-tabs .rp-intray-add-wrap {
  width: auto;
  padding: 0;
  cursor: default;
}
.rp-intray-tabs .rp-intray-add-wrap:hover {
  background: transparent;
  color: inherit;
}
/* !important on position here for the same reason .rp-intray-tabs
   .mp-tooltip already needs it (see that rule's own comment above):
   .rp-intray-tabs span sets position: relative on every span it matches
   (0,0,1,1 — one class plus the "span" type selector), which is MORE
   specific than a single class selector like .rp-intray-cta-indicator
   (0,0,1,0), so without !important this indicator was silently staying
   position: relative instead of absolute. With position stuck at
   relative, `right: 100%` no longer measures from the containing block's
   right edge — it shifts the dot left of its own normal in-flow spot by
   100% of the containing block's width, throwing it far from the button
   instead of just to its left. The .rp-intray-tabs .mp-indicator reset
   block above (width/height/padding/text-align/border-radius, all
   !important) never included `position`, so this exact leak was never
   actually fixed for this one indicator, even though the identical bug
   was already caught and fixed for .mp-tooltip right next to it. */
.rp-intray-cta-indicator {
  position: absolute !important;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 10px;
}
.rp-intray .mp-indicator-dot,
.rp-intray .mp-indicator-dot::before { background: #226979; }
/* Same pattern once more, next to the "Monitoring date" column header —
   this one lives inside the table's <th>, outside .rp-intray-tabs
   entirely, so none of the tab-row leak-fix rules above apply to it.
   Two earlier approaches (plain inline flow with a margin, then an
   absolutely-positioned indicator anchored to a relative label span)
   both left it reading nearer the NEXT column's header than this one's
   own text — this cell is wide (14% of the table) so any positioning
   scheme that references the cell's own box, even indirectly, drifts
   away from the short text inside it. Flexbox sidesteps that: the label
   and the dot become two flex children of a fixed-content-width flex
   row, glued together by a small explicit gap, with no dependency on
   the cell's width at all. */
.rp-intray-th-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rp-intray-monitoring-indicator { flex-shrink: 0; }

/* Annotation dot for "NHS Number", the last words of the FLS-DB banner
   sentence (.rp-flsdb-notice). Same flex-glue pattern as
   .rp-intray-th-label just above (a fixed-content-width flex row keeps
   the dot right next to the word regardless of the paragraph's own
   width), and for the same reason: the banner spans the full table
   width, so any positioning scheme referencing the <p>'s own box would
   drift far from where "NHS Number" actually sits on screen. Uses
   .mp-tooltip-info-text instead of a <p> inside the tooltip — this
   hotspot is nested inside a real <p>, and a <p> can't contain another
   <p> (invalid HTML; the browser would silently close the outer one
   early). Tooltip opens leftward (--left) since "NHS Number" sits near
   the banner's right edge, where a default rightward-opening tooltip
   would run off the panel. */
.rp-flsdb-nhsnum-wrap { display: inline-flex; align-items: center; gap: 4px; }
.rp-flsdb-nhsnum-indicator { flex-shrink: 0; }

/* Annotation dot for "for download", the last words of the
   "Select date range for download" filters label. Same flex-glue
   pattern as .rp-flsdb-nhsnum-wrap/.rp-intray-th-label above. The
   label itself (.rp-flsdb-filters-label) is display: block, so this
   inline-flex sub-span just sits as normal inline content within it. */
.rp-flsdb-fordownload-wrap { display: inline-flex; align-items: center; gap: 4px; }
.rp-flsdb-fordownload-indicator { flex-shrink: 0; }

/* ---------- body / table ---------- */
/* No bottom padding on the shared body — the rows container needs a true
   0px gap to the footer below, and a negative-margin guess at the padding
   value drifted out of sync with it in practice. Instead the Patient
   Summary column (which does still need its own 16px gap above the
   footer) carries that bottom padding itself, see .rp-intray-summary. */
/* height: 100% (resolving against .rp-intray-tabpanels' own fixed height,
   see its rule) so every one of the 5 tab panels occupies the exact same
   total vertical space, whether or not that panel happens to have a
   toolbar/filters row above its table — see the .rp-intray-tabpanels
   comment for why this was needed (the screen was visibly "jumping"
   taller/shorter when switching tabs before this). */
.rp-intray-body { padding: 16px 20px 0; align-items: stretch; height: 100%; }

/* Both the row list and the summary panel scroll independently within the
   same fixed viewport height (confirmed in the reference recording — each
   side has its own internal scroll, not a shared/matched height), with the
   scrollbar hidden across engines so each panel reads as a plain fixed-size
   box. 460px is a reasoned estimate sized to the row/section count visible
   in the reference, not measured pixel-for-pixel from the recording (its
   canvas is a much larger, unrelated resolution) — flag if it needs
   adjusting once you see it live. */
/* No outer border/bg on the wrap itself — per "Default Row.svg"/
   "selected row.svg" each row is its own floating white rounded card
   (shadow + gap) sitting directly on .rp-intray's own #f5f7fc backdrop,
   the same technique already used for Marketplace's Exam Grid
   (.mp-app-grid-design), just recolored to this page's teal accent. */
.rp-intray .mp-app-table-wrap {
  flex: 1 1 0;
  min-width: 0;
  /* A fixed height (not max-height) so this box always reaches exactly to
     the footer with zero gap, whatever the row count — max-height let the
     box shrink to fit shorter content, leaving empty space above the
     footer instead of clipping the last row flush against it. */
  height: 460px;
  display: flex;
  flex-direction: column;
  /* Bottom padding (previously 0) reserves a real gap between the last
     row and the footer below. With zero bottom padding, a tab whose rows
     happen to add up to exactly (or just over) 460px put the last row's
     card flush against — or, once its 4px box-shadow/hover tint is
     considered, visually overlapping — the footer's own top border/
     upward shadow (In tray, Sent from AI, and Templates all hit this
     once their row counts grew). Reserving 10px here shrinks the
     scrollable body's own available height by that much (it's the
     flex:1 1 auto child inside this box), which reliably keeps a visible
     gap above the footer regardless of exact row count, at the minor
     cost of the very last row sometimes needing one more scroll tick to
     reach — a better trade than any row overlapping the footer. */
  padding: 6px 6px 10px;
}
/* The header lives in its OWN table, a fixed (non-scrolling) sibling of
   the scrolling body — not a `position: sticky` cell inside one shared
   scrolling table. Sticky-positioned table cells kept leaving a stale,
   un-repainted sliver of whatever row had just scrolled past visible
   above the header (a WebKit/Blink scroll-compositing bug); forcing a
   compositor layer on the sticky cell didn't fully fix it. A fully
   separate table removes the bug class entirely — there is no scrolling
   content anywhere near the header for it to paint over. */
.rp-intray .mp-app-table-head { flex: 0 0 auto; table-layout: fixed; }
.rp-intray .mp-app-table-body-scroll {
  flex: 1 1 auto;
  min-height: 0; /* required for a flex child to actually scroll instead of overflowing its parent */
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}
.rp-intray .mp-app-table-body-scroll::-webkit-scrollbar { display: none; /* Chrome/Safari/new Edge */ }
.rp-intray .mp-app-table-body { table-layout: fixed; }

.rp-intray .mp-app-table th {
  /* Opaque (matching the page backdrop, not a distinct card) so it never
     reads as a floating transparent label now that it's a real static
     row rather than an overlay. */
  background: #f5f7fc;
  color: #1597a1;
  font-weight: 400;
  border-bottom: none;
}
/* Sticky Notes is an icon-only column (no left-aligned label text makes
   sense once it's just a glyph per row) — center the header and every
   row's icon together instead of both sitting left-aligned but visually
   misaligned because the icon is much narrower than the column. */
.rp-intray .mp-app-table th:last-child { text-align: center; }
.rp-intray .mp-app-table td:last-child { text-align: center; }

/* No border-spacing (it's unreliable for this: it adds the same ambient
   gap on every side of the table, including above the header, and there's
   no way to make the header-to-row1 gap different from the row-to-row gap
   with a single table-wide value). Instead: zero spacing everywhere, and
   an explicit spacer <tr> between each pair of DATA rows only (none
   between the header and the first row) — a plain, standards-solid way to
   get 0px there and 8px everywhere else. */
.rp-intray .mp-app-table {
  border-collapse: separate;
  border-spacing: 0;
}
.rp-intray .mp-app-table tbody tr.rp-intray-row-spacer td {
  height: 8px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
/* Lighter, softer shadow than the site's standard --shadow-card token —
   the default read as too heavy/hard-edged at this row size. */
.rp-intray .mp-app-table tbody tr:not(.rp-intray-row-spacer) { box-shadow: 0 1px 4px rgba(32, 41, 60, 0.08); }
.rp-intray .mp-app-table td {
  background: #fff;
  border-bottom: none;
}
.rp-intray .mp-app-table td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.rp-intray .mp-app-table td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.rp-intray .mp-app-table tbody tr.selected { box-shadow: none; }
.rp-intray .mp-app-table tbody tr.selected td { background: #dfeef0; }
.rp-intray .mp-app-table tbody tr.selected td:first-child {
  background: linear-gradient(to right, #1597a1 0 4px, #dfeef0 4px 100%);
  padding-left: 21px;
}
.rp-intray .mp-app-table tbody tr:not(.selected):hover td { background: #dde5e5; }

.rp-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
/* Sticky Notes column icon, per "sticky note icon.svg" — replaces the
   previous emoji glyph (rendered inconsistently across platforms/fonts). */
/* vertical-align: middle instead of the default baseline — baseline sat
   the icon a few px lower than the row's text, out of line with the
   "Sticky Notes" column header above it. */
.rp-intray-note-icon { display: inline-block; width: 11px; height: 11px; vertical-align: middle; }
/* Filled variant marks a row that actually has a logged note — same
   navy (#20293C) as the outline icon's stroke, just solid, so it reads
   as "this one has content" next to the empty outline icons around it.
   Wrapped in .mp-hover-tip (Marketplace's existing generic inline
   hover-tooltip trigger — reuses .mp-indicator's own .mp-tooltip
   positioning/arrow mechanics for plain non-dot content) so hovering it
   surfaces a quick reminder of the actual phone/email communication,
   without needing a whole new tooltip mechanism. Only filled rows get
   this wrapper; empty-outline rows have no note to show, so no tooltip. */
/* Reverted: anchoring this to the table wrap (so it always opened near
   the column title) put it far from whichever row was actually hovered
   for every row except the ones nearest the top — "close to the icon"
   is the real requirement, not a fixed shared position. Back to
   anchoring on the row's own icon (.mp-hover-tip's default position:
   relative on .rp-intray-note-hover, left as-is), just right-aligned so
   it opens leftward into the table instead of getting clipped by the
   table body's overflow-x: hidden at the right edge (Sticky Notes is
   the last column). */
.rp-intray-note-hover { display: inline-flex; cursor: pointer; }
.rp-intray-note-tooltip {
  /* max-content instead of a fixed 200px: a short note like "DXA
     confirmed" was sitting in a box sized for the LONGEST note this
     component ever shows, leaving a lot of empty white space around a
     couple of words. max-width still caps it at 200px so longer notes
     keep wrapping instead of running wide, but short ones now hug their
     own text. */
  width: max-content;
  max-width: 200px;
  padding: 8px 14px;
  left: auto;
  right: -6px;
  transform: translate(0, 6px);
  /* .mp-app-table td sets white-space: nowrap, and being an inherited
     property it cascades straight down into this tooltip's <p> since
     the trigger icon lives inside a <td> — forcing the whole message
     onto one unwrapped line that ran past the box's fixed width instead
     of wrapping. (Same root cause .mp-tooltip-info's own comment already
     flags for wizard-step tooltips; this is the same bug via a
     different nowrap ancestor.) Reset explicitly so it always wraps. */
  white-space: normal;
}
.rp-intray-note-hover:hover .rp-intray-note-tooltip,
.rp-intray-note-hover:focus-within .rp-intray-note-tooltip {
  transform: translate(0, 0);
}
.rp-intray-note-tooltip::after { left: auto; right: 10px; margin-left: 0; }
.rp-intray-note-tooltip p { margin: 0; font-size: 10.5px; line-height: 1.5; color: #20293c; }
.rp-dot-red { background: #d24b4b; }
.rp-dot-amber { background: #ffbb37; }
.rp-dot-green { background: #0a9d4c; }

/* ---------- patient summary panel ---------- */
.rp-intray-summary { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
/* Per "right panel.svg": the whole panel is one bordered/rounded outer
   card (not loose floating pieces) with a distinct gray header band at its
   top. Built on the existing scroll wrapper (no extra nesting div) —
   border/radius/shadow live here, and the header bleeds out to this
   element's own edges via negative margins so its band can reach the
   outer corners while the rest of the content keeps normal padding. */
.rp-intray-summary-scroll {
  /* Fixed height, not max-height, for the same reason as the table-wrap
     fix above — this must always reach exactly to the footer with zero
     gap, so overflow content (esp. now that Treatment Information has two
     tables) scrolls/clips within this box instead of shrinking it. */
  height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #e4eaea;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.rp-intray-summary-scroll::-webkit-scrollbar { display: none; }
/* Every direct child of the scroll box needs flex-shrink: 0. Without it,
   flex's default shrink behavior — combined with each accordion's own
   `overflow: hidden` (needed for its rounded corners) giving it an
   automatic min-height of 0 — let the flex layout silently squash
   sections shorter than their real content once the total exceeded
   460px, clipping them (e.g. Fracture Information cut off right after
   its header row) instead of correctly overflowing into the scrollbar.
   This, not a missing scroll gesture, was the actual "content is cut"
   bug reported repeatedly on this panel. */
.rp-intray-summary-scroll > * { flex-shrink: 0; }

.rp-intray-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -16px -16px 0;
  padding: 14px 16px;
  background: #e4eaea;
  border-radius: 8px 8px 0 0;
  /* Pinned to the top of the scroll box while everything below it (the
     details row, cards, accordions) scrolls underneath — top: -16px
     cancels the scroll box's own 16px top padding so this sticks flush
     at the true top edge, matching where its negative margin already
     places it at rest. Opaque background (#e4eaea, already set above)
     means scrolled content stops cleanly at its edge, and this is a
     plain div (not a table cell), so it doesn't hit the sticky-cell
     repaint bug the left table's header had. */
  position: sticky;
  top: -16px;
  z-index: 3;
}
.rp-intray-summary-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: #20293c; }
/* Hotspot next to "Patient Summary", right side — position: relative
   on the title itself with no other layout change, dot absolutely
   anchored off it (left: 100%, contributes zero width/height to the
   title's own box or the header's space-between layout), per the
   hotspot rule used everywhere else on this site. Tooltip keeps the
   default rightward-opening direction (unlike .rp-intray-record-
   indicator's --left override) — this title sits near the panel's
   LEFT edge, so opening right moves the tooltip further into the
   column, away from .rp-intray-summary-scroll's overflow-x: hidden
   boundary, mirroring the same "open away from the nearest clipped
   edge" logic used for the right-edge record-link indicator. */
.rp-intray-summary-title { position: relative; }
.rp-intray-summary-title-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}
/* Per "Go to Patient Record Button default/hover.svg": plain dark-navy text
   at rest (no background), and on hover a white rounded pill with a soft
   shadow appears behind it and the text goes bold — the text color itself
   does not change between states. */
.rp-intray-record-link {
  position: relative;
  display: inline-block;
  color: #20293c;
  font-weight: 400;
  text-decoration: none;
  font-size: 11.5px;
  cursor: pointer;
  padding: 4px 10px;
  margin: -4px -10px;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rp-intray-record-link:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 41, 60, 0.12);
  font-weight: 700;
}
/* Rule for every hotspot on this site, not just this one: an annotation
   dot must never join the real layout's flow (as a flex sibling, inline
   text, etc.) even indirectly, because that can shift the real element
   next to it (this one briefly did, pushing the link leftward when the
   dot's flex gap ate into the space .rp-intray-summary-head's
   space-between was giving the link). It has to be position: absolute,
   layered on top of the design, anchored off a position: relative
   ancestor that is itself unaffected by the dot's presence — here, the
   link's own box, which the dot sits just outside of (right: 100%) and
   contributes zero width/height to. */
.rp-intray-record-indicator {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 6px;
  transform: translateY(-50%);
}
/* Sits at the panel's own right edge, and the whole summary panel column
   clips horizontal overflow (.rp-intray-summary-scroll has
   overflow-x: hidden for its vertical scrollbar), so this opens left
   (into the column) rather than right (off the column's edge), same
   reasoning as the CTA dot in the tab row above. */

/* The patient-details row and the 3 summary cards now share one f5f7fc
   block (per the updated "Summary Section.svg") instead of the details
   row having its own separate box above a plain gap before the cards. */
.rp-intray-summary-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f5f7fc;
  border-radius: 8px;
  padding: 12px 14px 14px;
}
.rp-intray-summary-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
  color: #20293c;
}
.rp-intray-details-row { display: flex; flex-wrap: wrap; gap: 18px; }
.rp-intray-details-row b { color: #1597a1; font-weight: 700; }

/* Per "right panel.svg": each of the 3 summary cards is its own separate
   bordered/rounded white card with a gap between them — not one shared
   container divided by internal rules. */
.rp-intray-cards { display: flex; gap: 10px; }
.rp-intray-card {
  flex: 1;
  min-width: 0;
  /* Reverted back to white — measured against "right panel.svg" directly,
     card interiors are white; it was the summary-details block above and
     the accordion bodies below that are f5f7fc, not these. */
  background: #fff;
  border: 1px solid #e4eaea;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
  transition: background 0.15s ease;
}
.rp-intray-card:hover { background: #d3e0e0; }
/* Matches the reference design's card-title color (dark navy, same family
   as the rest of the component's headings) rather than the slightly
   different near-black used before. */
.rp-intray-card-label { font-size: 10.5px; font-weight: 700; color: #20293c; }
.rp-intray-monitoring {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid #d24b4b;
  border-radius: 6px;
  padding: 6px 10px;
  width: fit-content;
}
.rp-intray-monitoring-num { font-size: 22px; font-weight: 700; color: #d24b4b; }
.rp-intray-monitoring-text { font-size: 10.5px; color: #757575; }
.rp-intray-pill { background: var(--case-ri-tint, #b4dbde); color: #14313a; border-radius: 4px; padding: 2px 8px; font-size: 10.5px; font-weight: 600; }
.rp-intray-card-tags { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: #25282b; }
.rp-intray-card-tags > span:not(.rp-intray-pill):not(:last-child) { padding-right: 8px; border-right: 1px solid #e4eaea; }
/* Denosumab's pill also gets a divider after it in the reference design
   (unlike the "16 W" pill in Next Monitoring, which doesn't) — measured
   directly from the SVG, so handled as its own explicit modifier rather
   than folded into the generic pill-exclusion rule above. */
.rp-intray-pill-divided { margin-right: 8px; padding-right: 8px; border-right: 1px solid #e4eaea; }
/* Gaps below measured proportionally from the reference SVGs (glyph
   height in the export vs. this component's 10.5px text gave a ~4.1x
   scale factor, applied to each measured gap in the artwork): Next
   Monitoring's box-to-pill gap measured ~72px in the export -> ~18px
   here; Medication's pill-row-to-icon-row gap measured ~160px -> ~38px.
   Noticeably more breathing room than the component's other internal
   gaps, and not the same amount in each card. */
/* Anchored to the bottom of the card with margin-top: auto instead of a
   fixed px gap — Next Monitoring and Medication have different-height
   primary content above this row (a bordered number box vs. a single
   pill+date line), so a fixed gap left "16 W / Waiting DXA" and
   "1st Line / 10 years" sitting at two different heights. Since the 3
   cards are already equal-height (default flex align-items: stretch),
   auto-margin reliably bottom-aligns this row across all of them. */
.rp-intray-monitoring-tags, .rp-intray-med-tags { margin-top: auto; }
.rp-intray-card-icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; flex-shrink: 0; }
/* General Note is a bordered text box in the reference design (light teal
   border matching the pill tint), not a bare paragraph. */
.rp-intray-note-box {
  border: 1px solid #b4dbde;
  border-radius: 8px;
  padding: 8px 10px;
  flex: 1;
}
/* Extra-scoped selector (not just .rp-intray-note) so this beats the
   site-wide ".case-section p { font-size: 20px }" lead-paragraph rule,
   which otherwise wins on specificity and blows this text up to 20px. */
.rp-intray .rp-intray-note { margin: 0; font-size: 11px; line-height: 1.5; color: #20293c; max-width: none; }

/* ---------- accordions ---------- */
/* White header, f5f7fc body — measured directly from "right panel.svg"
   (the header title/underline band is white; the table area below it is
   f5f7fc), so the split lives on accordion-head vs. accordion-body, not
   on this shared wrapper. */
.rp-intray-accordion { background: #fff; border: 1px solid #e4eaea; border-radius: 10px; overflow: hidden; }
/* display: block, not flex — with the chevron as a flex sibling, the
   row's height (and so the title's vertical centering) was driven by
   the 22px chevron circle instead of the ~15px text line, which made
   the title-to-underline gap an indirect side effect of that circle's
   size instead of a value anyone actually set. Block + an explicit
   margin-bottom on the title (below) + an absolutely-positioned chevron
   (independent of text flow) makes every gap here a real, direct value:
   padding-top = gap above title, title's margin-bottom = gap to the
   line, padding-bottom = gap below the line. */
.rp-intray-accordion-head {
  position: relative;
  width: 100%;
  display: block;
  padding: 10px 40px 10px 14px;
  border: none;
  background: #f5f7fc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #20293c;
  text-align: left;
  cursor: pointer;
}
.rp-intray-accordion-head > span:first-child { display: block; margin-bottom: 6px; }
/* Treatment Recommendation panel specifically: header background is
   white (not the shared #f5f7fc tint) per "Treatment recommendations
   Right panel.svg" — the whole section card, header included, sits on
   white, separated only by the ::after underline below. Scoped to
   .rp-tr-accordion so the In tray tab's Fracture/Treatment Information
   accordion headers keep their existing #f5f7fc look untouched. */
.rp-tr-accordion .rp-intray-accordion-head { background: #fff; }
/* The chevron/toggle was removed from these four sections' headers on
   purpose (always-open, not collapsible) — cursor: default so the
   header no longer reads as a clickable control it isn't anymore. */
.rp-tr-accordion-static .rp-intray-accordion-head { cursor: default; }
/* Underline below the header, matching "right panel.svg". A plain
   border-bottom would sit at the button's outer edge (full card width,
   ignoring the 14px horizontal padding) — this needs to stop even with
   that padding instead, same inset as the table/divider content below
   it, so it's drawn as an inset ::after rather than a border. */
.rp-intray-accordion-head::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px; /* matches padding-top exactly, for equal top/bottom padding when collapsed */
  height: 0.8px;
  background: #20293c;
}
/* Chevron sits in its own circular hit/hover area (separate from the
   thin outline icon inside it — sizing the icon itself up would distort
   its proportions), so hovering the header shows a plain white circle
   behind it, matching the row-link hover treatment used elsewhere in
   this panel (.rp-intray-record-link). Positioned independently of the
   title's block flow so it doesn't affect the title's height/centering. */
.rp-intray-chevron {
  position: absolute;
  right: 10px;
  /* Centered against the title's own text line (10px padding-top + half
     the ~15px line, minus half the chevron's 22px) — not the button's
     full height, which now also includes the margin-bottom gap and
     underline below the title and would sit the chevron too low. */
  top: 6.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: background 0.15s ease;
}
.rp-intray-accordion-head:hover .rp-intray-chevron { background: #fff; }
/* Thin outline caret (inline SVG in the markup) matching the reference
   design — previously a solid filled triangle glyph, and the wrong
   (teal, not navy) color. Rotates to point down when its section is
   collapsed. */
.rp-intray-chevron-icon { width: 11px; height: 8px; transition: transform 0.3s ease; }
.rp-intray-accordion.is-collapsed .rp-intray-chevron-icon { transform: rotate(180deg); }

/* Real accordion collapse, not just a visual chevron: grid-template-rows
   0fr -> 1fr animates smoothly to the content's real height with no JS
   height measurement (same technique as the homepage's "Show more"
   projects toggle, .projects-more). The inner wrapper carries the actual
   padding/background and clips mid-transition via overflow: hidden. */
.rp-intray-accordion-body {
  display: grid;
  grid-template-rows: 1fr;
  /* Belt-and-suspenders clip on the grid container itself, not just the
     inner wrapper — collapsed sections were still showing a sliver of
     the table's header row (its text/line-height wasn't fully honoring
     the 0fr track size without this). */
  overflow: hidden;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.rp-intray-accordion.is-collapsed .rp-intray-accordion-body { grid-template-rows: 0fr; }
/* The grid-template-rows: 0fr collapse (matching the homepage's "Show
   more" toggle) was still leaving a sliver of the table's header row
   visible when collapsed. Rather than keep chasing that, force a hard,
   guaranteed-complete hide once the (still-animated) collapse transition
   finishes — see the "transitionend" handling in script.js, which adds
   this class only after grid-template-rows has reached 0fr, so the
   shrink animation still plays first. */
.rp-intray-accordion.is-collapsed .rp-intray-accordion-body.is-hidden { display: none; }
.rp-intray-accordion-body.no-transition { transition: none; }
.rp-intray-accordion-body-inner {
  overflow: hidden;
  min-height: 0;
  padding: 10px 14px 12px;
  background: #f5f7fc;
}
.rp-intray-accordion-subhead { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; color: #25282b; }
/* Divider between the "Anti-Osteoporosis Medication" and "Calcium and
   Vitamin D Supplementation" tables inside Treatment Information. */
.rp-intray-subdivider { border: none; border-top: 1px solid #1597a1; margin: 10px 0; }

.rp-intray-mini-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
/* Fracture Information / Treatment Information: a longer cell value was
   reflowing EVERY column's width, since plain auto table-layout
   redistributes width across all cells' content — that's what kept
   knocking these tables' columns out of alignment. table-layout: fixed
   + an explicit colgroup (see the HTML) locks each column to its own
   share of the table permanently, so no cell's text length can ever
   again affect any other column's width. Copy in these tables is
   written short enough to sit on one line within its fixed column at
   this font-size — no truncation or tooltip needed; the ellipsis below
   is only a safety net if a future value runs long. */
.rp-intray-mini-table--fixed { table-layout: fixed; }
.rp-intray-mini-table--fixed td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-intray-mini-table th {
  text-align: left;
  padding: 6px 8px;
  /* Teal, regular weight — matches the reference design and the main
     patient table's header style; was gray/semi-bold before. */
  color: #1597a1;
  font-weight: 400;
  /* No border-bottom here — rule for every table in this project: no
     gray divider between the header row and the first data row. */
  white-space: nowrap;
}
.rp-intray-mini-table td { padding: 6px 8px; border-bottom: none; color: #20293c; }
/* No hover — these rows are static reference data, not clickable or
   editable, so a hover fill implied an interaction that isn't there. */
/* Per "ve icon.svg"/"x icon.svg": color now comes from the icon's own
   baked-in fill (navy check, red x — not the previous green/red text
   glyphs), so no color override needed here anymore. */
.rp-intray-check-icon { display: inline-block; width: 9px; height: 9px; }
/* Same fix as the Sticky Notes column: center the "Current" header with
   its icon-only cells below it, instead of both sitting left-aligned
   but visually offset because the icon is much narrower than the text. */
.rp-intray-check-col, .rp-intray-check { text-align: center; }

/* ---------- In tray sub-tabs: FLS Patients / Sent from AI / Templates /
   FLS-DB ---------- */
/* A tab panel can carry a class (e.g. .mp-app-body, display:flex) that an
   author stylesheet rule sets unconditionally — author CSS always beats the
   UA stylesheet's own `[hidden] { display: none }`, regardless of
   specificity, so the plain `hidden` attribute alone does not actually hide
   these panels once .mp-app-body's `display: flex` is in play. Same fix
   already used elsewhere on this site (.project-card[hidden],
   .mp-wireframe-more[hidden]) for the identical reason. */
[data-tab-panel][hidden] { display: none; }
.rp-intray .mp-app-btn[hidden] { display: none; }
.rp-intray-fls-btn { text-decoration: none; }

/* Crossfade between tabs, per "Main Tabs navigation.mov". Reworked after
   the first version (position: absolute overlap + a pinned wrapper height,
   so old and new panels could overlap mid-fade) shipped a real regression:
   switching tabs sometimes left the table area permanently blank. Root
   cause wasn't fully isolated, but that approach had a structural risk the
   simpler one below doesn't — it briefly took the visible panel out of
   normal flow (position: absolute, auto height) while a flex ancestor
   still expected it to participate in flex sizing, which is exactly the
   kind of state a class getting out of sync (a skipped rAF, a
   backgrounded tab, etc.) can leave stuck.
   This version never shows two panels at once and never repositions
   anything: fade the outgoing panel out (opacity only, still in normal
   flow), THEN swap which panel is hidden, THEN fade the incoming panel in.
   Slightly less "overlapping dissolve" than a true crossfade, but it
   cannot leave the table blank — worst case is a less smooth fade, never
   a broken layout. */
/* Fixed height so the whole "Main Tabs" mockup never resizes when the
   active tab changes. Before this, each panel's height came purely from
   its own content: In tray/Sent from AI/Templates all happened to total
   460px (they have no toolbar above their table, so .mp-app-table-wrap's
   own explicit height:460px was also the panel's total), but FLS
   Patients/FLS-DB add a toolbar/filters row above their table, so their
   total content height ran taller than 460px — making the mockup visibly
   grow/shrink ("jump") every time the user clicked between tabs. Pinning
   .rp-intray-tabpanels itself to 460px, then stretching every panel to
   height:100% of it (see .rp-intray-body), makes 460px the one shared
   budget every tab's content sizes into — a panel with a toolbar just
   leaves correspondingly less room for its table, which already shrinks
   into that space correctly via its own flex:1 1 0 (no separate per-tab
   height math needed). */
.rp-intray-tabpanels { position: relative; height: 460px; }
[data-tab-panel] { transition: opacity 0.15s ease; }

.rp-fls-panel { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
/* Removes the shared .mp-app-toolbar's own 20px side padding — this
   toolbar already sits inside .rp-intray-body's 20px side padding, so the
   two together were doubling the inset compared with every other panel's
   table, which starts flush with the tab row above it. */
.rp-fls-toolbar { padding: 0 0 14px; }
/* .rp-fls-table-wrap picks up its scrolling/split-table behavior from the
   shared .rp-intray .mp-app-table-wrap / .mp-app-table-head /
   .mp-app-table-body / .mp-app-table-body-scroll rules (see their own
   comments above), including that shared rule's own `flex: 1 1 0`. That
   now correctly fills whatever room is left in .rp-fls-panel's real,
   definite height (see .rp-intray-tabpanels/.rp-intray-body) after the
   toolbar — no override needed here for that anymore.
   Earlier attempts here (a bare `.rp-fls-table-wrap { flex: 0 0 460px }`,
   then a higher-specificity `.rp-intray .mp-app-table-wrap.rp-fls-table-
   wrap { flex: 0 0 460px }`) were both papering over the real bug instead
   of fixing it: .rp-fls-panel (a COLUMN flex container, needed because
   FLS Patients/FLS-DB stack a toolbar above their table) had no definite
   height of its own to stretch into, so flex-grow had nothing real to
   grow into and the table area collapsed to ~0 — confirmed via the user's
   own screen recording. Only min-height: 0 is still needed here, so this
   item can actually shrink below its content's natural size to fit
   inside a shorter-than-460px remainder once the toolbar takes its share
   (flex items default to min-height: auto, which blocks shrinking below
   content size — the same reason .mp-app-table-body-scroll already
   carries min-height: 0 of its own, see above). */
.rp-intray .mp-app-table-wrap.rp-fls-table-wrap { min-height: 0; }
/* Row gap: these tables had no .rp-intray-row-spacer rows between
   their <tr>s at all (unlike In tray/Sent from AI, which already use
   this exact spacer-row technique at 8px), so their rows rendered
   touching with zero gap. Added the same spacer rows in the HTML.
   Originally sized to 10px here, but later unified to the same 8px
   used by In tray/Sent from AI so the row spacing reads identically
   across every tab list — this override rule is now redundant with
   the shared 8px rule above but kept (rather than deleted) as the
   scoped hook, in case a future request needs .rp-fls-table's gap to
   diverge again. Specificity note: the shared rule this overrides is
   .rp-intray .mp-app-table tbody tr.rp-intray-row-spacer td (3 classes
   + 3 types) — chaining .mp-app-table.rp-fls-table together here (4
   classes + 3 types) safely beats it regardless of source order, the
   same lesson learned the hard way on .rp-fls-table-wrap above.
   Bonus effect (still true at 8px): adding real height between rows
   pushes this tbody's total content past the table-wrap's available
   height, so the EXISTING .mp-app-table-body-scroll overflow-y: auto
   (already shared with In tray) clips/scrolls extra rows — the "same
   scrolling behavior as In tray" that was asked for, with no separate
   scroll logic needed. */
.rp-intray .mp-app-table.rp-fls-table tbody tr.rp-intray-row-spacer td { height: 8px; }
.rp-fls-sort { margin-left: 4px; vertical-align: middle; }
.rp-fls-check-col { text-align: center; }
/* Centered via absolute positioning at the cell's exact midpoint —
   position: relative on the <td> itself (safe: unlike display: flex,
   which was tried first and broke the cell's table-cell participation,
   causing its white background/box-shadow card to stop filling the row
   spacer's transparent background below it and show through as a stray
   gray rectangle, position: relative doesn't change the computed
   display at all) establishes the containing block, then the icon is
   taken out of flow and placed at left/top: 50% + translate(-50%,-50%).
   This centers the icon against the TD's own box directly, immune to
   text-align/white-space or any other inherited alignment behavior in
   this cell's context — both earlier attempts (text-align alone, then
   display: block + margin: 0 auto) were still reported rendering the
   icon off-center live, so this sidesteps normal-flow alignment
   entirely rather than trying another variant of it. The cell keeps a
   fixed min-height so it has a real box for the icon to center within
   even though the icon is its only (now out-of-flow) content. */
.rp-fls-nhs-missing {
  position: relative;
  vertical-align: middle;
  min-height: 24px;
}
.rp-fls-nhs-missing svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
/* Per "FLS-DB.svg": pills are fully rounded (stadium shape), and there
   are two distinct teal weights, not one — "16 W" (early/lighter
   monitoring stage) uses the pale teal tint shared with the site's other
   pill tokens, while "52 W" (the later stage) is the solid, saturated
   teal fill. Both keep the same dark-navy text color rather than
   switching to white on the solid variant — measured directly off the
   SVG, not assumed. */
.rp-fls-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: #20293c;
}
.rp-fls-pill.teal-light { background: var(--case-ri-tint, #b4dbde); }
.rp-fls-pill.teal-solid { background: #1597a1; }
.rp-fls-pill.gray { background: var(--mp-gray-light, #d8d8d8); }
.rp-fls-actions {
  text-align: center;
  color: #757575;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
}

/* Templates tab: 10 short, single-line rows at the shared 8px row gap add
   up to just over the panel's fixed 460px height with the shared 10px
   td padding, which surfaced a (visible, unwanted) scroll — a scrollbar
   isn't needed here since every row is meant to be visible at once.
   Trimming this table's own row padding by 2px top/bottom (comfortably
   inside the shared rule's specificity via the extra .mp-app-table class,
   same "chain classes to safely beat it" approach used elsewhere on this
   page) recovers enough height for all 10 rows + 9 gaps to fit without
   scrolling, rather than fighting cross-browser scrollbar-hiding quirks. */
.mp-app-table.rp-templates-table td { padding: 8px 12px; }

/* ---------- Sent from AI: empty-state summary cards/sections ---------- */
/* These override .rp-intray-card's default left-aligned column layout
   (label on top, content rows below) with a centered icon+caption
   treatment, per "Sent from AI.svg" — the base card shell (border, radius,
   background, hover) stays exactly as-is, only alignment changes. */
/* Corrected against the uploaded "Monitoring/Medication/General Note Card
   Empty state.svg" references: the title sits at the card's top-LEFT
   (align-items was centering it along with everything else, per the old
   "center" screenshot), while the icon and body text stay centered below
   it — measured directly off those SVGs (pixel bbox analysis on the
   rendered reference): title cap-height ~10-12px -> ~14px font-size, body
   text ~16px, both in the same dark navy as the rest of this component
   (not the lighter gray used before), icon ~44px (was 26px), and a ~16px
   gap between each part (was 10px). */
.rp-sentai-empty-card { align-items: flex-start; gap: 16px; padding: 16px 14px; }
.rp-sentai-empty-card .rp-intray-card-label { font-size: 14px; }
.rp-sentai-empty-card .rp-sentai-empty-icon { width: 44px; height: 44px; align-self: center; }
/* Scoped to .rp-sentai-empty-card specifically (not the shared base rule
   below) so this doesn't also resize/recolor .rp-sentai-empty-section's
   own "No data was entered" text, which wasn't part of this request. */
.rp-sentai-empty-card .rp-sentai-empty-text {
  align-self: center;
  font-size: 16px;
  color: #20293c;
}
.rp-sentai-empty-icon { width: 26px; height: 26px; }
.rp-sentai-empty-text { margin: 0; text-align: center; font-size: 10.5px; color: #757575; }
.rp-sentai-empty-section { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; }
.rp-sentai-empty-section .rp-sentai-empty-icon { width: 22px; height: 22px; }
.rp-sentai-empty-section .rp-sentai-empty-text { font-size: 16px; }

/* ---------- FLS-DB: eligibility notice + date-range filter bar ----------
   Corrected against "FLS-DB.svg" (uploaded reference render): the notice
   is a plain white card with a thin neutral border (not a teal-tinted
   box), single line, small/tight — not the taller two-line teal card this
   started as. The filter label sits on its OWN line above the chip row
   (not inline with the chips), and the chips are OUTLINED teal (white
   fill, teal border + text), not gray-outlined navy text. Colors sampled
   directly from the rendered SVG: label/chip teal #1597a1 (this site's
   existing teal-accent token), notice border a faint gray-teal. */
/* Width matches the table below it (both are plain block-level children
   of the same .rp-fls-panel column, so width:100% just confirms/locks
   that rather than leaving it to whatever box-sizing default). Per the
   uploaded "Banner.svg" reference (a 1880x29 export — a slim, tight,
   single-line bar, not a tall/loose card): font-size 12px, tight
   line-height (was 1.6, way taller than the reference's ~29px total
   height allows for a 12px line + this same ~8px vertical padding), and
   no forced single-line + ellipsis truncation — the full eligibility
   sentence must stay fully readable, wrapping to a second line only if
   the tighter line-height genuinely doesn't leave room, rather than
   cutting off. Left padding (14px) matches the reference's own first
   glyph position. Vertical gap above (18px) and the filter row's own
   internal gap (18px, below) match the same 18px used between fields in
   the Patient record banner (.rp-tr-patientbar-fields), the reference
   for this "gap between components" convention. */
/* Root cause of the 20px/oversized rendering, found via the browser
   inspector overlay: this is a <p>, and the site-wide .case-section p
   rule (font-size: 20px; line-height: 1.6; max-width: 900px — the
   standard prose-paragraph style used across every case-study section)
   was winning over the plain single-class .rp-flsdb-notice selector.
   .case-section p is a class+type selector (specificity 0,0,1,1);
   .rp-flsdb-notice alone is just one class (0,0,1,0) — strictly lower,
   so it always lost regardless of source order. Chaining the tag + an
   extra ancestor class here (0,0,2,1) safely and unconditionally beats
   it, the same "chain classes to exceed specificity" fix used elsewhere
   on this page. max-width is explicitly reset to none since the
   inherited 900px cap would otherwise still shrink this below the
   table's actual (wider) width. */
/* Box (not text) alignment: this card's own outer box sits flush
   (margin: 0) at the same left edge as the filter card and the table
   wrap below it — see the fuller note above .rp-flsdb-filters-row.
   Left padding back to the reference's own measured 14px. */
.rp-fls-panel p.rp-flsdb-notice {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #dde6e8;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #20293c;
}
.rp-flsdb-notice b { color: #20293c; font-weight: 700; }
/* Vertical gaps between the tabs row / banner / filter buttons / table
   sequence: halved from the earlier 18px to 9px, and the banner's own
   top margin dropped to 0 so it sits right at .rp-intray-body's shared
   16px top padding — the same convention .rp-fls-toolbar already uses
   (no extra top margin of its own) on the FLS Patients tab.
   "Same vertical line" (as asked separately) means every section's own
   OUTER BOX — the banner card, this filter card, and the table wrap —
   starts flush at that shared left edge (all have margin: 0, no extra
   offset). Each one's own internal padding is its own component's
   business after that; a card's padding and a button's padding aren't
   expected to add up to the exact same text-start pixel as plain label
   text — matching box edges is what actually reads as "aligned" here,
   which is also how "Buttons-5fa57521.svg" itself is proportioned. */
.rp-flsdb-filters { padding: 9px 0 9px; }
.rp-flsdb-filters-label { display: block; margin: 0 0 8px; font-size: 11px; font-weight: 700; color: #1597a1; }
.rp-flsdb-filters-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
/* Per "Buttons-5fa57521.svg": the white, rounded (8px) card sits ONLY
   behind the three chips — not the whole row (Clear Selection/divider/
   toggle stay on the plain page background, outside the card). Card
   padding ~10px on every side, measured from the reference: canvas
   width 375, first button starts at x10; canvas height 52 from y19-71,
   button height 32 starting at y29, i.e. 10px above and below. The
   chips themselves keep their tight 6px gap (measured from the
   reference's own rect x-positions: chip1 ends at x105, chip2 starts
   at x111). */
.rp-flsdb-chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}
/* Per "Buttons-5fa57521.svg": each pill is a 95-138px-wide, 32px-tall
   outlined rect with rx: 6 — a subtly rounded rectangle, NOT a
   fully-rounded stadium/pill shape (999px, what this wrongly used). */
.rp-flsdb-chip {
  border: 1px solid #1597a1;
  background: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  min-height: 32px;
  box-sizing: border-box;
  font-size: 11.5px;
  font-weight: 500;
  color: #1597a1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rp-flsdb-chip:hover { background: #1597a1; color: #fff; }
.rp-flsdb-filters-divider { width: 1px; height: 18px; background: #e4eaea; }
/* "Show only patients missing NHS#" control: the reference SVG has no
   checkbox square at all — it's a toggle switch (a 40x22 rx:11 pill
   track, #D8D8D8 gray when off, with a 16px white circular knob sitting
   at the track's left edge in the off state) — so this was rebuilt as a
   real switch rather than a checkbox input, with the native checkbox
   kept but visually hidden (not display:none, so it stays keyboard/
   screen-reader operable) driving the track/knob's visual state via the
   adjacent-sibling selector below, the same accessible-toggle pattern
   used for form checkboxes elsewhere on the web. */
.rp-flsdb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 400;
  color: #20293c;
  cursor: pointer;
}
.rp-flsdb-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rp-flsdb-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d8d8d8;
  transition: background 0.15s ease;
}
.rp-flsdb-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(32, 41, 60, 0.25);
  transition: transform 0.15s ease;
}
.rp-flsdb-toggle input:checked ~ .rp-flsdb-toggle-track { background: #1597a1; }
.rp-flsdb-toggle input:checked ~ .rp-flsdb-toggle-track .rp-flsdb-toggle-knob { transform: translateX(18px); }
.rp-flsdb-toggle input:focus-visible ~ .rp-flsdb-toggle-track { box-shadow: 0 0 0 2px rgba(21, 151, 161, 0.35); }
.rp-flsdb-toggle:hover .rp-flsdb-toggle-track { background: #226979; }
/* Annotation dot for "Show only patients missing NHS#" — positioned right
   after the label's own text (which itself ends in "NHS#"), so it reads
   as sitting next to that word without needing to split the label's text
   into separate spans. Per the site-wide hard rule, the dot is never a
   DESCENDANT of the <label> it annotates: a <label> forwards any click
   inside it to its associated <input>, so a dot nested inside would
   silently toggle the filter every time someone clicked it to read the
   tooltip. .rp-flsdb-toggle-wrap holds the label and the dot as siblings
   instead — position:relative on the wrap, position:absolute on the dot,
   anchored off the wrap's own right edge, contributing zero width so the
   toggle's own layout in the filters row is unaffected either way. */
.rp-flsdb-toggle-wrap { position: relative; display: inline-flex; align-items: center; }
.rp-flsdb-nhs-toggle-indicator {
  position: absolute !important;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
}
/* Link-style "Clear Selection" already relies on .mp-app-link (12px,
   underlined, gray) — no override needed here, it matches the reference
   as-is. */
/* Collapse/expand animation for the "Show only patients missing NHS#"
   toggle's row filtering (see script.js), matching the user's uploaded
   reference recording: a row leaving the visible set shrinks its own
   height + cell padding to 0 while fading out, and a row entering grows
   from 0 while fading in, finishing with a brief teal highlight pulse
   so it visibly "arrives" rather than just popping into place. height/
   opacity/padding are plain numeric properties (not transforms), which
   transition reliably on <tr>/<td> across browsers. The JS
   (collapseRow/expandRow) drives the height/opacity/padding values
   directly as inline styles; this rule only supplies the transition
   timing they animate along, plus the highlight keyframes. */
#rpFlsdbBodyTable tbody tr:not(.rp-intray-row-spacer) {
  transition: height 220ms ease, opacity 220ms ease;
}
#rpFlsdbBodyTable tbody tr:not(.rp-intray-row-spacer) td {
  transition: padding-top 220ms ease, padding-bottom 220ms ease;
}
#rpFlsdbBodyTable tbody tr.rp-fls-row-highlight {
  animation: rpFlsRowHighlight 650ms ease;
}
@keyframes rpFlsRowHighlight {
  0% { background-color: rgba(21, 151, 161, 0.16); }
  100% { background-color: transparent; }
}

/* ---------- footer ---------- */
.rp-intray-footer { font-size: 11px; color: #20293c; background: #fff; }
/* When a footer variant drops its left-side content entirely (e.g. the
   Treatment recommendations mockup has no exam counts/download button to
   show), .mp-app-footer's justify-content: space-between has nothing to
   push the remaining side away from — with a single flex child it sits
   at the start, not the end. Auto-margin pulls it back to the right. */
.mp-app-footer-right:only-child { margin-left: auto; }

/* ---------- REAL plus: Treatment recommendations mockup ---------- */
.rp-tr-shell { display: flex; align-items: stretch; }
.rp-tr-sidebar {
  flex: 0 0 220px;
  width: 220px;
  padding: 16px 14px;
  border-right: 1px solid #eceef3;
  background: #fff;
}
/* Same default/hover appearance as .rp-intray-record-link ("Go to
   Patient Record" on the In tray Patient Summary panel) — plain
   dark-navy text at rest, a white rounded pill + soft shadow + bold
   text on hover, just with the arrow reversed (leading, pointing left,
   since this one navigates back instead of forward). */
.rp-tr-back {
  /* display: block + width: 100% (box-sizing: border-box) makes the
     button's box exactly as wide as .rp-tr-sidebar-divider directly
     below it — text-align: center then centers "← Back to Patient
     Lists" within that same width, so the label sits centered relative
     to the divider at rest, not just on hover. */
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: #20293c;
  font-weight: 400;
  text-decoration: none;
  font-size: 11.5px;
  cursor: pointer;
  padding: 4px 10px;
  margin: -4px 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rp-tr-back:hover {
  /* Matches the Design System spec's "Without background hover light
     blue" button state exactly (Real plus Design System.svg): a flat
     Hyper Light Turquoise (#E4EAEA) fill spanning the full available
     width — here, the same width as .rp-tr-sidebar-divider directly
     below it — bold text, no shadow (the plain white/shadow pill
     treatment is a different state, "hover white", not used here). */
  background: #e4eaea;
  box-shadow: none;
  font-weight: 700;
}
/* .rp-tr-back-label wraps just the visible text (not the full-width,
   text-align: center anchor) so the indicator's positioning context hugs
   the actual rendered text — wherever centering places it — instead of the
   anchor's own full 100%-width box. Nothing about the anchor's box model,
   padding, or centering changes; this only wraps the existing text node. */
.rp-tr-back-label { position: relative; display: inline-block; }
.rp-tr-back-indicator {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 8px;
  transform: translateY(-50%);
}

.rp-tr-sidebar-divider { height: 1px; background: #eceef3; margin: 14px 0; }
.rp-tr-nav { display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
.rp-tr-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #20293c;
  font-weight: 500;
  /* href was removed from every sidebar nav item (hover-only now, no
     click/navigation) — cursor: pointer keeps the same visual
     affordance an <a href> would normally give for free. */
  cursor: pointer;
}
/* Same technique as .rp-tr-admin-label below: wraps just the "Patient
   Summary" text so the indicator hugs the actual last letter instead of
   the nav item's stretched full width. */
.rp-tr-summary-label { position: relative; display: inline-block; }
.rp-tr-summary-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}

/* .rp-tr-admin-label wraps just the "Administrative Information" text
   (not the full-width flex row) so the indicator's positioning context
   hugs the actual last letter ("n") instead of the row's own stretched
   width — the row can be wider than the text since .rp-tr-nav stretches
   every item to the sidebar's full content width. Nothing about the row's
   layout changes; this only wraps the existing text node. */
.rp-tr-admin-label { position: relative; display: inline-block; }
.rp-tr-admin-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}

/* Same technique as .rp-tr-admin-label: wraps just the "Clinical
   Information" text (not the full-width group header <a>) so the
   indicator hugs the actual last letter instead of the row's stretched
   width. */
.rp-tr-clinical-label { position: relative; display: inline-block; }
.rp-tr-clinical-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}

/* Same technique: wraps just the "Monitoring" text so the indicator hugs
   the actual last letter instead of the nav item's stretched full width. */
.rp-tr-monitoring-label { position: relative; display: inline-block; }
.rp-tr-monitoring-tab-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}

/* Same technique: wraps just the "Letters" text so the indicator hugs the
   actual last letter instead of the nav item's stretched full width. */
.rp-tr-letters-label { position: relative; display: inline-block; }
.rp-tr-letters-indicator {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 6px;
  transform: translateY(-50%);
}
a.rp-tr-nav-item { border-left: 3px solid transparent; }
/* Active state for a PLAIN nav item (e.g. Letters) — same visual treatment
   as .rp-tr-nav-group.is-active > a (teal text/bg, teal left border), but
   here the 3px border-left is already permanently reserved on every plain
   item above (see rule just above), so only the color needs to change —
   no padding-left compensation needed like the group header requires. */
a.rp-tr-nav-item.is-active {
  color: #1597a1;
  font-weight: 700;
  background: #f5f7fc;
  border-left-color: #1597a1;
}
/* Hover per the reference recording: a light gray/blue pill fill with
   bold text — no left accent bar (that's reserved for the active/
   selected item only, per .rp-tr-nav-group.is-active below). */
a.rp-tr-nav-item:hover {
  background: #e4eaea;
  font-weight: 700;
}
.rp-tr-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.rp-tr-nav-group { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.rp-tr-nav-group > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: #20293c;
  font-weight: 500;
  cursor: pointer;
}
.rp-tr-nav-group.is-active > a {
  color: #1597a1;
  font-weight: 700;
  background: #f5f7fc;
  border-left: 3px solid #1597a1;
  padding-left: 7px;
}
/* Not-yet-active group header still gets the plain hover pill; the
   active one keeps its own persistent teal bar/tint regardless of
   hover (no separate hover treatment needed on top of "already selected"). */
.rp-tr-nav-group:not(.is-active) > a:hover {
  background: #e4eaea;
  font-weight: 700;
}
/* padding: 8px 0 (no left inset here anymore) — the text indent now
   lives on the anchor's own padding-left instead, so this container's
   box is the exact same width as .rp-tr-nav's, and its children can
   span that full width edge-to-edge like the top-level nav items do. */
/* gap: 8px matches the padding-top below exactly, so the gap between
   "Clinical Information" and "Clinical Assessment" (governed by that
   padding-top) is now the same as every gap between the subnav items
   themselves (governed by this gap) — was 24px, visibly bigger than
   that first gap. */
.rp-tr-subnav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}
/* display: block + width: 100%, with NO left-inset container padding
   and no negative-margin trick, so this pill's left/right edges land
   on the exact same positions as a.rp-tr-nav-item's (both flush with
   .rp-tr-sidebar's own content edges) — that's what "same width as the
   tabs" needs. The visual text indent (previously done via container
   padding) now comes from this element's own asymmetric padding
   (42px left, matching the old 34px container inset + 8px text
   padding, vs. 8px right), so the PILL still spans the full row while
   only the TEXT sits indented under "Clinical Information"'s text. */
.rp-tr-subnav a {
  display: block;
  box-sizing: border-box;
  width: 100%;
  white-space: nowrap;
  /* "Treatment recommendations" was wrapping to 2 lines at the inherited
     11px (the sidebar's fixed 220px width leaves too little room for it
     on one line at that size) — 10px keeps every subnav label, including
     that one, on a single line without needing to widen the sidebar. */
  font-size: 11px;
  color: #20293c;
  font-weight: 400;
  /* 9px top/bottom, matching a.rp-tr-nav-item's own vertical padding —
     was 5px, which made this pill visibly shorter/tighter than the
     top-level items' pills. */
  padding: 9px 8px 9px 42px;
  border-radius: 6px;
  cursor: pointer;
}
/* Same hover treatment as the top-level nav items (Monitoring, Letters,
   etc. — a.rp-tr-nav-item:hover): light gray/blue pill fill + bold text,
   not the earlier teal-text-only hover. Kept off the active item, which
   already has its own persistent teal + underline styling below. */
.rp-tr-subnav a:not(.is-active):hover { background: #e4eaea; font-weight: 700; }
.rp-tr-subnav a.is-active {
  color: #1597a1;
  font-weight: 700;
}
/* The underline lives on the inline <span> wrapping the text, not on
   the anchor itself — the anchor keeps the base rule's width: 100%
   (same box as every other subnav item, so nothing shifts position),
   while the span's own width is exactly the text's rendered width, so
   the underline starts and ends flush with the text instead of also
   covering the anchor's 42px left indent padding. */
.rp-tr-subnav a.is-active span {
  border-bottom: 1.5px solid #1597a1;
  border-radius: 6px 6px 0 0;
  padding-bottom: 2px;
}

/* padding-bottom: 0, matching .rp-intray-body's own established pattern
   for the In tray tab's table-wrap/summary-scroll — those two reach the
   footer with a genuine zero gap specifically because their shared
   wrapper has no bottom padding at all; whatever breathing room a fixed-
   height scroll box needs lives inside that box's own padding, not as
   extra space after it. .rp-tr-scroll-area's height: 460px (below) is
   that same fixed-height technique; this 0 here is the other half of
   the pattern — without it, .rp-tr-main's own padding was reintroducing
   exactly the gap that technique is meant to prevent. */
.rp-tr-main { position: relative; flex: 1; min-width: 0; padding: 16px 20px 0; background: #f5f7fc; }

/* Pure overlay hotspot for the patient banner — deliberately NOT nested
   inside .rp-tr-patientbar/.rp-tr-scroll-area, and no layout property of
   either was touched. .rp-tr-scroll-area clips with overflow-x: hidden and
   sits flush against the banner's own left edge, so any indicator nested
   inside it gets clipped the moment it pokes outside the banner's box.
   Making .rp-tr-main (an ANCESTOR of the scroll area) the positioning
   context lets this sit in .rp-tr-main's own 20px left padding — the gutter
   between the sidebar and the banner — without being clipped by anything
   inside it. top: 35px lines up with the patient bar's first text line
   (16px main padding-top + 12px patient-bar padding-top + ~7px half line
   height); since the patient bar is pinned via position: sticky at the very
   top of the scroll area at every scroll position, this stays aligned with
   it throughout scrolling too. */
.rp-tr-patientbar-indicator {
  position: absolute;
  left: 2px;
  top: 35px;
  transform: translateY(-50%);
  z-index: 10;
}

.rp-tr-patientbar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #e4eaea;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 11px;
  color: #20293c;
  flex-wrap: wrap;
}
/* Placed in normal flow as the first item in the fields row (not absolutely
   positioned outside the banner) because .rp-tr-scroll-area clips with
   overflow-x: hidden and sits flush against the banner's own left edge —
   an outward offset here would be clipped and invisible. This still reads
   as the left-side hotspot; the default (rightward) .mp-tooltip-info
   direction opens the tooltip INTO the banner/panel. */
.rp-tr-patientbar-indicator { margin-right: -10px; }
.rp-tr-patientbar-fields { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rp-tr-patientbar-divider { width: 1px; height: 20px; background: #c2cccc; }
.rp-tr-patientbar-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.rp-tr-pathway { display: flex; align-items: center; gap: 8px; }
.rp-tr-select-wrap { position: relative; display: inline-flex; align-items: center; }
.rp-tr-select-wrap select {
  appearance: none;
  border: none;
  border-bottom: 1px solid #d8d8d8;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: #20293c;
  padding: 4px 20px 4px 0;
  cursor: pointer;
}
.rp-tr-pathway-select select { background: #fff; border-radius: 4px; border: none; padding-left: 8px; }
.rp-tr-select-wrap svg { position: absolute; right: 7px; width: 8px; height: 5px; pointer-events: none; }
.rp-tr-select-wrap svg path { stroke: #1597a1; }
.rp-tr-toggle-label { display: flex; align-items: center; gap: 8px; }
.rp-tr-toggle { position: relative; width: 28px; height: 16px; border-radius: 8px; background: #d8d8d8; flex-shrink: 0; }
.rp-tr-toggle-knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left 0.15s ease; }
/* "Mark all as Normal" toggle reflects actual row state, not a fixed
   default: a group is "on" (teal, knob slid right) only when every row in
   it already has Normal selected — Additional Tests stays off here because
   Myeloma Screen is marked Abnormal. */
.rp-tr-toggle.is-on { background: #1597a1; }
.rp-tr-toggle.is-on .rp-tr-toggle-knob { left: 14px; }
/* Site-wide Patient Record button rule — Main Button, disabled:
   background #d8d8d8, text #757575 (every solid/filled action button:
   Save changes, Save Medication, Add a Fracture, Add, Add Supplement,
   Create Letter — whether it's .mp-app-btn-based or .rp-tr-clear-btn
   used in its filled role). Previously "Save changes" had a one-off
   inverted pairing; removed so every Main Button disables identically. */
.rp-tr-save-btn:disabled,
.rp-tr-clear-btn:disabled,
.rp-tr-create-letter-btn:disabled,
.rp-tr-save-med-btn:disabled {
  background: #d8d8d8;
  border-color: #d8d8d8;
  color: #757575;
  cursor: not-allowed;
}
/* .mp-app-btn:not(.mp-app-btn-ghost):hover's filter: brightness(0.9)
   still matches this button on hover even while disabled — :hover
   fires regardless of the disabled attribute in CSS, only click/focus
   are actually blocked. Cancel it here so no disabled Main Button
   shows any hover reaction. */
.rp-tr-save-btn:disabled:hover { filter: none; }
.rp-tr-create-letter-btn:disabled:hover { filter: none; }
.rp-tr-save-med-btn:disabled:hover { filter: none; }

/* ---------- Letters screen: Create Letter checkboxes ---------- */
.rp-tr-letters-columns { display: flex; align-items: flex-start; gap: 40px; }
.rp-tr-letters-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.rp-tr-letters-col-title { font-size: 11px; font-weight: 400; color: #20293c; margin-bottom: 2px; }
.rp-tr-letters-col-title--bold { font-weight: 700; }
.rp-tr-letters-divider { width: 1px; align-self: stretch; background: #e4eaea; }

.rp-tr-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 400;
  color: #20293c;
  cursor: pointer;
}
.rp-tr-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1.5px solid #9aa7ab;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.rp-tr-checkbox input[type="checkbox"]:checked {
  border-color: #1597a1;
  background: #1597a1;
}
.rp-tr-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3.2px;
  top: 0.4px;
  width: 4px;
  height: 7.5px;
  border: solid #fff;
  border-width: 0 1.4px 1.4px 0;
  transform: rotate(45deg);
}
.rp-tr-checkbox:hover input[type="checkbox"]:not(:checked) {
  border-color: #226979;
}

/* Real fix (previous attempts only re-centered the label inside the
   stretched bar, which wasn't the actual ask): this button is a flex
   child of .rp-tr-accordion-inner's column, whose default align-items:
   stretch was forcing it to the full accordion width. align-self:
   flex-start opts this one button out of that stretch, so it sizes to
   its own content + the same 9px 16px .mp-app-btn padding every other
   button on this page uses, instead of being a full-width bar. */
.rp-tr-create-letter-btn { margin-top: 8px; align-self: flex-start; }

/* ---------- Letters screen: Letters History table ---------- */
.rp-tr-letters-history .rp-tr-row-actions { gap: 2px; }
.rp-tr-clear-btn {
  /* Enabled default is a teal ghost/outline button (per the reference
     recording — "Clear" sits next to an already-filled "Save Medication"
     card, so it's active, not disabled). The flat gray fill only applies
     via :disabled below, for cards like "Add Supplement" whose fields
     are still empty. */
  border: 1px solid #1597a1;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-family: inherit;
  background: transparent;
  color: #1597a1;
  transition: background 0.15s ease, color 0.15s ease;
}
/* Site-wide Patient Record button rule — Secondary Button, disabled:
   border #757575, text #d8d8d8, transparent background. Applied via this
   modifier class to every "Clear" button paired with a disabled Main
   Button (Add Medication, Add Supplement, Add DXA Result) so the outline
   style reads consistently across all Patient Record screens. :disabled
   is included in the selector so it beats the shared
   .rp-tr-clear-btn:disabled rule below despite matching specificity,
   since this rule is declared later in the file. */
.rp-tr-clear-btn--gray-outline:disabled {
  background: transparent;
  border-color: #757575;
  color: #d8d8d8;
}
/* Belt-and-suspenders: force the Main Button disabled look (#d8d8d8 fill,
   #757575 text) on every plain disabled Clear button, at higher
   specificity than anything else touching this class, so it can never
   render as an outline/ghost button by accident. Excludes the Secondary
   Button (gray-outline) variant above. */
.rp-tr-med-actions .rp-tr-clear-btn:disabled:not(.rp-tr-clear-btn--gray-outline) {
  background: #d8d8d8;
  border: 1px solid #d8d8d8;
  color: #757575;
}
.rp-tr-clear-btn:not(:disabled):hover {
  /* #226979 (not #1597a1) — #1597a1 is Save Medication's own resting
     fill color, so using it here would make hovered Clear look
     identical to that button; #226979 is the darker hover-teal used
     elsewhere in this component (radio hover, .mp-app-btn hover). */
  background: #226979;
  border-color: #226979;
  color: #fff;
}

/* Per "Treatment Recommendation title.svg": bold teal text, no
   underline — reverts an earlier attempt to match this to the
   Fracture Information accordion-header look (bold navy + full-width
   underline), which turned out to be the wrong reference. This SVG is
   the actual spec for this specific title. */
.rp-tr-title {
  font-size: 13px;
  font-weight: 700;
  color: #1597a1;
  margin: 16px 0 10px;
}

/* Per the "14.11.46" reference recording: the patient bar + "Treatment
   Recommendation" title stay pinned in place while ALL four accordion
   sections scroll underneath as one continuous unit — not a separate
   small clipped box the mouse has to be hovered over, as the previous
   460px-capped .rp-tr-accordions-scroll worked. The scroll boundary
   moves up to this wrapper (.rp-tr-scroll-area), which now contains
   both the sticky header and the accordion stack, so scrolling anywhere
   in the panel — including over the header — scrolls the content while
   the header stays put via position: sticky.
   height: 508px — explicitly requested change: "set the total height of
   the Treatment Recommendations screen to match the In tray Patients
   tab screen, without changing the proportions of any interface
   component within the screen." Both screens share the same topbar and
   footer, so matching total height reduces to matching each screen's
   own body-row height. In tray's body row is .rp-intray-tabs (padding
   16px 0/20px top + a ~32px tab-pill row ≈ 48px) sitting ABOVE
   .rp-intray-body's own 16px-top-padding + 460px twin panels. Treatment
   Recommendations has no equivalent tab-strip row — .rp-tr-main goes
   straight from the panel edge into its own 16px top padding + this
   scroll area — so it was short by roughly that ~48px tab-strip height.
   460 + 48 = 508 closes that gap while every element still inside this
   box (patient bar, title, accordions, fields, buttons) keeps its own
   unchanged size/padding — only the scrollable viewport got taller, not
   any proportion within it. This number was reasoned from the CSS box
   model, not confirmed in a live browser (no headless browser in this
   sandbox) — flag if it needs a small adjustment once seen live. */
.rp-tr-scroll-area {
  height: 508px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rp-tr-scroll-area::-webkit-scrollbar { display: none; }

/* Single sticky wrapper around both the patient bar and the title, so
   only one position: sticky/top: 0 is needed — stacking them as two
   separate sticky elements would need a second one offset by the
   patient bar's own height, which is fragile to keep in sync by hand.
   Solid background so accordion content scrolling underneath doesn't
   show through. */
.rp-tr-sticky-header {
  /* -webkit-sticky fallback for older Safari, which doesn't recognize
     plain `sticky` and would otherwise fall back to `position: static`
     — letting the patient bar/title scroll away with the rest of the
     content instead of staying in place while the accordions scroll
     underneath. */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f7fc;
  /* .rp-tr-title's own margin-bottom (the gap to "Anti-osteoporosis
     Therapy") would otherwise collapse straight through this wrapper
     rather than being counted as part of its own box — harmless in a
     static layout, but a known source of sticky-header/child-margin
     rendering jitter during scroll in some engines. flow-root
     contains that margin inside the sticky box itself, with no visual
     side effect, so the title-to-first-accordion distance is locked
     to a fixed 10px at every scroll position. */
  display: flow-root;
}

.rp-tr-accordions-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 4px;
}

/* Sidebar-driven screens for the Patient Record component: exactly one
   .rp-tr-record-panel is shown at a time (toggled by script.js in sync
   with the real sidebar's .is-active state), matching the same
   show/hide pattern used by the Clalit competitor carousel slides. The
   Treatment Recommendation panel keeps the real, hand-built markup
   (sticky header + accordions); the other 8 panels are reference
   screenshots that already include their own patient-bar/title chrome,
   so they render as a single flush image with no extra padding. */
.rp-tr-record-panel { display: none; }
.rp-tr-record-panel.is-active { display: block; }
.rp-tr-record-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Override the shared .rp-intray-accordion-body-inner's #f5f7fc tint
   (right for the In tray tab's Fracture/Treatment Information
   accordions, but the Treatment Recommendation panel's own accordion
   sections are white per "Treatment recommendations Right panel.svg" —
   scoped to this class only so the In tray tab is unaffected). */
.rp-tr-accordion-inner { display: flex; flex-direction: column; gap: 16px; background: #fff; }
.rp-tr-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #1597a1;
  margin-bottom: 4px;
}
.rp-tr-required { color: #d24b4b; }
/* "Anti-Osteoporosis Therapy" keeps the exact same typography as every
   other field (.rp-tr-field label / .rp-tr-select-wrap select — 10.5px
   teal label, 11px navy value, #d8d8d8 border, navy chevron; no
   font-size/color overrides here). The one real difference from the
   compact fields below it: this box is twice as wide, so the label and
   the value/chevron row line up as one clearly wider control rather
   than a same-size copy of "Medication Line" — padding-left: 0 on the
   select keeps its text flush under the label's own left edge (the
   base select has 8px left padding, which was reading as a small
   vertical misalignment between the two lines). */
.rp-tr-therapy-field .rp-tr-select-wrap {
  display: flex;
  width: 200px;
  justify-content: space-between;
  /* One continuous line under both the value AND the arrow (instead of
     just under the select), so the arrow sits above the line rather
     than floating past its right end. */
  border-bottom: 1px solid #d8d8d8;
}
.rp-tr-therapy-field .rp-tr-select-wrap select { flex: 1; border-bottom: none; }
.rp-tr-therapy-field .rp-tr-select-wrap svg { position: static; margin-left: 8px; }

.rp-tr-add-med-card {
  /* Nested "form card" inside the (now white) accordion section keeps
     its own light tint per the reference — only the section body
     itself needed to switch to white, not this inner sub-panel. */
  background: #f5f7fc;
  border: 1px solid #e4eaea;
  border-radius: 10px;
  padding: 14px 16px;
}
.rp-tr-add-med-card h5,
.rp-tr-med-history h5 { font-size: 12px; font-weight: 700; color: #20293c; margin: 0 0 12px; }
.rp-tr-med-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 14px;
}
.rp-tr-field-comment { flex: 1 1 220px; min-width: 200px; }
/* Scoped to just the "Add Medication" row (per the reference design):
   the 4 fields read as noticeably cramped/short at the shared defaults
   (--sm text inputs are 85px, the plain Number-of-doses input is 40px,
   the Medication select hugs its option text) — widen only here rather
   than touching the shared classes, which are reused by many other
   "Add X" rows elsewhere on this page that weren't flagged as wrong. */
.rp-tr-med-row--wide-fields .rp-tr-select-wrap { min-width: 150px; }
.rp-tr-med-row--wide-fields .rp-tr-select-wrap select { width: 100%; }
.rp-tr-med-row--wide-fields .rp-tr-text-input--sm { width: 150px; }
.rp-tr-med-row--wide-fields .rp-tr-text-input--md { width: 190px; }
.rp-tr-med-row--wide-fields .rp-tr-text-input:not(.rp-tr-text-input--sm):not(.rp-tr-text-input--md) { width: 120px; }
/* Laboratory Test Results rows: plain flex + content-hugging .rp-tr-field
   widths let a long "Test Name" (e.g. "EGFR, Recent Creatinine
   Clearance") push every column after it rightward on just that row,
   so Test Date/Normal-Abnormal/Value/Comment drifted out of alignment
   row to row instead of forming clean columns like the source design.
   Grid with fixed column widths (not flex-basis hints) fixes every
   column to the same x position regardless of any one row's content
   length — same fix pattern as .mp-edp-grid elsewhere on this site. */
.rp-tr-lab-row {
  display: grid;
  grid-template-columns: 180px 120px 180px 70px 1fr;
  align-items: start;
}
.rp-tr-lab-row .rp-tr-field-comment { flex: none; min-width: 0; }
.rp-tr-text-input {
  border: none;
  border-bottom: 1px solid #d8d8d8;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: #20293c;
  width: 40px;
  padding: 4px 0;
}
.rp-tr-text-input::placeholder { color: #9aa7ab; }
.rp-tr-text-input--wide { width: 150px; }
.rp-tr-text-input--dose { width: 50px; }
.rp-tr-text-input--sm { width: 85px; }
.rp-tr-text-input--md { width: 130px; }
.rp-tr-text-input--lg { width: 190px; }
.rp-tr-field-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; }
.rp-tr-field-grid:last-child { margin-bottom: 0; }
.rp-tr-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
/* Per "Update Demographics Button default/hover.svg": a compact 84x16
   micro-button (not the Marketplace .mp-app-btn-ghost it was borrowed
   from, which pulled in --mp-blue/indigo instead of this component's own
   teal, and sized much larger than the 16px-tall source). Measured
   straight off the SVG's own unitless width/height (==viewBox, so 1
   unit = 1 real px here): refresh icon ~5.3x6.4 traced directly from the
   source path data so the glyph itself is exact. Sized up from that
   literal micro-button scale per explicit request: 10.5px text (was
   7.5px) with every other dimension scaled by the same ~1.4x factor so
   proportions stay matched to the source. There was also a leftover
   second (generic, non-source) refresh icon duplicated after the real
   one — removed from the markup, since only one icon belongs here. */
.rp-tr-update-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #1597a1;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 10.5px;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.6;
  background: transparent;
  color: #1597a1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rp-tr-update-demo-btn svg { width: 10px; height: 10.5px; flex-shrink: 0; }
.rp-tr-update-demo-btn:hover { background: #226979; border-color: #226979; color: #fff; }
.rp-tr-admin-notice { font-size: 10.5px; color: #20293c; display: flex; align-items: center; gap: 4px; }
.rp-tr-checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
.rp-tr-checkbox-grid:last-child { margin-bottom: 0; }
.rp-tr-field-label-only { font-size: 10.5px; font-weight: 700; color: #1597a1; margin: 0 0 6px; display: block; }
.rp-tr-link { font-size: 11px; color: #1597a1; font-weight: 700; cursor: pointer; }

/* Sidebar hotspots (Administrative Information, Clinical Information,
   Monitoring, Letters): only the currently active category's dot should
   show, not all of them at once — hidden by default, restored on the
   active plain item or on a group header whose group is active (i.e. one
   of its subnav items is the selected category). */
[data-record-nav] .mp-indicator { display: none; }
[data-record-nav] a.rp-tr-nav-item.is-active .mp-indicator,
[data-record-nav] .rp-tr-nav-group.is-active > a .mp-indicator {
  display: inline-flex;
}
/* The page-wide "Hide hotspots" switch (.hotspots-hidden, toggled in
   script.js) must still win over the active-category dot above: the
   active-item selector's specificity (an attribute + 2 classes + an
   element) was otherwise higher than plain ".hotspots-hidden .mp-
   indicator", so toggling hotspots off left the currently-active sidebar
   item's dot showing (reported bug — only this one dot survived the
   toggle). Mirroring the exact active-item selectors under
   .hotspots-hidden guarantees strictly higher specificity so this
   always wins regardless of source order. */
.case-feature-block.hotspots-hidden [data-record-nav] a.rp-tr-nav-item.is-active .mp-indicator,
.case-feature-block.hotspots-hidden [data-record-nav] .rp-tr-nav-group.is-active > a .mp-indicator,
.case-final-block.hotspots-hidden [data-record-nav] a.rp-tr-nav-item.is-active .mp-indicator,
.case-final-block.hotspots-hidden [data-record-nav] .rp-tr-nav-group.is-active > a .mp-indicator {
  display: none;
}
.rp-tr-textarea {
  width: 100%;
  min-height: 44px;
  resize: none;
  border: 1px solid #b4dbde;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 11px;
  color: #20293c;
  background: transparent;
}
.rp-tr-radio-group { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rp-tr-radio-group label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 400; color: #20293c; cursor: pointer; }
/* Fully custom-drawn radio (appearance: none) instead of relying on
   accent-color — some browsers still render a native white disc under
   an unchecked radio even with accent-color/background set, since
   those properties don't reach the native control's own paint. This
   removes the native control entirely so there is no white fill,
   checked or not. */
.rp-tr-radio-group input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1.5px solid #9aa7ab;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.rp-tr-radio-group input[type="radio"]:checked { border-color: #1597a1; }
.rp-tr-radio-group input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1597a1;
}
/* Fill triggers off the whole label's hover (not just the tiny 13px
   circle itself), since the clickable/hoverable area is the label —
   text included — not only the circle. An UNselected radio hovers to
   a solid filled circle; a SELECTED one keeps its ring-plus-dot look
   (just darkened) instead of becoming a solid disc identical to the
   unselected hover state. */
.rp-tr-radio-group label:hover input[type="radio"]:not(:checked) { background: #226979; border-color: #226979; }
.rp-tr-radio-group label:hover input[type="radio"]:checked { border-color: #226979; }
.rp-tr-radio-group label:hover input[type="radio"]:checked::after { background: #226979; }
.rp-tr-med-actions { display: flex; align-items: center; gap: 10px; }
.rp-tr-save-med-btn { font-size: 11.5px; }
/* Every solid (non-ghost) .mp-app-btn in the Patient Record component
   ("Save Medication", "Save changes", "Add a Fracture", etc.) must use
   this component's own teal, not the base .mp-app-btn default of
   var(--mp-blue) — that's Marketplace's indigo, borrowed in from the
   shared class and never overridden here the way .rp-intray already
   overrides it for the In-tray tab. Same root cause as the earlier
   "Update Demographics" button mismatch. */
/* :not(:disabled) added after a real regression: this ID-scoped rule's
   specificity beat .rp-tr-save-btn:disabled/.rp-tr-save-med-btn:disabled
   (two plain classes), so every disabled solid button in this component
   kept its teal background while only the text dimmed to the disabled
   gray — a half-disabled-looking button (teal bg + gray text), exactly
   what "Save changes" showed before this fix. */
#rpPatientRecordSection .mp-app-btn:not(.mp-app-btn-ghost):not(:disabled) { background: #1597a1; }
#rpPatientRecordSection .mp-app-btn:not(.mp-app-btn-ghost):not(:disabled):hover { background: #226979; filter: none; }
/* Belt-and-suspenders per explicit request: erase hover functionality
   entirely from every disabled button in this component (Main and
   Secondary alike). pointer-events: none means the element can never
   receive a mouse-over in the first place, so no :hover rule — found or
   not yet found — can ever fire on it, on top of the existing
   color/filter :disabled:hover cancellations above. */
#rpPatientRecordSection button:disabled,
#rpPatientRecordSection .rp-tr-clear-btn:disabled {
  pointer-events: none;
}

/* Monitor Scheduling's two dates sit in their own tinted card, same
   pattern as .rp-tr-add-med-card, per the reference recording — plain
   text directly on the (now white) accordion body read as an
   unstyled placeholder next to the other sections' cards. The 52-week
   value renders lighter/muted there since that checkpoint is still
   upcoming, vs. the 16-week one already completed. */
.rp-tr-monitor-card { display: flex; align-items: center; gap: 18px; font-size: 11px; }
.rp-tr-monitor-field { display: flex; align-items: baseline; gap: 6px; }
.rp-tr-monitor-field strong { font-size: 11px; color: #20293c; }
.rp-tr-monitor-value { border-bottom: 1px solid #c2cccc; padding: 2px 4px; color: #20293c; }
.rp-tr-monitor-value--pending { color: #9aa7ab; }

.rp-tr-history-table th { white-space: nowrap; }
/* "Actions" header text now follows the icon group's own right-alignment
   (justify-content: flex-end, set on .rp-tr-history-table .rp-tr-row-
   actions above) instead of the shared .rp-intray-mini-table th default
   of text-align: left, so the label sits directly above the icons it
   labels instead of floating at the column's left edge. */
.rp-tr-history-table th:last-child { text-align: right; }
/* Per "Rows Medication History.svg": each row is its own rounded card
   with a little vertical breathing room between rows — not a plain
   border-separated table row. border-collapse: separate + border-
   spacing (vertical only) opens that gap between rows; border-radius
   only works per-cell (browsers don't render it on <tr>), so the
   first/last cell each get the rounding on their own outer corner.
   No border/outline at all per the latest correction — the SVG's own
   filter def is a drop-shadow (feOffset 0.92/0.92, feGaussianBlur
   1.83, black at 25% alpha), not a border. Putting that shadow on
   every <td> (tried first) was wrong: each cell's own box-shadow drew
   a faint vertical line at every column boundary, since box-shadow
   paints all 4 sides of each cell's box, not just the row's outer
   edge — it read as several separate pieces, not one row. The shadow
   (and the white fill) now live on the <tr> itself instead, as one
   single shape around the whole row; border-collapse: separate makes
   <tr> a real paintable box with its own background/box-shadow/
   border-radius in current browsers. */
/* border-spacing's vertical value adds that same gap above the FIRST
   row too (and below the last), not just between rows — so any change
   to it also shifts row 1's distance from the "Medication History"
   title unless compensated. Original baseline was 6px; margin-top
   always cancels (current value - 6px) so the title-to-first-row gap
   stays fixed at its original distance regardless of row-to-row
   spacing changes. Row history: 6 -> 16 (+10, margin -10px) -> 11 (-5
   more, margin -5px). */
/* Title-to-first-row distance now matches row-to-row distance exactly
   (11px, from border-spacing) — margin-top cancels the h5's own 12px
   margin-bottom entirely (.rp-tr-med-history h5) instead of only
   partially compensating it, so nothing but border-spacing governs
   either gap. */
.rp-tr-history-table { border-collapse: separate; border-spacing: 0 11px; margin-top: -12px; }
/* Row (data) text matches the field value font-size (.rp-tr-select-wrap
   select, 11px) instead of the generic mini-table default (10.5px) —
   scoped to tbody only so the header row's own size is untouched. */
.rp-tr-history-table tbody { font-size: 11px; }
/* Backgrounds/radius live on the <td>s themselves, not the <tr> — a
   table row isn't a reliable single paint box across browsers for
   border-radius + background together, which is what caused the actual
   bugs: giving every cell its OWN full 6px radius (all 4 corners) left
   a tiny uncovered diamond at every INTERNAL column boundary (two
   adjacent rounded corners meeting), showing the page's gray background
   through as thin dividers between every column — and relying on the
   <tr>'s background to fill the row at all meant the true rightmost
   corner's fill was inconsistent, reading as square by default.
   The robust fix: every td gets an opaque white background (so the row
   reads as one continuous flush strip, no internal gaps), and ONLY the
   true outer corners get rounded — first-child's left pair, last-child's
   right pair — so cells butt together seamlessly in between. */
.rp-tr-history-table tbody tr {
  /* Kept as a fallback silhouette, but — per "Letters.svg" — the real,
     guaranteed-visible shadow now also lives directly on the first/last
     td below, since a tr's own box-shadow isn't painted reliably at the
     row's true right edge in every browser. Without it, the last column
     (Edit/Actions) read as an abrupt flat/square cut instead of matching
     the source's soft, evenly-wrapped rounded-shadow edge. */
  box-shadow: 0.92px 0.92px 3.67px rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.rp-tr-history-table tbody td { background: #fff; }
.rp-tr-history-table tbody td:first-child {
  border-radius: 6px 0 0 6px;
  box-shadow: 0.92px 0.92px 3.67px rgba(0, 0, 0, 0.25);
  /* Clips anything inside this cell (notably the Actions icons' own
     white hover-highlight boxes) to the cell's own rounded shape, so a
     hovered icon's square-ish corner can never poke past the row's
     intended rounded edge and read as a "cut" notch. */
  overflow: hidden;
}
.rp-tr-history-table tbody td:last-child {
  border-radius: 0 6px 6px 0;
  box-shadow: 0.92px 0.92px 3.67px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
/* Per the reference recording, history rows DO get a hover highlight —
   overrides the generic .rp-intray-mini-table "no hover, static data"
   convention just for this table. Set on every td (not just the row)
   since default fill now also lives on the td, which would otherwise
   paint over and hide a tr-only hover color. */
.rp-tr-history-table tbody tr:hover td { background: #dde5e5; }
/* Per the newer reference recording: hovering EITHER action icon (not
   the row itself) shows its own white, rounded, drop-shadowed button
   behind just that icon. Padding/radius are always reserved (so
   nothing shifts position on hover) but background/shadow only paint
   on :hover; .rp-tr-row-actions' own gap (set further below, near
   .rp-tr-comment-cell) is trimmed to match since each icon's box is
   now visually wider than the bare 13px glyph. */
/* The Actions column (24% width in Letters History) is much wider than
   its icon group needs, so the icons were sitting flush against the
   column's LEFT edge with a big empty gap before the table's real right
   edge, instead of landing at that right edge with the same 8px gap
   every other column's content keeps from its own edge. justify-content:
   flex-end pushes the icon group to the cell's right inner edge, which —
   since the cell keeps the shared .rp-intray-mini-table td padding:
   6px 8px — lines it up with that same 8px gap from the table's edge. */
.rp-tr-history-table .rp-tr-row-actions { justify-content: flex-end; }
.rp-tr-history-table .rp-tr-row-actions svg {
  /* Tripled from the original 13px (to 39px), reduced 50% (to
     19.5px), then increased 30% (to 25.35px). */
  padding: 5px;
  width: 25.35px;
  height: 25.35px;
  border-radius: 2px;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rp-tr-history-table .rp-tr-row-actions svg:hover {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.rp-tr-sort { width: 14px; height: 14px; margin-left: 3px; vertical-align: middle; }
.rp-tr-comment-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 1px;
}
.rp-tr-row-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.rp-tr-row-actions svg { width: 13px; height: 13px; cursor: pointer; }

/* Flat data table (Patient Summary's "Fracture Information" and
   "Treatment Information" sub-tables): per the source SVG these rows are
   plain text with TIGHT line spacing (pixel-measured off the source
   raster: ~17px row-to-row pitch at 11px text — essentially just the
   line-height, almost no added padding), NOT the rounded soft-shadow
   cards .rp-tr-history-table uses elsewhere (DXA History, Letters
   History, etc.), and NOT stretched to the accordion's full width —
   the source table itself is only ~540-600px wide, left-aligned, with
   the accordion's own #f5f7fc tint showing through as plain background
   (no white card) and a lot of empty space to the right. Column widths
   below are the measured pixel boundaries, not guessed percentages. */
/* Patient Summary's "Fracture Information" / "Treatment Information"
   accordions have no card chrome at all in the source — no border, no
   white fill, no shadow, just the shared #f5f7fc tint flowing seamlessly
   from header into body as one soft rounded box. The base
   .rp-intray-accordion (white + 1px border) and .rp-tr-accordion's own
   white-header override (meant for the Treatment Recommendation panel's
   white-card sections) both fought this — overriding both here, scoped
   to just these two sections via .rp-tr-flat-accordion. */
.rp-tr-flat-accordion { background: #f5f7fc; border: none; }
.rp-tr-flat-accordion .rp-intray-accordion-head { background: transparent; }
.rp-tr-flat-table { border-collapse: collapse; width: auto; table-layout: fixed; }
.rp-tr-flat-table th { white-space: nowrap; }
.rp-tr-flat-table tbody { font-size: 11px; line-height: 1.3; }
.rp-tr-flat-table td, .rp-tr-flat-table th { padding: 1.5px 22px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.rp-tr-flat-table td:first-child, .rp-tr-flat-table th:first-child { padding-left: 0; }
/* Additional Comments column (last column): there's enough room in the
   panel for the full generated sentence on one line, so it stays nowrap
   like the other columns (no ellipsis truncation needed) — the column
   is simply widened in each table's own colgroup to fit its longest row. */
.rp-tr-flat-table td:last-child, .rp-tr-flat-table th:last-child { padding-right: 0; }
/* "Current" column: real check/X icons (per "Check icon.svg"/"X Icon.svg"),
   centered under the "Current" header rather than left-aligned like the
   other columns — the glyphs are small (5x5) so they need an explicit
   box to center within. */
.rp-tr-flat-table .rp-tr-current-cell { text-align: center; }
.rp-tr-flat-table .rp-tr-current-cell svg { width: 9px; height: 9px; vertical-align: middle; }
/* Thin teal rule between the Anti-Osteoporosis Medication and Calcium and
   Vitamin D Supplementation sub-tables, matching the source's section
   divider (distinct from the accordion's own black title underline). */
.rp-tr-med-history + .rp-tr-med-history { margin-top: 14px; padding-top: 14px; border-top: 1px solid #1597a1; }

/* ---------- Patient Summary screen ---------- */
/* Per the source SVG ("Patient Summary-e93f44fa"), the phone/email/
   clinician infobar and the three summary cards all sit INSIDE one
   light-gray rounded container (#f5f7fc) — the cards themselves are
   white, not gray, and they don't stretch to fill the row (there's
   visible empty container space after "General Note"). The old
   version had no outer container and instead put the gray fill on
   each card directly, with cards flex-stretching edge to edge —
   restructured below to match the real design. */
/* Three-layer background stack, per correction: screen (.rp-tr-main's
   own #f5f7fc) -> this white layer, giving the whole Patient Summary
   body visual separation from the page -> each individual section's own
   #f5f7fc tint (cards, Fracture Information, Treatment Information)
   sitting on top of that white. Without this middle layer, the
   sections' #f5f7fc tint had nothing to contrast against but the
   page's own #f5f7fc, and read as invisible. */
.rp-ps-white-layer { background: #fff; border-radius: 10px; padding: 16px; }
/* No padding of its own — it was stacking on top of .rp-ps-cards' own
   16px padding, insetting the cards' #f5f7fc box far more than Fracture
   Information's (which sits directly in .rp-ps-white-layer with only
   that single 16px inset). Removing it here makes both sections' gray
   boxes align flush to the same left/right edge. */
.rp-ps-summary-box { margin-bottom: 16px; }
.rp-ps-infobar { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 11px; color: #20293c; margin-bottom: 17px; }
.rp-ps-infobar strong { color: #1597a1; font-weight: 700; }
/* Card widths measured directly off the source SVG's pixel geometry
   (edge-detected white-card vs. #f5f7fc-container boundaries): ~161px /
   210px / 217px — "General Note" is NOT the widest card, it's roughly
   the same width as "Medication"; the row deliberately stops well short
   of the container's full width, leaving the gray background visible to
   the right rather than stretching to fill it. */
/* Same #f5f7fc section-background treatment as Fracture Information /
   Treatment Information further down: the cards row is its own tinted
   rounded box (white cards sitting on top of it), not bare on the white
   layer like the infobar above it. */
/* Per the reference design, all 3 cards share one equal height (the
   row's default align-items: stretch), and each card is itself a flex
   column so its shorter content doesn't just clump at the top leaving a
   blank gap below — instead the bottom element (meta row / note box) is
   pushed down to the card's own bottom padding via margin-top:auto /
   flex-grow, so the extra height from stretching reads as intentional
   internal spacing, matching the design, not a layout bug. */
.rp-ps-cards { display: flex; gap: 11px; flex-wrap: wrap; background: #f5f7fc; border-radius: 10px; padding: 16px; }
.rp-ps-card { display: flex; flex-direction: column; flex: 0 0 auto; width: 170px; background: #fff; border-radius: 3px; padding: 10px; box-shadow: 0 1px 3px rgba(32, 41, 60, 0.06); }
.rp-ps-card--medication { width: 210px; }
.rp-ps-card--note { width: 210px; }
.rp-ps-card h5 { font-size: 12px; font-weight: 700; color: #20293c; margin: 0 0 10px; }
.rp-ps-days-box { display: inline-block; border: 1px solid #d24b4b; border-radius: 3px; padding: 6px 14px; margin-bottom: 10px; }
.rp-ps-days-num { font-size: 20px; font-weight: 700; color: #d24b4b; line-height: 1.1; }
.rp-ps-days-label { font-size: 10px; color: #20293c; }
.rp-ps-med-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-ps-med-pill { background: #b4dbde; color: #20293c; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.rp-ps-med-date { font-size: 11px; color: #20293c; white-space: nowrap; flex-shrink: 0; }
/* Meta row icons are plain dark-navy outline glyphs (chain-link, hourglass)
   with a thin vertical divider between entries, not the "∞ / ⏳" emoji
   characters + bare gap used before. */
.rp-ps-med-meta { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: #20293c; white-space: nowrap; margin-top: auto; }
.rp-ps-med-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.rp-ps-med-meta svg { width: 11px; height: 11px; flex-shrink: 0; }
/* The "1st Line"/"10 years" labels sit slightly above visual center
   next to their icon despite align-items: center — text line-boxes
   don't optically center the same way an icon's own bounding box does.
   Nudging the label down 1px matches the reference's icon/text
   alignment without touching the icon itself. */
.rp-ps-med-meta-label { position: relative; top: 1px; }
.rp-ps-med-meta-divider { width: 1px; height: 12px; background: #c2cccc; flex-shrink: 0; }
.rp-ps-card .rp-fls-pill { white-space: nowrap; flex-shrink: 0; }
/* Equal padding: 10px matches the gap between the "General Note" title
   and the card's own top edge (card padding-top), so the text box reads
   as evenly inset on all sides, not tighter at the bottom. */
.rp-ps-note { flex: 1; background: #fff; border: 1px solid #b4dbde; border-radius: 8px; padding: 10px; font-size: 11px; line-height: 1.4; color: #20293c; min-height: 44px; box-sizing: border-box; }

/* ---------- Empty-state (history tables with no rows yet) ---------- */
/* Per "Empty state.svg": a two-page document glyph (back page tilted
   and lightly tinted, front page with a folded top-right corner and
   three text-line strokes, "motion" dashes trailing left to suggest
   the page sliding in) in this component's teal, with bold dark-navy
   label text below it — not the plain gray single-folder outline +
   muted caption used before. */
.rp-tr-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 0; color: #20293c; font-size: 12px; font-weight: 700; }
.rp-tr-empty-state svg { width: 34px; height: 29px; }

/* ---------- Simple sub-section header (e.g. "BMI Calculation", "Family Medical History") used inside a field-grid section without a full collapsible accordion ---------- */
.rp-tr-subsection-title { font-size: 12px; font-weight: 700; color: #20293c; margin: 14px 0 8px; }
.rp-tr-subsection-title:first-child { margin-top: 0; }
.rp-tr-mark-normal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-tr-mark-normal-row span { font-size: 11px; color: #20293c; }

@media (max-width: 900px) {
  .rp-tr-shell { flex-direction: column; }
  .rp-tr-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eceef3; }
}

/* ---------- Case study — REAL plus: Reflection & Impact ---------- */
.case-reflection-card {
  border: 1.5px solid var(--case-accent, #1597a1);
  border-radius: 20px;
  padding: 34px;
}

.case-reflection-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.case-reflection-list li {
  position: relative;
  padding-left: 26px;
  font-size: 20px;
  line-height: 1.65;
  color: var(--color-black);
}

.case-reflection-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--case-accent, #1597a1);
}

/* =========================================================================
   SecondOpinions case study — coded UI components (replace screenshot crops)
   Namespaced with "so-" to avoid collisions with shared classes.
   Brand blue #4e59a4 already used as --case-accent-secondopinions.
   ========================================================================= */

.so-block {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #ffffff;
  max-width: 1300px;
  margin: 20px 0 32px;
  /* Style guide: component-reproduction text uses --component-font, not
     the portfolio's own --font-family. Set on the shared wrapper so
     every .so-block instance (Old/New Website Design mockups, and the
     Design System showcase's .so-block-inner instances) inherits it. */
  font-family: var(--component-font);
}

.so-block-inner { padding: 20px 22px; }

/* The Design System showcase's groups (Icons, Credit Cards, Buttons,
   Elements, Fields, Cards) reuse .so-block/.so-block-inner only to inherit
   --component-font consistently — the spec has these sections sitting
   directly on the page background with no white card, shadow, rounded
   corners, or padding box around them. That box styling is correct for
   .so-block's other job (the Old/New Website Design browser-window
   mockups), so it's stripped back out here rather than removed from the
   shared class, scoped to #design-system only. */
#design-system .so-block {
  border-radius: 0;
  box-shadow: none;
  background: none;
  max-width: none;
  margin: 20px 0 0;
}

#design-system .so-block-inner {
  padding: 0;
}

/* ---------- browser chrome ---------- */
.so-browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef0f4;
  padding: 8px 14px;
  border-bottom: 1px solid #e2e5ec;
}
.so-browser-dots { display: flex; gap: 5px; }
.so-browser-dots span { width: 8px; height: 8px; border-radius: 50%; background: #cfd3dc; display: block; }
.so-browser-url {
  flex: 1;
  background: #fff;
  border: 1px solid #dfe2e8;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 11.5px;
  color: #6b7280;
}

/* ---------- old site top nav ---------- */
.so-old-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid #eef0f4;
}
.so-old-logo { display: flex; align-items: center; gap: 8px; letter-spacing: 0.01em; }
.so-old-logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.so-old-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.so-old-logo-line1 { font-weight: 800; font-size: 14px; color: #2644b6; }
.so-old-logo-line2 { font-weight: 800; font-size: 14px; color: #bf1444; }
.so-old-logo-sub { font-weight: 600; font-size: 7px; color: #8892a8; letter-spacing: 0.06em; margin-top: 1px; }
.so-old-nav-right { display: flex; align-items: center; gap: 22px; font-size: 12.5px; color: #4b5568; flex-wrap: wrap; }
.so-old-nav-links { display: flex; gap: 18px; font-size: 12.5px; color: #33415c; }
.so-old-nav-links a { color: inherit; }
.so-old-nav-links a.active { color: var(--case-accent, #4e59a4); font-weight: 700; }
.so-old-auth a { color: var(--case-accent, #4e59a4); }
.so-old-auth a + a { margin-left: 12px; }

/* ---------- old hero (photo bg + form panel) ---------- */
.so-old-hero { position: relative; display: flex; }
.so-old-hero-photo {
  flex: 1 1 62%;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.so-old-hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,45,90,0.55), rgba(30,45,90,0.25)); }
.so-old-hero-text { position: relative; z-index: 1; color: #fff; padding: 22px 26px 26px; max-width: 420px; }
.so-old-hero-text h3 { font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.so-old-hero-text p { font-size: 13.5px; margin: 0 0 16px; opacity: 0.95; line-height: 1.5; }
.so-old-cta { background: #f0a83a; color: #1a2a5e; border: none; padding: 10px 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; border-radius: 3px; }
.so-old-hero-form { flex: 1 1 38%; background: #677697; color: #fff; padding: 24px 26px; min-width: 240px; }
.so-old-hero-form h4 { font-size: 15px; margin: 0 0 4px; font-weight: 700; }
.so-old-hero-form p { font-size: 11.5px; margin: 0 0 14px; opacity: 0.85; line-height: 1.5; }
.so-old-select, .so-old-textarea {
  width: 100%;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.65);
  border-radius: 6px;
  color: #fff;
  padding: 9px 34px 9px 12px;
  font-size: 12.5px;
  margin-bottom: 10px;
  font-family: inherit;
  box-sizing: border-box;
}
.so-old-textarea {
  min-height: 54px;
  resize: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14' fill='none' stroke='%23ffffff' stroke-width='1.6'%3E%3Crect x='9' y='2' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top 10px right 12px;
}
.so-old-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center right 12px;
}
.so-old-or {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 4px auto 10px;
  border: 1.5px solid rgba(255,255,255,0.75);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.so-old-hero-form .so-old-cta { width: 100%; }
.so-old-hero-links { display: flex; gap: 10px; font-size: 11px; margin-top: 12px; opacity: 0.85; }
.so-old-hero-links a { color: #fff; text-decoration: underline; }

/* ---------- old specialty photo strip ---------- */
.so-old-specialty-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.so-old-specialty-card { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.so-old-specialty-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-old-specialty-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.72), rgba(0,0,0,0));
  color: #fff; font-size: 14px; font-weight: 800; text-align: center; padding: 26px 4px 10px;
  line-height: 1.25;
}
.so-old-specialty-card figcaption span { display: block; font-weight: 500; font-size: 10.5px; opacity: 0.95; margin-top: 2px; }

/* ---------- old-site "we are here" chat widget badge (decorative, matches reference) ---------- */
.so-old-chat-badge {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}
.so-old-chat-wave { font-size: 15px; transform: rotate(-10deg); }
.so-old-chat-label {
  font-size: 9px;
  font-weight: 700;
  color: #2f6fd6;
  letter-spacing: 0.01em;
  max-width: 46px;
  line-height: 1.15;
  text-align: right;
}
.so-old-chat-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #6c2eb5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}

/* ---------- pricing table (old radiology) ---------- */
.so-pricing-wrap { padding: 22px; }
.so-pricing-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.so-pricing-table th { text-align: right; font-weight: 600; color: #4b5568; padding: 10px 14px; font-size: 12px; }
.so-pricing-table td { padding: 10px 14px; border-top: 1px solid #eef0f4; color: #1a2a5e; }
.so-pricing-table td.price { text-align: right; color: #4b5568; }
.so-pricing-table td.action { text-align: right; }
.so-order-btn { background: #f0a83a; color: #1a2a5e; border: none; padding: 8px 20px; font-size: 11.5px; font-weight: 700; border-radius: 3px; letter-spacing: 0.02em; }

/* ---------- old medical form (5-step stepper + fields) ---------- */
.so-old-stepper { display: flex; }
.so-old-step { flex: 1; padding: 10px 16px; font-size: 11.5px; font-weight: 700; color: #fff; background: #8fa3d6; }
.so-old-step span { display: block; font-weight: 400; font-size: 11px; opacity: 0.9; }
.so-old-step.is-current { background: #f0a83a; }
.so-old-form-body { padding: 26px; background: #f4f5f8; }
.so-old-form-body h4 { font-size: 19px; margin: 0 0 4px; border-bottom: 2px solid #1a2a5e; display: inline-block; padding-bottom: 6px; }
.so-old-required-note { text-align: right; font-size: 11px; font-style: italic; color: #d24b4b; margin: -18px 0 12px; }
.so-old-form-intro { font-size: 12.5px; color: #4b5568; margin: 0 0 18px; }
.so-old-fieldset-label { font-size: 13px; font-weight: 700; color: #1a2a5e; margin: 16px 0 10px; }
.so-old-field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.so-old-field { flex: 1; min-width: 150px; }
.so-old-field label { display: block; font-size: 11.5px; color: #4b5568; margin-bottom: 5px; }
.so-old-field input, .so-old-field select, .so-old-field textarea {
  width: 100%; border: 1px solid #d7dbe4; border-radius: 3px; padding: 8px 10px; font-size: 12.5px; font-family: inherit; color: #1a2a5e; background: #fff;
}
.so-old-field textarea { min-height: 48px; resize: vertical; }
.so-old-checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 20px; margin-bottom: 16px; }
.so-old-checkbox-grid label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #33415c; }
.so-old-checkbox-grid input { margin: 0; }

/* ---------- new site device mockup (laptop + phone) ---------- */
.so-device-mockup { position: relative; padding: 30px 10px 10px; display: flex; justify-content: center; }
.so-laptop { width: 100%; max-width: 900px; border-radius: 10px 10px 0 0; overflow: hidden; box-shadow: 0 20px 50px rgba(20,30,60,0.18); border: 8px solid #1c2333; border-bottom: none; background: #1c2333; }
.so-laptop-base { max-width: 940px; height: 16px; margin: 0 auto; background: linear-gradient(#dfe2e8, #b9bfca); border-radius: 0 0 10px 10px; position: relative; }
.so-phone { position: absolute; right: 4%; bottom: -6px; width: 220px; border: 7px solid #1c2333; border-radius: 26px; overflow: hidden; box-shadow: 0 16px 40px rgba(20,30,60,0.22); background: #fff; }
.so-phone-notch { height: 18px; background: #1c2333; position: relative; }
.so-phone-notch::after { content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 60px; height: 8px; border-radius: 6px; background: #000; }
@media (max-width: 900px) {
  .so-phone { display: none; }
}

/* ---------- new site navbar ---------- */
.so-navbar-topbar { background: linear-gradient(90deg, #4e59a4, #6672c2); color: #fff; font-size: 10px; padding: 5px 18px; display: flex; justify-content: flex-end; gap: 18px; }
.so-navbar-topbar span { display: flex; align-items: center; gap: 5px; opacity: 0.95; }
.so-navbar-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 18px; background: #fff; flex-wrap: wrap; }
.so-navbar-logo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12px; color: #1a2a5e; }
.so-navbar-logo .dot { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(from 90deg, #d30b59, #4e59a4, #d30b59, #4e59a4); flex-shrink: 0; }
.so-navbar-links { display: flex; gap: 16px; font-size: 10.5px; font-weight: 700; color: #1a2a5e; flex-wrap: wrap; }
.so-navbar-cta { background: #4e59a4; color: #fff; border: none; padding: 8px 14px; font-size: 10px; font-weight: 700; border-radius: 5px; white-space: nowrap; }

/* ---------- new site hero ---------- */
.so-hero-new { display: flex; align-items: center; gap: 20px; padding: 22px 18px; background: #fff; flex-wrap: wrap; }
.so-hero-new-text { flex: 1 1 320px; }
.so-hero-new-text h3 { font-size: 22px; line-height: 1.3; margin: 0 0 10px; color: #1a2a5e; font-weight: 800; }
.so-hero-new-text h3 em { font-style: normal; color: #4e59a4; }
.so-hero-new-text p { font-size: 13px; color: #33415c; line-height: 1.5; margin: 0 0 16px; }
.so-hero-new-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.so-btn-primary { background: #4e59a4; color: #fff; border: none; padding: 10px 18px; font-size: 11px; font-weight: 700; border-radius: 5px; letter-spacing: 0.02em; }
.so-btn-outline { background: #fff; color: #4e59a4; border: 1.5px solid #4e59a4; padding: 10px 18px; font-size: 11px; font-weight: 700; border-radius: 5px; }
.so-hero-new-media { flex: 1 1 240px; min-width: 200px; border-radius: 16px; overflow: hidden; position: relative; }
.so-hero-new-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0; background: #fff; }
.so-carousel-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d7dbe4; }
.so-carousel-dots span.is-active { background: #4e59a4; }

/* ---------- popular services cards ---------- */
.so-services-band { background: #f3f7ff; padding: 26px 18px; text-align: center; }
.so-services-band h4 { font-size: 19px; margin: 0 0 4px; color: #1a2a5e; }
.so-services-band .sub { font-size: 12.5px; color: #4b5568; margin: 0 0 18px; }
.so-services-band .sub-underline { width: 44px; height: 2px; background: #d30b59; margin: 8px auto 20px; }
.so-service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; text-align: left; max-width: 1100px; margin: 0 auto; }
.so-service-card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.so-service-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.so-service-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #4e59a4; }
.so-service-icon svg { width: 20px; height: 20px; }
.so-service-card-top .price { font-size: 12px; color: #4b5568; }
.so-service-card-top .price b { color: #1a2a5e; }
.so-service-card h5 { font-size: 14.5px; margin: 0 0 6px; color: #1a2a5e; }
.so-service-card .u { width: 22px; height: 2px; background: #d30b59; margin-bottom: 8px; }
.so-service-card p { font-size: 12px; color: #4b5568; line-height: 1.5; margin: 0 0 8px; }
.so-service-card .read-more { font-size: 12px; color: #4e59a4; margin-bottom: 12px; }
.so-service-card .so-btn-primary { align-self: flex-start; margin-top: auto; }

/* ---------- 5-step numbered stepper (new medical form) ---------- */
.so-stepper-v2 { display: flex; align-items: flex-start; padding: 24px 22px 4px; gap: 4px; }
.so-stepper-v2-step { display: flex; flex-direction: column; align-items: center; flex: 1; font-size: 11px; color: #9aa2b1; text-align: center; }
.so-stepper-v2-step .num { width: 30px; height: 30px; border-radius: 50%; background: #d7dbe4; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.so-stepper-v2-step.is-done .num, .so-stepper-v2-step.is-current .num { background: #4e59a4; }
.so-stepper-v2-step.is-done, .so-stepper-v2-step.is-current { color: #1a2a5e; font-weight: 600; }
.so-stepper-v2-connector { flex: 0.6; height: 2px; background: #d7dbe4; margin-top: 15px; }
.so-stepper-v2-connector.is-done { background: #4e59a4; }

.so-form-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow-card); margin: 16px 22px; padding: 18px 20px; }
.so-form-card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: #1a2a5e; margin-bottom: 4px; }
.so-form-card-head .ic { width: 24px; height: 24px; border-radius: 50%; background: #eaf0ff; color: #4e59a4; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.so-form-card-head .ic svg { width: 13px; height: 13px; }
.so-form-underline { width: 24px; height: 2px; background: #d30b59; margin: 6px 0 10px; }
.so-form-card p.note { font-size: 12.5px; color: #4b5568; line-height: 1.5; margin: 0; }
.so-form-card .label-sm { font-size: 12px; color: #4b5568; margin-bottom: 8px; }
.so-select-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid #d7dbe4; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #1a2a5e; }
.so-select-row .price { color: #4b5568; font-size: 12px; }
.so-old-form-body .so-old-field-row.tight { margin-bottom: 0; }

/* ---------- radiology internal page banner ---------- */
.so-radiology-banner { position: relative; background: linear-gradient(120deg, #4e59a4, #6672c2); padding: 34px 26px; text-align: center; overflow: hidden; }
.so-radiology-banner h3 { color: #fff; font-size: 26px; margin: 0; font-weight: 800; position: relative; z-index: 1; }
.so-breadcrumb { padding: 10px 22px; font-size: 11.5px; color: #4e59a4; background: #f7f8fc; }
.so-breadcrumb span { color: #9aa2b1; margin: 0 4px; }
.so-radiology-body { display: flex; gap: 20px; padding: 20px 22px; flex-wrap: wrap; }
.so-radiology-info { flex: 1.3 1 320px; }
.so-radiology-info-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: #1a2a5e; margin-bottom: 4px; }
.so-radiology-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.so-radiology-list li { position: relative; padding-left: 16px; font-size: 12.5px; color: #33415c; line-height: 1.55; }
.so-radiology-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: #4e59a4; }
.so-radiology-list a { color: #4e59a4; font-size: 12px; display: inline-block; margin-top: 2px; }
.so-radiology-media { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.so-radiology-media img { width: 100%; border-radius: 10px; display: block; }
.so-imaging-select-row { display: flex; gap: 12px; padding: 0 22px 22px; flex-wrap: wrap; }

/* ---------- site map tree ---------- */
/* Rebuilt as live HTML (was a static <img> of sitemap-diagram.svg) so it
   can carry the exact same reveal-on-scroll animation as REAL plus's Site
   Map (.rp-sitemap): both share the .in-view + nth-child transition-delay
   mechanism below, driven by the same IntersectionObserver in script.js —
   only the box shapes/colors differ, matching this page's own rounder,
   pill-style root boxes and var(--case-accent) (Second Opinions' own
   blue-violet) instead of REAL plus's rectangular teal boxes. */
.so-sitemap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
  padding: 8px 0 24px;
}
.so-sitemap-col {
  display: flex;
  flex-direction: column;
}
.so-sitemap-root {
  background: var(--case-accent, #425cc7);
  color: #fff;
  text-align: center;
  padding: 11px 26px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.so-sitemap-branches {
  position: relative;
  margin-top: 18px;
  margin-left: 20px;
  display: grid;
  grid-template-columns: max-content;
  row-gap: 16px;
}
.so-sitemap-branches::before {
  content: "";
  position: absolute;
  left: 0;
  top: -18px;
  bottom: 17px;
  width: 1px;
  background: #25282b;
}
.so-sitemap-leaf {
  position: relative;
  margin-left: 32px;
  border: 1px solid #25282b;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #25282b;
  white-space: nowrap;
}
.so-sitemap-leaf::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 32px;
  height: 1px;
  background: #25282b;
}
.so-sitemap-leaf::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #25282b;
  transform: translate(-50%, -50%);
}

/* ---------- design system: icon size row + credit card badges ---------- */
.so-icon-size-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.so-icon-size-item { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #4e59a4; }
.so-icon-size-item span { font-size: 10px; color: var(--color-muted); }
.so-cc-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.so-cc-group h5 { font-size: 12px; color: var(--color-muted); margin: 0 0 8px; }
.so-cc-badges { display: flex; gap: 8px; }
.so-cc-badge { width: 46px; height: 30px; border-radius: 4px; border: 1px solid #e2e5ec; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; letter-spacing: -0.02em; }
.so-cc-badge.visa { color: #1a1f71; }
.so-cc-badge.amex { background: #2557a8; color: #fff; }
.so-cc-badge.diners svg { display: block; }
.so-cc-badge.mc { background: linear-gradient(90deg, #eb001b 50%, transparent 50%), radial-gradient(circle at 65% 50%, #f79e1b 40%, transparent 41%); position: relative; }
.so-cc-badge.mc::before, .so-cc-badge.mc::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; top: 50%; transform: translateY(-50%); }
.so-cc-badge.mc::before { background: #eb001b; left: 10px; }
.so-cc-badge.mc::after { background: #f79e1b; opacity: 0.85; left: 18px; }

/* ---------- design system: button specimen grid ---------- */
/* flex + content-sized columns, not a stretching grid: with only 2-3
   groups per row, an auto-fit/1fr grid stretched each column to an equal
   fraction of the full ~1300px container, spreading compact button groups
   apart with huge empty gaps between them. Columns should hug their own
   content and sit close together, wrapping only when they run out of
   row width. */
.so-btn-specimen-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; margin-bottom: 8px; }
.so-btn-specimen-col { flex: 0 1 auto; }
.so-btn-specimen-col h5 { font-size: 12.5px; font-weight: 600; color: var(--color-muted); margin: 0 0 12px; }
.so-btn-specimen-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.so-btn-specimen-item { text-align: left; }
.so-btn-specimen-item span.lbl { display: block; font-size: 10.5px; color: var(--color-muted); margin-bottom: 6px; }
.so-spec-btn { font-family: inherit; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; border-radius: 5px; padding: 10px 18px; border: 1.5px solid transparent; display: inline-flex; align-items: center; gap: 8px; }
.so-spec-btn.filled { background: #4e59a4; color: #fff; }
.so-spec-btn.filled.disabled { background: #d8d8d8; color: #9aa2b1; }
.so-spec-btn.filled.hover { background: #a5c5ed; color: #33415c; }
.so-spec-btn.ghost { background: #fff; border-color: #4e59a4; color: #4e59a4; }
.so-spec-btn.ghost.disabled { border-color: #d8d8d8; color: #d8d8d8; }
.so-spec-btn.ghost.hover { background: #a5c5ed; border-color: #a5c5ed; color: #33415c; }
.so-spec-btn.circle { width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center; border-color: #a5c5ed; color: #4e59a4; }
.so-spec-btn.circle.filled { background: #4e59a4; border-color: #4e59a4; color: #fff; }
.so-spec-btn.circle.disabled { border-color: #e2e5ec; color: #d8d8d8; }
.so-spec-btn.chatbot { background: #4e59a4; color: #fff; border-radius: 20px; position: relative; }
.so-spec-btn.chatbot .badge { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #d24b4b; }
.so-spec-btn svg { width: 14px; height: 14px; }

/* ---------- design system: elements specimen ---------- */
.so-el-group { margin-bottom: 26px; }
.so-el-group h5 { font-size: 15px; margin: 0 0 12px; color: #1a2a5e; }
.so-el-row { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.so-el-item { text-align: left; }
.so-el-item span.lbl { display: block; font-size: 10.5px; color: var(--color-muted); margin-bottom: 6px; }
.so-el-link { color: #425cc7; font-size: 13px; }
.so-el-link.big { font-size: 16px; font-weight: 700; }
.so-el-breadcrumb { font-size: 13px; color: #425cc7; }
.so-el-breadcrumb b { color: #1a2a5e; }
.so-el-radio, .so-el-checkbox { width: 18px; height: 18px; border: 1.5px solid #425cc7; display: inline-flex; align-items: center; justify-content: center; }
.so-el-radio { border-radius: 50%; }
.so-el-checkbox { border-radius: 3px; }
.so-el-radio.hover, .so-el-checkbox.hover { background: #a5c5ed; }
.so-el-radio.checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1a2a5e; }
.so-el-checkbox.checked, .so-el-checkbox.checked-disabled { background: #1a2a5e; border-color: #1a2a5e; }
.so-el-checkbox.checked-disabled { background: #9aa2b1; border-color: #9aa2b1; }
.so-el-radio.error, .so-el-checkbox.error { border-color: #d24b4b; }
.so-el-checkbox svg, .so-el-radio svg { width: 11px; height: 11px; color: #fff; }
.so-el-tab { text-align: center; font-size: 13px; font-weight: 700; color: #425cc7; padding-bottom: 10px; border-bottom: 2px solid #425cc7; min-width: 140px; }
.so-el-tab.deactive { color: #b9bfca; border-color: #e2e5ec; font-weight: 400; }
.so-el-tab.hover { background: #4e59a4; color: #fff; border: none; padding: 14px; border-radius: 4px; }
.so-toast { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12.5px; padding: 12px 16px; border-radius: 6px; max-width: 320px; }
.so-toast.positive { background: #d24b4b; }
.so-toast.negative { background: #1a932e; }
.so-toast .x { margin-left: auto; opacity: 0.9; }
.so-toast svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- design system: field specimens (password / coupon) ---------- */
.so-field-specimen { margin-bottom: 22px; }
.so-field-specimen .lbl { font-size: 11px; color: var(--color-muted); margin: 0 0 6px; }
.so-field-specimen .field-label { font-size: 13.5px; font-weight: 700; color: #1a2a5e; margin: 0 0 8px; }
.so-pw-field { display: flex; align-items: center; justify-content: space-between; border: 1.5px solid #d7dbe4; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #9aa2b1; max-width: 480px; }
.so-pw-field.focused { border-color: #4e59a4; }
.so-pw-field.filled, .so-pw-field.error { color: #1a2a5e; }
.so-pw-field.error { border-color: #d24b4b; }
.so-pw-field.hover { background: #eef1fa; }
.so-pw-field .cursor { color: #4e59a4; font-weight: 400; }
.so-pw-field svg { width: 16px; height: 16px; color: #33415c; flex-shrink: 0; }
.so-field-help { font-size: 12px; color: #4e59a4; margin: 6px 0 0; max-width: 480px; }
.so-field-help.error { color: #d24b4b; text-align: right; }
.so-coupon-field { display: flex; border: 1.5px solid #d7dbe4; border-radius: 8px; overflow: hidden; max-width: 400px; }
.so-coupon-field.focused { border-color: #4e59a4; }
.so-coupon-field.error { border-color: #d24b4b; }
.so-coupon-field input.cursor-only { color: #4e59a4; }
.so-coupon-field input { flex: 1; border: none; padding: 12px 16px; font-size: 13px; font-family: inherit; color: #1a2a5e; outline: none; }
.so-coupon-field button { background: #4e59a4; color: #fff; border: none; padding: 0 18px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }

/* ---------- design system: card specimens (services / consultation / contact) ---------- */
.so-ds-card-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.so-ds-card-col { flex: 1 1 240px; }
.so-ds-card-col .lbl { font-size: 10.5px; color: var(--color-muted); margin: 0 0 8px; }
.so-consult-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-card); padding: 14px 16px; }
.so-consult-card.selected { background: #4e59a4; color: #fff; box-shadow: none; }
.so-consult-card .title { font-size: 13.5px; font-weight: 700; margin: 0 0 4px; }
.so-consult-card .u { width: 22px; height: 2px; background: #d30b59; margin-bottom: 8px; }
.so-consult-card .row { display: flex; align-items: center; justify-content: space-between; }
.so-consult-card .price { font-size: 14px; font-weight: 700; }
.so-consult-card .see-sample { font-size: 11.5px; color: #a5c5ed; display: block; margin-bottom: 8px; }
.so-consult-card.selected .see-sample { color: #cadbee; }
.so-consult-card:not(.selected) .see-sample { color: #4e59a4; }
.so-pick-btn { border: none; background: #4e59a4; color: #fff; font-size: 11.5px; font-weight: 700; padding: 7px 16px; border-radius: 5px; }
.so-consult-card.selected .so-pick-btn { background: #a5c5ed; color: #33415c; }
.so-contact-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.so-contact-card.selected { background: #4e59a4; color: #fff; }
.so-contact-card .ic { width: 34px; height: 34px; border-radius: 50%; background: #4e59a4; color: #fff; display: flex; align-items: center; justify-content: center; }
.so-contact-card.selected .ic { background: rgba(255,255,255,0.2); }
.so-contact-card .ic svg { width: 16px; height: 16px; }
.so-contact-card .row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.so-contact-card .row b { font-weight: 700; }
.so-contact-card .u { width: 22px; height: 2px; background: #d30b59; }

@media (max-width: 720px) {
  .so-old-hero { flex-direction: column; }
  .so-old-specialty-row { grid-template-columns: repeat(3, 1fr); }
  .so-old-checkbox-grid { grid-template-columns: 1fr 1fr; }
  .so-radiology-body { flex-direction: column; }
}

/* ---------- REAL plus: Design System component showcase ----------
   Parallel to Marketplace's .mp-* design-system components (.mp-ds-btn,
   .mp-icon-chip, .mp-check-box, .mp-radio-dot, .mp-field, etc.) but with
   REAL+'s own palette (Turquoise #1597a1 / Dark Turquoise #226979 /
   Black #20293c) instead of Marketplace's hardcoded --mp-blue tokens —
   those Marketplace classes are hardcoded to --mp-blue and aren't
   reusable across pages, so this is a new rp-prefixed set rather than a
   shared one. Generic layout-only classes with no hardcoded color
   (.mp-showcase-grid, .mp-showcase-item label, .mp-elements-row,
   .mp-elements-cell, .mp-elements-row-outer) are reused directly since
   they carry no Marketplace-specific color. */
.rp-ds-icon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 0 0 22px; }
.rp-ds-icon { display: inline-flex; align-items: center; justify-content: center; color: #20293c; }
.rp-ds-icon-row.rp-ds-icon-8 .rp-ds-icon svg { width: 8px; height: 8px; }
.rp-ds-icon-row.rp-ds-icon-10 .rp-ds-icon svg { width: 10px; height: 10px; }
.rp-ds-icon-row.rp-ds-icon-14 .rp-ds-icon svg { width: 14px; height: 14px; }

.rp-ds-actions-grid { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 8px; }
.rp-ds-actions-col { display: flex; flex-direction: column; gap: 10px; }
.rp-ds-action-row { display: flex; gap: 14px; align-items: center; }
.rp-ds-action-icon { display: inline-flex; align-items: center; justify-content: center; color: #20293c; }
.rp-ds-action-icon svg { width: 16px; height: 16px; }
.rp-ds-action-row--hover .rp-ds-action-icon { color: #1597a1; }
.rp-ds-action-tile { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; }
.rp-ds-action-tile--white { background: #fff; box-shadow: 0 2px 6px rgba(32, 41, 60, 0.15); }
.rp-ds-action-tile--light { background: #e4eaea; }
.rp-ds-action-tile svg { width: 14px; height: 14px; }

.rp-ds-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: none; cursor: default; }
/* Rule: Eudoxus Sans (the site's own --font-family) is reserved for the
   portfolio's own explanatory text and titles — section h3s
   (.case-subheading) and sub-labels (.case-ds-subhead) above each
   component group stay on it. Everything that reproduces an actual
   REAL+ product component (buttons, icons, checkboxes, radios, toggles,
   fields, rows, and their small instance labels) switches to REAL+'s
   own font stack instead, same as .rp-intray uses for the live mockup
   and the same scoping technique Marketplace's Design System already
   uses for Inter (see .case-accent-marketplace .case-ds-group above). */
.case-accent-realplus .rp-ds-icon-row,
.case-accent-realplus .rp-ds-actions-grid,
.case-accent-realplus .rp-ds-btn,
.case-accent-realplus .rp-ds-btn-plain,
.case-accent-realplus .mp-elements-row,
.case-accent-realplus .rp-field-sample,
.case-accent-realplus .rp-ds-rows,
.case-accent-realplus #design-system .mp-showcase-grid {
  font-family: var(--component-font);
}
.rp-ds-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.rp-ds-btn.filled { background: #1597a1; color: #fff; }
.rp-ds-btn.filled.hover { background: #226979; }
.rp-ds-btn.filled.disabled { background: #e4eaea; color: #9aa7ab; }
.rp-ds-btn.ghost { background: transparent; border: 1px solid #1597a1; color: #1597a1; }
.rp-ds-btn.ghost.hover { background: #226979; border-color: #226979; color: #fff; }
.rp-ds-btn.ghost.disabled { border-color: #d7dbe4; color: #b7bcc4; }
.rp-ds-btn-circle { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; }
.rp-ds-btn-circle svg { width: 12px; height: 12px; }
.rp-ds-btn-circle.outline { border: 1.5px solid #1597a1; color: #1597a1; background: transparent; }
.rp-ds-btn-circle.outline.hover { background: #1597a1; color: #fff; }
.rp-ds-btn-circle.filled { background: #1597a1; color: #fff; }
.rp-ds-btn-circle.filled.hover { background: #226979; }
.rp-ds-btn-plain { display: inline-block; font-size: 13px; font-weight: 400; color: #20293c; padding: 8px 14px; border-radius: 6px; }
.rp-ds-btn-plain.hover-white { background: #fff; box-shadow: 0 2px 8px rgba(32, 41, 60, 0.12); font-weight: 700; }
.rp-ds-btn-plain.hover-light { background: #e4eaea; font-weight: 700; }

.rp-check-box { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid #b4dbde; box-sizing: border-box; background: transparent; }
.rp-check-box.hover { background: #226979; border-color: #226979; }
.rp-check-box.selected { background: #1597a1; border-color: #1597a1; position: relative; }
.rp-check-box.selected.hover { background: #226979; border-color: #226979; }
.rp-check-box.selected::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.rp-check-box.disabled { border-color: #d7dbe4; opacity: .55; background: transparent; }

.rp-radio-dot { display: inline-flex; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #b4dbde; box-sizing: border-box; position: relative; background: transparent; }
.rp-radio-dot.hover { background: #226979; border-color: #226979; }
.rp-radio-dot.selected { border-color: #1597a1; background: transparent; }
.rp-radio-dot.selected::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #1597a1; }
.rp-radio-dot.selected.hover { border-color: #226979; }
.rp-radio-dot.selected.hover::after { background: #226979; }
.rp-radio-dot.disabled { border-color: #d7dbe4; opacity: .55; }

.rp-toggle { display: inline-flex; align-items: center; width: 30px; height: 16px; border-radius: 10px; padding: 2px; box-sizing: border-box; background: #d7dbe4; }
.rp-toggle .knob { width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-left: 0; }
.rp-toggle.on { background: #1597a1; justify-content: flex-end; }
.rp-toggle.on.hover-on { background: #226979; }
.rp-toggle.off { justify-content: flex-start; background: #d7dbe4; }
.rp-toggle.off.hover-off { background: #20293c; }
.rp-toggle.disabled { background: #b7bcc4; justify-content: flex-end; }

.rp-field-sample .rp-field-label { display: block; font-size: 12px; font-weight: 700; color: #1597a1; margin-bottom: 6px; }
.rp-field-sample .rp-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d7dbe4;
  border-radius: 4px;
  padding: 9px 12px;
  height: 40px;
  box-sizing: border-box;
  font-size: 13px;
  color: #b7bcc4;
  background: #fff;
}
.rp-field-sample .rp-field.hover,
.rp-field-sample .rp-field.filled { color: #20293c; }
.rp-field-sample .rp-field.focused { border-color: #1597a1; }
.rp-field-chevron { display: inline-flex; color: #1597a1; }
.rp-field-chevron svg { width: 12px; height: 12px; }
.rp-field-cursor { color: #1597a1; font-weight: 400; }

/* Rows: a self-contained flex reproduction of the real .rp-intray In
   tray table row (same rounded-card look, selected teal-bar gradient,
   hover tint) so every state can be shown side by side without needing
   the full table/colgroup/spacer-row machinery the live mockup uses. */
.rp-ds-rows-group { margin-bottom: 20px; }
.rp-ds-row {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(32, 41, 60, 0.08);
  padding: 10px 16px;
  font-size: 11px;
  color: #20293c;
  max-width: 760px;
}
.rp-ds-row-cell { flex: 1 1 0; min-width: 0; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-ds-row-narrow { flex: 0 0 26px; }
.rp-ds-row-icon { flex: 0 0 20px; display: flex; align-items: center; justify-content: center; padding-right: 0; }
.rp-ds-row-icon svg { width: 11px; height: 11px; }
.rp-ds-row.is-hover { background: #dde5e5; }
.rp-ds-row.is-selected {
  box-shadow: none;
  background: #dfeef0;
  background-image: linear-gradient(to right, #1597a1 0 4px, transparent 4px);
  padding-left: 26px;
}

/* Letters History and DXA History (Bone Density Results) rows: remove the
   vertical lines at the column edges. They came from the shadow being
   drawn twice under the first and last cells (once by the row, once by
   the cell itself) and from those two cells' shadows spilling sideways
   over their neighbours. The shadow now comes from the row only, so it
   is drawn once, continuously, with nothing at any column edge. */
.rp-tr-history-table--noseam tbody tr {
  box-shadow: 0.92px 0.92px 3.67px rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.rp-tr-history-table--noseam tbody td,
.rp-tr-history-table--noseam tbody td:first-child,
.rp-tr-history-table--noseam tbody td:last-child {
  box-shadow: none;
  clip-path: none;
}

/* "Hide hotspots" must win over the REAL+ top-tab rule that forces the
   active tab's dot to display with !important — otherwise switching the
   toggle on left that dot (the one over "In tray") visible. */
.case-feature-block.hotspots-hidden .rp-intray-tab-wrap .rp-intray-tab-indicator,
.case-feature-block.hotspots-hidden .rp-intray-tab-wrap:has(> .active) .rp-intray-tab-indicator,
.case-final-block.hotspots-hidden .rp-intray-tab-wrap .rp-intray-tab-indicator,
.case-final-block.hotspots-hidden .rp-intray-tab-wrap:has(> .active) .rp-intray-tab-indicator {
  display: none !important;
}

/* ---------- Mobile only (phones and tablets, up to 1024px wide) ----------
   Everything below applies only at phone/tablet width; desktop (wider
   than 1024px) is unaffected. */
@media (max-width: 1024px) {
  /* Hero: hide the portrait (and the teal shape baked into the same
     image) so it no longer sits on top of the text. */
  .hero-visual {
    display: none;
  }

  /* Project logos at the top of each project card on the home page:
     30% smaller (40px -> 28px tall, width follows automatically so the
     proportions stay the same). */
  .project-logo--img img {
    height: 28px;
  }

  /* Project pages: the breadcrumb (Home > Project) was pinned 400px from
     the top of the page, which on a phone landed on top of the project
     tags. It now sits in the normal page flow, between the header wave
     and the project logo. */
  .breadcrumb-wrap {
    position: static;
    padding-top: 24px;
  }
  .breadcrumb {
    margin-bottom: 0;
  }
  .case-hero {
    padding-top: 24px;
  }

  /* Problems & Solutions cards: the "Show Solution" / "Show Problem"
     buttons are gone on mobile and the whole card is the tap target
     instead (see script.js). With the button no longer taking a column,
     the text uses the card's full width. The "Watch Prototype" button on
     SecondOpinions stays, always visible, below the text. */
  .ps-flip-card {
    cursor: pointer;
  }
  .ps-flip-face {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 18px;
  }
  .ps-flip-face p {
    font-size: 18px;
  }
  .ps-flip-btn[data-flip] {
    display: none;
  }
  .ps-flip-btn-group {
    align-self: flex-start;
  }
  .ps-flip-btn[data-video-src] {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
  }

  /* One body-text size on mobile: the hero intro, the About text and the
     project descriptions were 18px / 18px / 17px; all three are now 18px. */
  .hero-sub,
  .about-text,
  .project-desc {
    font-size: 18px;
  }

  /* Social buttons (LinkedIn, Behance): on desktop they sit inside the
     wave footer at a size relative to the screen; on a phone that made
     them tiny. Here they move out of the wave, into the space between the
     Call me card and the footer, as two normal 48px buttons (same square
     shape, 1px outline, 8px corners and icon proportions as before),
     centred side by side. */
  .contact-cards {
    margin-bottom: 112px;
  }
  #contact .contact-wave-btn {
    top: auto;
    bottom: calc(100% + 28px);
    width: 48px;
    height: 48px;
  }
  #contact .contact-wave-btn--linkedin {
    left: calc(50% - 54px);
  }
  #contact .contact-wave-btn--behance {
    left: calc(50% + 6px);
  }

  /* Contact cards: tighter padding/icon and a font size that scales with
     the screen width, so the email address always fits on one line
     (the number 16.8 is roughly the width of one character of the
     address, in font-size units, times its 24 characters / 24). */
  .contact-card {
    padding: 24px;
    gap: 16px;
  }
  .contact-icon-circle {
    width: 56px;
    height: 56px;
  }
  .contact-icon-circle img {
    width: 24px;
    height: 24px;
  }
  /* The text column (label + value) is a size container, so the value's
     font size is worked out from the space it really has: up to 18px,
     smaller only when the column is too narrow, never wrapping. */
  .contact-card > div:not(.contact-icon-circle) {
    flex: 1 1 0;
    min-width: 0;
    container-type: inline-size;
  }
  .contact-card-value {
    white-space: nowrap;
    word-break: normal;
    font-size: 14px; /* fallback for browsers without container units */
    font-size: min(18px, calc(100cqw / 18.1));
  }
}

@media (max-width: 480px) {
  /* Small phones: same row layout as on larger screens (icon on the left,
     label and value stacked on the right, value starting exactly under
     the label), just with slightly tighter spacing. */
  .contact-card {
    padding: 16px;
    gap: 10px;
  }
  .contact-icon-circle {
    width: 44px;
    height: 44px;
  }
  .contact-icon-circle img {
    width: 20px;
    height: 20px;
  }
  .contact-card-label {
    font-size: 14px;
  }
}

/* Desktop only (>1024px), home page: the header's Home link lines up with the hero text on the left,
   and About / Projects / Contact keep the same distance from the right edge.
   The header follows the same centered content column as the page (--container-max) and the same
   side margin; 14px is subtracted because each link has 14px of its own padding. */
@media (min-width: 1025px) {
  body:has(#hero) .site-header {
    padding-left: calc(max(0px, (100% - var(--container-max)) / 2) + var(--side-margin) - 14px);
    padding-right: calc(max(0px, (100% - var(--container-max)) / 2) + var(--side-margin) - 14px);
  }
}

/* Desktop only (>1024px), project pages: no turquoise ornament and no
   always-visible Home button at the top. The breadcrumb now sits in the
   normal page flow near the top. The white header (Home link, placed exactly
   like on the home page) slides in only after the breadcrumb has scrolled
   out of view, and hides again when the breadcrumb is back (see script.js). */
@media (min-width: 1025px) {
  .header-wave {
    display: none;
  }
  .breadcrumb-wrap {
    position: static;
    padding-top: 40px;
  }
  .breadcrumb {
    margin-bottom: 0;
  }
  .case-hero {
    padding-top: 40px;
  }
  .header-wave ~ .site-header {
    background: #ffffff;
    padding-left: calc(max(0px, (100% - var(--container-max)) / 2) + var(--side-margin) - 14px);
    padding-right: calc(max(0px, (100% - var(--container-max)) / 2) + var(--side-margin) - 14px);
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .header-wave ~ .site-header.site-header--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* Mobile only (phones/tablets, up to 1024px), project pages: same behavior as
   desktop. No turquoise ornament and no always-visible Home button at the top;
   the breadcrumb sits near the top of the page. The white header (Home link,
   padded exactly like the home page header at this width) slides in once the
   breadcrumb has scrolled out of view and hides when it is back (script.js). */
@media (max-width: 1024px) {
  .header-wave {
    display: none;
  }
  .header-wave ~ .site-header {
    background: #ffffff;
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .header-wave ~ .site-header.site-header--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* Mobile only (phones/tablets, up to 1024px), project pages: the white header
   is tied directly to the scroll position by the browser itself (scroll-driven
   animation), so it appears as soon as the breadcrumb has scrolled away and
   disappears when scrolling back to the top, in both directions, even when the
   page is busy. Browsers without this feature keep using the script.js version
   (.site-header--visible). The 36px-56px range is the breadcrumb's height. */
@media (max-width: 1024px) {
  @supports (animation-timeline: scroll()) {
    .header-wave ~ .site-header {
      animation: projectHeaderReveal linear both;
      animation-timeline: scroll(root block);
      animation-range: 36px 56px;
      transition: none;
      will-change: transform, opacity;
    }
  }
}

@keyframes projectHeaderReveal {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile only (phones/tablets, up to 1024px), project pages only: the two small
   social buttons (LinkedIn, Behance) at the bottom are hidden. The home page
   (it has #hero) keeps its own social buttons. */
@media (max-width: 1024px) {
  body:not(:has(#hero)) .contact-wave-btn {
    display: none;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace > Final Design >
   Exams Grid, Exam Upload and the REAL+ pictures: the whole picture is shrunk in proportion to
   fit the screen width (script.js sets the scale), so nothing is cut off. */
@media (max-width: 1024px) {
  .mp-mockup-fit {
    position: relative;
    width: 100%;
  }
  /* The existing phone rules (max-width 900px / 640px) stack the Exams Grid's
     table above its right-hand panel and narrow the tooltips. Inside a scaled
     picture the layout must stay exactly the desktop one, only smaller. */
  .mp-mockup-fit .mp-app-body {
    flex-direction: row;
  }
  .mp-mockup-fit .mp-panel {
    border-top: 0;
  }
  .mp-mockup-fit .mp-prv-columns {
    flex-direction: row;
  }
  .mp-mockup-fit .mp-prv-image-wrap {
    flex: 1 1 0;
    max-height: none;
  }
  /* REAL+ Patient Record: keep the sidebar beside the main panel (the phone
     rule at 900px stacks them). */
  .mp-mockup-fit .rp-tr-shell {
    flex-direction: row;
  }
  .mp-mockup-fit .rp-tr-sidebar {
    width: 220px;
    border-right: 1px solid #eceef3;
    border-bottom: 0;
  }
  .mp-mockup-fit .mp-tooltip-info {
    width: 280px;
  }
  .mp-mockup-fit .mp-tooltip-actions {
    width: 220px;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace Workflow diagrams:
   the diagram box was being squeezed to the card width (flex-shrink and
   max-width) while its boxes and lines keep their fixed positions, so most of
   it was cropped and the scaling had nothing to measure. It now keeps its real
   size, script.js shrinks the whole diagram in proportion to fit the card
   (same card size for every slide), and it is centered. */
@media (max-width: 1024px) {
  [data-usecase-scale] {
    justify-content: flex-start;
  }
  [data-usecase-scale] .mp-flow-canvas {
    flex-shrink: 0;
    max-width: none;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace "Workflow Statuses
   Definition" tables: the slide centered its content, so when a table was
   bigger than the slide the top and left parts were pushed out of reach and
   looked cropped. Now the table starts at the top-left corner at its normal
   size, and it can be scrolled sideways and up/down to see all of it. */
@media (max-width: 1024px) {
  .mp-usecase-media .case-proto-slide[data-video-title="Workflow Statuses Definition"] {
    align-items: flex-start;
    justify-content: flex-start;
  }
  .mp-usecase-media .case-proto-slide[data-video-title="Workflow Statuses Definition"] .mp-table-scroll {
    width: 100%;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace "Workflow Statuses
   Definition": the table keeps its desktop width (about 1224px), so its
   columns and rows look exactly like on desktop instead of being squeezed
   into a narrow table. It starts at the top-left corner and is scrolled
   sideways and up/down. */
@media (max-width: 1024px) {
  .mp-usecase-media .case-proto-slide[data-video-title="Workflow Statuses Definition"] .mp-table {
    width: 1224px;
    min-width: 1224px;
    /* 40% smaller than the desktop-width table, same proportions. Unlike a
       transform, zoom also shrinks the space the table takes, so the
       scrolling (sideways and up/down) matches what is actually shown. */
    zoom: 0.6;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace "Workflow" slide: the
   diagrams are scaled to fit the card, so there is nothing to scroll sideways.
   Horizontal scrolling is switched off here so no sideways scrollbar can show. */
@media (max-width: 1024px) {
  .mp-usecase-media .case-proto-slide[data-video-title="Workflow"] {
    overflow-x: hidden !important;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Marketplace "Workflow" diagrams:
   the box around a diagram only hid its overflow, which can still be scrolled
   by pressing and dragging on it (a sideways scrollbar showed up and the
   diagram slid out of place). "clip" cuts the overflow without letting the box
   scroll at all, and the diagram text can't be drag-selected. */
@media (max-width: 1024px) {
  [data-usecase-scale] {
    overflow: hidden;
    overflow: clip;
    -webkit-user-select: none;
    user-select: none;
  }
  .mp-usecase-media .case-proto-slide[data-video-title="Workflow"] {
    overflow-x: clip !important;
  }
}

/* Mobile only (phones/tablets, up to 1024px): the original tooltips are hidden
   here; script.js shows the same text as a readable bubble on the page itself
   (see "tooltips" in script.js). Desktop keeps its tooltips as they are. */
@media (max-width: 1024px) {
  .mp-indicator > .mp-tooltip,
  .mp-hover-tip > .mp-tooltip {
    display: none !important;
  }
  .mp-tt-bubble {
    position: fixed;
    z-index: 2000;
    overflow: visible;
    -webkit-user-select: none;
    user-select: none;
  }
  .mp-tt-bubble .mp-tt-clone {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 0;
    max-width: none;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    white-space: normal;
  }
  .mp-tt-bubble .mp-tt-clone::after {
    display: none;
  }
  .mp-tt-bubble .mp-tt-close {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #0d2024;
    box-shadow: 0 1px 8px rgba(13, 32, 36, 0.35);
    cursor: pointer;
    z-index: 1;
  }
  .mp-tt-bubble .mp-tt-close svg {
    width: 50%;
    height: 50%;
    display: block;
  }
}

/* Mobile only (phones/tablets, up to 1024px): the Final Design pictures can be
   pinch-zoomed inside their own frame (see script.js). The frame cuts off what
   is zoomed out of view, and at the normal size one finger still scrolls the
   page. */
@media (max-width: 1024px) {
  .mp-mockup-fit {
    overflow: hidden;
    overflow: clip;
    touch-action: pan-y;
  }
}

/* Mobile only (phones/tablets, up to 1024px): the page must not slide sideways
   or bounce sideways under the finger. One finger on the page can only scroll
   up/down (pinch-zoom still works); parts of the page that scroll sideways on
   purpose (wide tables, the zoomable pictures) keep their own behavior. */
@media (max-width: 1024px) {
  html {
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
  }
}

/* Mobile only (phones/tablets, up to 1024px): the Before/After comparison is
   dragged sideways with a finger (script.js); up/down touches still scroll the
   page. */
@media (max-width: 1024px) {
  .pixlane-compare {
    touch-action: pan-y;
  }
}

/* Mobile only (phones/tablets, up to 1024px): video pop-up. The pop-up box could
   not get narrower than the video's own full size (the box sits in a flex row,
   where an item will not shrink below its content), so on a narrow screen it
   was wider than the screen and its right side was cut off. It may now shrink
   to the available width, and the video is scaled down with it, in
   proportion. */
@media (max-width: 1024px) {
  .modal-overlay .modal-box {
    min-width: 0;
    max-width: 100%;
  }
  .modal-box video {
    max-width: 100%;
    height: auto;
  }
}

/* Mobile only, LANDSCAPE only (phones/tablets turned sideways: up to 1024px wide
   and up to 600px tall): the whole site is shown 25% larger. The site is
   normally drawn at 80% of its design size (body zoom 0.8); here it is drawn
   at 100%, so text, buttons, images, pictures, videos and spacing all grow by
   the same factor and keep their proportions, and the page re-flows to use
   the extra width. Portrait (and desktop) keep the 80% size. */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
  body {
    zoom: 1;
  }
  /* The project-page header slides in once the breadcrumb is out of view; the
     breadcrumb is 25% taller here, so the scroll range moves with it. */
  @supports (animation-timeline: scroll()) {
    .header-wave ~ .site-header {
      animation-range: 45px 70px;
    }
  }
}

/* Mobile only (phones/tablets, up to 1024px): the pop-up video itself can never
   be wider than its box (script.js sets the box width from the screen). */
@media (max-width: 1024px) {
  .modal-box {
    box-sizing: border-box;
    overflow: hidden;
  }
  .modal-box video {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* Mobile only (phones/tablets, up to 1024px): Clalit Final Design restacked —
   each caption is followed by its phone screens (two per row), and the cards /
   buttons that live in the base picture are shown as slices under their caption. */
@media (max-width: 1024px) {
  .fd-shot-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px 4%;
  }
  .fd-shot-wrap > img:not(.fd-phone) { display: none; }
  .fd-shot-wrap .fd-caption {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    flex: 0 0 100%;
  }
  .fd-shot-wrap .fd-caption h4 { margin-left: 0 !important; }
  .fd-shot-wrap .fd-phone {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 46% !important;
    flex: 0 0 46%;
  }
  .fd-shot-wrap .fd-caption:nth-of-type(1) { order: 1; }
  .fd-shot-wrap .fd-phone[data-fd-group="login"][data-fd-i="0"] { order: 2; }
  .fd-shot-wrap .fd-phone[data-fd-group="login"][data-fd-i="1"] { order: 3; }
  .fd-shot-wrap .fd-phone[data-fd-group="login"][data-fd-i="2"] { order: 4; }
  .fd-shot-wrap .fd-caption:nth-of-type(2) { order: 5; }
  .fd-shot-wrap .fd-phone[data-fd-group="home"][data-fd-i="0"] { order: 6; }
  .fd-shot-wrap .fd-phone[data-fd-group="home"][data-fd-i="1"] { order: 7; }
  .fd-shot-wrap .fd-phone[data-fd-group="home"][data-fd-i="2"] { order: 8; }
  .fd-shot-wrap .fd-caption:nth-of-type(3) { order: 9; }
  .fd-shot-wrap .fd-caption:nth-of-type(4) { order: 10; }
  .fd-shot-wrap .fd-phone[data-fd-group="meddocs"][data-fd-i="0"] { order: 11; }
  .fd-shot-wrap .fd-phone[data-fd-group="meddocs"][data-fd-i="1"] { order: 12; }
  .fd-shot-wrap .fd-phone[data-fd-group="meddocs"][data-fd-i="2"] { order: 13; }
  .fd-shot-wrap .fd-caption:nth-of-type(5) { order: 14; }
  .fd-shot-wrap .fd-caption:nth-of-type(6) { order: 15; }
  .fd-shot-wrap .fd-phone[data-fd-group="doctors"][data-fd-i="0"] { order: 16; }
  .fd-shot-wrap .fd-phone[data-fd-group="doctors"][data-fd-i="1"] { order: 17; }
  .fd-shot-wrap .fd-phone[data-fd-group="doctors"][data-fd-i="2"] { order: 18; }
  .fd-shot-wrap .fd-caption:nth-of-type(7) { order: 19; }
  .fd-shot-wrap .fd-caption:nth-of-type(8) { order: 20; }

  /* Slices of the base picture (cards / buttons) shown under their caption */
  .fd-shot-wrap .fd-caption:nth-of-type(3)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(5)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after {
    content: "";
    display: block;
    margin: 12px auto 0;
    background-image: url("assets/images/case-clalit/final-design-base-v31.png");
    background-repeat: no-repeat;
  }
  .fd-shot-wrap .fd-caption:nth-of-type(3)::after {
    width: 75.6%; aspect-ratio: 873 / 281;
    background-size: 132.2% auto; background-position: 25.98% 45.55%;
  }
  .fd-shot-wrap .fd-caption:nth-of-type(5)::after {
    width: 24.1%; aspect-ratio: 278 / 173;
    background-size: 415.1% auto; background-position: 68.04% 69.21%;
  }
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after {
    width: 32.8%; aspect-ratio: 378 / 350;
    background-size: 305.3% auto; background-position: 11.6% 93.62%;
  }
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after {
    width: 26%; aspect-ratio: 300 / 317;
    background-size: 384.7% auto; background-position: 8.43% 99.74%;
  }
}

/* Mobile only (phones/tablets, up to 1024px): Clalit restored cards/buttons are
   30% larger, left-aligned with the caption text, with a soft shadow. */
@media (max-width: 1024px) {
  .fd-shot-wrap .fd-caption:nth-of-type(3)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(5)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after {
    margin-left: 0;
    margin-right: auto;
    max-width: 100%;
    filter: drop-shadow(0 4px 10px rgba(40, 60, 90, 0.16));
  }
  .fd-shot-wrap .fd-caption:nth-of-type(3)::after { width: 98.3%; }
  .fd-shot-wrap .fd-caption:nth-of-type(5)::after { width: 31.3%; }
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after { width: 42.6%; }
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after { width: 33.8%; }
}

/* Mobile only: Appointment Cards slice widened so no card is cut; the doctor /
   appointment cards already carry their own shadow, so no extra one is added. */
@media (max-width: 1024px) {
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after,
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after { filter: none; }
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after {
    width: 39.9%;
    aspect-ratio: 354 / 317;
    background-size: 326% auto;
    background-position: 8.25% 99.74%;
  }
}

/* Mobile only: restored Clalit cards/buttons enlarged a further 20% (the
   Online Services block is capped at the full available width). */
@media (max-width: 1024px) {
  .fd-shot-wrap .fd-caption:nth-of-type(3)::after { width: 100%; }
  .fd-shot-wrap .fd-caption:nth-of-type(5)::after { width: 37.6%; }
  .fd-shot-wrap .fd-caption:nth-of-type(7)::after { width: 51.1%; }
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after { width: 47.9%; }
}

/* Mobile only (phones/tablets, up to 1024px): smaller gap between sections on
   the project pages. */
@media (max-width: 1024px) {
  .case-section { margin-bottom: 40px; }
}

/* Mobile only: tighter space around the divider lines, and no extra space
   under the Clalit Final Design block. */
@media (max-width: 1024px) {
  .case-hr { margin: 28px 0; }
  .fd-shot-wrap { margin-bottom: 0; }
  .fd-shot-wrap .fd-caption:nth-of-type(8)::after { margin-bottom: 0; }
}

/* Mobile only (phones/tablets, up to 1024px): one uniform gap between every
   section on every project page — 40px, whether or not a divider line sits
   between them (the line takes the middle of that same 40px). */
@media (max-width: 1024px) {
  .case-section { margin-bottom: 40px; }
  .case-section:has(+ hr) { margin-bottom: 20px; }
  hr.case-hr,
  hr.case-ps-divider.case-section-divider {
    margin: 0 0 20px;
  }
}

/* Mobile only (phones/tablets, up to 1024px): smaller gaps between the home
   page sections (About, Projects). */
@media (max-width: 1024px) {
  #about { padding-bottom: 20px; }
  #projects { padding-top: 20px; padding-bottom: 20px; }
}

/* Mobile only: About → Projects gap reduced a further 70% (40px → 12px). */
@media (max-width: 1024px) {
  #about { padding-bottom: 6px; }
  #projects { padding-top: 6px; }
}

/* Mobile only (phones/tablets, up to 1024px): ONE uniform gap between every
   section on every page, using the Home page's About → Projects gap as the
   reference (12px). Home page: hero/About/Projects/Contact each add half
   (6px) on both sides of a boundary. Project pages: 12px between sections;
   a divider line sits in the middle of that same 12px. */
@media (max-width: 1024px) {
  .hero { padding-bottom: 6px; }
  #about { padding-top: 6px; padding-bottom: 6px; }
  #projects { padding-top: 6px; padding-bottom: 6px; }
  #contact { padding-top: 6px; }
  .case-section { margin-bottom: 12px; }
  .case-section:has(+ hr) { margin-bottom: 6px; }
  hr.case-hr,
  hr.case-ps-divider.case-section-divider {
    margin: 0 0 6px;
  }
}

/* Mobile only: the uniform gap between sections is 70px (35px + 35px at each
   boundary on the Home page; 70px on project pages, divider line in the middle). */
@media (max-width: 1024px) {
  .hero { padding-bottom: 35px; }
  #about { padding-top: 35px; padding-bottom: 35px; }
  #projects { padding-top: 35px; padding-bottom: 35px; }
  #contact { padding-top: 35px; }
  .case-section { margin-bottom: 70px; }
  .case-section:has(+ hr) { margin-bottom: 35px; }
  hr.case-hr,
  hr.case-ps-divider.case-section-divider {
    margin: 0 0 35px;
  }
}

/* Mobile only: gap between the Home page project cards = 50px. */
@media (max-width: 1024px) {
  .projects-list,
  .projects-more-inner { gap: 50px; }
}

/* Mobile only: the hamburger morphs into an "X" while the menu is open
   (the top and bottom bars rotate, the middle bar fades out). */
@media (max-width: 1024px) {
  .nav-toggle span {
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Mobile only: less space between the header and the Home hero (30px). */
@media (max-width: 1024px) {
  .hero { padding-top: 30px; }
}


/* Mobile only (phones/tablets, up to 1024px), SecondOpinions Design System:
   the Icons strips are mostly empty on the right, so the icons showed tiny.
   Each strip is magnified 2.2x (left-aligned, nothing cut off, same ratio
   for every size so the size comparison stays true). */
@media (max-width: 1024px) {
  .case-accent-secondopinions img[src*="design-system/ds-icons-"][src$="px.png"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    object-position: left center;
  }
  .case-accent-secondopinions img[src$="ds-icons-8px.png"] { aspect-ratio: 1295 / 37.4; }
  .case-accent-secondopinions img[src$="ds-icons-10px.png"] { aspect-ratio: 1295 / 41.8; }
  .case-accent-secondopinions img[src$="ds-icons-14px.png"] { aspect-ratio: 1295 / 50.6; }
  .case-accent-secondopinions img[src$="ds-icons-20px.png"] { aspect-ratio: 1295 / 63.8; }
  .case-accent-secondopinions img[src$="ds-icons-26px.png"] { aspect-ratio: 1295 / 77.0; }
  .case-accent-secondopinions img[src$="ds-icons-34px.png"] { aspect-ratio: 1295 / 94.6; }
  .case-accent-secondopinions img[src$="ds-icons-40px.png"] { aspect-ratio: 1295 / 107.8; }
}

/* Mobile only (phones/tablets, up to 1024px), Clalit Research Competitors:
   three screens are hidden (Leumit login, Maccabi search form and home), so
   every slide shows 3 screens. All slides use the same screen height, sized
   from the panel width so the three screens always fit on one row. */
@media (max-width: 1024px) {
  .competitor-screens-row img[src$="competitor-screen-leumit-1.png"],
  .competitor-screens-row img[src$="competitor-screen-maccabi-3.png"],
  .competitor-screens-row img[src$="competitor-screen-maccabi-4.png"] {
    display: none;
  }
  .competitor-screens-row {
    container-type: inline-size;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-start;
  }
  .competitor-screens-row img {
    height: min(420px, calc((100cqw - 20px) / 1.7));
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Clalit Design System: the
   Icons strips show at their real, full size (the 14px icons are 14px, the
   35px icons 35px) instead of shrunk to the screen width; swipe sideways to
   see the whole strip. */
@media (max-width: 1024px) {
  .ds-icon-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }
  .ds-icon-scroll img.case-ds-image-block-img {
    max-width: none;
    width: auto;
    height: auto;
    flex: none;
  }
}

/* Mobile only (phones/tablets, up to 1024px): "Show More" and the
   Previous / Next Project links share one font size (16px). */
@media (max-width: 1024px) {
  .projects-toggle,
  .projects-toggle .projects-toggle-label,
  .case-nav-btn,
  .case-nav-btn .case-nav-btn-label {
    font-size: 16px;
  }
}

/* Mobile "best on desktop" banner: only on phones/tablets (up to 1024px).
   Fixed just under the header on every page until the visitor closes it. */
.mobile-banner { display: none; }
@media (max-width: 1024px) {
  .mobile-banner {
    display: flex;
    align-items: center;
    gap: 5px;
    position: fixed;
    left: 0;
    right: 0;
    top: 4px;
    z-index: 99;
    box-sizing: border-box;
    min-height: 26px;
    padding: 4px 16px 4px 22px;
    background: #f7fafa;
    color: #858585;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
  }
  .mobile-banner-icon {
    flex: 0 0 auto;
  }
  .mobile-banner-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .mobile-banner-close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 22px;
    margin-left: auto;
    background: transparent;
    border: 0;
    padding: 0;
    color: #858585;
    cursor: pointer;
  }
}

/* Mobile only (phones/tablets, up to 1024px), SecondOpinions page: the header
   is driven by script.js from the scroll position, so the browser-side
   scroll animation is switched off for this page only. */
@media (max-width: 1024px) {
  .header-wave ~ .site-header.js-header-scroll {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Home page: the SecondOpinions
   cover's Radiology card is scaled down so it is fully visible (not cut off
   at the bottom of the cover). */
@media (max-width: 1024px) {
  .cover-secondopinions .so-mini-card {
    top: 18px;
    left: 24px;
    transform: scale(0.82);
    transform-origin: top left;
  }
}

/* Mobile only (phones/tablets, up to 1024px), SecondOpinions page, browsers that can
   detect a stuck sticky element: the white header is position: sticky at the top of
   the screen and simply becomes visible (with the banner under it) once it is stuck.
   Pure CSS, so it does not depend on any scroll code. */
@supports (container-type: scroll-state) {
  @media (max-width: 1024px) {
    html.so-sticky-css .header-wave ~ .site-header {
      position: sticky !important;
      top: 0 !important;
      left: 0;
      width: 100%;
      z-index: 100;
      container-type: scroll-state;
      background: transparent !important;
      opacity: 1 !important;
      transform: none !important;
      animation: none !important;
      transition: none !important;
      pointer-events: none;
    }
    html.so-sticky-css .header-wave ~ .site-header::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background: #ffffff;
      opacity: 0;
    }
    html.so-sticky-css .header-wave ~ .site-header .nav-home {
      opacity: 0;
      pointer-events: none;
    }
    html.so-sticky-css .header-wave ~ .site-header .mobile-banner.in-header {
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      width: auto;
      opacity: 0;
      pointer-events: none;
    }
    @container scroll-state(stuck: top) {
      html.so-sticky-css .header-wave ~ .site-header::before {
        opacity: 1;
      }
      html.so-sticky-css .header-wave ~ .site-header .nav-home {
        opacity: 1;
        pointer-events: auto;
      }
      html.so-sticky-css .header-wave ~ .site-header .mobile-banner.in-header {
        opacity: 1;
        pointer-events: auto;
      }
    }
  }
}

/* Mobile only (phones/tablets, up to 1024px), SecondOpinions page: a few wide
   items (e.g. the Design System label rows) stuck out past the right edge of the
   screen, which made the browser treat the page as wider than the screen and
   pushed the fixed/sticky white header out of view. Anything past the page edge is
   now cut off (it was already out of sight), so the page is exactly screen-wide
   like the other project pages. */
@media (max-width: 1024px) {
  .case-accent-secondopinions {
    overflow-x: clip;
  }
}

/* Mobile only (phones/tablets, up to 1024px), all project pages: one size (18px)
   for every paragraph / list text that has a round bullet (Project Scope, Main
   Goals, Problems & Solutions lists, Reflection & Impact lists, lead-in lines,
   Clalit Final Design captions). Bullet circles and spacing are unchanged. */
@media (max-width: 1024px) {
  .case-section .case-lead-bullet,
  .case-section .case-goal-list li,
  .case-section .ps-list li,
  .case-section .case-reflection-list li {
    font-size: 18px;
  }
}

/* Mobile only (phones/tablets, up to 1024px), Reflection & Impact cards: the
   description text is 18px (was 20px) and sits further below the big number. */
@media (max-width: 1024px) {
  .case-section .case-ri-desc {
    font-size: 18px;
    margin-top: 12px;
  }
}

/* Mobile only (phones/tablets, up to 1024px): the copyright line in the footer
   sits 6px higher. */
@media (max-width: 1024px) {
  .contact-wave-copyright {
    bottom: calc(3.2% + 6px);
  }
}

/* ===== SecondOpinions – New Website Design: auto-scrolling homepage in laptop + phone ===== */
.so-nwd-laptop{position:relative;width:100%;aspect-ratio:1263/763}
.so-nwd-lscreen{position:absolute;left:10.85%;top:4.06%;width:78.23%;height:80.87%;overflow:hidden;background:#fff}
.so-nwd-frame{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.so-nwd-track{display:block;width:100%;height:auto;will-change:transform}
.so-nwd-track--d{animation:so-nwd-scroll-d 30s infinite linear}
.so-nwd-track--m{animation:none;transform:none}
.so-nwd-fixhead{position:absolute;top:0;left:-4px;width:calc(100% + 8px);aspect-ratio:1920/112;overflow:hidden;z-index:2;background:#fff;transform:translateY(44.64%);animation:so-nwd-nav 30s infinite linear}
.so-nwd-fixhead img{display:block;width:calc(100% - 8px);height:auto;margin-left:4px;margin-top:-2.604%}
.so-nwd-phone{position:absolute;right:-150px;bottom:100px;width:21%;aspect-ratio:264/541;filter:drop-shadow(0 20px 40px rgba(13,32,36,0.25))}
.so-nwd-pscreen{position:absolute;left:3.79%;top:19.22%;width:92.05%;height:78.93%;overflow:hidden;background:#fff;border-radius:0 0 14% 14% / 0 0 8% 8%}
.so-nwd-pscreen::after{content:"";position:absolute;top:0;left:0;right:0;height:6px;background:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,0));z-index:2}
.so-nwd-pframe{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
@keyframes so-nwd-scroll-d{0%{transform:translateY(0)}46%{transform:translateY(-85.36%)}50%{transform:translateY(-85.36%)}96%{transform:translateY(0)}100%{transform:translateY(0)}}
@keyframes so-nwd-nav{0%{transform:translateY(44.64%)}0.33%{transform:translateY(0)}95.67%{transform:translateY(0)}96%{transform:translateY(44.64%)}100%{transform:translateY(44.64%)}}
@media (prefers-reduced-motion:reduce){.so-nwd-track,.so-nwd-fixhead{animation:none}}

/* SecondOpinions › Problems & Solutions video pop-up: always centered on the screen (phones/tablets) */
@media (max-width: 1024px) {
  .modal-overlay.so-center { align-items: center; justify-content: center; }
  .modal-overlay.so-center .modal-box { transform: none !important; margin: auto; max-height: calc(100vh - 24px); overflow-y: auto; }
}
