/* Home owns the central workspace and recent-visit rail; the outer shell owns navigation. */
.desktop-home.home-v3 {
  --home-ink: #132347;
  --home-muted: #52637b;
  --home-blue: #134ec8;
  --home-edge: rgba(197, 211, 231, .8);
  --home-lift: inset 0 1px 0 #fff, 0 1px 2px rgba(66, 93, 135, .09), 0 11px 19px -8px rgba(52, 87, 146, .29);
  --home-lift-tall: inset 0 1px 0 #fff, 0 2px 3px -1px rgba(63, 93, 146, .1), 0 16px 25px -10px rgba(43, 80, 146, .30);
  width: 100%; max-width: none; margin: 0; padding: 0;
  min-width: 0; color: var(--home-ink); container: clinic-home / inline-size;
}
.home-v3 .home-v3-grid { display: grid; grid-template-columns: minmax(0, 1.92fr) minmax(240px, 1fr); align-items: stretch; min-width: 0; }
.home-v3 .home-v3-center { display: grid; align-content: start; gap: clamp(24px, 3cqi, 40px); min-width: 0; padding: 16px 24px 40px; }
.home-v3 .home-v3-rail {
  min-width: 0; padding: 16px 24px 32px;
  border-left: 1px solid rgba(227, 236, 248, .72);
  background: rgba(255, 255, 255, .2);
}
.home-v3 .home-access-notice { margin: 8px 24px 0; padding: 12px 16px; font-size: 16px; }
.home-v3 .home-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(216px, 26cqi, 320px);
  border: 1px solid rgba(255, 255, 255, .96); border-bottom-color: var(--home-edge); border-radius: 24px;
  background: linear-gradient(124deg, #fdfefe 5%, #f3f7fd 41%, #e3effd 100%); box-shadow: var(--home-lift-tall);
}
/* Scalable paper curves sit below the portrait and remain sharp at every zoom. */
.home-v3 .home-hero-relief { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-v3 .home-hero-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 24px; width: 62%; min-width: 0; padding: 32px 0 32px clamp(24px, 3cqi, 40px); }
.home-v3 .home-hero-copy h2 { margin: 0; color: var(--home-ink); font-size: clamp(22px, 2.65cqi, 34px); font-weight: 620; line-height: 1.3; letter-spacing: -.035em; }
body .home-v3 .home-hero .home-start-button {
  padding: 10px 22px; min-height: 48px; width: fit-content; max-width: 100%; gap: 10px; border-radius: 12px; border: 1px solid #164bc1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 10px -4px rgba(29, 75, 153, .33);
  color: #fff; background: linear-gradient(180deg, #215ddd, #174fc7);
  font-size: 16px; font-weight: 550; line-height: 1.4; white-space: nowrap;
}
body .home-v3 .home-hero .home-start-button:hover { background: #164abb; }
body .home-v3 .home-hero .home-start-button:active { background: #123ea1; transform: translateY(1px); }
body .home-v3 .home-hero .home-start-button .icon { width: 20px; height: 20px; }
.home-v3 .home-hero-portrait {
  position: absolute; inset: 0 0 0 auto; width: 44%; pointer-events: none;
}
.home-v3 .home-hero-portrait img { position: absolute; bottom: -16%; right: 3%; width: auto; height: 113%; max-width: 102%; object-fit: contain; object-position: bottom right; }
.home-v3 .home-v3-services, .home-v3 .home-v3-tiles { min-width: 0; }
.home-v3 .home-v3-services h2, .home-v3 .home-v3-rail-heading h2 { margin: 0; color: var(--home-ink); font-size: clamp(18px, 1.82cqi, 23px); font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
.home-v3 .home-v3-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7cqi, 24px); margin-top: 16px; }
.home-v3 .button.home-v3-service, .home-v3 .button.home-v3-visit, .home-v3 .home-record-unavailable, .home-v3 .home-v3-empty {
  margin: 0; min-width: 0; width: 100%; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .98); border-bottom-color: var(--home-edge);
  background: linear-gradient(153deg, #fff 12%, #f9fbff 100%); box-shadow: var(--home-lift);
  color: var(--home-ink); white-space: normal;
}
.home-v3 .button.home-v3-service, .home-v3 .button.home-v3-visit {
  display: block; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.home-v3 .button.home-v3-service { padding: clamp(12px, 1.6cqi, 24px) 8px; text-align: center; }
.home-v3 .home-v3-service > span { display: grid; justify-items: center; gap: 8px; }
.home-v3 .home-service-art { display: block; width: min(100%, 172px); height: clamp(84px, 12cqi, 148px); object-fit: contain; }
.home-v3 .home-v3-service strong { font-size: clamp(15px, 1.5cqi, 18px); font-weight: 600; line-height: 1.4; }
.home-v3 .home-v3-badge {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%;
  padding: 3px 9px; border-radius: 999px; color: #43516a; background: #edf0f5;
  font-size: 14px; font-weight: 500; line-height: 1.45; white-space: nowrap;
}
.home-v3 .home-v3-badge.attention, .home-v3 .home-v3-badge.pending { color: #785115; background: #fcf0d7; }
.home-v3 .home-v3-badge.ready, .home-v3 .home-v3-badge.reviewed { color: #286244; background: #e1f2e7; }
.home-v3 .home-v3-notice { margin: 16px 0 0; color: var(--home-muted); font-size: 15px; line-height: 1.6; }
.home-v3 .home-v3-rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.home-v3 .home-v3-rail-heading .home-all-records { border: none; background: transparent; padding: 8px 4px; min-height: 44px; color: var(--home-blue); font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: none; }
.home-v3 .home-v3-rail-heading .home-all-records:hover { background: rgba(255, 255, 255, .65); }
.home-v3 .home-v3-recents { list-style: none; display: grid; gap: 16px; padding: 0; margin: 0; }
.home-v3 .home-v3-recents li { min-width: 0; }
.home-v3 .button.home-v3-visit, .home-v3 .home-record-unavailable { padding: 16px; text-align: start; }
.home-v3 .button.home-v3-visit > span, .home-v3 .home-record-unavailable { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 48px; }
.home-v3 .home-v3-file { color: #304a72; }
.home-v3 .home-v3-file .icon { display: block; width: 24px; height: 26px; }
.home-v3 .home-v3-patient { min-width: 0; display: grid; gap: 4px; }
.home-v3 .home-v3-patient strong, .home-v3 .home-v3-patient > span { overflow-wrap: anywhere; }
.home-v3 .home-v3-patient strong { color: var(--home-ink); font-size: 16px; font-weight: 600; line-height: 1.45; }
.home-v3 .home-v3-patient > span { color: var(--home-muted); font-size: 15px; font-weight: 400; line-height: 1.45; }
.home-v3 .home-record-unavailable > span:last-child { grid-column: 2 / -1; color: var(--home-muted); font-size: 15px; }
.home-v3 .home-v3-empty { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 144px; padding: 24px; color: var(--home-muted); }
.home-v3 .home-v3-empty strong { font-size: 16px; font-weight: 500; }
.home-v3 .home-v3-empty .icon { width: 28px; height: 28px; }
@media (hover: hover) {
  .home-v3 .button:is(.home-v3-service, .home-v3-visit):hover { transform: translateY(-2px); border-bottom-color: #b5c9e7; box-shadow: var(--home-lift-tall); }
}
.home-v3 .button:is(.home-v3-service, .home-v3-visit):active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(52, 87, 146, .14); }
.home-v3 .button:focus-visible { outline: 3px solid var(--home-blue); outline-offset: 3px; }
@container clinic-home (max-width: 940px) {
  .home-v3 .home-v3-center { padding-inline: 20px; }
  .home-v3 .home-v3-rail { padding-inline: 16px; }
  .home-v3 .home-v3-grid { grid-template-columns: minmax(0, 1fr) 272px; }
  .home-v3 .home-v3-file { display: none; }
  .home-v3 .button.home-v3-visit > span { grid-template-columns: minmax(0, 1fr) auto; }
}
@container clinic-home (max-width: 740px) {
  .home-v3 .home-v3-grid { grid-template-columns: minmax(0, 1fr); }
  .home-v3 .home-v3-center { padding: 12px 20px 24px; gap: 24px; }
  .home-v3 .home-v3-rail { padding: 0 20px 32px; border-left: none; background: none; }
  .home-v3 .home-v3-file { display: inline-flex; }
  .home-v3 .button.home-v3-visit > span { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .home-v3 .home-v3-rail-heading { margin-bottom: 8px; }
  .home-v3 .home-v3-tiles { gap: 12px; }
}
@container clinic-home (max-width: 440px) {
  .home-v3 .home-v3-center { padding: 8px 16px 20px; }
  .home-v3 .home-v3-rail { padding: 0 16px 24px; }
  .home-v3 .home-hero { min-height: 184px; border-radius: 18px; }
  .home-v3 .home-hero-copy { padding: 20px 0 20px 16px; gap: 16px; width: 60%; }
  .home-v3 .home-hero-copy h2 { font-size: 19px; }
  body .home-v3 .home-hero .home-start-button { min-height: 44px; padding: 8px 14px; }
  .home-v3 .home-hero-portrait { width: 42%; }
  .home-v3 .home-hero-portrait img { bottom: -4%; height: 100%; right: -2%; }
  .home-v3 .home-v3-tiles { gap: 8px; margin-top: 12px; }
  .home-v3 .button.home-v3-service { padding: 10px 3px 12px; border-radius: 14px; }
  .home-v3 .home-v3-service > span { gap: 5px; }
  .home-v3 .home-service-art { height: 64px; }
  .home-v3 .home-v3-service strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-v3 .button { transition: none; }
  .home-v3 .button:is(.home-v3-service, .home-v3-visit, .home-start-button):is(:hover, :active) { transform: none; }
}
