:root {
    --paper: #f7f4ee;
    --surface: #fffdf8;
    --ink: #222620;
    --muted: #6e7069;
    --line: #ddd6c9;
    --gold: #b9863f;
    --gold-dark: #7a5527;
    --green: #537361;
    --sage: #dfe8df;
    --blue: #40566b;
    --shadow: 0 18px 45px rgba(34, 38, 32, .10);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(247, 244, 238, .94);
    border-bottom: 1px solid rgba(221, 214, 201, .85);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 760;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--ink);
    color: var(--surface);
    border-radius: 50%;
    font-size: .82rem;
}

.site-nav,
.header-actions,
.button-row,
.badge-row,
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.site-nav {
    justify-content: center;
    color: var(--muted);
    font-size: .94rem;
}

.site-nav a,
.site-footer a {
    padding: 8px 4px;
}

.site-nav a:hover,
.site-footer a:hover {
    color: var(--ink);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
}

.lang-switch a {
    padding: 7px 10px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.lang-switch a.active {
    background: var(--ink);
    color: var(--surface);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    white-space: nowrap;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 38, 32, .10);
}

.button.small {
    min-height: 38px;
    padding: 8px 12px;
    font-size: .88rem;
}

.button.gold {
    background: var(--gold);
    color: #fff;
}

.button.dark {
    background: var(--ink);
    color: #fff;
}

.button.light {
    background: var(--surface);
    color: var(--ink);
}

.button.ghost,
.button.ghost-light {
    border-color: var(--line);
    background: transparent;
}

.button.ghost-light {
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
}

.hero {
    min-height: 74vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: clamp(56px, 10vw, 110px) clamp(20px, 5vw, 70px);
}

.hero-inner {
    width: min(720px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: #f2dfc0;
    font-size: .78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.eyebrow.dark {
    color: var(--gold-dark);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 900px;
    margin-bottom: 18px;
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.45rem);
    line-height: 1.14;
    letter-spacing: 0;
}

h3 {
    font-size: 1.05rem;
    line-height: 1.25;
}

.hero-copy {
    max-width: 620px;
    color: rgba(255, 255, 255, .88);
    font-size: 1.1rem;
}

.section,
.page-hero,
.detail-layout,
.dashboard-head,
.dashboard-grid,
.thread-layout {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.section {
    padding: clamp(44px, 7vw, 82px) 0;
}

.page-hero {
    padding: clamp(48px, 8vw, 86px) 0 28px;
}

.page-hero.compact h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.split-choice,
.feature-band,
.trust-grid,
.two-column,
.dashboard-grid,
.thread-layout {
    display: grid;
    gap: 18px;
}

.split-choice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 26px;
}

.choice-panel,
.feature-band > div,
.info-panel,
.table-panel,
.form-shell,
.product-card,
.seller-summary,
.message {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.choice-panel {
    min-height: 230px;
    padding: 28px;
}

.choice-panel span {
    color: var(--gold-dark);
    font-weight: 850;
}

.choice-panel.accent {
    background: #eef3ef;
}

.feature-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-band > div,
.info-panel,
.table-panel {
    padding: 24px;
}

.trust-grid,
.two-column {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: start;
}

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

.stat-strip.large {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-strip div {
    padding: 22px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
}

.stat-strip strong {
    display: block;
    font-size: 2rem;
}

.stat-strip span {
    color: rgba(255, 255, 255, .72);
}

.check-list {
    margin: 0;
    padding: 22px 22px 22px 42px;
    background: var(--sage);
    border-radius: var(--radius);
}

.check-list li {
    margin: 8px 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 220px auto auto;
    gap: 10px;
    align-items: center;
    margin-top: 24px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
}

.inline-check,
.check-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    color: var(--ink);
}

.inline-check input,
.check-row input {
    width: auto;
    min-height: auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(34, 38, 32, .13);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e8e0d2;
}

.product-body {
    padding: 18px;
}

.product-body h2 {
    min-height: 2.6em;
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.product-body p,
.lead,
.seller-summary p,
.feature-band p,
.choice-panel p,
.legal-copy p {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ece7dc;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 820;
}

.badge.gold {
    background: #f2dfbd;
    color: #654014;
}

.badge.green {
    background: var(--sage);
    color: #264535;
}

.meta-line,
.detail-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.meta-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

dd {
    margin: 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: 28px;
    padding: clamp(36px, 6vw, 70px) 0;
}

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.thumb-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.thumb-row img {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.detail-panel,
.seller-summary {
    min-width: 0;
}

.seller-summary {
    margin-top: 22px;
    padding: 18px;
}

.form-shell {
    width: min(860px, calc(100% - 36px));
    margin: 0 auto clamp(50px, 7vw, 80px);
    padding: 24px;
}

.form-shell.narrow {
    width: min(640px, calc(100% - 36px));
}

.form-shell.embedded {
    width: auto;
    margin: 0;
}

form {
    display: grid;
    gap: 16px;
}

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

.dashboard-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(38px, 6vw, 70px) 0 18px;
}

.dashboard-head h1 {
    margin-bottom: 4px;
    font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding-bottom: 36px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .76rem;
    text-transform: uppercase;
}

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

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

.actions button,
.inline-form button {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.inline-form select {
    min-height: 34px;
    width: auto;
    max-width: 190px;
}

.thread-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    padding: 10px 0 24px;
}

.thread-messages {
    display: grid;
    gap: 12px;
}

.message {
    padding: 16px;
}

.message.mine {
    border-color: rgba(185, 134, 63, .45);
    background: #fff8ec;
}

.message strong span,
.message time {
    color: var(--muted);
    font-size: .78rem;
}

.legal-copy {
    max-width: 860px;
}

.flash {
    width: min(980px, calc(100% - 36px));
    margin: 16px auto 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
}

.flash.success {
    border-color: #9dbb9d;
    background: #eef7ef;
}

.flash.error {
    border-color: #d8a1a1;
    background: #fff0f0;
}

.flash.warning {
    border-color: #e0c27a;
    background: #fff8e6;
}

.empty,
.form-note {
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 34px clamp(18px, 4vw, 54px);
    border-top: 1px solid var(--line);
    background: #ebe5d8;
    color: var(--muted);
}

.site-footer nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
    }

    .site-nav,
    .header-actions {
        grid-column: 1 / -1;
        display: none;
        justify-content: flex-start;
    }

    .site-nav.open,
    .header-actions.open {
        display: flex;
    }

    .split-choice,
    .feature-band,
    .trust-grid,
    .two-column,
    .detail-layout,
    .dashboard-grid,
    .thread-layout {
        grid-template-columns: 1fr;
    }

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

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 78vh;
        align-items: flex-end;
        padding-bottom: 44px;
    }

    h1 {
        font-size: 2.35rem;
    }

    .product-grid,
    .form-grid,
    .filter-bar,
    .stat-strip,
    .stat-strip.large {
        grid-template-columns: 1fr;
    }

    .dashboard-head,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-panel {
        overflow-x: auto;
    }

    table {
        min-width: 640px;
    }
}
