﻿/* Shared public and member presentation. */
:root {
    --content-width: 1240px;
    --gutter: max(32px, calc((100% - var(--content-width)) / 2));
    --radius: 24px;
    --shadow-soft: 0 6px 24px color-mix(in srgb, var(--text-primary) 4%, transparent);
}
html { background: var(--surface-card); scroll-padding-top: 28px; }
body { background: var(--surface-card); color: var(--text-primary); }
h1, h2, h3 { color: var(--brand-primary); }
p { color: var(--text-primary); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.button, button[type=submit], .btn-primary { border-radius: 999px; padding-inline: 26px; }
.button.outline { border-color: var(--border-default); background: transparent; }
.button.outline:hover { background: var(--surface-primary); border-color: var(--brand-accent); }
.button.light { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand-primary); }
.button.light:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--surface-card); }
.brand-icon { stroke-width: 1.5; }

/* Floating navigation keeps the same destinations and account controls. */
.site-header { position: relative; z-index: 25; width: calc(100% - 64px); max-width: 1360px; min-height: 92px; margin: 0 auto; padding: 17px 30px; gap: 24px; flex-wrap: nowrap; background: rgb(255 255 255 / 82%); border: 1px solid rgb(255 255 255 / 65%); border-top: 0; border-radius: 0 0 28px 28px; box-shadow: 0 6px 30px rgb(16 29 43 / 3%); backdrop-filter: blur(18px); }
.site-header .brand { gap: 9px; flex-shrink: 0; }
.site-header .brand-logo, footer .brand-logo { width: 48px; height: 48px; border-radius: 12px; }
.brand-wordmark {  font-size: 23px; font-weight: 700; letter-spacing: -.6px; }
.brand-wordmark small { font-family: Vazirmatn, Tahoma, sans-serif; font-size: max(var(--min-readable-font-size, 0px), 9px); font-weight: 400; letter-spacing: 0; color: var(--text-secondary); margin-top: 4px; }
.site-header > nav { gap: 26px; margin: auto; align-items: center; align-self: stretch; padding: 0; border: 0; overflow: visible; white-space: nowrap; }
.site-header > nav a { min-height: 44px; font-size: max(var(--min-readable-font-size, 0px), 13px); font-weight: 700; color: var(--brand-primary); }
.site-header > nav a.active, .site-header > nav a:hover { color: var(--gold-dark); }
.site-header > nav .active::after { inset-inline: 0; bottom: -17px; background: var(--brand-accent); }
.header-actions { flex-wrap: nowrap; gap: 12px; margin: 0; font-size: max(var(--min-readable-font-size, 0px), 12px); }
.header-actions .login-link { gap: 7px; min-height: 44px; border: 1px solid var(--brand-accent); border-radius: 999px; padding: 7px 17px; white-space: nowrap; color: var(--brand-primary); }
.header-actions .login-link .brand-icon { width: 19px; color: var(--gold-dark); }
.header-actions > .lawyer-signup-link { padding: 8px 15px; font-size: max(var(--min-readable-font-size, 0px), 12px); min-height: 44px; white-space: nowrap; }
.header-account > summary { border-radius: 999px; background: transparent; font-size: max(var(--min-readable-font-size, 0px), 13px); }
.site-menu { position: relative; flex-shrink: 0; }
.site-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 8px; border-radius: 50%; list-style: none; color: var(--brand-primary); }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary:hover { background: var(--surface-primary); }
.site-menu[open] > summary { margin: 0; background: var(--surface-primary); }
.site-menu > nav { position: absolute; top: calc(100% + 18px); inset-inline-end: 0; display: grid; width: 260px; max-width: calc(100vw - 40px); padding: 12px; gap: 3px; border: 1px solid var(--border-default); border-radius: 20px; background: var(--surface-card); box-shadow: 0 16px 45px rgb(16 29 43 / 12%); }
.site-menu > nav a { display: flex; min-height: 44px; height: auto; padding: 8px 14px; border-radius: 10px; font-size: max(var(--min-readable-font-size, 0px), 13px); color: var(--text-primary); }
.site-menu > nav a:hover { background: var(--surface-primary); color: var(--brand-primary); }
.mobile-navigation { display: none; }

/* The artwork and copy form one open hero, with a compact working search. */
.home-hero { position: relative; isolation: isolate; display: flex; min-height: 448px; max-width: none; padding: 40px var(--gutter) 35px; overflow: visible; background: var(--brand-accent); }
.home-hero .hero-copy { position: relative; z-index: 1; width: 58%; max-width: 730px; margin-inline-end: auto; }
.home-hero .eyebrow { color: var(--surface-card); font-size: max(var(--min-readable-font-size, 0px), 12px); margin-bottom: 18px; }
.home-hero h1 { font-size: clamp(34px, 3.1vw, 45px); line-height: 1.65; letter-spacing: -1.2px; margin-bottom: 18px; }
.home-hero h1, .home-hero h1 em { color: var(--surface-card); }
.home-hero .hero-copy > p { font-size: max(var(--min-readable-font-size, 0px), 15px); color: var(--surface-card); margin-bottom: 28px; }
.home-hero .hero-art { position: absolute; z-index: -1; inset: -92px 0 0; display: block; width: 100%; max-width: none; height: auto; margin: 0; overflow: hidden; border: 0; border-radius: 0; background: var(--brand-accent); box-shadow: none; }
.home-hero .hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to left, var(--brand-accent) 60%, transparent 85%); pointer-events: none; }
.home-hero .hero-image { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: left top; filter: grayscale(1); mix-blend-mode: multiply; }
.home-hero .search-box { flex-wrap: nowrap; padding: 6px; gap: 5px; border: 1px solid rgb(255 255 255 / 90%); border-radius: 999px; box-shadow: 0 6px 24px rgb(16 29 43 / 5%); background: rgb(255 255 255 / 92%); }
.home-hero .search-box label:first-child { flex: 1 1 220px; padding: 0 8px; border: 0; }
.home-hero .search-box label > span { color: var(--brand-primary); }
.home-hero .search-box input { min-height: 44px; font-size: max(var(--min-readable-font-size, 0px), 12px); }
.home-hero .search-box .city-field { flex: 0 0 126px; padding-inline: 10px; border-inline-start: 1px solid var(--border-default); }
.home-hero .search-box select { font-size: max(var(--min-readable-font-size, 0px), 12px); padding-inline: 0; }
.home-hero .search-box .city-field > span { display: none; }
.home-hero .search-box button { flex: 0 0 auto; min-height: 46px; padding: 8px 24px; font-size: max(var(--min-readable-font-size, 0px), 13px); background: var(--brand-primary); border-color: var(--brand-primary); border-radius: 999px; color: var(--surface-card); }
.home-hero .search-box button:hover { background: var(--brand-secondary); border-color: var(--brand-secondary); }
.home-hero .search-box button span { display: none; }
.home-hero .popular { gap: 8px; margin-top: 17px; }
.home-hero .popular a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 11px; border: 1px solid rgb(255 255 255 / 60%); border-radius: 999px; background: rgb(255 255 255 / 65%); color: var(--text-primary); font-size: max(var(--min-readable-font-size, 0px), 11px); text-decoration: none; box-shadow: 0 2px 6px rgb(16 29 43 / 2%); }
.home-hero .popular a:hover { border-color: var(--brand-accent); }
.home-hero .popular .brand-icon { width: 17px; height: 17px; color: var(--gold-dark); }
.trust-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 var(--gutter); padding: 28px 12px; gap: 0; border: 1px solid var(--border-default); border-top: 0; border-radius: 0 0 26px 26px; background: var(--surface-primary); }
.trust-strip > div { flex-direction: column; text-align: center; gap: 11px; padding: 0 16px; }
.trust-strip > div:not(:last-child) { border-inline-end: 1px solid var(--surface-secondary); border-left: 0; }
.trust-strip > div > span { width: 38px; height: 38px; border: 0; border-radius: 0; background: transparent; color: var(--brand-accent); }
.trust-strip .brand-icon { width: 32px; height: 32px; }
.trust-strip strong { font-size: max(var(--min-readable-font-size, 0px), 14px); color: var(--brand-primary); }
.trust-strip small { color: var(--text-primary); margin-top: 6px; font-size: max(var(--min-readable-font-size, 0px), 11px); }
.section { padding-block: 56px; }
.section-heading h2 { font-size: 27px; }
.section-heading .eyebrow { color: var(--gold-dark); font-size: max(var(--min-readable-font-size, 0px), 12px); }
.section-heading p { color: var(--text-secondary); }
.centered-heading { text-align: center; justify-content: center; }
.centered-heading .eyebrow { display: block; margin-bottom: 6px; }
.centered-heading p { margin-top: 7px; color: var(--text-primary); font-size: max(var(--min-readable-font-size, 0px), 13px); }
.how-section { padding-top: 34px; padding-bottom: 35px; background: transparent; }
.steps { gap: 34px; padding-top: 10px; }
.steps article { position: relative; padding: 30px 18px 20px; border: 1px solid var(--border-default); border-radius: 25px; background: rgb(255 255 255 / 60%); box-shadow: 0 3px 6px rgb(16 29 43 / 3%); text-align: center; }
.steps article > span { position: absolute; inset-inline-start: calc(50% - 17px); top: -18px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--brand-accent) 28%, var(--surface-primary)); color: var(--brand-primary); font-size: 18px; }
.steps article:not(:last-child)::after { content: '‹'; position: absolute; inset-inline-end: -24px; top: 33px; font-size: 28px; color: var(--brand-primary); transform: scaleX(-1); }
.steps h3 { font-size: max(var(--min-readable-font-size, 0px), 15px); margin-bottom: 7px; }
.steps p { font-size: max(var(--min-readable-font-size, 0px), 12px); margin: 0; }
.home-callout { position: relative; isolation: isolate; overflow: hidden; min-height: 196px; padding: 28px 40px; background: var(--brand-secondary); border: 0; border-radius: 28px; }
.home-callout::before { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .11; background: url('images/hero-justice-960.webp') center 43% / cover; filter: grayscale(1); }
.home-callout .eyebrow { color: var(--surface-secondary); font-size: max(var(--min-readable-font-size, 0px), 11px); margin-bottom: 9px; }
.home-callout h2 { color: var(--surface-card); font-size: 29px; margin-bottom: 6px; }
.home-callout p { color: var(--surface-primary); font-size: max(var(--min-readable-font-size, 0px), 13px); margin-bottom: 15px; }
.home-callout .button { padding: 7px 20px; min-height: 40px; font-size: max(var(--min-readable-font-size, 0px), 12px); }
.home-callout > .brand-icon { width: 126px; height: 126px; margin-inline-end: 25px; color: var(--brand-tint); stroke-width: .8; }
.specialty-tile { border-radius: 22px; background: var(--surface-card); padding: 22px 12px; box-shadow: none; }
.specialty-tile > span { background: var(--brand-tint); color: var(--brand-secondary); border-radius: 50%; }
.featured-section { background: var(--surface-primary); border-block-color: var(--border-default); }
.lawyer-card.lawyer-result { border-radius: 24px; background: var(--surface-card); border-color: var(--border-default); box-shadow: var(--shadow-soft); }
.lawyer-card.lawyer-result:hover { border-color: var(--brand-accent); box-shadow: 0 10px 32px rgb(16 29 43 / 6%); }
.lawyer-result .profile-link, .lawyer-result .card-call, .search-results .is-result-row .profile-link { border-radius: 999px; }
.lawyer-result .badge.verified { color: var(--gold-dark); background: var(--surface-primary); }
.lawyer-result .badge.demo, .lawyer-result .badge.sponsored { color: var(--gold-dark); background: color-mix(in srgb, var(--brand-accent) 15%, var(--surface-card)); }
.lawyer-result .result-specialties a { background: var(--surface-primary); border-radius: 999px; padding-inline: 12px; color: var(--brand-secondary); }
.lawyer-result .avatar { border-radius: 20px; background: var(--surface-primary); }
.panel, .blog-card, .stat-grid article, .account-settings-card { border-radius: 22px; border-color: var(--border-default); }
.page-heading, .page-heading.directory-heading { background: transparent; }
.directory-quick-search input, .directory-quick-search select, .search-filter-trigger, .directory-content .results-view-toggle { border-radius: 999px; }
.search-filter-trigger, .directory-content .results-view-toggle { border-color: var(--border-default); }
.professional-nav, .account-sidebar, .auth-shell { border-radius: 24px; }
.account-sidebar-heading, .auth-copy, .login-introduction { background: var(--brand-secondary); }
.account-sidebar .nav-link, input:not([type=checkbox]), select, textarea { border-radius: 13px; }
.lawyer-invitation { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 42px var(--gutter) 60px; padding: 30px 34px; border: 1px solid var(--surface-secondary); border-radius: 24px; }
.lawyer-invitation h2 { font-size: 22px; }
.lawyer-invitation p { margin: 0; font-size: max(var(--min-readable-font-size, 0px), 13px); }
.lawyer-invitation .button { white-space: nowrap; }

.review { background: var(--surface-primary); border: 0; border-radius: 17px; padding: 18px; margin-top: 14px; }
.review > div:first-child { font-size: max(var(--min-readable-font-size, 0px), 13px); }
.review small, .review-helpful { font-size: max(var(--min-readable-font-size, 0px), 11px); }
.review p { font-size: max(var(--min-readable-font-size, 0px), 13px); }
.review-browsing { max-width: 210px; }
.review-browsing label { font-size: max(var(--min-readable-font-size, 0px), 11px); }
.review-browsing select { min-height: 40px; font-size: max(var(--min-readable-font-size, 0px), 12px); padding-block: 6px; }
footer { margin-top: 48px; background: var(--surface-primary); color: var(--text-primary); border-top: 1px solid var(--border-default); }
footer .brand-wordmark { font-size: 22px; }
footer .brand, footer a:hover { color: var(--brand-primary); }
footer .brand-wordmark small, footer p, footer > small { color: var(--text-secondary); }
footer p, footer > small { font-size: max(var(--min-readable-font-size, 0px), 12px); }
footer > div:nth-child(2) { font-size: max(var(--min-readable-font-size, 0px), 12px); }

@media (max-width: 1150px) {
    .header-actions > .lawyer-signup-link { display: none; }
    .site-header > nav { gap: 20px; }
    .home-hero .hero-copy { width: 62%; }
    .home-hero h1 { font-size: 37px; }
}
@media (max-width: 900px) {
    :root { --gutter: 24px; }
    .site-header { width: calc(100% - 40px); padding: 14px 22px; min-height: 78px; }
    .site-header > nav { display: none; }
    .header-actions { margin-inline-start: auto; }
    .home-hero { min-height: 455px; padding-block: 56px; }
    .home-hero .hero-copy { width: 65%; }
    .home-hero h1 { font-size: 32px; }
    .home-hero .hero-art { inset-block-start: -79px; }
    .home-hero .search-box .city-field { flex-basis: 96px; padding-inline: 6px; }
    .home-hero .search-box button { padding-inline: 18px; }
    .home-hero .search-box input { font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .home-hero .popular a { font-size: max(var(--min-readable-font-size, 0px), 10px); padding-inline: 9px; }
    .trust-strip { margin-inline: var(--gutter); padding: 22px 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
    .trust-strip > div { flex-direction: column; padding-inline: 8px; text-align: center; }
    .trust-strip strong { font-size: max(var(--min-readable-font-size, 0px), 12px); }
    .trust-strip small { font-size: max(var(--min-readable-font-size, 0px), 10px); }
    .trust-strip > div:not(:last-child) { border-inline-end: 1px solid var(--surface-secondary); }
}
@media (max-width: 700px) {
    :root { --gutter: 18px; --min-readable-font-size: 16px; }
    :where(sub, sup, option, optgroup) { font-size: max(16px, .833em); }
    input::file-selector-button { font-size: inherit; }
    .leaflet-container .leaflet-control-attribution { font-size: 16px; }
    body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .site-header { width: calc(100% - 24px); min-height: 72px; margin-top: 10px; padding: 10px 14px; border-radius: 20px; gap: 12px; }
    .site-header .brand-logo { width: 38px; height: 38px; }
    .brand-wordmark { font-size: 20px; }
    .brand-wordmark small { display: none; }
    .header-actions { gap: 6px; }
    .header-actions .login-link { padding-inline: 10px; min-height: 40px; font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .header-actions .login-link .brand-icon { width: 16px; }
    .site-menu > summary { width: 36px; height: 40px; padding: 6px; }
    .site-menu > nav { top: calc(100% + 16px); }
    .header-account > summary { min-height: 40px; padding-inline: 10px; font-size: max(var(--min-readable-font-size, 0px), 11px); gap: 6px; }
    .mobile-navigation {
        position: fixed;
        z-index: 30;
        inset: auto 0 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--border-default);
        border-radius: 16px 16px 0 0;
        background: var(--surface-card);
        box-shadow: 0 -5px 24px rgb(16 29 43 / 6%);
    }
    .mobile-navigation a {
        display: grid;
        grid-template-rows: 24px auto;
        align-content: start;
        place-items: center;
        gap: 2px;
        min-height: 56px;
        padding: 6px 2px;
        border-radius: 12px;
        color: var(--brand-secondary);
        font-size: var(--min-readable-font-size);
        font-weight: 500;
        line-height: 1.3;
        text-align: center;
        overflow-wrap: anywhere;
    }
    .mobile-navigation .brand-icon { width: 22px; height: 22px; }
    .mobile-navigation a.active { background: var(--surface-accent-soft); color: var(--brand-primary); font-weight: 700; }
    .mobile-navigation a:focus-visible { outline-offset: -3px; }
    .home-hero { flex-direction: column; min-height: 0; padding: 24px var(--gutter) 28px; overflow: hidden; }
    .home-hero .hero-art { inset: 0 0 auto; height: 238px; }
    .home-hero .hero-image { position: absolute; width: 720px; max-width: none; height: 480px; left: calc(50% - 243px); top: -35px; object-fit: cover; }
    .home-hero .hero-art::after { background: linear-gradient(0deg, var(--brand-accent), transparent 30%); }
    .home-hero .hero-copy { width: 100%; max-width: none; text-align: center; }
    .home-hero .eyebrow { justify-content: center; margin-bottom: 12px; font-size: max(var(--min-readable-font-size, 0px), 10px); }
    .home-hero h1 { font-size: clamp(27px, 7.1vw, 39px); line-height: 1.8; letter-spacing: -.7px; margin-bottom: 12px; }
    .home-hero .hero-copy > p { font-size: max(var(--min-readable-font-size, 0px), 12px); margin-bottom: 22px; }
    .home-hero .search-box { display: flex; flex-wrap: wrap; gap: 0; padding: 6px; border-radius: 25px; }
    .home-hero .search-box label:first-child { flex: 1 1 100%; padding: 0 8px 4px; border-bottom: 1px solid var(--border-default); margin-bottom: 4px; }
    .home-hero .search-box input { font-size: 16px; min-height: 42px; padding-inline: 6px; }
    .home-hero .search-box input::placeholder { font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .home-hero .search-box .city-field { flex: 1 1 100px; border: 0; padding-inline: 12px; }
    .home-hero .search-box select { font-size: 16px; min-height: 44px; }
    .home-hero .search-box button { flex: 0 0 106px; min-height: 44px; margin-inline-start: 6px; font-size: max(var(--min-readable-font-size, 0px), 12px); padding: 8px 14px; }
    .home-hero .popular { justify-content: center; gap: 7px; margin-top: 14px; }
    .home-hero .popular a { min-height: 32px; font-size: max(var(--min-readable-font-size, 0px), 10px); padding: 4px 10px; }
    .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 10px; margin-inline: 12px; border-radius: 0 0 20px 20px; }
    .trust-strip > div { justify-content: flex-start; gap: 4px; padding: 10px 6px; }
    .trust-strip > div:not(:last-child) { border-inline-end: 0; }
    .trust-strip > div:nth-child(odd) { border-inline-end: 1px solid var(--surface-secondary); }
    .trust-strip > div:nth-child(-n+2) { border-block-end: 1px solid var(--surface-secondary); }
    .trust-strip > div > span { width: 30px; height: 30px; }
    .trust-strip .brand-icon { width: 27px; height: 27px; }
    .trust-strip strong { font-size: var(--min-readable-font-size); line-height: 1.45; display: block; text-wrap: balance; }
    .trust-strip small { display: none; }
    .section { padding-block: 36px; }
    .section-heading h2 { font-size: 23px; }
    .section-heading p { font-size: max(var(--min-readable-font-size, 0px), 12px); }
    .section-heading > a { font-size: max(var(--min-readable-font-size, 0px), 12px); }
    .how-section { padding-top: 30px; padding-bottom: 28px; }
    .centered-heading { margin-bottom: 26px; }
    .centered-heading p { font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .steps { grid-template-columns: 1fr; gap: 27px; padding-inline: 10px; }
    .steps article { display: block; padding: 24px 16px 18px; border-radius: 22px; }
    .steps article > span { top: -16px; width: 30px; height: 30px; inset-inline-start: calc(50% - 15px); font-size: 16px; }
    .steps article:not(:last-child)::after { display: none; }
    .steps h3 { font-size: max(var(--min-readable-font-size, 0px), 14px); }
    .steps p { font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .home-callout { display: block; min-height: 0; padding: 22px; border-radius: 24px; }
    .home-callout .eyebrow { font-size: max(var(--min-readable-font-size, 0px), 9px); }
    .home-callout h2 { font-size: 23px; }
    .home-callout p { font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .home-callout .button { width: auto; font-size: max(var(--min-readable-font-size, 0px), 11px); }
    .home-callout > .brand-icon { position: absolute; z-index: -1; inset: auto auto 12px 12px; width: 76px; height: 76px; margin: 0; opacity: .22; }
    .lawyer-grid .lawyer-result .result-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; }
    .lawyer-grid .lawyer-result .result-actions > * { padding-inline: 6px; text-wrap: balance; }
    .lawyer-grid .lawyer-result .profile-link > [aria-hidden="true"] { display: none; }
    .specialty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .specialty-tile h3 { font-size: max(var(--min-readable-font-size, 0px), 13px); }
    .lawyer-invitation { margin-block: 28px 40px; padding: 25px; flex-direction: column; align-items: flex-start; }
    .lawyer-invitation h2 { font-size: 21px; }
    .lawyer-invitation p { font-size: max(var(--min-readable-font-size, 0px), 12px); }
    .lawyer-invitation .button { width: 100%; }
    .toast { bottom: calc(85px + env(safe-area-inset-bottom)); }
    footer { padding-bottom: 28px; margin-top: 30px; }
    .auth-shell { border-radius: 24px; }
}
@media (max-width: 370px) {
    .site-header { padding-inline: 10px; gap: 5px; }
    .site-header .brand-logo { width: 32px; height: 32px; }
    .brand-wordmark { font-size: 17px; }
    .header-actions .login-link { font-size: max(var(--min-readable-font-size, 0px), 10px); padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Profile sections use a white canvas and a single accent for navigation and actions. */
.profile-page {
    --profile-accent: var(--brand-primary);
    --profile-accent-hover: var(--brand-secondary);
    --profile-tint: var(--surface-primary);
    --profile-border: var(--border-default);
    --profile-muted: var(--text-secondary);
    --profile-padding: 16px;
    max-width: 720px;
    margin-inline: auto;
    padding: 14px 12px 0;
    overflow-wrap: anywhere;
}
.profile-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.profile-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--profile-accent); font-size: max(var(--min-readable-font-size, 0px), 14px); }
.profile-back .brand-icon { width: 18px; transform: scaleX(-1); }
.profile-page .profile-tabs {
    top: 0;
    z-index: 10;
    gap: 6px;
    justify-content: flex-start;
    padding: 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--profile-border);
    background: var(--surface-card);
    scrollbar-color: var(--border-strong) transparent;
}
.profile-page .profile-tabs a {
    flex: none;
    min-height: 48px;
    padding: 7px 12px;
    border-bottom: 3px solid transparent;
    font-size: max(var(--min-readable-font-size, 0px), 14px);
    color: var(--profile-muted);
}
.profile-page .profile-tabs a:is(.active, :hover) { color: var(--profile-accent); border-bottom-color: currentColor; }
.profile-page .profile-tabs a.active { font-weight: 700; }
.profile-page .profile-content { display: grid; gap: 14px; }
.profile-page .profile-content > .panel {
    min-width: 0;
    position: static;
    margin: 0;
    padding: var(--profile-padding);
    border: 1px solid var(--profile-border);
    border-radius: 12px;
    background: var(--surface-card);
    box-shadow: none;
    scroll-margin-top: 32px;
}
.profile-page .panel h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.55;
}
.profile-page .panel h2 > .brand-icon { color: var(--profile-accent); }
.profile-page .panel p { font-size: max(var(--min-readable-font-size, 0px), 15px); line-height: 1.95; color: var(--text-primary); }
.profile-page .panel .muted { color: var(--profile-muted); }
.profile-summary .profile-title { align-items: flex-start; gap: 10px; }
.profile-summary .profile-title-copy { min-width: 0; max-width: none; }
.profile-summary .avatar.large {
    flex: none;
    width: 64px;
    height: 64px;
    border: 1px solid var(--profile-border);
    border-radius: 50%;
    font-size: 29px;
    overflow: hidden;
}
.profile-summary .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-summary .profile-title h1 { margin: 0; color: var(--profile-accent); font-size: clamp(18px, 5vw, 26px); line-height: 1.5; }
.profile-page .profile-summary .profile-profession { margin: 4px 0 8px; color: var(--profile-muted); font-size: max(var(--min-readable-font-size, 0px), 14px); }
.profile-summary .profile-heading-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-summary .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--brand-tint);
    color: var(--profile-accent-hover);
    font-size: max(var(--min-readable-font-size, 0px), 12px);
}
.profile-summary .badge:is(.demo, .sponsored) { background: var(--profile-tint); color: var(--profile-accent); }
.profile-summary .badge .brand-icon { width: 15px; height: 15px; }
.profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; margin-top: 12px; font-size: max(var(--min-readable-font-size, 0px), 13px); color: var(--profile-muted); }
.profile-meta a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--profile-accent); }
.profile-meta .brand-icon { width: 18px; height: 18px; }
.profile-meta .profile-rating .brand-icon { color: var(--rating-outline); fill: var(--rating-star); }
.profile-page .profile-specialties { gap: 6px; }
.profile-page .profile-specialties a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 11px;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-tint);
    color: var(--profile-accent);
    font-size: max(var(--min-readable-font-size, 0px), 13px);
}
.profile-summary-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 8px; }
.profile-page .mobile-contact { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.profile-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 74px;
    padding: 6px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--profile-accent);
    font: inherit;
    font-size: max(var(--min-readable-font-size, 0px), 12px);
    text-align: center;
}
.profile-shortcut .brand-icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--brand-tint); }
.profile-shortcut:hover, .profile-tool:hover { background: var(--profile-tint); }
.profile-shortcut:disabled { opacity: .65; }
.profile-tool {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--profile-accent);
    font: inherit;
    cursor: pointer;
}
.profile-tool .brand-icon { width: 20px; height: 20px; }
.profile-report { font-size: max(var(--min-readable-font-size, 0px), 12px); color: var(--profile-muted); }
.profile-report .brand-icon { width: 16px; height: 16px; }
.profile-share-trigger { margin-inline-start: auto; }
.profile-hours summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 8px;
    border-radius: 8px;
    color: var(--profile-accent);
    font-size: max(var(--min-readable-font-size, 0px), 14px);
}
.profile-hours summary > span { margin-inline-start: auto; font-size: 22px; line-height: 1; }
.profile-hours summary::-webkit-details-marker { display: none; }
.profile-hours[open] summary > span { transform: rotate(-90deg); }
.profile-page .button {
    gap: 6px;
    min-height: 46px;
    padding: 8px 10px;
    border-color: var(--profile-accent);
    border-radius: 8px;
    background: var(--profile-accent);
    color: white;
    font-size: max(var(--min-readable-font-size, 0px), 14px);
    line-height: 1.55;
}
.profile-page .button .brand-icon { width: 18px; height: 18px; }
.profile-page .button:hover { background: var(--profile-accent-hover); border-color: var(--profile-accent-hover); }
.profile-page .button.outline { background: var(--surface-card); color: var(--profile-accent); border-color: var(--border-strong); }
.profile-page .button.outline:hover { background: var(--profile-tint); border-color: var(--profile-accent); }
.profile-gallery-stage { position: relative; }
.profile-gallery-feature { display: block; }
.profile-gallery-feature img { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 340px; object-fit: cover; border-radius: 10px; background: var(--profile-tint); }
.profile-gallery-stage button {
    position: absolute;
    top: calc(50% - 22px);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--profile-border);
    border-radius: 50%;
    background: var(--surface-card);
    color: var(--profile-accent);
    font-size: 27px;
    cursor: pointer;
}
.profile-gallery-prev { inset-inline-start: 6px; }
.profile-gallery-next { inset-inline-end: 6px; }
.profile-page .profile-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(48px, 17%, 88px);
    grid-template-columns: none;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin: 8px 0 0;
    padding: 4px;
    scrollbar-width: thin;
}
.profile-page .profile-gallery > a { scroll-snap-align: start; padding: 2px; border: 2px solid transparent; border-radius: 8px; }
.profile-page .profile-gallery > a[aria-current="true"] { border-color: var(--profile-accent-hover); }
.profile-page .profile-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; }
.profile-office-layout { display: grid; align-items: start; gap: 14px; }
.profile-office-layout .office-map { display: block; height: 200px; background: var(--profile-tint); }
.profile-phone-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--profile-border);
    scroll-margin-top: 34px;
}
.profile-page .profile-phone-row .demo-note { flex-basis: 100%; margin: 0; color: var(--profile-accent); }
.profile-social { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--profile-border); }
.profile-social h3 { margin: 0 0 8px; font-size: max(var(--min-readable-font-size, 0px), 15px); }
.profile-social-links { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-social-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 10px; border-radius: 8px; background: var(--profile-tint); color: var(--profile-accent); font-size: max(var(--min-readable-font-size, 0px), 13px); }
.profile-dialog {
    width: min(100% - 24px, 440px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 16px;
    border: 1px solid var(--profile-border);
    border-radius: 16px;
    background: var(--surface-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
}
.profile-dialog::backdrop { background: rgb(16 24 65 / 52%); }
body:has(.profile-dialog[open]) { overflow: hidden; }
.profile-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.profile-page .profile-dialog-heading h2 { margin: 0; font-size: 18px; }
.profile-dialog-heading .profile-tool { font-size: 25px; }
.profile-dialog input, .profile-dialog textarea { margin-bottom: 12px; }
.profile-copy-status { margin: 6px 0 0; color: var(--profile-muted); font-size: max(var(--min-readable-font-size, 0px), 13px); }
.profile-gallery-dialog { width: min(100% - 24px, 760px); }
.profile-gallery-dialog > img { display: block; width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; }
.profile-gallery-footer { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 6px; }
.profile-gallery-footer .profile-tool { font-size: 25px; }
.profile-review-score { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.profile-review-score .brand-icon { margin-inline-start: auto; width: 19px; height: 19px; color: var(--rating-outline); fill: var(--rating-star); }
.profile-review-entry { padding: 12px; margin-block: 10px 16px; border-radius: 10px; background: var(--profile-tint); scroll-margin-top: 34px; }
.profile-review-entry > p { margin-bottom: 8px; }
.profile-review-rating { border: 0; padding: 0; margin: 0; }
.profile-rating-options { display: flex; flex-wrap: wrap; }
.profile-rating-options label { display: grid; place-items: center; position: relative; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.profile-rating-options input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; }
.profile-rating-options .brand-icon { width: 26px; height: 26px; color: var(--rating-outline); }
.profile-rating-options label:has(input:checked) .brand-icon,
.profile-rating-options label:has(~ label input:checked) .brand-icon { fill: var(--rating-star); }
.profile-rating-options label:has(input:focus-visible) { outline: 2px solid var(--profile-accent-hover); border-radius: 6px; }
.profile-page .profile-credentials { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.profile-credentials > div { padding: 10px 0; border-bottom: 1px solid var(--profile-border); }
.profile-credentials > div:last-child { border: 0; padding-bottom: 0; }
.profile-credentials dt { color: var(--profile-muted); font-size: max(var(--min-readable-font-size, 0px), 14px); }
.profile-page .profile-credentials dd { margin: 2px 0 0; font-size: max(var(--min-readable-font-size, 0px), 15px); }
.profile-page .office-week { font-size: max(var(--min-readable-font-size, 0px), 14px); }
.profile-page .office-week th, .profile-page .office-week td { border-color: var(--profile-border); }
.profile-page .hours-badge { font-size: max(var(--min-readable-font-size, 0px), 13px); }
.profile-page .review { background: var(--profile-tint); border-radius: 10px; }
.profile-page .review small { font-size: max(var(--min-readable-font-size, 0px), 13px); }
.profile-page .mobile-contact {
    display: none;
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--profile-border);
    background: var(--surface-card);
    box-shadow: 0 -4px 18px rgb(16 29 43 / 8%);
}
@media (max-width: 700px) {
    .profile-summary .profile-title {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        gap: 4px 8px;
    }
    .profile-summary .profile-title-copy { display: contents; }
    .profile-summary .avatar.large { grid-row: 1 / span 2; grid-column: 1; }
    .profile-summary .profile-title h1 { grid-row: 1; grid-column: 2; align-self: center; }
    .profile-page .profile-summary .profile-profession { grid-row: 2; grid-column: 2 / -1; margin: 0 0 4px; line-height: 1.55; }
    .profile-summary .profile-heading-badges { grid-row: 3; grid-column: 1 / -1; }
    .profile-summary .badge { padding-inline: 6px; }
    .profile-summary .profile-report { grid-row: 1; grid-column: 3; }
    .profile-summary-actions .profile-shortcut {
        display: grid;
        grid-template-rows: 40px auto;
        place-items: center;
        align-content: start;
        line-height: 1.45;
    }
    .profile-dialog:not(.profile-gallery-dialog) { inset: auto 0 0; width: 100%; max-width: none; margin: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; }
    .profile-page.show-mobile-contact .mobile-contact { display: grid; }
    html:has(.profile-page) { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    body:has(.profile-page) .mobile-navigation { display: none; }
    body:has(.profile-page) footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (min-width: 701px) {
    .profile-page { --profile-padding: 22px; padding: 16px 24px 0; }
    .profile-page .profile-content { gap: 18px; }
    .profile-summary .profile-title { gap: 14px; }
    .profile-summary .avatar.large { width: 76px; height: 76px; font-size: 33px; }
    .profile-office-layout .office-map { height: 250px; }
    .profile-credentials > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; }
}

