:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --line-strong: #d6dbe2;
    --accent: #1f4f78;
    --accent-dark: #183e5e;
    --accent-soft: #eef4f8;
    --accent-soft-2: #e4eef5;
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 20px 60px rgba(15, 23, 42, 0.08);
    --radius-lg: 28px;
    --radius-md: 22px;
    --nav-height: 76px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-dark);
}

::selection {
    background: var(--accent-soft-2);
    color: var(--text);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-bg: #122f47;
    --bs-btn-active-border-color: #122f47;
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: #aebfcd;
    --bs-btn-hover-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-soft);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-color: var(--accent);
    --bs-btn-active-bg: var(--accent-soft-2);
    --bs-btn-active-border-color: var(--accent);
}

/* Navigation */
.site-navbar {
    min-height: var(--nav-height);
    background: rgba(246, 247, 248, .88);
    border-bottom: 1px solid rgba(214, 219, 226, .7);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
    z-index: 1030;
}

.site-navbar.is-scrolled {
    background: rgba(255, 255, 255, .94);
    border-bottom-color: rgba(214, 219, 226, .9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}

.navbar-brand,
.footer-brand {
    color: var(--text);
    text-decoration: none;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.035em;
}

.navbar-brand span,
.footer-brand span {
    color: var(--accent);
}

.site-navbar .nav-link {
    position: relative;
    margin: 0 .05rem;
    padding: .7rem .72rem !important;
    color: #45505d;
    font-size: .96rem;
    font-weight: 500;
    transition: color .2s ease;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--accent);
}

.site-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: .72rem;
    right: .72rem;
    bottom: .3rem;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.navbar-cta {
    padding: .62rem 1rem;
}

.navbar-toggler {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none !important;
}

.navbar-toggler:hover,
.navbar-toggler:focus-visible {
    background: var(--accent-soft);
}

.menu-toggle-icon {
    position: relative;
    width: 26px;
    height: 20px;
    display: block;
}

.menu-toggle-icon span {
    position: absolute;
    left: 0;
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transform-origin: center;
    transition: top .25s ease, transform .25s ease, opacity .18s ease;
}

.menu-toggle-icon span:nth-child(1) { top: 1px; }
.menu-toggle-icon span:nth-child(2) { top: 9px; }
.menu-toggle-icon span:nth-child(3) { top: 17px; }

.navbar-toggler[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(.3);
}

.navbar-toggler[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

body.mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .site-navbar {
        min-height: var(--nav-height);
    }

    .site-navbar .container {
        min-height: var(--nav-height);
    }

    #mainNav {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        width: 100vw;
        height: calc(100dvh - var(--nav-height)) !important;
        padding: clamp(2rem, 6vh, 4rem) max(1.5rem, calc((100vw - 540px) / 2));
        overflow-y: auto;
        overscroll-behavior: contain;
        background:
            radial-gradient(circle at 85% 10%, rgba(31, 79, 120, .08), transparent 34%),
            rgba(248, 250, 252, .985);
        border-top: 1px solid var(--line);
    }

    #mainNav.collapsing {
        display: block;
        height: calc(100dvh - var(--nav-height)) !important;
        overflow-y: hidden;
        transition: opacity .18s ease;
    }

    #mainNav .navbar-nav {
        width: 100%;
        align-items: stretch !important;
        margin: 0 !important;
    }

    .site-navbar #mainNav .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--line);
    }

    .site-navbar #mainNav .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin: 0;
        padding: .88rem 0 !important;
        color: var(--text);
        font-size: clamp(1.55rem, 6vw, 2.2rem);
        line-height: 1.2;
        font-weight: 500;
        letter-spacing: -.035em;
    }

    .site-navbar #mainNav .nav-link::before {
        content: '';
        order: 2;
        width: .48rem;
        height: .48rem;
        margin-left: 1.25rem;
        border-top: 1.5px solid #94a3b8;
        border-right: 1.5px solid #94a3b8;
        transform: rotate(45deg);
        transition: border-color .2s ease, transform .2s ease;
    }

    .site-navbar #mainNav .nav-link:hover::before,
    .site-navbar #mainNav .nav-link.active::before {
        border-color: var(--accent);
        transform: translateX(3px) rotate(45deg);
    }

    .site-navbar #mainNav .nav-link.active {
        color: var(--accent);
    }

    .site-navbar #mainNav .nav-link.active::after {
        display: none;
    }

    #mainNav .navbar-cta {
        width: 100%;
        min-height: 54px;
        margin: 2rem 0 0 !important;
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-toggle-icon span,
    #mainNav.collapsing {
        transition: none;
    }
}

/* Shared section language */
.hero-wrap {
    padding: 3rem 0 5.5rem;
    background:
        radial-gradient(circle at 14% 8%, rgba(31, 79, 120, .065), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.hero-card {
    min-height: 610px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-photo-wrap {
    min-height: 610px;
    background: #e9ecef;
    overflow: hidden;
}

.hero-photo {
    width: 100%;
    height: 100%;
    min-height: 610px;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.hero-content {
    display: flex;
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 1rem;
    padding: .38rem .75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .79rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2.55rem, 5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 430;
    letter-spacing: -.055em;
}

.hero-title span {
    display: inline-block;
    margin-left: .12em;
    color: #4b5563;
    font-size: .46em;
    font-weight: 500;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.accent-divider {
    width: 72px;
    height: 4px;
    margin: 1.6rem 0;
    border-radius: 999px;
    background: var(--accent);
}

.hero-text {
    color: #273444;
    font-size: clamp(1.1rem, 1.7vw, 1.32rem);
    line-height: 1.65;
    font-weight: 430;
}

.hero-subtext {
    max-width: 34rem;
    margin-top: 1.35rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.hero-actions .btn {
    min-height: 48px;
    padding: .72rem 1.1rem;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    color: #8a94a2;
    font-size: .93rem;
}

.hero-contact a {
    color: #5f6b78;
    text-decoration: none;
}

.hero-contact a:hover {
    color: var(--accent);
}

.section-wrap {
    padding: 0 0 6rem;
}

.section-header {
    max-width: 49rem;
    margin-bottom: 2.25rem;
}

.section-title {
    margin: 0 0 .8rem;
    color: var(--text);
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.12;
    font-weight: 590;
    letter-spacing: -.035em;
}

.section-description {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 650;
}

.text-link i,
.service-link i,
.article-card-link i {
    transition: transform .2s ease;
}

.text-link:hover i,
.service-card:hover .service-link i,
.article-card-link:hover i {
    transform: translateX(3px);
}

/* Services */
.service-card {
    min-height: 290px;
    padding: 1.75rem;
    color: var(--text);
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.service-card:hover {
    color: var(--text);
    transform: translateY(-4px);
    border-color: #cfd9e1;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .075);
}

.service-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 1.45rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.4rem;
}

.service-title {
    margin: 0 0 .7rem;
    color: var(--text);
    font-size: 1.22rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.015em;
}

.service-text {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.7;
}

.service-link {
    color: var(--accent);
    font-size: .92rem;
    font-weight: 650;
}

/* Practice areas */
.section-sticky {
    top: calc(var(--nav-height) + 2rem);
}

.practice-list {
    border-top: 1px solid var(--line-strong);
}

.practice-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.65rem 0;
    border-bottom: 1px solid var(--line-strong);
}

.practice-number {
    padding-top: .2rem;
    color: #9aa4b2;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.practice-item h3 {
    margin: 0 0 .45rem;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.018em;
}

.practice-item p {
    max-width: 52rem;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

/* About */
.about-panel {
    padding: clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 88% 12%, rgba(31, 79, 120, .09), transparent 34%),
        #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.about-copy {
    max-width: 44rem;
}

.about-facts {
    border-top: 1px solid var(--line);
}

.about-fact {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
}

.about-fact-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.about-fact strong {
    font-size: 1.08rem;
    font-weight: 620;
}

/* Article cards on home */
.article-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.article-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e9ecef;
}

.article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.article-card:hover .article-card-image {
    transform: scale(1.025);
}

.article-card-body {
    padding: 1.6rem;
}

.article-card h3 {
    margin: 0 0 .75rem;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.02em;
}

.article-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--accent);
}

.article-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 1.25rem;
    color: var(--muted);
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-card-link {
    color: var(--accent);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 650;
}

.empty-panel {
    padding: 2rem;
    background: #fff;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
}

/* Clinic */
.clinic-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.clinic-copy {
    padding: clamp(2rem, 4vw, 3.2rem);
}

.clinic-contact {
    display: grid;
    gap: .8rem;
    margin-top: 2rem;
    font-style: normal;
}

.clinic-contact > div {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #3e4956;
}

.clinic-contact i {
    width: 1.25rem;
    color: var(--accent);
    text-align: center;
}

.clinic-contact a {
    color: inherit;
    text-decoration: none;
}

.clinic-contact a:hover {
    color: var(--accent);
}

.clinic-map {
    min-height: 430px;
    background: #e8edf1;
}

.clinic-map iframe {
    width: 100%;
    height: 100%;
    min-height: 430px;
    display: block;
    border: 0;
}

/* Generic content pages */
main.container.py-5,
main > .container.py-5 {
    padding-top: 4.5rem !important;
    padding-bottom: 5rem !important;
}

.display-5,
.display-4 {
    letter-spacing: -.04em;
}

.card {
    border-color: var(--line);
    border-radius: 18px;
}

.list-group-item {
    background: transparent;
}

.form-control {
    border-color: var(--line-strong);
    border-radius: 12px;
}

.form-control:focus {
    border-color: #86a9c4;
    box-shadow: 0 0 0 .25rem rgba(31, 79, 120, .11);
}

.map-placeholder,
.placeholder-photo {
    min-height: 330px;
    background: linear-gradient(145deg, #edf0f2, #dfe5e9);
}

/* Article template */
.article-hero {
    height: min(62vh, 640px);
    min-height: 430px;
    background: #253443;
}

.article-hero-overlay {
    background: linear-gradient(90deg, rgba(7, 19, 30, .82) 0%, rgba(7, 19, 30, .52) 45%, rgba(7, 19, 30, .14) 100%);
}

.article-content {
    color: #26313d;
    font-size: 1.075rem;
    line-height: 1.82;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -.025em;
}

.article-content h3 {
    margin-top: 2.25rem;
    margin-bottom: .8rem;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 650;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
}

.article-content li + li {
    margin-top: .35rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.article-content table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    font-size: .96rem;
}

.article-content th,
.article-content td {
    padding: .7rem .8rem;
    border: 1px solid var(--line-strong);
    vertical-align: top;
}

.article-content th {
    background: var(--surface-soft);
    font-weight: 650;
}

.article-note {
    margin: 1.75rem 0;
    padding: 1.1rem 1.25rem;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
}

/* Footer */
.site-footer {
    margin-top: 1rem;
    background: #eef1f4;
    border-top: 1px solid var(--line-strong);
}

.footer-brand {
    font-size: 1.35rem;
}

.footer-intro {
    max-width: 31rem;
    color: var(--muted);
    line-height: 1.7;
}

.footer-heading {
    margin-bottom: .9rem;
    color: #4a5563;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #5d6875;
    font-size: .94rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    color: #77818d;
    border-top: 1px solid var(--line-strong);
    font-size: .84rem;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s ease, transform .65s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal.is-visible,
    .service-card,
    .article-card-image,
    .btn,
    .text-link i,
    .service-link i,
    .article-card-link i {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 1199.98px) {
    .hero-card,
    .hero-photo-wrap,
    .hero-photo {
        min-height: 560px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --nav-height: 68px;
    }

    .site-navbar .navbar-collapse {
        padding: .75rem 0 1rem;
    }

    .site-navbar .nav-link {
        padding: .65rem 0 !important;
    }

    .site-navbar .nav-link.active::after {
        display: none;
    }

    .hero-wrap {
        padding: 1.5rem 0 4.5rem;
    }

    .hero-card {
        min-height: 0;
    }

    .hero-photo-wrap,
    .hero-photo {
        min-height: 420px;
        max-height: 520px;
    }

    .hero-content {
        padding: 2.4rem 2rem 2.8rem;
    }

    .hero-title {
        max-width: none;
    }

    .section-wrap {
        padding-bottom: 4.5rem;
    }

    .section-sticky {
        position: static !important;
    }

    .service-card {
        min-height: 260px;
    }

    .clinic-map,
    .clinic-map iframe {
        min-height: 380px;
    }

    .article-hero {
        min-height: 380px;
    }
}

@media (max-width: 575.98px) {
    .container {
        --bs-gutter-x: 1.6rem;
    }

    .hero-card,
    .about-panel,
    .clinic-panel {
        border-radius: 22px;
    }

    .hero-photo-wrap,
    .hero-photo {
        min-height: 345px;
        max-height: 390px;
    }

    .hero-content {
        padding: 2rem 1.4rem 2.3rem;
    }

    .hero-title {
        font-size: clamp(2.45rem, 13vw, 3.4rem);
    }

    .hero-title span {
        display: block;
        margin: .38rem 0 0;
        font-size: .38em;
    }

    .hero-actions {
        display: grid !important;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        min-height: 0;
        padding: 1.5rem;
    }

    .practice-item {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: .7rem;
    }

    .about-panel,
    .clinic-copy {
        padding: 1.7rem;
    }

    .clinic-map,
    .clinic-map iframe {
        min-height: 330px;
    }

    .article-hero {
        min-height: 340px;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.76;
    }
}

/* Services index + service detail pages */
.page-intro {
    padding: 4.5rem 0 3.5rem;
    background:
        radial-gradient(circle at 12% 8%, rgba(31, 79, 120, .07), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.page-title {
    max-width: 18ch;
    margin: 0 0 1.15rem;
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    line-height: 1.04;
    font-weight: 480;
    letter-spacing: -.052em;
}

.page-lead {
    max-width: 52rem;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.08rem, 1.7vw, 1.28rem);
    line-height: 1.75;
}

.service-index-intro + .section-wrap {
    padding-top: 1.5rem;
}

.service-feature {
    overflow: hidden;
    margin-bottom: 2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.service-feature-media {
    height: 100%;
    min-height: 380px;
    overflow: hidden;
    background: #e9eef2;
}

.service-feature-media img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform .45s ease;
}

.service-feature:hover .service-feature-media img {
    transform: scale(1.018);
}

.service-feature-copy {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4.5vw, 3.6rem);
}

.service-kicker {
    display: block;
    margin-bottom: .75rem;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.service-feature-copy h2 {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.035em;
}

.service-feature-copy p {
    max-width: 48rem;
    margin-bottom: 1.15rem;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.service-check-list {
    display: grid;
    gap: .6rem;
    margin: .25rem 0 1.2rem;
    padding: 0;
    list-style: none;
    color: #40505e;
}

.service-check-list li {
    position: relative;
    padding-left: 1.5rem;
}

.service-check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55rem;
    width: 9px;
    height: 9px;
    border: 2px solid #7fb3d5;
    border-radius: 50%;
}

.service-detail-hero {
    padding: 3rem 0 4.5rem;
    background:
        radial-gradient(circle at 14% 8%, rgba(31, 79, 120, .06), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.service-detail-hero-card {
    overflow: hidden;
    min-height: 520px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.service-detail-hero-media {
    height: 100%;
    min-height: 520px;
    background: #e9eef2;
}

.service-detail-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.service-detail-hero-copy {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.2rem, 5vw, 4rem);
}

.service-detail-hero-copy h1 {
    max-width: 11ch;
    margin: 0 0 1.4rem;
    color: var(--text);
    font-size: clamp(2.5rem, 4.5vw, 4.15rem);
    line-height: 1.03;
    font-weight: 480;
    letter-spacing: -.052em;
}

/* Long EMNG title: keep the full medical term without overflowing the hero card. */
.service-detail-hero-copy h1.service-detail-title-emng {
    max-width: 100%;
    font-size: clamp(2.15rem, 3.7vw, 3.45rem);
    letter-spacing: -.045em;
    overflow-wrap: normal;
    hyphens: manual;
}

.service-detail-title-emng span {
    white-space: nowrap;
}

.service-detail-hero-copy .lead {
    max-width: 35rem;
    margin: 0;
    color: #44515f;
    font-size: clamp(1.05rem, 1.7vw, 1.26rem);
    line-height: 1.7;
}

.service-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.2rem;
    margin-top: 1.7rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
    color: #66717e;
    font-size: .9rem;
}

.service-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.service-meta-row i {
    color: var(--accent);
}

.service-detail-section {
    padding-top: .5rem;
}

.service-detail-content {
    color: #26313d;
    font-size: 1.06rem;
    line-height: 1.82;
}

.service-detail-content > *:first-child {
    margin-top: 0;
}

.service-detail-content h2 {
    margin: 3rem 0 1rem;
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.15rem);
    line-height: 1.22;
    font-weight: 650;
    letter-spacing: -.028em;
}

.service-detail-content h3 {
    margin: 2.1rem 0 .75rem;
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 650;
}

.service-detail-content p,
.service-detail-content ul,
.service-detail-content ol {
    margin-bottom: 1.25rem;
}

.service-detail-content li + li {
    margin-top: .42rem;
}

.service-detail-content ul,
.service-detail-content ol {
    padding-left: 1.35rem;
}

.service-steps {
    counter-reset: service-step;
    display: grid;
    gap: .85rem;
    padding-left: 0 !important;
    list-style: none;
}

.service-steps li {
    position: relative;
    padding: 1rem 1rem 1rem 3.65rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.service-steps li::before {
    counter-increment: service-step;
    content: counter(service-step);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 1.85rem;
    height: 1.85rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .82rem;
    font-weight: 700;
}

.service-side-card {
    top: calc(var(--nav-height) + 2rem);
    padding: 1.6rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.service-side-card h2 {
    color: var(--text);
    font-weight: 650;
    letter-spacing: -.02em;
}

.service-side-card p {
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 991.98px) {
    .page-intro {
        padding: 3rem 0 2.5rem;
    }

    .service-feature-media,
    .service-feature-media img {
        min-height: 340px;
        max-height: 460px;
    }

    .service-detail-hero {
        padding: 1.5rem 0 3.5rem;
    }

    .service-detail-hero-card,
    .service-detail-hero-media,
    .service-detail-hero-media img {
        min-height: 0;
    }

    .service-detail-hero-media img {
        height: min(58vw, 480px);
    }

    .service-detail-hero-copy h1 {
        max-width: none;
    }

    .service-side-card {
        position: static !important;
    }
}

@media (max-width: 575.98px) {
    .service-feature {
        border-radius: 20px;
    }

    .service-feature-media,
    .service-feature-media img {
        min-height: 280px;
        max-height: 360px;
    }

    .service-feature-copy {
        padding: 1.7rem;
    }

    .service-detail-hero-card {
        border-radius: 22px;
    }

    .service-detail-hero-copy {
        padding: 1.8rem 1.5rem 2rem;
    }

    .service-meta-row {
        display: grid;
    }
}

/* About page */
.about-page-hero {
    padding: clamp(2.4rem, 5vw, 4.5rem) 0 4.5rem;
}

.about-page-hero-card {
    overflow: hidden;
    min-height: 600px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.about-page-hero-media {
    height: 100%;
    min-height: 600px;
    background: #e9edf0;
}

.about-page-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 600px;
    object-fit: cover;
    object-position: center center;
}

.about-page-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(2.3rem, 5vw, 4.25rem);
}

.about-page-hero-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.65rem, 5vw, 4.4rem);
    line-height: 1.02;
    font-weight: 430;
    letter-spacing: -.052em;
}

.about-page-hero-copy h1 span {
    display: inline-block;
    margin-left: .15em;
    color: #475569;
    font-size: .46em;
    font-weight: 500;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.about-page-role {
    margin: .7rem 0 0;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 650;
}

.about-page-lead {
    max-width: 37rem;
    margin: 0;
    color: #384554;
    font-size: clamp(1.05rem, 1.65vw, 1.25rem);
    line-height: 1.7;
}

.about-page-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.about-page-fact {
    min-width: 0;
    padding: 1.2rem 1rem 1.2rem 0;
}

.about-page-fact + .about-page-fact {
    padding-left: 1rem;
    border-left: 1px solid var(--line);
}

.about-page-fact strong,
.about-page-fact span {
    display: block;
}

.about-page-fact strong {
    margin-bottom: .25rem;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 680;
}

.about-page-fact span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

.about-page-section {
    padding-top: 1rem;
}

.about-page-section-header {
    position: sticky;
    top: 110px;
}

.about-timeline {
    position: relative;
}

.about-timeline::before {
    content: '';
    position: absolute;
    top: .65rem;
    bottom: .65rem;
    left: 3.1rem;
    width: 1px;
    background: var(--line-strong);
}

.about-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 6.2rem minmax(0, 1fr);
    gap: 1.6rem;
    padding: 0 0 2.55rem;
}

.about-timeline-item:last-child {
    padding-bottom: 0;
}

.about-timeline-year {
    position: relative;
    z-index: 1;
    align-self: start;
    padding: .48rem .62rem;
    background: var(--accent-soft);
    border: 1px solid #dbe8f1;
    border-radius: 999px;
    color: var(--accent);
    font-size: .83rem;
    font-weight: 750;
    text-align: center;
}

.about-timeline-content {
    padding-bottom: 2.35rem;
    border-bottom: 1px solid var(--line);
}

.about-timeline-item:last-child .about-timeline-content {
    padding-bottom: 0;
    border-bottom: 0;
}

.about-timeline-content h3 {
    margin: 0 0 .55rem;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.018em;
}

.about-timeline-content p {
    max-width: 42rem;
    margin: 0;
    color: #4b5867;
    line-height: 1.75;
}

.about-approach-section {
    padding-top: 0;
}

.about-approach-card {
    padding: clamp(2rem, 5vw, 3.6rem);
    background:
        radial-gradient(circle at 92% 12%, rgba(31, 79, 120, .1), transparent 34%),
        #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 991.98px) {
    .about-page-hero-card,
    .about-page-hero-media,
    .about-page-hero-media img {
        min-height: 0;
    }

    .about-page-hero-media img {
        height: min(82vw, 580px);
        object-position: center 35%;
    }

    .about-page-section-header {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .about-page-hero {
        padding-top: 1.5rem;
        padding-bottom: 3.25rem;
    }

    .about-page-hero-copy {
        padding: 2rem 1.35rem 2.3rem;
    }

    .about-page-hero-copy h1 span {
        display: block;
        margin: .45rem 0 0;
        font-size: .43em;
    }

    .about-page-facts {
        grid-template-columns: 1fr;
    }

    .about-page-fact,
    .about-page-fact + .about-page-fact {
        padding: .95rem 0;
        border-left: 0;
    }

    .about-page-fact + .about-page-fact {
        border-top: 1px solid var(--line);
    }

    .about-timeline::before {
        left: 2.4rem;
    }

    .about-timeline-item {
        grid-template-columns: 4.8rem minmax(0, 1fr);
        gap: 1rem;
    }

    .about-timeline-year {
        font-size: .76rem;
        padding-inline: .45rem;
    }
}

/* Clinic page */
.clinic-hero {
    padding: clamp(2.4rem, 5vw, 4.5rem) 0 4.5rem;
}

.clinic-hero-card,
.clinic-mr-card {
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.clinic-hero-card {
    min-height: 590px;
}

.clinic-hero-media,
.clinic-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 590px;
}

.clinic-hero-media {
    background: #e8edf1;
}

.clinic-hero-media img {
    display: block;
    object-fit: cover;
    object-position: center center;
}

.clinic-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(2.4rem, 5vw, 4.4rem);
}

.clinic-hero-copy h1 {
    margin: 0;
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 430;
    letter-spacing: -.052em;
}

.clinic-hero-location {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .9rem 0 0;
    color: var(--accent);
    font-weight: 650;
}

.clinic-hero-lead {
    max-width: 38rem;
    margin: 0;
    color: #374454;
    font-size: clamp(1.05rem, 1.65vw, 1.23rem);
    line-height: 1.72;
}

.clinic-about {
    padding-top: .5rem;
}

.clinic-sticky-heading {
    position: sticky;
    top: 110px;
}

.clinic-copy {
    color: #44515f;
    font-size: 1.04rem;
    line-height: 1.8;
}

.clinic-copy p + p {
    margin-top: 1.15rem;
}

.clinic-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.clinic-fact {
    min-width: 0;
    padding: 1.45rem;
}

.clinic-fact + .clinic-fact {
    border-left: 1px solid var(--line);
}

.clinic-fact strong,
.clinic-fact span {
    display: block;
}

.clinic-fact strong {
    color: var(--accent);
    font-size: 1.55rem;
    font-weight: 720;
    letter-spacing: -.025em;
}

.clinic-fact span {
    margin-top: .3rem;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}

.clinic-service-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 210px;
    padding: 1.65rem;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, .93);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.clinic-service-link:hover {
    color: inherit;
    transform: translateY(-4px);
    border-color: #d5e1ea;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.clinic-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.2rem;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.18rem;
}

.clinic-service-link strong {
    margin-bottom: .55rem;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 670;
}

.clinic-service-link > span:last-child {
    color: var(--muted);
    line-height: 1.6;
}

.clinic-mr-card {
    min-height: 570px;
}

.clinic-mr-media,
.clinic-mr-media img {
    width: 100%;
    height: 100%;
    min-height: 570px;
}

.clinic-mr-media {
    background: #e8edf1;
}

.clinic-mr-media img {
    display: block;
    object-fit: cover;
    object-position: center center;
}

.clinic-mr-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(2.3rem, 5vw, 4rem);
}

.clinic-mr-copy h3 {
    margin: 1.8rem 0 .9rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.clinic-mr-list {
    margin-top: 0;
}

.clinic-mr-note {
    margin: 1.5rem 0 0;
    padding: 1rem 1.15rem;
    color: #44515f;
    line-height: 1.65;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
}

.clinic-contact-card,
.clinic-map-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.clinic-contact-card {
    padding: clamp(1.8rem, 4vw, 2.7rem);
}

.clinic-contact-list {
    display: grid;
    gap: 1.15rem;
    margin-top: 1.7rem;
}

.clinic-contact-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
}

.clinic-contact-item > i {
    margin-top: .12rem;
    color: var(--accent);
    font-size: 1.05rem;
}

.clinic-contact-item strong,
.clinic-contact-item span,
.clinic-contact-item a {
    display: block;
}

.clinic-contact-item strong {
    margin-bottom: .16rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
}

.clinic-contact-item span,
.clinic-contact-item a {
    color: #52606e;
    line-height: 1.55;
    text-decoration: none;
}

.clinic-contact-item a:hover {
    color: var(--accent);
}

.clinic-parking-note {
    margin: 1.7rem 0 1.5rem;
    padding-top: 1.35rem;
    color: var(--muted);
    line-height: 1.65;
    border-top: 1px solid var(--line);
}

.clinic-map-card {
    min-height: 520px;
    padding: .55rem;
    overflow: hidden;
}

.clinic-map-card iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 505px;
    border: 0;
    border-radius: 19px;
}

@media (max-width: 991.98px) {
    .clinic-hero-card,
    .clinic-mr-card,
    .clinic-hero-media,
    .clinic-hero-media img,
    .clinic-mr-media,
    .clinic-mr-media img {
        min-height: 0;
    }

    .clinic-hero-media img,
    .clinic-mr-media img {
        height: min(72vw, 540px);
    }

    .clinic-sticky-heading {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .clinic-hero {
        padding-top: 1.5rem;
        padding-bottom: 3.25rem;
    }

    .clinic-hero-copy,
    .clinic-mr-copy {
        padding: 2rem 1.35rem 2.35rem;
    }

    .clinic-facts {
        grid-template-columns: 1fr;
    }

    .clinic-fact + .clinic-fact {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .clinic-service-link {
        min-height: 0;
    }

    .clinic-map-card,
    .clinic-map-card iframe {
        min-height: 390px;
    }
}

/* Articles index ---------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

.articles-page-hero {
  padding: 4rem 0 2.5rem;
}

.articles-page-header {
  max-width: 48rem;
  margin-bottom: 2.25rem;
}

.articles-page-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.articles-page-header p {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.article-tool-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.article-tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31,79,120,.28);
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  color: var(--text);
}

.article-tool-card > i {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.15rem;
}

.article-tool-card strong,
.article-tool-card span {
  display: block;
}

.article-tool-card strong {
  margin-bottom: .1rem;
  font-size: .98rem;
}

.article-tool-card span {
  color: var(--muted);
  font-size: .86rem;
}

.article-search-wrap {
  position: relative;
  max-width: 52rem;
}

.article-search-wrap > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1.15rem;
  transform: translateY(-50%);
  color: var(--muted);
}

.article-search-wrap .form-control {
  padding-left: 3rem;
  border-color: var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  box-shadow: none;
}

.article-search-wrap .form-control:focus {
  border-color: rgba(31,79,120,.42);
  box-shadow: 0 0 0 .2rem rgba(31,79,120,.08);
}

.article-alphabet {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.article-alphabet-label {
  flex: 0 0 auto;
  padding-top: .42rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.article-alphabet-links {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.article-alphabet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .5rem;
  border-radius: 9px;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.article-alphabet-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-alphabet-link.is-disabled {
  color: #c1c7ce;
  cursor: default;
}

.articles-index-section {
  padding: 1rem 0 6rem;
}

.articles-index {
  max-width: 62rem;
}

.article-letter {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
  /* Sticky navbar + a little breathing room when arriving via #slovo-* */
  scroll-margin-top: 7.5rem;
}

.article-letter:last-child {
  border-bottom: 1px solid var(--line);
}

.article-letter-heading span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -.03em;
}

.article-letter-list {
  min-width: 0;
}

.article-index-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.article-index-item:first-child {
  padding-top: .25rem;
}

.article-index-item:last-child {
  border-bottom: 0;
}

.article-index-copy {
  min-width: 0;
}

.article-index-item h2 {
  margin: 0;
  font-size: 1.13rem;
  font-weight: 620;
  letter-spacing: -.015em;
  transition: color .15s ease;
}

.article-index-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-index-item > i {
  flex: 0 0 auto;
  color: #a4adb7;
  transition: transform .15s ease, color .15s ease;
}

.article-index-item:hover h2,
.article-index-item:hover > i {
  color: var(--accent);
}

.article-index-item:hover > i {
  transform: translateX(3px);
}

.article-empty-state {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
}

@media (max-width: 767.98px) {
  .articles-page-hero {
    padding-top: 2.5rem;
  }

  .article-alphabet {
    display: block;
  }

  .article-alphabet-label {
    display: block;
    margin-bottom: .55rem;
    padding-top: 0;
  }

  .article-letter {
    grid-template-columns: 1fr;
    gap: 1rem;
    scroll-margin-top: 6.5rem;
  }

  .article-letter-heading span {
    width: 3rem;
    height: 3rem;
    border-radius: 13px;
    font-size: 1.35rem;
  }
}

/* Headache diary tool */
.tool-hero {
  padding: 3rem 0 4.5rem;
  background:
    radial-gradient(circle at 82% 10%, rgba(31,79,120,.07), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.tool-hero-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-md);
}

.tool-hero-media,
.tool-hero-media img {
  min-height: 520px;
}

.tool-hero-media {
  height: 100%;
  overflow: hidden;
  background: var(--surface-soft);
}

.tool-hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.tool-hero-copy {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.tool-hero-copy h1 {
  margin: .65rem 0 1.2rem;
  font-size: clamp(2.45rem, 5vw, 4.3rem);
  line-height: 1.03;
  font-weight: 520;
  letter-spacing: -.045em;
}

.tool-hero-lead {
  max-width: 38rem;
  margin: 0;
  color: #344054;
  font-size: 1.12rem;
  line-height: 1.75;
}

.tool-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.8rem;
}

.tool-section {
  padding: 4.75rem 0;
}

.tool-section-soft {
  background: #f0f4f7;
  border-top: 1px solid rgba(214,219,226,.7);
  border-bottom: 1px solid rgba(214,219,226,.7);
}

.tool-sticky-heading {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.tool-sticky-heading h2 {
  margin: .7rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.tool-sticky-heading p {
  color: var(--muted);
  line-height: 1.75;
}

.tool-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.tool-info-card {
  position: relative;
  overflow: hidden;
  padding: 1.65rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tool-info-card-wide {
  grid-column: 1 / -1;
}

.tool-info-number {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #8ca7bb;
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .08em;
}

.tool-info-card h3 {
  margin: 0 0 .7rem;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -.02em;
}

.tool-info-card p {
  margin: 0;
  color: #475467;
  line-height: 1.72;
}

.headache-diary-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.headache-diary-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.headache-diary-table th,
.headache-diary-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.headache-diary-table th:last-child,
.headache-diary-table td:last-child {
  border-right: 0;
}

.headache-diary-table tbody tr:last-child td {
  border-bottom: 0;
}

.headache-diary-table th {
  padding: .95rem 1rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .88rem;
  font-weight: 680;
  line-height: 1.25;
  text-align: left;
  vertical-align: bottom;
}

.headache-diary-table th span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
}

.headache-diary-table td {
  height: 3.8rem;
  padding: .7rem 1rem;
  background: #fff;
}

.tool-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tool-cta-card h2 {
  margin: .7rem 0 .6rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -.03em;
}

.tool-cta-card p {
  max-width: 43rem;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 991.98px) {
  .tool-hero-media,
  .tool-hero-media img {
    min-height: 390px;
  }

  .tool-sticky-heading {
    position: static;
  }

  .tool-cta-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .tool-hero {
    padding-top: 2rem;
  }

  .tool-hero-media,
  .tool-hero-media img {
    min-height: 300px;
  }

  .tool-hero-copy {
    padding: 1.7rem 1.35rem 2rem;
  }

  .tool-info-grid {
    grid-template-columns: 1fr;
  }

  .tool-info-card-wide {
    grid-column: auto;
  }

  .tool-section {
    padding: 3.5rem 0;
  }
}

/* =========================================================
   Calculators / clinical tools
   ========================================================= */
.calculator-hub-hero,
.calculator-page {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 5.5rem;
}

.calculator-hub-copy,
.calculator-page-header {
  max-width: 54rem;
  margin-bottom: 2.25rem;
}

.calculator-hub-copy h1,
.calculator-page-header h1 {
  margin: .65rem 0 1rem;
  font-size: clamp(2.45rem, 5vw, 4.35rem);
  line-height: 1.03;
  font-weight: 520;
  letter-spacing: -.045em;
}

.calculator-hub-copy p,
.calculator-page-header p {
  margin: 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.calculator-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.35rem;
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.calculator-back:hover { color: var(--accent-dark); }

.calculator-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.calculator-hub-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
  padding: 1.55rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.calculator-hub-card:hover {
  transform: translateY(-3px);
  border-color: #cdd9e2;
  box-shadow: 0 18px 42px rgba(15,23,42,.075);
}

.calculator-hub-icon {
  display: inline-grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.35rem;
}

.calculator-hub-kicker {
  display: block;
  margin-bottom: .18rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.calculator-hub-card h2 {
  margin: 0 0 .35rem;
  font-size: 1.3rem;
  font-weight: 680;
  letter-spacing: -.025em;
}

.calculator-hub-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.calculator-hub-arrow { color: #8da0af; font-size: 1.1rem; }

.calculator-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(260px, .38fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(15,23,42,.065);
}

.calculator-card-main { padding: clamp(1.5rem, 3vw, 2.35rem); min-width: 0; }

.calculator-section-title {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 1.05rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.calculator-section-title:first-child { padding-top: 0; }
.calculator-section-title h2,
.calculator-objective-card h3 {
  margin: 0 0 .28rem;
  font-size: 1.05rem;
  font-weight: 680;
  letter-spacing: -.015em;
}
.calculator-section-title p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .92rem; }

.calculator-code,
.calculator-points {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 .55rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  line-height: 1;
}
.calculator-points { min-width: 3rem; font-size: .86rem; }

.calculator-binary { display: inline-flex; gap: .35rem; white-space: nowrap; }
.calculator-binary .btn,
.epworth-options .btn {
  min-width: 3.25rem;
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  font-weight: 650;
}
.calculator-binary .btn-check:checked + .btn,
.epworth-options .btn-check:checked + .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.calculator-fields { margin-top: 1.5rem; }
.calculator-fields .form-label,
.calculator-objective-card .form-label { font-size: .86rem; font-weight: 650; color: #344054; }

.calculator-result-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 2.6rem);
  border-left: 1px solid #dbe5ec;
  background: linear-gradient(155deg, #eef4f8 0%, #f7fafc 100%);
}

.calculator-result-label {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.calculator-result-value {
  margin: .35rem 0 .65rem;
  color: var(--text);
  font-size: clamp(3.2rem, 7vw, 5rem);
  line-height: 1;
  font-weight: 520;
  letter-spacing: -.055em;
}
.calculator-result-value small { font-size: 1.05rem; color: var(--muted); letter-spacing: 0; }
.calculator-result-title { display: block; margin-bottom: .45rem; font-size: 1.15rem; }
.calculator-result-text { margin: 0; color: var(--muted); line-height: 1.55; }

.calculator-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }

.calculator-objective-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .85rem;
  margin-top: 1.25rem;
}

.calculator-objective-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fbfcfd;
}
.calculator-objective-card .calculator-code { margin-bottom: .8rem; }
.calculator-mini-result { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }

.calculator-reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .65rem;
  margin-top: 1rem;
}
.calculator-reference-grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.calculator-reference-grid > div {
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
}
.calculator-reference-grid strong { display: block; margin-bottom: .2rem; color: var(--accent); }
.calculator-reference-grid span { color: var(--muted); font-size: .86rem; line-height: 1.4; }

.calculator-note,
.calculator-license-note {
  display: flex;
  gap: .9rem;
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #d8e4ec;
  border-radius: 17px;
  background: var(--accent-soft);
  color: #344054;
}
.calculator-note > i,
.calculator-license-note > i { color: var(--accent); font-size: 1.15rem; margin-top: .1rem; }
.calculator-note strong,
.calculator-license-note strong { display: block; margin-bottom: .25rem; }
.calculator-note p,
.calculator-license-note p { margin: 0; color: #526273; line-height: 1.6; }
.calculator-license-note { margin: 0 0 1rem; background: #fffaf0; border-color: #eadfbe; }
.calculator-license-note > i { color: #9a6a15; }

.epworth-row {
  display: grid;
  grid-template-columns: 2rem minmax(0,1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.epworth-number { color: #98a2b3; font-weight: 750; }
.epworth-label { font-weight: 570; line-height: 1.45; }
.epworth-options { display: inline-flex; gap: .3rem; }
.epworth-options .btn { min-width: 2.65rem; padding-left: .65rem; padding-right: .65rem; }
.epworth-key { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin-top: 1rem; color: var(--muted); font-size: .84rem; }
.epworth-key strong { color: var(--accent); }

.articles-tools {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: .85rem;
  row-gap: .75rem;
}
.articles-tools > [class*="col-"] { width: auto; max-width: none; padding: 0; }

@media (max-width: 1199.98px) {
  .articles-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .articles-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .articles-tools { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .calculator-card { grid-template-columns: 1fr; }
  .calculator-result-panel { border-left: 0; border-top: 1px solid #dbe5ec; }
  .calculator-reference-grid,
  .calculator-reference-grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767.98px) {
  .calculator-hub-grid { grid-template-columns: 1fr; }
  .calculator-section-title,
  .cts6-row { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .calculator-section-title .calculator-binary { grid-column: 1 / -1; margin-left: calc(2.6rem + 1.05rem); }
  .cts6-row .calculator-binary { margin-left: calc(3rem + 1.05rem); }
  .calculator-objective-grid { grid-template-columns: 1fr; }
  .epworth-row { grid-template-columns: 2rem 1fr; }
  .epworth-options { grid-column: 2; }
}

@media (max-width: 575.98px) {
  .calculator-page,
  .calculator-hub-hero { padding-top: 2rem; padding-bottom: 4rem; }
  .calculator-card { border-radius: 20px; }
  .calculator-card-main { padding: 1.25rem; }
  .calculator-reference-grid,
  .calculator-reference-grid-5 { grid-template-columns: 1fr; }
  .calculator-section-title .calculator-binary,
  .cts6-row .calculator-binary { margin-left: 0; }
  .calculator-binary { width: 100%; }
  .calculator-binary .btn { flex: 1; }
  .epworth-options { width: 100%; }
  .epworth-options .btn { flex: 1; }
}

/* Footer — compact legacy-inspired content */
.site-footer {
    margin-top: 1rem;
    background: #eef1f4;
    border-top: 1px solid var(--line-strong);
}

.footer-note-wrap {
    padding: 2rem 0;
}

.footer-note {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    max-width: 72rem;
    color: #586474;
    font-size: .94rem;
    line-height: 1.7;
}

.footer-note strong {
    color: #2f3945;
}

.footer-note-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: .05rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1rem;
}

.footer-bottom-wrap {
    border-top: 1px solid var(--line-strong);
}

.footer-bottom-legacy {
    border-top: 0;
    color: #77818d;
    font-size: .88rem;
}

.footer-bottom-legacy a {
    color: #5e6976;
    text-decoration: none;
}

.footer-bottom-legacy a:hover {
    color: var(--accent);
}

.footer-separator {
    display: inline-block;
    margin: 0 .4rem;
    color: #a0a8b2;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #d4dae1;
    border-radius: 50%;
    background: rgba(255,255,255,.58);
    color: #66717e;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.footer-social-link:hover {
    color: var(--accent);
    border-color: rgba(31,79,120,.28);
    background: #fff;
    transform: translateY(-1px);
}

/* Disclaimer */
.disclaimer-hero {
    padding-top: 3.5rem;
    padding-bottom: 2rem;
}

.disclaimer-hero-card {
    padding: clamp(2rem, 5vw, 4.25rem);
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,244,248,.9));
    box-shadow: 0 20px 60px rgba(15,23,42,.07);
}

.disclaimer-hero-card h1 {
    max-width: 50rem;
    margin-bottom: 1.15rem;
    font-size: clamp(2.35rem, 5vw, 4rem);
    line-height: 1.06;
    font-weight: 520;
    letter-spacing: -.035em;
}

.disclaimer-hero-card .lead {
    max-width: 48rem;
    color: #4d5968;
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.7;
}

.disclaimer-content-wrap {
    padding-top: 1rem;
}

.disclaimer-content {
    padding: clamp(1.75rem, 4vw, 3.4rem);
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 14px 38px rgba(15,23,42,.045);
    color: #334155;
    font-size: 1.03rem;
    line-height: 1.82;
}

.disclaimer-content section + section {
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--line);
}

.disclaimer-content h2 {
    margin-bottom: .85rem;
    color: var(--text);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -.02em;
}

.disclaimer-content p {
    margin-bottom: 1rem;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

.disclaimer-note {
    margin-top: 2.5rem;
}

@media (max-width: 575.98px) {
    .footer-note-wrap {
        padding: 1.6rem 0;
    }

    .footer-note {
        gap: .7rem;
        font-size: .9rem;
    }

    .footer-note-icon {
        width: 1.8rem;
        height: 1.8rem;
    }

    .footer-separator {
        display: none;
    }

    .footer-bottom-legacy p a {
        display: block;
        margin-top: .25rem;
    }

    .disclaimer-hero {
        padding-top: 2rem;
    }

    .disclaimer-hero-card,
    .disclaimer-content {
        border-radius: 20px;
    }
}

/* 2026-08: mobile overflow hardening */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body,
main,
section,
.site-navbar,
.site-footer {
    min-width: 0;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

.row > * {
    min-width: 0;
}

.headache-diary-table-wrap,
.clinic-map-card,
.about-page-hero-card,
.clinic-hero-card,
.clinic-mr-card,
.hero-card,
.about-panel {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    #mainNav {
        left: 0;
        right: 0;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: max(1.25rem, calc((100% - 540px) / 2));
        padding-right: max(1.25rem, calc((100% - 540px) / 2));
    }

    .site-navbar .container {
        width: 100%;
        max-width: 100%;
    }
}

/* Analytics consent */
.footer-cookie-link {
    padding: 0;
    color: #5e6976;
    background: transparent;
    border: 0;
    font: inherit;
    text-decoration: none;
}
.footer-cookie-link:hover { color: var(--accent); }

.cookie-consent {
    position: fixed;
    z-index: 1080;
    left: 50%;
    bottom: 1.2rem;
    width: min(760px, calc(100% - 2rem));
    transform: translate(-50%, 14px);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.cookie-consent.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cookie-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.1rem 1.15rem;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(15,23,42,.16);
    backdrop-filter: blur(12px);
}
.cookie-consent-copy { min-width: 0; }
.cookie-consent-copy strong { display: block; margin-bottom: .22rem; color: var(--text); }
.cookie-consent-copy p { margin: 0; color: #5d6977; font-size: .88rem; line-height: 1.55; }
.cookie-consent-copy a { display: inline-block; margin-top: .3rem; font-size: .82rem; text-decoration: none; }
.cookie-consent-actions { display: flex; flex: 0 0 auto; gap: .55rem; }
.cookie-consent-actions .btn { white-space: nowrap; }

@media (max-width: 767.98px) {
    .cookie-consent { bottom: .75rem; width: calc(100% - 1.2rem); }
    .cookie-consent-inner { align-items: stretch; flex-direction: column; padding: 1rem; border-radius: 16px; }
    .cookie-consent-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .cookie-consent-actions .btn { white-space: normal; }
}
