.avv-coffee-match {
  --avv-green: #004225;
  --avv-gold: #D4AF37;
  --avv-cream: #F8F4E8;
  --avv-white: #FFFFFF;
  --avv-ink: #17241D;
  --avv-muted: #657267;
  --avv-border: rgba(0, 66, 37, 0.16);
  --avv-shadow: 0 24px 70px rgba(0, 35, 20, 0.14);
  color: var(--avv-ink);
  font-family: "Montserrat", Arial, sans-serif;
  padding: 0 8px 8px;
}

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

.avv-coffee-match__shell {
  background:
    linear-gradient(135deg, rgba(0, 66, 37, 0.96), rgba(0, 52, 30, 0.9)),
    var(--avv-green);
  border-radius: 8px;
  box-shadow: var(--avv-shadow);
  margin: 0 auto;
  max-width: 1120px;
  overflow: hidden;
}

.avv-coffee-match__intro {
  color: var(--avv-cream);
  padding: 20px 22px 6px;
}

.avv-coffee-match__eyebrow {
  color: var(--avv-gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.avv-coffee-match h2,
.avv-coffee-match h3,
.avv-coffee-match h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
}

.avv-coffee-match h2 {
  color: var(--avv-white);
  font-size: clamp(1.9rem, 7vw, 3.6rem);
  max-width: 760px;
}

.avv-coffee-match__intro > p:last-child {
  color: rgba(248, 244, 232, 0.82);
  font-size: 1rem;
  line-height: 1.5;
  margin: 10px 0 0;
  max-width: 620px;
}

.avv-coffee-match__app {
  padding: 8px 14px 14px;
}

.avv-coffee-match__panel {
  animation: avvCoffeeFade 220ms ease-out;
  background: var(--avv-cream);
  border-radius: 8px;
  min-height: 0;
  padding: 16px;
}

.avv-coffee-match__progress {
  margin-bottom: 22px;
}

.avv-coffee-match__progress-meta {
  color: var(--avv-muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: space-between;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.avv-coffee-match__progress-track {
  background: rgba(0, 66, 37, 0.12);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.avv-coffee-match__progress-track span {
  background: linear-gradient(90deg, var(--avv-gold), #efd77c);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 220ms ease;
}

.avv-coffee-match__question h3 {
  color: var(--avv-green);
  font-size: clamp(1.65rem, 7.5vw, 3rem);
  max-width: 780px;
}

.avv-coffee-match__question p {
  color: var(--avv-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 10px 0 0;
}

.avv-coffee-match__answers {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.avv-coffee-match__answer {
  align-items: center;
  appearance: none;
  background: var(--avv-white);
  border: 1px solid var(--avv-border);
  border-radius: 8px;
  color: var(--avv-green);
  cursor: pointer;
  display: flex;
  font: 700 1rem/1.25 "Montserrat", Arial, sans-serif;
  justify-content: space-between;
  min-height: 58px;
  padding: 15px 18px;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  width: 100%;
}

.avv-coffee-match__answer::after {
  border: 2px solid rgba(0, 66, 37, 0.28);
  border-radius: 50%;
  content: "";
  height: 22px;
  margin-left: 16px;
  width: 22px;
}

.avv-coffee-match__answer:hover,
.avv-coffee-match__answer:focus-visible {
  border-color: var(--avv-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.avv-coffee-match__answer.is-selected {
  background: #fff9e7;
  border-color: var(--avv-gold);
  box-shadow: inset 0 0 0 1px var(--avv-gold);
}

.avv-coffee-match__answer.is-selected::after {
  background: radial-gradient(circle, var(--avv-gold) 0 42%, transparent 45%);
  border-color: var(--avv-gold);
}

.avv-coffee-match__controls,
.avv-coffee-match__result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.avv-coffee-match__controls {
  justify-content: space-between;
  margin-top: auto;
}

.avv-coffee-match__control,
.avv-coffee-match__shop,
.avv-coffee-match__alt-link {
  align-items: center;
  appearance: none;
  background: var(--avv-green);
  border: 1px solid var(--avv-green);
  border-radius: 999px;
  color: var(--avv-white);
  cursor: pointer;
  display: inline-flex;
  font: 800 0.9rem/1 "Montserrat", Arial, sans-serif;
  justify-content: center;
  min-height: 48px;
  min-width: 132px;
  padding: 15px 22px;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.avv-coffee-match__control:hover,
.avv-coffee-match__control:focus-visible,
.avv-coffee-match__shop:hover,
.avv-coffee-match__shop:focus-visible,
.avv-coffee-match__alt-link:hover,
.avv-coffee-match__alt-link:focus-visible {
  background: #002f1b;
  border-color: #002f1b;
  color: var(--avv-white);
  outline: none;
  transform: translateY(-1px);
}

.avv-coffee-match__control:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.avv-coffee-match__control--ghost,
.avv-coffee-match__control--text {
  background: transparent;
  border-color: rgba(0, 66, 37, 0.28);
  color: var(--avv-green);
}

.avv-coffee-match__control--text {
  border-color: transparent;
  min-width: auto;
}

.avv-coffee-match__control--ghost:hover,
.avv-coffee-match__control--ghost:focus-visible,
.avv-coffee-match__control--text:hover,
.avv-coffee-match__control--text:focus-visible {
  background: rgba(0, 66, 37, 0.08);
  border-color: var(--avv-green);
  color: var(--avv-green);
}

.avv-coffee-match__panel--result {
  background: var(--avv-white);
}

.avv-coffee-match__result-grid {
  display: grid;
  gap: 24px;
}

.avv-coffee-match__image {
  border-radius: 8px;
  display: block;
  height: auto;
  justify-self: center;
  max-height: 560px;
  max-width: min(100%, 470px);
  object-fit: contain;
  overflow: visible;
  width: auto;
}

.avv-coffee-match__image--placeholder {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(0, 66, 37, 0.08)),
    var(--avv-cream);
  border: 1px solid var(--avv-border);
  display: flex;
  height: 430px;
  justify-content: center;
  width: 360px;
}

.avv-coffee-match__image--placeholder span {
  color: var(--avv-green);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
}

.avv-coffee-match__result-copy h3 {
  color: var(--avv-green);
  font-size: clamp(2rem, 8vw, 3.25rem);
  margin-bottom: 14px;
}

.avv-coffee-match__notes {
  color: var(--avv-ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 14px;
}

.avv-coffee-match__description {
  color: var(--avv-muted);
  line-height: 1.65;
  margin: 0 0 20px;
}

.avv-coffee-match__result-copy section {
  border-top: 1px solid var(--avv-border);
  padding: 18px 0 0;
  margin-top: 18px;
}

.avv-coffee-match__result-copy h4,
.avv-coffee-match__alternative h4 {
  color: var(--avv-green);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.avv-coffee-match__result-copy p,
.avv-coffee-match__alternative p {
  color: var(--avv-muted);
  line-height: 1.65;
}

.avv-coffee-match__shop {
  background: var(--avv-gold);
  border-color: var(--avv-gold);
  color: var(--avv-green);
}

.avv-coffee-match__shop:hover,
.avv-coffee-match__shop:focus-visible {
  background: #c39d25;
  border-color: #c39d25;
  color: var(--avv-green);
}

.avv-coffee-match__result-actions {
  margin-top: 24px;
}

.avv-coffee-match__alternative {
  animation: avvCoffeeFade 180ms ease-out;
  background: var(--avv-cream);
  border: 1px solid var(--avv-border);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
}

.avv-coffee-match__alt-link {
  justify-self: start;
}

@keyframes avvCoffeeFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .avv-coffee-match {
    padding: 0 36px 36px;
  }

  .avv-coffee-match__intro {
    padding: 32px 52px 14px;
  }

  .avv-coffee-match__app {
    padding: 22px;
  }

  .avv-coffee-match__panel {
    padding: 42px;
  }

  .avv-coffee-match__answers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avv-coffee-match__result-grid {
    align-items: center;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  }

  .avv-coffee-match__alternative {
    align-items: center;
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 600px) {
  .avv-coffee-match__image {
    margin-left: auto;
    margin-right: auto;
    max-height: 440px;
    max-width: min(100%, 365px);
  }

  .avv-coffee-match__image--placeholder {
    height: 340px;
    width: 280px;
  }
}

@media (min-width: 1040px) {
  .avv-coffee-match__answers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
