:root {
    color-scheme: light;
    --ink: #1f2428;
    --muted: #66727f;
    --line: #d9dee5;
    --paper: #ffffff;
    --soft: #f4f6f8;
    --accent: #176a5b;
    --accent-dark: #104d43;
    --gold: #b9852b;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
    overflow-x: hidden;
    overflow-y: scroll;
}

body > main {
    flex: 1 0 auto;
}

body > .site-footer {
    flex-shrink: 0;
}

img {
    max-width: 100%;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px clamp(18px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
}

.cm-navbar {
    z-index: 20;
    min-height: 72px;
    border-bottom: 1px solid rgba(16, 45, 52, 0.14);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 248, 0.96)),
        var(--paper);
    box-shadow: 0 10px 28px rgba(16, 45, 52, 0.08);
}

.cm-navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.cm-navbar-logo {
    display: block;
    width: auto;
    height: 30px;
    object-fit: contain;
}

@media (min-width: 992px) {
    .cm-navbar .navbar-collapse {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 18px;
    }

    .cm-navbar-categories {
        grid-column: 2;
        justify-content: center;
    }

    .cm-navbar-actions {
        grid-column: 3;
        justify-content: flex-end;
    }
}

.cm-navbar .nav-link {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-inline: 12px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 700;
}

.cm-navbar .nav-link:hover,
.cm-navbar .nav-link:focus,
.cm-navbar .nav-link.active {
    background: #eaf5f2;
    color: var(--accent-dark);
}

.cm-nav-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}

.cm-nav-btn:hover,
.cm-nav-btn:focus {
    background: var(--accent-dark);
    color: #fff;
}

.cm-message-link .badge {
    transform: translateY(-1px);
}

.cm-navbar-toggler {
    border-color: var(--line);
    border-radius: 8px;
}

.cm-navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(23, 106, 91, 0.18);
}

.topnav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.brand {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.home-page {
    background:
        radial-gradient(circle at top left, rgba(23, 106, 91, 0.10), transparent 34rem),
        linear-gradient(180deg, #f9fbfa 0%, var(--soft) 52%, #eef2f1 100%);
}

.hero {
    min-height: 500px;
    display: grid;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(11, 20, 24, 0.92), rgba(16, 77, 67, 0.72) 45%, rgba(11, 20, 24, 0.28)),
        url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1800&q=80') center/cover;
}

.home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: clamp(28px, 6vw, 72px);
    padding: clamp(64px, 8vw, 106px) clamp(18px, 5vw, 76px);
}

.home-hero-copy {
    max-width: 820px;
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.94;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 670px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.secondary-link:hover {
    color: #d9f0ea;
    text-decoration: underline;
}

.hero-card {
    align-self: stretch;
    display: grid;
    align-content: space-between;
    gap: 18px;
    min-height: 340px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
        rgba(255, 255, 255, 0.10);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

.hero-card-top {
    display: grid;
    gap: 10px;
}

.hero-card-top strong {
    color: #fff;
    font-size: 16px;
}

.hero-card-top p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
}

.hero-card-kicker {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.09);
}

.hero-card-metrics span {
    display: grid;
    gap: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.hero-card-metrics strong {
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.hero-card-main {
    display: grid;
    gap: 16px;
}

.hero-card h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-card li {
    position: relative;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ed6be;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    max-width: 1180px;
    margin: -44px auto 0;
    padding: 0 clamp(18px, 4vw, 28px);
    position: relative;
    z-index: 2;
}

.home-stats article {
    display: grid;
    gap: 4px;
    padding: 22px;
    border: 1px solid rgba(217, 222, 229, 0.92);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(16, 45, 52, 0.08);
}

.home-stats article:first-child {
    border-radius: 18px 0 0 18px;
}

.home-stats article:last-child {
    border-radius: 0 18px 18px 0;
}

.home-stats strong {
    color: var(--accent-dark);
    font-size: 28px;
    line-height: 1;
}

.home-stats span {
    color: var(--muted);
    font-size: 14px;
}

.eyebrow,
.tag {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.category-panel,
.listings-section {
    max-width: 1180px;
    margin: 28px auto 0;
    padding: 0 clamp(18px, 4vw, 28px);
}

.category-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
    align-items: end;
    gap: 24px;
}

.section-heading {
    display: grid;
    gap: 7px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    overflow-x: auto;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.toolbar::-webkit-scrollbar {
    display: none;
}

.filter,
.primary-btn {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.filter {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(16, 45, 52, 0.05);
}

.filter.active,
.primary-btn {
    background: var(--accent);
    color: #fff;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.primary-btn:hover,
.filter.active:hover {
    background: var(--accent-dark);
}

.filter:hover {
    border-color: rgba(23, 106, 91, 0.35);
    color: var(--accent-dark);
}

.secondary-btn {
    background: var(--ink);
}

.secondary-btn:hover {
    background: #111820;
}

.nav-message-link {
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.text-bg-danger {
    background: #dc3545;
    color: #fff;
}

.listings-heading {
    max-width: 680px;
    margin-bottom: 18px;
}

.listings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 0 68px;
}

.listing-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 18px 48px rgba(16, 45, 52, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 106, 91, 0.25);
    box-shadow: 0 24px 70px rgba(16, 45, 52, 0.13);
}

.listing-row {
    display: grid;
    grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
}

.listing-media {
    display: block;
    min-height: 100%;
    background: #26343a;
}

.listing-card img,
.placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.listing-row > .listing-media img,
.listing-row > .listing-media .placeholder {
    height: 100%;
    min-height: 220px;
    aspect-ratio: auto;
}

.listing-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    background: var(--paper);
}

.listing-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
}

.placeholder {
    display: grid;
    place-items: center;
    background: #26343a;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.listing-body {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 22px;
}

.listing-body h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.listing-body p {
    margin: 0;
    color: var(--muted);
}

.listing-body strong {
    color: var(--accent-dark);
    font-size: 24px;
}

.description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.listing-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

.text-link:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #b42318;
    border-radius: 8px;
    background: #fff;
    color: #b42318;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.danger-btn:hover {
    background: #b42318;
    color: #fff;
}

.delete-listing-form {
    margin: 0;
}

.detail-page {
    padding: 32px clamp(18px, 4vw, 56px) 56px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
}

.detail-gallery {
    display: grid;
    gap: 8px;
    align-content: start;
}

.detail-gallery img,
.detail-gallery .placeholder {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.detail-main-image {
    display: block;
}

.detail-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.detail-thumb {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.detail-thumb.active {
    border-color: var(--accent);
}

.detail-thumb img {
    display: block;
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.detail-panel {
    align-self: start;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.detail-panel h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.1;
}

.breadcrumb-trail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb-trail a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.breadcrumb-trail a:hover {
    text-decoration: underline;
}

.detail-price {
    display: block;
    margin: 16px 0;
    font-size: 28px;
}

.detail-meta {
    display: grid;
    gap: 8px;
    margin: 18px 0;
    color: var(--muted);
}

.listing-map {
    display: grid;
    gap: 10px;
    margin: 20px 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.listing-map-head {
    display: grid;
    gap: 4px;
}

.listing-map h2 {
    margin: 0;
    font-size: 20px;
}

.listing-map-head span {
    color: var(--muted);
}

.listing-map-frame {
    display: grid;
    gap: 8px;
}

.listing-map-frame iframe {
    width: 100%;
    height: 260px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.listing-map-frame p {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: var(--soft);
}

.spec-list {
    margin: 22px 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.spec-list h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.spec-list dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.spec-list div {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1fr);
    gap: 10px;
}

.spec-list dt {
    color: var(--muted);
    font-weight: 700;
}

.spec-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.seo-intro,
.seo-listing-content {
    display: grid;
    gap: 10px;
    margin: 24px clamp(18px, 4vw, 56px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.seo-intro {
    grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    max-width: 1180px;
    margin: 34px auto 0;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(16, 45, 52, 0.07);
}

.seo-intro h2,
.seo-listing-content h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.seo-intro p,
.seo-listing-content p {
    margin: 0;
    color: var(--muted);
}

.seo-intro-text {
    display: grid;
    gap: 12px;
    font-size: 16px;
    line-height: 1.7;
}

.seo-listing-content {
    margin: 22px 0;
    background: var(--soft);
}

.seo-listing-content ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.empty {
    grid-column: 1 / -1;
    padding: 32px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--paper);
    text-align: center;
}

.publish-section {
    scroll-margin-top: 82px;
    padding: 32px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.publish-page {
    min-height: calc(100vh - 75px);
    display: grid;
    align-items: start;
    padding-top: 48px;
}

.listing-form {
    display: grid;
    gap: 14px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-head h1,
.form-head h2 {
    margin: 0;
    font-size: 28px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.terms-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: min(100%, 720px);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.secure-card-form .terms-check {
    margin: 10px 0 18px;
    padding-bottom: 4px;
}

.terms-check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--accent);
}

.terms-check a {
    color: var(--accent-dark);
}

.upload-field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
}

.upload-btn input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-field p {
    margin: 0;
    font-weight: 400;
}

input,
select,
textarea {
    min-width: 0;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    font: inherit;
}

input,
textarea {
    overflow-wrap: anywhere;
}

textarea {
    resize: vertical;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.wide {
    width: 100%;
}

.payment-note,
.form-message {
    margin: 0;
    color: var(--muted);
}

.vehicle-details-section {
    display: grid;
    gap: 18px;
    width: 100%;
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.vehicle-detail-set {
    display: none;
    gap: 16px;
    width: 100%;
}

.vehicle-detail-set.active {
    display: grid;
}

.detail-group {
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafbfc;
}

.detail-group.variant-hidden {
    display: none;
}

.detail-group h3 {
    margin: 0;
    font-size: 18px;
}

.input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.input-unit input {
    border-radius: 8px 0 0 8px;
}

.input-unit span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: var(--soft);
    color: var(--muted);
}

.detail-checkbox {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
}

.detail-checkbox input {
    width: auto;
}

.message-page {
    min-height: 100vh;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 14px;
    padding: 32px;
}

.auth-page,
.account-page {
    padding: 32px clamp(18px, 4vw, 56px) 56px;
}

.auth-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 980px;
    margin: 0 auto;
}

.auth-layout-single {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
}

.auth-form {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.auth-form label,
.auth-form .primary-btn {
    max-width: 520px;
}

.auth-form h1,
.account-head h1 {
    margin: 0;
}

.account-email {
    margin: 6px 0 0;
    color: var(--muted);
}

.auth-error {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.auth-success {
    border-color: #b7d4cc;
    background: #eaf5f2;
    color: var(--accent-dark);
}

.password-help {
    max-width: 520px;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.auth-help-link {
    max-width: 520px;
    margin: -4px 0 0;
    font-size: 14px;
}

.auth-help-link a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.auth-help-link a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    max-width: 520px;
}

.password-field input {
    border-radius: 8px 0 0 8px;
}

.password-field button {
    display: inline-grid;
    place-items: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: var(--soft);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.password-field button:hover,
.password-field button.is-visible {
    background: #eaf5f2;
    color: var(--accent-dark);
}

.contact-page {
    padding: 42px clamp(18px, 4vw, 56px) 64px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.78fr);
    align-items: start;
    gap: clamp(24px, 5vw, 54px);
    max-width: 1080px;
    margin: 0 auto;
}

.contact-intro,
.contact-form {
    display: grid;
    align-content: start;
    gap: 14px;
}

.contact-intro {
    position: sticky;
    top: 104px;
    padding: 8px 0;
}

.contact-intro h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 0.98;
}

.contact-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.contact-points {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.contact-points div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.62);
}

.contact-points strong {
    color: var(--ink);
}

.contact-points span {
    color: var(--muted);
    font-size: 14px;
}

.contact-form {
    gap: 16px;
    padding: clamp(22px, 4vw, 30px);
    border: 1px solid rgba(23, 106, 91, 0.18);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 22px 60px rgba(16, 45, 52, 0.10);
}

.contact-form-head {
    display: grid;
    gap: 4px;
    padding-bottom: 4px;
}

.contact-form-head strong {
    font-size: 20px;
}

.contact-form-head span {
    color: var(--muted);
    font-size: 14px;
}

.contact-form .primary-btn {
    width: fit-content;
    min-width: 190px;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form input,
.contact-form textarea {
    background: #fff;
}

.contact-message {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.contact-message.success {
    border-color: #b7d4cc;
    background: #eaf5f2;
    color: var(--accent-dark);
}

.contact-message.error {
    border-color: #f0c6c6;
    background: #fff4f4;
    color: #9b2c2c;
}

.account-head {
    max-width: 1100px;
    margin: 0 auto 24px;
}

.connect-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.connect-box > div {
    display: grid;
    gap: 4px;
}

.connect-box span {
    color: var(--muted);
}

.seller-bank-form,
.secure-card-form {
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.seller-bank-form {
    margin-top: 12px;
}

.seller-bank-form .primary-btn,
.secure-card-form .primary-btn {
    width: fit-content;
}

.secure-form-head {
    display: grid;
    gap: 4px;
}

.secure-form-head span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

.account-notice {
    margin-top: 12px;
    color: var(--accent);
    font-weight: 700;
}

.account-page > section {
    max-width: 1100px;
    margin-inline: auto;
}

.account-list {
    display: grid;
    gap: 12px;
}

.transaction-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.transaction-row h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.transaction-row span {
    display: block;
    color: var(--muted);
}

.secure-buy-form {
    display: grid;
    gap: 16px;
    margin: 0;
}

.secure-buy-form .terms-check {
    margin: 2px 0 4px;
}

.listing-payment-box {
    display: grid;
    gap: 12px;
    margin: 18px 0 12px;
    padding: 16px;
    border: 1px solid #b7d4cc;
    border-radius: 8px;
    background: #eaf5f2;
}

.listing-payment-box > div {
    display: grid;
    gap: 4px;
}

.listing-payment-box span {
    color: var(--accent-dark);
    font-size: 14px;
}

.listing-payment-box .form-message {
    color: var(--accent-dark);
}

.payment-result-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 190px);
    padding: 42px clamp(18px, 4vw, 56px) 64px;
}

.payment-result-panel {
    display: grid;
    gap: 20px;
    width: min(100%, 760px);
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 18px 48px rgba(16, 45, 52, 0.08);
}

.payment-result-head {
    display: grid;
    gap: 8px;
}

.payment-result-head h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1;
}

.payment-result-head p,
.payment-result-status p {
    margin: 0;
    color: var(--muted);
}

.payment-result-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(23, 106, 91, 0.22);
    border-radius: 8px;
    background: #f1faf6;
}

.payment-result-status > span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}

.payment-result-status strong {
    display: block;
    margin-bottom: 2px;
    color: var(--accent-dark);
}

.payment-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payment-result-summary div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.payment-result-summary span {
    color: var(--muted);
    font-size: 13px;
}

.payment-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.secure-page {
    padding: 32px clamp(18px, 4vw, 56px) 56px;
}

.secure-panel {
    display: grid;
    gap: 18px;
    max-width: 920px;
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.secure-panel h1 {
    margin: 0;
}

.secure-status {
    width: fit-content;
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #eaf5f2;
    color: var(--accent-dark);
    font-weight: 700;
}

.secure-inline-notice {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.secure-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.secure-grid > div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.secure-grid span,
.secure-ids dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.secure-grid strong,
.secure-ids dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.secure-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.secure-flow span {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 8px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.secure-flow span.done {
    border-style: solid;
    border-color: #b7d4cc;
    background: #eaf5f2;
    color: var(--accent-dark);
    font-weight: 700;
}

.secure-ids {
    display: grid;
    gap: 8px;
    margin: 0;
}

.secure-ids div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
}

.secure-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.secure-actions .secure-card-form {
    flex: 1 1 520px;
}

.secure-actions form {
    margin: 0;
}

.messages-page {
    padding: 32px clamp(18px, 4vw, 56px) 56px;
}

.messages-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
    border-radius: 8px;
}

.conversation-list,
.chat-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.conversation-list {
    display: grid;
    align-content: start;
    overflow: hidden;
}

.messages-head,
.chat-head {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.messages-head h1,
.chat-head h2 {
    margin: 0;
}

.conversation-item {
    display: grid;
    gap: 5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.conversation-item strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.conversation-item:hover,
.conversation-item.active {
    background: var(--soft);
}

.conversation-item.has-unread {
    border-left: 4px solid #dc3545;
    background: #fff8f8;
}

.conversation-item.active.has-unread {
    background: #f7eeee;
}

.conversation-item span,
.conversation-item small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-badge {
    flex: 0 0 auto;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr) auto;
}

.message-thread {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 320px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 246, 248, 0.9)),
        #f9fafb;
}

.chat-message {
    display: grid;
    gap: 6px;
    justify-self: start;
    max-width: min(620px, 86%);
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px 8px 8px 2px;
    background: var(--paper);
}

.chat-message.mine {
    justify-self: end;
    border-color: #b7d4cc;
    border-radius: 8px 8px 2px 8px;
    background: #eaf5f2;
}

.chat-message p {
    margin: 0;
    overflow-wrap: anywhere;
}

.chat-message time {
    color: var(--muted);
    font-size: 12px;
}

.chat-form {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 18px;
    border-top: 1px solid var(--line);
}

.chat-form label {
    width: min(100%, 620px);
    max-width: 620px;
}

.chat-form textarea,
.chat-form .form-control {
    width: min(100%, 620px);
    max-width: 620px;
}

.chat-form .btn {
    width: min(100%, 220px);
}

.legal-page {
    padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 56px);
    background:
        radial-gradient(circle at top left, rgba(23, 106, 91, 0.08), transparent 32rem),
        var(--soft);
}

.legal-document {
    display: grid;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 22px 60px rgba(16, 45, 52, 0.08);
}

.legal-hero {
    display: grid;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.02;
}

.legal-hero p,
.legal-hero span,
.legal-document p {
    color: var(--muted);
    line-height: 1.7;
}

.legal-hero p,
.legal-document p {
    margin: 0;
}

.legal-highlight {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.legal-highlight div {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #c7d8d3;
    border-radius: 8px;
    background: #f2faf7;
}

.legal-highlight span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.legal-highlight strong {
    color: var(--accent-dark);
    font-size: 24px;
}

.legal-document section {
    display: grid;
    gap: 10px;
}

.legal-document h2 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
}

.admin-page {
    display: grid;
    gap: 22px;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 56px);
    background: var(--soft);
}

.admin-head,
.admin-panel {
    width: min(1280px, 100%);
    margin-inline: auto;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-head h1,
.admin-panel h2 {
    margin: 0;
}

.admin-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.admin-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 16px 40px rgba(16, 45, 52, 0.07);
}

.admin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-panel-head span,
.admin-muted {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-top: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-table td {
    color: var(--ink);
}

.admin-table td strong,
.admin-table td span,
.admin-table td a {
    display: block;
}

.admin-table td span {
    color: var(--muted);
    font-size: 13px;
}

.admin-table td a {
    margin-top: 4px;
    color: var(--accent-dark);
    font-weight: 800;
}

.admin-status {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.admin-status.published {
    background: #e3f4ec;
    color: #12633f;
}

.admin-status.pending_payment {
    background: #fff3d6;
    color: #8a5a00;
}

.admin-status.expired {
    background: #fee8e7;
    color: #9d1f1a;
}

.admin-conversation-reader {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.admin-conversation-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.admin-conversation-head h3 {
    margin: 0;
    font-size: 22px;
}

.admin-conversation-head span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-message-thread {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.admin-message {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.admin-message strong {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-message strong span,
.admin-message time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-message p {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-action-link {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.admin-action-link:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.admin-actions,
.admin-inline-form,
.admin-ban-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions form {
    display: inline-flex;
}

.admin-actions button,
.admin-inline-form button,
.admin-ban-form button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
}

.admin-actions button:hover,
.admin-inline-form button:hover,
.admin-ban-form button:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.admin-actions button.danger,
.admin-ban-form button.danger {
    border-color: #f0b7b3;
    color: #9d1f1a;
}

.admin-ban-form input {
    min-height: 36px;
    width: min(220px, 100%);
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #102d34;
    color: #eef3f1;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.8fr) minmax(240px, 0.9fr);
    align-items: center;
    gap: 24px;
    padding: 24px clamp(18px, 4vw, 56px);
}

.footer-about {
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.footer-about span {
    color: #c9d3d0;
    font-size: 14px;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: 1;
    flex-wrap: wrap;
}

.footer-links a,
.footer-legal a {
    color: #c9d3d0;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-bottom {
    padding: 12px clamp(18px, 4vw, 56px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #b8c5c1;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero h1 {
        font-size: 52px;
    }

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

    .home-stats,
    .category-panel,
    .seo-intro {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-stats article:first-child,
    .home-stats article:last-child {
        border-radius: 0;
    }

    .home-stats article:nth-child(1) {
        border-radius: 18px 0 0 0;
    }

    .home-stats article:nth-child(2) {
        border-radius: 0 18px 0 0;
    }

    .home-stats article:nth-child(3) {
        border-radius: 0 0 0 18px;
    }

    .home-stats article:nth-child(4) {
        border-radius: 0 0 18px 0;
    }

    .toolbar {
        justify-content: flex-start;
    }

    .listing-form {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 16px;
    }

    .topnav,
    .topbar .primary-btn {
        width: 100%;
    }

    .cm-navbar {
        min-height: 64px;
    }

    .cm-navbar .navbar-collapse {
        padding-top: 12px;
    }

    .cm-navbar .nav-link,
    .cm-navbar .cm-nav-btn {
        width: 100%;
        justify-content: flex-start;
    }

    .topnav {
        align-items: stretch;
        flex-direction: column;
    }

    .brand {
        font-size: 18px;
    }

    .home-hero {
        gap: 24px;
        padding: 46px 16px;
        background-position: 58% center;
    }

    .hero h1 {
        font-size: 40px;
        line-height: 1.05;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-card {
        padding: 22px;
        border-radius: 18px;
    }

    .home-stats,
    .category-panel,
    .seo-intro {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .filter {
        flex: 1 1 112px;
        justify-content: center;
    }

    .home-stats {
        gap: 10px;
        margin-top: 16px;
    }

    .home-stats article,
    .home-stats article:first-child,
    .home-stats article:last-child,
    .home-stats article:nth-child(1),
    .home-stats article:nth-child(2),
    .home-stats article:nth-child(3),
    .home-stats article:nth-child(4) {
        border-radius: 16px;
    }

    .seo-intro,
    .category-panel,
    .listings-section {
        margin-top: 22px;
        padding-inline: 16px;
    }

    .seo-intro {
        padding: 22px;
    }

    .publish-section {
        scroll-margin-top: 116px;
        padding: 24px 16px;
    }

    .form-head h2 {
        font-size: 24px;
    }

    .listings {
        gap: 14px;
        padding-bottom: 40px;
    }

    .listing-row {
        grid-template-columns: 1fr;
    }

    .listing-row > .listing-media img,
    .listing-row > .listing-media .placeholder {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .listing-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-page {
        padding: 24px 16px 40px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-panel h1 {
        font-size: 28px;
    }

    .spec-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .auth-page,
    .account-page,
    .contact-page {
        padding: 24px 16px 40px;
    }

    .auth-layout {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .auth-layout > * {
        grid-column: span 12;
        width: 100%;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-intro {
        position: static;
    }

    .contact-form .primary-btn {
        width: 100%;
    }

    .messages-page {
        padding: 24px 16px 40px;
    }

    .messages-shell {
        grid-template-columns: 1fr;
    }

    .legal-highlight {
        grid-template-columns: 1fr;
    }

    .connect-box,
    .transaction-row,
    .secure-actions {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .connect-box .primary-btn,
    .seller-bank-form .primary-btn,
    .secure-actions .primary-btn,
    .secure-actions .danger-btn {
        width: 100%;
    }

    .secure-grid,
    .secure-flow,
    .secure-ids div {
        grid-template-columns: 1fr;
    }

    .payment-result-page {
        align-items: start;
        padding: 24px 16px 40px;
    }

    .payment-result-summary,
    .payment-result-status {
        grid-template-columns: 1fr;
    }

    .payment-result-actions .primary-btn {
        width: 100%;
    }

    .chat-panel {
        grid-template-rows: auto auto auto;
    }

    .message-thread {
        max-height: none;
    }

    .grid-two {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .grid-two > * {
        grid-column: span 12;
        width: 100%;
    }

    .footer-inner {
        align-items: flex-start;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 16px;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .footer-legal,
    .footer-bottom {
        justify-content: flex-start;
        padding: 16px;
        text-align: left;
    }

    .empty {
        padding: 22px 16px;
    }
}

@media (max-width: 420px) {
    .hero h1 {
        font-size: 34px;
    }

    .listing-body h2 {
        font-size: 19px;
    }

    .listing-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-btn {
        width: 100%;
    }
}
