/* Reusable AnimalSake article mini-interactives. */
.article-interactive {
  margin: 26px 0 30px;
  padding: 18px;
  scroll-margin-top: 170px;
  background: var(--cream-card, #fffdf8);
  border: 1px solid var(--line, #efe3cf);
  border-radius: 10px;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(74, 53, 38, .08));
  color: var(--ink, #4a3526);
}

.article-body .article-interactive {
  line-height: 1.5;
}

.article-interactive__head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.article-body .article-interactive__eyebrow,
.article-interactive__eyebrow {
  margin: 0;
  color: var(--accent-ink, var(--orange-deep, #e8620e));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.article-body .article-interactive__title,
.article-interactive__title {
  display: block;
  margin: 0;
  color: var(--ink, #4a3526);
  font-size: 24px;
  line-height: 1.15;
}

.article-body .article-interactive__title::before {
  content: none;
}

.article-body .article-interactive__dek,
.article-interactive__dek {
  margin: 0;
  max-width: 46rem;
  color: var(--ink-soft, #6f5b4a);
  font-size: 15.5px;
  line-height: 1.45;
}

.ai-cycle {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
}

.ai-cycle-wheel {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 1;
  padding: 12px;
  background: #fffaf0;
  border: 1px solid var(--line, #efe3cf);
  border-radius: 10px;
}

.ai-cycle-wheel__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.ai-cycle-wheel__ring,
.ai-cycle-wheel__path {
  fill: none;
  stroke: #ead6b8;
  stroke-width: 9;
  stroke-linecap: round;
}

.ai-cycle-wheel__path {
  stroke-width: 5;
  stroke-dasharray: 7 10;
}

.ai-cycle-wheel__node circle {
  fill: #fff;
  stroke: var(--line, #efe3cf);
  stroke-width: 3;
  transition: fill .18s ease, stroke-color .18s ease, transform .18s ease;
}

.ai-cycle-wheel__node text {
  fill: var(--ink-soft, #6f5b4a);
  font-family: var(--font, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.ai-cycle-wheel__node.is-active circle {
  fill: #fff6df;
  stroke: var(--accent, #e2932a);
}

.ai-cycle-wheel__node.is-complete circle {
  fill: #eef7e8;
  stroke: var(--green, #6aa84f);
}

.ai-cycle-wheel__node.is-complete text {
  fill: var(--green-deep, #4e8537);
}

.ai-cycle__panel {
  min-width: 0;
}

.ai-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-stage-button {
  width: 100%;
  min-height: 70px;
  padding: 11px 12px;
  border: 2px solid var(--line, #efe3cf);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #4a3526);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.ai-stage-button:hover:not(:disabled) {
  border-color: var(--accent, #e2932a);
  background: #fffaf0;
}

.ai-stage-button:disabled {
  cursor: default;
  opacity: 1;
  border-color: var(--green, #6aa84f);
  background: #eef7e8;
}

.ai-stage-button.is-wrong {
  border-color: #d95a43;
  background: #fff0ea;
}

.ai-stage-button__title {
  display: block;
  color: var(--ink, #4a3526);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.2;
}

.ai-stage-button__note {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft, #6f5b4a);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

.ai-order-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.article-body .ai-order-slots {
  padding-left: 0;
}

.ai-order-slots li {
  min-height: 54px;
  margin: 0;
  padding: 8px 9px;
  background: #fffaf0;
  border: 1px dashed var(--line, #efe3cf);
  border-radius: 8px;
}

.ai-order-slots li.is-filled {
  background: #eef7e8;
  border-color: var(--green, #6aa84f);
  border-style: solid;
}

.ai-order-slots__num {
  display: block;
  color: var(--accent-ink, var(--orange-deep, #e8620e));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.ai-order-slots__name {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft, #6f5b4a);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.ai-order-slots li.is-filled .ai-order-slots__name {
  color: var(--green-deep, #4e8537);
}

.ai-feedback {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #efe3cf);
}

.article-body .ai-feedback__status,
.ai-feedback__status {
  flex: 1;
  min-height: 48px;
  margin: 0;
  color: var(--ink-soft, #6f5b4a);
  font-size: 15px;
  line-height: 1.45;
}

.ai-feedback__status[data-tone="right"] {
  color: var(--green-deep, #4e8537);
}

.ai-feedback__status[data-tone="wrong"] {
  color: #a63d2f;
}

.ai-feedback__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.ai-feedback__count {
  min-width: 42px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid var(--line, #efe3cf);
  color: var(--accent-ink, var(--orange-deep, #e8620e));
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.ai-reset {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--green, #6aa84f);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.ai-reset:hover {
  background: var(--green-deep, #4e8537);
}

.article-interactive button:focus-visible {
  outline: 3px solid var(--accent-ink, var(--orange-deep, #e8620e));
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .ai-cycle {
    grid-template-columns: 1fr;
  }

  .ai-cycle-wheel {
    max-width: 250px;
  }
}

@media (max-width: 520px) {
  .article-interactive {
    padding: 15px;
  }

  .ai-stage-grid,
  .ai-order-slots {
    grid-template-columns: 1fr 1fr;
  }

  .ai-feedback {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-feedback__actions {
    justify-content: space-between;
  }
}

@media (max-width: 380px) {
  .ai-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-cycle-wheel__node circle,
  .ai-stage-button {
    transition: none;
  }
}

/* ===== Bite-Force Showdown (giant-panda) — relative comparison bars ===== */
.bite-module .bite-bars { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 6px; }
.bite-row { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 12px;
  width: 100%; background: none; border: 0; padding: 7px 9px; border-radius: 12px;
  cursor: pointer; font: inherit; text-align: left; }
.bite-row:hover { background: rgba(75, 47, 32, .05); }
.bite-row:focus-visible { outline: 3px solid var(--accent, #ff5a00); outline-offset: 2px; }
.bite-row.is-selected { background: rgba(255, 90, 0, .10); }
.bite-row__name { display: flex; align-items: center; gap: 8px;
  font: 700 15px/1.2 "Baloo 2", system-ui, sans-serif; color: var(--ink, #4b2f20); }
.bite-row__emoji { font-size: 21px; line-height: 1; }
.bite-row__track { position: relative; height: 24px; background: #efe2cf; border-radius: 999px; overflow: hidden; }
.bite-row__fill { position: absolute; top: 0; left: 0; bottom: 0; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #ffc187, var(--accent, #ff5a00));
  transition: width .95s cubic-bezier(.22, 1, .36, 1); }
.bite-row--panda .bite-row__fill { background: linear-gradient(90deg, #9bd07f, var(--green, #5aa545)); }
.bite-row--panda .bite-row__name { color: var(--green-deep, #3f7a30); }
.bite-note { font: 600 12.5px/1.4 "Quicksand", system-ui, sans-serif;
  color: var(--ink-soft, #6f5b4a); margin: 8px 2px 0; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .bite-row__fill { transition: none; } }

/* ===== Grow-a-Cub scrubber ===== */
.cub-module .cub-stage { display: flex; justify-content: center; margin: 6px 0 2px; }
.cub-svg { width: 150px; height: 150px; }
.cub-range, .day-range { width: 100%; max-width: 420px; margin: 8px auto 0; display: block; accent-color: var(--green, #5aa545); }
.cub-ticks { display: flex; justify-content: space-between; max-width: 420px; margin: 5px auto 0;
  font: 600 11px/1.2 "Quicksand", system-ui, sans-serif; color: var(--ink-soft, #6f5b4a); }

/* ===== Build a Panda's Day dial ===== */
.day-module .day-dial { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 2px; }
.day-svg { width: 168px; height: 168px; }
.day-ring-bg { fill: none; stroke: #efe2cf; stroke-width: 15; }
.day-ring-eat { fill: none; stroke: var(--accent, #ff5a00); stroke-width: 15; stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.day-ring-sleep { fill: none; stroke: #7c9cc4; stroke-width: 15; stroke-linecap: round; transition: stroke-dasharray .4s ease, stroke-dashoffset .4s ease; }
.day-readout { font: 700 14px/1.3 "Quicksand", system-ui, sans-serif; color: var(--ink, #4b2f20); text-align: center; }
.day-range { accent-color: var(--accent, #ff5a00); }
.day-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  font: 600 12px "Quicksand", system-ui, sans-serif; color: var(--ink-soft, #6f5b4a); }
.day-legend span { display: inline-flex; align-items: center; gap: 6px; }
.day-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .day-ring-eat, .day-ring-sleep { transition: none; } }

/* ===== Cuddly or Cautious? flip cards ===== */
.flip-module .flip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 2px; }
@media (max-width: 560px) { .flip-module .flip-grid { grid-template-columns: 1fr; } }
.flip-card { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; perspective: 1000px; min-height: 140px; }
.flip-card__inner { position: relative; display: block; width: 100%; min-height: 140px; height: 100%;
  transition: transform .5s; transform-style: preserve-3d; }
.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); }
.flip-card__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 15px; border-radius: 14px; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  text-align: left; font: 600 13.5px/1.4 "Quicksand", system-ui, sans-serif; box-shadow: 0 4px 14px rgba(75,47,32,.10); }
.flip-card__face--front { background: #fff3d6; color: var(--ink, #4b2f20); }
.flip-card__face--back { background: #e7f3df; color: var(--ink, #4b2f20); transform: rotateY(180deg); }
.flip-card:focus-visible { outline: 3px solid var(--accent, #ff5a00); outline-offset: 3px; border-radius: 14px; }
.flip-card__tag { align-self: flex-start; font: 800 10px/1 "Quicksand", sans-serif; text-transform: uppercase;
  letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; color: #fff; }
.flip-card__face--front .flip-card__tag { background: #c47d12; }
.flip-card__face--back .flip-card__tag { background: var(--green, #5aa545); }
@media (prefers-reduced-motion: reduce) {
  .flip-card__inner { transition: none; }
  .flip-card.is-flipped .flip-card__inner { transform: none; }
  .flip-card__face--back { transform: none; opacity: 0; transition: opacity .2s; }
  .flip-card__face--front { transition: opacity .2s; }
  .flip-card.is-flipped .flip-card__face--front { opacity: 0; }
  .flip-card.is-flipped .flip-card__face--back { opacity: 1; }
}
