:root {
    --det-ink: #181b20;
    --det-panel: #252930;
    --det-panel-soft: #303641;
    --det-muted: #667080;
    --det-line: #d8dee8;
    --det-soft: #f4f6f9;
    --det-white: #ffffff;
    --det-accent: #bd2332;
    --det-accent-dark: #941827;
    --det-blue: #1e5f8f;
    --det-green: #247a4b;
    --det-focus: rgba(189, 35, 50, .24);
    --det-shadow: 0 20px 60px rgba(20, 25, 34, .14);
}

* {
    box-sizing: border-box;
}

html {
    color: var(--det-ink);
    background: #f7f8fa;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body {
    margin: 0;
}

.det-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.det-skip-link {
    background: var(--det-white);
    border: 2px solid var(--det-accent);
    border-radius: 6px;
    color: var(--det-ink);
    font-weight: 900;
    left: 16px;
    padding: 10px 14px;
    position: fixed;
    top: 12px;
    transform: translateY(-160%);
    transition: transform .18s ease;
    z-index: 1000;
}

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

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.det-page {
    min-height: 100vh;
}

.det-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

.det-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 42%),
        var(--det-panel);
    color: var(--det-white);
    padding: 38px 0 30px;
}

.det-kicker {
    color: rgba(255, 255, 255, .86);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.det-hero h1 {
    font-size: 2.55rem;
    line-height: 1.08;
    letter-spacing: 0;
    margin: 0;
}

.det-intro {
    color: rgba(255, 255, 255, .86);
    font-size: 1rem;
    max-width: 760px;
    margin: 10px 0 22px;
}

.det-search {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .15);
}

.det-fieldset {
    align-items: end;
    border: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1.4fr) minmax(150px, .7fr) minmax(150px, .7fr) minmax(190px, .9fr) minmax(160px, auto);
    margin: 0;
    min-inline-size: 0;
    padding: 0;
}

.det-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.det-field label {
    color: rgba(255, 255, 255, .9);
    font-size: .88rem;
    font-weight: 800;
}

.det-field input,
.det-field select {
    appearance: none;
    background: var(--det-white);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 6px;
    color: var(--det-ink);
    font: inherit;
    min-height: 48px;
    outline: none;
    padding: 11px 12px;
    width: 100%;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.det-field select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--det-muted) 50%),
        linear-gradient(135deg, var(--det-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 21px,
        calc(100% - 12px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.det-field input:focus-visible,
.det-field select:focus-visible,
.det-submit:focus-visible,
.det-reset:focus-visible,
.det-chip:focus-visible,
.det-shop-button:focus-visible,
.det-pagination a:focus-visible,
.det-skip-link:focus-visible {
    box-shadow: 0 0 0 4px var(--det-focus);
    outline: 2px solid transparent;
}

.det-field input:focus-visible,
.det-field select:focus-visible {
    border-color: var(--det-accent);
}

.det-submit,
.det-shop-button {
    align-items: center;
    background: var(--det-accent);
    border: 0;
    border-radius: 6px;
    color: var(--det-white);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 900;
    justify-content: center;
    min-height: 48px;
    padding: 11px 16px;
    text-align: center;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.det-submit:hover,
.det-shop-button:hover {
    background: var(--det-accent-dark);
    color: var(--det-white);
    transform: translateY(-1px);
}

.det-reset {
    color: rgba(255, 255, 255, .82);
    display: inline-block;
    font-size: .94rem;
    font-weight: 700;
    margin-top: 12px;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.det-reset:hover {
    color: var(--det-white);
}

.det-content {
    padding-top: 24px;
    padding-bottom: 44px;
    scroll-margin-top: 16px;
}

.det-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.det-summary {
    color: var(--det-muted);
    margin: 0;
}

.det-summary strong {
    color: var(--det-ink);
    font-size: 1.18rem;
    font-weight: 950;
    margin-right: 4px;
}

.det-chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.det-chip {
    align-items: center;
    background: var(--det-white);
    border: 1px solid var(--det-line);
    border-radius: 999px;
    color: var(--det-ink);
    display: inline-flex;
    font-size: .88rem;
    font-weight: 800;
    gap: 7px;
    min-height: 36px;
    max-width: 100%;
    padding: 6px 8px 6px 12px;
    text-decoration: none;
}

.det-chip span {
    align-items: center;
    background: var(--det-soft);
    border: 1px solid var(--det-line);
    border-radius: 50%;
    color: var(--det-muted);
    display: inline-flex;
    height: 22px;
    justify-content: center;
    line-height: 1;
    width: 22px;
}

.det-chip:hover {
    border-color: var(--det-accent);
    color: var(--det-accent);
}

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

.det-card {
    background: var(--det-white);
    border: 1px solid var(--det-line);
    border-radius: 8px;
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.det-card:hover {
    border-color: rgba(189, 35, 50, .42);
    box-shadow: var(--det-shadow);
    transform: translateY(-2px);
}

.det-cover {
    align-items: center;
    aspect-ratio: 4 / 5;
    background:
        linear-gradient(135deg, rgba(189, 35, 50, .12), rgba(30, 95, 143, .10)),
        var(--det-soft);
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 14px;
}

.det-cover img {
    display: block;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
    width: 100%;
}

.det-card:hover .det-cover img {
    transform: scale(1.02);
}

.det-cover-placeholder {
    align-items: center;
    color: var(--det-muted);
    display: flex;
    font-weight: 900;
    height: 100%;
    justify-content: center;
    padding: 18px;
    text-align: center;
}

.det-card-body {
    display: grid;
    gap: 12px;
    grid-template-rows: auto auto auto 1fr auto;
    padding: 18px;
}

.det-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.det-badge {
    background: var(--det-soft);
    border: 1px solid var(--det-line);
    border-radius: 999px;
    color: var(--det-ink);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 4px 8px;
}

.det-badge-dark {
    background: var(--det-panel-soft);
    border-color: var(--det-panel-soft);
    color: var(--det-white);
}

.det-badge-live {
    background: rgba(36, 122, 75, .10);
    border-color: rgba(36, 122, 75, .28);
    color: var(--det-green);
}

.det-card h2 {
    color: var(--det-ink);
    font-size: 1.16rem;
    line-height: 1.28;
    letter-spacing: 0;
    margin: 0;
}

.det-meta {
    color: var(--det-blue);
    font-size: .9rem;
    font-weight: 800;
    margin: 0;
}

.det-excerpt {
    color: var(--det-muted);
    font-size: .94rem;
    margin: 0;
}

.det-card-actions {
    align-self: end;
}

.det-shop-button {
    width: 100%;
}

.det-empty {
    background:
        linear-gradient(135deg, rgba(189, 35, 50, .08), rgba(30, 95, 143, .08)),
        var(--det-white);
    border: 1px solid var(--det-line);
    border-radius: 8px;
    padding: 24px;
}

.det-empty h2 {
    font-size: 1.18rem;
    margin: 0 0 6px;
}

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

.det-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.det-pagination a {
    align-items: center;
    background: var(--det-white);
    border: 1px solid var(--det-line);
    border-radius: 6px;
    color: var(--det-ink);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 8px 12px;
    text-decoration: none;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.det-pagination a:hover {
    border-color: var(--det-accent);
    color: var(--det-accent);
}

.det-pagination .is-current {
    background: var(--det-panel);
    border-color: var(--det-panel);
    color: var(--det-white);
}

@media (max-width: 980px) {
    .det-fieldset {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .det-field-wide {
        grid-column: 1 / -1;
    }

    .det-submit {
        grid-column: 1 / -1;
    }

    .det-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .det-shell {
        padding: 0 14px;
    }

    .det-hero {
        padding: 26px 0 22px;
    }

    .det-hero h1 {
        font-size: 2rem;
    }

    .det-cover {
        padding: 10px;
    }

    .det-fieldset,
    .det-results {
        grid-template-columns: 1fr;
    }

    .det-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .det-chips {
        align-items: stretch;
        flex-direction: column;
    }

    .det-chip {
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
