:root {
    color-scheme: light;
    --ink: #101926;
    --ink-light: #243149;
    --paper: #f7f6f4;
    --white: #fff;
    --accent: #ff662d;
    --accent-pale: #fff2ec;
    --accent-dark: #a33511;
    --muted: #576476;
    --line: #dce1e8;
    --radius: 16px;
    font: 16px/1.5 "Inter", "Geist", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #b13d16;
    outline-offset: 3px;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: clamp(1.42rem, 3vw, 2rem); }
.wrap { width: min(1150px, calc(100% - 48px)); margin-inline: auto; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site main { flex: 1; }
.site-header, .site-footer { background: var(--ink); color: var(--white); }
.site-header { border-bottom: 1px solid #344155; }
.masthead { min-height: 70px; display: flex; gap: 2rem; align-items: center; }
.brand { font-size: 2rem; font-weight: 950; line-height: 1; letter-spacing: -.08em; text-decoration: none; }
.brand span { color: var(--accent); }
.masthead nav { display: flex; gap: 1.6rem; margin-left: auto; font-weight: 600; }
.masthead nav a, .site-footer a:not(.brand) { text-decoration: none; }
.masthead nav a:hover, .site-footer a:hover { text-decoration: underline; }
.language { display: flex; align-items: center; gap: .15rem; border: 1px solid #536175; border-radius: 999px; padding: .2rem; }
.language a { border-radius: 999px; text-decoration: none; font-size: .78rem; font-weight: 750; padding: .3rem .58rem; }
.language a[aria-current] { background: var(--white); color: var(--ink); }
.hero {
    background: var(--ink) radial-gradient(ellipse at 76% 90%, #29344b 0, var(--ink) 69%);
    color: white;
    overflow: hidden;
}
.hero-layout { min-height: 365px; position: relative; display: flex; align-items: center; }
.hero-content { position: relative; z-index: 1; padding: clamp(2.55rem, 6vw, 4.4rem) 0; width: min(100%, 41rem); }
.hero h1 { font-size: clamp(2.65rem, 5vw, 4.2rem); line-height: 1.01; letter-spacing: -.07em; }
.hero h1 span { display: block; }
.hero p { max-width: 29rem; margin: 1.05rem 0 1.55rem; font-size: clamp(1rem, 2vw, 1.18rem); color: #dce5f1; }
.hero-art {
    position: absolute; inset: 0 min(-24px, calc((1150px - 100vw) / 2)) 0 5%;
    background: url('hero.webp') right 62% / cover no-repeat;
    mask-image: linear-gradient(to right, transparent 0, black 50%);
}
.button {
    width: fit-content;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .55rem;
    padding: .63rem .88rem;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    font: inherit;
    font-weight: 730;
    color: var(--ink);
    cursor: pointer;
    line-height: 1.25;
}
.primary { background: var(--accent); color: #161d29; }
.primary:hover { background: #ff895f; }
.secondary { border-color: var(--line); background: var(--white); }
.secondary:hover { background: var(--accent-pale); border-color: #e99b83; }
.inventory { padding: 1.45rem 0 4rem; scroll-margin-top: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .62rem; margin-bottom: 1.65rem; }
.filters a {
    text-decoration: none; line-height: 1.25; padding: .58rem 1.15rem; font-weight: 720;
    border-radius: 999px; border: 1px solid var(--line); background: #fff;
}
.filters a:hover { border-color: var(--accent-dark); }
.filters a[aria-current] { background: var(--ink); color: white; border-color: var(--ink); }
.deal-section { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.deal-section + .deal-section { margin-top: 2.3rem; }
.deal-section h2 { margin-bottom: .9rem; display: flex; align-items: center; gap: .6rem; }
.flare { width: .49rem; height: 1.15rem; border-radius: 6px; background: var(--accent); }
.deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.deal-grid.deal-grid--solo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 721px) {
    .deal-grid.deal-grid--solo .deal-card {
        display: grid;
        grid-template-columns: minmax(200px, .4fr) minmax(0, 1fr);
        max-width: 44rem;
        align-items: stretch;
    }
    .deal-grid.deal-grid--solo .deal-image {
        aspect-ratio: auto;
        min-height: 100%;
        align-self: stretch;
    }
}
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .35rem; }
.section-head .section-copy { margin-bottom: 0; }
.section-cta { flex: 0 0 auto; font-size: .88rem; }
.section-more { margin-top: 1rem; font-size: .9rem; }
.section-more a { font-weight: 700; }
.page-intro { margin: 1.6rem 0 1.2rem; }
.page-intro h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin: .35rem 0 .55rem; }
.merchant-filters { margin-top: .55rem; flex-wrap: wrap; }
.deal-card, .panel {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 5px 24px #14213a08;
}
.deal-card { display: flex; flex-direction: column; overflow: hidden; }
.deal-image, .detail-image {
    display: block; height: auto; aspect-ratio: 2.05; background: var(--ink); overflow: hidden;
    position: relative;
}
.deal-image img, .detail-image img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
/* Merchant logos: contain + cap so low-res Awin assets are not blown up. */
.deal-image.is-logo, .detail-image.is-logo {
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.05rem, 2.8vw, 1.55rem);
    box-sizing: border-box;
}
.deal-image.is-logo img, .detail-image.is-logo img {
    position: static;
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 12.5rem);
    max-height: min(100%, 4.75rem);
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
}
.detail-image.is-logo img {
    max-width: min(100%, 16rem);
    max-height: min(100%, 6.5rem);
}
.shipping-line { margin: .2rem 0 0; font-size: .82rem; font-weight: 650; color: var(--ink-light); }
.shipping-note { margin: .15rem 0 0; font-size: .75rem; line-height: 1.35; }
.deal-content { display: flex; flex-direction: column; gap: .58rem; padding: .98rem 1.05rem; flex: 1; min-width: 0; }
.eyebrow { font-size: .78rem; font-weight: 760; color: var(--muted); overflow-wrap: anywhere; }
.eyebrow span { color: var(--accent-dark); }
.deal-content h3 { font-size: 1.2rem; max-width: 30ch; overflow-wrap: anywhere; }
.deal-content h3 a { text-decoration: none; }
.deal-content h3 a:hover { text-decoration: underline; }
.expires { color: var(--accent-dark); background: var(--accent-pale); border-radius: 7px; font-size: .82rem; padding: .25rem .45rem; width: fit-content; font-weight: 750; }
.card-event { font-size: .81rem; color: var(--muted); }
.deal-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-top: .45rem; flex-wrap: wrap; }
.deal-bottom strong, .detail-price strong { font-size: 1.35rem; font-weight: 850; }
.deal-bottom .button { font-size: .89rem; flex: 1 0 100%; }
del { color: var(--muted); white-space: nowrap; margin-left: .25rem; }
.empty { padding: clamp(1.5rem, 6vw, 3rem); }
.empty h2 { font-size: 1.4rem; }
.empty .button { margin-top: .9rem; }
.muted, .note { color: var(--muted); }
.note { font-size: .875rem; }
.foot-content { display: flex; min-height: 108px; justify-content: space-between; align-items: center; gap: 1.5rem; }
.foot-content p { font-size: .88rem; color: #d0d9e5; }
.foot-content > a:last-child { font-size: .9rem; font-weight: 700; }
.detail { padding: 2rem 0 4rem; }
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: 1fr 1.2fr; overflow: hidden; }
.detail-copy, .info-copy { padding: clamp(1.35rem, 4.7vw, 3.1rem); }
.detail-copy h1, .info-copy h1 { font-size: clamp(1.9rem, 4vw, 3.35rem); margin: .35rem 0 .85rem; overflow-wrap: anywhere; }
.offer-description { white-space: pre-line; overflow-wrap: anywhere; }
.facts { display: grid; gap: .65rem; margin: 1.25rem 0; }
.facts div { display: grid; grid-template-columns: minmax(7rem, .48fr) minmax(0, 1fr); gap: .8rem; align-items: start; }
.facts dt { font-size: .87rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.info-copy p + p, .detail-copy .note { margin-top: .8rem; }
.actions, .pagination { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.actions { margin-top: 1rem; }
.pagination { justify-content: center; margin-top: 1.55rem; }

.admin { min-height: 100vh; }
.admin-head { background: var(--ink); color: white; }
.admin-bar { min-height: 72px; display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; padding-block: .75rem; }
.admin-bar nav { display: flex; flex: 1; gap: .4rem .9rem; align-items: center; flex-wrap: wrap; }
.admin-bar nav a { color: #e3eaf2; font-weight: 700; text-decoration: none; }
.admin-bar nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .35rem; }
.admin-bar .button { font-size: .82rem; }
.admin-main { padding: 1.8rem 0 4rem; }
.admin-main h1 { font-size: clamp(1.9rem, 4vw, 3rem); overflow-wrap: anywhere; }
.admin-main h2 { font-size: 1.25rem; margin-bottom: .8rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.admin .panel { padding: clamp(.9rem, 2.3vw, 1.35rem); margin-bottom: 1rem; }
.login-box { width: min(100% - 2rem, 430px); margin: 4rem auto; }
.login-box .brand { display: inline-block; margin-bottom: 1.3rem; }
.login-box h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.notice { border-radius: 9px; background: #edf9f3; border: 1px solid #8bc4a7; padding: .8rem; margin-bottom: 1rem; }
.notice.error { background: #fff2ef; border-color: #e79982; color: #841d13; }
.notice ul { margin: 0; padding-left: 1.1rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.admin .kpis .panel { margin: 0; }
.kpis strong { display: block; font-size: 1.8rem; letter-spacing: -.05em; }
.kpis span { font-size: .84rem; font-weight: 700; color: var(--muted); }
.kpi-delta { display: block; margin-top: .25rem; font-size: .75rem; font-style: normal; color: var(--muted); font-weight: 650; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-subh { font-size: 1rem; margin: .85rem 0 .45rem; }
.funnel-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.funnel-list li { line-height: 1.45; }
/* Legacy multi-SVG bars kept inert; 6B uses single fixed-height spark-chart. */
.spark-bars { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-end; gap: .28rem; overflow-x: auto; max-height: 140px; padding-bottom: .2rem; }
.spark-bar { display: flex; flex-direction: column; align-items: center; gap: .28rem; min-width: 1.1rem; flex: 0 0 auto; }
.spark-bar svg { display: block; width: 14px; height: 80px; max-height: 80px; }
.spark-bar rect { fill: var(--accent-dark); }
.spark-chart-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.spark-chart {
    display: block; width: 100%; height: 120px; max-height: 120px;
    min-height: 80px; background: #f4f6f9; border-radius: 8px;
}
.spark-chart rect { fill: var(--accent-dark); }
.spark-chart-labels {
    display: flex; justify-content: space-between; gap: .15rem;
    margin-top: .35rem; font-size: .68rem; color: var(--muted); font-weight: 650;
    overflow-x: auto;
}
.spark-chart-labels span { flex: 1 1 0; text-align: center; min-width: 0; }
.chart-empty { margin: .4rem 0; }
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
td, th { border-bottom: 1px solid var(--line); padding: .65rem .55rem; }
th { font-weight: 760; color: var(--muted); }
tr:last-of-type td { border-bottom: 0; }
td a { font-weight: 730; }
.pill { display: inline-block; border-radius: 7px; background: #edf0f5; color: var(--ink-light); padding: .14rem .43rem; white-space: nowrap; font-size: .78rem; font-weight: 710; }
.pill.warn { background: var(--accent-pale); color: var(--accent-dark); }
.field { min-width: 0; display: flex; flex-direction: column; gap: .28rem; }
.field label { font-weight: 710; font-size: .91rem; }
.field input, .field select, .field textarea {
    width: 100%; max-width: 100%; border: 1px solid #aeb8c7; background: #fff; color: var(--ink);
    border-radius: 8px; padding: .5rem .6rem; font: inherit; min-height: 2.45rem;
}
.field input[type=file] { font-size: .88rem; }
.field textarea { resize: vertical; min-height: 6rem; }
.checkbox { display: inline-flex; align-items: center; gap: .45rem; font-weight: 680; }
.checkbox input { accent-color: var(--accent-dark); width: 1.1rem; height: 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.form-grid .wide { grid-column: 1 / -1; }
.stack { display: grid; gap: .85rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .85rem; }
.inline-form .field { min-width: min(100%, 9rem); }
.section-copy { margin-bottom: .75rem; }
code { overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

@media (max-width: 870px) {
    .admin-grid-2 { grid-template-columns: 1fr; }
    .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-layout { min-height: auto; }
    .hero-art { inset-inline-start: 20%; }
}
@media (max-width: 620px) {
    .wrap { width: calc(100% - 30px); }
    .masthead { min-height: 61px; gap: .8rem; }
    .masthead nav { gap: .75rem; font-size: .8rem; }
    .brand { font-size: 1.7rem; }
    .hero-layout { display: block; position: relative; }
    .hero-content { padding: 2.8rem 0 3.2rem; max-width: 26rem; }
    .hero-art { inset: 0 -15px 0 10%; mask-image: linear-gradient(90deg, transparent 5%, black 85%); opacity: .36; background-position: 82% center; }
    .hero p { max-width: 19rem; }
    .deal-grid, .detail-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-image { aspect-ratio: 2; }
    .deal-card { display: grid; grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr); }
    .deal-image { height: auto; min-height: 100%; aspect-ratio: auto; align-self: stretch; }
    /* Logo column: fixed compact box — never stretch to full card height on mobile. */
    .deal-image.is-logo {
        aspect-ratio: 1;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        max-height: 7.25rem;
        align-self: start;
        padding: .85rem;
    }
    .deal-grid.deal-grid--solo .deal-card {
        display: flex;
        flex-direction: column;
        max-width: none;
    }
    .deal-grid.deal-grid--solo .deal-image.is-logo {
        aspect-ratio: 2.05;
        max-height: none;
    }
    .deal-content { padding: .8rem; }
    .deal-content h3 { font-size: 1.1rem; }
    .deal-bottom .button { justify-content: flex-start; }
    .foot-content { flex-wrap: wrap; padding: 1.25rem 0; gap: .65rem; }
    .foot-content p { order: 3; width: 100%; }
}
@media (max-width: 350px) {
    .masthead nav { display: none; }
    .language { margin-left: auto; }
    .hero h1 { font-size: 2.3rem; }
}
