.card {
  --background: #fffaf2;
  --text: #211d18;
  --muted: #6f665d;
  --accent: #a23f2c;
  --panel: #f3eadc;
  --content-width: 724px;
  background: var(--background);
  color: var(--text);
  font-family: ui-rounded, "Avenir Next", Avenir, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.45;
  padding: 32px 22px;
  text-align: center;

  &.nightMode {
    --background: #211d18;
    --text: #fffaf2;
    --muted: #c6baac;
    --accent: #f39a7f;
    --panel: #332b24;
  }

  @media (min-width: 700px) {
    box-sizing: border-box;
    font-size: 18px;
    line-height: 1.35;
    padding: 10px 18px;
  }
}

.term {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 9vw, 3.7rem);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;

  @media (min-width: 700px) {
    font-size: clamp(2rem, 5vw, 3.25rem);
  }
}

#answer {
  border: 0;
  border-top: 1px solid rgb(128 105 86 / 35%);
  margin: 20px auto;
  width: min(14rem, 60%);

  @media (min-width: 700px) {
    margin: 16px auto 10px;
  }
}

.category {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 7px;
  text-transform: uppercase;

  @media (min-width: 700px) {
    margin-bottom: 4px;
  }
}

.headline {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 auto 22px;

  strong {
    font-weight: 800;
  }

  @media (min-width: 700px) {
    margin-bottom: 12px;
  }
}

/* The term and headline span the whole card; everything else keeps a readable width. */
.food-image,
.extra,
footer {
  margin-inline: auto;
  max-width: var(--content-width);
}

.food-image {
  img {
    background: var(--panel);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgb(42 28 18 / 15%);
    display: block;
    margin: 0 auto;
    max-height: 380px;
    max-width: 100%;
  }

  @media (min-width: 700px) {
    img {
      max-height: min(300px, 34vh);
      max-width: min(100%, 640px);
    }
  }

  .pair {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: center;

    figure {
      flex: 1 1 0;
      margin: 0;
      min-width: 0;
    }

    img {
      max-height: 240px;
      max-width: 100%;
    }
  }

  figcaption {
    color: var(--muted);
    font-size: 0.72rem;
    margin-top: 4px;
  }
}

.extra {
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 12px;
  margin-block: 24px 16px;
  padding: 16px 20px;
  text-align: left;

  p,
  ul {
    margin: 0;
  }

  @media (min-width: 700px) {
    line-height: 1.35;
    margin-block: 14px 8px;
    padding: 12px 16px;
  }
}

.profile {
  display: grid;
  gap: 3px 12px;
  grid-template-columns: max-content 1fr;
  margin: 0;

  dt {
    color: var(--muted);
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding-top: 0.15em;
    text-transform: uppercase;
  }

  dd {
    margin: 0;
  }
}

.ref {
  text-decoration: underline dotted rgb(128 105 86 / 60%);
  text-underline-offset: 0.2em;
}

.gloss,
.terms,
.examples {
  color: var(--muted);
  font-size: 0.88em;
}

.terms {
  list-style: none;
  padding: 0;

  b {
    color: var(--text);
    font-weight: 600;
  }
}

footer {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 16px;

  @media (min-width: 700px) {
    margin-top: 8px;
  }
}

a {
  color: var(--accent);
}
