:root {
    --ink: #121212;
    --ink-soft: #595959;
    --paper: #f3f3f3;
    --surface: #ffffff;
    --line: #dedede;
    --brand: #c10000;
    --brand-deep: #970000;
    --brand-soft: #f5e4e4;
    --gray-accent: #b7b7b7;
    --highlight: #ffffff;
    --shadow: 0 18px 55px rgba(18, 18, 18, 0.1);
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    margin: 0;
    min-height: 100vh;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
h1, h2, p { margin-top: 0; }

h1, h2 {
    letter-spacing: -0.04em;
    line-height: 1.05;
}

h1:focus { outline: none; }
.site-shell { min-height: 100vh; }

.site-footer,
.dashboard {
    margin-inline: auto;
    max-width: 1180px;
    width: calc(100% - 40px);
}

.dashboard {
    display: grid;
    gap: 24px;
    padding: 24px 0 32px;
}

.hero-card {
    background: linear-gradient(135deg, #121212 20%, #363636 50%, #121212 80%);
    border-radius: 30px;
    color: white;
    min-height: 590px;
    overflow: hidden;
    padding: clamp(32px, 7vw, 78px);
    position: relative;
}

.hero-content {
    max-width: 770px;
    position: relative;
    z-index: 2;
}

.hero-glow {
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
    position: absolute;
}

.hero-glow-one {
    background: var(--brand);
    height: 360px;
    opacity: 0.3;
    right: -130px;
    top: -90px;
    width: 360px;
}

.hero-glow-two {
    background: var(--gray-accent);
    bottom: -230px;
    height: 430px;
    opacity: 0.08;
    right: 12%;
    width: 430px;
}

.eyebrow {
    color: var(--brand-deep);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.17em;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
}

.eyebrow-light { color: #ff9a9a; }

.hero-card h1 {
    font-size: clamp(2.75rem, 6.2vw, 5.9rem);
    margin-bottom: 1.1rem;
    max-width: 850px;
}

.hero-intro {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.6;
    max-width: 580px;
}

.raised-block {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.7rem;
    margin-top: clamp(32px, 6vw, 58px);
}

.raised-block > span:first-child { flex-basis: 100%; }

.raised-block span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
    font-weight: 650;
}

.raised-block strong {
    color: var(--highlight);
    font-size: clamp(2.7rem, 6vw, 5rem);
    letter-spacing: -0.065em;
    line-height: 1;
}

.progress-wrap { margin-top: 28px; }

.progress-labels {
    color: rgba(255, 255, 255, 0.74);
    display: flex;
    font-size: 0.82rem;
    font-weight: 720;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-track {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    height: 13px;
    overflow: hidden;
}

.progress-track span {
    background: linear-gradient(90deg, var(--brand), #ed4b4b);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 8px;
    position: relative;
}

.progress-track span::after {
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
    content: "";
    height: 8px;
    position: absolute;
    right: 2px;
    top: 2px;
    width: 8px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    gap: 0.75rem;
    justify-content: center;
    min-height: 50px;
    padding: 0.8rem 1.35rem;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button:focus-visible,
.text-link:focus-visible {
    outline: 3px solid var(--highlight);
    outline-offset: 3px;
}

.button-accent,
.button-primary {
    background: var(--brand);
    color: white;
}

.button-accent:hover,
.button-primary:hover { background: var(--brand-deep); }

.button-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.32);
    color: white;
}

.button-ghost:hover { background: rgba(255, 255, 255, 0.15); }

.button-dark {
    background: var(--ink);
    color: white;
}

.share-result {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    min-height: 1.2em;
    padding-top: 10px;
}

.metric-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

.metric-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid rgba(16, 37, 43, 0.08);
    border-radius: 22px;
    display: flex;
    gap: 16px;
    min-height: 128px;
    padding: 24px;
}

.metric-featured {
    background: var(--brand-soft);
    border-color: transparent;
}

.metric-icon {
    align-items: center;
    background: rgba(16, 37, 43, 0.07);
    border-radius: 50%;
    display: flex;
    font-size: 1rem;
    font-weight: 900;
    height: 45px;
    justify-content: center;
    width: 45px;
}

.metric-card div {
    display: grid;
    gap: 3px;
}

.metric-card strong {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    letter-spacing: -0.045em;
}

.metric-card div span {
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 650;
}

.content-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
}

.section-card {
    background: var(--surface);
    border: 1px solid rgba(16, 37, 43, 0.08);
    border-radius: 26px;
    padding: clamp(24px, 4vw, 40px);
}

.section-heading {
    align-items: start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading h2,
.details-card h2,
.closing-banner h2 {
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    margin-bottom: 0;
}

.section-heading > span {
    background: var(--paper);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.55rem 0.8rem;
    white-space: nowrap;
}

.product-list { border-top: 1px solid var(--line); }

.product-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 16px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 18px 0;
}

.product-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.product-rank {
    align-items: center;
    background: var(--paper);
    border-radius: 12px;
    color: var(--ink-soft);
    display: flex;
    font-size: 0.76rem;
    font-weight: 850;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.product-name,
.product-impact {
    display: grid;
    gap: 4px;
}

.product-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name span,
.product-impact span {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.product-impact { text-align: right; }
.product-impact strong { color: var(--brand-deep); }

.details-card {
    align-self: start;
    background: #f3f3f3;
}

.details-card > p:not(.eyebrow) {
    color: var(--ink-soft);
    line-height: 1.7;
    margin: 1.25rem 0 1.7rem;
}

.detail-list {
    border-bottom: 1px solid rgba(16, 37, 43, 0.12);
    border-top: 1px solid rgba(16, 37, 43, 0.12);
    margin: 0 0 1.5rem;
    padding: 0.5rem 0;
}

.detail-list div {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.detail-list dt {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.detail-list dd {
    font-size: 0.86rem;
    font-weight: 800;
    margin: 0;
    text-align: right;
}

.text-link {
    color: var(--brand-deep);
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
}

.text-link span { margin-left: 0.25rem; }

.closing-banner {
    align-items: center;
    background: var(--brand);
    border-radius: 26px;
    color: white;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 52px);
}

.closing-banner .eyebrow { color: rgba(255, 255, 255, 0.76); }
.closing-banner h2 { max-width: 720px; }

.state-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 185px);
    padding: 30px 20px 60px;
}

.state-card {
    background: var(--surface);
    border: 1px solid rgba(16, 37, 43, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
    max-width: 680px;
    padding: clamp(32px, 7vw, 70px);
    text-align: center;
    width: 100%;
}

.state-card h1 {
    font-size: clamp(2.1rem, 5vw, 4rem);
    margin-bottom: 1.2rem;
}

.state-card > p:not(.eyebrow):not(.request-id) {
    color: var(--ink-soft);
    line-height: 1.7;
    margin: 0 auto 1.8rem;
    max-width: 500px;
}

.status-lookup {
    margin: 0 auto;
    max-width: 560px;
    width: 100%;
}

.lookup-form {
    text-align: left;
}

.lookup-form .form-label {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
}

.lookup-form .form-control {
    border-color: var(--line);
    min-width: 0;
}

.lookup-form .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.25rem rgba(193, 0, 0, 0.12);
}

.lookup-form .btn-danger {
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 800;
    padding-inline: 1.35rem;
}

.lookup-form .btn-danger:hover,
.lookup-form .btn-danger:focus-visible {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
}

.lookup-error {
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0.65rem 0 0;
}

.lookup-store-link {
    color: var(--ink-soft);
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 750;
    margin-top: 1.3rem;
    text-decoration: none;
}

.lookup-store-link:hover,
.lookup-store-link:focus-visible {
    color: var(--brand);
}

.loading-ring {
    animation: spin 900ms linear infinite;
    border: 4px solid var(--brand-soft);
    border-radius: 50%;
    border-top-color: var(--brand);
    display: inline-block;
    height: 44px;
    margin-bottom: 1.5rem;
    width: 44px;
}

.loading-card h1 {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    margin-bottom: 0;
}

.empty-products {
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    padding: 2rem 0 0;
}

.request-id {
    color: var(--ink-soft);
    font-size: 0.72rem;
    margin: 2rem 0 0;
}

.site-footer {
    align-items: center;
    color: var(--ink-soft);
    display: flex;
    font-size: 0.78rem;
    justify-content: space-between;
    min-height: 100px;
}

.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--brand); }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
    .hero-card { min-height: auto; }
    .content-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(3, 1fr); }

    .metric-card {
        align-items: start;
        flex-direction: column;
        min-height: 150px;
    }
}

@media (max-width: 620px) {
    .site-footer,
    .dashboard { width: calc(100% - 24px); }

    .lookup-form .input-group {
        align-items: stretch;
        flex-direction: column;
    }

    .lookup-form .form-control,
    .lookup-form .btn {
        border-radius: 0.5rem !important;
        width: 100%;
    }

    .lookup-form .btn {
        margin-top: 10px;
    }

    .dashboard { padding-top: 12px; }

    .hero-card {
        border-radius: 22px;
        padding: 30px 22px;
    }

    .hero-glow-one {
        height: 210px;
        right: -105px;
        top: -85px;
        width: 210px;
    }

    .raised-block { margin-top: 34px; }

    .progress-labels {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .hero-actions { display: grid; }
    .button { width: 100%; }
    .metric-grid { gap: 10px; }

    .metric-card {
        gap: 9px;
        min-height: 138px;
        padding: 16px 13px;
    }

    .metric-icon {
        height: 34px;
        width: 34px;
    }

    .metric-card strong { font-size: clamp(1.05rem, 5vw, 1.35rem); }
    .metric-card div span { font-size: 0.68rem; }

    .section-card {
        border-radius: 22px;
        padding: 24px 20px;
    }

    .section-heading { align-items: end; }

    .product-row {
        gap: 11px;
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .product-rank {
        border-radius: 10px;
        height: 34px;
        width: 34px;
    }

    .product-impact strong,
    .product-name strong { font-size: 0.88rem; }

    .closing-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .loading-ring { animation-duration: 2s; }
}
