/* Theories index and theory pages. Loaded only there. */
.th-page { max-width: none; }
.th-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.th-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 10px;
}
.th-sub { color: var(--muted); margin: 0 0 18px; max-width: 42rem; }

.th-table { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.thead, .trow {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 108px 88px minmax(120px, 0.7fr) 108px;
  gap: 8px 12px;
  align-items: center;
}
.thead {
  padding: 10px 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trow {
  min-height: 52px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
  color: inherit;
}
.trow:hover .tclaim { color: var(--lime); }
.tclaim { font-size: 16px; line-height: 1.35; }
.vp { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.v-validated { color: var(--lime); }
.v-wrong { color: var(--coral); }
.v-untestable { color: var(--muted); }
.tnum { font-family: var(--mono); font-size: 13px; }
.tmeta { display: contents; }
.tmeta i { display: none; }

.th-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 8px 0 18px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.th-block { margin: 0 0 22px; max-width: 40rem; }
.th-block h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 8px;
}
.th-block p { margin: 0; font-size: 17px; line-height: 1.45; }
.nums { display: grid; gap: 12px; margin: 0; }
.nums div { display: grid; gap: 2px; }
.nums dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.nums dd { margin: 0; font-size: 16px; line-height: 1.4; }

.decile {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin: 0;
}
.decile .bin { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.decile .track { height: 112px; width: 100%; display: flex; align-items: flex-end; }
.decile .track i {
  display: block;
  width: 100%;
  background: var(--lime);
  border-radius: 3px 3px 0 0;
  min-height: 0;
}
.decile b, .decile span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
}
.decile b { color: var(--text); }
.th-axis { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.th-accs { border-bottom: 1px solid var(--line); }
.th-acc { border-top: 1px solid var(--line); }
.th-acc h2 { margin: 0; font: inherit; }
.th-acc-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  background: none;
  border: 0;
  color: inherit;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
}
.th-acc-btn span {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.th-acc-panel .trow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 16px;
  min-height: 44px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: none;
}
.th-acc-panel .tclaim { min-width: 0; flex: 1 1 8rem; line-height: 1.35; }
.th-acc-panel .tstats { flex: 1 1 100%; font-family: var(--mono); font-size: 12px; line-height: 1.35; color: var(--muted); }
.th-acc-panel .tnum { flex: 0 1 auto; color: var(--muted); line-height: 1.35; }

.th-group { margin: 28px 0 8px; }
.th-group > h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 4px;
}
.th-group > h2 span {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--muted);
}
.th-card { border-top: 1px solid var(--line); padding: 14px 0 2px; }
.th-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
}
.th-card h3 a {
  color: inherit;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.th-method { margin: 22px 0 8px; }
.th-method a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--lime);
}

.nav-toggle { min-height: 44px; }
.nav-links a, .foot-links a, .logo { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 420px) {
  .decile { gap: 2px; }
  .decile b, .decile span { font-size: 8px; }
}

@media (max-width: 720px) {
  .thead { display: none; }
  .trow, .thead { display: flex; }
  .thead { display: none; }
  .trow {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-height: 44px;
    padding: 12px 0;
  }
  .tmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .tmeta i {
    display: inline;
    font-style: normal;
    color: var(--muted);
    margin-right: 4px;
  }
  .nav-links a { width: 100%; }
}

html, body { overflow-x: clip; }
img, svg, table { max-width: 100%; }
