/* ── Page layout ──────────────────────────────── */
.ia-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Stats cards ─────────────────────────────── */
.ia-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.ia-stat {
  padding: 14px 16px;
  background: rgba(148,137,202,0.04);
  border: 1px solid rgba(148,137,202,0.12);
  border-radius: 3px;
  text-align: center;
}
body.light .ia-stat {
  background: rgba(83,74,128,0.02);
  border-color: rgba(83,74,128,0.08);
}
.ia-stat .n {
  font-size: 26px;
  font-weight: 700;
  color: #9489ca;
  line-height: 1.2;
}
body.light .ia-stat .n { color: #111110; }
.ia-stat .l {
  font-size: 10px;
  color: rgba(148,137,202,0.5);
  margin-top: 4px;
  letter-spacing: 0.5px;
}
body.light .ia-stat .l { color: rgba(17,17,16,0.55); }

/* ── Review calendar ──────────────────────────── */
.ia-review {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 864px;
  margin-bottom: 28px;
}
.ia-review-card {
  padding: 16px 18px;
  background: rgba(148,137,202,0.04);
  border: 1px solid rgba(148,137,202,0.12);
  border-radius: 3px;
}
body.light .ia-review-card {
  background: rgba(83,74,128,0.02);
  border-color: rgba(83,74,128,0.08);
}
.ia-review-card .r-label {
  font-size: 14px;
  font-weight: 700;
  color: #9489ca;
  margin-bottom: 8px;
}
body.light .ia-review-card .r-label { color: #111110; }
.ia-review-card .r-row {
  font-size: 11px;
  color: rgba(148,137,202,0.55);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 2px 0;
}
body.light .ia-review-card .r-row {
  color: rgba(17,17,16,0.55);
}
.ia-review-card .r-countdown {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #08BDBA;
  margin-top: 6px;
}
body.light .ia-review-card .r-countdown { color: #00897B; }

/* ── Section headings ─────────────────────────── */
.ia-section-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(148,137,202,0.65);
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148,137,202,0.1);
}
body.light .ia-section-title {
  color: rgba(17,17,16,0.7);
  border-bottom-color: rgba(17,17,16,0.1);
}

/* ── Tab navigation ────────────────────────────── */
.ia-tabs {
  display: flex;
  gap: 0;
  margin: 24px 0 8px 0;
  border-bottom: 2px solid rgba(148,137,202,0.1);
}
body.light .ia-tabs {
  border-bottom-color: rgba(17,17,16,0.1);
}
.ia-tab-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: rgba(148,137,202,0.45);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.5px;
}
body.light .ia-tab-btn {
  color: rgba(17,17,16,0.45);
}
.ia-tab-btn:hover {
  color: #9489ca;
}
body.light .ia-tab-btn:hover {
  color: #111110;
}
.ia-tab-btn.active {
  color: #9489ca;
  border-bottom-color: #9489ca;
}
body.light .ia-tab-btn.active {
  color: #111110;
  border-bottom-color: #534A80;
}

.ia-tab-panel {
  min-height: 120px;
}

/* ── Status badges ────────────────────────────── */
.ia-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.ia-badge.expected  { background: #08BDBA; color: #fff; }
.ia-badge.not-met   { background: #f0a030; color: #fff; }
.ia-badge.excluded  { background: #FF8389; color: #fff; }

/* ── Gap indicator ─────────────────────────────── */
.ia-gap {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.ia-gap.met       { color: #08BDBA; }
.ia-gap.close     { color: #f0a030; }
.ia-gap.moderate  { color: #FF8389; }
.ia-gap.far       { color: #FF8389; }
.ia-gap.impossible { color: #82888d; }
body.light .ia-gap.met       { color: #00897B; }
body.light .ia-gap.close     { color: #c77d20; }
body.light .ia-gap.moderate  { color: #d53e4f; }
body.light .ia-gap.far       { color: #d53e4f; }
body.light .ia-gap.impossible { color: #656a70; }

/* ── Liquidity test indicator ──────────────────── */
.ia-liquidity {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ia-liquidity.pass          { color: #08BDBA; }
.ia-liquidity.fail          { color: #FF8389; }
.ia-liquidity.insufficient  { color: #f0a030; }
.ia-liquidity.na            { color: #82888d; }
body.light .ia-liquidity.pass          { color: #00897B; }
body.light .ia-liquidity.fail          { color: #d53e4f; }
body.light .ia-liquidity.insufficient  { color: #c77d20; }
body.light .ia-liquidity.na            { color: #656a70; }

/* ── Likelihood indicator ─────────────────────── */
.ia-likelihood {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
.ia-likelihood.certain      { background: rgba(8,189,186,0.12); color: #08BDBA; }
.ia-likelihood.likely       { background: rgba(240,160,48,0.12); color: #f0a030; }
.ia-likelihood.possible     { background: rgba(120,169,255,0.12); color: #78A9FF; }
.ia-likelihood.unlikely     { background: rgba(255,131,137,0.12); color: #FF8389; }
.ia-likelihood.impossible   { background: rgba(130,136,141,0.12); color: #82888d; }
body.light .ia-likelihood.certain      { color: #00897B; background: rgba(0,137,123,0.08); }
body.light .ia-likelihood.likely       { color: #c77d20; background: rgba(199,125,32,0.08); }
body.light .ia-likelihood.possible     { color: #3266b3; background: rgba(50,102,179,0.08); }
body.light .ia-likelihood.unlikely     { color: #d53e4f; background: rgba(213,62,79,0.08); }
body.light .ia-likelihood.impossible   { color: #656a70; background: rgba(101,106,112,0.08); }

/* ── Table ────────────────────────────────────── */
.ia-table-wrap {
  overflow-x: auto;
  margin-bottom: 32px;
}
.ia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ia-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: rgba(148,137,202,0.45);
  letter-spacing: 1px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148,137,202,0.12);
  white-space: nowrap;
  font-family: var(--font-mono);
}
body.light .ia-table thead th {
  color: rgba(17,17,16,0.55);
  border-bottom-color: rgba(17,17,16,0.12);
}
.ia-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148,137,202,0.05);
  color: #9489ca;
  vertical-align: middle;
  font-size: 12px;
}
body.light .ia-table tbody td {
  color: #111110;
  border-bottom-color: rgba(17,17,16,0.06);
}
.ia-table tbody tr:hover td {
  background: rgba(148,137,202,0.03);
}
body.light .ia-table tbody tr:hover td {
  background: rgba(17,17,16,0.02);
}
.ia-table .td-code {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.ia-table .td-code a {
  color: #9489ca;
  text-decoration: none;
}
.ia-table .td-code a:hover { text-decoration: underline; }
body.light .ia-table .td-code a { color: #534A80; }

.ia-table .td-name {
  font-weight: 600;
  font-size: 13px;
}
.ia-table .td-mcap {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.ia-table .td-pathway {
  font-size: 11px;
  white-space: nowrap;
}
.ia-table .td-timeline {
  font-size: 11px;
  color: rgba(148,137,202,0.5);
  max-width: 200px;
}
body.light .ia-table .td-timeline {
  color: rgba(17,17,16,0.55);
}
.ia-wvr-badge {
  display: inline-block;
  background: rgba(148,137,202,0.18);
  color: #9489ca;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}
body.light .ia-wvr-badge {
  background: rgba(100,90,160,0.12);
  color: #5a4f8a;
}
.ia-table .td-notes {
  font-size: 10px;
  color: rgba(148,137,202,0.7);
  max-width: 180px;
  line-height: 1.4;
}
body.light .ia-table .td-notes {
  color: rgba(17,17,16,0.5);
}
.ia-note-tag {
  display: inline;
}

/* ── Collapsible wrapper (shared triangle indicator) ── */
.ia-rules-wrapper,
.ia-candidates-wrapper {
  margin-bottom: 10px;
}
.ia-rules-wrapper > summary,
.ia-candidates-wrapper > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ia-rules-wrapper > summary::before,
.ia-candidates-wrapper > summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(148,137,202,0.55);
  transition: transform 0.2s;
  flex-shrink: 0;
}
body.light .ia-rules-wrapper > summary::before,
body.light .ia-candidates-wrapper > summary::before {
  border-top-color: rgba(17,17,16,0.45);
}
.ia-rules-wrapper[open] > summary::before,
.ia-candidates-wrapper[open] > summary::before {
  transform: rotate(-180deg);
}
.ia-rules-wrapper > summary::-webkit-details-marker,
.ia-candidates-wrapper > summary::-webkit-details-marker {
  display: none;
}

/* ── Rules summary ────────────────────────────── */
.ia-rules {
  margin-bottom: 32px;
}
.ia-rules details {
  background: rgba(148,137,202,0.04);
  border: 1px solid rgba(148,137,202,0.12);
  border-radius: 3px;
  padding: 12px 18px;
  margin-bottom: 6px;
}
body.light .ia-rules details {
  background: rgba(83,74,128,0.02);
  border-color: rgba(83,74,128,0.08);
}
.ia-rules summary {
  font-size: 13px;
  font-weight: 600;
  color: #9489ca;
  cursor: pointer;
  padding: 4px 0;
}
body.light .ia-rules summary { color: #111110; }
.ia-rules .rule-desc {
  font-size: 11px;
  color: rgba(148,137,202,0.5);
  margin-top: 6px;
  line-height: 1.6;
}
body.light .ia-rules .rule-desc {
  color: rgba(17,17,16,0.55);
}
.ia-rules .rule-threshold {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #08BDBA;
  margin-top: 4px;
}
body.light .ia-rules .rule-threshold { color: #00897B; }

/* ── Regulatory text (nested inside rules) ──────── */
.ia-regulatory {
  margin-top: 8px;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}
.ia-regulatory > summary {
  font-size: 11px;
  font-weight: 500;
  color: rgba(148,137,202,0.45);
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.5px;
}
body.light .ia-regulatory > summary {
  color: rgba(17,17,16,0.45);
}
.ia-regulatory blockquote {
  margin: 6px 0 0 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(148,137,202,0.2);
  background: rgba(148,137,202,0.03);
  font-size: 11px;
  line-height: 1.7;
  color: rgba(148,137,202,0.65);
}
body.light .ia-regulatory blockquote {
  border-left-color: rgba(83,74,128,0.15);
  background: rgba(83,74,128,0.015);
  color: rgba(17,17,16,0.65);
}
.ia-regulatory blockquote p {
  margin: 0 0 6px 0;
}
.ia-regulatory blockquote p:last-of-type {
  margin-bottom: 0;
}
.ia-regulatory blockquote footer {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(148,137,202,0.35);
  font-style: italic;
}
body.light .ia-regulatory blockquote footer {
  color: rgba(17,17,16,0.4);
}

/* ── Empty state ─────────────────────────────── */
.ia-empty {
  text-align: center;
  color: rgba(148,137,202,0.35);
  padding: 40px 16px;
  font-size: 12px;
}
body.light .ia-empty {
  color: rgba(17,17,16,0.55);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .ia-main { padding: 0 20px; }
  .ia-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ia-stat { padding: 12px 10px; }
  .ia-stat .n { font-size: 22px; }
  .ia-review { grid-template-columns: 1fr; max-width: none; }
  .ia-table thead th,
  .ia-table tbody td { padding: 6px 8px; }
  .ia-table .td-name { font-size: 12px; }
  .ia-tab-btn { padding: 8px 14px; font-size: 12px; }
}

.ia-mcap-note {
  font-size: 80%;
  vertical-align: super;
  color: #9489ca;
  cursor: help;
}

.ia-mcap-footnote {
  font-size: 12px;
  color: #9489ca;
  margin-top: 6px;
  text-align: right;
}

/* ── Summary row for candidates ───────────────── */
.ia-summary-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.ia-summary-row .ia-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 2px;
  background: rgba(148,137,202,0.04);
  border: 1px solid rgba(148,137,202,0.12);
  color: rgba(148,137,202,0.55);
}
body.light .ia-summary-row .ia-stat {
  background: rgba(83,74,128,0.02);
  border-color: rgba(83,74,128,0.08);
  color: rgba(17,17,16,0.55);
}
.ia-summary-row .ia-stat-expected { color: #08BDBA; border-color: rgba(8,189,186,0.2); }
.ia-summary-row .ia-stat-not-met { color: #f0a030; border-color: rgba(240,160,48,0.2); }
.ia-summary-row .ia-stat-excluded { color: #FF8389; border-color: rgba(255,131,137,0.2); }
body.light .ia-summary-row .ia-stat-expected { color: #00897B; border-color: rgba(0,137,123,0.2); }
body.light .ia-summary-row .ia-stat-not-met { color: #c77d20; border-color: rgba(199,125,32,0.2); }
body.light .ia-summary-row .ia-stat-excluded { color: #d53e4f; border-color: rgba(213,62,79,0.2); }

/* ── Sortable table headers ──────────────────── */
.ia-sort-th {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px !important;
}
.ia-sort-th:hover {
  color: #08BDBA !important;
}
body.light .ia-sort-th:hover {
  color: #00897B !important;
}
.ia-sort-th::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.3;
}
.ia-sort-th.ia-sort-asc::after {
  border-bottom: 5px solid currentColor;
  border-top: none;
  opacity: 1;
}
.ia-sort-th.ia-sort-desc::after {
  border-top: 5px solid currentColor;
  border-bottom: none;
  opacity: 1;
}

.ia-estimate-note {
  font-size: 12px;
  color: #9489ca;
  margin: 12px 0;
  line-height: 1.5;
}
