:root {
    color-scheme: light;
    --blue-700: #174ea6;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --green-700: #047857;
    --green-600: #059669;
    --green-100: #d1fae5;
    --amber-700: #a16207;
    --amber-100: #fef3c7;
    --red-700: #b91c1c;
    --red-100: #fee2e2;
    --ink: #162033;
    --muted: #5b6475;
    --surface: #ffffff;
    --surface-soft: #f6f8fc;
    --border: #dce2ec;
    --shadow: 0 12px 32px rgba(31, 41, 55, 0.09);
    --radius: 16px;
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--blue-700);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ink);
    color: white;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid rgba(220, 226, 236, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    max-width: var(--content);
    margin: 0 auto;
    padding: 0 20px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
    color: white;
    font-size: 0.86rem;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 650;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--blue-50);
    color: var(--blue-700);
}

.nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--ink);
}

.page-shell {
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
}

.breadcrumb {
    padding: 18px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 6px;
    color: #9aa3b2;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: center;
    gap: 42px;
    padding: 48px 0 32px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green-700);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
}

.hero-copy {
    max-width: 660px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero-search {
    display: flex;
    margin-top: 26px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 10px 12px;
    color: var(--ink);
    background: transparent;
}

.hero-search input:focus {
    outline: 0;
}

.hero-search button {
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    background: var(--blue-600);
    color: white;
    font-weight: 750;
}

.hero-panel {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
}

.trust-list {
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.trust-list li {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 12px;
}

.trust-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-weight: 850;
}

.trust-list strong,
.trust-list span {
    display: block;
}

.trust-list span {
    color: var(--muted);
    font-size: 0.88rem;
}

.notice {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid #f7d26a;
    border-radius: 12px;
    background: var(--amber-100);
    color: #713f12;
    font-size: 0.92rem;
}

.directory-section {
    scroll-margin-top: 88px;
    padding: 22px 0 64px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.results-summary {
    margin: 4px 0 0;
    color: var(--muted);
}

.category-chips {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 2px 2px 12px;
    scrollbar-width: thin;
}

.category-chip {
    flex: none;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: white;
    color: var(--ink);
    font-weight: 700;
}

.category-chip:hover,
.category-chip.active {
    border-color: var(--blue-600);
    background: var(--blue-600);
    color: white;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(140px, 1fr));
    gap: 12px;
    margin: 2px 0 22px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.field {
    display: grid;
    align-content: end;
    gap: 6px;
}

.field label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.field input,
.field select,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd3df;
    border-radius: 10px;
    padding: 9px 11px;
    background: white;
    color: var(--ink);
}

.filter-more {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-top: 2px;
}

.check-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
}

.check-field input {
    width: 18px;
    height: 18px;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--blue-700);
    font-weight: 750;
    text-decoration: underline;
}

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

.offer-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 3px 14px rgba(31, 41, 55, 0.05);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.offer-card:hover {
    border-color: #b8c6df;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.offer-top {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: start;
    gap: 12px;
}

.provider-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--blue-50), var(--blue-100));
    color: var(--blue-700);
    font-size: 0.88rem;
    font-weight: 900;
}

.provider-name {
    margin: 2px 0 3px;
    font-size: 1.08rem;
}

.provider-name a {
    color: var(--ink);
    text-decoration: none;
}

.category-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: capitalize;
}

.compare-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 0.75rem;
}

.compare-control input {
    width: 17px;
    height: 17px;
}

.reward-value {
    margin: 20px 0 6px;
    color: var(--green-700);
    font-size: 1.3rem;
    font-weight: 850;
    line-height: 1.3;
}

.reward-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf1f7;
    color: #3e4a5c;
    font-size: 0.72rem;
    font-weight: 750;
}

.pill.status-current {
    background: var(--green-100);
    color: var(--green-700);
}

.pill.status-review {
    background: var(--amber-100);
    color: var(--amber-700);
}

.offer-terms {
    flex: 1;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.offer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 12px;
    background: var(--blue-600);
    color: white;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.button:hover {
    background: var(--blue-700);
}

.button-secondary {
    border-color: #b9c5d6;
    background: white;
    color: var(--blue-700);
}

.button-secondary:hover {
    background: var(--blue-50);
}

.offer-code {
    grid-column: 1 / -1;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf0f5;
    color: var(--muted);
    font-size: 0.76rem;
}

.offer-footer a {
    color: var(--muted);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 48px 24px;
    border: 1px dashed #b7c1cf;
    border-radius: var(--radius);
    background: white;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 6px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.compare-tray {
    position: fixed;
    z-index: 90;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--ink);
    color: white;
    box-shadow: var(--shadow);
}

.compare-tray .button {
    background: white;
    color: var(--ink);
}

dialog {
    width: min(760px, calc(100% - 24px));
    max-height: 85vh;
    border: 0;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
}

.dialog-inner {
    padding: 24px;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dialog-header h2 {
    margin: 0;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
}

.comparison-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
}

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

.comparison-table th {
    color: var(--muted);
    font-size: 0.8rem;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 0.75fr);
    gap: 38px;
    align-items: start;
    padding: 42px 0 52px;
}

.detail-hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.detail-summary {
    margin: 16px 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.detail-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

.detail-panel .reward-value {
    margin-top: 0;
}

.detail-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 22px 0;
    list-style: none;
}

.detail-list li {
    padding: 12px 0;
    border-bottom: 1px solid #edf0f5;
}

.detail-list strong {
    display: block;
    margin-bottom: 2px;
}

.related-section,
.content-section {
    padding: 20px 0 64px;
}

.content-card {
    max-width: 860px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.content-card h2:first-child,
.content-card p:first-child {
    margin-top: 0;
}

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

.category-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--ink);
    text-decoration: none;
}

.category-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow);
}

.category-card strong,
.category-card span {
    display: block;
}

.category-card span {
    margin-top: 6px;
    color: var(--muted);
}

.form-card {
    max-width: 680px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.form-field {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
}

.form-field label {
    font-weight: 750;
}

.form-field small {
    color: var(--muted);
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: var(--blue-50);
    color: var(--blue-700);
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: white;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-links strong {
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--blue-700);
}

@media (max-width: 980px) {
    .hero,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 640px;
    }

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

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

@media (max-width: 720px) {
    .header-inner {
        min-height: 62px;
        padding: 0 16px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: 61px;
        right: 12px;
        left: 12px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: white;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .hero {
        gap: 24px;
        padding: 30px 0 24px;
    }

    h1 {
        font-size: 2.35rem;
    }

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

    .filter-panel,
    .offers-grid,
    .category-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        gap: 10px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }

    .offer-actions {
        grid-template-columns: 1fr;
    }

    .offer-code {
        grid-column: auto;
    }

    .compare-tray {
        right: 12px;
        bottom: 12px;
        left: 12px;
        justify-content: space-between;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .detail-hero {
        gap: 22px;
        padding: 28px 0 38px;
    }

    .footer-inner {
        padding: 34px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
