/*
 * Partner Media Kit Dashboard — styles.
 *
 * Visual language: black/white editorial, slightly monotoned (cool neutral),
 * crisp hairlines, tabular figures. Dependency-free; no external fonts/assets
 * (must work from file:// and inside the single-file Dashboard.html build).
 *
 * Palette is OKLCH with a faint cool tint so neutrals never read as flat sRGB
 * black/white. Keep it monochrome — no brand color is introduced here.
 */
:root {
  color-scheme: dark;

  /* Surfaces, darkest to raised. Faint cool tint (hue 264, very low chroma). */
  --bg: oklch(0.155 0.005 264);
  --bg-2: oklch(0.185 0.005 264);
  --surface: oklch(0.205 0.006 264);
  --surface-2: oklch(0.235 0.006 264);

  /* Ink + text. */
  --ink: oklch(0.975 0.003 250);
  --ink-soft: oklch(0.86 0.004 255);
  --muted: oklch(0.68 0.006 260);
  --faint: oklch(0.52 0.006 262);

  /* Rules. */
  --line: oklch(0.30 0.006 264);
  --line-soft: oklch(0.25 0.006 264);
  --line-strong: oklch(0.80 0.006 258);

  /* Subtle directional cues (still monochrome, differentiated by lightness). */
  --up: oklch(0.90 0.01 250);
  --down: oklch(0.62 0.008 262);
  --ig-ring: conic-gradient(
    from 210deg,
    #feda75 0deg,
    #fa7e1e 72deg,
    #d62976 158deg,
    #962fbf 245deg,
    #4f5bd5 315deg,
    #feda75 360deg
  );

  --radius: 10px;
  --radius-sm: 7px;
  /* Shell fills the browser (auto-fit). The cap is high enough that laptops,
   * 1080p and 1440p monitors fill edge-to-edge; only very wide displays get
   * modest symmetric margins. Text blocks keep their own readable max-widths. */
  --max: 2400px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
  --shadow: 0 1px 0 oklch(1 0 0 / 0.04), 0 24px 60px oklch(0 0 0 / 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #000;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tabular figures everywhere a number lives, so digits never jitter. */
.num,
.stat strong,
.metric-card strong,
.lead-bar,
.account-table td,
.detail-stats strong,
.growth-summary strong,
.post-score strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- shell */

.app {
  width: min(100%, var(--max));
  margin: 0 auto;
  --pad-x: clamp(20px, 3vw, 88px);
  padding: 0 var(--pad-x) 72px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 66px;
  /* Break out of .app's horizontal padding so the bar spans edge-to-edge. */
  margin-left: calc(var(--pad-x) * -1);
  margin-right: calc(var(--pad-x) * -1);
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  margin-bottom: 8px;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  image-rendering: auto;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-logo {
  /* Trimmed landscape wordmark (~1.56:1). Width-based with height:auto so the
     wordmark fills the column while keeping its true aspect ratio — no max-height
     so the ratio is never distorted. */
  width: clamp(100px, 12vw, 160px);
  height: auto;
  display: block;
  align-self: flex-start;
  image-rendering: auto;
}

.foot-logo {
  height: 24px;
  width: auto;
  display: block;
  opacity: 0.55;
  image-rendering: auto;
}

/* Tab switcher */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}

.tab {
  position: relative;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.tab:hover {
  color: var(--ink-soft);
}

.tab[aria-current="true"] {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}


.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
}

.status-pill.is-draft::before {
  background: var(--ink-soft);
  box-shadow: 0 0 0 3px oklch(0.86 0.004 255 / 0.18);
}

.status-pill.is-verified {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.status-pill.is-verified::before {
  background: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn.solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn.solid:hover {
  background: transparent;
  color: var(--ink);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn.ghost:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ------------------------------------------------------------------ views */

.stage {
  position: relative;
  isolation: isolate;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 0.42s var(--ease) both;
}

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 22px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.section-head .sub {
  max-width: 52ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------- home / hero */

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 0 40px;
}

.hero-copy {
  display: contents;
}

/* Brand wordmark is the thesis of the page: the company, set large but in
 * proportion. line-height must clear the descender of the "g" so it never
 * collides with the descriptor beneath it. */
.wordmark {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wordmark h1 {
  font-size: clamp(48px, 6.4vw, 100px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.wordmark .descriptor {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.6vw, 21px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark .descriptor::before {
  content: "";
  width: clamp(28px, 4vw, 56px);
  height: 2px;
  background: var(--line-strong);
}

.hero p {
  max-width: 74ch;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.hero-meta b {
  color: var(--ink-soft);
  font-weight: 600;
}

/* The single "shine" card — the network total is the most important number. */
.totalcard {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 0% 0%, oklch(0.26 0.006 264) 0%, transparent 55%),
    var(--bg-2);
  box-shadow: var(--shadow);
}

/* Slow specular sheen sweeping across the card. Monochrome, low opacity. */
.totalcard::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    oklch(1 0 0 / 0.07) 48%,
    oklch(1 0 0 / 0.12) 50%,
    oklch(1 0 0 / 0.07) 52%,
    transparent 62%
  );
  transform: translateX(-60%);
  animation: sheen 7s var(--ease) 1.1s infinite;
  pointer-events: none;
}

@keyframes sheen {
  0% {
    transform: translateX(-65%);
  }
  18%,
  100% {
    transform: translateX(65%);
  }
}

.totalcard .eyebrow {
  color: var(--muted);
}

.totalcard .big {
  font-size: clamp(56px, 8vw, 88px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.totalcard .big small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.totalcard .splits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}

.totalcard .splits div {
  padding: 13px 14px;
  background: var(--bg-2);
}

.totalcard .splits span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.totalcard .splits strong {
  display: block;
  margin-top: 6px;
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Hero stats panel — 4-column single row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.hstat {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  padding: 22px 24px;
  background: var(--bg-2);
}

.hstat.is-lead {
  padding: 26px 28px;
  background:
    radial-gradient(120% 90% at 0% 100%, oklch(0.26 0.006 264) 0%, transparent 55%),
    var(--bg-2);
  position: relative;
  overflow: hidden;
}

.hstat.is-lead::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    oklch(1 0 0 / 0.07) 48%,
    oklch(1 0 0 / 0.12) 50%,
    oklch(1 0 0 / 0.07) 52%,
    transparent 62%
  );
  transform: translateX(-60%);
  animation: sheen 7s var(--ease) 1.1s infinite;
  pointer-events: none;
}

.hstat strong {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hstat.is-lead strong {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
}

.hstat span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Key-metric strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 18px;
  background:
    linear-gradient(160deg, oklch(1 0 0 / 0.045), transparent 48%),
    var(--bg);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.045);
  pointer-events: none;
}

.metric-card:hover {
  background:
    linear-gradient(160deg, oklch(1 0 0 / 0.07), transparent 50%),
    var(--bg-2);
  transform: translateY(-1px);
}

.metric-card.is-featured {
  background:
    radial-gradient(90% 120% at 10% 0%, oklch(0.31 0.006 264 / 0.55), transparent 58%),
    var(--bg);
}

.metric-card span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-card span em {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.025em;
}

.metric-card small,
.metric-card .delta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.metric-meter {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 4px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.metric-meter::after {
  content: "";
  display: block;
  width: var(--p, 18%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--faint), var(--ink));
  transform-origin: left;
  animation: meter-in 0.9s var(--ease) both;
}

@keyframes meter-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Public proof rail: a small broadcast-console moment between metrics and brand context. */
.proof-rail {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1.28fr);
  gap: 26px;
  align-items: stretch;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, oklch(1 0 0 / 0.04), transparent 32%),
    var(--bg-2);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.035);
}

.proof-rail h3 {
  max-width: 18ch;
  margin-top: 10px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 740;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.proof-rail p {
  max-width: 46ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.proof-stack {
  display: grid;
  gap: 1px;
  align-content: stretch;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--line-soft);
}

.proof-link {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  background: var(--bg);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.proof-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 999px;
  background: var(--ink);
  opacity: calc(0.92 - (var(--i, 0) * 0.2));
}

.proof-link:hover {
  background: var(--surface);
  transform: translateX(2px);
}

.proof-link span,
.proof-link b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.proof-link strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.proof-link b {
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metric-card .delta.up {
  color: var(--up);
}

.metric-card .delta.down {
  color: var(--down);
}

.metric-card .delta .arrow {
  font-size: 11px;
}

/* Home network snapshot (mini leaderboard, deep-links into account detail) */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.85fr);
  gap: 28px;
  margin-top: 36px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px;
}

.panel > .phead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.panel > .phead h3 {
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.panel .link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s var(--ease);
}

.panel .link:hover {
  color: var(--ink);
}

.leader {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.leader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  text-align: left;
  width: calc(100% + 20px);
  transition: background 0.16s var(--ease);
}

.leader-row:hover {
  background: var(--surface);
}

.leader-row .who {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.leader-row .who strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.leader-row .who span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lead-bar {
  position: relative;
  text-align: right;
  font-size: 14px;
  font-weight: 650;
}

.lead-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
}

.lead-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: var(--bar, 0%);
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
}

.value-list {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.value-list li {
  list-style: none;
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.value-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.value-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.value-list strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.35;
}

/* Home section header (shared by the account strip + value block) */
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 44px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.block-head h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.block-head .link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s var(--ease);
}

.block-head .link:hover {
  color: var(--ink);
}

/* Framed account cards — the visual roster of the network. */
.acct-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.acct-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.18s var(--ease), box-shadow 0.22s var(--ease);
}

.acct-frame:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 12px 36px oklch(0 0 0 / 0.28);
}

.acct-frame-logo {
  width: 100%;
  padding: 24px 24px 14px;
}

.frame {
  position: relative;
  aspect-ratio: 1 / 1;
  display: block;
  padding: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ig-ring);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.12),
    0 8px 20px oklch(0 0 0 / 0.5),
    0 20px 48px oklch(0 0 0 / 0.38);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.acct-frame:hover .frame {
  transform: scale(1.012);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.2),
    0 10px 28px oklch(0 0 0 / 0.6),
    0 24px 56px oklch(0 0 0 / 0.46);
}

.account-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 999px;
  padding: 2px;
  background: var(--ig-ring);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.08), inset 0 0 0 1.5px oklch(0.14 0 0 / 0.5);
  overflow: hidden;
}

.account-logo img,
.account-logo .mono {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--bg);
}

.account-logo img {
  object-fit: cover;
  image-rendering: auto;
}

.account-logo.is-contain img {
  object-fit: contain;
  padding: 3%;
  background: var(--bg);
}

.account-logo .mono {
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
}

.account-logo-sm {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.account-logo-detail {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.account-logo-tile {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
}


.account-logo-tile img,
.account-logo-tile .mono {
  border-radius: 999px;
  border-width: 2px;
}

.account-logo-tile .mono {
  font-size: clamp(28px, 3vw, 44px);
}

.frame .lane-tag {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  padding: 5px 22px;
  border-radius: 999px;
  white-space: nowrap;
  background: color-mix(in oklch, var(--bg) 62%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px oklch(0 0 0 / 0.75), 0 2px 6px oklch(0 0 0 / 0.55);
}

.acct-frame .cap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 20px;
  border-top: 1px solid var(--line-soft);
}

.acct-frame .cap strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.acct-frame .cap b {
  display: block;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Value props laid out across the width on desktop. */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.value-grid .vcard {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.value-grid .vcard span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.value-grid .vcard strong {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

/* Tagline under the wordmark — the brand's own line, set with weight. */
.hero .tagline {
  max-width: 30ch;
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

/* "Part of the LEAGUE network" — company context band on Home. */
.network-band {
  display: grid;
  gap: 22px;
  padding: 28px clamp(20px, 2.5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 120% at 100% 0%, oklch(0.24 0.006 264) 0%, transparent 58%),
    var(--bg-2);
}

.network-band .band-lead {
  max-width: 80ch;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.7vw, 19px);
  font-weight: 500;
  line-height: 1.5;
}

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.proof-row .proof {
  padding: 18px 20px;
  background: var(--bg);
}

.proof-row .proof strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.proof-row .proof span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

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

.pillars .pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.pillars .pillar b {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.pillars .pillar span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.pillars .pillar.is-kit {
  border-color: var(--line-strong);
  background: var(--surface);
}

.pillars .pillar.is-kit em {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.network-band .band-note {
  max-width: 82ch;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
}

/* Capability chips (Contact: what a partnership includes). */
.cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cap-list .cap-chip {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.contact-caps {
  margin-top: 20px;
}

.contact-note {
  margin-top: 22px;
  color: var(--faint);
  font-size: 12px;
}

/* --------------------------------------------------------- accounts table */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar .seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}

.toolbar .seg button {
  padding: 6px 12px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.toolbar .seg button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface-2);
}

.toolbar select {
  min-height: 36px;
  padding: 0 30px 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 13px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.toolbar .grow {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.account-table thead th {
  position: sticky;
  top: 66px;
  z-index: 5;
  padding: 12px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

.account-table thead th:first-child {
  text-align: left;
}

.account-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.account-table thead th.sortable:hover {
  color: var(--ink);
}

.account-table thead th .caret {
  margin-left: 5px;
  opacity: 0;
  font-size: 9px;
}

.account-table thead th.is-sorted .caret {
  opacity: 1;
  color: var(--ink);
}

.account-table tbody tr {
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.account-table tbody tr:hover {
  background: var(--surface);
}

.account-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.account-table td:first-child {
  text-align: left;
}

.account-table .acct-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-table .acct-name .av {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.account-table .acct-name .meta strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.account-table .acct-name .meta span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.account-table td.primary {
  font-size: 16px;
  font-weight: 650;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip.api {
  color: var(--ink);
  border-color: var(--line-strong);
}

.row-go {
  color: var(--muted);
  font-size: 16px;
  transition: transform 0.16s var(--ease), color 0.16s var(--ease);
}

.account-table tbody tr:hover .row-go {
  color: var(--ink);
  transform: translateX(3px);
}

/* Card grid alternative ("row view where possible" toggle: rows <-> cards) */
.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.acct-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-align: left;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.acct-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.acct-card .top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-account {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

.acct-card .top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.acct-card .top .chip {
  flex: none;
}

.acct-card .figs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.acct-card .figs div span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acct-card .figs div strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------- account drill-down */

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s var(--ease);
}

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

.detail-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-hero .who {
  display: flex;
  gap: 16px;
  align-items: center;
}

.detail-hero .av {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 20px;
  font-weight: 700;
}

.detail-hero h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 740;
  letter-spacing: -0.03em;
  line-height: 1;
}

.detail-hero .role {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.detail-hero .positioning {
  flex-basis: 100%;
  max-width: 70ch;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}

.detail-hero .actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  margin: 24px 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.detail-stats div {
  padding: 18px;
  background: var(--bg-2);
}

.detail-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-stats strong {
  display: block;
  margin-top: 9px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 24px;
}

/* ----------------------------------------------------------- growth chart */

.chart-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(110% 80% at 50% -20%, oklch(1 0 0 / 0.045), transparent 62%),
    var(--bg-2);
  padding: 20px 20px 14px;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.035);
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.chart-toolbar .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chart-toolbar .gchip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.chart-toolbar .gchip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chart-toolbar .gchip[aria-pressed="true"] {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.chart-toolbar .hint {
  margin-left: auto;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
}

.chart-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.024), transparent 42%),
    var(--bg);
  cursor: grab;
  touch-action: pan-y;
  max-width: 100%;
}

.chart-viewport.panning {
  cursor: grabbing;
}

.chart-viewport.pannable::after {
  /* fade hint on the right edge when more data is off-screen */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}

.chart-host,
.chart-track {
  min-width: 0;
  max-width: 100%;
}

.chart-track {
  will-change: transform;
}

.chart-svg {
  display: block;
  max-width: none;
}

.chart-svg .grid-line {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.chart-svg .axis-label {
  fill: var(--faint);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart-svg .area {
  fill: url(#areaFill);
}

.chart-svg .line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px oklch(1 0 0 / 0.12));
}

.chart-svg .dot {
  fill: var(--bg-2);
  stroke: var(--ink);
  stroke-width: 2;
}

.chart-svg .crosshair {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-svg .focus-dot {
  fill: var(--ink);
}

.chart-tip {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -120%);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}

.chart-tip.show {
  opacity: 1;
}

.chart-tip b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart-tip span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.acct-desc {
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.growth-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.growth-summary div span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.growth-summary div strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- posts */

.post-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.post-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, transparent, transparent);
  transition: background 0.14s var(--ease), transform 0.14s var(--ease), border-color 0.14s var(--ease);
}

a.post-row:hover {
  background:
    linear-gradient(90deg, oklch(1 0 0 / 0.035), transparent 42%),
    var(--surface);
  transform: translateX(2px);
}

.post-rank {
  font-size: 14px;
  font-weight: 700;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.post-body .kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-body h3 {
  font-size: 16.5px;
  font-weight: 640;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.post-body p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.post-score {
  text-align: right;
  white-space: nowrap;
}

.post-score strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.post-score span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- audience summary rail */

.aud-summary-rail {
  display: grid;
  grid-template-columns: max-content 1px 1fr 1px 1fr 1px 1fr;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.aud-divider {
  background: var(--line);
  align-self: stretch;
}

.aud-sum {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.aud-sum-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Age cell */
.aud-sum-big {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.aud-sum-sub {
  font-size: 11px;
  color: var(--faint);
  margin-top: -6px;
}

/* Gender cell */
.aud-sum--gender {
  align-items: center;
  text-align: center;
  align-self: stretch;
  justify-content: center;
}

.aud-sum--gender .aud-sum-label {
  text-align: center;
}

.aud-sum-gender-bar {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.aud-sum-gender-fill {
  height: 100%;
  width: var(--pct);
  border-radius: 99px;
  background: linear-gradient(90deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  transform-origin: left;
  transform: scaleX(0);
  animation: aud-bar-in 0.75s var(--ease) 0.25s both;
}

@keyframes aud-bar-in {
  to { transform: scaleX(1); }
}

.aud-sum-gender-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: -4px;
}

/* Chip cells */
.aud-sum-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.aud-sum-chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  white-space: nowrap;
}

.aud-sum-chip--fit {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--muted);
}

@media (max-width: 860px) {
  .aud-summary-rail {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .aud-divider {
    display: none;
  }
  .aud-sum {
    border-bottom: 1px solid var(--line);
  }
  .aud-sum--markets,
  .aud-sum--fit {
    border-top: none;
  }
  .aud-sum--gender,
  .aud-sum--fit {
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .aud-summary-rail {
    grid-template-columns: 1fr;
  }
  .aud-sum--gender,
  .aud-sum--fit {
    border-left: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aud-sum-gender-fill {
    animation: none;
    transform: scaleX(1);
  }
}

/* -------------------------------------------------- block-head (shared) */

.block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.block-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.block-head .hint {
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------------------------- audience explorer */

.aud-explorer {
  margin-top: 16px;
  min-height: 200px;
}

/* Account grid */
.aud-acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.aud-acct-grid.is-exiting {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.aud-acct-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font: inherit;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s,
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
  opacity: 0;
  transform: translateY(8px);
  transition-delay: calc(var(--i, 0) * 35ms);
}

.aud-acct-card.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.aud-acct-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.3);
}

.aud-acct-card:focus-visible {
  outline: 2px solid var(--ink-soft);
  outline-offset: 2px;
}

.aud-acct-card.is-pending {
  opacity: 0;
  transform: translateY(8px);
}

.aud-acct-card.is-pending.is-revealed {
  opacity: 0.55;
}

.aud-acct-card.is-pending:hover {
  opacity: 0.75;
}

.aud-acct-logo {
  flex-shrink: 0;
}

.aud-acct-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aud-acct-handle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: block;
}

.aud-acct-lane {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.aud-acct-cta {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s, transform 0.15s;
}

.aud-acct-card:hover .aud-acct-cta {
  color: var(--ink);
  transform: translateX(2px);
}

.aud-pending-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Detail panel */
.aud-detail {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.aud-detail.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aud-detail.is-exiting {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition-duration: 0.16s;
}

.aud-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.aud-back-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.aud-back-btn:focus-visible {
  outline: 2px solid var(--ink-soft);
  outline-offset: 2px;
}

.aud-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.aud-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aud-detail-handle {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.aud-detail-lane {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.aud-detail-role {
  font-size: 11px;
  color: var(--faint);
}

/* Stat rows */
.aud-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.aud-stat {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  transition-delay: calc(var(--si, 0) * 70ms + 60ms);
}

.aud-stat.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aud-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.aud-stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

/* Gender bar */
.aud-gender-track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 8px;
}

.aud-gender-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--ink);
  transition: width 0.6s var(--ease);
  transition-delay: 180ms;
}

.aud-gender-fill.is-filled {
  width: var(--male-pct);
}

.aud-gender-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Markets */
.aud-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aud-market-chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  transition-delay: calc(var(--mi, 0) * 40ms + 180ms);
}

.aud-market-chip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footnote */
.aud-footnote {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--faint);
  line-height: 1.5;
}

/* Pending state */
.aud-pending-state {
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.aud-pending-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--faint);
}

/* SVG logo helpers (kept for other views) */
.svg-logo-host {
  width: 100%;
  height: 100%;
}

.account-logo-web {
  width: 100%;
  height: 100%;
  font-size: 9px;
}

@media (prefers-reduced-motion: reduce) {
  .aud-acct-card,
  .aud-acct-grid,
  .aud-detail,
  .aud-stat,
  .aud-market-chip,
  .aud-gender-fill {
    transition: none !important;
    animation: none !important;
  }
  .aud-acct-card { opacity: 1; transform: none; }
  .aud-detail { opacity: 1; transform: none; }
  .aud-stat { opacity: 1; transform: none; }
  .aud-market-chip { opacity: 1; transform: none; }
  .aud-gender-fill.is-filled { width: var(--male-pct); }
}

/* -------------------------------------------------------------- contact */

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, oklch(0.24 0.006 264) 0%, transparent 60%),
    var(--bg-2);
}

.contact-band h2 {
  max-width: 22ch;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 740;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.contact-band p {
  margin-top: 12px;
  max-width: 50ch;
  color: var(--muted);
  font-size: 14px;
}

.contact-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

/* ----------------------------------------------------------- misc / foot */

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
}

.foot {
  display: grid;
  gap: 12px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.foot .disclaimer {
  max-width: 90ch;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

.foot .meta {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.error-state {
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.reveal-in {
  animation: reveal-up 0.52s var(--ease) both;
  animation-delay: var(--stagger, 0ms);
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1040px) {
  .hero,
  .home-grid,
  .detail-split,
  .proof-rail {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .hstat.is-lead {
    grid-column: 1 / -1;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .acct-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 12px;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  /* Prevent horizontal scroll from any overflow */
  html, body {
    overflow-x: hidden;
  }

  .app {
    padding: 0 16px 48px;
  }

  /* Stack header vertically, centered, aligned with dashboard content */
  .topbar {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    justify-content: center;
  }

  /* Fit all 6 tabs in one row without horizontal scroll */
  .tabs {
    overflow-x: visible;
    padding: 3px;
    width: 100%;
  }

  .tab {
    flex: 1;
    padding: 6px 4px;
    font-size: 10.5px;
    letter-spacing: -0.02em;
    text-align: center;
  }

  /* Hero logo — smaller on mobile */
  .hero-logo {
    width: clamp(80px, 32vw, 120px);
  }

  .brand-logo {
    height: 26px;
  }

  /* KPI strip — 4 equal boxes (2×2), drop the full-width span on the lead stat */
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hstat.is-lead {
    grid-column: auto;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .acct-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-row,
  .pillars,
  .proof-stack {
    grid-template-columns: 1fr;
  }

  .proof-link {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-band {
    grid-template-columns: 1fr;
  }

  .totalcard .big {
    font-size: 64px;
  }

  /* iOS Safari circle fix: absolutely position the logo so its size is
     driven by inset (not height:100%) — guarantees the 5px ring shows
     evenly on all four sides regardless of how aspect-ratio resolves. */
  .frame {
    display: block;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .frame .account-logo {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ig-ring);
    padding: 2px;
    box-shadow: none;
  }

  .frame .account-logo img,
  .frame .account-logo .mono {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 999px;
    background: var(--bg);
  }

  /* Lane tag — reduce padding so it fits inside smaller mobile circles */
  .frame .lane-tag {
    font-size: 9px;
    padding: 4px 10px;
    letter-spacing: 0.04em;
    max-width: calc(100% - 16px);
    bottom: 8px;
    background: rgba(16, 16, 24, 0.9);
  }

  /* Less padding around the circle in cards on mobile */
  .acct-frame-logo {
    padding: 16px 16px 10px;
  }

  .account-table thead {
    display: none;
  }

  .account-table,
  .account-table tbody,
  .account-table tr {
    display: block;
  }

  .account-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px 12px;
  }

  .account-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 0;
    text-align: right;
  }

  .account-table td:first-child {
    border-bottom: 1px solid var(--line);
  }

  .account-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .account-table td.acct-cell::before {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  .view.is-active,
  .totalcard::after,
  .reveal-in,
  .metric-meter::after,
  .aud-meter > i {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------- print */
@media print {
  :root {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --surface: #f5f5f5;
    --surface-2: #ededed;
    --ink: #0a0a0a;
    --ink-soft: #222222;
    --muted: #555555;
    --faint: #777777;
    --line: #cfcfcf;
    --line-soft: #e2e2e2;
    --line-strong: #0a0a0a;
    --shadow: none;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
    color: #0a0a0a;
  }

  .topbar,
  .toolbar,
  .chart-toolbar,
  .row-go,
  .backlink,
  .btn {
    display: none !important;
  }

  /* Print every view, not just the active tab. */
  .view {
    display: block !important;
    animation: none !important;
    margin-bottom: 26px;
    break-inside: avoid;
  }

  .totalcard::after {
    display: none;
  }

  .panel,
  .acct-card,
  .chart-wrap,
  .aud-summary-rail,
  .detail-stats,
  .post-row,
  .contact-band,
  .network-band,
  .proof-rail,
  .proof-row,
  .pillars .pillar {
    break-inside: avoid;
  }

  /* Logo is white-on-transparent; invert to dark for print/PDF. */
  .brand-logo,
  .hero-logo,
  .foot-logo {
    filter: invert(1);
  }
}

/* ============================================================= glass system
 * Full-viewport fixed dither canvas is the background layer. Every surface
 * gets a frosted-glass treatment so the texture reads through without
 * overwhelming the content.  backdrop-filter does the heavy lifting; the
 * color-mix keeps each surface semi-opaque against the dither.
 * -------------------------------------------------------------------------- */

:root {
  --glass:              color-mix(in oklch, var(--bg-2) 72%, transparent);
  --glass-raised:       color-mix(in oklch, var(--surface) 68%, transparent);
  --glass-blur:         blur(18px) saturate(1.12);
  --glass-border-color: oklch(1 0 0 / 0.09);
  --glass-inset:        inset 0 1px 0 oklch(1 0 0 / 0.09);
}

/* Keep .app content above the fixed canvas (z-index 0). */
.app {
  position: relative;
  z-index: 1;
}


.totalcard {
  background:
    radial-gradient(120% 90% at 0% 0%, oklch(0.26 0.006 264 / 0.55) 0%, transparent 55%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border-color);
  box-shadow: var(--glass-inset), var(--shadow);
}

.metric-card {
  background:
    linear-gradient(160deg, oklch(1 0 0 / 0.045), transparent 48%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
}

.panel {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border-color);
}

.proof-rail {
  background:
    linear-gradient(90deg, oklch(1 0 0 / 0.04), transparent 32%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
}

.network-band {
  background:
    radial-gradient(130% 120% at 100% 0%, oklch(0.24 0.006 264 / 0.65) 0%, transparent 58%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
}

.contact-band {
  background:
    radial-gradient(120% 140% at 100% 0%, oklch(0.24 0.006 264 / 0.65) 0%, transparent 60%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
}

.acct-card {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border-color);
}

.value-grid .vcard {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border-color);
}

.pillars .pillar {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
}

.account-table thead th {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
}

.detail-stats div {
  background: var(--glass);
}

.chart-wrap {
  background:
    radial-gradient(110% 80% at 50% -20%, oklch(1 0 0 / 0.045), transparent 62%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
}

.aud-summary-rail {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
}
