:root {
    --ink: #15231e;
    --ink-soft: #45534d;
    --paper: #f4f1e9;
    --surface: #fffdf8;
    --surface-deep: #ebe5d8;
    --green: #155b45;
    --green-dark: #0d4635;
    --lime: #dce97e;
    --red: #b42318;
    --red-soft: #fff0ed;
    --line: #d8d1c3;
    --shadow: 0 18px 50px rgba(27, 43, 36, .10);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}
a { color: var(--green); }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 {
    margin-bottom: 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: .96;
}
h2 { margin-bottom: 8px; font-size: 1.35rem; line-height: 1.2; }
h3 { margin-bottom: 6px; }

.site-header {
    min-height: 78px;
    padding: 14px clamp(20px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 241, 233, .94);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    line-height: 1.05;
}
.brand small {
    display: block;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 50% 12px;
    color: white;
    background: var(--green);
    font-family: Georgia, serif;
    font-size: 1.5rem;
}
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav > a:not(.button) {
    color: var(--ink);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 700;
}
.inline-form { display: inline; margin: 0; }

.button {
    min-height: 46px;
    padding: 11px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 999px;
    color: white;
    background: var(--green);
    box-shadow: none;
    text-decoration: none;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease;
}
.button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-small { min-height: 38px; padding: 7px 16px; font-size: .9rem; }
.button-wide { width: 100%; }
.button-ghost { color: var(--green); background: transparent; }
.button-ghost:hover { color: white; }
.button-light { color: var(--red); background: white; border-color: white; }
.button-danger { background: var(--red); border-color: var(--red); }
.text-button {
    padding: 0;
    border: 0;
    color: var(--red);
    background: transparent;
    text-decoration: underline;
}

.map-hero {
    min-height: calc(100vh - 78px);
    padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 64px);
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.28fr);
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
}
.hero-copy { max-width: 570px; }
.hero-text { max-width: 520px; color: var(--ink-soft); font-size: 1.08rem; }
.eyebrow {
    margin-bottom: 14px;
    color: var(--green);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.privacy-note { max-width: 240px; color: var(--ink-soft); font-size: .82rem; }
.map-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
#member-map { height: min(67vh, 700px); min-height: 520px; background: #dfe6dc; }
.map-search { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.map-search > label { display: block; margin-bottom: 8px; font-weight: 850; }
.map-search p { margin: 8px 0 0; color: var(--ink-soft); font-size: .78rem; }
.search-row { display: flex; gap: 9px; }
.search-row input { flex: 1; min-width: 0; }
.map-status {
    min-height: 54px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--ink-soft);
    font-size: .8rem;
}
.legend-dot { width: 11px; height: 11px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--green); }
.postal-marker-wrap { background: none; border: 0; }
.postal-marker {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    position: relative;
    border: 3px solid white;
    border-radius: 50%;
    color: white;
    background: var(--green);
    box-shadow: 0 7px 20px rgba(10, 55, 41, .32);
    font-weight: 900;
}
.postal-marker::before {
    content: "";
    width: 9px;
    height: 9px;
    position: absolute;
    right: 1px;
    bottom: 1px;
    z-index: -1;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    background: var(--green);
    transform: rotate(45deg);
}
.map-popup strong { display: block; margin-bottom: 5px; font-size: .95rem; }
.map-popup p { margin-bottom: 8px; }
.map-popup-list { display: grid; gap: 5px; }
.map-popup-list a, .map-popup > a { font-weight: 750; }

.feature-strip {
    padding: 30px clamp(20px, 4vw, 64px) 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}
.feature-strip article {
    min-height: 150px;
    padding: 28px;
    display: flex;
    gap: 20px;
    background: var(--surface-deep);
}
.feature-strip article:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.feature-strip article:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.feature-strip article > span { color: var(--green); font-weight: 900; }
.feature-strip p { margin: 0; color: var(--ink-soft); }

.flash-stack {
    width: min(620px, calc(100% - 32px));
    position: fixed;
    top: 92px;
    left: 50%;
    z-index: 2000;
    transform: translateX(-50%);
}
.flash { margin-bottom: 8px; padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow); background: white; font-weight: 700; }
.flash-success { border-left: 5px solid var(--green); }
.flash-error { border-left: 5px solid var(--red); }
.flash-info { border-left: 5px solid #4169a1; }

.auth-shell {
    width: min(1100px, calc(100% - 40px));
    min-height: calc(100vh - 180px);
    margin: 50px auto;
    display: grid;
    grid-template-columns: 1fr .8fr;
    overflow: hidden;
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.auth-shell.compact { width: min(650px, calc(100% - 40px)); display: block; }
.auth-card { padding: clamp(36px, 7vw, 90px); }
.auth-card h1 { font-size: clamp(2.7rem, 6vw, 4.7rem); }
.auth-aside {
    padding: clamp(36px, 6vw, 76px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    background: var(--green);
}
.auth-aside .quote { font-family: Georgia, serif; font-size: 2rem; line-height: 1.25; }
.auth-aside li { margin-bottom: 12px; }
.stack-form { display: grid; gap: 10px; margin-top: 28px; }
label { font-size: .88rem; font-weight: 800; }
input, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c7c0b3;
    border-radius: 10px;
    color: var(--ink);
    background: white;
    outline: none;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(21, 91, 69, .12); }
textarea { resize: vertical; }
input:disabled { color: var(--ink-soft); background: #eeeae2; }
.select2-container { max-width: 100%; }
.select2-container--default .select2-selection--single {
    height: 48px;
    border: 1px solid #c7c0b3;
    border-radius: 10px;
    background: white;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 9px 42px 9px 14px;
    color: var(--ink);
    line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    width: 38px;
    height: 46px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(21, 91, 69, .12);
}
.select2-dropdown {
    overflow: hidden;
    border-color: #c7c0b3;
    border-radius: 10px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: #c7c0b3;
    border-radius: 7px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    color: white;
    background: var(--green);
}
.code-input { text-align: center; font-size: 2rem; font-weight: 900; letter-spacing: .3em; }
.fine-print, .hint { color: var(--ink-soft); font-size: .78rem; }
.fine-print { margin-top: 20px; }
.text-link, .back-link { display: inline-block; margin-top: 20px; font-weight: 750; }

.page-heading {
    width: min(1180px, calc(100% - 40px));
    margin: 55px auto 34px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
}
.page-heading h1 { margin-bottom: 10px; font-size: clamp(3rem, 7vw, 5.8rem); }
.page-heading p { margin-bottom: 0; }
.profile-meta { min-width: 240px; padding: 18px; display: grid; gap: 5px; border-left: 3px solid var(--lime); font-size: .85rem; }
.critical-warning {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 26px;
    padding: clamp(22px, 4vw, 34px);
    display: grid;
    gap: 8px;
    border: 3px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    background: var(--red-soft);
}
.critical-warning > strong { font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1; text-transform: uppercase; }
.critical-warning form { margin-top: 10px; }
.profile-form { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.form-card {
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: 86px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.section-number {
    padding-top: 30px;
    color: var(--green);
    background: var(--surface-deep);
    text-align: center;
    font-weight: 900;
}
.section-content { min-width: 0; padding: clamp(24px, 4vw, 42px); }
.section-title { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.section-title p { margin-bottom: 0; color: var(--ink-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 600; }
.check input { width: 18px; height: 18px; flex: 0 0 auto; }
.check-danger { color: var(--red); }
.required { color: var(--red); }
.photo-field { margin-top: 28px; padding-top: 28px; display: flex; gap: 22px; border-top: 1px solid var(--line); }
.photo-field img { width: 110px; height: 110px; object-fit: cover; border-radius: 14px; }
.photo-field > div { flex: 1; display: grid; gap: 8px; }
.vehicle-editor-list { display: grid; gap: 14px; }
.vehicle-editor {
    padding: 20px;
    display: grid;
    grid-template-columns: 150px 1fr 1.5fr;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #faf7f0;
}
.vehicle-editor > img { width: 150px; height: 120px; grid-row: span 2; object-fit: cover; border-radius: 10px; }
.vehicle-model-field,
.vehicle-details-field { grid-column: 1 / -1; }
.vehicle-editor.has-vehicle-photo .vehicle-model-field,
.vehicle-editor.has-vehicle-photo .vehicle-details-field { grid-column: 2 / -1; }
.sticky-save {
    margin: 22px 0;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: sticky;
    bottom: 14px;
    z-index: 500;
    border-radius: 999px;
    color: white;
    background: var(--ink);
    box-shadow: var(--shadow);
}
.sticky-save .button { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.danger-zone {
    width: min(1180px, calc(100% - 40px));
    margin: 40px auto 80px;
    padding: 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    border: 1px solid #e0aaa4;
    border-radius: var(--radius);
    background: var(--red-soft);
}
.danger-zone p { margin: 0; }

.profile-hero {
    width: min(1120px, calc(100% - 40px));
    margin: 55px auto 26px;
    padding: clamp(28px, 6vw, 64px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    border-radius: 28px;
    background: var(--surface);
}
.profile-hero h1 { margin-bottom: 12px; }
.profile-photo, .profile-placeholder {
    width: clamp(160px, 24vw, 270px);
    aspect-ratio: 1;
    flex: 0 0 auto;
    border-radius: 50% 50% 50% 18%;
    object-fit: cover;
}
.profile-placeholder { display: grid; place-items: center; color: white; background: var(--green); font-family: Georgia, serif; font-size: 7rem; }
.contact-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-tags a { padding: 7px 12px; border-radius: 99px; background: var(--surface-deep); font-size: .85rem; font-weight: 700; }
.profile-layout {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto 70px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.profile-main { display: grid; gap: 24px; }
.content-card, .contact-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); }
.contact-card { position: sticky; top: 100px; box-shadow: var(--shadow); }
.vehicle-gallery { display: grid; gap: 14px; }
.vehicle-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.vehicle-card img { width: 180px; height: 145px; object-fit: cover; }
.vehicle-card div { padding: 20px; }
.vehicle-card p { margin: 0; }
.search-offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.accent-card { color: white; background: var(--green); }
.accent-card .eyebrow { color: var(--lime); }
.muted { color: var(--ink-soft); }

.empty-state { min-height: 65vh; padding: 80px 20px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.error-code { color: var(--green); font-size: 1rem; font-weight: 900; letter-spacing: .2em; }
.site-footer {
    padding: 30px clamp(20px, 4vw, 64px);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .78rem;
}
.site-footer p { margin: 0; }

@media (max-width: 980px) {
    .map-hero { grid-template-columns: 1fr; }
    .hero-copy { max-width: 720px; }
    #member-map { min-height: 500px; }
    .feature-strip { grid-template-columns: 1fr; }
    .feature-strip article:first-child { border-radius: var(--radius) var(--radius) 0 0; }
    .feature-strip article:last-child { border-radius: 0 0 var(--radius) var(--radius); }
    .vehicle-editor { grid-template-columns: 1fr 1fr; }
    .vehicle-editor > img { grid-column: 1 / -1; }
    .vehicle-editor.has-vehicle-photo .vehicle-model-field,
    .vehicle-editor.has-vehicle-photo .vehicle-details-field { grid-column: 1 / -1; }
    .profile-layout { grid-template-columns: 1fr; }
    .contact-card { position: static; }
}

@media (max-width: 700px) {
    .site-header { align-items: flex-start; }
    .site-header nav { gap: 10px; }
    .site-header nav > a:not(.button) { display: none; }
    .brand small { display: none; }
    .map-hero { padding-top: 38px; }
    #member-map { min-height: 430px; }
    .search-row { flex-wrap: wrap; }
    .search-row input { flex-basis: 100%; }
    .map-status { align-items: flex-start; flex-direction: column; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .page-heading { align-items: start; flex-direction: column; }
    .profile-meta { width: 100%; }
    .form-card { grid-template-columns: 1fr; }
    .section-number { padding: 11px 20px; text-align: left; }
    .form-grid, .search-offer-grid, .danger-zone { grid-template-columns: 1fr; }
    .vehicle-editor { grid-template-columns: 1fr; }
    .vehicle-editor > img { grid-column: auto; }
    .section-title { flex-direction: column; }
    .sticky-save { border-radius: 16px; }
    .sticky-save span { display: none; }
    .sticky-save .button { width: 100%; }
    .profile-hero { align-items: flex-start; flex-direction: column-reverse; }
    .profile-photo, .profile-placeholder { width: 150px; }
    .vehicle-card { grid-template-columns: 1fr; }
    .vehicle-card img { width: 100%; height: 220px; }
    .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
