
/* Whole-Person-Intelligence -- main stylesheet */

:root {
  --text: #1a1a1f;
  --text-soft: #4a4a55;
  --text-muted: #6b6b76;
  --bg: #fdfbf7;
  --bg-soft: #f4efe6;
  --card: #ffffff;
  --border: #e4ddce;
  --border-soft: #efe8d9;
  --shadow-sm: 0 1px 2px rgba(30, 28, 20, 0.04), 0 2px 6px rgba(30, 28, 20, 0.04);
  --shadow-md: 0 4px 10px rgba(30, 28, 20, 0.06), 0 10px 30px rgba(30, 28, 20, 0.08);
  --radius: 12px;
  --radius-sm: 8px;

  --accent: #1E3A8A;
  --accent-soft: #eaf0fb;
  --accent-ink: #0f1e4a;

  --iq: #1E3A8A;
  --iq-soft: #eaf0fb;
  --eq: #DC2626;
  --eq-soft: #fdecea;
  --bq: #047857;
  --bq-soft: #e6f4ef;
  --qi: #7C3AED;
  --qi-soft: #efe8fb;
  --ai: #0891B2;
  --ai-soft: #e2f3f7;
  --overview: #b45309;
  --overview-soft: #fbeed8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 2.4rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }

p { margin: 0 0 1rem; color: var(--text-soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Layout shells ---------------- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section-wide { padding: 3rem 1.25rem; }
.section-sub { color: var(--text-muted); margin: -.4rem 0 1.8rem; max-width: 62ch; }

.site-header {
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 6px;
  background: var(--text); color: var(--bg);
  font-family: 'Fraunces', serif; font-weight: 700; font-size: .85rem;
}
.brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.05rem; }
.main-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--text-soft);
  font-weight: 500;
  padding: .3rem .2rem;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-size: .95rem;
}
.main-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.main-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------------- Hero ---------------- */
.hero { padding: 4.5rem 1.25rem 3.5rem; background: var(--bg-soft); border-bottom: 1px solid var(--border-soft); }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); font-weight: 600; margin: 0 0 .8rem; }
.hero .lede { font-size: 1.15rem; max-width: 56rem; color: var(--text-soft); }
.hero-home { padding-top: 5.5rem; padding-bottom: 4rem; }
.hero-home h1 { max-width: 22ch; }
.hero-intel h1 { max-width: 20ch; }
.hero-intel .intel-h1 {
  display: flex;
  gap: 2.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  max-width: none;
}
.hero-intel .intel-h1-label,
.hero-intel .intel-h1-subtitle { display: inline-block; }
.hero-ctas { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: .7rem 1.2rem; border-radius: 999px;
  font-weight: 500; font-size: .95rem; transition: all .15s ease;
  text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--card); text-decoration: none; }
.btn-accent { background: var(--text); color: #fff; }
.btn-accent:hover { filter: brightness(1.1); text-decoration: none; }

/* ---------------- Nav CTA ("Join") ---------------- */
.main-nav .nav-cta {
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: .35rem .9rem;
  color: var(--text);
  background: var(--card);
}
.main-nav .nav-cta:hover { background: var(--text); color: #fff; border-bottom-color: var(--text); }
.main-nav .nav-cta.active { background: var(--text); color: #fff; }

/* ---------------- Join form ---------------- */
.section-narrow { max-width: 48rem; padding-left: 1.25rem; padding-right: 1.25rem; margin-left: auto; margin-right: auto; }
.join-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 16px rgba(26,26,31,0.04);
}
.join-card h2 { margin-top: 0; }
.join-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.4rem; }
.join-form .form-row { display: flex; flex-direction: column; gap: .4rem; }
.join-form label {
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-soft);
}
.join-form label span { color: var(--accent); margin-left: .1rem; }
.join-form input,
.join-form select,
.join-form textarea {
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem .85rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.join-form textarea { resize: vertical; min-height: 96px; }
.join-submit { align-self: flex-start; margin-top: .4rem; cursor: pointer; border: none; }
.join-fallback { color: var(--text-muted); font-size: .9rem; margin-top: 1.2rem; }
.join-expect { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 1rem 0 2.5rem; }
.join-expect li { padding-left: 1.1rem; position: relative; color: var(--text-soft); }
.join-expect li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
.join-expect strong { color: var(--text); }

/* ---------------- Two-column intro ---------------- */
.two-col {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 1.5rem; } }

.figure {
  margin: 0; background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: .5rem; box-shadow: var(--shadow-sm);
}
.figure img { width: 100%; height: auto; border-radius: 8px; display: block; }
.figure figcaption { color: var(--text-muted); font-size: .85rem; padding: .5rem .7rem 0; }

/* ---------------- Cards ---------------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem; margin: 2rem 0;
}
.card {
  display: block; padding: 1.5rem 1.4rem; background: var(--card);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.card-mark {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 999px; margin-bottom: 1rem;
  font-family: 'Fraunces', serif; font-weight: 700; font-size: .95rem;
  color: #fff;
}
.card-iq .card-mark { background: var(--iq); }
.card-eq .card-mark { background: var(--eq); }
.card-bq .card-mark { background: var(--bq); }
.card-qi .card-mark { background: var(--qi); }
.card-ai .card-mark { background: var(--ai); }
.card h3 { margin-bottom: .2rem; }
.card-tag { color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .7rem; }
.card p { color: var(--text-soft); font-size: .95rem; }
.card-more { display: inline-block; margin-top: .5rem; font-weight: 500; font-size: .9rem; color: var(--text); }
.card-iq:hover { border-color: var(--iq); }
.card-eq:hover { border-color: var(--eq); }
.card-bq:hover { border-color: var(--bq); }
.card-qi:hover { border-color: var(--qi); }
.card-ai:hover { border-color: var(--ai); }

/* ---------------- Gallery ---------------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.gallery-item {
  margin: 0; background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-item a { display: block; }
.gallery-item img { display: block; width: 100%; height: 200px; object-fit: cover; }
.gallery-item figcaption { padding: .55rem .75rem .7rem; color: var(--text-muted); font-size: .85rem; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
table.leader-table, table.trend-table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  min-width: 780px;
}
thead th {
  text-align: left; padding: .85rem 1rem; background: var(--bg-soft);
  color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  vertical-align: middle;
}
tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; color: var(--text-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
td.lead-name { color: var(--text); font-weight: 600; white-space: nowrap; }
td.narrow { max-width: 420px; }
td.url-cell { white-space: nowrap; }
td.momentum { font-weight: 500; color: var(--text); }
.score-pill {
  display: inline-block; padding: .14rem .55rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: .85rem;
}

/* Inline "under development" / status tag rendered next to an h2.
   Same visual family as the .hero .eyebrow (small, uppercase, letter-spaced)
   but pill-shaped on a muted background so it reads as a badge. */
.badge-soft {
  display: inline-block; vertical-align: middle;
  margin-left: .6rem;
  padding: .22rem .65rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft);
  font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  border: 1px solid var(--border-soft);
}

/* ---------------- Doc list ---------------- */
.doc-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.doc-list li a {
  display: block; padding: .8rem 1rem; background: var(--card);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500;
  transition: border-color .15s ease, transform .15s ease;
}
.doc-list li a::before { content: "[PDF]  "; color: var(--text-muted); font-weight: 600; font-size: .8rem; }
.doc-list li a:hover { border-color: var(--accent); text-decoration: none; transform: translateX(2px); }

/* ---------------- Footer ---------------- */
.site-footer { margin-top: 3rem; padding: 3rem 1.25rem; background: var(--text); color: #e9e7df; }
.site-footer .foot-title { font-family: 'Fraunces', serif; font-size: 1.2rem; color: #fff; margin-bottom: .4rem; }
.site-footer .foot-note { color: #c2c0b8; max-width: 60ch; }
.site-footer .foot-meta { color: #8f8d83; font-size: .85rem; margin-top: 1rem; }

/* ---------------- Intelligence themes ---------------- */
.theme-iq { --accent: var(--iq); --accent-soft: var(--iq-soft); --accent-ink: #0f1e4a; }
.theme-eq { --accent: var(--eq); --accent-soft: var(--eq-soft); --accent-ink: #7a0f0f; }
.theme-bq { --accent: var(--bq); --accent-soft: var(--bq-soft); --accent-ink: #06402d; }
.theme-qi { --accent: var(--qi); --accent-soft: var(--qi-soft); --accent-ink: #3b1280; }
.theme-ai { --accent: var(--ai); --accent-soft: var(--ai-soft); --accent-ink: #073f4e; }
.theme-overview { --accent: var(--overview); --accent-soft: var(--overview-soft); --accent-ink: #6b3709; }

body.theme-iq h1, body.theme-iq h2 { color: var(--iq); }
body.theme-eq h1, body.theme-eq h2 { color: var(--eq); }
body.theme-bq h1, body.theme-bq h2 { color: var(--bq); }
body.theme-qi h1, body.theme-qi h2 { color: var(--qi); }
body.theme-ai h1, body.theme-ai h2 { color: var(--ai); }
body.theme-overview h1, body.theme-overview h2 { color: var(--text); }

body.theme-iq .hero-intel { background: var(--iq-soft); border-color: #dfe6f6; }
body.theme-eq .hero-intel { background: var(--eq-soft); border-color: #f7d8d3; }
body.theme-bq .hero-intel { background: var(--bq-soft); border-color: #cfe7dc; }
body.theme-qi .hero-intel { background: var(--qi-soft); border-color: #e0d1f4; }
body.theme-ai .hero-intel { background: var(--ai-soft); border-color: #c9e7ef; }
body.theme-overview .hero-intel { background: var(--overview-soft); border-color: #f0d9b2; }

body.theme-iq a:not(.btn):not(.brand):not(.main-nav a) { color: var(--iq); }
body.theme-eq a:not(.btn):not(.brand):not(.main-nav a) { color: var(--eq); }
body.theme-bq a:not(.btn):not(.brand):not(.main-nav a) { color: var(--bq); }
body.theme-qi a:not(.btn):not(.brand):not(.main-nav a) { color: var(--qi); }
body.theme-ai a:not(.btn):not(.brand):not(.main-nav a) { color: var(--ai); }

/* ---------------- Env banner (stag/preprod) ---------------- */
.envbanner {
  position: sticky; top: 0; z-index: 80;
  padding: .5rem 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  text-align: center;
  color: #1a1a1f;
  background: #ffe58a;
  border-bottom: 1px solid #d9bf5a;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.envbanner-stag { background: #ffd93b; color: #3a2f00; border-bottom-color: #d9bf3a; }
.envbanner-preprod { background: #c6e9ff; color: #0c3a5a; border-bottom-color: #8fc9ea; }
body.has-envbanner .site-header { top: 2rem; }

/* ---------------- Listen card (audio intro) ---------------- */
.listen-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
}
.listen-card h2 { margin-top: 0; }
.audio-figure {
  margin: 1.1rem 0 0;
  padding: .9rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.audio-figure figcaption {
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: .55rem;
}
.audio-figure audio { width: 100%; max-width: 560px; display: block; }
.audio-placeholder-figure { background: #faf6ec; border-style: dashed; }
.audio-placeholder-figure figcaption { color: var(--text-soft); font-style: italic; }
.audio-placeholder-note {
  color: var(--text-muted); font-size: .9rem; margin: 0;
}

/* ---------------- Slideshow (about page rotating infographics) ---------------- */
.slideshow {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: .6rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.slideshow-slide {
  margin: 0;
  display: none;
}
.slideshow-slide.is-active { display: block; }
.slideshow-slide img {
  display: block; width: 100%; height: auto; border-radius: 8px;
}
.slideshow-slide figcaption {
  color: var(--text-muted); font-size: .85rem; padding: .55rem .7rem 0;
}
.slideshow-dots {
  display: flex; justify-content: center; gap: .4rem;
  padding: .6rem 0 .2rem;
}
.slideshow-dot {
  width: .55rem; height: .55rem; border-radius: 999px;
  background: var(--border); display: inline-block;
}
.slideshow-dot.is-active { background: var(--accent); }

/* ---------------- Figure -- wide (single centered graphic) ---------------- */
.figure-wide {
  margin: 0 auto; max-width: 900px;
}

/* ---------------- Lightbox ---------------- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10, 10, 15, 0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; cursor: zoom-out;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.lightbox-overlay.open { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
  max-width: 94vw; max-height: 94vh; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem; color: #fff;
  font-size: 1.5rem; background: none; border: none; cursor: pointer;
}

/* ---------------- Featured talks (click-to-play video facades) ---------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin: 1.2rem 0 0;
}
.video-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: #0a0a10;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, opacity .2s ease;
  opacity: .92;
}
.video-facade:hover img {
  transform: scale(1.04);
  opacity: 1;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 999px;
  background: rgba(20, 20, 28, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  padding-left: .25rem;
  transition: transform .2s ease, background .2s ease;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.video-facade:hover .video-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--accent);
}
.video-facade:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}
.video-meta {
  padding: .85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.video-meta p { margin: 0; }
.video-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.005em;
}
.video-title {
  color: var(--text-soft);
  font-size: .88rem;
  line-height: 1.4;
}
.video-channel {
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .15rem;
}

/* ============================================================
 * Mobile optimization (tablet + phone breakpoints)
 * ============================================================ */

/* Tablet & narrower: tighten section padding, slightly smaller hero. */
@media (max-width: 768px) {
  .section-wide { padding: 2.4rem 1.1rem; }
  .hero { padding: 3.2rem 1.1rem 2.6rem; }
  .hero-home { padding-top: 3.6rem; padding-bottom: 2.8rem; }
  h2 { font-size: clamp(1.35rem, 4.4vw, 1.85rem); margin-top: 2rem; }
  .listen-card { padding: 1.3rem 1.2rem; }
  .join-card { padding: 1.7rem 1.3rem; }
  .hero-intel .intel-h1 { gap: 1.6rem; }
}

/* Phone: free header space by hiding the long brand wordmark
 * and tightening nav typography. The WPI logo mark stays. */
@media (max-width: 600px) {
  .nav { gap: .6rem; padding: .6rem .9rem; }
  .brand-name { display: none; }
  .main-nav { gap: .5rem .9rem; row-gap: .25rem; }
  .main-nav a { padding: .25rem .15rem; font-size: .9rem; }
  .main-nav .nav-cta { padding: .3rem .8rem; font-size: .88rem; }
  .container { padding: 0 1rem; }
  .hero { padding: 2.6rem 1rem 2.2rem; }
  .hero .lede { font-size: 1.05rem; }
  h1 { font-size: clamp(1.85rem, 7.5vw, 2.6rem); }
  .hero-intel .intel-h1 { gap: 1rem; }
  .hero-intel .intel-h1-label { font-size: .85em; }
  .hero-ctas { gap: .6rem; }
  .btn { padding: .65rem 1rem; font-size: .92rem; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item img { height: 180px; }
  .video-grid { grid-template-columns: 1fr; gap: 1.1rem; }

  /* Convert leader/trend tables to stacked cards on narrow viewports.
   * On a 375px screen the desktop table (min-width: 780px) only revealed
   * 2 of its 6 columns and gave no visible scroll affordance, so we
   * restructure each row as a self-contained card. */
  .table-wrap {
    border: none;
    background: transparent;
    box-shadow: none;
    overflow-x: visible;
    border-radius: 0;
  }
  table.leader-table,
  table.trend-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }
  table.leader-table thead,
  table.trend-table thead { display: none; }
  table.leader-table tbody,
  table.trend-table tbody { display: block; }
  table.leader-table tr,
  table.trend-table tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: .9rem 1rem;
    margin-bottom: .85rem;
  }
  table.leader-table tr:last-child td,
  table.trend-table tr:last-child td { border-bottom: none; }
  table.leader-table td,
  table.trend-table td {
    display: block;
    padding: .15rem 0;
    border-bottom: none;
    max-width: none;
    white-space: normal;
    text-align: left;
    color: var(--text-soft);
  }
  /* Rank: small grey prefix, sits inline with name. */
  table.leader-table td.num:first-child,
  table.trend-table td.num:first-child {
    display: inline-block;
    text-align: left;
    font-size: .78rem;
    color: var(--text-muted);
    margin-right: .55rem;
    min-width: 1.2rem;
    white-space: nowrap;
  }
  /* Name: bold inline, wraps next to rank. */
  table.leader-table td.lead-name,
  table.trend-table td.lead-name {
    display: inline;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    white-space: normal;
  }
  /* Score cell -- second .num in leader-table; force new line. */
  table.leader-table tr td.num:not(:first-child) {
    display: block;
    text-align: left;
    padding-top: .35rem;
  }
  table.leader-table tr td.num:not(:first-child)::before {
    content: "Score: ";
    color: var(--text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-right: .35rem;
    font-weight: 500;
  }
  /* URL link cell -- own line. */
  table.leader-table td.url-cell,
  table.trend-table td.url-cell { margin-top: .35rem; font-size: .9rem; }
  /* Trend momentum -- styled tag-like. */
  table.trend-table td.momentum {
    margin-top: .4rem;
    color: var(--text);
    font-weight: 500;
    font-size: .9rem;
  }
  table.trend-table td.momentum::before {
    content: "Momentum: ";
    color: var(--text-muted);
    font-weight: 500;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-right: .35rem;
  }
  /* Drop hover row-tint on cards. */
  table.leader-table tbody tr:hover td,
  table.trend-table tbody tr:hover td { background: transparent; }
}
