/* Reuse the purple, lavender, and ink colors from PickAWinner. */
.discovery-main {
    --discovery-purple: #635bff;
    --discovery-ink: #182433;
    --discovery-muted: #66758a;
    --discovery-lavender: #f3f1ff;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 28px;
    min-height: 65vh;
}

.discovery-heading { margin-bottom: 28px; }
.discovery-heading h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -1px; }

.discovery-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e0e4f5;
    border-radius: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 30px #635bff08;
}

.discovery-filters label { display: grid; gap: 7px; font-weight: 600; }
.discovery-filters .discovery-check { display: flex; align-items: center; gap: 8px; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 24px 0; }

.discovery-card {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e3dfff;
    box-shadow: 0 6px 12px #30266c06, 0 16px 36px #30266c12;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.discovery-card:hover {
    transform: translateY(-4px);
    border-color: #b5afff;
    box-shadow: 0 10px 20px #30266c0d, 0 22px 44px #30266c1c;
}

.discovery-card:focus-within { outline: 3px solid var(--discovery-purple); outline-offset: 4px; }
.discovery-card-link { display: flex; flex-direction: column; height: 100%; color: var(--discovery-ink); text-decoration: none; }
.discovery-card-link:hover { color: var(--discovery-ink); text-decoration: none; }
.discovery-card-link:focus-visible { outline: none; }
.discovery-card-link > img, .discovery-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eeecff; }
.discovery-placeholder { display: grid; place-items: center; color: var(--discovery-purple); font-size: 24px; }
.discovery-card-content { padding: 20px 22px 24px; display: flex; flex: 1; flex-direction: column; gap: 14px; }
.discovery-card h2 { font-size: 21px; line-height: 1.4; font-weight: 750; margin: 0; color: var(--discovery-ink); }
.discovery-card p { margin: 0; }
.discovery-host { color: #6250bd; font-size: 13px; font-weight: 650; }
.discovery-meta { font-size: 14px; line-height: 1.6; color: var(--discovery-muted); }


.discovery-deadline > svg { width: 19px; height: 19px; flex: 0 0 auto; }

.discovery-deadline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e2dcff;
    background: var(--discovery-lavender);
    border-radius: 12px;
    color: #6250bd;
}

.discovery-deadline span { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 750; }
.discovery-deadline strong { display: block; font-size: 14px; line-height: 1.5; font-weight: 750; color: #352964; }
.discovery-instructions { border-top: 1px solid #eeeaf8; padding-top: 16px; }
.discovery-instructions h3, .discovery-instructions h2 { margin: 0 0 14px; font-size: 15px; font-weight: 750; color: #443580; }
.discovery-instructions ol { list-style: none; counter-reset: entry-step; padding: 0; margin: 0; }
.discovery-instructions li { counter-increment: entry-step; position: relative; padding-left: 34px; margin: 0 0 12px; font-size: 14px; line-height: 1.65; color: #354256; }
.discovery-instructions li::before { content: counter(entry-step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; background: #eeecff; color: #635bff; font-size: 12px; font-weight: 750; }
.discovery-more-steps { font-size: 12px; font-weight: 650; color: #6250bd; }
.discovery-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; margin: 24px 0; }
.discovery-detail > div { min-width: 0; }
.discovery-hero { display: block; width: 100%; max-height: 600px; object-fit: contain; border-radius: 14px; background: #fff; }
.discovery-detail h1 { font-size: 30px; color: var(--discovery-ink); }
.discovery-detail h2 { font-size: 22px; margin-top: 24px; }
.discovery-detail h3 { font-size: 18px; margin-top: 20px; }
.discovery-detail li { margin: 8px 0; }
.discovery-detail .discovery-deadline { margin: 20px 0; }
.discovery-detail .discovery-instructions { background: #f8f7ff; padding: 20px; border: 1px solid #e9e5ff; border-radius: 14px; }
.discovery-detail .discovery-instructions h2 { margin-top: 0; font-size: 18px; }
.discovery-detail .discovery-instructions li { margin-bottom: 14px; }
.discovery-caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.discovery-detail details { border-top: 1px solid #e0e4f5; padding: 16px 0; margin-top: 16px; }
.discovery-detail summary { font-weight: 600; cursor: pointer; }
#discovery-pagination { display: flex; gap: 16px; align-items: center; margin: 24px 0; }
#discovery-modal { width: calc(100% - 48px); max-width: 1040px; max-height: 90dvh; border: 1px solid #e3dfff; border-radius: 22px; padding: 28px; background: #fff; color: #182433; box-shadow: 0 28px 90px #30266c40; }
#discovery-modal::backdrop { background: #21183d99; backdrop-filter: blur(5px); }
.discovery-close { display: block; margin-left: auto; }
.discovery-thumbnails { display: flex; gap: 8px; overflow: auto; }
.discovery-thumbnails img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
    .discovery-card { transition: none; }
    .discovery-card:hover { transform: none; }
}

@media (max-width: 1000px) {
    .discovery-grid, .discovery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .discovery-main { padding: 0 16px; margin-top: 24px; }
    .discovery-grid, .discovery-filters, .discovery-detail { grid-template-columns: 1fr; }
    .discovery-filters { padding: 16px; }
    #discovery-modal { width: 100%; height: 100dvh; max-height: 100dvh; max-width: 100%; margin: 0; border: 0; border-radius: 0; padding: 20px; }
    .discovery-hero { max-height: 360px; }
}
/* Discovery uses its own browsing header and the same sticky behavior as draw rules. */
.discovery-site-header { padding: 0; }
.discovery-header-inner {
    width: min(1460px, 100%);
    margin: auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.discovery-brand img { display: block; width: 220px; height: auto; }
.discovery-header-title { color: #6250bd; font-size: 15px; font-weight: 700; }
.discovery-main { max-width: 1460px; }
.discovery-searchbar { display: flex; gap: 12px; margin-bottom: 28px; scroll-margin-top: 20px; }
.discovery-searchbar input { flex: 1; min-width: 0; background: white; }
.discovery-searchbar > .btn { padding-inline: 28px; }
#discovery-filter-toggle { display: none; }
.discovery-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; }
.discovery-sidebar { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 18px; box-shadow: 0 10px 34px #30266c12; }
.discovery-sidebar .discovery-filters { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 22px; border-color: #e3dfff; box-shadow: none; }
.discovery-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.discovery-filter-heading h2 { margin: 0; color: #352964; font-size: 18px; }
.discovery-clear { padding: 0; border: 0; background: none; color: #6250bd; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.discovery-sidebar label { font-size: 13px; }
.discovery-sidebar .discovery-check { align-items: flex-start; font-weight: 500; line-height: 1.5; }
.discovery-check input { margin-top: 3px; accent-color: #635bff; }
.discovery-filter-note { color: #66758a; font-size: 12px; line-height: 1.7; margin: 0; }
.discovery-results { min-width: 0; }
.discovery-results #discovery-status { margin: 0 0 16px; font-weight: 600; color: #443580; }
.discovery-results .discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; gap: 24px; }
.discovery-applied-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.discovery-applied-filters:empty { display: none; }
.discovery-filter-chip { padding: 7px 12px; border-radius: 20px; border: 1px solid #ddd6ff; color: #443580; background: #f3f1ff; font-size: 13px; cursor: pointer; }
#discovery-pagination { flex-wrap: wrap; gap: 8px; padding: 20px 0; border-top: 1px solid #e3dfff; }
#discovery-pagination .btn { min-width: 42px; display: inline-flex; justify-content: center; align-items: center; }
#discovery-pagination [aria-disabled="true"] { opacity: .45; cursor: default; }
.discovery-page-summary { margin-left: auto; color: #66758a; font-size: 13px; }
.discovery-page-gap { padding: 0 5px; }

@media (min-width: 1440px) {
    .discovery-results .discovery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .discovery-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    #discovery-filter-toggle { display: inline-flex; align-items: center; }
    .discovery-sidebar { display: none; position: static; max-height: none; }
    .discovery-sidebar.is-open { display: block; }
    .discovery-sidebar .discovery-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .discovery-filter-heading, .discovery-filter-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .discovery-header-inner { padding: 16px; gap: 12px; }
    .discovery-brand img { width: 165px; }
    .discovery-header-title { font-size: 12px; max-width: 100px; text-align: right; }
    .discovery-searchbar { flex-wrap: wrap; gap: 8px; }
    .discovery-searchbar input { flex-basis: 100%; }
    .discovery-searchbar > .btn { flex: 1; }
    .discovery-sidebar .discovery-filters, .discovery-results .discovery-grid { grid-template-columns: 1fr; }
    .discovery-page-summary { flex-basis: 100%; margin: 8px 0 0; }
}
/* Give the discovery workspace its own expression of PickAWinner's palette. */
.discovery-site-header {
    border-bottom: 1px solid #d9c4ed;
}

.discovery-header-title {
    padding: 8px 15px;
    border: 1px solid #e4d6f9;
    border-radius: 999px;
    background: #f6f0ff;
    color: #6834ae;
    font-size: 12px;
    letter-spacing: .03em;
}

.discovery-heading {
    position: relative;
    overflow: hidden;
    margin: 0 0 28px;
    padding: 34px 38px;
    border: 1px solid #e7dcf5;
    border-radius: 24px;
    background: radial-gradient(ellipse at 100% 0, #f4ddf6 0, transparent 55%),
        linear-gradient(115deg, #fff 0%, #faf5ff 62%, #f4edff 100%);
    box-shadow: 0 10px 40px #5a31800a;
}

.discovery-heading::after {
    content: "✦";
    position: absolute;
    right: 50px;
    top: -40px;
    color: #8147d10c;
    font-size: 220px;
    line-height: 1;
    pointer-events: none;
}

.discovery-heading .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: #7a3fc1;
    letter-spacing: .14em;
    font-size: 10px;
}

.discovery-heading .eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9852df;
    box-shadow: 0 0 0 4px #9852df14;
}

.discovery-heading h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #302048;
    font-weight: 800;
    font-size: clamp(30px, 3.8vw, 49px);
    line-height: 1.12;
    letter-spacing: -1.6px;
}

.discovery-heading > p:last-child {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #786785;
    font-size: 15px;
    line-height: 1.7;
}

.discovery-searchbar {
    padding: 9px;
    border: 1px solid #e6ddf2;
    border-radius: 18px;
    background: white;
    box-shadow: 0 6px 24px #4c28600a;
}

.discovery-searchbar .form-control {
    min-height: 48px;
    padding-left: 43px;
    border: 0;
    box-shadow: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23927aa9' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") no-repeat 13px center / 20px;
}

.discovery-searchbar .btn {
    border-radius: 12px;
}

.discovery-sidebar {
    border: 1px solid #e8ddf4;
    background: white;
    scrollbar-width: thin;
    scrollbar-color: #d9c8ec transparent;
    box-shadow: 0 5px 12px #38204c04, 0 18px 44px #38204c0d;
}

.discovery-sidebar .discovery-filters {
    border: 0;
    border-radius: 0;
    gap: 16px;
    padding: 0 22px 22px;
}

.discovery-filter-heading {
    margin: 0 -22px 3px;
    padding: 20px 22px;
    background: linear-gradient(120deg, #f1e8fc, #faf5ff);
    border-bottom: 1px solid #e9def5;
}

.discovery-filter-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #553077;
}

.discovery-filter-heading h2::before {
    content: "";
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23733db5' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 17h16'/%3E%3Ccircle cx='9' cy='7' r='3' fill='%23f4edfc'/%3E%3Ccircle cx='15' cy='17' r='3' fill='%23f4edfc'/%3E%3C/svg%3E") center / contain no-repeat;
}

.discovery-clear {
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    color: #895cad;
}

.discovery-clear:hover { color: #59239a; text-decoration: underline; }
.discovery-sidebar label { color: #685572; font-size: 12px; font-weight: 650; }
.discovery-sidebar .form-control, .discovery-sidebar .form-select {
    min-height: 43px;
    border-color: #e8dff0;
    background-color: #fcfaff;
    border-radius: 10px;
    font-size: 13px;
    color: #493653;
    transition: border-color .15s, box-shadow .15s;
}

.discovery-sidebar .form-control:focus, .discovery-sidebar .form-select:focus {
    border-color: #a778db;
    box-shadow: 0 0 0 3px #a778db18;
    background-color: white;
}

.discovery-sidebar .discovery-check {
    padding: 12px;
    border-radius: 10px;
    background: #f6f0fc;
    color: #6a4b80;
}

.discovery-filter-note {
    padding-top: 14px;
    border-top: 1px solid #eee6f5;
    font-size: 11px;
    color: #95839f;
}

.discovery-results #discovery-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 26px;
    color: #786586;
    font-size: 13px;
    font-weight: 500;
}

.discovery-results #discovery-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9c67cf;
}

.discovery-card { border-color: #e9e1f1; box-shadow: 0 4px 12px #38204c05, 0 15px 35px #38204c0c; }
.discovery-card h2 { font-size: 19px; line-height: 1.45; color: #30213e; }
.discovery-card .discovery-host { color: #8b58b6; font-size: 12px; }
.discovery-deadline { border-color: #e9def8; background: linear-gradient(110deg, #f4edfc, #faf7ff); }
.discovery-instructions li::before { background: #f0e6fc; color: #8049b8; }

#discovery-pagination {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid #e8dff1;
    border-radius: 16px;
    background: #ffffffd9;
    box-shadow: 0 6px 20px #38204c05;
}

#discovery-pagination .btn { border-radius: 10px; }
#discovery-pagination .btn-outline-primary { border-color: #e7dcf2; color: #8255a5; }
#discovery-pagination [aria-current="page"] { box-shadow: 0 4px 12px #7542bf24; }

@media (max-width: 900px) {
    .discovery-sidebar .discovery-filters { padding-top: 0; }
}

@media (max-width: 640px) {
    .discovery-heading { padding: 26px 22px; border-radius: 18px; }
    .discovery-heading::after { right: -35px; top: -10px; font-size: 170px; }
    .discovery-heading h1 { letter-spacing: -1px; }
    .discovery-heading > p:last-child { font-size: 13px; }
    .discovery-searchbar { padding: 8px; }
    #discovery-pagination { padding: 14px; }
}
.discovery-select-field { display: grid; gap: 7px; min-width: 0; }
.discovery-select-label { color: #685572; font-size: 12px; font-weight: 650; }
.discovery-select-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #dfcdeb;
    border-radius: 11px;
    background: linear-gradient(115deg, #fcf9ff, #fff);
    box-shadow: inset 0 1px 0 #fff;
    color: #5e348b;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
.discovery-select-trigger > svg { width: 18px; height: 18px; flex-shrink: 0; color: #8c5cb6; }
.discovery-select-trigger > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-select-chevron { margin-left: auto; font-size: 17px; flex-shrink: 0; }
.discovery-select-trigger[aria-expanded="true"] { background: #f1e5fc; border-color: #ac80d3; }
.discovery-select-trigger[aria-expanded="true"] .discovery-select-chevron { transform: rotate(180deg); }
.discovery-select-trigger:focus-visible { outline: 3px solid #9a71e5; outline-offset: 3px; }
.discovery-select-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid #e1d0ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 48px #43205c24;
    color: #3d2453;
    scrollbar-width: thin;
    scrollbar-color: #d9c8ec transparent;
}
.discovery-select-menu::backdrop { background: transparent; }
.discovery-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #513664;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.discovery-select-option > svg { flex-shrink: 0; width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #f3eafb; color: #8546bc; }
.discovery-select-option > span:first-of-type { flex: 1; }
.discovery-select-option:hover, .discovery-select-option:focus-visible { outline: none; background: #faf5ff; border-color: #e4d2f5; }
.discovery-select-option[aria-selected="true"] { background: #f4edfc; border-color: #e7d8f8; font-weight: 650; }
.discovery-option-count { padding: 2px 7px; border-radius: 6px; background: #eee3fa; color: #8860a3; font-size: 11px; }
.discovery-option-check { color: #8241bb; font-weight: 700; }
/* Lavender, peach, and mint from the PickAWinner plan and instruction cards. */
.discovery-main {
    --discovery-lavender: #ecdfff;
    --discovery-peach: #ffe3d1;
    --discovery-mint: #d5f0e5;
}

.discovery-heading {
    border-color: #d6b4f1;
    background: linear-gradient(110deg, #ecdffd 0%, #f5e6f5 56%, #ffe7d4 100%);
    box-shadow: 0 10px 35px #65338812;
}

.discovery-heading .eyebrow { color: #75409c; }
.discovery-heading > p:last-child { color: #604e72; }
.discovery-searchbar { border-color: #d9bdf0; box-shadow: 0 6px 22px #66358c10; }
.discovery-filter-heading { background: #e8d5f7; border-bottom-color: #d4b5ed; }
.discovery-sidebar { border-color: #d4b5ed; }
.discovery-sidebar .discovery-check { background: #dff1e9; color: #276b54; }
.discovery-check input { accent-color: #318c6b; }
.discovery-filter-chip { background: #ecdfff; border-color: #d5b8f2; color: #6434a0; }

.discovery-card { border-color: #d8c4ed; }
.discovery-card:hover { border-color: #b78cde; }
.discovery-deadline { background: #ffe5d3; border-color: #f2c7a9; color: #ae561f; }
.discovery-deadline strong { color: #75401d; }
.discovery-deadline span { color: #a45122; }
.discovery-deadline > svg { color: #bc642d; }

.discovery-instructions {
    padding: 16px;
    background: #f0f9f5;
    border: 1px solid #cce8dc;
    border-radius: 12px;
}
.discovery-instructions h3, .discovery-instructions h2 { color: #256c53; }
.discovery-instructions li::before { background: #e8d7fc; color: #7934bb; }
.discovery-instructions li:nth-child(3n + 2)::before { background: #ffe1cd; color: #b34e19; }
.discovery-instructions li:nth-child(3n)::before { background: #cdeedf; color: #1b7a58; }
.discovery-more-steps { color: #3d7e67; }
.discovery-detail .discovery-instructions { background: #eff9f4; border-color: #cce8dc; }

.discovery-category-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 8px;
    background: #ecdfff;
    color: #7137a7;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.5;
}
.discovery-category-badge > svg { width: 16px; height: 16px; flex-shrink: 0; }
.discovery-category-badge[data-tone="peach"] { background: #ffe3d1; color: #a94d1c; }
.discovery-category-badge[data-tone="mint"] { background: #d5f0e5; color: #247355; }
.discovery-select-option > svg[data-tone="peach"] { background: #ffe3d1; color: #af5424; }
.discovery-select-option > svg[data-tone="mint"] { background: #d5f0e5; color: #277c5d; }
.discovery-select-option > svg[data-tone="lavender"] { background: #ecdfff; color: #793ab5; }
.discovery-select-trigger > svg[data-tone="peach"] { color: #af5424; }
.discovery-select-trigger > svg[data-tone="mint"] { color: #277c5d; }
/* Sky blue keeps participation instructions distinct from other card accents. */
.discovery-instructions,
.discovery-detail .discovery-instructions {
    background: #eff7ff;
    border-color: #c9e2f5;
}

.discovery-instructions h3,
.discovery-instructions h2 {
    color: #28638b;
}

.discovery-more-steps {
    color: #3b769c;
}
/* The discovery logo replaces the large introduction banner. */
.discovery-brand img { width: 360px; max-width: 100%; height: auto; }
.discovery-header-inner { min-height: 92px; }
.discovery-main { margin-top: 28px; }
.site-tools-icon img { display: block; width: 28px; height: 28px; object-fit: contain; }
@media (max-width: 640px) {
    .discovery-brand img { width: 205px; }
    .discovery-header-inner { min-height: 88px; }
    .discovery-main { margin-top: 20px; }
}
@media (max-width: 380px) {
    .discovery-brand img { width: 170px; }
}
/* Standalone Discovery mark; no adjacent wordmark. */
.discovery-brand { display: inline-flex; align-items: center; }
.discovery-brand img { display: block; width: 76px; height: 76px; }
.discovery-header-inner { min-height: 92px; padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 640px) {
    .discovery-brand img { width: 64px; height: 64px; }
    .discovery-header-inner { min-height: 80px; }
}
/* Present plus the outlined Giveaway Discovery name. */
.discovery-brand img { width: 380px; max-width: 100%; height: auto; }
@media (max-width: 640px) {
    .discovery-brand img { width: 260px; height: auto; }
}
@media (max-width: 380px) {
    .discovery-brand img { width: 205px; height: auto; }
}

/* Match the rendered lettering sizes of the PickAWinner header logo. */
.discovery-brand img { width: 346.4px; height: auto; }
@media (max-width: 1100px) { .discovery-brand img { width: 254.0px; } }
@media (max-width: 700px) { .discovery-brand img { width: 207.8px; } }
@media (max-width: 480px) { .discovery-brand img { width: 170.9px; } }

.discovery-brand img { width: 424.8px; height: auto; }
@media (max-width: 1100px) { .discovery-brand img { width: 311.5px; } }
@media (max-width: 700px) { .discovery-brand img { width: 254.9px; } }
@media (max-width: 480px) { .discovery-brand img { width: 209.5px; } }

/* WinQuest keeps the PickAWinner title and slogan at matching type sizes. */
.discovery-brand img { width: 249.5px; height: auto; }
@media (max-width: 1100px) { .discovery-brand img { width: 183.0px; } }
@media (max-width: 700px) { .discovery-brand img { width: 149.7px; } }
@media (max-width: 480px) { .discovery-brand img { width: 123.1px; } }
/* WinQuest details: compact chrome with an independently scrolling content area. */
#discovery-modal {
    width: calc(100% - 48px);
    max-width: 1120px;
    max-height: 90dvh;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dbc7ee;
    border-radius: 24px;
    background: #fffcff;
    box-shadow: 0 30px 100px #29143945;
}

#discovery-modal-content {
    max-height: 90dvh;
    overflow-y: auto;
    padding: 28px;
    scrollbar-width: thin;
    scrollbar-color: #d6c1e9 transparent;
}

#discovery-modal .discovery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid #dfcdec;
    border-radius: 50%;
    background: #fffaf5f5;
    box-shadow: 0 3px 10px #39204f0d;
    color: #6c4191;
    cursor: pointer;
}

#discovery-modal .discovery-close svg { width: 18px; height: 18px; }
#discovery-modal .discovery-close:hover { background: #eedffc; color: #5928d9; }
#discovery-modal .discovery-close:focus-visible { outline: 3px solid #a77ad9; outline-offset: 3px; }
#discovery-modal .discovery-detail { margin: 0; gap: 28px; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); align-items: start; }

#discovery-modal .discovery-detail-media {
    position: sticky;
    top: 0;
    align-self: start;
    overflow: hidden;
    border: 1px solid #e1d1f0;
    border-radius: 17px;
    background: #f5edfc;
    box-shadow: 0 8px 24px #44265a0b;
}

#discovery-modal .discovery-hero {
    max-height: calc(90dvh - 125px);
    border-radius: 0;
    background: #f5edfc;
}

#discovery-modal .discovery-detail-media:has(.discovery-thumbnails) .discovery-hero { max-height: calc(90dvh - 230px); }
#discovery-modal .discovery-thumbnails { padding: 10px; background: #faf5ff; }
#discovery-modal .discovery-thumbnails img { width: 72px; height: 72px; }
#discovery-modal .discovery-detail-body { padding: 3px 0 0; }
#discovery-modal .discovery-detail h1 { margin: 0 32px 10px 0; font-size: clamp(23px, 2.5vw, 29px); font-weight: 750; line-height: 1.25; letter-spacing: -.5px; color: #302044; }
#discovery-modal .discovery-detail-host { margin: 0 0 8px; font-weight: 650; color: #814ab3; font-size: 14px; }
#discovery-modal .discovery-meta { color: #85718f; font-size: 12px; line-height: 1.7; margin-bottom: 16px; }
#discovery-modal .discovery-deadline { margin: 18px 0; padding: 15px 17px; border-radius: 13px; }
#discovery-modal .discovery-instructions { padding: 20px; border-radius: 14px; box-shadow: 0 3px 10px #367caa04; }
#discovery-modal .discovery-instructions h2 { font-size: 17px; }
#discovery-modal .discovery-instructions li:last-child { margin-bottom: 0; }

.discovery-detail-panel {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #e1d1f0;
    border-radius: 14px;
    background: #f5edfc;
}

#discovery-modal .discovery-detail-panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #67428a; }
#discovery-modal .discovery-detail-panel ul { margin: 0; padding-left: 19px; }
#discovery-modal .discovery-detail-panel li { font-size: 13px; line-height: 1.75; color: #534061; }
#discovery-modal .discovery-detail-panel li:last-child { margin-bottom: 0; }
.discovery-bonus-panel { border-color: #bfe2d4; background: #eaf7f0; }
#discovery-modal .discovery-bonus-panel h3 { color: #33795d; }
.discovery-summary-note { margin: 18px 0; padding-left: 12px; border-left: 3px solid #dbc4ef; color: #8a7698; font-size: 12px; line-height: 1.75; }
#discovery-modal .discovery-detail details { margin-top: 16px; padding: 15px 17px; border: 1px solid #e7daef; border-radius: 12px; background: #fff; }
#discovery-modal .discovery-detail summary { color: #76518d; font-size: 13px; }
#discovery-modal .discovery-detail details p { margin: 16px 0 0; color: #65536e; font-size: 13px; line-height: 1.8; }
.discovery-permalink { display: inline-block; margin-top: 18px; color: #8a5aaa; font-size: 12px; }

@media (max-width: 700px) {
    #discovery-modal { width: calc(100% - 20px); max-height: 94dvh; height: auto; margin: auto; border: 1px solid #dbc7ee; border-radius: 18px; }
    #discovery-modal-content { padding: 20px; max-height: 94dvh; }
    #discovery-modal .discovery-detail { grid-template-columns: 1fr; gap: 22px; }
    #discovery-modal .discovery-detail-media { position: static; }
    #discovery-modal .discovery-hero { max-height: 45dvh; }
    #discovery-modal .discovery-detail-media:has(.discovery-thumbnails) .discovery-hero { max-height: 38dvh; }
    #discovery-modal .discovery-detail h1 { margin-right: 0; }
}
/* Standalone pages keep the image's natural proportions inside a single media frame. */
.discovery-standalone { align-items: start; }
.discovery-share-media {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ddc9ee;
    border-radius: 17px;
    background: #f5edfc;
    box-shadow: 0 8px 24px #44265a0b;
}
.discovery-share-media .discovery-hero {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 0;
    object-fit: contain;
}
.discovery-share-media .discovery-thumbnails { padding: 10px; }
