/* S3 Aesthetics Demo theme, layered on the finder stylesheet (styles.css keeps the layout).
   Same neutral demo brand as the Patient Hub (s3-aesthetics-hub/demo.css): charcoal and warm clay,
   Montserrat and Figtree, a typeset wordmark, and the demo notice on every page. */
:root {
  --primary: #23262b;
  --primary-2: #33373e;
  --rust: #b0613f;
  --accent-2: #8f5a43;
  --sand: #f0dfcc;
  --cream: #f6f2ed;
  --light-gray: #e7e3de;
  --mid-gray: #5d5a56;
  --orange: #b0613f;
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Montserrat', 'Figtree', -apple-system, sans-serif;
  --brand-partner: #4f6f64;
}

/* ── Light and dark (2026-10-14). The page follows the visitor's system setting until they pick one with the
   header's sun/moon button; theme.js stores the pick and the inline script in <head> sets data-theme before paint.
   Surfaces, text and lines read from these tokens; the header stays charcoal in both. Photos are never recolored. ── */
:root {
  color-scheme: light;
  --act: var(--accent);
  --act-hover: var(--accent-dark);
  --on-act: #ffffff;
  --ok: #047857;
  --bad: #dc2626;
  --err: #dd3333;
  --ph-portrait: #b3b3b3;
  --surface: #ffffff;
  --ink: var(--primary);
  --on-ink: #ffffff;
  --clay: #a0573a;
  --on-clay: #ffffff;
  --line: rgba(35,38,43,.18);
  --line-soft: rgba(35,38,43,.12);
  --hover: rgba(35,38,43,.06);
  --chip-bg: var(--sand);
  --chip-ink: var(--primary);
  --focus: #b0613f;
  --placeholder: #767069;
  --photo-bg: #ece8e3;
  --ph-a: #efebe6;
  --ph-b: #e2ddd6;
  --ph-ink: #645e58;
  --panel-dark: var(--primary);
  --hdr-edge: transparent;
  --legal-bg: #efefef;
  --legal-ink: #222222;
  --chev: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323262b' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141517;
  --surface: #1c1e21;
  --cream: #24272b;
  --off-white: #24272b;
  --light-gray: #33373d;
  --border: #33373d;
  --text: #ece8e3;
  --mid-gray: #a9a39b;
  --ink: #ece8e3;
  --on-ink: #141517;
  --clay: #d0825f;
  --on-clay: #141517;
  --line: rgba(255,255,255,.16);
  --line-soft: rgba(255,255,255,.1);
  --hover: rgba(255,255,255,.05);
  --chip-bg: #3a322b;
  --chip-ink: #ece8e3;
  --focus: #d0825f;
  --placeholder: #928c84;
  --photo-bg: #2a2d31;
  --ph-a: #24272b;
  --ph-b: #1c1e21;
  --ph-ink: #a9a39b;
  --panel-dark: #24272b;
  --hdr-edge: #33373d;
  --legal-bg: #1c1e21;
  --legal-ink: #a9a39b;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.28);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  --chev: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ece8e3' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  --card: #1c1e21;
  --bg-primary: #1c1e21;
  --bg-secondary: #24272b;
  --text-secondary: #a9a39b;
  --orange: #d0825f;
  --ok: #34d399;
  --bad: #f87171;
  --err: #f87171;
  --ph-portrait: #3a3d42;
  --act: #ece8e3;
  --act-hover: #d0825f;
  --on-act: #141517;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141517;
    --surface: #1c1e21;
    --cream: #24272b;
    --off-white: #24272b;
    --light-gray: #33373d;
    --border: #33373d;
    --text: #ece8e3;
    --mid-gray: #a9a39b;
    --ink: #ece8e3;
    --on-ink: #141517;
    --clay: #d0825f;
    --on-clay: #141517;
    --line: rgba(255,255,255,.16);
    --line-soft: rgba(255,255,255,.1);
    --hover: rgba(255,255,255,.05);
    --chip-bg: #3a322b;
    --chip-ink: #ece8e3;
    --focus: #d0825f;
    --placeholder: #928c84;
    --photo-bg: #2a2d31;
    --ph-a: #24272b;
    --ph-b: #1c1e21;
    --ph-ink: #a9a39b;
    --panel-dark: #24272b;
    --hdr-edge: #33373d;
    --legal-bg: #1c1e21;
    --legal-ink: #a9a39b;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.28);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
    --chev: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ece8e3' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    --card: #1c1e21;
    --bg-primary: #1c1e21;
    --bg-secondary: #24272b;
    --text-secondary: #a9a39b;
    --orange: #d0825f;
    --ok: #34d399;
    --bad: #f87171;
    --err: #f87171;
    --ph-portrait: #3a3d42;
    --act: #ece8e3;
    --act-hover: #d0825f;
    --on-act: #141517;
  }
}

/* Header: charcoal in both themes; in dark a hairline keeps it from melting into the page */
header { border-bottom: 1px solid var(--hdr-edge); }
.mobile-menu { border-bottom: 1px solid var(--hdr-edge); }
/* Keyboard focus, visible on light, dark and the charcoal header */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Sun/moon button: icon-only in the header, a labelled row in the phone menu */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; padding: 0; margin: 0 -8px; border: none; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .2s, color .2s; }
.theme-toggle:hover { background: rgba(255,255,255,.1); color: var(--sand); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ic-sun, .theme-toggle .tt-label { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
.mobile-menu .theme-toggle { display: flex; justify-content: flex-start; gap: 10px; width: 100%; height: auto; margin: 0; padding: 14px 20px; border-radius: 0; font: inherit; font-size: 16px; font-weight: 400; letter-spacing: .4px; text-align: left; }
.mobile-menu .theme-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.mobile-menu .theme-toggle svg { width: 16px; height: 16px; }
.mobile-menu .theme-toggle .tt-label { display: inline; }
/* Phones: the header row is full (logo, three icons, menu), so the toggle lives in the menu there */
@media (max-width: 560px) { .header-right .theme-toggle { display: none; } }

/* The demo notice sits above everything */
.demo-notice { flex-shrink: 0; background: var(--chip-bg); color: var(--chip-ink); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; text-align: center; padding: 7px 16px; position: relative; z-index: 1001; }

/* Wordmark: no client logo, so a typeset one (matches the hub) */
.brand { gap: 12px; color: var(--white); text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; background: var(--sand); color: var(--primary); font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-word { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.brand-word small { font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--sand); }
@media (max-width: 900px) {
  .brand-mark { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .brand-word { font-size: 20px; }
}
@media (max-width: 400px) { .brand-word small { display: none; } }

/* Serif display names, like the hub */
.panel-name, .card-name, .provider-card-name, .call-sheet-loc, .provider-carousel-title, .text-us-bar-title, .text-us-overlay-name { font-family: var(--serif); font-weight: 600; }
.panel-role { margin: -2px 0 14px; font-size: 13.5px; color: var(--text-secondary); }
.card-role { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* Pins: charcoal with a sand "S3"; the selected pin turns clay. The partner practice
   (Nashville) keeps its own green pin and "P" mark. */
.marker-logo {
  -webkit-mask: none !important; mask: none !important; background: none !important;
  width: auto; height: auto; top: 7px;
  font: 700 10.5px/1 var(--font); letter-spacing: -.02em; color: var(--sand);
}
.custom-marker.active .pin-shape { fill: var(--rust); }
.custom-marker.active .marker-logo { color: var(--white); }
.custom-marker.brand-partner .pin-shape { fill: var(--brand-partner); }
.custom-marker.brand-partner .marker-logo { color: var(--white); font-size: 12px; top: 6px; }
.custom-marker.brand-partner.active .pin-shape { fill: var(--brand-partner); }

/* Phones: the open panel fills the space under the demo notice (the notice stays visible) */
@media (max-width: 900px) {
  body.panel-open-mode .detail-panel.open { height: 100% !important; }
}

/* ── Request a Consultation form (NanoKnee layout, demo palette; 2026-10-14) ── */
.panel-form { border-top: 1px solid var(--border); margin-top: 4px; scroll-margin-top: 12px; }
.form-header h3 { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.form-body { max-height: 1200px; }
.form-submit:hover, .form-submit.ready:hover { background: var(--act-hover); }
.form-demo-note { margin-top: 10px; font-size: 12px; color: var(--text-secondary); text-align: center; }
.form-thanks-icon { background: var(--act-hover); }
.form-thanks-title { font-family: var(--serif); font-weight: 600; font-size: 20px; }
@media (max-width: 420px) { .panel-form .form-row { flex-direction: column; gap: 12px; } }

/* ── Richer location + provider panels (2026-10-14) ── */
.info-section { padding: 16px 0 4px; }
.info-title { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.info-text { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink); }
.amenity-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.amenity-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.amenity-list svg { flex-shrink: 0; color: var(--clay); margin-top: 1px; }
@media (max-width: 420px) { .amenity-list { grid-template-columns: 1fr; } }

.loc-provider-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.loc-provider-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); background: var(--card); transition: background .12s; }
.loc-provider-row:last-child { border-bottom: none; }
.loc-provider-row:hover { background: var(--cream); }
.loc-provider-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center top; flex-shrink: 0; background: var(--light-gray); }
.loc-provider-img.office { border-radius: 8px; width: 56px; height: 40px; object-position: center; }
.loc-provider-info { flex: 1; min-width: 0; }
.loc-provider-name { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); }
.loc-provider-role { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-provider-link { font-size: 12.5px; font-weight: 600; color: var(--clay); text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; }
.loc-provider-chev { color: var(--text-secondary); flex-shrink: 0; }

.profile-link { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--cream); transition: border-color .15s, background .15s; }
.profile-link:hover { border-color: var(--clay); background: var(--card); }
.profile-link span { flex: 1; text-decoration: underline; text-decoration-color: var(--clay); text-underline-offset: 3px; }
.profile-link svg { color: var(--clay); flex-shrink: 0; }

.fact-strip { display: flex; gap: 0; margin: 14px 0 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.fact-cell { flex: 1; min-width: 0; padding: 10px 12px; border-right: 1px solid var(--border); }
.fact-cell:last-child { border-right: none; }
.fact-val { font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.fact-lbl { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-chip { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); }

.provider-quote { margin: 4px 0 8px; padding: 14px 18px; border-left: 3px solid var(--clay); background: var(--cream); border-radius: 0 10px 10px 0; }
.provider-quote p { margin: 0 0 6px; font-family: var(--serif); font-size: 15.5px; font-weight: 500; line-height: 1.5; font-style: normal; color: var(--ink); }
.provider-quote cite { font-style: normal; font-size: 12px; color: var(--text-secondary); letter-spacing: .02em; }
.fact-list { margin: 0; }
.fact-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fact-row:last-child { border-bottom: none; }
.fact-row dt { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.fact-row dd { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
@media (max-width: 420px) { .fact-row { grid-template-columns: 1fr; gap: 2px; } }
.more-links { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.more-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); background: var(--card); }
.more-link:last-child { border-bottom: none; }
.more-link:hover { background: var(--cream); color: var(--clay); }
.more-link svg { color: var(--text-secondary); }
.about-overview p + p { margin-top: 12px; }

/* Link chip inside a details block: clear of the divider above, a row's worth of air below (2026-10-14) */
.panel-details > .profile-link { margin: 18px 0 10px; }
.panel-details > .profile-link:last-child { margin-bottom: 4px; }

/* Services pills inside a details row */
.detail-content .service-pills { margin-top: 8px; }

/* ── Dark theme: map chrome (2026-10-14). Tiles switch to CARTO dark_all in app.js; pins get a light halo
   so the charcoal pin reads on the dark map; Leaflet's zoom buttons and attribution follow the surfaces. ── */
:root[data-theme="dark"] .custom-marker { filter: drop-shadow(0 0 1.5px rgba(236,232,227,.9)) drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
:root[data-theme="dark"] .leaflet-bar a { background: var(--card); color: var(--ink); border-bottom-color: var(--border); }
:root[data-theme="dark"] .leaflet-bar a:hover { background: var(--off-white); }
:root[data-theme="dark"] .leaflet-bar { border-color: var(--border); }
:root[data-theme="dark"] .leaflet-container { background: #262626; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: url(#s3MapNeutral); }   /* dark_all is blue-tinted: the SVG filter in index.html turns tiles pure gray (water near-black, land dark gray, roads and labels lighter); pins and UI sit in other panes, unfiltered */
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(20,21,23,.8); color: var(--text-secondary); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--ink); }
:root[data-theme="dark"] .action-img { filter: invert(.92); }   /* the black camera icon (a UI glyph, not a photo) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .custom-marker { filter: drop-shadow(0 0 1.5px rgba(236,232,227,.9)) drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
  :root:not([data-theme="light"]) .leaflet-bar a { background: var(--card); color: var(--ink); border-bottom-color: var(--border); }
  :root:not([data-theme="light"]) .leaflet-bar a:hover { background: var(--off-white); }
  :root:not([data-theme="light"]) .leaflet-bar { border-color: var(--border); }
  :root:not([data-theme="light"]) .leaflet-container { background: #262626; }
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: url(#s3MapNeutral); }
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(20,21,23,.8); color: var(--text-secondary); }
  :root:not([data-theme="light"]) .leaflet-control-attribution a { color: var(--ink); }
  :root:not([data-theme="light"]) .action-img { filter: invert(.92); }
}

/* Titles are Montserrat (Andrés, 2026-10-14): semibold, a touch tighter */
.panel-name { font-size: 20px; letter-spacing: -.015em; text-wrap: balance; }   /* Montserrat runs wider: "S3 Aesthetics Demo - Charlotte" stays on one line in the 360px panel */
.card-name, .provider-card-name { text-wrap: balance; }
.side-title, .jm-name, .pv-title, .ath-cta h2, .panel-name, .card-name, .provider-card-name { letter-spacing: -0.01em; }
