/* r21d: tablet Where card, wider dialogs, phone Where fixes, treat list, review expand */

/* Phone numbers never wrap */
a[href^="tel:"], .c-phone, .wx-call, .hf-call, .hb-call, .rv-bar-call{
  white-space:nowrap;
}
.c-phone{white-space:nowrap}

/* ----- Desktop: keep 3-col, slightly roomier card so ER + text above it fit after reorder ----- */
@media (min-width:1101px){
  .wx-card{height:820px}
}

/* ----- Tablet / small laptop: 2-column, no clipping, height holds across states ----- */
@media (max-width:1100px) and (min-width:641px){
  .wx-card{
    grid-template-columns:minmax(220px,280px) minmax(0,1fr);
    grid-template-rows:minmax(420px,auto) auto;
    height:auto;
    min-height:var(--wx-ph, 920px);
    overflow:visible;
  }
  .wx-list{grid-column:1;grid-row:1;border-right:1px solid var(--hair)}
  .wx-view{grid-column:2;grid-row:1;border-right:0;min-height:420px}
  .wx-det{
    grid-column:1 / -1;
    grid-row:2;
    padding:22px 28px 24px;
    border-top:1px solid var(--hair);
  }
  .wx-body{overflow:visible;flex:none}
  .wx-dur{flex-wrap:wrap}
  .wx-seg button{white-space:nowrap}
  .wx-two{grid-template-columns:1fr 1fr}
  .wx-h{font-size:26px}
}

/* Dialog uses the same 2-col Where layout even on a 1440 desktop,
   because the 1100px panel is too tight for the 3-col card. */
@media (min-width:641px){
  .sec-dlg-body .wx-card{
    grid-template-columns:minmax(220px,280px) minmax(0,1fr);
    grid-template-rows:minmax(400px,auto) auto;
    height:auto;
    min-height:0;
    overflow:visible;
    margin-top:16px;
  }
  .sec-dlg-body .wx-list{grid-column:1;grid-row:1;border-right:1px solid var(--hair)}
  .sec-dlg-body .wx-view{grid-column:2;grid-row:1;border-right:0;min-height:400px}
  .sec-dlg-body .wx-det{
    grid-column:1 / -1;
    grid-row:2;
    padding:22px 28px 24px;
    border-top:1px solid var(--hair);
  }
  .sec-dlg-body .wx-body{overflow:visible;flex:none}
}

/* ----- Phone Where card ----- */
@media (max-width:640px){
  .wx-card{
    height:auto;
    min-height:0;
    grid-template-rows:auto auto auto;
    overflow:visible;
  }
  .wx-rg{min-height:44px;display:inline-flex;align-items:center;padding:10px 16px}
  .wx-seg button{min-height:44px;padding:10px 8px}
  /* Upright, readable spine instead of a 96px sideways sliver */
  .wx-view{height:240px}
  .wx-spbox{
    top:12px;bottom:12px;left:50%;
    height:auto;aspect-ratio:1/3;
    transform:translateX(-50%);
  }
  .wx-view.wx-live .wx-spbox{opacity:0;pointer-events:none}
  .wx-warn, .wx-warn h4, .wx-warn li, .wx-warn .rare{font-size:14px;line-height:1.5}
  .wx-body{overflow:visible;flex:none}
}

/* ER type: at least 14px everywhere */
.wx-warn, .wx-warn h4, .wx-warn li, .wx-warn .rare{font-size:14px;line-height:1.5}

/* ----- Nav dialogs: ~1100px on desktop, reflow each section ----- */
@media (min-width:641px){
  .sec-dlg-panel{width:min(1100px, calc(100% - 32px))}
  /* Contact: phone stays one line; details card fits */
  .sec-dlg-body .cgrid{
    grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
    gap:40px;
    align-items:start;
  }
  .sec-dlg-body .c-phone{font-size:34px;white-space:nowrap}
  .sec-dlg-body .cinfo{min-width:0}
  .sec-dlg-body .cinfo div{grid-template-columns:minmax(5.5rem,7.5rem) minmax(0,1fr);gap:12px;padding:16px 20px}
  .sec-dlg-body .cinfo dd{overflow-wrap:anywhere}
  .sec-dlg-body .cinfo a[href^="tel:"]{white-space:nowrap;overflow-wrap:normal}
  /* Care team: photo + wrapping text, not one word per line */
  .sec-dlg-body .hf-cards,
  .sec-dlg-body .home.ov .hf-cards{
    grid-template-columns:1fr;
    gap:32px;
  }
  .sec-dlg-body .hf-card,
  .sec-dlg-body .home.ov .hf-card,
  .sec-dlg-body .home.ov.r11 .ct11 .ct-lead,
  .sec-dlg-body .home.ov.r11 .ct11 .ct-team{
    grid-template-columns:minmax(140px,200px) minmax(0,1fr);
    column-gap:28px;
  }
  .sec-dlg-body .hf-card .role,
  .sec-dlg-body .hf-card h3,
  .sec-dlg-body .hf-card .bio,
  .sec-dlg-body .hf-card .hf-id{max-width:none;overflow-wrap:break-word;word-break:normal;hyphens:manual}
  /* FAQ: stack heading above questions */
  .sec-dlg-body .fgrid,
  .sec-dlg-body .home .hf .fgrid,
  .sec-dlg-body .faq .fgrid{
    display:flex;
    flex-direction:column;
    gap:16px;
  }
  .sec-dlg-body .faq .fhead .h2,
  .sec-dlg-body .home.ov .faq .fhead .h2{max-width:none}
  /* First visit: allow the checklist to use the width */
  .sec-dlg-body .visit .wrap,
  .sec-dlg-body #visit .wrap{max-width:none}
}

/* Phone pop-ups stay as they were (full-screen sheet). */

/* ----- What we treat ----- */
.treat{margin-top:36px}
.treat-cap{margin:0 0 12px}
.treat-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.treat-list li{
  margin:0;
  padding:8px 12px;
  border:1px solid rgba(13,26,44,.12);
  border-radius:999px;
  background:#fff;
  font-size:13.5px;
  font-weight:500;
  line-height:1.3;
  color:#0D1A2C;
}
@media (max-width:640px){
  .treat{margin-top:28px}
  .treat-list li{font-size:13px;padding:7px 11px}
}

/* ----- Review "Read more" and quote dialog ----- */
.rvx-quote{position:relative}
.rvx-more{
  display:inline;
  margin:8px 0 0;
  padding:0;
  border:0;
  background:none;
  font:inherit;
  font-size:13.5px;
  font-weight:600;
  letter-spacing:.01em;
  color:#284F80;
  text-decoration:underline;
  text-decoration-color:rgba(40,79,128,.4);
  text-underline-offset:3px;
  cursor:pointer;
  min-height:44px;
  min-width:44px;
}
.rvx-more[hidden]{display:none}
.rvx-more:hover{text-decoration-color:currentColor}
.rvx-more:focus-visible{outline:2px solid #A9C6EC;outline-offset:3px}
html:not(.js) .rvx-quote p{
  -webkit-line-clamp:unset;
  line-clamp:unset;
  overflow:visible;
  display:block;
}
html:not(.js) .rvx-more{display:none}

.rvx-dlg{
  border:0;
  border-radius:16px;
  padding:28px 28px 24px;
  width:min(560px, calc(100% - 32px));
  max-height:min(86vh, 640px);
  overflow:auto;
  background:#fff;
  color:#0D1A2C;
  box-shadow:0 16px 50px rgba(13,26,44,.28);
}
.rvx-dlg::backdrop{background:rgba(13,26,44,.48)}
.rvx-dlg-x{
  position:absolute;top:12px;right:12px;
  width:44px;height:44px;border:0;border-radius:50%;
  background:#F6F8FA;color:#0D1A2C;cursor:pointer;
}
.rvx-dlg-x svg{width:18px;height:18px;display:block;margin:auto}
.rvx-dlg-x:focus-visible{outline:2px solid #A9C6EC;outline-offset:2px}
.rvx-dlg{position:relative}
.rvx-dlg-h{font-size:13px;font-weight:600;letter-spacing:.01em;color:#284F80;margin:0 40px 10px 0}
.rvx-dlg-q{margin:0}
.rvx-dlg-q p{margin:0;font-size:17px;line-height:1.55;color:#1B2738}
.rvx-dlg-by{margin:18px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-size:15px;font-weight:600}
.rvx-dlg-g{font-weight:600;color:#284F80;text-decoration:underline;text-underline-offset:4px}
@media (prefers-reduced-motion:reduce){
  .rvx-dlg{transition:none}
}

/* JS word-boundary clamp. Kill CSS mid-word line-clamp. */
.home.ov.rev .rvx-quote p.rvx-vis,
.rvx-quote p.rvx-vis{
  display:block;
  overflow:hidden;
  -webkit-line-clamp:unset;
  line-clamp:unset;
  max-height:calc(1.55em * 7);
}
@media (max-width:719px){
  .home.ov.rev .rvx-quote p.rvx-vis,
  .rvx-quote p.rvx-vis{max-height:calc(1.55em * 6);font-size:16.5px}
}
html:not(.js) .home.ov.rev .rvx-quote p.rvx-vis,
html:not(.js) .rvx-quote p.rvx-vis{
  -webkit-line-clamp:unset;
  line-clamp:unset;
  overflow:visible;
  display:block;
  max-height:none;
}
@media (prefers-reduced-motion:reduce){
  .home.ov.rev .rvx-quote p.rvx-vis,
  .rvx-quote p.rvx-vis{
    -webkit-line-clamp:unset;
    line-clamp:unset;
    overflow:visible;
    display:block;
    max-height:none;
  }
}
/* Read more sits under the quote without stretching the card */
.rvx-quote{display:flex;flex-direction:column;min-height:0}
.rvx-more{align-self:start;min-height:44px;padding:8px 0 0;margin:0}
