.resacore-match {
  /* asiakkaan värit — flow ylikirjoittaa vain nämä */
  --match-accent: #c5e8e8;
  --match-accent-hover: #ddf2f2;
  --match-accent-ink: var(--match-color-accent-text, #17242d);
  --match-tick: #41a583;
  --match-cover-ink: #f4f1ea;
  --match-band: #0c1014;
  --match-color-bg: #faf8f3;
  --match-color-text: #17242d;

  /* ytimen järjestelmä — flow ei kirjoita */
  --match-ink: var(--match-cover-ink);
  --match-ink-muted: color-mix(in srgb, var(--match-ink) 72%, transparent);
  --match-ink-faint: color-mix(in srgb, var(--match-ink) 55%, transparent);
  --match-glass: rgb(12 16 20 / 0.55);
  --match-glass-strong: rgb(12 16 20 / 0.7);
  --match-line: color-mix(in srgb, var(--match-ink) 14%, transparent);
  --match-line-strong: color-mix(in srgb, var(--match-ink) 30%, transparent);
  --match-blur: 18px;
  --match-pill: 999px;
  --match-radius-card: 24px;
  --match-radius-media: 16px;
  --match-column: 36rem;
  --match-gutter: 1.25rem;
  --match-pad: 1.25rem;
  --match-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --match-veil: linear-gradient(180deg, rgb(12 16 20 / 0.55), rgb(12 16 20 / 0.35) 30%, rgb(12 16 20 / 0.82) 62%, rgb(12 16 20 / 0.94));
  --match-dur-fast: 120ms;
  --match-dur: 220ms;

  box-sizing: border-box;
  width: min(var(--match-column), 100%);
  margin-inline: auto;
  color: var(--match-color-text);
  background: var(--match-color-bg);
  font: inherit;
}

.resacore-match *,
.resacore-match *::before,
.resacore-match *::after {
  box-sizing: border-box;
}

.resacore-match :where(a) {
  color: inherit;
}

.resacore-match__close {
  text-decoration: none;
}

.resacore-match-page {
  margin: 0;
  min-height: 100dvh;
  background: var(--match-band, #0c1014);
  color: #f4f1ea;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.resacore-match-stage {
  min-height: 100dvh;
  display: grid;
}

.resacore-match--shell {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--match-gutter);
  color: var(--match-ink);
  background: var(--match-band);
}

.resacore-match--modal {
  min-height: min(46rem, 100%);
  border-radius: 28px;
  overflow: hidden;
}

.resacore-match__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.resacore-match__scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Skrollilukko vain JS-tilassa: ilman sitä kaikki askeleet ovat auki
   ja vieraan on päästävä niihin. */
.resacore-match-page:has(.resacore-match--shell.has-cover.is-enhanced) {
  height: 100dvh;
  overflow: hidden;
}

.resacore-match--shell.has-cover > .resacore-match__scene,
.resacore-match--result.has-cover > .resacore-match__scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
}

.resacore-match--shell.has-cover > .resacore-match__scene img,
.resacore-match--result.has-cover > .resacore-match__scene img {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: 100dvh;
}

/* Modaalissa kansi kuuluu dialogin sisään. Ilman tätä `fixed` venyttäisi
   sen koko ikkunaan ja peittäisi isäntäsivun sekä pyöristetyt kulmat. */
.resacore-match-dialog .resacore-match--shell.has-cover > .resacore-match__scene,
.resacore-match-dialog .resacore-match--shell.has-cover > .resacore-match__scene img {
  position: absolute;
  width: 100%;
  height: 100%;
  max-height: none;
}

/* mobiili: huntu ylhäältä alas, copy peukalovyöhykkeeseen */
.resacore-match__veil {
  position: absolute;
  inset: 0;
  background: var(--match-veil);
}

.resacore-match--result {
  --match-veil: linear-gradient(180deg, rgb(12 16 20 / 0.7), rgb(12 16 20 / 0.8) 30%, rgb(12 16 20 / 0.94));
}

/* lasipinta: yksi primitiivi */
.resacore-match__choice,
.resacore-match__season,
.resacore-match__progress,
.resacore-match__close,
.resacore-match__pager,
.resacore-match__actions,
.resacore-match__secondary,
.resacore-match__blockers li,
.resacore-match__action-form {
  border: 1px solid var(--match-line);
  border-radius: var(--match-pill);
  background: var(--match-glass);
  backdrop-filter: blur(var(--match-blur));
}

.resacore-match__chrome {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.resacore-match--shell .resacore-match__chrome,
.resacore-match--result .resacore-match__chrome {
  position: absolute;
  top: var(--match-gutter);
  left: var(--match-pad);
  right: var(--match-pad);
  padding: 0;
}

.resacore-match__brand img {
  display: block;
  width: auto;
  height: 1.625rem;
}

.resacore-match--shell .resacore-match__brand img,
.resacore-match--result .resacore-match__brand img {
  filter: brightness(0) invert(1);
}

.resacore-match__brand:empty {
  min-width: 1px;
}

.resacore-match__progress {
  flex: 1;
  min-width: 0;
  max-width: 22rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.5rem 0.625rem;
  color: var(--match-ink-faint);
  font-size: 0.75rem;
}

.resacore-match__ticks {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.25rem;
}

.resacore-match__ticks i {
  display: block;
  flex: 1 1 0;
  min-width: 3px;
  max-width: 1rem;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--match-ink) 22%, transparent);
  transition: background var(--match-dur) var(--match-ease);
}

.resacore-match__ticks i.is-done {
  background: var(--match-accent);
}

.resacore-match__count {
  margin-left: 0.5rem;
}

.resacore-match__close {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.resacore-match__form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.875rem;
  width: min(var(--match-column), 100%);
}

.resacore-match--shell .resacore-match__form {
  padding-bottom: 5.5rem;
}

/* Pitkä askel ei jää jalkapalkin alle: palsta skrollaa itse, jotta
   kiinnitetty kansikuva ja chrome pysyvät paikallaan. */
.resacore-match--shell.is-enhanced .resacore-match__form {
  max-height: calc(100dvh - 8rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--match-ink) 26%, transparent) transparent;
}

.resacore-match--shell.is-enhanced .resacore-match__form::-webkit-scrollbar {
  width: 6px;
}

.resacore-match--shell.is-enhanced .resacore-match__form::-webkit-scrollbar-thumb {
  border-radius: var(--match-pill);
  background: color-mix(in srgb, var(--match-ink) 26%, transparent);
}

.resacore-match__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.resacore-match.is-enhanced .resacore-match__step:not(.is-current) {
  display: none;
}

.resacore-match.is-enhanced .resacore-match__step.is-current {
  animation: resacore-match-in var(--match-dur) var(--match-ease);
}

.resacore-match fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.5rem;
}

.resacore-match__eyebrow {
  display: block;
  margin: 0;
  color: var(--match-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resacore-match legend {
  padding: 0.125rem 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: pretty;
  margin-bottom: 0.5rem;
}

.resacore-match legend:focus,
.resacore-match legend:focus-visible {
  outline: none;
}

.resacore-match__help {
  margin: 0 0 0.25rem;
  color: var(--match-ink-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.resacore-match__choice,
.resacore-match__season {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.375rem 1rem 0.375rem 0.5rem;
  color: inherit;
  cursor: pointer;
  transition:
    transform 80ms var(--match-ease),
    border-color var(--match-dur-fast) var(--match-ease),
    background var(--match-dur-fast) var(--match-ease);
}

.resacore-match__choice:hover {
  border-color: var(--match-line-strong);
  background: var(--match-glass-strong);
}

.resacore-match__choice:active {
  transform: scale(0.985);
}

.resacore-match__choice:has(:checked) {
  border-color: var(--match-accent);
  background: color-mix(in srgb, var(--match-accent) 14%, transparent);
  font-weight: 600;
}

.resacore-match__choice:focus-within,
.resacore-match__season:focus-within {
  outline: 2px solid var(--match-accent);
  outline-offset: 2px;
}

.resacore-match input:focus,
.resacore-match input:focus-visible {
  outline: none;
}

.resacore-match__choice input[type="radio"],
.resacore-match__choice input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.resacore-match__key {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--match-line-strong);
  border-radius: var(--match-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.resacore-match__choice:has(:checked) .resacore-match__key {
  border-color: transparent;
  background: var(--match-accent);
  color: var(--match-accent-ink);
  font-weight: 700;
}

.resacore-match__label {
  flex: 1;
  font-size: 1rem;
  font-weight: inherit;
}

.resacore-match__label small {
  display: block;
  color: var(--match-ink-muted);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25;
}

/* kolmas vihje värin lisäksi */
.resacore-match__mark {
  flex: none;
  color: var(--match-accent);
  font-size: 1rem;
  opacity: 0;
}

.resacore-match__choice:has(:checked) .resacore-match__mark {
  opacity: 1;
}

.resacore-match__choice--tile {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: var(--match-radius-media);
  overflow: hidden;
}

.resacore-match__thumb img {
  display: block;
  width: 100%;
  height: 7.5rem;
  object-fit: cover;
}

.resacore-match__choice--tile .resacore-match__key {
  margin: 0.625rem 0 0 0.625rem;
}

.resacore-match__choice--tile .resacore-match__label {
  padding: 0.375rem 0.75rem 0.75rem;
}

.resacore-match__choice--tile .resacore-match__mark {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
}

.resacore-match__date-icon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
  border-radius: var(--match-pill);
  color: inherit;
  background: var(--match-glass-strong);
  transform: translateY(-50%);
  pointer-events: none;
}

.resacore-match__season {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  padding-inline: 1.125rem;
  cursor: text;
}

.resacore-match :where(input[type="date"], input[type="email"], input[type="tel"], input[type="text"]) {
  min-height: 1.5rem;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 1rem;
  background: transparent;
  color: inherit;
}

.resacore-match.has-cover input[type="date"],
.resacore-match--embed input[type="date"],
.resacore-match--shell input[type="date"] {
  color-scheme: dark;
}

.resacore-match input[type="date"] {
  position: relative;
  z-index: 1;
  min-height: 1.625rem;
  appearance: none;
  -webkit-appearance: none;
}

.resacore-match input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.resacore-match input[type="date"]::-webkit-clear-button,
.resacore-match input[type="date"]::-webkit-inner-spin-button {
  display: none;
  -webkit-appearance: none;
}

.resacore-match__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.resacore-match__submit,
.resacore-match__launch,
.resacore-match__cta,
.resacore-match__details,
.resacore-match__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.125rem;
  /* Ilman taustaa <button> jaa selaimen harmaaseen `buttonface`en ja
     vaalea teksti katoaa siihen; <a> ei paljasta vikaa. */
  background: transparent;
  border: 0;
  border-radius: var(--match-pill);
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--match-dur-fast) var(--match-ease);
}

.resacore-match__submit,
.resacore-match__launch,
.resacore-match__cta {
  min-height: 3.5rem;
  padding-inline: 1.75rem;
  background: var(--match-accent);
  color: var(--match-accent-ink);
  font-size: 1rem;
  font-weight: 600;
}

.resacore-match__submit:hover,
.resacore-match__launch:hover,
.resacore-match__cta:hover {
  background: var(--match-accent-hover);
}

/* ei kuollutta nappia: 30 % väriä */
.resacore-match__submit[aria-disabled="true"],
.resacore-match__chevron[aria-disabled="true"] {
  background: color-mix(in srgb, var(--match-accent) 30%, transparent);
  color: color-mix(in srgb, var(--match-accent-ink) 75%, transparent);
  cursor: default;
}

.resacore-match__submit:focus-visible,
.resacore-match__cta:focus-visible,
.resacore-match__launch:focus-visible {
  outline: 2px solid var(--match-cover-ink);
  outline-offset: 3px;
}

.resacore-match--shell .resacore-match__submit {
  flex: 1;
}

.resacore-match__hint,
.resacore-match__hint b {
  color: var(--match-ink-muted);
  font-weight: 600;
}

.resacore-match__back {
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.resacore-match__pager {
  display: none;
  flex: none;
  gap: 0.25rem;
  padding: 0.25rem;
}

.resacore-match--shell.is-enhanced .resacore-match__pager {
  display: flex;
}

.resacore-match--shell.is-enhanced .resacore-match__back,
.resacore-match--embed .resacore-match__hint {
  display: none;
}

.resacore-match__chevron {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--match-pill);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.resacore-match__chevron[data-match-down] {
  background: var(--match-accent);
  color: var(--match-accent-ink);
}

.resacore-match__chevron svg {
  display: block;
}

.resacore-match__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resacore-match--shell.is-enhanced .resacore-match__footer {
  position: absolute;
  left: var(--match-pad);
  right: var(--match-pad);
  bottom: var(--match-gutter);
  z-index: 2;
}

.resacore-match--shell.is-enhanced .resacore-match__nav {
  flex: 1;
  flex-wrap: nowrap;
}

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

.resacore-match__error {
  margin: 0;
  min-height: 1.25em;
  color: #ffb4b4;
}

.resacore-match--embed {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: min(24rem, 100dvh);
  margin: 0;
  padding: 1.25rem 1rem 1rem;
  overflow: hidden;
  color: var(--match-ink);
  background: var(--match-band);
}

.resacore-match--embed > .resacore-match__scene {
  opacity: 0.6;
}

.resacore-match--embed {
  --match-veil: linear-gradient(180deg, rgb(12 16 20 / 0.7), rgb(12 16 20 / 0.92));
}

.resacore-match--embed .resacore-match__choice,
.resacore-match--embed .resacore-match__season {
  background: color-mix(in srgb, var(--match-ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--match-ink) 16%, transparent);
  backdrop-filter: none;
}

.resacore-match--embed fieldset:has(> .resacore-match__choice):not(:has(.resacore-match__datepill)) {
  flex-direction: row;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resacore-match--embed .resacore-match__choice:not(.resacore-match__choice--tile) {
  width: auto;
  min-height: 2.75rem;
  padding-right: 0.875rem;
  font-size: 0.875rem;
}

/* Legenda ja aputeksti omalle riville; pillerit rivittyvät niiden alle.
   Chromen eyebrow EI kuulu tähän: se jakaa rivin tikkien kanssa. */
.resacore-match--embed legend,
.resacore-match--embed .resacore-match__help {
  flex-basis: 100%;
  grid-column: 1 / -1;
}

.resacore-match--embed legend {
  font-size: 1.5rem;
}

.resacore-match--embed fieldset:has(.resacore-match__choice--tile) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.resacore-match--embed .resacore-match__submit {
  min-height: 3.125rem;
}

.resacore-match__reassure {
  color: var(--match-ink-faint);
  font-size: 0.8125rem;
}

.resacore-match-dialog:not([open]) { display: none; }

.resacore-match-dialog {
  width: min(74rem, 100vw);
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--match-band, #0c1014);
  color: #f4f1ea;
  overflow: hidden;
}

.resacore-match-dialog::backdrop {
  background: rgb(12 16 20 / 0.58);
  backdrop-filter: blur(3px);
}

.resacore-match__grab {
  position: absolute;
  top: 0.625rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: none;
  justify-content: center;
}

.resacore-match__grab span {
  width: 2.5rem;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--match-cover-ink) 40%, transparent);
}

.resacore-match--result {
  --match-column: 44rem;
  display: grid;
  gap: 1rem;
  padding: var(--match-gutter);
  color: var(--match-color-text);
  background: var(--match-color-bg);
}

.resacore-match--result.has-cover {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  color: var(--match-ink);
  background: var(--match-band);
  overflow: hidden;
}

.resacore-match__result {
  position: relative;
  z-index: 2;
  width: min(var(--match-column), 100%);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 3.5rem;
}

.resacore-match__head {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resacore-match--result h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.resacore-match__answers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
}

.resacore-match__answers li {
  padding: 0.3125rem 0.625rem;
  border-radius: var(--match-pill);
  background: color-mix(in srgb, var(--match-ink) 10%, transparent);
  font-size: 0.75rem;
}

.resacore-match__answers li:has(a) {
  padding: 0;
  background: none;
}

.resacore-match__answers a {
  display: inline-flex;
  align-items: center;
  padding: 0.3125rem 0.75rem;
  border: 1px dashed var(--match-line-strong);
  border-radius: var(--match-pill);
  color: var(--match-ink-muted);
  text-decoration: none;
}

.resacore-match__board {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--match-ink) 26%, transparent) transparent;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-bottom: 4.5rem;
  mask-image: linear-gradient(180deg, #000 92%, transparent);
}

.resacore-match__board::-webkit-scrollbar {
  width: 6px;
}

.resacore-match__board::-webkit-scrollbar-thumb {
  border-radius: var(--match-pill);
  background: color-mix(in srgb, var(--match-ink) 26%, transparent);
}

.resacore-match__board::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--match-ink) 40%, transparent);
}

.resacore-match__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.resacore-match__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--match-line);
  border-radius: var(--match-radius-card);
  background: var(--match-glass);
  backdrop-filter: blur(var(--match-blur));
}

.resacore-match__card.is-featured {
  border-color: color-mix(in srgb, var(--match-accent) 50%, transparent);
}

.resacore-match__card.is-compact {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
}

.resacore-match__card.is-unreachable {
  opacity: 0.78;
}

.resacore-match__card-image {
  position: relative;
  margin: 0;
  height: 10rem;
  border-radius: var(--match-radius-media);
  overflow: hidden;
}

.resacore-match__card.is-compact .resacore-match__card-image {
  height: auto;
  min-height: 7rem;
}

.resacore-match__card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.resacore-match__tag,
.resacore-match__price-badge {
  position: absolute;
  padding: 0.375rem 0.625rem;
  border-radius: var(--match-pill);
  white-space: nowrap;
}

.resacore-match__tag {
  top: 0.625rem;
  left: 0.625rem;
  background: var(--match-accent);
  color: var(--match-accent-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resacore-match__price-badge {
  right: 0.625rem;
  bottom: 0.625rem;
  background: var(--match-glass-strong);
  backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 600;
}

.resacore-match__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0 0.5rem 0.375rem;
}

.resacore-match__card.is-compact .resacore-match__card-body {
  padding: 0.375rem 0.5rem 0.375rem 0;
}

.resacore-match__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.resacore-match__card h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}

.resacore-match__card.is-compact h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.resacore-match__price {
  white-space: nowrap;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.15;
}

.resacore-match__price small {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--match-ink-faint);
}

.resacore-match__facts {
  margin: 0;
  color: color-mix(in srgb, var(--match-ink) 60%, transparent);
  font-size: 0.75rem;
  line-height: 1.5;
}

.resacore-match__card.is-compact .resacore-match__facts b {
  color: var(--match-ink);
  font-weight: 600;
}

.resacore-match__reasons {
  list-style: none;
  margin: 0.125rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.875rem;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--match-ink) 88%, transparent);
}

.resacore-match__reasons li {
  margin: 0;
}

.resacore-match__reasons b {
  color: var(--match-tick);
  font-weight: 400;
}

/* rehellinen miss: vaimea, ei punainen */
.resacore-match__reasons li.is-miss {
  color: var(--match-ink-faint);
}

.resacore-match__note {
  margin: 0;
  font-size: 0.875rem;
}

.resacore-match__cta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--match-ink) 10%, transparent);
}

.resacore-match__card .resacore-match__cta {
  min-height: 3rem;
  padding-inline: 1.125rem;
  font-size: 0.9375rem;
}

.resacore-match__details,
.resacore-match__secondary {
  border: 1px solid var(--match-line-strong);
}

.resacore-match__feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--match-ink) 10%, transparent);
  color: var(--match-ink-faint);
  font-size: 0.75rem;
}

.resacore-match__feedback p,
.resacore-match__feedback fieldset {
  margin: 0;
  flex: 1;
}

.resacore-match__votes {
  display: flex;
  gap: 0.5rem;
}

.resacore-match__feedback button {
  min-height: 44px;
  padding: 0.375rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--match-ink) 20%, transparent);
  border-radius: var(--match-pill);
  background: none;
  color: var(--match-ink);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.resacore-match__reasons-pick {
  display: grid;
  gap: 0.25rem;
  border: 0;
  padding: 0;
}

.resacore-match__actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  background: var(--match-glass-strong);
}

.resacore-match__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 0.5rem;
  text-decoration: none;
  border: 0;
  border-radius: var(--match-pill);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.resacore-match__action--quiet {
  background: color-mix(in srgb, var(--match-ink) 8%, transparent);
  color: var(--match-ink-muted);
}

.resacore-match.is-enhanced .resacore-match__action-form:not(.is-open),
.resacore-match.is-enhanced .resacore-match__reasons-pick:not(.is-open) {
  display: none;
}

.resacore-match__action-form {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.875rem;
  border: 1px solid var(--match-line);
  border-radius: var(--match-radius-card);
  background: var(--match-glass);
  backdrop-filter: blur(var(--match-blur));
}

.resacore-match__consent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resacore-match__action-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.resacore-match__action-form input[type="email"],
.resacore-match__action-form input[type="tel"],
.resacore-match__action-form input[type="text"] {
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--match-line-strong);
  border-radius: var(--match-pill);
}

.resacore-match--state .resacore-match__form,
.resacore-match--state .resacore-match__pager {
  display: none;
}

.resacore-match__state {
  position: relative;
  z-index: 2;
  width: min(var(--match-column), 100%);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.resacore-match__state .resacore-match__eyebrow {
  color: var(--match-ink-faint);
}

.resacore-match__state h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: pretty;
}

.resacore-match__state p {
  margin: 0;
  color: var(--match-ink-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.resacore-match__state-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.resacore-match__secondary {
  min-height: 3.25rem;
  padding-inline: 1.5rem;
}

.resacore-match__blockers {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.resacore-match__blockers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.375rem 0.375rem 0.375rem 1.125rem;
  font-size: 0.9375rem;
}

.resacore-match__blockers span span {
  color: var(--match-ink-faint);
}

.resacore-match__blockers a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  border-radius: var(--match-pill);
  background: var(--match-accent);
  color: var(--match-accent-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.resacore-match__blockers li + li a {
  background: transparent;
  border: 1px solid var(--match-line-strong);
  color: inherit;
}

.resacore-match.is-waiting .resacore-match__form,
.resacore-match.is-waiting .resacore-match__footer {
  display: none;
}

.resacore-match--shell.is-waiting {
  justify-content: center;
}

.resacore-match__wait {
  position: relative;
  z-index: 2;
  display: none;
  width: min(var(--match-column), 100%);
  gap: 1rem;
  padding-bottom: 2rem;
}

.resacore-match.is-waiting .resacore-match__wait,
.resacore-match.is-waiting .resacore-match__wait[hidden] {
  display: grid !important;
}

.resacore-match__wait-pulse {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
}

.resacore-match__wait-pulse::before,
.resacore-match__wait-pulse::after {
  content: "";
  border-radius: 50%;
  background: var(--match-accent);
}

.resacore-match__wait-pulse::before {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  animation: resacore-match-pulse 1.6s ease-out infinite;
}

.resacore-match__wait-pulse::after {
  position: relative;
  width: 1rem;
  height: 1rem;
}

.resacore-match__wait-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.resacore-match__wait-lead {
  margin: 0;
  color: var(--match-ink-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

@keyframes resacore-match-pulse {
  from {
    transform: scale(0.7);
    opacity: 0.6;
  }
  to {
    transform: scale(1.9);
    opacity: 0;
  }
}

@keyframes resacore-match-in {
  from {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 48rem) {
  .resacore-match {
    --match-gutter: 2rem;
    --match-pad: clamp(2rem, 6vw, 5rem);
  }

  .resacore-match--shell {
    justify-content: center;
    padding-inline: var(--match-pad);
  }

  .resacore-match {
    --match-veil: linear-gradient(90deg, rgb(12 16 20 / 0.9), rgb(12 16 20 / 0.82) 36rem, rgb(12 16 20 / 0.45) 56rem, rgb(12 16 20 / 0.08));
  }

  .resacore-match--result {
    --match-veil: linear-gradient(90deg, rgb(12 16 20 / 0.92), rgb(12 16 20 / 0.86) 46rem, rgb(12 16 20 / 0.5) 62rem, rgb(12 16 20 / 0.1));
  }

  .resacore-match--shell .resacore-match__form {
    padding: 5rem 0 0;
  }

  .resacore-match--shell.is-enhanced .resacore-match__form {
    max-height: calc(100dvh - 4rem);
  }

  .resacore-match legend,
  .resacore-match__state h1 {
    font-size: 3rem;
    letter-spacing: -0.025em;
    line-height: 1.04;
  }

  .resacore-match__choice,
  .resacore-match__season {
    min-height: 3.25rem;
    gap: 0.875rem;
    padding-left: 0.5rem;
  }

  .resacore-match__key {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }

  .resacore-match__label {
    font-size: 1.0625rem;
  }

  .resacore-match__ticks i {
    max-width: 1.75rem;
  }

  .resacore-match__brand img {
    height: 1.875rem;
  }


  .resacore-match--shell.is-enhanced .resacore-match__footer {
    position: static;
    margin-top: 0.625rem;
  }

  .resacore-match--shell .resacore-match__submit {
    flex: none;
  }

  .resacore-match--shell.is-enhanced .resacore-match__pager {
    position: absolute;
    right: var(--match-gutter);
    bottom: var(--match-gutter);
    z-index: 3;
  }

  .resacore-match--embed {
    padding: 2.5rem var(--match-pad);
  }

  .resacore-match--embed > .resacore-match__scene {
    left: auto;
    width: 52%;
    opacity: 1;
    mask-image: linear-gradient(90deg, transparent, #000 40%);
  }

  .resacore-match--embed .resacore-match__veil {
    display: none;
  }

  /* Chrome jakaa saman palstan lomakkeen kanssa, jotta tikit ovat
     kysymyksen oikeassa reunassa eivätkä koko bandin reunassa. */
  .resacore-match--embed .resacore-match__chrome,
  .resacore-match--embed .resacore-match__form {
    width: min(38rem, 100%);
  }

  .resacore-match--embed legend {
    font-size: 2.125rem;
  }

  .resacore-match--result {
    padding-inline: var(--match-pad);
  }

  .resacore-match__result {
    padding-top: 5.5rem;
    gap: 1.75rem;
  }

  .resacore-match--result h1 {
    font-size: 2.75rem;
    letter-spacing: -0.025em;
    line-height: 1.04;
  }

  .resacore-match__answers li {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }


  .resacore-match__card,
  .resacore-match__card.is-compact {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .resacore-match__card-image,
  .resacore-match__card.is-compact .resacore-match__card-image {
    height: auto;
    min-height: 12.25rem;
  }

  .resacore-match__price-badge {
    display: none;
  }

  .resacore-match__card-body,
  .resacore-match__card.is-compact .resacore-match__card-body {
    padding: 0.625rem 0.75rem 0.5rem 0;
  }

  .resacore-match__card h2,
  .resacore-match__card.is-compact h2 {
    font-size: 1.375rem;
    letter-spacing: -0.015em;
  }

  .resacore-match__price {
    font-size: 1.375rem;
  }

  .resacore-match__facts {
    font-size: 0.8125rem;
  }

  .resacore-match__reasons {
    font-size: 0.875rem;
    gap: 0.25rem 1rem;
  }

  .resacore-match__cta-row {
    margin-top: auto;
  }


  .resacore-match__feedback {
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
    flex: none;
  }

  .resacore-match__feedback p {
    flex: none;
    white-space: nowrap;
  }

  .resacore-match__actions {
    position: static;
    grid-template-columns: repeat(4, auto);
    align-self: flex-start;
    gap: 0.375rem;
    background: var(--match-glass);
  }

  .resacore-match__short {
    display: none;
  }

  .resacore-match__action {
    padding-inline: 1.125rem;
    font-size: 0.875rem;
  }

  .resacore-match__board {
    padding-bottom: 2.5rem;
    mask-image: linear-gradient(180deg, #000 88%, transparent);
  }

  .resacore-match__state-actions {
    flex-direction: row;
  }

  .resacore-match__state-actions .resacore-match__submit,
  .resacore-match__secondary {
    min-height: 3.5rem;
  }
}

@media (max-width: 47.99rem) {
  .resacore-match__count,
  .resacore-match__hint,
  .resacore-match__long {
    display: none;
  }

  .resacore-match__card.is-compact {
    display: flex;
    flex-direction: column;
  }

  .resacore-match__card.is-compact .resacore-match__card-image {
    height: 10rem;
    min-height: 0;
  }

  .resacore-match__card.is-compact .resacore-match__card-body {
    padding: 0 0.5rem 0.375rem;
  }

  .resacore-match__card .resacore-match__cta {
    flex: 1;
  }

  .resacore-match__card.is-compact .resacore-match__cta {
    flex: none;
    min-height: 2.5rem;
    padding-inline: 1rem;
    font-size: 0.8125rem;
  }

  .resacore-match__card.is-compact .resacore-match__details {
    min-height: 2.5rem;
    padding-inline: 0.875rem;
    font-size: 0.8125rem;
  }

  .resacore-match-dialog:not([open]) { display: none; }

.resacore-match-dialog {
    width: 100vw;
    height: auto;
    max-height: calc(100dvh - 2.25rem);
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .resacore-match-dialog .resacore-match__grab {
    display: flex;
  }

  .resacore-match--modal .resacore-match__chrome {
    top: 1.375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resacore-match,
  .resacore-match * {
    transition: none !important;
    animation: none !important;
  }

  .resacore-match__wait-pulse::before {
    opacity: 0.35;
    transform: none;
  }
}

.resacore-match .resacore-match__input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: .9rem 1.1rem;
  border: 1px solid currentColor;
  border-radius: 16px;
  background: rgb(255 255 255 / .08);
  color: inherit;
  font: inherit;
}
.resacore-match textarea.resacore-match__input { resize: vertical; max-height: 40dvh; }
.resacore-match .resacore-match__input:focus-visible { outline: 3px solid var(--match-accent, #c5e8e8); outline-offset: 3px; }
.resacore-match-dialog { overflow-y: auto; overscroll-behavior: contain; }
.resacore-match__card:has(> .resacore-match__card-body:first-child) { grid-template-columns: minmax(0, 1fr); }
