/* P&D500 — parody index provider. LIGHT site, do not dark-mode. */

:root {
  --paper: #F7F9F8;
  --card: #FFFFFF;
  --ink: #141C2B;
  --ink-soft: #4A5568;
  --mint: #46C68F;
  --mint-deep: #2FA574;
  --mint-wash: #E7F7F0;
  --red: #E5484D;
  --red-wash: #FDECEC;
  --line: #DFE7E2;
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
}

/* ---------- Ticker tape ---------- */

.ticker {
  background: var(--ink);
  border-bottom: 3px solid var(--mint);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  padding: 8px 0;
  animation: ticker-scroll 40s linear infinite;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #E7EEF0;
  margin-right: 34px;
}

.ticker-item b { font-weight: 600; }
.ticker-item .up { color: var(--mint); }
.ticker-item .down { color: #FF7B7F; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -1px;
  color: var(--mint);
  text-decoration: none;
}

.wordmark span { color: var(--ink); }

.wordmark-sm { font-size: 19px; }

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}

.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--mint);
  color: #fff;
}

.btn-primary:hover { background: var(--mint-deep); }

.btn-ghost {
  background: var(--mint-wash);
  color: var(--mint-deep);
  padding: 8px 14px;
  font-size: 13px;
}

.btn-ghost:hover { background: #d8f0e4; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: pulse 1.6s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--mint-deep);
}

.sub {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 52ch;
  margin-bottom: 26px;
}

.index-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}

.index-value {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -1px;
}

.chip {
  font-size: 14px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--mint-wash);
  color: var(--mint-deep);
}

.chip.down {
  background: var(--red-wash);
  color: var(--red);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
}

.ca-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}

.ca-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  color: var(--mint-deep);
}

.ca-value {
  font-size: 13.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* ---------- Mascot stage ---------- */

.stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 40px -28px rgba(20, 28, 43, .25);
}

.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stage-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
}

.stage-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mascot-box {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #FBFDFC 0%, #F1F7F3 100%);
  border: 1px solid var(--line);
}

.mascot-svg-wrap { display: block; }

.mascot-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.mascot-svg-wrap.shake { animation: shake .5s ease; }

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-7px, 2px) rotate(-1deg); }
  30% { transform: translate(6px, -3px) rotate(1deg); }
  45% { transform: translate(-5px, 3px); }
  60% { transform: translate(5px, -2px) rotate(-.6deg); }
  75% { transform: translate(-3px, 1px); }
  90% { transform: translate(2px, -1px); }
}

/* belly / head react via inline transforms set from JS; transitions here */
#belly {
  transition: transform .45s cubic-bezier(.25, .9, .3, 1.15);
  transform-box: fill-box;
  transform-origin: 50% 62%;
}

#head {
  transition: transform .45s cubic-bezier(.25, .9, .3, 1.15);
  transform-box: fill-box;
  transform-origin: 40% 90%;
}

#sweat { transition: opacity .35s ease; }

/* Speech bubble */

.bubble {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: 62%;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 600;
  z-index: 4;
  opacity: 0;
  transform: translateY(4px) scale(.96);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 26px;
  width: 14px;
  height: 14px;
  background: var(--card);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) skew(8deg, 8deg);
}

.bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* MASSIVE DUMP flash */

.dump-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 7vw, 54px);
  letter-spacing: -1px;
  color: var(--red);
  text-shadow: 0 2px 0 #fff, 0 6px 18px rgba(229, 72, 77, .35);
  transform: rotate(-4deg) scale(.6);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

.dump-flash.show { animation: dump-flash 1.6s ease forwards; }

@keyframes dump-flash {
  0% { opacity: 0; transform: rotate(-4deg) scale(.6); }
  12% { opacity: 1; transform: rotate(-4deg) scale(1.05); }
  20% { transform: rotate(-4deg) scale(1); }
  78% { opacity: 1; transform: rotate(-4deg) scale(1); }
  100% { opacity: 0; transform: rotate(-4deg) scale(1.04); }
}

/* Fart clouds */

.cloud {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  animation: cloud-drift 1.6s ease-out forwards;
}

@keyframes cloud-drift {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  14% { opacity: .95; transform: translate(-8px, -8px) scale(1); }
  100% { opacity: 0; transform: translate(-52px, -70px) scale(1.15); }
}

/* Pressure gauge */

.gauge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.gauge-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.gauge-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint) 0%, #E8B93B 55%, var(--red) 100%);
  background-size: 320px 100%;
  transition: width .45s cubic-bezier(.25, .9, .3, 1.15);
}

/* Demo controls */

.demo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.demo-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.chip-btn {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mint-deep);
  background: var(--mint-wash);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.chip-btn:hover { border-color: var(--mint-deep); }

.chip-btn-red {
  color: var(--red);
  background: var(--red-wash);
}

.chip-btn-red:hover { border-color: var(--red); }

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

.board {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  padding-bottom: 72px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 19px;
  letter-spacing: -.4px;
}

.panel-note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

#chart {
  display: block;
  width: 100%;
  height: 300px;
}

.tape {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow: hidden;
}

.tape li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  animation: tape-in .25s ease;
}

@keyframes tape-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tape .side {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .6px;
  padding: 3px 8px;
  border-radius: 999px;
}

.tape .side.buy { background: var(--mint-wash); color: var(--mint-deep); }
.tape .side.sell { background: var(--red-wash); color: var(--red); }

.tape .wallet { color: var(--ink-soft); flex: 1; }

.tape .usd { font-weight: 600; }

/* ---------- Methodology ---------- */

.method { padding-bottom: 84px; }

.method-head {
  max-width: 62ch;
  margin-bottom: 30px;
}

.method-head h2 {
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.method-head p { color: var(--ink-soft); }

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.method-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

.method-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--mint-deep);
  display: block;
  margin-bottom: 10px;
}

.method-card h3 {
  font-size: 18px;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}

.method-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- Constituents page ---------- */

.nav-active { color: var(--ink) !important; font-weight: 600; }

.cons-hero {
  padding-top: 56px;
  padding-bottom: 36px;
}

.cons-hero h1 {
  font-size: clamp(36px, 4.4vw, 54px);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.cons-hero .sub { margin-bottom: 30px; }

.cons-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.breadth-card { gap: 8px; }

.breadth-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--red-wash);
  overflow: hidden;
}

.breadth-fill {
  height: 100%;
  background: var(--mint);
  border-radius: 999px 0 0 999px;
  transition: width .5s ease;
}

.breadth-note {
  font-size: 11px;
  color: var(--ink-soft);
}

.cons-table-wrap { padding-bottom: 84px; }

.table-scroll { overflow-x: auto; }

.cons-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.cons-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.cons-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.cons-table tbody tr { cursor: pointer; transition: background .12s ease; }
.cons-table tbody tr:hover { background: var(--paper); }
.cons-table tbody tr:last-child td { border-bottom: none; }

.th-num, .cons-table td.th-num { text-align: right; }

.th-rank { width: 40px; }
.td-rank { color: var(--ink-soft); }

.c-name { display: flex; align-items: center; gap: 10px; }

.c-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.c-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mint-wash);
  color: var(--mint-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}

.c-name-text { display: flex; flex-direction: column; line-height: 1.25; }

.c-sym { font-family: var(--font-mono); font-weight: 600; font-size: 13.5px; }

.c-full {
  font-size: 11.5px;
  color: var(--ink-soft);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos { color: var(--mint-deep); }
.neg { color: var(--red); }

.status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  padding: 4px 9px;
  border-radius: 999px;
}

.st-pump { background: var(--mint-wash); color: var(--mint-deep); }
.st-hold { background: #EEF1F0; color: var(--ink-soft); }
.st-review { background: var(--red-wash); color: var(--red); }

.table-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-soft);
}

.table-error {
  text-align: center;
  color: var(--ink-soft);
  padding: 34px 12px !important;
}

.skeleton-row td { padding: 8px 12px; }

.skeleton {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--paper) 25%, #EDF3EF 50%, var(--paper) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 980px) {
  .cons-band { grid-template-columns: 1fr 1fr; }
}

/* ---------- Coming-soon pages ---------- */

.soon-hero {
  padding-top: 64px;
  padding-bottom: 8px;
  max-width: 860px;
}

.soon-hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.soon-hero .sub { margin-bottom: 26px; }

.sticker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  background: var(--card);
  border: 4px solid var(--red);
  border-radius: 12px;
  padding: 10px 22px;
  transform: rotate(-7deg);
  box-shadow: 0 10px 24px -12px rgba(229, 72, 77, .5), 0 2px 0 rgba(20, 28, 43, .08);
  margin-bottom: 26px;
}

.soon-teaser {
  padding-top: 40px;
  padding-bottom: 84px;
  max-width: 860px;
}

/* Insider memo */

.memo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.memo-stamp {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 6px;
  padding: 4px 10px;
  transform: rotate(-2deg);
}

.memo-body p {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 2;
}

.redact {
  display: inline-block;
  height: 13px;
  background: var(--ink);
  border-radius: 3px;
  vertical-align: middle;
  opacity: .88;
}

.redact.w8 { width: 64px; }
.redact.w10 { width: 84px; }
.redact.w12 { width: 104px; }
.redact.w14 { width: 124px; }
.redact.w16 { width: 148px; }
.redact.w20 { width: 188px; }

/* Committee picks */

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  overflow: hidden;
}

.pick-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--mint-deep);
  white-space: nowrap;
}

.pick-body {
  flex: 1;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}

.blurred {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.pick-lock { font-size: 15px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
}

.footer-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.footer-brand { flex: 1; }

.disclaimer {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  max-width: 78ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover { color: var(--mint-deep); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav a:not(.nav-key) { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .board { grid-template-columns: 1fr; }

  .method-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 24px; }

  .footer-links { flex-direction: row; gap: 20px; flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .index-value { font-size: 34px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .mascot-svg-wrap.shake { animation: none; }
  .live-dot { animation: none; }
  #belly, #head, .gauge-fill { transition-duration: .01s; }
  html { scroll-behavior: auto; }
}
