/* Statistics page — coloured auction cards + "View weekly report" toggle */

/* CTC = EATTA greens, Orthodox = warm tea ambers; volume darker, price lighter */
.sc-grid { gap: 18px; }
.stats-grid .sc {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(16, 24, 40, .45);
  isolation: isolate;
}
.stats-grid .sc-ctc-vol    { background: linear-gradient(135deg, #058d3b 0%, #12b05a 100%); }
.stats-grid .sc-ctc-price  { background: linear-gradient(135deg, #079a45 0%, #1fc26a 100%); }
.stats-grid .sc-orth-vol   { background: linear-gradient(135deg, #6b2a0a 0%, #9a3f0c 100%); }
.stats-grid .sc-orth-price { background: linear-gradient(135deg, #86400a 0%, #b45309 100%); }

/* soft light in the corner so the cards don't look flat */
.stats-grid .sc::before {
  content: ""; position: absolute; z-index: -1; inset: auto -40px -60px auto;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%);
}
.stats-grid .sc:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -14px rgba(16, 24, 40, .55); }

.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.sc-tag {
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18);
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.sc-sale { font-size: 13px; font-weight: 600; opacity: .9; }

.stats-grid .sc .sc-label {
  margin: 0 0 6px; color: rgba(255, 255, 255, .88);
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.stats-grid .sc .stat-value { color: #fff; font-size: 2.3rem; line-height: 1.1; margin: 0 0 4px; }
.stats-grid .sc .stat-unit  { color: rgba(255, 255, 255, .8); }

.sc-icon {
  position: absolute; right: 18px; bottom: 16px; width: 44px; height: 44px;
  fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* a figure that just changed during a live sale */
.stats-grid .sc.live-changed { animation: sc-pulse 1.6s ease-out; }
@keyframes sc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .9), 0 10px 24px -12px rgba(16, 24, 40, .45); }
  100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 10px 24px -12px rgba(16, 24, 40, .45); }
}

/* ── "View weekly report" ─────────────────────────────────────────────── */
.wr-toggle-row { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 34px; text-align: center; }
.wr-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px; background: #058d3b; color: #fff;
  font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(5, 141, 59, .7); transition: background .15s, transform .15s;
}
.wr-toggle:hover { background: #04702f; transform: translateY(-1px); }
.wr-toggle:focus-visible { outline: 3px solid rgba(5, 141, 59, .35); outline-offset: 3px; }
.wr-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wr-toggle .wr-chev { width: 18px; height: 18px; transition: transform .2s; }
.wr-toggle[aria-expanded="true"] .wr-chev { transform: rotate(180deg); }
.wr-toggle-sub { margin: 0; font-size: 13px; color: #667085; }

#weeklyReport:not([hidden]) { animation: wr-open .25s ease-out; }
@keyframes wr-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .stats-grid .sc, .wr-toggle, #weeklyReport { animation: none !important; transition: none; }
  .stats-grid .sc:hover { transform: none; }
}
@media (max-width: 560px) {
  .stats-grid .sc .stat-value { font-size: 2rem; }
  .wr-toggle { width: 100%; justify-content: center; }
}

/* keep the report clear of the sticky site header when it scrolls into view */
#weeklyReport { scroll-margin-top: 84px; }
