/* ==========================================================================
   Interactive simulation: "How to Pay for Climate Costs"
   Uses the --hybrid-* design tokens defined in interior-redesign.css
   ========================================================================== */

.climate-game {
  background: var(--hybrid-paper-deep);
  padding: clamp(40px, 6vw, 80px) 0;
}

.cg-intro {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}

.cg-eyebrow {
  font-family: var(--hybrid-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--hybrid-forest);
  margin-bottom: 8px;
}

.cg-intro h2 {
  font-family: var(--hybrid-serif);
  margin-bottom: 12px;
}

.cg-intro p {
  color: var(--hybrid-ink);
  opacity: 0.85;
}

/* ---------- Round select ---------- */

.cg-round-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.cg-round-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--hybrid-white);
  border: none;
  border-top: 6px solid var(--hybrid-forest);
  border-radius: 4px;
  padding: 28px 26px;
  cursor: pointer;
  box-shadow: var(--hybrid-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--hybrid-sans);
}

.cg-round-card:hover,
.cg-round-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px rgba(17, 21, 18, 0.2);
  outline: none;
}

.cg-round-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hybrid-forest-dark);
  background: var(--hybrid-lime);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.cg-round-card h3 {
  font-family: var(--hybrid-serif);
  font-size: 26px;
  margin-bottom: 4px;
  color: var(--hybrid-ink);
}

.cg-round-card > p:nth-of-type(1) {
  font-weight: 700;
  color: var(--hybrid-forest);
  margin-bottom: 10px;
}

.cg-round-desc {
  color: var(--hybrid-ink);
  opacity: 0.8;
  font-size: 15px;
  margin-bottom: 0;
}

/* ---------- Board ---------- */

.cg-board-header {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
}

.cg-status-item {
  background: var(--hybrid-white);
  border-radius: 999px;
  padding: 8px 20px;
  font-family: var(--hybrid-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--hybrid-forest-dark);
  box-shadow: 0 4px 10px rgba(17, 21, 18, 0.08);
}

.cg-status-item span {
  font-weight: 700;
  color: var(--hybrid-forest);
}

.cg-message {
  text-align: center;
  min-height: 1.4em;
  font-size: 14px;
  color: var(--hybrid-forest-dark);
  margin-bottom: 20px;
}

.cg-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto 28px;
}

.cg-bucket {
  background: var(--hybrid-white);
  border: 2px solid var(--hybrid-rule);
  border-radius: 6px;
  padding: 16px 10px 14px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cg-bucket.cg-empty {
  border-color: rgba(178, 44, 44, 0.55);
  background: rgba(178, 44, 44, 0.06);
}

.cg-bucket-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.cg-bucket-name {
  font-family: var(--hybrid-sans);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hybrid-ink);
  margin-bottom: 8px;
}

.cg-coin-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  min-height: 16px;
  margin-bottom: 8px;
}

.cg-coin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hybrid-lime);
  border: 1px solid var(--hybrid-forest-dark);
  display: inline-block;
}

.cg-bucket.cg-empty .cg-coin-stack::after {
  content: "-";
  color: rgba(178, 44, 44, 0.7);
  font-size: 12px;
}

.cg-bucket-count {
  font-size: 13px;
  color: var(--hybrid-ink);
  opacity: 0.75;
  margin-bottom: 10px;
}

.cg-token-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cg-token-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--hybrid-forest);
  background: var(--hybrid-white);
  color: var(--hybrid-forest-dark);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cg-token-btn:hover:not(:disabled) {
  background: var(--hybrid-forest);
  color: var(--hybrid-white);
}

.cg-token-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Flash feedback when an event card resolves against a bucket */

@keyframes cg-pulse-success {
  0% { box-shadow: 0 0 0 0 rgba(213, 239, 103, 0.9); }
  100% { box-shadow: 0 0 0 14px rgba(213, 239, 103, 0); }
}

@keyframes cg-pulse-fail {
  0% { box-shadow: 0 0 0 0 rgba(178, 44, 44, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(178, 44, 44, 0); }
}

@keyframes cg-pulse-warning {
  0% { box-shadow: 0 0 0 0 rgba(219, 148, 27, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(219, 148, 27, 0); }
}

.cg-flash-success {
  animation: cg-pulse-success 0.8s ease-out;
}

.cg-flash-fail {
  animation: cg-pulse-fail 0.8s ease-out;
}

.cg-flash-warning {
  animation: cg-pulse-warning 0.8s ease-out;
}

/* ---------- Control panel ---------- */

.cg-panel-block {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.cg-instructions {
  color: var(--hybrid-ink);
  opacity: 0.85;
  margin-bottom: 8px;
}

.cg-tip {
  font-size: 13px;
  color: var(--hybrid-forest-dark);
  background: var(--hybrid-mint);
  border-radius: 6px;
  padding: 8px 14px;
  display: inline-block;
  margin-bottom: 18px;
}

.cg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.cg-link-btn {
  background: none;
  border: none;
  color: var(--hybrid-forest-dark);
  text-decoration: underline;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.cg-event-status {
  font-weight: 700;
  color: var(--hybrid-forest);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  margin-bottom: 10px;
}

.cg-card {
  background: var(--hybrid-white);
  border: 2px solid var(--hybrid-forest);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
}

.cg-card-cost {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--hybrid-forest);
  color: var(--hybrid-white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.cg-card h3 {
  font-family: var(--hybrid-serif);
  margin-bottom: 8px;
}

.cg-card-target {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 0;
}

.cg-result {
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cg-result-success {
  background: rgba(213, 239, 103, 0.35);
  color: var(--hybrid-forest-dark);
}

.cg-result-warning {
  background: rgba(219, 148, 27, 0.18);
  color: #7a4a0f;
}

.cg-result-gap {
  background: rgba(178, 44, 44, 0.12);
  color: #7a1f1f;
}

.cg-final-banner {
  max-width: 620px;
  margin: 0 auto 20px;
  text-align: center;
  border-radius: 8px;
  padding: 26px;
}

.cg-final-banner h3 {
  font-family: var(--hybrid-serif);
  margin-bottom: 8px;
}

.cg-final-win {
  background: rgba(213, 239, 103, 0.4);
  color: var(--hybrid-forest-dark);
}

.cg-final-lose {
  background: rgba(178, 44, 44, 0.1);
  color: #7a1f1f;
}

.cg-recap {
  max-width: 560px;
  margin: 0 auto 20px;
  background: var(--hybrid-white);
  border-radius: 6px;
  padding: 18px 22px;
}

.cg-recap h4 {
  font-family: var(--hybrid-sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--hybrid-forest);
}

.cg-recap ol {
  margin-bottom: 0;
  padding-left: 20px;
  font-size: 14px;
}

.cg-recap li {
  margin-bottom: 6px;
}

@media (max-width: 576px) {
  .cg-buckets {
    grid-template-columns: repeat(2, 1fr);
  }
}
