/* DirectoryPlatform public design system. Brand colors (--brand, --brand-2, --accent) are set per tenant in App.razor. */

:root {
    /* Clean, clinical defaults (navy text, cool greys, white surfaces); each directory overrides --brand, --brand-2,
       --accent and fonts in Admin > Theme. */
    --brand: #0b5cad;
    --brand-2: #0a2f5c;
    --accent: #f5a623;
    --ink: #0b1f3a;
    --ink-2: #33445c;
    --muted: #5d6b80;
    --line: #e1e7ef;
    --line-strong: #c9d3e0;
    --surface: #ffffff;
    --surface-2: #f5f8fc;
    --surface-3: #eaf0f7;
    --ok: #17803d;
    --ok-bg: #e3f6ea;
    --warn: #8a5a12;
    --warn-bg: #fdf1d8;
    --bad: #b42318;
    --bad-bg: #fde8e6;
    --info-bg: #e7f1fb;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgb(11 31 58 / 6%), 0 6px 18px rgb(11 31 58 / 7%);
    --shadow-lg: 0 14px 40px rgb(11 31 58 / 14%);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: color-mix(in srgb, var(--brand) 80%, black); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 750; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgb(255 255 255 / 92%);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 1.05rem; text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
}
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a, .site-nav .link-button {
    color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem;
    padding: 8px 12px; border-radius: var(--radius-sm);
}
.site-nav a:hover, .site-nav .link-button:hover { background: var(--surface-3); color: var(--ink); }
.site-nav form { margin: 0; }
.nav-menu { margin-left: auto; position: relative; }
.nav-menu > summary {
    list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-weight: 600; color: var(--ink-2);
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] .site-nav {
    position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch;
    min-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.nav-menu:not([open]) .site-nav { display: none; }
@media (min-width: 860px) {
    .nav-menu > summary { display: none; }
    .nav-menu:not([open]) .site-nav, .nav-menu .site-nav { display: flex; position: static; flex-direction: row; box-shadow: none; border: 0; padding: 0; min-width: 0; }
}
.link-button { background: none; border: 0; cursor: pointer; font: inherit; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, black); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); padding-inline: 10px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%),
        radial-gradient(900px 400px at 0% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
        var(--surface-2);
    border-bottom: 1px solid var(--line);
}
.hero .container { padding-block: 56px 48px; }
.hero h1 { max-width: 760px; }
.hero-sub { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; margin-bottom: 28px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
    font-size: .85rem; font-weight: 650; color: var(--brand-2);
    background: color-mix(in srgb, var(--brand-2) 10%, white); padding: 4px 12px; border-radius: 999px;
}
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; color: var(--ink-2); font-size: .92rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--ok); }
.popular { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; }
.popular a { text-decoration: none; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.popular a:hover { border-color: var(--brand); color: var(--brand); }

/* Search form */
.search-form {
    display: grid; gap: 10px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
    max-width: 860px;
}
.search-form .field { position: relative; display: flex; flex-direction: column; }
.search-form label { font-size: .75rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 12px 0; }
.search-form select, .search-form input {
    border: 0; background: transparent; font: inherit; color: var(--ink); padding: 4px 12px 10px; min-height: 40px; width: 100%;
}
.search-form select:focus, .search-form input:focus { outline: none; }
.search-form .field:focus-within { background: var(--surface-2); border-radius: 10px; }
.search-form .btn { min-height: 52px; }
@media (min-width: 720px) {
    .search-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: stretch; }
    .search-form .field + .field { border-left: 1px solid var(--line); }
}
.search-form.compact { box-shadow: var(--shadow); max-width: none; }

/* Stats and tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat strong { display: block; font-size: 1.6rem; font-weight: 750; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .9rem; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px;
    border-radius: 10px; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); font-weight: 750;
}
.step p { color: var(--muted); margin: 0; }

.tile-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-1px); }
.tile strong { display: block; }
.tile .muted { font-size: .875rem; }
.tile .arrow { color: var(--brand); font-weight: 700; }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
    font-size: .8rem; font-weight: 600; line-height: 1.5; background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: #075985; }
.badge-demo { background: #ede9fe; color: #5b21b6; }
.badge-sponsored { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

/* Results layout */
.results-head { padding: 28px 0 8px; }
.results-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.results-layout { display: grid; gap: 24px; padding-bottom: 56px; }
@media (min-width: 960px) { .results-layout { grid-template-columns: 290px minmax(0, 1fr); align-items: start; } }
.results-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.results-list { display: grid; gap: 14px; }
.notice { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.notice-warn { background: var(--warn-bg); border-color: #fde68a; color: #713f12; }
.empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Filters */
.filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filters > summary {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
    font-weight: 650; cursor: pointer; list-style: none;
}
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); }
.filters[open] > summary::after { content: "\2212"; }
@media (min-width: 960px) {
    .filters { position: sticky; top: 84px; }
    .filters > summary { pointer-events: none; }
    .filters > summary::after { content: none; }
}
.filter-body { padding: 0 16px 16px; display: grid; gap: 18px; }
.filter-group { display: grid; gap: 8px; }
.filter-group > .label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.input, .select {
    width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
    font: inherit; color: var(--ink); background: var(--surface);
}
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }

/* Listing cards */
.card {
    display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-sponsored { border-color: #fed7aa; background: linear-gradient(0deg, var(--surface), #fffbf5); }
.card-top { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; }
.card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.card .meta svg { width: 15px; height: 15px; }
.price { text-align: right; min-width: 120px; }
.price strong { display: block; font-size: 1.2rem; font-weight: 750; letter-spacing: -0.01em; }
.price .qualifier { font-size: .78rem; color: var(--muted); }
.price .stale { color: var(--warn); }
.price-unknown strong { font-size: .95rem; font-weight: 600; color: var(--muted); }
.card-services { font-size: .9rem; color: var(--ink-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-actions .spacer { flex: 1; }
@media (max-width: 560px) {
    .card-top { flex-direction: column; }
    .price { text-align: left; }
    .card-actions .btn { flex: 1 1 calc(50% - 8px); }
    .card-actions .spacer { display: none; }
}

/* Pager */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 24px; }
.pager a, .pager span {
    min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Breadcrumbs */
.breadcrumbs { font-size: .875rem; color: var(--muted); padding-top: 20px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }

/* Content blocks */
.guide { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.guide li { display: flex; gap: 10px; align-items: flex-start; }
.guide svg { flex: none; margin-top: 3px; color: var(--brand-2); }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq summary { padding: 16px 18px; cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.cta-band {
    display: grid; gap: 16px; align-items: center; padding: 32px; border-radius: 20px; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.cta-band p { margin: 0; opacity: .9; }
.cta-band .btn-secondary { border-color: transparent; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; } }
.disclaimer { font-size: .875rem; color: var(--muted); border-left: 3px solid var(--line-strong); padding: 4px 0 4px 14px; }

/* Profile */
.profile-head { padding: 12px 0 28px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.profile-head h1 { margin-top: 10px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-layout { display: grid; gap: 28px; padding: 28px 0 56px; }
@media (min-width: 960px) { .profile-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.2rem; margin-bottom: 14px; }
.side-panel { position: sticky; top: 84px; display: grid; gap: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table .today td { font-weight: 700; }
.table-wrap { overflow-x: auto; }
.people { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.person { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.person strong { display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* Footer */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 48px 0 28px; margin-top: 0; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid #1e293b; font-size: .85rem; color: #94a3b8; display: grid; gap: 8px; }

/* Account pages (Identity templates) */
.account { max-width: 560px; margin: 0 auto; padding: 40px 16px 64px; }
.account input:not([type=checkbox]):not([type=hidden]), .account select {
    width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit;
}
.account .form-floating { display: flex; flex-direction: column-reverse; gap: 4px; margin-bottom: 14px; }
.account label { font-weight: 600; font-size: .9rem; }
.account button[type=submit], .account .btn-primary { background: var(--brand); color: #fff; border: 0; min-height: 46px; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 650; cursor: pointer; }
.account .text-danger { color: var(--bad); font-size: .875rem; }
.account hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Blazor framework UI */
h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }
.blazor-error-boundary { background: #b32121; padding: 1rem 1rem 1rem 3.7rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }

/* Ad positions (outlines shown while Advertising:ShowPlacementOutlines is on). One color per scope. */
.ad-scope-domain { --ad: #2563eb; --ad-bg: #eff6ff; }
.ad-scope-category { --ad: #ea580c; --ad-bg: #fff7ed; }
.ad-scope-location { --ad: #16a34a; --ad-bg: #f0fdf4; }
.ad-scope-profile { --ad: #9333ea; --ad-bg: #faf5ff; }
.ad-slot { display: flex; flex-direction: column; gap: 4px; margin: 16px auto; padding: 14px 16px; max-width: 1180px;
    border: 2px dashed var(--ad); border-radius: var(--radius-sm); background: var(--ad-bg); color: var(--ink); text-align: center; }
.container .ad-slot, aside .ad-slot, .results-list .ad-slot { max-width: none; }
.ad-slot-tag { align-self: center; padding: 2px 10px; border-radius: 999px; background: var(--ad); color: #fff;
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ad-slot-meta { font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ad-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ad-legend-item { padding: 4px 12px; border: 2px dashed var(--ad); border-radius: 999px; background: var(--ad-bg); font-weight: 600; }
.ad-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--ad); }

/* Admin */
.admin { padding-block: 28px 56px; display: grid; gap: 20px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin h1, .admin h2 { margin: 0; }
.admin-form { display: grid; gap: 14px; max-width: 760px; }
.admin-form label { display: grid; gap: 6px; font-weight: 600; }
.admin-form label.check { display: flex; align-items: center; gap: 8px; }
.admin-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.status { padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-3); }
.status-active { background: var(--ok-bg); color: var(--ok); }
.status-paused, .status-pendingpayment { background: var(--warn-bg); color: var(--warn); }
.ad-live { text-align: left; border-style: solid; }
.ad-live .ad-slot-tag { align-self: flex-start; }
.ad-headline { font-size: 1.05rem; font-weight: 700; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-weight: 600; }
.status-queued { background: var(--info-bg); }

/* Homepage layouts */
.hero-split .container { text-align: left; }
.hero-split h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.hero-minimal .container { padding-block: 72px 64px; }
.hero-minimal .trust-row { display: none; }

/* Clinic profile templates: reorder sections without changing markup. */
.profile-main { display: flex; flex-direction: column; }
.tpl-pricing-first .sec-services { order: -2; }
.tpl-pricing-first .sec-hours { order: -1; }
@media (min-width: 960px) {
    .tpl-contact-first { grid-template-columns: 340px minmax(0, 1fr); }
    .tpl-contact-first > aside { order: -1; }
}
.tpl-contact-first > aside { order: -1; }
.tpl-contact-first .sec-hours { order: -1; }

/* Map, saved and compare */
.results-map { height: 320px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.profile-map { height: 220px; border-radius: var(--radius-sm); }
.map-toggle > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
[data-save][aria-pressed="true"], [data-compare][aria-pressed="true"] { background: var(--ok-bg); border-color: var(--ok); }
.compare-table th:first-child { min-width: 160px; }
.geo-button { white-space: nowrap; }
@media print {
    .site-header, .site-footer, .ad-slot, .ad-rotation, .btn, .admin-nav { display: none !important; }
    .compare-table { font-size: 11pt; }
}
.ad-image { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.status-pendingreview { background: var(--info-bg); }
.status-rejected { background: var(--bad-bg); color: var(--bad); }
.profile-title { display: flex; align-items: center; gap: 14px; }
.profile-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.score { font-size: 2rem; font-weight: 800; }

/* Lead form honeypot: hidden from people, visible to naive bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; background: var(--surface-2, #eef2f6); }
.status-pill.s-DeliveryFailed, .status-pill.s-AwaitingReview { background: #fde8e8; color: #9b1c1c; }
.status-pill.s-Delivered, .status-pill.s-ClinicResponded { background: #e3f5ea; color: #1e6b3a; }
.status-pill.s-Spam, .status-pill.s-Duplicate, .status-pill.s-Closed, .status-pill.s-Inactive { background: #eceff3; color: #555; }
.status-pill.s-New, .status-pill.s-Approved { background: #e6efff; color: #1d4ed8; }
.status-pill.s-Assigned, .status-pill.s-DeliveryPending { background: #fff4db; color: #8a5a00; }
.status-pill.s-Notified { background: #e8e4fb; color: #4c3a9b; }
.lead-action-select { min-width: 9.5rem; padding: 4px 8px; font-size: .85rem; }
.lead-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; width: min(460px, calc(100vw - 32px)); background: var(--surface, #fff); color: inherit; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.lead-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.lead-dialog h2 { margin: 0 0 4px; font-size: 1.15rem; }
.lead-dialog form { display: grid; gap: 12px; }
.lead-dialog .check { display: flex; gap: 8px; align-items: center; }
.lead-dialog .dialog-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* Lead magnet guides print cleanly ("Save as PDF"). */
.guide-body h2 { margin-top: 1.4em; }
@media print {
  header, footer, nav, .no-print, .ad-slot, .ad-rotation { display: none !important; }
  .guide { max-width: none !important; padding: 0 !important; }
}


/* ---- Phase 14: welcoming layout, theme sections, mobile search ---- */
body { font-size: 17px; line-height: 1.6; background: var(--surface-2); }
h1, h2, h3, .brand { font-family: var(--font-heading); letter-spacing: -0.01em; }
main { background: var(--surface); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.btn { border-radius: 999px; min-height: 44px; padding-inline: 20px; font-weight: 600; }
.btn-sm { min-height: 36px; }
.card, .panel, .tile { border-radius: var(--radius); }
.section { padding-block: 64px; }
.section-head p { color: var(--muted); max-width: 640px; }

.promo-bar { background: var(--brand-2); color: #fff; text-align: center; padding: 10px 16px; font-size: 15px; }
.promo-bar a { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 6px; }

.hero-with-image { position: relative; overflow: hidden; }
.hero-with-image .hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-with-image .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-with-image .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(251 248 244 / 96%) 0%, rgb(251 248 244 / 88%) 45%, rgb(251 248 244 / 35%) 100%); }
.hero-with-image .container { position: relative; z-index: 1; }
@media (max-width: 760px) { .hero-with-image .hero-media::after { background: rgb(251 248 244 / 90%); } }
/* Physical therapy: no hero picture, just a soft light-blue gradient. */
[data-directory="physical-therapy"] .hero { background: linear-gradient(120deg, #eef8fd 0%, #dcf0fa 55%, #c9e7f6 100%); }
[data-directory="physical-therapy"] .hero-with-image .hero-media { display: none; }

.home-intro { max-width: 760px; font-size: 18px; color: var(--ink-2); }
.service-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.service-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.service-chip:hover { border-color: var(--brand); color: var(--brand); }
.service-chip .muted { font-size: 14px; }
.trust-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 18px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.trust-item .icon-wrap { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); }

.footer-about { max-width: 360px; color: var(--muted); }
.footer-contact { font-style: normal; color: var(--muted); line-height: 1.7; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 0; font-weight: 600; }

/* Sticky search on small screens (not on the homepage, which has its own search). */
.mobile-search { display: none; }
@media (max-width: 760px) {
    .mobile-search { display: flex; gap: 8px; position: sticky; top: 0; z-index: 19; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .mobile-search input { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); padding: 0 16px; font-size: 16px; }
    .mobile-search .btn { flex: none; }
    .site-header { position: static; }
    .section { padding-block: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Trust badges and reviews */
.trust-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0 4px; align-items: center; }
.trust-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; }
.trust-details { margin-bottom: 10px; }
.reviews .review { border-top: 1px solid var(--line); padding: 14px 0; }
.stars { color: #b7791f; letter-spacing: 2px; }
.review-response { background: var(--surface-2); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: var(--radius-sm); margin: 8px 0; }
.footer-legal a { color: inherit; }

.list-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.list-shortcuts:not(:has(a:not([hidden]))) { display: none; }
.list-shortcuts [hidden] { display: none !important; }
.phone-readonly { cursor: default; pointer-events: none; }

/* Homepage: centered layout, large search, stat cards, standout "How it works". */
.home { --home-accent: var(--brand); --home-accent-soft: color-mix(in srgb, var(--home-accent) 10%, white); }
[data-directory="physical-therapy"] .home { --home-accent: #1d6fb8; }
.home .section-head { text-align: center; margin-inline: auto; }
.home .section-head p { margin-inline: auto; }
.home .service-chips { justify-content: center; }
.home .section .container > p:last-child { text-align: center; }

.hero-center .container { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-center h1 { margin-inline: auto; }
.hero-center .hero-sub { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 500; line-height: 1.4; color: var(--ink-2); max-width: 760px; margin: 0 auto 28px; }
.hero-badge {
    display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin-bottom: 18px;
    padding: 8px 20px; border-radius: 999px; font-size: 1rem; font-weight: 700;
    color: #fff; background: var(--home-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--home-accent) 30%, transparent);
}

.hero-search { width: 100%; max-width: 900px; margin-inline: auto; }
.hero-search-bar {
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px;
    background: var(--surface); border: 2px solid color-mix(in srgb, var(--home-accent) 25%, var(--line)); border-radius: 999px;
    box-shadow: var(--shadow-lg); color: var(--muted);
}
.hero-search-bar:focus-within { border-color: var(--home-accent); }
.hero-search-bar input { flex: 1 1 0; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--ink); padding: 12px 4px; }
.hero-search-bar input:focus { outline: none; }
.hero-search-divider { width: 1px; align-self: stretch; margin-block: 8px; background: var(--line); }
.hero-search-bar .btn { min-height: 56px; padding-inline: 32px; border-radius: 999px; font-size: 1.05rem; background: var(--home-accent); border-color: var(--home-accent); }
.hero-search-filters { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin-top: 16px; }
.hero-search-filters label { font-weight: 650; color: var(--ink-2); }
.hero-search-filters select { font: inherit; min-width: min(340px, 100%); padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); max-width: 100%; }
.hero-search-filters .geo-button { border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) {
    .hero-search-bar { flex-wrap: wrap; border-radius: 20px; padding: 10px; }
    .hero-search-bar > svg, .hero-search-divider { display: none; }
    .hero-search-bar input { flex-basis: 100%; border-bottom: 1px solid var(--line); }
    .hero-search-bar .btn { flex-basis: 100%; }
}

.home-stats { max-width: 980px; margin-inline: auto; gap: 18px; }
.home-stats .stat {
    text-align: center; padding: 26px 18px; border: 0; border-radius: 16px; background: var(--surface);
    box-shadow: 0 10px 28px rgb(15 40 70 / 10%), 0 2px 6px rgb(15 40 70 / 6%);
}
.home-stats .stat strong { font-size: 2.1rem; color: var(--home-accent); }
.home-stats .stat span { display: block; margin-top: 4px; }

.how-it-works { background: linear-gradient(135deg, var(--home-accent), color-mix(in srgb, var(--home-accent) 70%, #0b2545)); color: #fff; }
.how-it-works .section-head h2 { color: #fff; }
.how-it-works .section-head p { color: rgb(255 255 255 / 85%); }
.how-it-works .step { text-align: center; border: 0; border-radius: 16px; box-shadow: 0 14px 34px rgb(0 0 0 / 18%); color: var(--ink); }
.how-it-works .step::before { margin-inline: auto; width: 48px; height: 48px; border-radius: 999px; background: var(--home-accent); color: #fff; font-size: 1.2rem; }

/* Header account menu (far right) */
.account-menu { position: relative; flex: none; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; color: var(--ink-2); }
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 750; font-size: .9rem; }
.account-panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: flex; flex-direction: column;
    min-width: 250px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.account-panel a, .account-panel .link-button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 550; }
.account-panel a:hover, .account-panel .link-button:hover { background: var(--surface-3); color: var(--ink); }
.account-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.account-name { margin: 4px 12px 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-heading { margin: 10px 12px 2px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 560px) { .account-label { display: none; } .account-trigger { padding-right: 4px; } }

/* City pages: colorful stat cards, top-rated row and compact result cards */
.city-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; padding-bottom: 28px; }
.city-stat { padding: 22px 18px; border-radius: 16px; color: #fff; text-align: center; box-shadow: 0 10px 24px rgb(15 40 70 / 14%); }
.city-stat strong { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.city-stat span { display: block; margin-top: 4px; font-weight: 600; opacity: .92; }
.city-stat-blue { background: linear-gradient(135deg, #1d6fb8, #2f8fe0); }
.city-stat-amber { background: linear-gradient(135deg, #e8890c, #f5b031); }
.city-stat-violet { background: linear-gradient(135deg, #6d4bd1, #9273ec); }
.city-stat-green { background: linear-gradient(135deg, #16855b, #2fb57f); }

.tile-cards { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .tile-cards { grid-template-columns: minmax(0, 1fr); } }
.tile-cards > :not(.tile-card) { grid-column: 1 / -1; }
.tile-cards-top .tile-card { border-color: #f5b031; }
.tile-card {
    position: relative; display: flex; flex-direction: column; padding: 22px 20px 0; background: var(--surface);
    border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px rgb(15 40 70 / 8%);
}
.tile-ribbon {
    position: absolute; top: -12px; right: 14px; padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #f5a623, #f06a1d);
}
.tile-card-name { font-size: 1.15rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-card-name a { color: var(--ink); text-decoration: none; }
.tile-card-name a:hover { color: var(--brand); }
.tile-card-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.stars { display: inline-flex; font-size: 1.1rem; line-height: 1; }
.star-full { color: #f5b301; }
.star-empty { color: #d6d9de; }
.star-half { background: linear-gradient(90deg, #f5b301 50%, #d6d9de 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile-card-address, .tile-card-site { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; }
.tile-card-address svg, .tile-card-site svg { flex: none; margin-top: 3px; color: var(--muted); }
.tile-card-site a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: auto -20px 0; padding: 14px 20px;
    border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px;
}
.tile-card-foot > a { font-weight: 650; text-decoration: none; }
.badge-top { background: #e7f6ec; color: #17803d; }

/* State pages */
.state-head h1 { margin-bottom: 6px; }
.state-sub { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 500; color: var(--ink-2); max-width: 820px; margin: 0 0 18px; }
.state-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.state-badge { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 999px; color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgb(15 40 70 / 12%); }
.state-badge strong { font-size: 1.15rem; font-weight: 800; }
.state-badge-blue { background: linear-gradient(135deg, #1d6fb8, #2f8fe0); }
.state-badge-green { background: linear-gradient(135deg, #16855b, #2fb57f); }
.state-badge-violet { background: linear-gradient(135deg, #6d4bd1, #9273ec); }
.state-badge-amber { background: linear-gradient(135deg, #e8890c, #f5b031); }
.browse-columns { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.browse-columns h3 { margin-bottom: 10px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-list a { font-weight: 550; }

/* Review tier badge on clinic cards */
.tile-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rating-badge { flex: none; margin-top: 2px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.rating-excellent { background: #dcfce7; color: #166534; }
.rating-very-good { background: #e0f2fe; color: #075985; }
.rating-good { background: #ede9fe; color: #5b21b6; }
.rating-fair { background: #fef3c7; color: #92400e; }
.rating-mixed { background: #f1f5f9; color: #475569; }

/* Header "Find Care" button */
.find-care {
    flex: none; min-height: 40px; padding: 8px 18px; border-radius: 999px; font-weight: 700; color: #fff; text-decoration: none;
    background: linear-gradient(135deg, #1d6fb8, #2f8fe0); box-shadow: 0 6px 16px rgb(29 111 184 / 30%);
}
.find-care:hover { color: #fff; background: linear-gradient(135deg, #185f9e, #1d6fb8); }
@media (max-width: 480px) { .find-care { padding: 8px 12px; } }


/* ---------------------------------------------------------------------------------------------------------------
   Clinical theme: navy headings, blue actions, white cards on cool grey sections, provider-first layout.
   Physical therapy uses a fixed navy/blue brand regardless of the stored theme colors.
   --------------------------------------------------------------------------------------------------------------- */
body[data-directory="physical-therapy"] { --brand: #0b5cad; --brand-2: #0a2f5c; --accent: #f5a623; }
[data-directory="physical-therapy"] .home { --home-accent: #0b5cad; }

h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; }
h1 { font-weight: 800; }
.section-alt { background: var(--surface-2); border-block: 0; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgb(11 31 58 / 4%); }
.brand { color: var(--brand-2); font-weight: 800; }
.brand-mark { background: var(--brand); border-radius: 999px; }
.site-nav a, .site-nav .link-button { color: var(--ink); font-weight: 600; }
.site-nav a:hover { background: var(--surface-3); color: var(--brand); }
.find-care { background: var(--brand); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.find-care:hover { background: var(--brand-2); }

/* Buttons and cards */
.btn-primary { background: var(--brand); }
.btn-primary:hover { background: var(--brand-2); }
.btn-secondary { border-color: var(--brand); color: var(--brand); }
.btn-secondary:hover { background: var(--info-bg); border-color: var(--brand); color: var(--brand-2); }
.tile { border-radius: 12px; border-color: var(--line); }
.tile:hover { border-color: var(--brand); }
.tile-card { border-radius: 12px; border-color: var(--line); box-shadow: 0 2px 10px rgb(11 31 58 / 6%); transition: box-shadow .15s, transform .15s; }
.tile-card:hover { box-shadow: 0 10px 28px rgb(11 31 58 / 12%); transform: translateY(-2px); }
.tile-card-name a { color: var(--brand-2); }
.tile-card-foot { background: #fff; }
.tile-card-foot > a { color: var(--brand); }

/* Home: specialty tiles */
.specialty-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.specialty-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 650;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.specialty-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--brand-2); }
.specialty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; background: var(--info-bg); color: var(--brand); }
.specialty-tile .muted { font-size: .85rem; font-weight: 500; }

/* Clinic profile header */
.profile-head { background: linear-gradient(180deg, var(--surface-2), #fff); border-bottom: 1px solid var(--line); }
.profile-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--brand-2); }
.profile-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 1.05rem; }
.profile-rating a { font-weight: 600; }
.profile-rating .stars { font-size: 1.3rem; }

/* Therapist profiles and name search */
.therapist-head { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.therapist-avatar { display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 999px; background: var(--info-bg); color: var(--brand); font-size: 1.6rem; font-weight: 800; }
.therapist-avatar-sm { width: 44px; height: 44px; font-size: 1.05rem; }
.therapist-title { margin: 4px 0; font-weight: 600; color: var(--ink-2); }
.therapist-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.therapist-facts dt { font-weight: 650; color: var(--muted); }
.therapist-facts dd { margin: 0; }
.therapist-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 760px; }
.therapist-search .input { flex: 2 1 260px; }
.therapist-search .select { flex: 1 1 160px; }
.therapist-results { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.therapist-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.therapist-row:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.therapist-row .arrow { margin-left: auto; color: var(--brand); }

/* Checkbox grid (clinic portal lists such as insurance) */
.check-grid { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Compare and match */
.compare-toggle { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; }
.compare.only-differences tr.compare-same { display: none; }
.compare-table tr.compare-group th { background: var(--surface-2); color: var(--ink-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.compare-table thead th { vertical-align: top; }
.compare-remove { display: block; margin-top: 4px; padding: 2px 0; font-size: .8rem; }
.compare-table tfoot td { white-space: nowrap; }
.tile-card-tools { display: flex; gap: 6px; }
.compare-bar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--navy, #0b1f3a); color: #fff; border-radius: 999px; box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
    max-width: calc(100% - 32px);
}
.compare-bar a.btn { white-space: nowrap; }
.match-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; background: #fff; }
.match-form legend { font-weight: 700; padding: 0 6px; }
.match-form .choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.match-form .choices label { display: flex; align-items: center; gap: 8px; }
.match-step { color: var(--brand); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.match-result { display: grid; gap: 6px; }
.match-score { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #e7f0fb; color: var(--brand); font-weight: 700; }
.match-score.full { background: #e7f6ec; color: #17803d; }
.match-checks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 2px; font-size: .9rem; }
.match-checks .yes::before { content: "\2713  "; color: #17803d; font-weight: 700; }
.match-checks .no::before { content: "\2717  "; color: #b42318; font-weight: 700; }
.match-checks .unknown::before { content: "?  "; color: var(--muted, #667); font-weight: 700; }
@media print { .compare-toggle, .compare-bar, .compare-remove { display: none !important; } }

/* Therapist cards */
.therapist-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 8px rgb(15 40 70 / 6%); }
.therapist-card-head { display: flex; align-items: center; gap: 12px; }
.therapist-card-name { font-size: 1.05rem; margin: 0; }
.therapist-card-name a { color: var(--ink); text-decoration: none; }
.therapist-card-name a:hover { color: var(--brand); text-decoration: underline; }
.therapist-card-line { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .95rem; }
.therapist-card-foot { margin: auto -20px 0; padding: 12px 20px; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.therapist-card-foot a { font-weight: 650; text-decoration: none; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* Search filter bar, sort and view toggle (SearchToolbar.razor) */
.search-toolbar { margin-bottom: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.filter-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer; }
.filter-pill:hover { border-color: var(--ink-2); }
.pill-select { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 8px 0; max-width: 220px; }
.pill-select:disabled { color: var(--muted); cursor: not-allowed; }
.filter-toggle input { accent-color: var(--brand); }
.filter-toggle.is-on, .filter-pill:has(select option:checked:not([value=""])):has(select:not(:disabled)) { border-color: var(--brand); background: var(--info-bg); }
.filter-drop { padding: 0; }
.filter-drop > summary { list-style: none; padding: 8px 14px; }
.filter-drop > summary::-webkit-details-marker { display: none; }
.filter-drop > summary::after { content: " \25BE"; color: var(--muted); }
.filter-drop-body { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; display: grid; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.filter-more { gap: 8px; }
.filter-clear { font-size: .92rem; margin-left: 4px; }
.more-filters { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.more-filters fieldset { border: 0; margin: 0; padding: 0; }
.more-filters-foot { grid-column: 1 / -1; }
.results-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 0 4px; }
.results-bar-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sort-label { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; color: var(--muted); }
.sort-label .pill-select { color: var(--ink); font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.view-toggle a.is-on { background: var(--brand); color: #fff; }

/* Map view: results beside a sticky map */
.results-split { display: grid; gap: 20px; }
@media (min-width: 1024px) {
    .results-split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); align-items: start; }
    .results-map-pane { position: sticky; top: 84px; order: 2; }
}
.results-map-pane { order: -1; }
.results-map-tall { height: 360px; }
@media (min-width: 1024px) { .results-map-tall { height: calc(100vh - 120px); } }
.map-pop-name { font-weight: 700; }
.map-pop-line { font-size: .85rem; color: var(--muted); margin-top: 2px; }

/* Result card (ListingCardView.razor) */
.rcard { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }

.rcard-media { display: block; width: 132px; height: 132px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.rcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard-initials { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; font-weight: 750; color: var(--brand); background: linear-gradient(135deg, var(--info-bg), var(--surface-3)); }
.rcard-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.earned { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.earned-favorite { background: #fde7f0; color: #a3164f; }
.earned-favorite::before { content: "\2665"; margin-right: 5px; }
.earned-top { background: var(--warn-bg); color: var(--warn); }
.earned-top::before { content: "\2605"; margin-right: 5px; }
.earned-reviewed { background: var(--info-bg); color: var(--brand-2); }
.earned-accepting { background: var(--ok-bg); color: var(--ok); }
.earned-accepting::before { content: "\2713"; margin-right: 5px; }
.rcard-name { margin: 0 0 4px; font-size: 1.15rem; }
.rcard-name a { color: var(--ink); text-decoration: none; }
.rcard-name a:hover { color: var(--brand); text-decoration: underline; }
.rcard-rating { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .92rem; margin-bottom: 8px; }
.rcard-services { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 8px; }
.rcard-services li { padding: 2px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: .82rem; color: var(--ink-2); background: var(--surface-2); }
.rcard-address { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; font-size: .92rem; color: var(--ink-2); }
.rcard-distance { font-weight: 650; color: var(--ink); }
.rcard-distance::before { content: "\00B7"; margin-right: 6px; color: var(--muted); }
.rcard-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.rcard-phone { display: inline-flex; gap: 4px; align-items: center; }
.rcard-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; font-size: .9rem; }
.rcard-tools .link-button { color: var(--brand); padding: 0; }
.rcard-tools .link-button[aria-pressed="true"] { font-weight: 700; }
.compare-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-weight: 600; font-size: .9rem; }
.compare-check input { width: 17px; height: 17px; accent-color: var(--brand); }
@media (max-width: 720px) {
    .rcard { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 14px; }
    .rcard-media { width: 84px; height: 84px; }
    .rcard-initials { font-size: 1.4rem; }
    .rcard-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .rcard-actions .btn { flex: 1 1 auto; }
    .rcard-tools { width: 100%; margin-top: 0; }
}

/* Nearby-city links under the results */
.nearby-searches { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.nearby-searches h2 { font-size: 1.15rem; }
.nearby-searches .chips { list-style: none; padding: 0; margin: 0; }

/* "Update this listing" box on clinic profiles */
.update-listing { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .92rem; }
.update-listing > span { flex: 1 1 260px; }

/* Matching quiz: step-by-step flow (site.js data-wizard) */
.wizard-progress { margin-bottom: 18px; }
.wizard-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wizard-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .25s ease; }
.wizard-count { margin: 6px 0 0; }
.wizard-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.wizard-nav [data-wizard-back] { margin-right: auto; }
.choices-cards { display: grid; gap: 10px; }
.choices-cards label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.choices-cards label:has(input:checked) { border-color: var(--brand); background: var(--info-bg); }
.match-edit { margin-bottom: 8px; }
.match-edit > summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.match-help { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 24px; }
.match-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Outreach pipeline (admin) */
.outreach-funnel { margin-bottom: 8px; }
.outreach-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.outreach-replied, .outreach-callbooked, .outreach-demo, .outreach-trial { background: var(--info-bg); color: var(--brand-2); }
.outreach-paying { background: var(--ok-bg); color: var(--ok); }
.outreach-notinterested, .outreach-optedout { background: var(--bad-bg); color: var(--bad); }
td.due { color: var(--bad); font-weight: 700; }


/* "Find my match": crimson (IU-style #990000) so it stands out on every page. Change --match to retune it. */
:root { --match: #990000; --match-hover: #7a0000; --match-text: #ffffff; }
.btn-match { background: var(--match); color: var(--match-text); border: 1px solid var(--match); font-weight: 700; }
.btn-match:hover, .btn-match:focus-visible { background: var(--match-hover); border-color: var(--match-hover); color: var(--match-text); }
.btn-match-lg { padding: 14px 22px; font-size: 1.05rem; border-radius: 999px; box-shadow: 0 6px 18px rgb(153 0 0 / 28%); }
.btn-match-lg strong { text-decoration: underline; text-underline-offset: 3px; }
.header-match { white-space: nowrap; padding: 8px 14px; font-size: .92rem; border-radius: 999px; }
@media (max-width: 560px) { .header-match { padding: 7px 10px; font-size: .85rem; } }

/* Matching quiz popup */
.match-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.match-dialog::backdrop { background: rgb(11 31 58 / 55%); }
.match-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.match-dialog-close { font-size: 1.8rem; line-height: 1; color: var(--muted); padding: 0 4px; }
.match-dialog .match-form fieldset { border: 0; padding: 0; margin: 0 0 14px; }

/* Elements with the hidden attribute stay hidden even when a class sets display (quiz Back/Next/Show buttons). */
[hidden] { display: none !important; }

/* Phones: keep the header on one line without overlap (logo, Find my match, search icon, sign in, menu). */
@media (max-width: 640px) {
    .site-header .container { gap: 8px; min-height: 56px; }
    .brand { gap: 6px; flex: none; }
    .brand-name { display: none; }
    .find-care { padding: 0; width: 40px; min-height: 40px; justify-content: center; flex: none; }
    .find-care-text { display: none; }
    .header-match { padding: 6px 10px; min-height: 36px; font-size: .82rem; flex: none; }
    .nav-menu { margin-left: 0; }
    .account-menu .account-signin { padding: 6px 10px; min-height: 36px; font-size: .82rem; }
    .site-header .container > .header-match { margin-left: auto; }
}
@media (max-width: 360px) {
    .header-match { font-size: .76rem; padding: 5px 8px; }
}

/* Long call-to-action buttons wrap on small screens instead of running off the page. */
.btn-match-lg { white-space: normal; max-width: 100%; text-align: center; line-height: 1.35; height: auto; }
@media (max-width: 640px) { .btn-match-lg { display: inline-block; font-size: .95rem; padding: 12px 16px; } }
