.ucalc {
  --uc-border: rgba(0, 0, 0, 0.10);
  --uc-text: rgba(0, 0, 0, 0.85);
  --uc-muted: rgba(0, 0, 0, 0.60);

  /* Tier colors (apply ONLY behind the image) */
  --uc-tier-unknown: #e9e9e9;
  --uc-tier-bright:  #ffff00;
  --uc-tier-yellow:  #fff38a;
  --uc-tier-light:   #fff2b8;
  --uc-tier-white:   #ffffff;

  --uc-radius: 16px;
  --uc-gap: 16px;

  --uc-image-max: 280px;

  font-family: inherit;
  color: var(--uc-text);
}

.ucalc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--uc-gap);
  align-items: start;
}

@media (min-width: 860px) {
  .ucalc-layout {
    grid-template-columns: minmax(260px, 360px) 1fr;
  }
}

/* Inputs panel */
.ucalc-inputs {
  border: 1px solid var(--uc-border);
  border-radius: var(--uc-radius);
  padding: 14px;
  background: #fff;
}

.ucalc-field + .ucalc-field {
  margin-top: 12px;
}

.ucalc-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.ucalc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--uc-border);
  font-size: 16px;
  outline: none;
}

.ucalc-input:focus {
  border-color: rgba(0,0,0,0.28);
}

.ucalc-help {
  margin-top: 10px;
  font-size: 13px;
  color: var(--uc-muted);
}

/* Result card: ALWAYS neutral */
.ucalc-card {
  border: 1px solid var(--uc-border);
  border-radius: var(--uc-radius);
  padding: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  background: #fff !important; /* force neutral */
}

/* Zebra cue: subtle dashed border on the card only when zebra */
.ucalc-card.ucalc-is-zebra {
  border-style: dashed;
}

/* Layout */
.serp-summary-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

/* Animal wrapper */
.ucalc-animal-wrap {
  width: clamp(140px, 22vw, var(--uc-image-max));
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  display: grid;
  place-items: center;

  /* Default background behind image */
  background: var(--uc-tier-unknown);

  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Tier backgrounds apply ONLY behind the image, via uc-tier-* on the wrapper */
.ucalc-animal-wrap.uc-tier-unknown { background: var(--uc-tier-unknown); }
.ucalc-animal-wrap.uc-tier-bright  { background: var(--uc-tier-bright); }
.ucalc-animal-wrap.uc-tier-yellow  { background: var(--uc-tier-yellow); }
.ucalc-animal-wrap.uc-tier-light   { background: var(--uc-tier-light); }
.ucalc-animal-wrap.uc-tier-white   { background: var(--uc-tier-white); }
.ucalc-animal-wrap.uc-tier-zebra   { background: #fff; }

/* Image sizing */
.ucalc-animal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Values list */
.serp-summary-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pair {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
}

.pair .label {
  color: var(--uc-muted);
  font-weight: 700;
  white-space: nowrap;
}

.pair .value {
  font-weight: 800;
  text-align: right;
}

.serp-summary-meta-divider {
  height: 1px;
  background: rgba(0,0,0,0.10);
  margin: 4px 0;
}

.serp-summary-unknown {
  color: rgba(0,0,0,0.55);
  font-weight: 800;
}

.ucalc-footnote {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--uc-muted);
  line-height: 1.35;
}

/* =========================================================
   EXTRA SAFETY: if any legacy tier-* classes remain anywhere,
   keep the card neutral.
   ========================================================= */
.ucalc .ucalc-card.tier-unknown,
.ucalc .ucalc-card.tier-bright,
.ucalc .ucalc-card.tier-yellow,
.ucalc .ucalc-card.tier-light,
.ucalc .ucalc-card.tier-white,
.ucalc .ucalc-card.tier-zebra,
.ucalc .serp-summary-body.ucalc-card.tier-unknown,
.ucalc .serp-summary-body.ucalc-card.tier-bright,
.ucalc .serp-summary-body.ucalc-card.tier-yellow,
.ucalc .serp-summary-body.ucalc-card.tier-light,
.ucalc .serp-summary-body.ucalc-card.tier-white,
.ucalc .serp-summary-body.ucalc-card.tier-zebra {
  background: #fff !important;
}
