/* Shared atoms for the three direction studies. Loads after elevation.css and uses its tokens.
 * No internal divider lines: rhythm comes from spacing, type weight and quiet grounds. */
body.dx{--g:#16835b;--g-ink:#0f5c40;--g-bg:#edf6f1;--g-bg2:#f4faf7;--ink2:#2b2f35;--quiet:#f3f4f6;--r-card:18px}
body.dx :where(h1,h2,h3,p,ul,li,figure){margin:0}
body.dx :where(ul){padding:0;list-style:none}
body.dx .os-btn.pri{background:linear-gradient(180deg,#1b9467,#16835b);color:#fff;border-color:transparent}
body.dx .os-btn.pri svg{color:#fff}
body.dx .os-btn.pri[aria-pressed=true]{background:var(--g-bg);color:var(--g-ink);box-shadow:inset 0 0 0 1px rgb(22 131 91/.3)}
body.dx .os-btn.pri[aria-pressed=true] svg{color:var(--g-ink)}
body.dx .os-contour::before{left:0;right:0}
body.dx .dx-page{display:block}
body.dx .os-footer{margin-top:56px}

/* avatars and facility tiles */
.dx-av{width:44px;height:44px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgb(15 17 20/.08);flex:none;object-fit:cover}
.dx-av.is-fac{display:grid;place-items:center;border-radius:12px;background:var(--quiet);color:var(--dim);box-shadow:none}
.dx-av.is-fac svg{width:22px;height:22px}
.dx-big{width:84px;height:84px;border-radius:50%;background:#fff;box-shadow:var(--elev-2);flex:none}
.dx-k{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--quiet);color:var(--dim);font:600 11px/1 Inter;font-style:normal;font-variant-numeric:tabular-nums}

/* state marks: the official Phosphor glyph only */
.dx-st{display:inline-grid;place-items:center;flex:none;width:20px;height:20px;color:#8a9099}
.dx-st .dx-sti{width:18px;height:18px}
.dx-st.is-ok{color:var(--g)}
.dx-st.is-held{color:#b7791f}
.dx-na{color:var(--faint);font-weight:400}
.dx-meta{color:var(--faint);font-size:12.5px;line-height:1.6}

/* compare toggle: Phosphor plus/check swap */
.dx-cmp{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;font:500 12.5px/1 Inter;color:var(--ink2);background:var(--raise-grad);box-shadow:var(--elev-1);transition:var(--elev-t);cursor:pointer;border:0}
.dx-cmp svg{width:14px;height:14px}
.dx-cmp .dx-cmp-on{display:none}
/* selected: the solid green primary, stops deepened to #16835b-#0f6a48 so the white label holds 4.5:1 */
.dx-cmp[aria-pressed=true]{background:linear-gradient(#16835b,#0f6a48);color:#fff;box-shadow:var(--elev-primary)}
.dx-cmp[aria-pressed=true] .dx-cmp-on{display:block}.dx-cmp[aria-pressed=true] .dx-cmp-off{display:none}
.dx-cmp span:empty{display:none}
.dx-cmp:has(span:empty){width:32px;padding:0;justify-content:center}
@media(hover:hover) and (pointer:fine){.dx-cmp:hover{transform:translateY(-1px);box-shadow:var(--elev-1-hover)}.dx-cmp[aria-pressed=true]:hover{background:linear-gradient(#16835b,#0e6244);box-shadow:var(--elev-primary-hover)}}
.dx-cmp:active{transform:none;box-shadow:var(--elev-pressed)}
.dx-cmp[aria-pressed=true]:active{background:linear-gradient(#0f6a48,#0e6244);box-shadow:var(--elev-primary-pressed)}
.dx-cmp:focus-visible{outline:3px solid #9fcfb9;outline-offset:3px}

/* compare tray */
.dx-tray{display:flex;align-items:center;gap:12px;padding:10px 10px 10px 14px;border-radius:16px;background:#fff;box-shadow:var(--elev-3);font-size:13px}
/* the tray is a floating dock centred on the viewport, above the map and below the header's popovers (nav z 60) and dialogs.
 * It fades and rises in when the first doctor is picked and out when the last is removed; dx.js toggles .is-in, then [hidden].
 * While it shows, dx.js sets --dx-dock to the band it covers and the page or the B sheet list gains that much bottom room. */
body.lp.os.dx .dx-tray{position:fixed;left:50%;right:auto;top:auto;bottom:calc(20px + env(safe-area-inset-bottom));z-index:40;width:min(520px,calc(100vw - 32px));margin:0;transform:translate(-50%,0);opacity:1;transition:opacity .22s ease,transform .26s cubic-bezier(.2,.8,.2,1)}
body.lp.os.dx .dx-tray:not(.is-in){opacity:0;transform:translate(-50%,14px);pointer-events:none}
body.lp.os.dx:not(.dx-app)::after{content:'';display:block;height:var(--dx-dock,0px)}
/* B: the panel fills the left edge, so the dock centres over the map area beside it (panel 16px + 452px), stays narrow
 * enough to clear the zoom controls at the bottom right, and sits above the map's attribution caption */
body.lp.os.dx-b .dx-tray{left:calc(50vw + 234px);width:min(480px,calc(100vw - 612px));bottom:56px}
@media(max-width:860px){
  /* A and C: the dock sits above the Map/List pill */
  body.lp.os.dx .dx-tray{bottom:calc(80px + env(safe-area-inset-bottom));padding:8px 8px 8px 12px}
  body.lp.os.dx .dx-tray .os-btn{flex:none}
  /* B: the panel is a bottom sheet with no pill; the dock floats over its foot and the list gains room under it */
  body.lp.os.dx-b .dx-tray{left:50%;width:calc(100vw - 24px);bottom:calc(12px + env(safe-area-inset-bottom))}
  body.lp.os.dx-b .dx-places{padding-bottom:calc(10px + var(--dx-dock,0px))}
}
@media(prefers-reduced-motion:reduce){body.lp.os.dx .dx-tray{transition:none}}
.dx-tray[hidden]{display:none}
.dx-tray-faces{display:flex}.dx-tray-faces img{width:28px;height:28px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #fff;margin-left:-6px}.dx-tray-faces img:first-child{margin-left:0}
.dx-tray-t{flex:1;color:var(--dim)}.dx-tray-t b{color:var(--ink)}
.dx-tray .os-btn{height:36px}

/* breadcrumb and profile header */
.dx-crumb{margin:0 0 22px}
.dx-ph{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:22px;padding:18px 0 30px}
.dx-ph.is-plain{grid-template-columns:minmax(0,1fr) auto}
.dx-ph h1{font-size:34px;line-height:1.1;font-weight:600;letter-spacing:-.035em}
.dx-ph p{margin-top:8px;color:var(--dim);font-size:15px;line-height:1.55}
.dx-acts{display:flex;gap:8px;flex-wrap:wrap}
.dx-acts .os-btn{height:38px}

/* the one optional sources section */
.dx-sources{margin-top:40px;border-radius:var(--r-card);background:#fff;box-shadow:var(--elev-2)}
.dx-sources>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;cursor:pointer;list-style:none;font-size:14px;font-weight:550}
.dx-sources>summary::-webkit-details-marker{display:none}
.dx-sources>summary>span{display:flex;align-items:center;gap:10px}
.dx-sources>summary svg{width:17px;height:17px;color:var(--faint)}
.dx-sources .dx-car{transition:transform .2s}
.dx-sources[open] .dx-car{transform:rotate(180deg)}
.dx-sources-body{padding:2px 22px 22px;display:grid;gap:16px}
.dx-sources-body>p{color:var(--dim);font-size:13.5px;line-height:1.6}
.dx-sources-body ul{display:grid;gap:4px}
.dx-sources-body li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;margin:0;border-radius:10px;background:var(--quiet)}
.dx-sources-body li span{display:grid;gap:2px;font-size:13px}.dx-sources-body li small{color:var(--faint);font-size:12px}
.dx-sources-body li a{display:inline-flex;align-items:center;gap:5px;color:var(--g-ink);font-size:12.5px;font-weight:550;white-space:nowrap}
.dx-sources-body li a svg{width:13px;height:13px}

/* map pins and minis (canvas and grid come from search.css) */
.dx-pin{position:absolute;z-index:2;transform:translate(-50%,-50%);text-decoration:none}
.dx-pin[hidden]{display:none}
.dx-pin b{display:inline-flex;align-items:center;gap:5px;height:28px;min-width:28px;padding:0 9px;justify-content:center;border-radius:14px;background:#fff;color:var(--ink);font:650 12px/1 Inter;font-variant-numeric:tabular-nums;box-shadow:0 0 0 1px rgb(15 17 20/.14),0 2px 6px rgb(15 17 20/.16);transition:transform .16s,background .16s,color .16s,box-shadow .16s}
.dx-pin b svg{width:13px;height:13px}
.dx-pin.is-fac b{border-radius:8px}
.dx-pin.is-pub b{box-shadow:0 0 0 2px var(--g),0 2px 6px rgb(15 17 20/.16)}
.dx-pin.is-on{z-index:6}.dx-pin.is-on b{background:var(--ink);color:#fff;transform:scale(1.1);box-shadow:0 0 0 3px #fff,0 6px 14px rgb(15 17 20/.3)}
.dx-pin.is-office b{background:var(--ink);color:#fff;box-shadow:0 0 0 3px #fff,0 4px 10px rgb(15 17 20/.25)}
.dx-mini{position:relative;height:200px;border-radius:14px;overflow:hidden;background:#eef1f5;border:0;box-shadow:var(--elev-inset)}
.dx-mini .os-cv{left:50%;top:50%}
.dx-attr{position:absolute;left:14px;bottom:12px;z-index:8;padding:5px 10px;border-radius:8px;background:rgb(255 255 255/.86);backdrop-filter:blur(6px);color:var(--dim);font-size:11.5px}

/* context rows: group or hospital results, labelled by entity icon */
.dx-ctx{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;align-items:start;padding:12px 0}
.dx-ctx>svg{width:36px;height:36px;padding:8px;border-radius:10px;background:var(--quiet);color:var(--dim)}
.dx-ctx p{font-size:14px;line-height:1.6;color:var(--ink2);padding-top:6px}

/* bar charts at body size */
.dx-axis{display:grid;gap:12px;margin-top:18px}
.dx-bar{display:grid;grid-template-columns:minmax(150px,240px) minmax(0,1fr);gap:16px;align-items:center}
.dx-bn{display:flex;align-items:center;gap:10px;font-size:13.5px;font-weight:500;color:var(--ink2);min-width:0}
.dx-bn .dx-av{width:28px;height:28px}
.dx-bt{display:block;height:30px;padding-right:96px;min-width:0}
.dx-bt>.dx-na{display:flex;align-items:center;height:100%;white-space:normal;line-height:1.4}
.dx-bw{position:relative;display:block;height:100%}
.dx-bf{position:absolute;left:0;top:50%;height:12px;width:var(--w);min-width:6px;margin-top:-6px;border-radius:6px;background:var(--g)}
.dx-bf.is-range{background:repeating-linear-gradient(90deg,#9fcfb9 0 6px,#cfe7db 6px 10px)}
.dx-bl{position:absolute;left:calc(max(var(--w),6px) + 10px);top:50%;transform:translateY(-50%);font-size:13px;color:var(--dim);white-space:nowrap}.dx-bl b{color:var(--ink);font-weight:650}
.dx-ticks{display:grid;grid-template-columns:minmax(150px,240px) minmax(0,1fr);gap:16px;color:var(--faint);font-size:11px}
.dx-ticks>span:last-child{position:relative;height:16px;margin-right:96px}
.dx-ticks i{position:absolute;transform:translateX(-50%);font-style:normal}
.dx-ticks i:first-child{transform:none}.dx-ticks i:last-child{transform:translateX(-100%)}

/* rail card with offices */
.dx-railcard{display:grid;gap:14px;padding:18px;border-radius:var(--r-card);background:#fff;box-shadow:var(--elev-2)}
.dx-railcard h2{font-size:16px;font-weight:600;letter-spacing:-.01em}
.dx-office{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;font-size:13px}
.dx-office>div{display:grid;gap:3px}.dx-office span,.dx-office small{color:var(--faint)}
.dx-office a{color:var(--g-ink);font-weight:550}

/* mobile map toggle (A and C) */
.dx-maptoggle{display:none}

/* gallery */
.dx-dirs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.dx-dir{display:flex;flex-direction:column;gap:12px;padding:24px;border-radius:var(--r-card);background:#fff;box-shadow:var(--elev-2)}
.dx-dir h2{font-size:22px;font-weight:600;letter-spacing:-.02em}
.dx-dir p{color:var(--dim);font-size:14px;line-height:1.6}
.dx-dir small{color:var(--faint);font-size:12.5px;line-height:1.5}
.dx-dir nav{display:grid;gap:6px;margin-top:auto;padding-top:10px}
.dx-dir nav a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:12px;background:var(--quiet);font-size:14px;font-weight:550;transition:background .15s}
.dx-dir nav a:hover{background:var(--g-bg);color:var(--g-ink)}
.dx-dir nav svg{width:17px;height:17px}.dx-dir nav span{flex:1}

@media(max-width:1000px){.dx-dirs{grid-template-columns:1fr}}
@media(max-width:760px){
  .dx-ph{grid-template-columns:auto minmax(0,1fr);gap:16px;padding-bottom:22px}
  .dx-ph.is-plain{grid-template-columns:1fr}
  .dx-ph h1{font-size:26px}
  .dx-ph .dx-acts{grid-column:1/-1}
  .dx-big{width:64px;height:64px}
  .dx-bar,.dx-ticks{grid-template-columns:1fr;gap:6px}
  .dx-ticks>span:first-child{display:none}
  .dx-maptoggle{display:inline-flex}
  body.dx .os-toggle.dx-maptoggle{border:0}
}

/* ───── header row: brand, the search at its natural width, the filter chips inline, then the links.
 * --dx-bar is the height of the chips bar under the header. It is 0 where the chips sit in the header row,
 * and only results pages (the ones with a bar) take a non-zero value below the inline breakpoint. B's map app sizes its stage with it. */
body.dx{--dx-bar:0px}
body.dx .os-nav .os-q{flex:none;width:auto;min-width:0}
body.dx .os-nav .os-q .os-f{flex:none;min-width:0;padding-right:30px}
body.dx .os-nav .os-q .os-f.is-loc{padding-right:14px}
body.dx .os-nav .os-q .os-fv input{flex:none;field-sizing:content;width:auto;min-width:9ch;max-width:min(300px,24vw)}
body.dx .os-nav .os-q .os-f.is-loc .os-fv input{max-width:min(200px,16vw)}
body.dx .os-nav .os-x{right:5px}
@media(min-width:761px){body.dx>.os-bar .os-chips{padding-inline:36px}}
body.dx .dx-hchips{display:none;flex:none;min-width:0}
body.dx .dx-hchips .os-chips{padding:0;gap:8px;overflow:visible;flex-wrap:nowrap}
body.dx .os-nav .lp-links{margin-left:auto}
@media(min-width:1241px){
  body.dx .dx-hchips{display:block}
  body.dx>.os-bar{display:none}
  body.dx .os-nav-in{gap:22px}
}
@media(min-width:1241px) and (max-width:1300px){body.dx .os-nav-in{gap:16px}}
@media(max-width:1240px){body.dx:has(>.os-bar){--dx-bar:58px}}
@media(max-width:760px){body.dx:has(>.os-bar){--dx-bar:52px}}
/* the header and the chips bar scroll away; the map column sticks to the top of the viewport, its own 16px padding is the inset */
body.dx .os-mapcol{top:0;height:100dvh}

/* compare dock: OpenHealth green ground (#127a54 to #0d5a3f) with an inset top highlight and a primary-tinted lift, white text
 * (secondary at .92, at least 5.1:1), rings in the tray green, and the Compare action as a white raised button in green ink. */
body.lp.os.dx .dx-tray{background:linear-gradient(#127a54,#0d5a3f);border-color:#0d5a3f;color:rgb(255 255 255/.92);box-shadow:inset 0 1px 0 rgb(255 255 255/.22),0 0 0 1px rgb(22 131 91/.5),0 8px 16px -4px rgb(22 131 91/.3),0 24px 48px -12px rgb(10 70 48/.4)}
body.lp.os.dx .dx-tray-t{color:rgb(255 255 255/.92)}body.lp.os.dx .dx-tray-t b{color:#fff}
body.lp.os.dx .dx-tray-faces img{box-shadow:0 0 0 2px #10694a}
body.lp.os.dx .dx-tray .os-btn{background:var(--raise-grad);border:1px solid transparent;color:#0f6a48;box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgb(5 45 30/.22),0 1px 2px rgb(5 45 30/.22),0 4px 10px -2px rgb(5 45 30/.32)}
body.lp.os.dx .dx-tray .os-btn svg{color:#0f6a48}
@media(hover:hover) and (pointer:fine){body.lp.os.dx .dx-tray .os-btn:hover{background:linear-gradient(#fff,#f2f6f4);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgb(5 45 30/.26),0 2px 4px rgb(5 45 30/.24),0 8px 18px -4px rgb(5 45 30/.4)}}
body.lp.os.dx .dx-tray .os-btn:active{background:#eef3f0;box-shadow:inset 0 1px 3px rgb(5 45 30/.28),0 0 0 1px rgb(5 45 30/.3)}
body.lp.os.dx .dx-tray .os-btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
.dx-callout[hidden]{display:none}
body.dx .dx-item[hidden],body.dx .dx-pin[hidden]{display:none}
