/* ============================================================
   RecipeMemoir — Animated Nutrition Rings (shared styles)
   Bright/light only. Ring color is themed via the SVG stroke
   set in JS (theme accent). Track is a light neutral. No sticky
   or fixed positioning. Responsive, zero horizontal overflow.
   ============================================================ */

.rm-nutrition {
  margin: 2.25rem 0;
  padding: 1.5rem clamp(1rem, 3vw, 1.75rem);
  background: rgba(0, 0, 0, 0.018);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.rm-nutrition-head {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .01em;
  margin: 0 0 .15rem;
}

.rm-nutrition-sub {
  font-size: .78rem;
  opacity: .62;
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.rm-rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr));
  gap: clamp(.6rem, 2vw, 1.1rem);
  align-items: start;
}

.rm-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.rm-ring-graphic {
  position: relative;
  width: clamp(74px, 18vw, 96px);
  aspect-ratio: 1 / 1;
}

.rm-ring-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rm-ring-track {
  fill: none;
  stroke: rgba(0, 0, 0, 0.10);
  stroke-width: 6;
}

.rm-ring-arc {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  /* dashoffset is animated inline by JS via requestAnimationFrame */
  transition: stroke-dashoffset 0s;
}

.rm-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.rm-ring-amt {
  font-size: clamp(.82rem, 2.4vw, .98rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rm-ring-label {
  margin-top: .5rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .82;
}

.rm-ring-dv {
  margin-top: .1rem;
  font-size: .72rem;
  opacity: .58;
  font-variant-numeric: tabular-nums;
}

/* Trust gate: caveat notes + suppression line. Muted/secondary,
   informative not shouting. */
.rm-nutrition-note {
  margin-top: 1rem;
  font-size: .76rem;
  opacity: .6;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.rm-nutrition-note::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}
.rm-nutrition-note--rough {
  opacity: .72;
  font-weight: 600;
}
/* Rough estimate: slightly mute the whole ring set so it reads
   as approximate, not precise. */
.rm-nutrition--rough .rm-rings {
  opacity: .82;
}
.rm-nutrition-unavailable {
  margin: .5rem 0 0;
  font-size: .86rem;
  opacity: .6;
  line-height: 1.5;
}

@media (max-width: 420px) {
  .rm-rings {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-ring-arc { transition: none; }
}
