/* =============================================================
   PH Dental design system — NEO-BRUTALIST
   Flat bright color, black borders, hard offset shadows,
   sharp corners, heavy type. Tokens, reset, components.
   ============================================================= */

/* ---------- Tokens ---------- */

:root {
    /* Core */
    --paper:   oklch(0.97 0.006 250);   /* page bg, cool near-white */
    --white:   oklch(1 0 0);
    --ink:     oklch(0.18 0.015 265);   /* text + borders, near-black */
    --ink-2:   oklch(0.30 0.015 265);
    --ink-3:   oklch(0.42 0.013 265);   /* tertiary, holds 4.5:1 on white */

    /* Flat brights */
    --yellow:  oklch(0.90 0.165 99);
    --lime:    oklch(0.86 0.195 138);
    --blue:    oklch(0.63 0.185 256);
    --pink:    oklch(0.75 0.165 8);
    --purple:  oklch(0.63 0.190 305);
    --orange:  oklch(0.77 0.165 56);

    /* Brights, soft (light tints for fills behind dark text) */
    --blue-soft:   oklch(0.92 0.055 256);
    --pink-soft:   oklch(0.93 0.050 8);
    --yellow-soft: oklch(0.95 0.075 99);

    /* Link blue, darkened for AA on white */
    --link: oklch(0.46 0.175 256);

    /* Legacy aliases (kept so component + inline refs don't break) */
    --bg:           var(--paper);
    --surface:      var(--white);
    --surface-2:    oklch(0.93 0.006 250);
    --line:         var(--ink);
    --line-strong:  var(--ink);

    --brand:        var(--blue);
    --brand-hover:  oklch(0.55 0.185 256);
    --brand-soft:   var(--blue-soft);
    --on-brand:     var(--white);

    --accent:       var(--pink);
    --accent-soft:  var(--pink-soft);

    /* Status */
    --danger:       oklch(0.58 0.220 25);
    --danger-soft:  oklch(0.92 0.060 25);
    --success:      oklch(0.55 0.150 150);
    --success-soft: var(--lime);
    --warning:      var(--yellow);

    /* Focus ring */
    --ring: var(--blue);

    /* Borders */
    --bw:   2px;
    --bw-3: 3px;

    /* Type */
    --font-display: 'Space Grotesk', 'Hanken Grotesk', system-ui, sans-serif;
    --font-body:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'Space Grotesk', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --step--1: clamp(0.875rem, 0.86rem + 0.07vw, 0.9375rem);
    --step-0:  clamp(1rem,     0.97rem + 0.15vw, 1.0625rem);
    --step-1:  clamp(1.125rem, 1.07rem + 0.27vw, 1.25rem);
    --step-2:  clamp(1.375rem, 1.27rem + 0.5vw,  1.625rem);
    --step-3:  clamp(1.75rem,  1.55rem + 1vw,    2.25rem);
    --step-4:  clamp(2.25rem,  1.85rem + 2vw,    3.25rem);
    --step-5:  clamp(2.75rem,  2.0rem + 4vw,     5.25rem);

    --leading-tight:  1.04;
    --leading-snug:   1.18;
    --leading-normal: 1.55;
    --leading-loose:  1.65;

    /* Space */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    --space-9: 7rem;

    /* Radii — sharp everywhere */
    --radius-sm:   0px;
    --radius:      0px;
    --radius-lg:   0px;
    --radius-xl:   0px;
    --radius-pill: 0px;

    /* Hard offset shadows (no blur) */
    --shadow-sm: 2px 2px 0 var(--ink);
    --shadow:    4px 4px 0 var(--ink);
    --shadow-lg: 8px 8px 0 var(--ink);

    /* Motion */
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --dur-fast: 120ms;
    --dur:      170ms;
    --dur-slow: 260ms;

    /* z-index scale */
    --z-dropdown:       1000;
    --z-sticky:         1050;
    --z-modal-backdrop: 1100;
    --z-modal:          1110;
    --z-toast:          1200;
    --z-tooltip:        1300;

    /* Layout */
    --container:    76rem;
    --container-md: 56rem;
    --container-sm: 42rem;
    --container-prose: 65ch;
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--leading-normal);
    color: var(--ink);
    background-color: var(--paper);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; }
hr { border: 0; border-top: var(--bw-3) solid var(--ink); margin: var(--space-6) 0; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
    text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.015em; line-height: var(--leading-snug); }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: var(--leading-snug); }

p { text-wrap: pretty; max-width: var(--container-prose); }
p + p { margin-top: var(--space-4); }

a:not(.btn):not(.nav-link):not(.tag):not(.brand-mark):not(.footer-link) {
    color: var(--link);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
    text-decoration-color: var(--blue);
    transition: background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}
a:not(.btn):not(.nav-link):not(.tag):not(.brand-mark):not(.footer-link):hover {
    background: var(--yellow);
    color: var(--ink);
    text-decoration-color: var(--ink);
    box-shadow: 0 0 0 2px var(--yellow);
}

::selection { background: var(--yellow); color: var(--ink); }
:focus-visible {
    outline: var(--bw-3) solid var(--blue);
    outline-offset: 2px;
    border-radius: 0;
}

/* ---------- Layout primitives ---------- */

.wrap {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-5);
}
.wrap--md { max-width: var(--container-md); }
.wrap--sm { max-width: var(--container-sm); }

main { flex: 1; }

.section { padding-block: var(--space-7); }
.section--lg { padding-block: var(--space-8); }
.section--xl { padding-block: var(--space-9); }

.stack > * + * { margin-top: var(--space-4); }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-5 > * + * { margin-top: var(--space-5); }
.stack-6 > * + * { margin-top: var(--space-6); }
.stack-8 > * + * { margin-top: var(--space-8); }

.row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.row--tight { gap: var(--space-2); }
.row--between { justify-content: space-between; align-items: center; }
.row--center { justify-content: center; align-items: center; }
.row--end { justify-content: flex-end; align-items: center; }
.row--baseline { align-items: baseline; }

/* ---------- Navbar ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--white);
    border-bottom: var(--bw-3) solid var(--ink);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding-block: var(--space-4);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--ink);
}
.brand-mark__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    background: var(--yellow);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}
.nav-links--right { margin-left: auto; }

.nav-link {
    position: relative;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--ink);
    padding: var(--space-2) var(--space-2);
    transition: background-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.nav-link:hover, .nav-link[aria-current="page"] {
    background: var(--yellow);
    box-shadow: var(--shadow-sm);
}

.nav-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border: var(--bw) solid var(--ink);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}
.nav-toggle:active { transform: translate(2px, 2px); box-shadow: none; }
.nav-toggle__lines { display: block; width: 1.15rem; }
.nav-toggle__lines span {
    display: block;
    height: 2.5px;
    background: currentColor;
}
.nav-toggle__lines span + span { margin-top: 4px; }

@media (max-width: 760px) {
    .nav { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .nav-links {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        display: none;
    }
    /* First group sits right under the brand row with a divider */
    .nav .nav-links:first-of-type {
        margin-top: var(--space-4);
        padding-top: var(--space-2);
        border-top: var(--bw) solid var(--ink);
    }
    .nav-links--right {
        margin-left: 0;
        padding-bottom: var(--space-2);
    }
    .site-header[data-open="true"] .nav-links { display: flex; }
    .nav-link { padding-block: var(--space-3); font-size: var(--step-0); }
    .nav-link:hover, .nav-link[aria-current="page"] { box-shadow: none; }
    .nav-links--right .btn { margin-top: var(--space-2); }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.7rem 1.2rem;
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1;
    border: var(--bw) solid var(--ink);
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out);
    white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn--sm { padding: 0.45rem 0.85rem; font-size: var(--step--1); box-shadow: var(--shadow-sm); }
.btn--sm:hover { box-shadow: var(--shadow); }
.btn--sm:active { box-shadow: none; }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--step-1); }
.btn--block { width: 100%; }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--ink); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
    box-shadow: none;
}
.btn--ghost:hover {
    transform: none;
    background: var(--yellow);
    border-color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.btn--ghost:active { transform: translate(2px, 2px); box-shadow: none; }

.btn--on-brand { background: var(--yellow); color: var(--ink); }

.btn--link {
    padding-inline: 0;
    padding-block: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--link);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}
.btn--link:hover { transform: none; box-shadow: none; background: var(--yellow); color: var(--ink); }
.btn--link:active { transform: none; }

@media (prefers-reduced-motion: reduce) {
    .btn, .nav-toggle { transition: background-color var(--dur-fast) var(--ease-out); }
    .btn:hover, .btn:active,
    .nav-toggle:active { transform: none; }
    .btn:hover { box-shadow: var(--shadow); }
}

/* ---------- Forms ---------- */

.field { display: block; }

.field__label,
label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-family: inherit;
    font-size: var(--step-0);
    line-height: 1.4;
    color: var(--ink);
    background-color: var(--white);
    border: var(--bw) solid var(--ink);
    border-radius: 0;
    transition: box-shadow var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
}
textarea { min-height: 8.5rem; resize: vertical; line-height: var(--leading-normal); }

select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.4rem;
}

.input--lg, .input-lg {
    padding: 0.95rem 1.05rem;
    font-size: var(--step-1);
}

.input::placeholder,
input::placeholder,
textarea::placeholder { color: var(--ink-3); }

.input:focus,
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: var(--shadow); /* hard offset in ink */
}

input[type="checkbox"], input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--blue);
    margin-right: var(--space-2);
    vertical-align: middle;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--step--1);
    color: var(--ink-2);
}
.check label, .check input { margin: 0; }
.check label { text-transform: none; font-weight: 500; letter-spacing: 0; }

.help { color: var(--ink-3); font-size: var(--step--1); margin-top: var(--space-2); }
.error,
ul.error,
ul li.error,
.field__errors {
    color: var(--danger);
    font-weight: 600;
    font-size: var(--step--1);
    margin-top: var(--space-2);
}
.field__errors ul, ul.error { padding-left: var(--space-4); }

form ul { list-style: none; padding: 0; margin: 0; }
form ul li { color: var(--danger); font-weight: 600; font-size: var(--step--1); margin-top: var(--space-2); }

/* ---------- Cards ---------- */

.card {
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-5);
}
.card--inset { padding: var(--space-6); }
.card--quiet { background: transparent; border-style: dashed; box-shadow: none; }

/* ---------- Tags / badges ---------- */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
    line-height: 1.4;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.tag--neutral { background: var(--white); }
.tag--accent { background: var(--pink); }

/* Playful color rotation within a tag-row */
.tag-row .tag:nth-child(4n+1) { background: var(--lime); }
.tag-row .tag:nth-child(4n+2) { background: var(--yellow); }
.tag-row .tag:nth-child(4n+3) { background: var(--blue-soft); }
.tag-row .tag:nth-child(4n)   { background: var(--pink); }
.tag-row .tag.tag--neutral    { background: var(--white); }

a.tag { box-shadow: var(--shadow-sm); }
a.tag:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: var(--ink); color: var(--white); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

@media (prefers-reduced-motion: reduce) {
    .tag, a.tag:hover { transform: none; }
}

/* ---------- Flash messages ---------- */

.flash-bar { padding-top: var(--space-4); }
.flash {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    font-size: var(--step--1);
    font-weight: 500;
    color: var(--ink);
}
.flash--success { background: var(--lime); }
.flash--error, .flash--danger { background: var(--pink); }
.flash--warning { background: var(--yellow); }
.flash__close {
    margin-left: auto;
    color: var(--ink);
    padding: 0 0.35rem;
    line-height: 1;
    font-size: 1.2rem;
    font-weight: 700;
}
.flash__close:hover { background: var(--ink); color: var(--white); }

/* ---------- Hero (drenched yellow block) ---------- */

.hero {
    position: relative;
    background: var(--yellow);
    color: var(--ink);
    overflow: hidden;
    padding-block: clamp(var(--space-8), 8vw, 7rem);
    border-bottom: var(--bw-3) solid var(--ink);
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(var(--ink) 1.5px, transparent 1.6px);
    background-size: 26px 26px;
    opacity: 0.08;
    z-index: -1;
}
.hero h1 {
    color: var(--ink);
    font-size: var(--step-5);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.98;
    max-width: 16ch;
}
.hero__lead {
    color: color-mix(in oklch, var(--ink) 82%, var(--yellow));
    font-size: var(--step-1);
    font-weight: 500;
    max-width: 42ch;
    margin-top: var(--space-4);
}
.hero__panel {
    margin-top: var(--space-7);
    background: var(--white);
    color: var(--ink);
    padding: var(--space-5);
    border: var(--bw-3) solid var(--ink);
    box-shadow: var(--shadow-lg);
    max-width: 56rem;
}
.hero__inline-mark {
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    margin-inline: 0.08em;
    background: var(--pink);
    border: 2px solid var(--ink);
    vertical-align: 0.1em;
}

/* ---------- Hero playful icon collage ---------- */

.hero__top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(var(--space-5), 5vw, var(--space-8));
    align-items: center;
}
.hero__copy { min-width: 0; }

.hero__play {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    justify-items: center;
    width: min(24rem, 100%);
    margin-inline: auto;
}

.play-tile {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    color: var(--ink);
    border: var(--bw-3) solid var(--ink);
    box-shadow: var(--shadow-sm);
    rotate: var(--rot, 0deg);
    transition: rotate 0.18s ease, translate 0.18s ease, box-shadow 0.18s ease;
}
.play-tile:hover {
    rotate: 0deg;
    translate: 0 -3px;
    box-shadow: var(--shadow);
}
.play-tile__icon { width: 56%; height: 56%; }

.play-tile--pink   { background: var(--pink); }
.play-tile--lime   { background: var(--lime); }
.play-tile--blue   { background: var(--blue); color: var(--white); }
.play-tile--purple { background: var(--purple); color: var(--white); }
.play-tile--orange { background: var(--orange); }
.play-tile--yellow { background: var(--yellow); }
.play-tile--white  { background: var(--white); }

.play-spark {
    position: absolute;
    display: grid;
    place-items: center;
    color: var(--ink);
    pointer-events: none;
}
.play-spark svg { width: 100%; height: 100%; }
.play-spark--1 { top: -1.4rem; right: -0.6rem; width: 2.4rem; height: 2.4rem; rotate: 12deg; }
.play-spark--2 {
    bottom: -1.6rem; left: -1rem;
    width: 3rem; height: 3rem;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw-3) solid var(--ink);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    rotate: -8deg;
}
.play-spark--2 svg { width: 64%; height: 64%; }

@media (prefers-reduced-motion: reduce) {
    .play-tile { transition: none; }
}

@media (max-width: 900px) {
    .hero__top { grid-template-columns: 1fr; }
    .hero__play {
        grid-template-columns: repeat(4, 1fr);
        width: min(22rem, 100%);
        margin-inline: 0;
    }
    .play-spark--1 { right: 0.5rem; }
}
@media (max-width: 480px) {
    .hero__play { gap: var(--space-2); width: 100%; }
    .play-tile__icon { width: 52%; height: 52%; }
}

/* ---------- Search form (hero panel) ---------- */

.search {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr auto;
    gap: var(--space-3);
    align-items: end;
}
@media (max-width: 780px) {
    .search { grid-template-columns: 1fr 1fr; }
    .search .search__submit { grid-column: 1 / -1; }
    .search__field--wide { grid-column: 1 / -1; }
}

.search__field { display: flex; flex-direction: column; }
.search__field label { font-size: 0.72rem; color: var(--ink); margin-bottom: var(--space-1); }

/* ---------- Filter form on clinic index ---------- */

.filter-bar {
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-5);
}
.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3);
}
@media (max-width: 880px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .filter-grid { grid-template-columns: 1fr; } }

.filter-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    margin-top: var(--space-4);
}

/* ---------- Clinic grid + cards ---------- */

.clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}

.clinic-card {
    position: relative;
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-5);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.clinic-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--ink);
}
@media (prefers-reduced-motion: reduce) {
    .clinic-card { transition: none; }
    .clinic-card:hover { transform: none; }
}

.clinic-card__name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
}
.clinic-card__name a { color: var(--ink); }
.clinic-card__name a::after {
    content: "";
    position: absolute; inset: 0;
}
.clinic-card__addr {
    color: var(--ink-2);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
}
.clinic-card__phone {
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
}

/* ---------- Detail page ---------- */

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: var(--space-7);
    align-items: start;
}
.detail__main { min-width: 0; }
@media (max-width: 880px) {
    /* minmax(0, 1fr), not 1fr: keeps grid items from inheriting min-width:auto,
       which would let a long hours value push the whole column past the viewport. */
    .detail { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

.detail__aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    min-width: 0;
    position: sticky;
    /* Rest just below the sticky site header + section jump-nav. */
    top: calc(var(--clinic-header-h, 64px) + var(--clinic-nav-h, 52px) + var(--space-4));
}
@media (max-width: 880px) {
    .detail__aside { position: static; }
    /* On narrow screens the facts + contact + hours belong above the long
       service / dentist lists so a patient can act without scrolling past everything. */
    .detail__main { order: 2; }
    .detail__aside { order: 1; }
}

/* ---------- Clinic identity header ---------- */

.clinic-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4) var(--space-5);
    margin-top: var(--space-4);
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-6);
    border-bottom: var(--bw) solid var(--line);
}
.clinic-head__glyph {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    flex: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    background: var(--yellow);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.clinic-head__body { min-width: 0; }
.clinic-head__name {
    font-size: var(--step-4);
    line-height: 1.04;
    letter-spacing: -0.02em;
    max-width: 22ch;
}
.clinic-head__loc {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-top: var(--space-2);
    color: var(--ink-2);
    font-size: var(--step-0);
    max-width: none;
}
.clinic-head__loc svg { width: 1.05em; height: 1.05em; flex: none; color: var(--ink-3); }

.clinic-status {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5em;
    margin-top: var(--space-3);
    padding: 0.3rem 0.7rem;
    font-family: var(--font-display);
    font-size: var(--step--1);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}
.clinic-status__dot {
    align-self: center;
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    border-radius: 50%;
}
.clinic-status__label { font-weight: 700; }
.clinic-status__sub { color: var(--ink-2); font-weight: 500; }
.clinic-status.is-open { background: var(--lime); color: var(--ink); }
.clinic-status.is-open .clinic-status__dot { background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklch, var(--success) 28%, transparent); }
.clinic-status.is-closed { background: var(--surface-2); color: var(--ink); }
.clinic-status.is-closed .clinic-status__dot { background: var(--ink-3); }

.clinic-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-self: end;
}
.clinic-head__actions .btn svg { width: 1.1em; height: 1.1em; }

@media (max-width: 720px) {
    .clinic-head {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .clinic-head__actions {
        grid-column: 1 / -1;
        justify-self: stretch;
    }
    .clinic-head__actions .btn { flex: 1 1 auto; }
}

/* ---------- Detail sections ---------- */

.detail-section {
    padding-block: var(--space-6);
    border-top: var(--bw) solid var(--line);
}
.detail-section:first-of-type { border-top: 0; padding-top: 0; }
.detail-section__head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.detail-section__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.4rem;
    font-family: var(--font-mono);
    font-size: var(--step--1);
    font-weight: 700;
    line-height: 1;
    color: var(--ink);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    font-variant-numeric: tabular-nums;
}
.detail-section h2 {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 0.2rem 0.6rem;
    margin-bottom: var(--space-4);
}
/* Reset after .detail-section h2 (equal specificity) so the heading sits flush
   in the flex head and the count badge centers on it. */
.detail-section__head h2 { margin-bottom: 0; }

/* ---------- Clinic section jump-nav (sticky, scroll-spy) ---------- */

/* --clinic-header-h / --clinic-nav-h are measured by section_nav_controller and
   set on .clinic-detail so the bar sticks below the site header and anchored
   sections clear both. Fallbacks keep no-JS / pre-hydration layout sane. */
.clinic-detail {
    --clinic-header-h: 64px;
    --clinic-nav-h: 52px;
}

.clinic-nav {
    position: sticky;
    top: var(--clinic-header-h);
    z-index: var(--z-sticky);
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: var(--space-6);
    padding: var(--space-3) 0;
    background: var(--paper);
    box-shadow: inset 0 calc(-1 * var(--bw)) 0 var(--line);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.clinic-nav::-webkit-scrollbar { display: none; }

.clinic-nav__link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4rem 0.8rem;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: var(--white);
    border: var(--bw) solid var(--line);
    text-decoration: none;
    white-space: nowrap;
    transition: color 140ms var(--ease-out), background 140ms var(--ease-out),
                border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.clinic-nav__link:hover { color: var(--ink); border-color: var(--ink); }
.clinic-nav__link.is-active {
    color: var(--ink);
    background: var(--lime);
    border-color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.clinic-nav__link:focus-visible {
    outline: var(--bw) solid var(--ink);
    outline-offset: 2px;
}
.clinic-nav__count {
    font-family: var(--font-mono);
    font-size: 0.72em;
    font-weight: 600;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.clinic-nav__link.is-active .clinic-nav__count { color: var(--ink); }

/* Anchored sections clear the sticky header + jump-nav when scrolled to. */
.detail-section { scroll-margin-top: calc(var(--clinic-header-h) + var(--clinic-nav-h) + var(--space-3)); }

/* ---------- Opening hours week grid (main column) ---------- */

.week {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-3);
}
.week__day {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--space-3) var(--space-4);
    background: var(--white);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
}
.week__name {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step--1);
    color: var(--ink);
}
.week__time {
    font-family: var(--font-mono);
    font-size: var(--step--1);
    color: var(--ink-2);
    overflow-wrap: anywhere;
}
.week__today {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
    border-radius: var(--radius-pill);
    padding: 0.05rem 0.4rem;
}
.week__day.is-today {
    background: var(--lime);
    border-color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.week__day.is-today .week__time { color: var(--ink); }
.week__day.is-closed .week__time { color: var(--ink-3); }

/* ---------- Aside info cards + spec tables ---------- */

.info-card { padding: var(--space-5); }

.spec {
    display: flex;
    flex-direction: column;
    font-size: var(--step--1);
}
.spec__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: 0.55rem;
    border-top: 1px solid var(--line);
}
.spec__row:first-child { border-top: 0; padding-top: 0; }
.spec__row dt {
    flex: none;
    color: var(--ink-3);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.spec__row dd {
    text-align: right;
    color: var(--ink);
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}
.spec__row dd a { font-weight: 600; }
.spec__hours { font-variant-numeric: tabular-nums; }
.spec__muted { color: var(--ink-3); font-weight: 500; }

.spec__address {
    display: flex;
    align-items: flex-start;
    gap: 0.45em;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--line);
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 500;
    line-height: var(--leading-snug);
    text-decoration: none;
}
.spec__address svg { width: 1.05em; height: 1.05em; flex: none; margin-top: 0.15em; color: var(--ink-3); }
.spec__address:hover { color: var(--link); }
.spec__address:hover svg { color: var(--link); }

/* ---------- Social links ---------- */

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: var(--bw) solid var(--ink);
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--ink);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.social-link svg { width: 1.25rem; height: 1.25rem; }
.social-link:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: var(--ink); color: var(--white); }

@media (prefers-reduced-motion: reduce) {
    .social-link:hover { transform: none; }
}

/* ---------- Clinic location map (Leaflet + OSM) ---------- */

.clinic-map {
    height: 200px;
    width: 100%;
    margin-bottom: var(--space-3);
    border: var(--bw) solid var(--line-strong);
    background: var(--surface-2);
    font-family: var(--font-body);
    /* Contain Leaflet's internal z-indexes so controls never sit over the
       sticky site header. */
    position: relative;
    z-index: 0;
    isolation: isolate;
}
.clinic-map .leaflet-control-attribution { font-size: 0.65rem; }
/* CSS dot marker — no Leaflet image dependency. */
.clinic-map__pin {
    --map-accent: var(--blue);
    background: var(--map-accent);
    border: 2px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgb(0 0 0 / 0.25);
}
html[data-theme="pro"] .clinic-map__pin { --map-accent: var(--evergreen); }

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: var(--step--1);
    font-weight: 600;
}
.map-link svg { width: 1em; height: 1em; flex: none; }

.detail__about {
    max-width: 60ch;
    line-height: var(--leading-loose);
    color: var(--ink);
}

/* ---------- Clinic dentists / team ---------- */

.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--space-4);
}
.dentist {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-5);
}
.dentist__top { display: flex; align-items: center; gap: var(--space-3); }
.dentist__avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
    overflow: hidden;
}
.dentist__avatar img { width: 100%; height: 100%; object-fit: cover; }
.team .dentist:nth-child(4n+2) .dentist__avatar { background: var(--pink); }
.team .dentist:nth-child(4n+3) .dentist__avatar { background: var(--blue); color: var(--white); }
.team .dentist:nth-child(4n)   .dentist__avatar { background: var(--orange); }
.dentist__ident { min-width: 0; }
.dentist__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-0);
    line-height: 1.12;
    letter-spacing: -0.01em;
}
.dentist__role { color: var(--ink-2); font-size: var(--step--1); margin-top: 0.1rem; }
.dentist__bio {
    color: var(--ink-2);
    font-size: var(--step--1);
    line-height: var(--leading-snug);
}
.dentist__license {
    align-self: flex-start;
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    background: var(--surface-2);
    border: var(--bw) solid var(--ink);
    padding: 0.12rem 0.45rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--step--1);
    color: var(--ink);
}
.back-link:hover { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow); }

/* ---------- Prose (about) ---------- */

.prose { max-width: var(--container-prose); }
.prose p, .prose ul, .prose ol { font-size: var(--step-0); line-height: var(--leading-loose); color: var(--ink); }
.prose p + p { margin-top: var(--space-4); }
.prose h2 {
    margin-top: var(--space-7);
    margin-bottom: var(--space-3);
    font-size: var(--step-2);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.prose ul {
    list-style: none;
    padding-left: 0;
}
.prose ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-top: var(--space-3);
}
.prose ul li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.5em;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--blue);
    border: 2px solid var(--ink);
}
.prose .lede {
    font-size: var(--step-2);
    line-height: var(--leading-snug);
    color: var(--ink);
    font-weight: 700;
    margin-bottom: var(--space-6);
    max-width: 38ch;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-7);
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding-inline: 0.6rem;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--ink);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out);
}
.pagination a:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); background: var(--yellow); }
.pagination a:active { transform: translate(1px, 1px); box-shadow: none; }
.pagination .is-active {
    background: var(--blue);
    color: var(--white);
}
@media (prefers-reduced-motion: reduce) {
    .pagination a:hover, .pagination a:active { transform: none; }
}

/* ---------- Auth pages ---------- */

.auth {
    display: grid;
    place-items: center;
    padding-block: var(--space-8);
}
.auth__card {
    width: 100%;
    max-width: 26rem;
    background: var(--white);
    border: var(--bw-3) solid var(--ink);
    box-shadow: var(--shadow-lg);
    padding: var(--space-6);
}
.auth__title {
    font-size: var(--step-3);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2);
}
.auth__sub { color: var(--ink-2); margin-bottom: var(--space-6); font-size: var(--step-0); }

.btn--google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    background: var(--surface);
    color: var(--ink);
    border-color: var(--ink);
}
.btn--google:hover { background: var(--paper); border-color: var(--ink); transform: none; }
.btn__icon { flex: 0 0 auto; }

.auth__divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-5) 0;
    color: var(--ink-3);
    font-size: var(--step--1);
}
.auth__divider::before,
.auth__divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: color-mix(in oklch, var(--ink) 18%, transparent);
}

/* ---------- Profile ---------- */

.profile-grid {
    display: grid;
    grid-template-columns: 10rem 1fr;
    row-gap: var(--space-4);
    column-gap: var(--space-5);
}
@media (max-width: 640px) {
    .profile-grid { grid-template-columns: 1fr; row-gap: var(--space-2); }
}
.profile-grid dt { color: var(--ink-2); font-family: var(--font-display); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.02em; font-weight: 600; }
.profile-grid dd { color: var(--ink); }

.role-pill {
    display: inline-block;
    padding: 0.16rem 0.55rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
    margin-right: var(--space-1);
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: var(--bw-3) solid var(--ink);
    background: var(--white);
    color: var(--ink-2);
    font-size: var(--step--1);
    margin-top: var(--space-8);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 1.5fr) repeat(3, minmax(9rem, 1fr));
    gap: var(--space-6) var(--space-5);
    padding-block: var(--space-7);
}
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
}
.footer-brand__note {
    max-width: 24ch;
}
.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
}
.footer-col__title {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: var(--leading-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    margin-bottom: var(--space-2);
}
a.footer-link {
    color: var(--ink-2);
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease-out);
}
a.footer-link:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-1) var(--space-5);
    padding-block: var(--space-4) var(--space-5);
    border-top: var(--bw) solid var(--ink);
    color: var(--ink-3);
}
@media (max-width: 820px) {
    .site-footer { margin-top: var(--space-7); }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6) var(--space-4);
        padding-block: var(--space-6);
    }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Kicker / eyebrow (used sparingly) ---------- */

.kicker {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--blue);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
}

/* ---------- Utility ---------- */

.muted    { color: var(--ink-2); }
.subtle   { color: var(--ink-3); }
.small    { font-size: var(--step--1); }
.center   { text-align: center; }
.no-wrap  { white-space: nowrap; }
.mono     { font-family: var(--font-mono); }
.divider  { height: var(--bw); background: var(--ink); margin-block: var(--space-6); }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.section-head h2 { margin: 0; }

.spacer-7 { height: var(--space-7); }
.spacer-6 { height: var(--space-6); }
.spacer-4 { height: var(--space-4); }

/* ---------- Two-up split (home "patients / clinics") ---------- */

.split-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: start;
}
@media (max-width: 760px) {
    .split-2 { grid-template-columns: 1fr; }
}

.split-2__col h2 {
    margin-bottom: var(--space-4);
    max-width: 16ch;
}
.split-2__col p {
    color: var(--ink-2);
    max-width: 50ch;
}
.split-2__col .btn { margin-top: var(--space-5); }

/* ---------- Aside section header (used in clinic show sidebar) ---------- */

.aside-head {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--yellow);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 0.2rem 0.6rem;
    margin-bottom: var(--space-4);
}

/* ---------- Product page header (clinics, contact, profile) ---------- */

.page-head { margin-bottom: var(--space-7); }
.page-head h1 { max-width: 24ch; }
.page-head__intro {
    margin-top: var(--space-4);
    max-width: 54ch;
    color: var(--ink-2);
    font-size: var(--step-1);
}

/* ---------- Tinted section (used on home for the patients/clinics block) ---------- */

.section--surface {
    background: var(--blue-soft);
    border-block: var(--bw-3) solid var(--ink);
}

/* ---------- Hero variants (landing pages) ---------- */

.hero--blue { background: var(--blue); }
.hero--blue h1 { color: var(--white); }
.hero--blue .hero__lead { color: color-mix(in oklch, var(--white) 88%, var(--blue)); }
.hero--blue .kicker { background: var(--yellow); color: var(--ink); }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* ---------- Numbered steps (ordered flow) ---------- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    counter-reset: step;
}
.step {
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-5);
}
.step__num {
    counter-increment: step;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink);
    background: var(--yellow);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
}
.step__num::before { content: counter(step); }
.steps .step:nth-child(4n+2) .step__num { background: var(--lime); }
.steps .step:nth-child(4n+3) .step__num { background: var(--pink); }
.steps .step:nth-child(4n)   .step__num { background: var(--blue-soft); }
.step h3 { margin-bottom: var(--space-2); }
.step p { color: var(--ink-2); }

/* ---------- Feature panels (varied color blocks) ---------- */

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}
.feature {
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-6);
}
.feature-list .feature:nth-child(4n+1) { background: var(--yellow-soft); }
.feature-list .feature:nth-child(4n+2) { background: var(--white); }
.feature-list .feature:nth-child(4n+3) { background: var(--blue-soft); }
.feature-list .feature:nth-child(4n)   { background: var(--pink-soft); }
.feature h3 { margin-bottom: var(--space-3); }
.feature p { color: var(--ink-2); max-width: 42ch; }

/* ---------- CTA band (drenched, end-of-page) ---------- */

.cta-band {
    background: var(--lime);
    border-block: var(--bw-3) solid var(--ink);
    padding-block: var(--space-8);
}
.cta-band h2 {
    font-size: var(--step-4);
    max-width: 20ch;
    margin-bottom: var(--space-3);
}
.cta-band p { color: var(--ink-2); max-width: 48ch; margin-bottom: var(--space-6); }

/* ---------- Pricing ---------- */

.pricing-head {
    max-width: 44ch;
    margin: 0 auto var(--space-8);
    text-align: center;
}
.pricing-head h2 { font-size: var(--step-4); margin-bottom: var(--space-3); }
.pricing-head p { color: var(--ink-2); margin-inline: auto; }

.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    align-items: stretch;
}
@media (max-width: 900px) {
    .pricing { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow);
    padding: var(--space-6);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out);
}
.price-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }

.price-card--featured {
    background: var(--yellow);
    border-width: var(--bw-3);
    box-shadow: var(--shadow-lg);
}
.price-card--featured:hover { box-shadow: 10px 10px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) {
    .price-card { transition: none; }
    .price-card:hover { transform: none; }
}

.price-badge {
    position: absolute;
    top: calc(var(--space-4) * -1);
    right: var(--space-5);
    padding: 0.3rem 0.7rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--blue);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    rotate: 3deg;
}

.price-card__head { display: flex; flex-direction: column; gap: var(--space-3); }

.price-tier {
    align-self: flex-start;
    padding: 0.2rem 0.7rem;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
}
.price-tier--free  { background: var(--lime); }
.price-tier--basic { background: var(--pink); }
.price-tier--pro   { background: var(--white); }

.price-card__for { color: var(--ink-2); font-size: var(--step--1); margin: 0; }
.price-card--featured .price-card__for { color: color-mix(in oklch, var(--ink) 78%, var(--yellow)); }

.price-amount {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding-bottom: var(--space-5);
    border-bottom: var(--bw) solid var(--ink);
}
.price-amount__num {
    font-family: var(--font-display);
    font-size: var(--step-4);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}
.price-amount__per { color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.price-card--featured .price-amount__per { color: color-mix(in oklch, var(--ink) 78%, var(--yellow)); }

.price-feats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    font-size: var(--step--1);
}
.price-feats li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--ink);
    line-height: var(--leading-snug);
}
.price-feats li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0.05em;
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--lime);
    border: var(--bw) solid var(--ink);
}
.price-card--featured .price-feats li::before { background: var(--white); }

.price-card .btn { margin-top: auto; }

.pricing-note {
    margin: var(--space-7) auto 0;
    max-width: none;
    text-align: center;
    color: var(--ink-3);
    font-size: var(--step--1);
}

/* ---------- Error page ---------- */

.errpage {
    padding-block: clamp(var(--space-8), 10vw, 7rem);
}
.errpage__inner {
    display: grid;
    justify-items: start;
    gap: var(--space-5);
}
.errpage__code {
    display: flex;
    gap: var(--space-3);
    margin: 0 0 var(--space-2);
}
.errtile {
    display: grid;
    place-items: center;
    width: clamp(3.25rem, 11vw, 5.25rem);
    aspect-ratio: 1;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 8vw, 3.75rem);
    line-height: 1;
    color: var(--ink);
    background: var(--white);
    border: var(--bw-3) solid var(--ink);
    box-shadow: var(--shadow-lg);
    transform: rotate(var(--rot, 0deg));
}
.errtile:nth-child(3n+1) { background: var(--yellow); }
.errtile:nth-child(3n+2) { background: var(--blue); color: var(--white); }
.errtile:nth-child(3n)   { background: var(--pink); }

.errpage__title {
    font-size: var(--step-4);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
    max-width: 18ch;
}
.errpage__lead {
    font-size: var(--step-1);
    font-weight: 500;
    color: var(--ink-2);
    max-width: 52ch;
}
.errpage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

@media (prefers-reduced-motion: no-preference) {
    .errtile {
        animation: errtile-in 440ms var(--ease-out) backwards;
    }
    .errtile:nth-child(2) { animation-delay: 70ms; }
    .errtile:nth-child(3) { animation-delay: 140ms; }
    .errtile:nth-child(4) { animation-delay: 210ms; }
    @keyframes errtile-in {
        from { opacity: 0; transform: translateY(14px) rotate(var(--rot, 0deg)); }
        to   { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }
    }
}

/* ---------- Clinic packages ---------- */

.pkg-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
}
.pkg-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
}
.pkg-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}
.pkg-card__name {
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: 700;
    margin: 0;
}
.pkg-card__price {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pkg-card__desc { color: var(--ink-2); font-size: var(--step--1); margin: 0; }
.pkg-card__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--step--1);
}
.pkg-card__items li { padding-left: 1.1rem; position: relative; }
.pkg-card__items li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.pkg-card__save {
    margin: 0;
    margin-top: auto;
    font-weight: 600;
    font-size: var(--step--1);
}
.pkg-card__save s { color: var(--ink-3); font-weight: 400; margin-right: 0.4rem; }

.svc-price-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.svc-price-list__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--bw) solid var(--ink);
}
.svc-price-list__row:last-child { border-bottom: 0; }
.svc-price-list__name { font-weight: 600; }
.svc-price-list__price {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.svc-price-list__price--na { color: var(--ink-3); font-weight: 600; }

/* =============================================================
   THEME: PROFESSIONAL  (html[data-theme="pro"])
   A calm, premium alternative to the neo-brutalist default.
   Deep-evergreen brand, Fraunces serif display, soft blurred
   shadows, rounded corners, hairline borders. Activated by the
   admin Appearance toggle; the neo-brutalist look is the default.

   Strategy: the base system is token-driven, so most of the work
   is re-pointing tokens (palette, borders, shadows, radii, font).
   The blocks after the token map only fix what tokens can't reach
   — hardcoded offset shadows, the translate-into-shadow hovers,
   the drenched-bright panels, and a few square accents.
   ============================================================= */

html[data-theme="pro"] {
    /* Surfaces — off-white with a whisper of evergreen, true-white cards */
    --paper:   oklch(0.985 0.006 165);
    --white:   oklch(1 0 0);
    --surface: oklch(1 0 0);
    --surface-2: oklch(0.955 0.008 165);

    /* Ink — evergreen-tinted near-black */
    --ink:   oklch(0.24 0.02 175);
    --ink-2: oklch(0.44 0.016 175);
    --ink-3: oklch(0.56 0.012 175);

    /* Brand — committed deep evergreen + a small warm-clay accent */
    --evergreen:      oklch(0.41 0.082 165);
    --evergreen-deep: oklch(0.32 0.08 165);
    --clay:           oklch(0.62 0.13 55);

    /* Re-point the bright palette onto the evergreen family. Components that
       fill with these tokens recolor automatically; the bright "playful"
       fills become restrained brand tints. */
    --blue:        var(--evergreen);
    --blue-soft:   oklch(0.93 0.026 165);
    --yellow:      oklch(0.935 0.03 165);   /* badge / eyebrow soft brand fill */
    --yellow-soft: oklch(0.965 0.018 165);
    --lime:        oklch(0.925 0.035 158);
    --pink:        oklch(0.93 0.045 50);    /* soft clay */
    --pink-soft:   oklch(0.955 0.03 50);
    --purple:      oklch(0.47 0.07 200);    /* muted teal, decorative */
    --orange:      oklch(0.82 0.085 62);    /* soft clay, decorative */

    --brand:       var(--evergreen);
    --brand-hover: var(--evergreen-deep);
    --brand-soft:  var(--blue-soft);
    --on-brand:    var(--white);
    --accent:      var(--clay);
    --link:        oklch(0.42 0.085 165);
    --ring:        var(--evergreen);

    --line:        oklch(0.88 0.012 165);
    --line-strong: oklch(0.80 0.015 165);

    /* Status — keep semantic hues, soften the fills */
    --success-soft: oklch(0.95 0.03 155);
    --danger-soft:  oklch(0.95 0.035 25);

    /* Hairline borders */
    --bw:   1px;
    --bw-3: 1px;

    /* Serif display, humanist body (Fraunces is loaded in the <head> for this theme) */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

    /* Rounded corners */
    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   16px;
    --radius-pill: 999px;

    /* Soft, blurred shadows */
    --shadow-sm: 0 1px 2px oklch(0.3 0.02 175 / 0.10);
    --shadow:    0 6px 20px -8px oklch(0.3 0.03 175 / 0.16), 0 2px 6px -3px oklch(0.3 0.02 175 / 0.10);
    --shadow-lg: 0 20px 44px -14px oklch(0.3 0.03 175 / 0.22), 0 6px 14px -6px oklch(0.3 0.02 175 / 0.12);
}

/* ---- Typography ------------------------------------------------ */
html[data-theme="pro"] h1,
html[data-theme="pro"] h2 { letter-spacing: -0.015em; }
html[data-theme="pro"] .hero h1 { letter-spacing: -0.02em; }

/* Form labels read as quiet sentence-case captions, not loud caps */
html[data-theme="pro"] .field__label,
html[data-theme="pro"] label {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--ink-2);
}

/* Inline links: underline shifts color instead of slamming a yellow block */
html[data-theme="pro"] a:not(.btn):not(.nav-link):not(.tag):not(.brand-mark):not(.footer-link) { text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
html[data-theme="pro"] a:not(.btn):not(.nav-link):not(.tag):not(.brand-mark):not(.footer-link):hover {
    background: transparent;
    color: var(--evergreen-deep);
    text-decoration-color: currentColor;
    box-shadow: none;
}
html[data-theme="pro"] ::selection { background: var(--blue-soft); color: var(--ink); }
html[data-theme="pro"] :focus-visible { outline: 2px solid var(--evergreen); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---- Rounded corners + hairline borders on boxed surfaces ------ */
html[data-theme="pro"] :is(
    .card, .filter-bar, .clinic-card, .dentist, .step, .feature, .price-card,
    .pkg-card, .hero__panel, .auth__card, .flash, .nav-toggle, .pagination a,
    .pagination span, .social-link, .play-tile, .errtile, .dentist__avatar,
    .dentist__license, .input, input, textarea, select, .btn
) { border-radius: var(--radius); }

html[data-theme="pro"] :is(.card, .filter-bar, .price-card, .feature, .auth__card, .hero__panel) { border-radius: var(--radius-lg); }

/* Pills */
html[data-theme="pro"] :is(.tag, .role-pill, .price-tier, .price-badge, .kicker, .nav-link, .back-link) { border-radius: var(--radius-pill); }
html[data-theme="pro"] .dentist__avatar,
html[data-theme="pro"] .brand-mark__glyph { border-radius: 12px; }

/* Soften every near-black border to a hairline line */
html[data-theme="pro"] :is(
    .card, .filter-bar, .clinic-card, .dentist, .step, .feature, .price-card,
    .pkg-card, .hero__panel, .auth__card, .flash, .nav-toggle, .pagination a,
    .pagination span, .social-link, .dentist__license, .tag, .role-pill,
    .price-tier, .input, input, textarea, select, .btn--secondary, .btn--google,
    .cta-band, .section--surface
) { border-color: var(--line); }

/* ---- Header / nav --------------------------------------------- */
html[data-theme="pro"] .site-header { border-bottom: 1px solid var(--line); }
html[data-theme="pro"] .brand-mark { text-transform: none; letter-spacing: -0.01em; }
html[data-theme="pro"] .brand-mark__glyph { background: var(--evergreen); color: var(--white); border: 0; box-shadow: none; }
html[data-theme="pro"] .nav-link { padding-inline: var(--space-3); }
html[data-theme="pro"] .nav-link:hover,
html[data-theme="pro"] .nav-link[aria-current="page"] { background: var(--blue-soft); color: var(--evergreen-deep); box-shadow: none; }

/* ---- Buttons --------------------------------------------------- */
html[data-theme="pro"] .btn { box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
html[data-theme="pro"] .btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .btn--primary { background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }
html[data-theme="pro"] .btn--primary:hover { background: var(--evergreen-deep); border-color: var(--evergreen-deep); }
html[data-theme="pro"] .btn--on-brand { background: var(--white); color: var(--evergreen-deep); border-color: var(--white); }
html[data-theme="pro"] .btn--ghost { box-shadow: none; }
html[data-theme="pro"] .btn--ghost:hover { background: var(--blue-soft); border-color: transparent; color: var(--evergreen-deep); box-shadow: none; }
html[data-theme="pro"] .btn--ghost:active { transform: translateY(0); }
html[data-theme="pro"] .btn--link { box-shadow: none; text-decoration-thickness: 1px; }
html[data-theme="pro"] .btn--link:hover { background: transparent; color: var(--evergreen-deep); }

/* ---- Forms ----------------------------------------------------- */
html[data-theme="pro"] :is(.input, input, textarea, select):focus {
    border-color: var(--evergreen);
    box-shadow: 0 0 0 3px oklch(0.45 0.08 165 / 0.18);
}
html[data-theme="pro"] input[type="checkbox"],
html[data-theme="pro"] input[type="radio"] { accent-color: var(--evergreen); }

/* ---- Cards / interactive lifts -------------------------------- */
html[data-theme="pro"] .clinic-card,
html[data-theme="pro"] .price-card { box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--line-strong);
}
html[data-theme="pro"] .price-card:hover,
html[data-theme="pro"] .price-card--featured:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
html[data-theme="pro"] .price-card--featured { background: var(--blue-soft); box-shadow: var(--shadow); }
html[data-theme="pro"] .price-badge { rotate: 0deg; background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }

/* ---- Tags / badges / pills ------------------------------------ */
html[data-theme="pro"] a.tag { box-shadow: none; }
html[data-theme="pro"] a.tag:hover { transform: none; box-shadow: none; background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }
html[data-theme="pro"] .kicker { background: var(--evergreen); color: var(--white); border: 0; box-shadow: none; letter-spacing: 0.04em; }
html[data-theme="pro"] .social-link { box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .social-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }

/* ---- Section eyebrows: drop the colored box for a quiet label -- */
html[data-theme="pro"] :is(.detail-section h2, .aside-head) {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 var(--space-2);
    color: var(--evergreen-deep);
}
html[data-theme="pro"] .detail-section__count {
    color: var(--evergreen-deep);
    background: var(--brand-soft);
    border-color: transparent;
    box-shadow: none;
    font-family: var(--font-body);
}
/* The pro heading adds bottom padding; drop it inside the flex head so the count
   badge centers on the heading text instead of sitting low. */
html[data-theme="pro"] .detail-section__head h2 { padding-bottom: 0; }

/* ---- Flash messages — soft tinted, semantic hues --------------- */
html[data-theme="pro"] .flash { box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .flash--success { background: oklch(0.95 0.03 155); }
html[data-theme="pro"] .flash--error,
html[data-theme="pro"] .flash--danger { background: oklch(0.95 0.035 25); }
html[data-theme="pro"] .flash--warning { background: oklch(0.96 0.05 85); }

/* ---- Hero — evergreen drench ----------------------------------- */
html[data-theme="pro"] .hero {
    background: var(--evergreen-deep);
    color: var(--white);
    border-bottom: 1px solid var(--line);
}
html[data-theme="pro"] .hero::before {
    background-image: radial-gradient(oklch(1 0 0) 1px, transparent 1.4px);
    opacity: 0.05;
}
html[data-theme="pro"] .hero h1 { color: var(--white); }
html[data-theme="pro"] .hero__lead { color: oklch(0.92 0.02 165); }
html[data-theme="pro"] .hero--blue { background: var(--evergreen); }
html[data-theme="pro"] .hero__inline-mark { background: var(--clay); border: 0; border-radius: 50%; }

/* ---- Decorative tiles / sparks — straighten + round ----------- */
html[data-theme="pro"] .play-tile { rotate: 0deg; border-color: var(--line); box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .play-tile:hover { box-shadow: var(--shadow); }
html[data-theme="pro"] .play-spark--2 { border: 0; box-shadow: var(--shadow-sm); }
html[data-theme="pro"] .errtile { transform: none; border-color: var(--line); box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: no-preference) {
    html[data-theme="pro"] .errtile { animation: none; }
}

/* ---- Pagination ----------------------------------------------- */
html[data-theme="pro"] .pagination a { box-shadow: none; }
html[data-theme="pro"] .pagination a:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); background: var(--blue-soft); }
html[data-theme="pro"] .pagination a:active { transform: translateY(0); box-shadow: none; }
html[data-theme="pro"] .pagination .is-active { background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }

/* ---- Prose bullets, hours highlight, rules -------------------- */
html[data-theme="pro"] .prose ul li::before { width: 0.5rem; height: 0.5rem; top: 0.6em; border: 0; border-radius: 50%; background: var(--evergreen); }
html[data-theme="pro"] .back-link:hover { background: var(--blue-soft); box-shadow: 0 0 0 4px var(--blue-soft); color: var(--evergreen-deep); }

/* ---- Clinic detail header: evergreen monogram + calmer status pill ---- */
html[data-theme="pro"] .clinic-head__glyph {
    background: var(--evergreen);
    color: var(--white);
    border: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
html[data-theme="pro"] .clinic-status { box-shadow: none; border-color: var(--line); }
html[data-theme="pro"] .clinic-status.is-open { background: var(--success-soft); color: var(--ink); }
html[data-theme="pro"] .clinic-status.is-closed { background: var(--surface-2); }

/* ---- Clinic section jump-nav — quiet evergreen pills ----------- */
html[data-theme="pro"] .clinic-nav__link {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--radius-pill);
    background: var(--surface);
}
html[data-theme="pro"] .clinic-nav__link:hover { background: var(--blue-soft); color: var(--evergreen-deep); border-color: var(--line); }
html[data-theme="pro"] .clinic-nav__link.is-active {
    background: var(--evergreen);
    color: var(--white);
    border-color: var(--evergreen);
    box-shadow: none;
}
html[data-theme="pro"] .clinic-nav__link.is-active .clinic-nav__count { color: oklch(0.92 0.02 165); }
html[data-theme="pro"] .clinic-nav__link:focus-visible { outline-color: var(--evergreen); }
html[data-theme="pro"] .clinic-nav { box-shadow: inset 0 -1px 0 var(--line); }

/* ---- Opening hours week grid ----------------------------------- */
html[data-theme="pro"] .week__day { background: var(--surface); }
html[data-theme="pro"] .week__day.is-today { background: var(--blue-soft); border-color: var(--line); box-shadow: none; }
html[data-theme="pro"] .week__day.is-today .week__time { color: var(--evergreen-deep); }
html[data-theme="pro"] .week__today { background: var(--evergreen); color: var(--white); border: 0; }
html[data-theme="pro"] .info-card { box-shadow: var(--shadow-sm); }
html[data-theme="pro"] hr { border-top: 1px solid var(--line); }
html[data-theme="pro"] .divider { height: 1px; background: var(--line); }
html[data-theme="pro"] .site-footer { border-top: 1px solid var(--line); }
html[data-theme="pro"] .footer-legal { border-top-color: var(--line); }
html[data-theme="pro"] .footer-col__title {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--ink-2);
}
html[data-theme="pro"] .detail-section { border-top-color: var(--line); }
html[data-theme="pro"] .social-row { border-top-color: var(--line); }
html[data-theme="pro"] .price-amount { border-bottom-color: var(--line); }

/* ---- Reduced motion: drop the lifts the base theme also drops -- */
@media (prefers-reduced-motion: reduce) {
    html[data-theme="pro"] :is(.btn, .clinic-card, .price-card, .social-link, .pagination a):hover { transform: none; }
}


/* ── Star rating (shared: account page + clinic reviews) ─────────────────── */
.stars {
    display: inline-flex;
    gap: 1px;
    font-size: 1.05rem;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}
.stars--sm { font-size: 0.85rem; }
.stars--lg { font-size: 1.6rem; }
.stars__star { color: var(--surface-2); -webkit-text-stroke: 0.6px var(--ink); }
.stars__star.is-on { color: oklch(0.80 0.16 78); }

/* ── Patient account page ────────────────────────────────────────────────── */
.account-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}
.account-card__list { display: grid; gap: var(--space-3); margin: 0; }
.account-card__list dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
.account-card__list dd { margin: 0; font-weight: 600; }

.account-section { margin-bottom: var(--space-6); }
.account-section__title { font-size: 1.15rem; margin-bottom: var(--space-3); }

.account-reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.account-reviews__item {
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-2);
}
.account-reviews__clinic { font-weight: 700; }
.account-reviews__body { margin: 0; color: var(--ink-2); }

/* Patient appointment tracking list */
.appt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.appt-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-4);
    border: var(--bw) solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
}
.appt-card__when {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: var(--space-2) var(--space-3);
    background: var(--paper);
    border: var(--bw) solid var(--ink);
    text-align: center;
    line-height: 1.2;
}
.appt-card__date { font-weight: 700; font-size: var(--step--1); }
.appt-card__time { color: var(--ink-3); font-size: 0.78rem; }
.appt-card__clinic { font-weight: 700; }
.appt-card__meta { margin: var(--space-1) 0 0; color: var(--ink-2); font-size: var(--step--1); }
.appt-card__status { align-self: center; white-space: nowrap; }
@media (max-width: 34rem) {
    .appt-card { grid-template-columns: auto 1fr; }
    .appt-card__status { grid-column: 2; justify-self: start; }
}

.account-upgrade {
    border: 2px solid var(--line);
    background: var(--accent-soft);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
}

.pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border: 1.5px solid var(--ink);
    vertical-align: middle;
}
.pill--warn { background: var(--yellow); }

/* ── Clinic reviews ──────────────────────────────────────────────────────── */
.review-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-5);
    align-items: center;
    padding: var(--space-4);
    border: 2px solid var(--line);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    margin-bottom: var(--space-5);
}
.review-summary__score { display: grid; justify-items: center; gap: var(--space-1); text-align: center; }
.review-summary__avg { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.review-summary__bars { display: grid; gap: 4px; min-width: 0; }
.review-bar { display: grid; grid-template-columns: 2.2rem 1fr 1.6rem; gap: var(--space-2); align-items: center; }
.review-bar__label { font-size: 0.8rem; font-weight: 600; }
.review-bar__track { height: 8px; background: var(--surface-2); border: 1px solid var(--ink); }
.review-bar__fill { display: block; height: 100%; background: oklch(0.80 0.16 78); }
.review-bar__n { text-align: right; }

@media (max-width: 560px) {
    .review-summary { grid-template-columns: 1fr; }
}

/* Write-a-review form */
.review-form {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 2px solid var(--line);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    margin-bottom: var(--space-5);
}
.review-form__rating { border: 0; padding: 0; margin: 0; }
.review-form__rating legend { font-weight: 700; margin-bottom: var(--space-2); }
.review-form__field { display: grid; gap: var(--space-2); }
.review-form__label { font-weight: 700; }
.review-form textarea {
    width: 100%;
    border: 2px solid var(--line);
    padding: var(--space-3);
    font: inherit;
    resize: vertical;
}
.review-form__count { justify-self: end; font-size: 0.8rem; color: var(--ink-3); }
.review-form__count.is-over { color: var(--pink); font-weight: 700; }
.review-form__previews { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.review-form__thumb { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--line); }
.review-form__photo-error { font-size: 0.85rem; font-weight: 700; color: var(--pink); }
.review-list__more { margin-top: var(--space-4); }

/* Pure-CSS star picker: DOM order 5→1 + row-reverse so ~ lights up the hovered star and lower. */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; font-size: 1.9rem; line-height: 1; }
.star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-input label { color: var(--surface-2); cursor: pointer; padding: 0 1px; transition: color 0.1s; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: oklch(0.80 0.16 78); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.review-signin {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: var(--space-4);
    border: 2px dashed var(--line);
    background: var(--accent-soft);
    margin-bottom: var(--space-5);
}
.review-signin p { margin: 0; }
.review-note { margin-bottom: var(--space-5); }

/* Review list */
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.review-item {
    border: 2px solid var(--line);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-2);
}
.review-item__head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.review-item__author { font-weight: 700; }
.review-item__body { margin: 0; color: var(--ink-2); }
.review-item__photos { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.review-item__photos img { width: 96px; height: 96px; object-fit: cover; border: 2px solid var(--line); }

.review-response {
    margin-top: var(--space-2);
    padding: var(--space-3);
    border-left: 4px solid var(--ink);
    background: var(--surface-2);
}
.review-response__from { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 0.85rem; }
.review-response__from svg { width: 1rem; height: 1rem; }
.review-response__body { margin: var(--space-1) 0 0; color: var(--ink-2); }

.pill--pending { background: var(--yellow-soft); }
.pill--ok { background: var(--blue-soft); }
.pill--off { background: var(--paper); color: var(--ink-3); }
html[data-theme="pro"] .pill--ok { background: var(--evergreen); color: var(--white); border-color: var(--evergreen); }

/* ── Public appointment booking ──────────────────────────────────────────── */
.booking {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: var(--space-6);
    align-items: start;
}
@media (max-width: 56rem) {
    .booking { grid-template-columns: 1fr; }
    .booking__aside { order: -1; }
}

.booking__legend {
    font-family: var(--font-display);
    font-size: var(--step-1);
    margin: var(--space-2) 0 calc(-1 * var(--space-2));
    padding-top: var(--space-4);
    border-top: var(--bw) solid var(--ink);
}
.booking__legend:first-of-type { padding-top: 0; border-top: 0; }

.booking__names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
@media (max-width: 30rem) {
    .booking__names { grid-template-columns: 1fr; }
}

/* Honeypot — present for bots, removed from sight and the tab order for people. */
.booking__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.slotgrid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 2.75rem;
    align-content: flex-start;
}
.slotgrid__hint {
    margin: 0;
    align-self: center;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.slot {
    padding: 0.45rem 0.8rem;
    background: var(--white);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    font-size: var(--step--1);
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.slot:hover { background: var(--yellow-soft); }
.slot:active { transform: translate(2px, 2px); box-shadow: none; }
.slot.is-selected {
    background: var(--blue);
    color: var(--white);
    transform: translate(2px, 2px);
    box-shadow: none;
}
/* A taken slot: shown (so the patient sees the day filling up) but not pickable, and
   deliberately detail-free — just "Busy". */
.slot--busy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--paper);
    color: var(--ink-3);
    box-shadow: none;
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.slot--busy:hover { background: var(--paper); }
.slot__tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 0.05rem 0.3rem;
    border: 1.5px solid currentColor;
}

/* Service / dentist pick-lists: a plain checkbox/radio list laid out in columns. */
.checklist { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2) var(--space-5);
    margin-top: var(--space-3);
}
@media (max-width: 40rem) { .checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 26rem) { .checkbox-grid { grid-template-columns: 1fr; } }

.check-item {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    cursor: pointer;
    font-weight: 500;
    line-height: var(--leading-normal);
}
.check-item input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--blue); cursor: pointer; }
.check-item__label { min-width: 0; }
.check-item__meta { color: var(--ink-3); font-size: var(--step--1); }

html[data-theme="pro"] .check-item input { accent-color: var(--evergreen); }

/* Embedded Event Calendar (vkurko) month view used to pick a booking day. */
.booking-cal { margin-top: var(--space-3); }
.booking-cal .ec { font-family: inherit; }
.booking-cal .ec-toolbar { margin-bottom: var(--space-3); }
.booking-cal .ec-day.ec-disabled { opacity: 0.4; }
.booking-cal .ec-day-head { font-weight: 600; }
.booking-cal .ec-highlight { background: var(--yellow-soft); }
html[data-theme="pro"] .booking-cal .ec-highlight { background: var(--blue-soft); }

.booking__steps {
    margin: var(--space-3) 0 0;
    padding-left: 1.1rem;
    color: var(--ink-2);
    font-size: var(--step--1);
    line-height: var(--leading-normal);
}
.booking__steps li + li { margin-top: var(--space-2); }

/* Confirmation screen */
.booking-done { text-align: center; }
.booking-done__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: var(--space-4);
    background: var(--yellow);
    border: var(--bw) solid var(--ink);
    box-shadow: var(--shadow-sm);
}
.booking-done__check svg { width: 2rem; height: 2rem; }
.booking-done__title { margin: 0 0 var(--space-3); }
.booking-done__summary {
    margin: var(--space-5) 0;
    text-align: left;
}
.booking-done__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

html[data-theme="pro"] .slot.is-selected { background: var(--evergreen); border-color: var(--evergreen); }
html[data-theme="pro"] .booking-done__check { background: var(--evergreen); color: var(--white); }
