.match-discovery {
    --match-ink: #342d21;
    --match-muted: #655d50;
    --match-tint: #f0eadf;
    --match-border: var(--color-linen, #e2d3c4);
    --match-accent: var(--color-earth, #605b40);
    --match-radius: 1.125rem;
    background: var(--color-cream, #f9f4ee);
    color: var(--match-ink);
    padding: .75rem 0 3.5rem;
    overflow-x: clip;
    overflow-wrap: anywhere;
}
.match-discovery [hidden] { display: none !important; }
.match-discovery :focus-visible { outline: 2px solid var(--match-accent); outline-offset: 3px; }
.match-discovery :is([id], [tabindex="-1"], .match-deck) { scroll-margin-top: 5.25rem; }
.match-shell { width: min(100% - 2rem, 67rem); margin: 0 auto; }
.match-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.match-discovery svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.match-topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--match-border); padding: .25rem 0 .75rem; }
.match-brand, .match-top-links, .match-shortlist > summary { display: inline-flex; gap: .45rem; align-items: center; }
.match-brand { font-weight: 700; }
.match-top-links { gap: .5rem 1rem; flex-wrap: wrap; font-size: .9rem; }
.match-top-links > a, .match-text-link, .match-aux a, .match-notice a { text-decoration: underline; text-underline-offset: .2em; font-weight: 650; }
.match-shortlist > summary { cursor: pointer; min-height: 2.75rem; padding: .35rem .65rem; border: 1px solid var(--match-border); background: white; border-radius: .65rem; font-weight: 700; }
.match-shortlist summary::-webkit-details-marker, .match-card-details summary::-webkit-details-marker { display: none; }
.match-shortlist summary::marker, .match-card-details summary::marker { content: ''; }
.match-count { min-width: 1.4rem; padding: 0 .25rem; text-align: center; background: var(--match-tint); border-radius: 1rem; font-variant-numeric: tabular-nums; }
.match-shortlist-panel { position: absolute; inset: 100% 0 auto auto; width: min(100%, 24rem); background: white; border: 1px solid var(--match-border); border-radius: .8rem; padding: .9rem; box-shadow: 0 .5rem 1.5rem #342d211a; }
.match-shortlist-panel p { margin: 0 0 .5rem; color: var(--match-muted); }
.match-shortlist-panel ul { max-height: min(50vh, 18rem); overflow: auto; }
.match-shortlist-panel li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1px solid var(--match-tint); padding: .45rem 0; }
.match-shortlist-panel li a { font-weight: 700; text-decoration: underline; }
.match-shortlist-panel button { min-height: 2.75rem; flex: 0 0 auto; padding: .25rem .5rem; text-decoration: underline; }
.match-hero { display: grid; gap: 1.5rem; align-items: center; margin: clamp(1.5rem, 5vw, 4rem) 0 2.25rem; }
.match-hero-solo { grid-template-columns: 1fr !important; }
.match-kicker { margin: 0 0 .65rem; color: var(--match-accent); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.match-discovery h1 { color: var(--match-ink); font-size: clamp(2.25rem, 6vw, 4.1rem); line-height: .99; font-weight: 750; letter-spacing: -.045em; margin: 0 0 .85rem; }
.match-desktop-break { display: none; }
.match-hero-copy > p:not(.match-kicker), .match-result-heading > p:not(.match-kicker) { max-width: 39rem; font-size: 1.08rem; color: var(--match-muted); margin-bottom: 1.15rem; }
.match-hero-copy .match-text-link { display: block; width: fit-content; margin: .65rem 0 0; padding-block: .35rem; }
.match-hero-photo { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); min-width: 0; aspect-ratio: 1.65; background: var(--match-tint); border-radius: var(--match-radius); overflow: hidden; box-shadow: .45rem .45rem 0 var(--match-border); margin: 0 .45rem .45rem 0; }
.match-hero-photo > *, .match-card-photo > * { grid-area: 1 / 1; }
.match-hero-photo img, .match-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.match-hero-photo figcaption, .match-card-caption { position: relative; align-self: end; padding: .8rem 1rem; color: white; background: #342d21; }
.match-hero-photo figcaption span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.match-hero-photo figcaption strong { display: block; font-size: 1.4rem; line-height: 1.2; }
.match-button, .match-round { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.875rem; max-width: 100%; padding: .55rem .9rem; border-radius: .65rem; border: 1px solid transparent; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.match-primary { color: white; background: var(--match-accent); }
.match-primary:hover { background: #49442f; }
.match-outline, .match-round { color: var(--match-ink); background: white; border-color: var(--match-border); }
.match-outline:hover, .match-round:hover { background: var(--match-tint); }
.match-favorite { color: white; background: #665137; }
.match-favorite:hover { background: #4d3b28; }
.match-favorite[data-saved="true"] path { fill: currentColor; }
.match-round { padding-inline: .65rem; }
.match-panel { border: 1px solid var(--match-border); border-radius: var(--match-radius); background: white; }
.match-notice { border: 1px solid #a6694f; border-radius: .65rem; padding: .75rem 1rem; margin: 1rem 0; background: #fff4ed; color: #733b25; }
.match-question-area { max-width: 43rem; margin: 0 auto; }
.match-wizard { padding: clamp(1rem, 4.2vw, 2rem); }
.match-wizard-heading { margin-bottom: 1.15rem; }
.match-wizard-heading h2, .match-state h2, .match-signup h2, .match-end h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 750; line-height: 1.12; margin-bottom: .45rem; letter-spacing: -.025em; }
.match-wizard-heading > p:last-child, .match-state > p, .match-signup p, .match-end p, .match-field-hint { color: var(--match-muted); }
.match-wizard-progress { display: flex; gap: .7rem; align-items: center; color: var(--match-muted); font-size: .88rem; font-weight: 700; margin-bottom: 1.15rem; }
.match-wizard-progress progress { display: block; flex: 1 1 30%; width: 0; min-width: 1rem; height: .45rem; border: 0; accent-color: var(--match-accent); background: var(--match-tint); border-radius: .5rem; overflow: hidden; }
.match-wizard-progress progress::-webkit-progress-bar { background: var(--match-tint); }
.match-wizard-progress progress::-webkit-progress-value { background: var(--match-accent); border-radius: .5rem; }
.match-wizard-progress progress::-moz-progress-bar { background: var(--match-accent); border-radius: .5rem; }
.match-question { min-inline-size: 0; margin: 0 0 1rem; padding: 0; border: 0; }
.match-question legend { float: left; width: 100%; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 750; line-height: 1.15; margin: 0 0 .6rem; }
.match-question legend + * { clear: both; }
.match-field-hint { margin: 0 0 .65rem; }
.match-options { display: grid; gap: .5rem; }
.match-option { display: block; position: relative; color: var(--match-ink); cursor: pointer; }
.match-option input { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; }
.match-option > span { display: flex; align-items: center; gap: .55rem; min-height: 2.875rem; border: 1px solid var(--match-border); padding: .55rem .75rem; border-radius: .65rem; line-height: 1.3; }
.match-option:hover > span { border-color: var(--match-accent); }
.match-option input:focus-visible + span { outline: 2px solid var(--match-accent); outline-offset: 2px; }
.match-option input:checked + span { background: var(--match-tint); border-color: var(--match-accent); font-weight: 700; }
.match-radio-dot { width: 1rem; height: 1rem; flex: 0 0 1rem; border-radius: 50%; border: 1px solid var(--match-accent); }
.match-option input:checked + span .match-radio-dot { border: .3rem solid var(--match-accent); background: white; }
.match-money { display: flex; align-items: center; gap: .6rem; }
.match-money input { max-width: 16rem; }
.match-money span { white-space: nowrap; }
.match-field-error { color: #8e3524; font-weight: 650; font-size: .95rem; }
.match-field-error:not(:empty) { margin-top: .45rem; }
.match-wizard-actions, .match-result-actions, .match-end-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.match-wizard-actions :is([data-wizard-next], [data-wizard-submit]) { margin-left: auto; }
.match-edit { margin: 1rem auto; }
.match-edit > summary, .match-process > summary, .match-aux > summary { font-weight: 750; padding-block: .45rem; cursor: pointer; }
.match-edit > summary { margin-bottom: .6rem; }
.match-results { width: min(100%, 57rem); margin: 1.5rem auto 0; }
.match-state-title { margin-top: 1.5rem !important; }
.match-result-heading { margin: 0 0 1rem; }
.match-result-heading h1 { font-size: clamp(2rem, 5.1vw, 3.5rem); }
.match-state, .match-signup, .match-end { padding: clamp(1rem, 4vw, 1.75rem); }
.match-state > :is(.match-button, .match-text-link) { margin: .7rem .25rem 0 0; }
.match-signup { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.3rem; margin: 1.25rem 0; }
.match-deck-top { display: flex; align-items: center; gap: .75rem; font-weight: 750; font-size: .9rem; color: var(--match-muted); margin: 0 0 .6rem; }
.match-deck-progress { display: flex; gap: .25rem; flex: 1; }
.match-deck-progress span { flex: 1; height: .25rem; border-radius: .25rem; background: var(--match-border); }
.match-deck-progress [data-reached] { background: var(--match-accent); }
.match-stack { display: grid; gap: .9rem; }
.match-card { background: white; border: 1px solid var(--match-border); border-radius: var(--match-radius); display: grid; grid-template-areas: 'photo' 'controls' 'body'; overflow: hidden; }
.match-card-photo { grid-area: photo; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); position: relative; isolation: isolate; background: var(--match-tint); min-width: 0; aspect-ratio: 1.13; overflow: hidden; }
.match-no-photo { aspect-ratio: 1.5; }
.match-photo-empty { place-self: center; align-self: start; padding-top: 10%; color: var(--match-muted); }
[data-deck-ready] [data-drag-area] { touch-action: pan-y pinch-zoom; cursor: grab; user-select: none; }
[data-deck-ready] [data-drag-area]:active { cursor: grabbing; }
.match-card-caption { padding: .85rem 1rem; background: linear-gradient(to top, #281f17 0%, #281f17e8 72%, #281f17b8 100%); pointer-events: none; }
.match-card-caption h2 { line-height: .98; font-size: clamp(1.7rem, 6vw, 3rem); letter-spacing: -.035em; font-weight: 800; margin-bottom: .25rem; }
.match-card-caption h2:focus-visible { outline-color: white; outline-offset: .1rem; }
.match-card-caption p { font-size: .9rem; }
.match-location { display: flex; align-items: center; gap: .25rem; }
.match-location svg { width: 1rem; height: 1rem; }
.match-urgent, .match-stamp { position: relative; align-self: start; justify-self: start; margin: .7rem; background: white; color: var(--match-ink); border-radius: .4rem; padding: .3rem .5rem; font-size: .78rem; font-weight: 800; }
.match-urgent { color: #793925; }
.match-stamp { display: none; place-self: center; font-size: 1.12rem; border: 2px solid var(--match-accent); padding: .45rem .8rem; pointer-events: none; z-index: 1; }
[data-drag-direction="save"] .match-stamp-save, [data-drag-direction="pass"] .match-stamp-pass { display: block; }
[data-deck-ready] .match-card { transform: translateX(var(--drag-x, 0)) rotate(var(--drag-angle, 0deg)); transition: transform .16s ease-out, opacity .16s ease-out; }
[data-deck-ready] .match-card[data-dragging] { transition: none; }
[data-deck-ready] .match-card[data-exiting] { opacity: 0; pointer-events: none; }
.match-deck-navigation { grid-area: controls; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr); gap: .4rem; padding: .65rem; background: var(--match-tint); }
.match-deck-navigation .match-button { padding-inline: .3rem; font-size: .9rem; }
.match-gesture-help { grid-column: 1 / -1; margin: 0; font-size: .76rem; text-align: center; color: var(--match-muted); }
.match-card-body { grid-area: body; display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: clamp(.9rem, 3vw, 1.55rem); min-width: 0; }
.match-card-label { color: var(--match-accent); font-size: .92rem; font-weight: 800; }
.match-card-label strong { font-size: 1.35rem; }
.match-label-warn { color: #704d2f; }
.match-card-about, .match-cession { color: var(--match-muted); }
.match-cession { font-size: .9rem; font-weight: 700; }
.match-open-horse { align-self: stretch; }
.match-card-details { width: 100%; border-top: 1px solid var(--match-border); padding: .45rem 0 0; font-size: .93rem; }
.match-card-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; gap: .5rem; cursor: pointer; font-weight: 750; }
.match-card-details[open] summary svg { transform: rotate(180deg); }
.match-card-details h3 { margin: .45rem 0 .15rem; font-weight: 750; }
.match-list { list-style: disc outside; padding-left: 1.15rem; margin: .3rem 0 .55rem; }
.match-list li { margin-bottom: .18rem; }
.match-criteria { border-top: 1px solid var(--match-tint); margin: .45rem 0; }
.match-criteria > div { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--match-tint); padding: .25rem 0; }
.match-criteria :is(dt, dd) { min-width: 0; }
.match-criteria dd { text-align: right; font-weight: 700; }
.match-card-warning { width: 100%; padding: .45rem .65rem; background: #fff4ed; color: #733b25; border-radius: .45rem; }
.match-secondary { display: grid; gap: .7rem; margin-top: 1rem; }
.match-aux { padding: .65rem 1rem; font-size: .92rem; }
.match-aux h2 { font-weight: 750; }
.match-divided > li { border-top: 1px solid var(--match-tint); padding: .55rem 0; }
.match-alert-text { font-weight: 700; color: #733b25; }
.match-end > svg { width: 2rem; height: 2rem; margin-bottom: .55rem; color: var(--match-accent); }
.match-end-actions { margin-top: .8rem; }
.match-process { margin: 1.35rem auto 0; max-width: 43rem; border-top: 1px solid var(--match-border); font-size: .92rem; color: var(--match-muted); }
.match-process p { margin-bottom: .55rem; }
@media (prefers-reduced-motion: no-preference) {
    .match-wizard-progress:not([hidden]) ~ .match-question:not([hidden]) { animation: match-question-in .18s ease-out both; }
    @keyframes match-question-in {
        from { opacity: .35; transform: translateY(.3rem); }
        to { opacity: 1; transform: translateY(0); }
    }
}
@media (max-width: 24rem) {
    .match-brand, .match-top-links { font-size: .85rem; }
    .match-brand svg, .match-shortlist > summary svg { width: 1rem; height: 1rem; }
    .match-topbar { column-gap: .45rem; }
    .match-shortlist > summary { padding-inline: .4rem; }
}
@media (min-width: 36rem) {
    .match-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .match-option > span { height: 100%; }
}
@media (min-width: 48rem) {
    .match-shell { width: min(100% - 4rem, 67rem); }
    .match-hero { grid-template-columns: 1.1fr minmax(0, 1fr); gap: clamp(1.2rem, 5vw, 3.75rem); }
    .match-hero-photo { aspect-ratio: 1.17; }
    .match-card { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: 'photo body' 'controls body' '. body'; }
    .match-card-photo { aspect-ratio: 1.18; }
    .match-deck-navigation { padding: .75rem; }
    .match-open-horse { align-self: start; }
}
@media (min-width: 61rem) { .match-desktop-break { display: block; } }
