/* IRIS design system — soft blue-grey canvas, AIESEC blue accents, Plus Jakarta Sans. */

:root {
  --bg: #e6edf6;
  --bg-2: #dbe5f1;
  --surface: #f3f7fc;
  --surface-2: #eaf0f8;
  --surface-3: #ffffff;
  --line: rgba(14, 38, 76, 0.08);
  --line-strong: rgba(14, 38, 76, 0.15);
  --text: #0e2240;
  --text-2: #3b4f6c;
  --muted: #687a93;
  --blue: #037ef3;
  --blue-2: #2f95f5;
  --blue-ink: #0560c2;
  --blue-soft: #d5e8fd;
  --blue-deep: #0353b8;
  --glow: rgba(3, 126, 243, 0.28);
  --pos: #0e9466;
  --neg: #d93c56;
  --gold: #b9861f;
  --shadow: 0 1px 2px rgba(14, 38, 76, 0.05), 0 8px 24px -12px rgba(14, 38, 76, 0.18);

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --nav-h: 68px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 72px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Soft page background: gentle blue washes */
.page-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 90% 30%, rgba(3, 126, 243, 0.08), transparent 60%),
    radial-gradient(800px 600px at 0% 80%, rgba(3, 126, 243, 0.07), transparent 60%),
    var(--bg);
}

/* Blue-man silhouette, recoloured through a CSS mask */
.blue-man {
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("blue-man.c2a0db2e00fb.png") center / contain no-repeat;
  mask: url("blue-man.c2a0db2e00fb.png") center / contain no-repeat;
  aspect-ratio: 278 / 480;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(230, 237, 246, 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand .blue-man { width: 16px; color: var(--blue); }
.brand-word { font-weight: 800; letter-spacing: 0.04em; font-size: 19px; color: var(--text); }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--text-2);
  font-size: 14px; font-weight: 600; transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(3, 126, 243, 0.07); }
.nav-links a.is-active { color: var(--blue-ink); background: var(--blue-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line-strong); color: var(--text-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); animation: pulse 2.4s infinite; }
.live-pill.is-stale .live-dot { background: var(--gold); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(14, 148, 102, .45); } 70% { box-shadow: 0 0 0 8px rgba(14, 148, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(14, 148, 102, 0); } }

.select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687a93' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 34px 8px 14px; font-size: 13px; font-weight: 600; color: var(--text);
  max-width: 100%;
}
.select:hover { border-color: rgba(3, 126, 243, 0.45); }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 4px auto; }

/* ---------- Hero: a vivid AIESEC-blue band ---------- */
.hero, .dd-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(700px 400px at 85% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(135deg, #0353b8 0%, #037ef3 55%, #4aa6f8 100%);
}
.hero { padding: clamp(44px, 7vw, 84px) 0 0; }
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.hero .eyebrow, .dd-hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero-title {
  font-weight: 800; font-size: clamp(84px, 17vw, 240px); line-height: 0.9; letter-spacing: -0.045em;
  margin: 14px 0 0; color: #fff;
}
.js .hero-title { animation: title-in 1.1s var(--ease) both; }
@keyframes title-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-sub { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-top: clamp(18px, 2.6vw, 30px); }
.hero-lede { max-width: 580px; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, 0.88); margin: 0; }
.hero-lede strong { color: #fff; font-weight: 700; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn svg { width: 16px; height: 16px; }
.hero .btn { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.hero .btn-primary { background: #fff; border-color: #fff; color: var(--blue-deep); }
.hero-man {
  position: absolute; z-index: 0; color: #fff;
  right: max(-40px, calc((100vw - var(--max)) / 2 - 20px)); top: 24px;
  height: min(104%, 680px); opacity: 0.13;
  animation: walk 9s ease-in-out infinite;
}
.hero-man.is-echo { right: auto; left: -110px; top: 170px; height: 400px; opacity: 0.07; animation-delay: -3s; }
@keyframes walk { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-24px); } }

.hero-stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(28px, 4.5vw, 48px);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.hero-stat { padding: 20px 20px 24px 0; border-right: 1px solid rgba(255, 255, 255, 0.18); }
.hero-stat:not(:first-child) { padding-left: 20px; }
.hero-stat:last-child { border-right: 0; }
.hero-stat-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.hero-stat-value { font-weight: 800; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.1; margin-top: 4px; letter-spacing: -0.02em; }
.hero-stat-note { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.hero-stat-note b { color: #fff; font-weight: 700; }
.hero .skeleton { background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.35), rgba(255,255,255,.15)); background-size: 200% 100%; }

/* Marquee ticker */
.marquee {
  position: relative; z-index: 1; margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden; background: rgba(2, 40, 100, 0.18);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; white-space: nowrap; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.marquee-item b { font-weight: 800; color: #fff; letter-spacing: .02em; }
.marquee-item .blue-man { width: 8px; color: #fff; opacity: .8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Range bar (global date filter) ---------- */
.rangebar {
  position: sticky; top: var(--nav-h); z-index: 40;
  background: rgba(230, 237, 246, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.rangebar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.rangebar-label { font-size: 13px; color: var(--muted); }
.rangebar-label b { color: var(--text); font-weight: 700; }
.segmented {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.segmented button {
  border: 0; background: transparent; color: var(--text-2);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] {
  background: var(--blue); color: #fff; box-shadow: 0 4px 12px -4px var(--glow);
}
.dd-hero .segmented { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); }
.dd-hero .segmented button { color: rgba(255, 255, 255, 0.85); }
.dd-hero .segmented button[aria-pressed="true"] { background: #fff; color: var(--blue-deep); }
.date-fields { display: none; align-items: center; gap: 8px; }
.date-fields.is-open { display: inline-flex; }
.date-input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--text); }
.rangebar .spacer { flex: 1; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.section-title { font-weight: 800; font-size: clamp(32px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -0.035em; margin: 10px 0 0; }
.section-title em { font-style: normal; color: var(--blue); }
.section-desc { color: var(--muted); max-width: 460px; margin: 0; font-size: 14px; }

/* Cards */
.card {
  position: relative; border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px; overflow: hidden; isolation: isolate;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(3, 126, 243, 0.07), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.card-title { font-size: 18px; font-weight: 700; margin: 2px 0 0; letter-spacing: -0.01em; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.delta.up { color: var(--pos); }
.delta.down { color: var(--neg); }
.delta.flat { color: var(--muted); }

/* ---------- Overview bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.bento > * { min-width: 0; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.big-number { font-weight: 800; font-size: clamp(44px, 5.4vw, 76px); line-height: 1; margin: 16px 0 6px; letter-spacing: -0.035em; }
.big-number small { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }

/* Funnel */
.funnel { display: grid; gap: 14px; margin-top: 18px; }
.funnel-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; }
.funnel-name { font-size: 13px; font-weight: 700; color: var(--text-2); }
.funnel-track { height: 34px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.funnel-bar {
  height: 100%; width: 0; border-radius: 10px; min-width: 4px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue) 70%, var(--blue-2));
  transition: width 1.1s var(--ease);
}
.funnel-row:nth-child(2) .funnel-bar { opacity: .85; }
.funnel-row:nth-child(3) .funnel-bar { opacity: .7; }
.funnel-row:nth-child(4) .funnel-bar { opacity: .55; }
.funnel-value { text-align: right; min-width: 92px; }
.funnel-value b { display: block; font-size: 18px; font-weight: 800; }
.funnel-value span { font-size: 12px; color: var(--muted); }

/* Conversion rings */
.conv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.conv {
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
  padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.ring { --p: 0; width: 92px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), rgba(14, 38, 76, 0.08) 0);
  transition: --p 1s var(--ease);
}
.ring::after { content: ""; grid-area: 1 / 1; width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); }
.ring b { grid-area: 1 / 1; z-index: 1; font-size: 17px; font-weight: 800; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.conv-name { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.metric { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.metric-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 24px; font-weight: 800; margin-top: 2px; letter-spacing: -0.02em; }
.metric-hint { font-size: 12px; color: var(--muted); }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; letter-spacing: .02em;
  background: var(--blue-soft); color: var(--blue-ink);
}
.product-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.product-stat { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.product-stat span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.product-stat b { font-size: 18px; font-weight: 800; }
.mini-bar { height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 16px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: inherit; transition: width 1s var(--ease); }
.mini-caption { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.mini-caption b { color: var(--text); }

/* ---------- Podium ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.podium .card { padding: 24px; }
.podium-rank { font-weight: 800; font-size: 64px; line-height: .9; letter-spacing: -0.04em; position: absolute; right: 20px; top: 16px; color: rgba(14, 38, 76, 0.07); }
.podium .card.is-1 { border-color: rgba(185, 134, 31, .4); background: linear-gradient(180deg, #fbf3df, var(--surface) 60%); }
.podium .card.is-1 .podium-rank { color: rgba(185, 134, 31, .3); }
.podium .card.is-2 .podium-rank { color: rgba(116, 131, 154, .28); }
.podium .card.is-3 .podium-rank { color: rgba(176, 97, 47, .28); }
.podium-lc { font-weight: 800; font-size: 26px; margin: 4px 0 0; padding-right: 70px; letter-spacing: -0.02em; }
.podium-score { margin-top: 14px; font-size: 13px; color: var(--muted); }
.podium-score b { font-size: 28px; color: var(--text); font-weight: 800; margin-right: 4px; }
.podium-meta { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.podium-meta b { color: var(--text); }

/* ---------- Score explainer ---------- */
.score-explain { margin-top: 16px; }
.weights { display: grid; gap: 10px; margin-top: 16px; }
.weight-row { display: grid; grid-template-columns: 74px 1fr 64px; gap: 12px; align-items: center; font-size: 13px; }
.weight-row span:first-child { font-weight: 700; }
.weight-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.weight-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.weight-row b { text-align: right; font-weight: 800; }
.steps { list-style: none; counter-reset: step; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 14px; color: var(--text-2); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-ink); font-weight: 800; font-size: 13px;
}
.steps b { color: var(--text); }
.formula {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px dashed var(--line-strong); font-size: 13px; color: var(--text-2);
}
.breakdown-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
table.breakdown { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
table.breakdown th { text-align: right; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line-strong); }
table.breakdown td { text-align: right; padding: 10px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.breakdown th:first-child, table.breakdown td:first-child { text-align: left; }
table.breakdown td:first-child { font-weight: 700; }
table.breakdown tfoot td { border-bottom: 0; font-weight: 800; font-size: 15px; }
.pts { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.pts-track { width: 60px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pts-track i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.breakdown-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Data tables ---------- */
.table-card { padding: 0; }
.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.table-toolbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); min-width: 200px;
}
.search svg { width: 14px; height: 14px; color: var(--muted); }
.search input { background: none; border: 0; outline: 0; font-size: 13px; width: 100%; }
.table-note { font-size: 12px; color: var(--muted); }
.table-scroll { overflow: auto; max-height: 640px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th, table.data td { padding: 13px 16px; white-space: nowrap; }
table.data thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong); text-align: right;
}
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th.text, table.data td.text { text-align: left; }
table.data td { text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:nth-child(even) { background: rgba(14, 38, 76, 0.018); }
table.data tbody tr:hover { background: rgba(3, 126, 243, 0.06); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tfoot td { position: sticky; bottom: 0; background: var(--blue-soft); font-weight: 800; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.sort-btn {
  border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
}
.sort-btn::after { content: "↕"; opacity: .35; font-size: 11px; }
.sort-btn[data-dir="desc"]::after { content: "↓"; opacity: 1; color: var(--blue); }
.sort-btn[data-dir="asc"]::after { content: "↑"; opacity: 1; color: var(--blue); }
.sort-btn:hover, th[aria-sort] .sort-btn { color: var(--text); }
.lc-link { font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.lc-link:hover { color: var(--blue); }
.lc-link svg { width: 12px; height: 12px; opacity: 0; transition: opacity .2s, transform .2s; }
tr:hover .lc-link svg { opacity: .7; transform: translate(1px, -1px); }
.rank {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px;
  font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--text-2);
}
.rank.r1 { background: #f6e7c1; color: #8a6210; }
.rank.r2 { background: #e2e7ee; color: #4f5d72; }
.rank.r3 { background: #f3dccb; color: #8c4a22; }
.score-cell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.score-track { width: 90px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.score-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: inherit; }
.muted { color: var(--muted); }
.zero { color: #a3b0c2; }
.why-btn {
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--blue-ink);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.why-btn:hover { background: var(--blue-soft); }

.state { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.state.error { color: var(--neg); }
.skeleton { display: inline-block; height: 1em; width: 3.5em; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, rgba(14,38,76,.05), rgba(14,38,76,.11), rgba(14,38,76,.05));
  background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Leaderboards ---------- */
.board-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.board-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.board-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.board-bar-wrap { position: relative; height: 34px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.board-bar { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 10px; background: var(--blue-soft); transition: width 1s var(--ease); }
.board-item:first-child .board-bar { background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.board-item:first-child .board-name { color: #fff; }
.board-name { position: relative; z-index: 1; line-height: 34px; padding-left: 12px; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text); }
.board-value { font-weight: 800; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.board-value small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.board-pos { font-size: 13px; color: var(--muted); text-align: center; font-weight: 700; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(80px, 10vw, 130px); border-top: 1px solid var(--line-strong); position: relative; overflow: hidden; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 48px 0 24px; }
.footer h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.footer a { display: block; color: var(--text-2); padding: 3px 0; font-size: 14px; font-weight: 500; }
.footer a:hover { color: var(--blue); }
.footer .brand { display: inline-flex; color: var(--text); }
.footer p { color: var(--muted); font-size: 14px; max-width: 360px; margin: 10px 0 0; }
.footer-word {
  font-weight: 800; font-size: clamp(90px, 24vw, 340px); line-height: .8; letter-spacing: -0.05em; text-align: center;
  background: linear-gradient(180deg, rgba(3, 126, 243, .16), rgba(3, 126, 243, 0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0; user-select: none; pointer-events: none; transform: translateY(16%);
}
.footer-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); }

/* ---------- LC deep dive ---------- */
.dd-hero { padding: clamp(40px, 6vw, 72px) 0 36px; }
.dd-title { font-weight: 800; font-size: clamp(52px, 9vw, 128px); line-height: .95; letter-spacing: -0.045em; margin: 12px 0 0; color: #fff; }
.dd-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.dd-hero .table-note { color: rgba(255, 255, 255, 0.82); }
.dd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dd-kpi .big-number { font-size: clamp(38px, 4.4vw, 60px); margin: 14px 0 6px; }
.dd-kpi .ly { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dd-kpi .ly b { color: var(--text-2); }
.chart-box { position: relative; height: 300px; margin-top: 16px; }
.chart-box.sm { height: 240px; }
.bar-list { display: grid; gap: 10px; margin-top: 16px; }
.bar-list-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.bar-list-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-weight: 600; }
.bar-list-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-list-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: inherit; width: 0; transition: width 1s var(--ease); }
.bar-list-row b { font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .product-grid { grid-template-columns: 1fr; }
  .dd-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(230, 237, 246, .98); padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--line);
  }
  .nav-toggle { display: block; }
  .nav .wrap { gap: 12px; }
  .nav-right { margin-left: auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat:nth-child(3) { padding-left: 0; }
  .hero-stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.18); }
  .hero-sub { grid-template-columns: 1fr; }
  .podium, .board-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .live-pill .live-text { display: none; }
  .nav-right .select { max-width: 150px; }
  .conv-grid { grid-template-columns: 1fr; }
  .conv { flex-direction: row; text-align: left; }
  .ring { width: 64px; }
  .ring b { font-size: 13px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .product-stat { padding: 8px 10px; }
  .rangebar .segmented { width: 100%; justify-content: space-between; }
  .segmented button { padding: 7px 10px; }
  .dd-kpis { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 48px 1fr auto; gap: 10px; }
  .funnel-value { min-width: 70px; }
  table.data th, table.data td { padding: 11px 12px; }
  table.data td:first-child, table.data th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  table.data thead th:first-child { z-index: 3; background: var(--surface-2); }
  .score-track, .pts-track { display: none; }
  .search { min-width: 0; flex: 1; }
  .weight-row { grid-template-columns: 64px 1fr 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Clickable score in the ranking table */
.why-score { border: 0; background: none; font: inherit; color: inherit; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; cursor: pointer; }
.why-score:hover { background: var(--blue-soft); }
.why-score:hover b { color: var(--blue-ink); }

/* Version badge next to the IRIS wordmark */
.brand-version {
  font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1;
  padding: 3px 6px; border-radius: 6px; background: var(--blue); color: #fff;
  align-self: center; transform: translateY(-1px);
}

/* Per-table date filter (defaults to the page's date range) */
.table-dates {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2);
}
.table-dates.is-custom { border-color: var(--blue); background: var(--blue-soft); }
.table-dates-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.table-dates .date-input { padding: 4px 10px; font-size: 12px; }
.link-btn {
  border: 0; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}
.link-btn:hover { background: var(--blue-deep); }

/* Footer credit */
.footer-meta a { display: inline; padding: 0; color: var(--text); font-weight: 700; }
.footer-meta .heart { color: #e0445c; }

@media (max-width: 600px) {
  .table-dates { width: 100%; border-radius: var(--radius-sm); }
  .table-dates .date-input { flex: 1; min-width: 0; }
}
.table-scroll.is-loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* Small version pill beside the big hero "IRIS" (sizes in em of the title) */
.hero-title { display: flex; align-items: flex-start; }
.hero-version {
  font-size: max(0.09em, 13px); font-weight: 800; letter-spacing: 0.04em; line-height: 1;
  padding: 0.35em 0.6em; border-radius: 0.6em; margin: 1.1em 0 0 0.5em;
  background: #fff; color: var(--blue-deep); box-shadow: 0 6px 18px -8px rgba(2, 40, 100, 0.5);
}
