/* =========================================================
   Recognition Physics Institute — Twenty Questions page
   Extends main.css (light, editorial). Page-specific styles.
   ========================================================= */

/* --- Epistemic tag tokens (light theme) --- */
:root {
  --tag-thm-ink: #1c6b3a;
  --tag-thm-bg: #e9f3ec;
  --tag-cond-ink: #0d6c77;
  --tag-cond-bg: #e6f2f3;
  --tag-part-ink: #1c3f8a;
  --tag-part-bg: #e7eaf3;
  --tag-hyp-ink: #8a5a00;
  --tag-hyp-bg: #f4ecdd;
  --tag-model-ink: #5e44a0;
  --tag-model-bg: #efeaf6;
  --tag-open-ink: #ad2b22;
  --tag-open-bg: #f6e7e6;
}

/* --- Page hero --- */
.q-hero {
  padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(1000px 360px at 82% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 62%);
}

.q-hero__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  margin-top: 16px;
  max-width: 18ch;
  font-variation-settings: "opsz" 144;
}

.q-hero__lede {
  margin-top: 22px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 64ch;
}

.q-hero__by {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--ink-3);
  max-width: 64ch;
  line-height: 1.55;
}

.q-hero__by .phi {
  color: var(--accent);
  font-weight: 600;
}

/* --- Legend of epistemic tags --- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

/* --- Epistemic badge --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: var(--surface);
  white-space: nowrap;
  line-height: 1;
}

.tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.tag--thm {
  color: var(--tag-thm-ink);
  background: var(--tag-thm-bg);
}

.tag--cond {
  color: var(--tag-cond-ink);
  background: var(--tag-cond-bg);
}

.tag--part {
  color: var(--tag-part-ink);
  background: var(--tag-part-bg);
}

.tag--hyp {
  color: var(--tag-hyp-ink);
  background: var(--tag-hyp-bg);
}

.tag--model {
  color: var(--tag-model-ink);
  background: var(--tag-model-bg);
}

.tag--open {
  color: var(--tag-open-ink);
  background: var(--tag-open-bg);
}

/* --- Table of contents pills --- */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.toc a {
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.toc a:hover {
  background: var(--ink);
  color: var(--ink-on-dark);
  border-color: var(--ink);
}

/* --- The root equation block --- */
.eq {
  background: var(--ink);
  color: var(--ink-on-dark);
  border-radius: 14px;
  padding: clamp(22px, 3vw, 32px);
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.7;
  overflow-x: auto;
}

.eq .c {
  color: #f2c14e;
  font-weight: 500;
}

.eq .small {
  display: block;
  margin-top: 14px;
  font-size: 0.86em;
  color: color-mix(in oklab, var(--ink-on-dark) 78%, transparent);
  line-height: 1.6;
}

/* --- Anchors (Lean module references) --- */
.anchor {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  line-height: 1.65;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent);
  word-break: break-word;
}

.anchor strong {
  color: var(--ink-2);
}

/* --- Question cards --- */
.qgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 32px);
  padding: clamp(28px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--rule);
}

.card:first-child {
  border-top: 1px solid var(--rule-strong);
}

.qn {
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  font-feature-settings: "tnum" on;
}

.card__body {
  min-width: 0;
}

.qtitle {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.014em;
  color: var(--ink);
}

.tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.card__body p {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-2);
}

.pull {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 620px) {
  .card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* --- Feature blocks (the three new objects) --- */
.feature {
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  background: var(--bg-elevated);
  padding: clamp(26px, 3.4vw, 40px);
  margin-top: 24px;
}

.feature:first-of-type {
  margin-top: 0;
}

.feature__kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin-top: 8px;
  color: var(--ink);
}

.feature__claim {
  margin-top: 14px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
}

.feature__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 40px);
  margin-top: 26px;
}

.feature__two h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.feature__two p {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

@media (max-width: 680px) {
  .feature__two {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* --- Discoveries table --- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
}

table.disc {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
}

table.disc th,
table.disc td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.55;
}

table.disc tr:last-child td {
  border-bottom: none;
}

table.disc thead th {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-elevated);
  white-space: nowrap;
}

table.disc td:first-child {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
}

table.disc td p {
  color: var(--ink-2);
}

table.disc .stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Honest accounting notes --- */
.note {
  border-radius: 14px;
  padding: clamp(20px, 2.6vw, 28px);
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-2);
}

.note + .note {
  margin-top: 18px;
}

.note strong {
  color: var(--ink);
}

.note--ok {
  background: var(--tag-thm-bg);
  border: 1px solid color-mix(in oklab, var(--tag-thm-ink) 32%, transparent);
}

.note--watch {
  background: var(--tag-hyp-bg);
  border: 1px solid color-mix(in oklab, var(--tag-hyp-ink) 30%, transparent);
}

.summary {
  margin-top: 26px;
  font-family: var(--display);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--ink);
  max-width: 70ch;
}

.tiny {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* --- Lede + section spacing reuse --- */
.lede {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.55;
  max-width: 70ch;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 1px 5px;
  border-radius: 4px;
}
