/* MA Benchmarker — institutional theme. No framework. Light + dark. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #eef1f4;
  --ink: #16202b;
  --muted: #5a6673;
  --faint: #8b95a1;
  --line: #e2e6eb;
  --line-strong: #c8d0d9;
  --grid: #eaedf1;
  --accent: #1f4e79;      /* institutional blue — links, series 1 */
  --accent-2: #986a22;    /* muted bronze — series 2 (lineage) */
  --up: #1a7a4c;
  --down: #b23a2b;
  --gold: #7c6224;        /* premium / gated tier */
  --gold-bg: #f3eee1;
  --radius: 6px;
  --maxw: 1000px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
           "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
  --tnum: "tnum" 1, "lnum" 1;
  font-synthesis: none;
}
:root[data-theme="dark"] {
  --bg: #0e131a;
  --panel: #141b24;
  --panel-2: #1b232e;
  --ink: #e6ebf1;
  --muted: #9aa6b2;
  --faint: #6c7885;
  --line: #253039;
  --line-strong: #33414d;
  --grid: #212a34;
  --accent: #6ba3d6;
  --accent-2: #cba455;
  --up: #4cae7f;
  --down: #df6e5b;
  --gold: #c9a24e;
  --gold-bg: #23201a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131a; --panel: #141b24; --panel-2: #1b232e; --ink: #e6ebf1;
    --muted: #9aa6b2; --faint: #6c7885; --line: #253039; --line-strong: #33414d;
    --grid: #212a34; --accent: #6ba3d6; --accent-2: #cba455; --up: #4cae7f;
    --down: #df6e5b; --gold: #c9a24e; --gold-bg: #23201a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: var(--tnum); }

/* ---- masthead / footer ---- */
.site-header {
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
}
.brand-wrap { display: flex; align-items: baseline; gap: 12px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.28rem;
  letter-spacing: -0.01em; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.tagline {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint); border-left: 1px solid var(--line-strong);
  padding-left: 12px;
}
.site-header nav { display: flex; align-items: center; gap: 18px; }
.site-header nav a { color: var(--muted); font-size: .9rem; }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }
#theme-toggle {
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--muted); border-radius: 4px; width: 30px; height: 30px;
  cursor: pointer; font-size: .95rem; line-height: 1;
}
#theme-toggle:hover { color: var(--ink); border-color: var(--muted); }

main { max-width: var(--maxw); margin: 0 auto; padding: 4px 24px 72px; }

.site-footer {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 56px;
  color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line);
  line-height: 1.7;
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer .disclaimer { color: var(--faint); }

/* ---- hero / search ---- */
.hero { padding: 52px 0 30px; border-bottom: 1px solid var(--line); }
.hero .eyebrow { margin-bottom: 14px; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; font-size: 2.5rem;
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 14px; max-width: 15ch;
}
.lede { font-size: 1.12rem; color: var(--muted); max-width: 60ch; margin: 0; }
.search-box { position: relative; margin: 30px 0 10px; max-width: 580px; }
#q {
  width: 100%; padding: 14px 16px; font-size: 1.02rem; font-family: var(--sans);
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  outline: none;
}
#q:focus { border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.results {
  list-style: none; margin: 6px 0 0; padding: 0; position: absolute;
  left: 0; right: 0; z-index: 5; background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 16px 40px rgba(16, 32, 48, .14);
}
.results:empty { display: none; }
.results li a {
  display: flex; flex-direction: column; padding: 10px 16px; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.results li:last-child a { border-bottom: 0; }
.results li a:hover { background: var(--panel-2); text-decoration: none; }
.r-name { font-weight: 600; }
.r-type { font-size: 0.78rem; color: var(--muted); }
.index-note { color: var(--faint); font-size: 0.85rem; }

.browse { margin-top: 44px; }
.browse .eyebrow { margin-bottom: 14px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-block; padding: 6px 12px; background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink);
  font-size: 0.86rem;
}
.chips a:hover { border-color: var(--accent); color: var(--accent);
  text-decoration: none; }

/* ---- shared labels ---- */
.eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: .7rem;
  color: var(--faint); font-weight: 700;
}

/* ---- profile head ---- */
.profile-head { padding: 34px 0 18px; border-bottom: 1px solid var(--line); }
.profile-head h1 {
  font-family: var(--serif); font-weight: 700; font-size: 2.15rem;
  margin: 8px 0 6px; letter-spacing: -0.01em;
}
.profile-head h1 .org { color: var(--muted); font-weight: 400; }
.sub { color: var(--muted); margin: 0; font-size: .95rem; }
.badges { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 3px;
  border: 1px solid; background: transparent;
}
.badge.consolidate { color: var(--accent); border-color:
  color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.badge.churn { color: var(--down);
  border-color: color-mix(in srgb, var(--down) 40%, var(--line-strong)); }
.badge.nonrenew { color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line-strong)); }

/* ---- key figures strip ---- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; margin: 24px 0; background: var(--panel);
}
.stat { padding: 16px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-label {
  font-size: .68rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .09em; font-weight: 600;
}
.stat-value {
  font-size: 1.62rem; font-weight: 600; margin: 6px 0 3px;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  font-feature-settings: var(--tnum);
}
.stat-value.up { color: var(--up); }
.stat-value.down { color: var(--down); }
.stat-sub { font-size: .78rem; color: var(--faint); }

/* ---- section panels ---- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px 22px; margin: 18px 0;
}
.card h2 {
  margin: 0 0 16px; font-size: 1.02rem; font-weight: 700; letter-spacing: .01em;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.note { color: var(--muted); font-size: .85rem; margin: 12px 0 0;
  line-height: 1.6; }

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px;
  font-variant-numeric: tabular-nums; }
.chart .legend { fill: var(--muted); font-size: 12px; }
.chart .endlabel { fill: var(--ink); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; }

/* ---- data tables ---- */
table.data { width: 100%; border-collapse: collapse; font-size: .9rem;
  font-variant-numeric: tabular-nums; font-feature-settings: var(--tnum); }
table.data th, table.data td {
  text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line);
}
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th {
  color: var(--muted); font-weight: 600; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line-strong);
}
table.data tbody tr:hover { background: var(--panel-2); }
table.data td.up { color: var(--up); }
table.data td.down { color: var(--down); }

/* ---- gated / premium tier ---- */
.gated-heading {
  margin: 40px 0 4px; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .13em; color: var(--gold); font-weight: 700;
}
.gated-sub { color: var(--muted); font-size: .85rem; margin: 4px 0 14px; }
.gated-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card.gated { position: relative; overflow: hidden; padding: 0;
  border-color: var(--line-strong); }
.gated-body { padding: 18px 20px; }
.gated-title { display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; }
.gated-title h3 { margin: 0 0 8px; font-size: .95rem; font-weight: 700; }
.gated-title .tag { font-size: .68rem; color: var(--faint);
  text-transform: uppercase; letter-spacing: .05em; }
.blur { filter: blur(4.5px); opacity: .5; user-select: none;
  pointer-events: none; }
.lock {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 9px;
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  backdrop-filter: blur(1.5px);
}
.lock-icon { color: var(--gold); font-size: 1.15rem; letter-spacing: .2em; }
.lock-cta { font-weight: 600; margin: 0; max-width: 230px; font-size: .9rem; }
.lock-btn {
  background: var(--gold); color: #fff; padding: 7px 15px; border-radius: 4px;
  font-weight: 600; font-size: .84rem; letter-spacing: .01em;
}
:root[data-theme="dark"] .lock-btn { color: #16202b; }
.lock-btn:hover { text-decoration: none; filter: brightness(1.06); }

/* ---- measure-mover teaser (metric shown, detail locked) ---- */
.mover-card { margin: 16px 0; border-color: var(--line-strong); }
.mover-teaser { font-size: 1.05rem; margin: 6px 0 14px; color: var(--muted); }
.mover-teaser strong { font-size: 1.7rem; color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums; }
.mover-teaser .up { color: var(--up); font-weight: 600; }
.mover-teaser .down { color: var(--down); font-weight: 600; }
.mover-list { list-style: none; margin: 0 0 14px; padding: 0; }
.mover-list li { display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .88rem;
  font-variant-numeric: tabular-nums; }
.mover-lock {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 13px 16px; border-radius: var(--radius);
  background: var(--gold-bg); border: 1px solid
  color-mix(in srgb, var(--gold) 30%, var(--line-strong));
}
.mover-lock span { color: var(--muted); font-size: .86rem; max-width: 470px; }
.mover-lock .lock-btn { white-space: nowrap; }

/* ---- advisory band (Gript Technologies funnel) ---- */
.advisory {
  border-top: 1px solid var(--line-strong);
  background: var(--panel-2);
}
.advisory-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 46px; }
.advisory .eyebrow { color: var(--gold); }
.advisory h2 {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -0.01em; margin: 12px 0 10px;
}
.advisory p { color: var(--muted); max-width: 70ch; margin: 0 0 18px;
  line-height: 1.65; }
.advisory-link { font-weight: 600; font-size: .98rem; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gated-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .profile-head h1 { font-size: 1.7rem; }
  .tagline { display: none; }
}
