/* EarlySignal Startup Indexes (home page). Markup generated by tools/regen_indexes.py. */
.indexes-home {
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(ellipse at 10% 30%, rgba(255, 184, 0, 0.07), transparent 65%);
}
.indexes-home-lede {
  max-width: 720px;
  margin: -1rem auto 2.5rem;
  text-align: center;
  color: var(--text-secondary);
}
.ix { display: grid; gap: 1.75rem; }
.ix > *, .ix-featured > *, .ix-cards > * { min-width: 0; }
.ix h3, .ix h4 { font-family: var(--font-heading); }
.ix-muted, .ix figcaption { color: var(--text-muted); font-size: 0.85rem; }
.ix .num { text-align: right; font-variant-numeric: tabular-nums; }
.ix-up { color: #3ccf7a; }
.ix-down { color: #ff6b6b; }
.ix-flat { color: var(--text-muted); }

/* featured card */
.ix-featured {
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 184, 0, 0.06), transparent 40%), var(--bg-card);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.75rem;
}
.ix-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.ix-head h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.ix-sub { color: var(--text-muted); font-size: 0.9rem; }
.ix-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.ix-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}
.ix-code {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: var(--color-surface-alt);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ix-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ix-label { color: var(--text-secondary); font-size: 0.9rem; }
.ix-big {
  color: var(--text-primary);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ix-stats > div:first-child .ix-big { color: var(--accent-bright); text-shadow: 0 0 40px rgba(255, 184, 0, 0.18); }
.ix-stats .ix-chg { font-weight: 600; font-size: 0.9rem; }
.ix-warn {
  border-left: 3px solid var(--accent);
  background: rgba(255, 184, 0, 0.07);
  padding: 0.75rem 1rem;
  border-radius: 0 10px 10px 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.ix-warn strong { color: var(--accent); }

/* charts */
.ix-chart { margin: 0; }
.ix-chart-wrap { position: relative; }
.ix-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ix-svg-big { aspect-ratio: 720 / 280; }
.ix-grid { stroke: var(--border-color); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ix-base { stroke: #4a4a4a; stroke-dasharray: none; }
.ix-ylab, .ix-xlab { fill: var(--text-muted); font-size: 12px; font-family: var(--font-body); }
.ix-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ix-pt { fill: var(--bg-card); stroke: var(--accent); stroke-width: 2.5; cursor: pointer; vector-effect: non-scaling-stroke; }
.ix-pt:hover, .ix-pt:focus { fill: var(--accent); outline: none; }
.ix-pt-end { fill: var(--accent); }
.ix-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  background: #262626;
  border: 1px solid #3a3a3a;
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.ix-chart figcaption { margin-top: 0.5rem; }

/* breadth */
.ix-breadth h4, .ix-why h4, .ix-sectors h4 { font-size: 1rem; margin-bottom: 0.75rem; }
.ix-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--color-surface-alt); }
.ix-seg { display: block; height: 100%; }
.ix-seg-improving { background: #3ccf7a; }
.ix-seg-deteriorating { background: #ff6b6b; }
.ix-seg-unchanged { background: #9a9a9a; }
.ix-seg-unknown { background: #2e2e2e; }
.ix-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0.75rem 0 0.4rem; color: var(--text-secondary); font-size: 0.88rem; }
.ix-key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 0.4rem; vertical-align: -0.05rem; }
.ix-seg-unknown.ix-key { border: 1px solid #555; }
.ix-why ul { margin: 0 0 0.4rem 1.1rem; color: var(--text-secondary); }

/* tables */
.ix-table-scroll { overflow-x: auto; }
.ix-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.ix-table th, .ix-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: left; white-space: nowrap; }
.ix-table thead th { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; }
.ix-table tbody th { font-weight: 500; color: var(--text-primary); }
.ix-table .num { text-align: right; }
.ix-held th, .ix-held td { color: var(--text-muted); }
.ix-held td[colspan] { font-style: italic; }
.ix-sectors .ix-muted { margin-top: 0.6rem; }
.ix-data summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.ix-data summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ix-data .ix-table-scroll { margin-top: 0.75rem; }

/* companions */
.ix-companions-h { font-size: 1.15rem; margin-bottom: 1rem; }
.ix-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.ix-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ix-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.ix-card h4 { font-size: 1rem; }
.ix-q { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }
.ix-card-val { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.ix-num { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ix-card .ix-chg { font-size: 0.82rem; font-weight: 600; }
.ix-spark .ix-svg { height: 56px; }
.ix-facts { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.45; margin-top: auto; }

/* methodology */
.ix-method { border: 1px solid var(--border-color); border-radius: 16px; padding: clamp(1.1rem, 3vw, 1.75rem); background: var(--bg-secondary); }
.ix-method h3 { font-size: 1.1rem; margin-bottom: 0.9rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.ix-method ul { margin: 0 0 1rem 1.1rem; color: var(--text-secondary); display: grid; gap: 0.5rem; font-size: 0.92rem; }
.ix-method strong { color: var(--text-primary); }
.ix-method .btn-accent { display: inline-block; margin-top: 1.25rem; }

@media (max-width: 960px) {
  .ix-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ix-stats { grid-template-columns: 1fr 1fr; }
  .ix-stats > div:first-child { grid-column: 1 / -1; }
  .ix-cards { grid-template-columns: 1fr; }
  .ix-head { flex-direction: column; }
  .ix-tags { justify-content: flex-start; }
  .ix-ylab, .ix-xlab { font-size: 22px; }
  .ix-sectors .ix-table th, .ix-sectors .ix-table td { white-space: normal; padding: 0.5rem 0.3rem; font-size: 0.84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ix * { transition: none !important; }
}

/* Drill-down: sector / theme toggle (tabs appear only with JS; without JS both tables show) */
.ix-drill-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 0.75rem; }
.ix-drill-head h4 { margin-bottom: 0; }
.ix-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--color-surface-alt); }
.ix-tabs[hidden] { display: none; }
.ix-tabs button { font: inherit; font-size: 0.85rem; padding: 0.35rem 0.95rem; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.ix-tabs button[aria-selected="true"] { background: var(--accent); color: #111; font-weight: 600; }
.ix-tabs button:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.ix-panel-h { font-family: var(--font-heading); font-size: 0.95rem; color: var(--text-secondary); margin: 0 0 0.5rem; }
.ix-drill.ix-js .ix-panel-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ix-drill:not(.ix-js) .ix-panel + .ix-panel { margin-top: 1.25rem; }
