:root {
    --ink: #172322;
    --muted: #66756e;
    --line: #dbe4dc;
    --surface: #ffffff;
    --soft: #f7f6ef;
    --accent: #08723f;
    --accent-dark: #065431;
    --gold: #d9a331;
    --gold-soft: #fff4cf;
    --charcoal: #162022;
    --warn: #a06400;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, #fbfaf5 0%, var(--soft) 360px),
        var(--soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
a { color: var(--accent-dark); text-decoration: none; }
img { display: block; max-width: 100%; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px max(16px, calc((100vw - 1180px) / 2));
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}
.brand {
    align-items: center;
    display: inline-flex;
    min-height: 54px;
}
.brand img {
    height: 54px;
    width: auto;
}
.topbar nav, .footer nav, .actions, .filters, .meta-row, .reward-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.locale-pill,
.locale-form {
    background: var(--gold-soft);
    border: 1px solid #ead79e;
    border-radius: 999px;
    color: #705008;
    font-size: .78rem;
    font-weight: 800;
    padding: 6px 10px;
}
.locale-form {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}
.locale-form label {
    align-items: center;
    display: inline-flex;
    gap: 4px;
}
.locale-form label span {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}
.locale-form select {
    background: transparent;
    border: 0;
    color: #705008;
    font-size: .78rem;
    font-weight: 800;
    min-height: 24px;
    padding: 0 2px;
    width: auto;
}
.inline-form { display: inline; }
button, .button {
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    min-height: 42px;
    padding: 0 16px;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.button.secondary { background: var(--charcoal); }
.button.small { min-height: 34px; padding: 0 12px; }
.button.full { width: 100%; }
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
    gap: 24px;
    align-items: stretch;
    padding: 42px 0 28px;
}
.hero h1, .page-head h1, .policy h1, .form-page h1 {
    margin: 0;
    line-height: 1.05;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 4.6rem); max-width: 860px; }
.hero p { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.eyebrow {
    color: var(--accent-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.compliance-panel, .panel, .card, .policy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 39, 29, .05);
}
.compliance-panel {
    border-top: 4px solid var(--gold);
    padding: 22px;
}
.compliance-panel h2, .panel h2, .card h3 { margin-top: 0; }
.section-head, .page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 16px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}
.product-card { overflow: hidden; }
.product-card img, .product-media img, .image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #edf2ea;
}
.image-placeholder {
    display: grid;
    place-items: center;
    color: var(--accent-dark);
    font-weight: 800;
}
.image-placeholder.large { aspect-ratio: 1 / 1; }
.card-body, .panel, .policy { padding: 18px; }
.card-body p { color: var(--muted); }
.meta-row, .reward-row { justify-content: space-between; }
.reward-row { color: var(--muted); font-size: .88rem; }
.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}
.detail-copy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.stats div {
    background: linear-gradient(180deg, #ffffff 0%, #fbfbf6 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 800; }
.two-column, .table-grid, .checkout-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.compact-stats { margin: 18px 0; }
.copy-box {
    overflow-wrap: anywhere;
    background: var(--soft);
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 6px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; }
.task-list { display: grid; gap: 14px; }
.task-list.compact article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
.task-steps {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 16px 0;
    padding: 14px;
}
.task-steps ol { margin: 8px 0 0; padding-left: 22px; }
.status {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--gold-soft);
    color: #705008;
    font-weight: 700;
}
.form-page { display: grid; place-items: start center; }
.form-page .panel { width: min(680px, 100%); }
.stacked-form p { display: grid; gap: 6px; }
input, textarea, select {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 114, 63, .12);
    outline: none;
}
textarea { resize: vertical; }
.ad-slot {
    background: #fffdf4;
    border: 1px dashed #c8b47a;
    border-radius: 8px;
    color: var(--muted);
    margin: 18px 0;
    min-height: 80px;
    padding: 16px;
}
.messages { width: min(1180px, calc(100% - 32px)); margin: 16px auto 0; }
.messages p {
    background: #eef8f0;
    border: 1px solid #b9ddc5;
    border-radius: 8px;
    margin: 0 0 8px;
    padding: 10px 12px;
}
.messages .error { background: #fff2f2; border-color: #efb8b8; }
.fine-print { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); }
.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px max(16px, calc((100vw - 1180px) / 2));
    background: #ffffff;
    border-top: 1px solid var(--line);
    color: var(--muted);
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .topbar, .hero, .detail-layout, .section-head, .page-head { display: grid; }
    .hero { grid-template-columns: 1fr; padding-top: 28px; }
    .detail-layout { grid-template-columns: 1fr; }
    .topbar { align-items: start; }
    .brand img { height: 46px; }
    .topbar nav { gap: 8px; }
}
