/* Base styles - surveyornotes.uk inspired */
:root {
    --primary: #1a5f7a;
    --primary-dark: #134b60;
    --secondary: #57837b;
    --accent: #c38e70;
    --text: #2d3436;
    --text-light: #636e72;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --shadow: 0 2px 4px rgba(0,0,0,0.08);
    --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-secondary { background: var(--bg-light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-block { display: block; width: 100%; text-align: center; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.25rem;
}

/* Header */
.site-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    color: var(--primary);
}

.logo:hover { color: var(--primary-dark); text-decoration: none; }

.logo-copy {
    display: grid;
    gap: .1rem;
}

.logo-name {
    font-size: 1.25rem;
    line-height: 1.1;
}

.logo-tagline {
    color: var(--text-light);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.15;
}

.nav-links a {
    margin-left: 2rem;
    color: var(--text);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs li::after { content: '/'; margin: 0 0.5rem; color: var(--text-light); }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs span { color: var(--text-light); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero-subtitle { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }

/* Search */
.search-form { max-width: 600px; margin: 0 auto; position: relative; }

.search-wrapper {
    display: flex;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-wrapper input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1.125rem;
    outline: none;
}

.search-wrapper .btn { border-radius: 0; }

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    display: none;
    z-index: 10;
}

.suggestion {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.suggestion:hover { background: var(--bg-light); text-decoration: none; }
.suggestion span { float: right; color: var(--text-light); font-size: 0.875rem; }

/* Town grid */
.popular-towns, .browse-counties { padding: 3rem 0; }
.popular-towns { background: var(--bg-light); }

.town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.town-card {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.town-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); text-decoration: none; }

.town-name { display: block; font-weight: 600; color: var(--text); font-size: 1.125rem; }
.town-county { display: block; color: var(--text-light); font-size: 0.875rem; }
.listing-count { display: block; color: var(--primary); font-size: 0.875rem; margin-top: 0.5rem; }

/* County list */
.county-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.county-group h3 { color: var(--primary); margin-bottom: 0.5rem; }
.county-group ul { list-style: none; padding: 0; margin: 0; }
.county-group li { padding: 0.25rem 0; }

/* Features */
.about-section { padding: 3rem 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature h3 { color: var(--primary); }

.benefit-card-grid,
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.benefit-card,
.directory-card,
.firm-directory-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.benefit-card,
.directory-card {
    padding: 1.25rem;
}

.directory-card {
    display: grid;
    gap: .35rem;
}

.directory-card strong {
    color: var(--text);
    font-size: 1.05rem;
}

.directory-card span,
.directory-card small {
    color: var(--text-light);
}

.firm-directory-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.firm-directory-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
}

.firm-directory-item h2 {
    margin-bottom: .35rem;
    font-size: 1.15rem;
}

.firm-directory-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: inherit;
    text-align: left;
    cursor: pointer;
}

.firm-directory-link:hover,
.firm-directory-link:focus-visible {
    text-decoration: underline;
}

.firm-listing-choices {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.firm-listing-choices a {
    display: block;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) / 2);
    font-weight: 700;
}

.firm-directory-item p,
.benefit-card p {
    margin: 0;
    color: var(--text-light);
}

.firm-directory-meta {
    display: grid;
    gap: .35rem;
    min-width: 180px;
    justify-items: end;
    text-align: right;
}

.topic-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.5rem;
}

/* Listings */
.listings-section { padding: 2rem 0; }

.listings-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.listing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.listing-card.premium {
    border-color: var(--accent);
    border-width: 2px;
    background: linear-gradient(to right, #fff9f5, white);
}

.premium-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.listing-content { display: flex; gap: 1rem; }

.listing-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.listing-info { flex: 1; }
.listing-info h3 { margin-bottom: 0.5rem; }
.listing-info h3 a { color: var(--text); }
.listing-info h3 a:hover { color: var(--primary); }

.listing-description { color: var(--text-light); margin-bottom: 0.5rem; }
.listing-location { font-size: 0.875rem; color: var(--text-light); margin-bottom: 0.5rem; }

.listing-rating { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }

.listing-services { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.service-tag {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.service-more { font-size: 0.75rem; color: var(--text-light); }

.listing-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 0.125rem; }
.star { color: #ffc107; font-size: 1rem; }
.star-empty { color: var(--border); }
.star-half { background: linear-gradient(90deg, #ffc107 50%, var(--border) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rating-value { margin-left: 0.25rem; font-weight: 600; font-size: 0.875rem; }
.rating-count { color: var(--text-light); font-size: 0.875rem; }

/* Listing detail */
.listing-detail { padding: 2rem 0; }

.listing-header { margin-bottom: 2rem; }
.listing-logo-large { width: 120px; height: 120px; object-fit: contain; margin-bottom: 1rem; }
.listing-tagline { font-size: 1.125rem; color: var(--text-light); }
.listing-rating-large { margin-top: 1rem; }

.listing-body { display: grid; grid-template-columns: 1fr 350px; gap: 2rem; }

.listing-main section { margin-bottom: 2rem; }

.services-list, .accreditations-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.services-list li::before, .accreditations-list li::before {
    content: '✓';
    color: var(--success);
    margin-right: 0.5rem;
}

.contact-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    position: sticky;
    top: 100px;
}

.contact-card h3 { margin-bottom: 1rem; }
.contact-card address { font-style: normal; margin-bottom: 1rem; }
.contact-card p { margin: 0.5rem 0; }
.contact-card .btn { margin-top: 1rem; }

/* FAQ */
.faq-section { padding: 2rem 0; background: var(--bg-light); margin: 2rem 0; }
.faq-list { max-width: 800px; }

.faq-item {
    background: white;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
}

.faq-item p { padding: 0 1.5rem 1rem; margin: 0; color: var(--text-light); }

/* Reviews */
.reviews-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.review-list { margin: 1.5rem 0; }
.no-reviews { color: var(--text-light); font-style: italic; }

.review {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.review:last-child { border-bottom: none; }

.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.reviewer-name { display: block; }
.review-meta time { color: var(--text-light); font-size: 0.875rem; }
.review-title { margin: 0.5rem 0; }
.review-body { margin: 0; }
.review-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

.review-reply-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.review-reply-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(7, 95, 115, .1);
    font-size: .95rem;
}

.review-reply-panel {
    margin-top: 1rem;
}

.review-replies {
    display: grid;
    gap: .8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.review-reply {
    background: #f8fbfa;
}

.review-replies .review {
    margin-left: 1.25rem;
}

/* Review form */
.review-form {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.review-form h3 { margin-bottom: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.form-group textarea { resize: vertical; }

.client-edit-form {
    max-width: 960px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.image-preview-card {
    display: inline-grid;
    gap: .5rem;
    margin-bottom: .75rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.image-preview-small {
    width: 140px;
    max-height: 120px;
    object-fit: contain;
}

.town-picker {
    border: 0;
    padding: 0;
    margin: 1.5rem 0 0;
}

.town-picker legend {
    font-weight: 700;
    margin-bottom: .75rem;
}

.town-picker-hint {
    margin: -.25rem 0 .5rem;
    color: var(--muted);
    font-size: .9rem;
}

.town-picker-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.town-picker-list label {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .45rem .75rem;
    border-bottom: 1px solid var(--border);
}

.town-picker-list label:last-child {
    border-bottom: 0;
}

.town-picker-list input {
    flex: 0 0 auto;
}

.lookup-picker {
    min-height: 3rem;
    max-height: 220px;
    overflow-y: auto;
    display: grid;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.lookup-picker__item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: center;
    column-gap: .6rem;
    padding: .5rem .75rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

.lookup-picker__item input {
    margin: 0;
    justify-self: center;
}

.lookup-picker__item:last-child {
    border-bottom: 0;
}

.moderation-actions {
    display: grid;
    gap: 1rem;
}

.decision-form {
    width: min(50%, 900px);
    margin: 0 auto;
    display: grid;
    gap: .75rem;
}

.decision-notes {
    width: 100%;
    min-height: 7.5rem;
    max-height: 50vh;
    resize: vertical;
}

.decision-form .btn {
    justify-self: start;
}

@media (max-width: 768px) {
    .decision-form {
        width: 100%;
    }
}

.firm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.firm-modal[hidden] {
    display: none;
}

.firm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
}

.firm-modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
    overflow: hidden;
}

.lookup-picker__empty {
    margin: 0;
    padding: .75rem;
    color: var(--muted);
}

.lookup-add-label {
    margin-top: .75rem;
}

.contact-modal .firm-modal__panel {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.contact-modal .firm-modal__header {
    align-items: flex-start;
}

.contact-modal .firm-modal__header h2,
.contact-modal .firm-modal__header p {
    margin: 0;
}

.contact-modal .firm-modal__header p {
    margin-top: .3rem;
    color: var(--text-light);
}

.contact-modal .firm-modal__body {
    display: grid;
    gap: .85rem;
}

.contact-modal .form-group {
    margin: 0;
}

.phone-modal .firm-modal__header {
    align-items: flex-start;
}

.phone-modal .firm-modal__header h2,
.phone-modal .firm-modal__header p {
    margin: 0;
}

.phone-modal__message {
    margin-top: .3rem;
    color: var(--text-light);
}

.phone-modal__message p {
    margin: 0;
}

.phone-modal__message p + p {
    margin-top: .75rem;
}

.phone-modal .firm-modal__header p {
    color: var(--text-light);
}

.phone-modal__body {
    display: grid;
    gap: .75rem;
}

.phone-modal__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    padding: .85rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-light);
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
}

.phone-modal__number:hover,
.phone-modal__number:focus-visible {
    text-decoration: none;
}

.modal-open {
    overflow: hidden;
}

.firm-modal__header,
.firm-modal__body,
.firm-modal__footer {
    padding: 1rem 1.25rem;
}

.firm-modal__header,
.firm-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.firm-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.firm-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; }
.checkbox-group input { width: auto; }

.hp-field { position: absolute; left: -9999px; }

/* Star rating input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating-input input { display: none; }
.star-rating-input label {
    font-size: 1.5rem;
    color: var(--border);
    cursor: pointer;
    padding: 0 0.125rem;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: #ffc107; }

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
}

.form-message.success { background: #d4edda; color: #155724; }
.form-message.error { background: #f8d7da; color: #721c24; }

/* Nearby towns */
.nearby-towns { padding: 2rem 0; }
.nearby-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* Related listings */
.related-listings { padding: 2rem 0; border-top: 1px solid var(--border); margin-top: 2rem; }

/* Blog */
.blog-header { padding: 2rem 0; text-align: center; }

.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; padding-bottom: 2rem; }

.blog-posts { display: flex; flex-direction: column; gap: 1.5rem; }

.blog-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.blog-image { width: 100%; height: 200px; object-fit: cover; }

.blog-card-content { padding: 1.5rem; }
.blog-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.blog-card h2 a { color: var(--text); }
.blog-meta { font-size: 0.875rem; color: var(--text-light); margin-bottom: 0.5rem; }
.blog-summary { color: var(--text-light); margin-bottom: 1rem; }
.read-more { font-weight: 500; }

.blog-sidebar { font-size: 0.875rem; }
.sidebar-section { margin-bottom: 2rem; }
.sidebar-section h3 { margin-bottom: 0.75rem; }

.category-list { list-style: none; padding: 0; }
.category-list li { padding: 0.25rem 0; }
.category-list a.active { font-weight: 600; color: var(--primary-dark); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
}
.tag.active { background: var(--primary); color: white; }

/* Blog post */
.blog-post { max-width: 800px; padding: 2rem 0; }

.post-header { margin-bottom: 2rem; }
.post-meta { color: var(--text-light); margin-bottom: 1rem; }
.post-categories { display: flex; gap: 0.5rem; }
.category-link { background: var(--bg-light); padding: 0.25rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; }

.post-featured-image { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; }

.post-content { line-height: 1.8; }
.post-content h2 { margin-top: 2rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}
.post-content code {
    background: var(--bg-light);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
}
.post-content pre {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
}
.post-content pre code { padding: 0; background: none; }

.post-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.post-tags { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.related-posts { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.related-post-card {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    color: var(--text);
}
.related-post-card:hover { text-decoration: none; background: var(--border); }
.related-post-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.related-post-card p { font-size: 0.875rem; color: var(--text-light); margin: 0; }

.related-towns { margin-top: 2rem; }
.related-towns ul { list-style: none; padding: 0; }
.related-towns li { padding: 0.25rem 0; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination a { padding: 0.5rem 1rem; background: var(--bg-light); border-radius: var(--radius); }
.page-info { color: var(--text-light); }

/* Search results */
.search-results { padding: 2rem 0; }
.search-query { color: var(--text-light); margin-bottom: 2rem; }

.results-list { display: flex; flex-direction: column; gap: 0.5rem; }
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    color: var(--text);
}
.result-item:hover { background: var(--border); text-decoration: none; }
.result-name { font-weight: 500; }
.result-county { color: var(--text-light); }
.result-count { color: var(--primary); font-size: 0.875rem; }

.no-results { text-align: center; padding: 3rem; }

/* Error page */
.error-page { text-align: center; padding: 4rem 0; }

/* Footer */
.site-footer {
    background: var(--text);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.footer-brand strong { font-size: 1.25rem; }
.footer-brand p { opacity: 0.7; margin: 0.5rem 0 0; }

.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: white; opacity: 0.7; }
.footer-links a:hover { opacity: 1; }

.copyright { text-align: center; font-size: 0.875rem; opacity: 0.5; margin: 0; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }

    .search-wrapper { flex-direction: column; }
    .search-wrapper .btn { border-radius: 0 0 var(--radius) var(--radius); }

    .listing-body { grid-template-columns: 1fr; }
    .contact-card { position: static; }

    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; }

    .footer-content { flex-direction: column; gap: 1.5rem; }
    .footer-links { flex-wrap: wrap; gap: 1rem; }
}

/* 2026 public redesign */
:root {
    --primary: #075f73;
    --primary-dark: #06495a;
    --secondary: #5e7f51;
    --accent: #b18b4f;
    --text: #10212a;
    --text-light: #60727a;
    --bg: #fbfaf6;
    --bg-light: #eef5f3;
    --border: #dce5e4;
    --success: #3f7a47;
    --shadow: 0 22px 60px rgba(13, 34, 39, .13);
    --radius: 8px;
}

body {
    color: var(--text);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
    width: min(1120px, calc(100% - 40px));
    max-width: none;
    padding: 0;
}

h1,
h2.section-title,
.section-head h2,
.content-panel h2,
.town-intro h1,
.town-intro h2,
.listing-detail h2,
.about-section h2,
.popular-towns h2,
.browse-counties h2,
.faq-section h2,
.nearby-towns h2,
.related-listings h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: 0;
}

h1 { font-size: clamp(44px, 6vw, 74px); }

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1rem;
    border-radius: var(--radius);
    font-weight: 800;
}

.btn-primary {
    background: var(--primary);
}

.btn-secondary {
    color: var(--primary);
    background: #fff;
    border-color: #cbd8d7;
}

.site-header {
    padding: 0;
    background: rgba(251, 250, 246, .88);
    border-bottom: 1px solid rgba(16, 33, 42, .1);
    backdrop-filter: blur(16px);
}

.nav-container {
    min-height: 68px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
    font-weight: 850;
}

.logo:hover {
    color: var(--text);
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: white;
    background: var(--primary);
    border-radius: var(--radius);
    font-size: .8rem;
    box-shadow: 0 10px 24px rgba(7, 95, 115, .22);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    margin-left: 0;
    color: #314952;
    font-size: .9rem;
    font-weight: 750;
}

.nav-cta {
    white-space: nowrap;
}

.section {
    padding: 4.25rem 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
}

.section-head-with-actions {
    align-items: center;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.section-head p {
    max-width: 470px;
    margin: 0;
    color: var(--text-light);
}

.home-hero,
.town-hero,
.listing-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.home-hero {
    background-image:
        linear-gradient(90deg, rgba(5, 31, 38, .84), rgba(5, 31, 38, .58) 48%, rgba(5, 31, 38, .2)),
        url("/images/design/hero-house.jpg");
}

.town-hero {
    background-image:
        linear-gradient(90deg, rgba(5, 31, 38, .86), rgba(5, 31, 38, .58), rgba(5, 31, 38, .2)),
        url("/images/design/cottage.jpg");
}

.listing-hero {
    background-image:
        linear-gradient(90deg, rgba(5, 31, 38, .88), rgba(5, 31, 38, .64), rgba(5, 31, 38, .2)),
        url("/images/design/manor.jpg");
}

.home-hero::after,
.town-hero::after,
.listing-hero::after {
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    content: "";
    background: linear-gradient(0deg, var(--bg), rgba(251, 250, 246, 0));
    pointer-events: none;
}

.home-hero-inner,
.town-hero-inner,
.listing-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 3.5rem;
    align-items: center;
    min-height: 620px;
    padding: 3.5rem 0 6rem;
}

.town-hero-inner,
.listing-hero-inner {
    min-height: 500px;
    align-items: end;
}

.eyebrow,
.profile-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.125rem;
    padding: .45rem .7rem;
    color: #e7f7f3;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: .82rem;
    font-weight: 820;
}

.survey-guide-section .eyebrow,
.survey-guide-page .eyebrow,
.survey-guide-index .eyebrow {
    color: var(--primary);
    border-color: #cfe0db;
    background: #edf4f1;
}

.hero-copy-block h1,
.town-hero h1,
.listing-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
}

.hero-subtitle,
.hero-text {
    max-width: 700px;
    margin: 1.35rem 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1.15rem;
}

.trust-row,
.listing-rating-large {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    align-items: center;
    margin-top: 1.6rem;
}

.trust-row span {
    display: inline-flex;
    padding: .55rem .75rem;
    color: #f1fbf8;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(5, 31, 38, .28);
    font-size: .82rem;
    font-weight: 800;
}

.hero-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
    font-weight: 760;
}

.hero-breadcrumbs a {
    color: rgba(255, 255, 255, .9);
}

.search-panel,
.contact-panel {
    padding: 1.4rem;
    color: var(--text);
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel h2,
.contact-panel h2 {
    margin: 0 0 .4rem;
    font-family: inherit;
    font-size: 1.4rem;
}

.search-panel p,
.contact-panel p {
    margin: 0 0 1rem;
    color: var(--text-light);
    font-size: .9rem;
}

.search-form {
    max-width: none;
    margin: 0;
}

.search-wrapper {
    border: 1px solid #cbd8d7;
    box-shadow: none;
}

.search-wrapper input {
    min-width: 0;
    padding: .95rem 1rem;
    font-size: 1rem;
}

.search-wrapper .btn {
    border-radius: 0;
}

.search-suggestions {
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 0;
    box-shadow: var(--shadow);
}

.suggestion {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.suggestion-pills,
.service-strip,
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .95rem;
}

.suggestion-pills a,
.chip,
.service-tag,
.service-more {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .75rem;
    color: #314952;
    border: 1px solid #d3dfdc;
    border-radius: 999px;
    background: #f5f7f6;
    font-size: .82rem;
    font-weight: 800;
}

.chip.active {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.town-sidebar {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 92px;
    justify-self: end;
    width: 100%;
    max-width: 400px;
}

.train-station-card .survey-table {
    margin-top: 0;
}

.town-information-card {
    align-self: start;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 35, 43, .08);
    transition: max-width .42s ease, box-shadow .42s ease, transform .42s ease;
}

.town-information-card__tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #f4f7f6;
}

.town-information-card__tab {
    flex: 1;
    padding: .8rem .9rem;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #4d656c;
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.town-information-card__tab:hover { background: #eaf2f0; }

.town-information-card__tab.is-active {
    border-bottom-color: var(--primary);
    background: #fff;
    color: var(--primary-dark);
}

.town-information-card__panel { padding: 1.125rem; }

.town-information-card__panel > strong {
    display: block;
    margin-bottom: .75rem;
}

.town-intro-layout {
    transition: grid-template-columns .42s ease, gap .42s ease;
}

.town-intro-layout.is-crime-expanded {
    grid-template-columns: minmax(0, 1fr);
}

.town-intro-layout.is-crime-expanded .content-panel { max-width: 720px; }

.town-intro-layout.is-crime-expanded .town-information-card {
    grid-column: 1 / -1;
    max-width: none;
    box-shadow: 0 18px 38px rgba(17, 35, 43, .12);
}

.crime-card {
    overflow: hidden;
}

.crime-card__heading {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.crime-card__heading strong {
    margin: 0;
}

.crime-card__heading span,
.crime-card__status,
.crime-card__note,
.crime-card__attribution {
    color: var(--text-light);
    font-size: .78rem;
}

.crime-card__heading span {
    display: block;
    margin-top: -.55rem;
}

.crime-card__status {
    margin: .3rem 0 0;
}

.crime-card__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .55rem;
    margin: .9rem 0;
}

.crime-card__stat {
    padding: .65rem;
    border-radius: 6px;
    background: var(--bg-light);
}

.crime-card__stat strong,
.crime-card__stat span {
    display: block;
}

.crime-card__stat strong {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.crime-card__stat span {
    color: var(--text-light);
    font-size: .7rem;
    font-weight: 700;
}

.crime-map {
    height: 205px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #e7eef0;
}

.is-crime-expanded .crime-map { height: min(440px, 50vw); }

.crime-card__filters {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: .9rem 0;
}

.crime-card__filter {
    padding: .4rem .6rem;
    border: 1px solid #cbd8d7;
    border-radius: 999px;
    background: #fff;
    color: #425961;
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.crime-card__filter:hover,
.crime-card__filter.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.crime-card__categories {
    display: grid;
    gap: .35rem;
    margin-top: .85rem;
}

.crime-card__category {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    color: #425961;
    font-size: .78rem;
}

.crime-card__category strong { color: var(--text); }

.crime-card__note,
.crime-card__attribution {
    margin: .85rem 0 0;
    line-height: 1.45;
}

.crime-card__attribution a {
    display: inline;
    padding: 0;
    color: var(--primary);
    border: 0;
    font: inherit;
}

.panel-stats,
.hero-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem;
    margin-top: 1.15rem;
}

.panel-stats {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.panel-stats strong {
    display: block;
    color: var(--primary);
    font-size: 1.3rem;
}

.panel-stats span,
.hero-stat span {
    display: block;
    color: var(--text-light);
    font-size: .75rem;
    font-weight: 760;
}

.hero-stat {
    min-width: 0;
    padding: .8rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--radius);
    background: rgba(5, 31, 38, .34);
}

.hero-stat strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-stat span {
    color: rgba(255, 255, 255, .78);
}

.hero-stat-areas {
    grid-column: span 2;
}

.hero-stat-areas ul {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .55rem;
    margin: .35rem 0 0;
    padding: 0;
    color: rgba(255, 255, 255, .82);
    font-size: .78rem;
    font-weight: 760;
    list-style: none;
}

.hero-stat-areas li:not(:last-child)::after {
    margin-left: .55rem;
    color: rgba(255, 255, 255, .42);
    content: "•";
}

.popular-towns {
    background: var(--bg);
}

.town-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.town-card.visual-town-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    padding: 0;
    border-radius: var(--radius);
    background: #123;
    box-shadow: 0 14px 34px rgba(16, 33, 42, .12);
    isolation: isolate;
}

.town-card.visual-town-card::before,
.town-card.visual-town-card::after {
    position: absolute;
    inset: 0;
    content: "";
    z-index: -2;
}

.town-card.visual-town-card::before {
    background-size: cover;
    background-position: center;
    transition: transform .4s ease;
}

.town-card.visual-town-card::after {
    z-index: -1;
    background: linear-gradient(180deg, rgba(8, 25, 31, .02), rgba(8, 25, 31, .84));
}

.town-card.visual-town-card:hover::before {
    transform: scale(1.06);
}

.town-card.wide {
    grid-column: span 2;
}

.town-image-1::before { background-image: url("/images/design/village-house.jpg"); }
.town-image-2::before { background-image: url("/images/design/cottage.jpg"); }
.town-image-3::before { background-image: url("/images/design/manor.jpg"); }
.town-image-4::before { background-image: url("/images/design/hero-house.jpg"); }

.town-card-content {
    display: flex;
    height: 100%;
    min-height: 240px;
    flex-direction: column;
    justify-content: end;
    padding: 1.125rem;
    color: #fff;
}

.town-card-content .town-name {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 850;
}

.town-card-content .town-county,
.town-card-content .listing-count {
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
    font-weight: 780;
}

.chooser-panel {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.75rem;
    align-items: start;
    padding: 1.75rem;
    background: #e8f0ed;
    border: 1px solid #d5e3df;
    border-radius: var(--radius);
}

.chooser-panel h2 {
    margin: 0 0 .8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.35rem;
}

.chooser-panel p {
    margin: 0;
    color: var(--text-light);
}

.service-choice-grid,
.service-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.service-choice,
.info-card,
.feature,
.listing-card,
.quick-nav,
.review,
.review-form,
.nearby-card,
.related-post-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 33, 42, .06);
}

.service-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 86px;
    padding: 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, .72);
    transition: transform .18s ease, background .18s ease;
}

.service-choice:hover {
    transform: translateY(-2px);
    text-decoration: none;
    background: #fff;
}

.service-choice strong,
.service-choice small {
    display: block;
}

.service-choice small {
    color: var(--text-light);
    font-size: .84rem;
    font-weight: 500;
}

.service-choice em {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--primary);
    background: #dcebe7;
    border-radius: var(--radius);
    font-style: normal;
    font-weight: 900;
}

.county-list {
    gap: 1rem;
}

.county-group {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.county-group h3 {
    color: var(--primary);
}

.county-carousel {
    overflow-x: auto;
    padding-bottom: .5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.county-carousel-shell {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: .75rem;
    align-items: center;
}

.county-carousel-track {
    display: flex;
    gap: 1rem;
    min-width: 100%;
}

.county-carousel-card {
    flex: 0 0 min(320px, 82vw);
    scroll-snap-align: start;
}

.carousel-controls {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

.carousel-button {
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid #cbd8d7;
    border-radius: var(--radius);
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.carousel-button-edge {
    font-size: 1.35rem;
    line-height: 1;
}

.carousel-button:hover {
    background: #f3f7f5;
}

.guide-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.guide-card {
    display: block;
    padding: 1.25rem;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 33, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 18px 34px rgba(16, 33, 42, .1);
}

.guide-card-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 30px;
    margin-bottom: .9rem;
    padding: 0 .55rem;
    border-radius: 999px;
    background: #e6f0ed;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
}

.guide-card h2,
.guide-card h3 {
    margin-bottom: .65rem;
    color: var(--text);
}

.guide-card p {
    margin: 0;
    color: var(--text-light);
}

.survey-guide-content {
    max-width: 900px;
}

.survey-guide-content p {
    margin: 0 0 .85rem;
}

.survey-guide-content p:last-child {
    margin-bottom: 0;
}

.survey-guide-page .content-panel,
.survey-guide-index .content-panel {
    display: grid;
    gap: 1rem;
}

.survey-guide-page .content-panel h2 {
    margin-top: 1rem;
    margin-bottom: 0;
}

.survey-table {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.survey-table th,
.survey-table td {
    padding: .85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.survey-table th {
    background: #f4f7f6;
    color: var(--text);
}

.survey-table tr:last-child td {
    border-bottom: 0;
}

.feature {
    text-align: left;
    border-left: 4px solid var(--accent);
    box-shadow: none;
}

.town-intro-layout,
.profile-about-layout,
.profile-meta-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(320px, 400px);
    gap: 3.25rem;
    align-items: start;
}

.content-panel p,
.content-panel li {
    color: #425961;
    font-size: 1.05rem;
}

.content-panel h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.quick-nav {
    padding: 1.125rem;
}

.quick-nav strong {
    display: block;
    margin-bottom: .75rem;
}

.quick-nav a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 0;
    color: #314952;
    border-top: 1px solid var(--border);
    font-weight: 780;
}

.compact-form {
    display: grid;
    gap: .75rem;
}

.compact-form select,
.compact-form input {
    width: 100%;
    min-height: 46px;
    padding: 0 .8rem;
    border: 1px solid #cbd8d7;
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.directory-band {
    margin-right: calc((100vw - min(1120px, calc(100vw - 40px))) / -2);
    margin-left: calc((100vw - min(1120px, calc(100vw - 40px))) / -2);
    padding-right: calc((100vw - min(1120px, calc(100vw - 40px))) / 2);
    padding-left: calc((100vw - min(1120px, calc(100vw - 40px))) / 2);
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.listings-grid {
    gap: .9rem;
}

.listing-card {
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(16, 33, 42, .06);
    width: calc(100% - 20px);
    align-self: flex-start;
}

.listing-card.premium {
    border-width: 1px;
    border-color: #d7c08d;
    background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
    box-shadow: 0 18px 38px rgba(113, 87, 38, .12);
    width: calc(100% - 10px);
}

.listing-card.town-sponsor {
    border-width: 1px;
    border-color: #2d6a74;
    background:
        radial-gradient(circle at top right, rgba(214, 189, 122, .34), transparent 30%),
        linear-gradient(90deg, rgba(15, 105, 120, .08), rgba(15, 105, 120, 0) 22%),
        linear-gradient(180deg, #f9fffe 0%, #fff 100%);
    box-shadow: 0 28px 54px rgba(18, 72, 82, .2);
    width: 100%;
    outline: 2px solid rgba(15, 105, 120, .12);
    outline-offset: 0;
}

.premium-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #eadfca;
}

.town-sponsor-header {
    border-bottom-color: #c9d9dc;
    position: relative;
}

.premium-badge {
    position: static;
    align-self: flex-start;
    width: max-content;
    padding: .4rem .75rem;
    color: #5c4315;
    background: #f3e6bf;
    border: 1px solid #e4cf95;
    font-size: .76rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.town-sponsor-badge {
    color: #fff;
    background: linear-gradient(135deg, #0f6978 0%, #174e57 100%);
    border-color: #174e57;
    box-shadow: 0 10px 22px rgba(15, 105, 120, .18);
}

.premium-proof {
    color: #7a6541;
    font-size: .82rem;
    font-weight: 780;
}

.town-sponsor-proof {
    color: #28545c;
    font-size: .86rem;
}

.listing-content {
    gap: 1.15rem;
}

.listing-content-with-priority-logo {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    align-items: stretch;
}

.listing-logo-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 1rem 0 1rem 1rem;
    border-left: 1px solid rgba(19, 55, 62, .08);
}

.listing-logo-priority {
    width: 100%;
    max-width: 220px;
    height: auto;
    max-height: 140px;
}

.listing-info h3 {
    margin-bottom: .55rem;
    font-size: 1.35rem;
}

.listing-card.premium .listing-info h3 {
    margin-bottom: .7rem;
    font-size: clamp(1.55rem, 2vw, 1.85rem);
    line-height: 1.1;
}

.listing-card.town-sponsor .listing-info h3 {
    margin-bottom: .7rem;
    font-size: clamp(1.8rem, 2.35vw, 2.1rem);
    line-height: 1.08;
}

.listing-description {
    color: #465d66;
}

.listing-description-featured {
    max-width: 70ch;
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: .75rem;
}

.listing-location {
    color: var(--text-light);
    font-size: .9rem;
}

.listing-location span {
    margin-left: .35rem;
}

.listing-feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    margin-bottom: .85rem;
}

.listing-feature-highlights span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .8rem;
    border: 1px solid #eadfca;
    border-radius: 999px;
    background: #fff8e8;
    color: #694e1e;
    font-size: .82rem;
    font-weight: 780;
}

.listing-feature-highlight-button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .8rem;
    border: 1px solid #eadfca;
    border-radius: 999px;
    background: #fff8e8;
    color: #694e1e;
    font: inherit;
    font-size: .82rem;
    font-weight: 780;
    cursor: pointer;
}

.listing-feature-highlight-button:hover,
.listing-feature-highlight-button:focus-visible {
    color: #5a4319;
    text-decoration: none;
}

.listing-card.town-sponsor .listing-feature-highlights span {
    border-color: #c6d8dc;
    background: #eef7f8;
    color: #174d56;
}

.listing-card.town-sponsor .listing-feature-highlight-button {
    border-color: #c6d8dc;
    background: #eef7f8;
    color: #174d56;
}

.listing-card.premium .service-tag {
    background: #f6efe0;
    color: #5b4c32;
}

.listing-card.town-sponsor .service-tag {
    background: #ebf5f7;
    color: #24545d;
}

.listing-card.premium .listing-actions {
    margin-top: .35rem;
    border-top-color: #eadfca;
}

.listing-card.town-sponsor .listing-actions {
    margin-top: .35rem;
    border-top-color: #d3e0e3;
}

.listing-card.town-sponsor::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    border-radius: var(--radius) 0 0 var(--radius);
    background: linear-gradient(180deg, #0f6978 0%, #d6bd7a 100%);
}

.listing-actions {
    border-color: var(--border);
}

.listing-actions .btn {
    min-width: 150px;
}

.listing-phone {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 1rem;
    color: var(--primary);
    font-weight: 800;
}

.town-sponsor-cta-wrap {
    margin-top: 1.5rem;
}

.town-sponsor-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.85rem 1.25rem;
    font-size: .98rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 16px 34px rgba(7, 95, 115, .18);
    background: linear-gradient(135deg, #0f6978 0%, #174e57 100%);
    border: 1px solid #174e57;
}

.star {
    color: var(--accent);
}

.star-empty {
    color: #d8dfde;
}

.rating-value,
.rating-count {
    color: var(--text-light);
}

.contact-line {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: .65rem;
    padding: .75rem 0;
    border-top: 1px solid var(--border);
    color: #314952;
    font-size: .9rem;
    font-weight: 760;
}

.contact-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    cursor: pointer;
}

.contact-action:hover,
.contact-action:focus-visible {
    color: var(--primary);
    text-decoration: underline;
}

.listing-editor-page {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.listing-editor-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.listing-editor-card,
.listing-editor-panel {
    margin: 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(16, 33, 42, .08);
}

.listing-editor-card {
    min-width: 0;
}

.listing-editor-card--wide,
.listing-editor-panel--full,
.listing-editor-actions {
    grid-column: 1 / -1;
}

.listing-editor-card legend {
    padding: 0 .45rem;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
}

.listing-editor-card details.form-group {
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdfd, #f3f8f7);
}

.listing-editor-actions {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(16, 33, 42, .08);
}

@media (max-width: 900px) {
    .listing-editor-form {
        grid-template-columns: 1fr;
    }
}

.contact-line address {
    display: grid;
    gap: .15rem;
    margin: 0;
    font-style: normal;
}

.contact-postcode {
    white-space: nowrap;
}

.contact-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--primary);
    background: var(--bg-light);
    border-radius: var(--radius);
    font-weight: 900;
}

.panel-actions {
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
}

.listing-rating-large {
    color: rgba(255, 255, 255, .9);
    font-weight: 760;
}

.listing-logo-large {
    width: 110px;
    height: 110px;
    padding: .75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.service-card-grid {
    grid-template-columns: repeat(3, 1fr);
}

.info-card {
    padding: 1.125rem;
}

.info-card strong {
    display: block;
    margin-bottom: .5rem;
    font-size: 1.1rem;
}

.info-card p {
    margin: 0;
    color: var(--text-light);
}

.faq-section {
    background: transparent;
    margin: 0;
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
    max-width: none;
}

.faq-item {
    margin: 0;
    border: 1px solid var(--border);
    box-shadow: none;
}

.nearby-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .8rem;
}

.nearby-card {
    display: block;
    min-height: 94px;
    padding: 1rem;
    background: var(--bg-light);
}

.nearby-card span {
    display: block;
    color: var(--text-light);
    font-size: .82rem;
    font-weight: 760;
}

.nearby-card strong {
    display: block;
    margin-top: .3rem;
    color: var(--text);
    font-size: 1.1rem;
}

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.75rem;
    align-items: start;
}

.review-list {
    display: grid;
    gap: .8rem;
    margin: 0;
}

.review {
    padding: 1.125rem;
    border-bottom: 1px solid var(--border);
}

.review:last-child {
    border-bottom: 1px solid var(--border);
}

.review-form {
    margin-top: 0;
    background: #f4f7f6;
}

.review-form-reply {
    padding: 1rem;
    background: #fff;
    box-shadow: none;
}

.review-form .btn {
    margin-top: .5rem;
}

.form-group input,
.form-group textarea {
    border-color: #cbd8d7;
}

.related-listings {
    margin-top: 0;
    border-top: 0;
}

.site-footer {
    margin-top: 0;
    background: #15272d;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
}

.footer-powered {
    color: rgba(217, 229, 226, .78);
    font-size: .86rem;
    font-weight: 700;
}

.footer-powered:hover {
    color: #fff;
    text-decoration: none;
}

.copyright {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 1rem 0 0;
    color: #d9e5e2;
    font-size: .92rem;
}

.copyright-separator {
    color: rgba(217, 229, 226, .55);
}

.footer-cta .btn {
    white-space: nowrap;
}

.marketing-hero {
    padding: 4.5rem 0 2rem;
    background:
        radial-gradient(circle at top right, rgba(206, 228, 223, .72), transparent 38%),
        linear-gradient(135deg, #f7f4ec 0%, #fbfaf6 55%, #eef5f3 100%);
    border-bottom: 1px solid rgba(16, 33, 42, .08);
}

.marketing-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
    gap: 1.5rem;
    align-items: end;
}

.marketing-hero__copy {
    max-width: 780px;
}

.marketing-hero__copy p {
    max-width: 60ch;
    font-size: 1.08rem;
    color: #425961;
}

.marketing-hero__cta {
    display: grid;
    gap: .75rem;
    padding: 1.25rem;
    border: 1px solid rgba(16, 33, 42, .08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 18px 40px rgba(21, 50, 58, .08);
}

.marketing-hero__cta strong {
    font-size: 1.05rem;
    color: var(--text);
}

.marketing-hero__cta p {
    margin: 0;
    color: #58707a;
}

.marketing-page {
    padding: 2rem 0 4rem;
}

.marketing-content {
    display: grid;
    gap: 1rem;
}

.marketing-content p,
.marketing-content li {
    color: #425961;
    font-size: 1.05rem;
}

.marketing-content h2 {
    margin-top: 1.4rem;
    font-size: clamp(1.8rem, 3.4vw, 2.35rem);
}

.marketing-content h3 {
    margin-top: 1rem;
    font-size: 1.3rem;
}

.marketing-content hr {
    border: 0;
    border-top: 1px solid rgba(16, 33, 42, .1);
    margin: 1rem 0;
}

.marketing-content table {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    overflow-x: auto;
}

.marketing-content th,
.marketing-content td {
    padding: .85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.marketing-content th {
    background: #f4f7f6;
    color: var(--text);
}

.marketing-content tr:last-child td {
    border-bottom: 0;
}

.marketing-content blockquote {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--primary);
    background: #f6fbf9;
    color: #40606b;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.crm-expand {
    border: 1px solid rgba(16, 33, 42, .12);
    border-radius: var(--radius);
    background: #fbfcfc;
    overflow: hidden;
    margin: .75rem 0 1rem;
}

.crm-expand summary {
    cursor: pointer;
    padding: 1rem 1.1rem;
    font-weight: 700;
    color: var(--text);
    list-style: none;
}

.crm-expand summary::-webkit-details-marker {
    display: none;
}

.crm-expand__body {
    padding: 0 1.1rem 1rem;
}

.crm-tabs {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
}

.crm-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.crm-tabs__button {
    border: 1px solid rgba(16, 33, 42, .14);
    border-radius: 999px;
    background: #fff;
    color: #4a626b;
    padding: .7rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.crm-tabs__button.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.crm-tabs__panels {
    border: 1px solid rgba(16, 33, 42, .1);
    border-radius: var(--radius);
    background: #fff;
    padding: 1.1rem 1.2rem;
}

.crm-tabs__panel[hidden] {
    display: none !important;
}

.crm-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
}

.crm-card-grid--left {
    justify-content: flex-start;
}

.crm-card-grid--center {
    justify-content: center;
}

.crm-card-grid--right {
    justify-content: flex-end;
}

.crm-card {
    flex: 0 1 320px;
    width: min(100%, 320px);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
    border: 1px solid rgba(16, 33, 42, .12);
    border-radius: var(--radius);
    box-shadow: 0 14px 28px rgba(17, 35, 43, .08);
    padding: 1.15rem;
}

.crm-card h3 {
    margin: 0 0 .65rem;
    font-size: 1.15rem;
}

.crm-card__body > :first-child {
    margin-top: 0;
}

.crm-card__body > :last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .home-hero-inner,
    .town-hero-inner,
    .listing-hero-inner,
    .chooser-panel,
    .town-intro-layout,
    .profile-about-layout,
    .profile-meta-layout,
    .review-layout {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .contact-panel {
        max-width: 560px;
    }

    .town-grid,
    .service-card-grid,
    .nearby-list,
    .faq-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-nav {
        position: static;
    }

    .firm-directory-item,
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .marketing-hero__inner {
        grid-template-columns: 1fr;
    }

    .crm-card {
        flex-basis: 100%;
        width: 100%;
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .firm-directory-meta {
        justify-items: start;
        text-align: left;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, 1120px);
    }

    .nav-container {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links a:first-child {
        display: none;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }

    h1 {
        font-size: 2.75rem;
    }

    .home-hero-inner,
    .town-hero-inner,
    .listing-hero-inner {
        min-height: 0;
        padding: 2.75rem 0 4.75rem;
    }

    .search-wrapper,
    .panel-stats,
    .hero-stat-row,
    .town-grid,
    .service-choice-grid,
    .guide-card-grid,
    .service-card-grid,
    .nearby-list,
    .faq-list {
        grid-template-columns: 1fr;
    }

    .county-carousel-shell {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .search-wrapper {
        display: grid;
    }

    .hero-stat-areas {
        grid-column: auto;
    }

    .county-carousel-shell {
        gap: .5rem;
    }

    .search-wrapper .btn {
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .town-card.wide {
        grid-column: auto;
    }

    .section-head,
    .footer-content,
    .review-header {
        display: block;
    }

    .listing-content {
        display: block;
    }

    .listing-logo {
        margin-bottom: .75rem;
    }

    .listing-actions .btn {
        width: 100%;
    }

    .directory-band {
        margin-right: calc((100vw - min(100vw - 28px, 1120px)) / -2);
        margin-left: calc((100vw - min(100vw - 28px, 1120px)) / -2);
        padding-right: calc((100vw - min(100vw - 28px, 1120px)) / 2);
        padding-left: calc((100vw - min(100vw - 28px, 1120px)) / 2);
    }

    .review-replies .review {
        margin-left: .5rem;
    }
}
