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

:root {
    /* Warm, calm defaults; each directory overrides --brand, --brand-2, --accent and fonts in Admin > Theme. */
    --brand: #2f6f6a;
    --brand-2: #b4583c;
    --accent: #e9a23b;
    --ink: #2a2522;
    --ink-2: #4a423c;
    --muted: #6f655d;
    --line: #ebe3da;
    --line-strong: #d9cdbf;
    --surface: #ffffff;
    --surface-2: #fbf8f4;
    --surface-3: #f4eee7;
    --ok: #2f7a4f;
    --ok-bg: #e2f3e8;
    --warn: #8a5a12;
    --warn-bg: #fdf1d8;
    --bad: #a63a2b;
    --bad-bg: #fbe5e0;
    --info-bg: #e6f2f0;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgb(42 37 34 / 5%), 0 6px 20px rgb(42 37 34 / 6%);
    --shadow-lg: 0 14px 44px rgb(42 37 34 / 12%);
    --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%); } }

.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; }
