/* ==============================================================
   PROTEVIA · /compare/ — comparison page components
   Extends insights/article.css (tokens, nav, footer, typography).
   Load AFTER article.css. Uses only inherited custom properties, so
   the prefers-color-scheme light mode in article.css applies here too.
   ============================================================== */

/* ── UPDATED STAMP ── */
.updated-stamp {
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--steel);
  display: flex; align-items: center; gap: 10px;
  margin-top: 28px;
}
.updated-stamp::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); flex-shrink: 0;
}

/* ── VERDICT BOX (above the fold) ── */
.verdict {
  border: 1px solid var(--border-teal); background: var(--panel);
  border-radius: 2px; padding: 30px 30px 26px 30px; margin: 0 0 12px 0;
}
.verdict-label {
  font-family: var(--mono);
  font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px;
}
.verdict ul { list-style: none; margin: 0 0 24px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.verdict li {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px;
  font-size: 1rem; line-height: 1.65; color: var(--muted); margin: 0;
}
.verdict li::before {
  content: counter(verdict-c, decimal-leading-zero);
  counter-increment: verdict-c;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: var(--teal); padding-top: 4px;
}
.verdict ul { counter-reset: verdict-c; }
.verdict li strong { color: var(--ice); font-weight: 600; }
.verdict-cta {
  font-family: var(--mono);
  display: inline-block;
  padding: 13px 22px; border: 1px solid var(--teal); color: var(--teal);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px;
}
.verdict-cta:hover { background: var(--teal); color: var(--navy); }

/* ── COMPARISON TABLE ──
   Wrapper scrolls horizontally on its own; the page body never does.   */
.cmp-wrap {
  margin: 36px 0 14px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
  -webkit-overflow-scrolling: touch;
}
.cmp-wrap:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
table.cmp {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: 0.9rem;
}
table.cmp caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal);
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid var(--border);
}
table.cmp th, table.cmp td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
table.cmp thead th {
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ice);
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  position: sticky; top: 0;
}
table.cmp thead th.own { color: var(--teal); }
table.cmp tbody th {
  font-weight: 500; text-align: left; color: var(--ice);
  font-size: 0.88rem;
  width: 30%;
  background: transparent;
}
table.cmp td { color: var(--muted); }
table.cmp td.own { color: var(--ice); }
table.cmp tbody tr:last-child th, table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp tbody tr:hover td, table.cmp tbody tr:hover th { background: rgba(45,189,189,0.035); }

/* ── EVIDENCE LABELS ── */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px;
  border: 1px solid var(--border-strong);
  color: var(--steel);
  white-space: nowrap;
  margin-top: 7px;
}
.tag.v { color: var(--teal); border-color: var(--border-teal); }
.tag.est { color: var(--amber); border-color: var(--amber-border); }
.tag.unk { color: var(--steel); border-color: var(--border-strong); }
.tag-row { display: block; }

/* The evidence-grade amber is the one colour on this page that is not an
   inherited token, so it needs its own light/dark pair. The dark value on
   #0B1218 is 7.8:1; the same value on the light background is only 2.2:1,
   which fails AA at this label size — hence the darker light-mode value. */
:root { --amber: #C9A227; --amber-border: rgba(201,162,39,0.34); }
@media (prefers-color-scheme: light) {
  :root { --amber: #7A5F08; --amber-border: rgba(122,95,8,0.34); }
}

/* ── TABLE FOOTNOTE ── */
.cmp-note {
  font-size: 0.76rem; color: var(--steel); line-height: 1.65;
  margin: 0 0 40px 0; max-width: 720px;
}
.cmp-note code {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
}

/* ── CONSTRAINT / HONESTY CALLOUT ── */
.callout {
  border-left: 2px solid var(--teal);
  background: var(--panel);
  padding: 22px 24px; margin: 36px 0; border-radius: 0 2px 2px 0;
}
.callout-label {
  font-family: var(--mono);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 11px;
}
.callout p { font-size: 0.95rem; line-height: 1.72; color: var(--muted); margin: 0; }
.callout p + p { margin-top: 14px; }

/* ── DECISION TREE ── */
.tree { display: flex; flex-direction: column; gap: 0; margin: 32px 0 8px 0; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.tree-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.tree-row:last-child { border-bottom: 0; }
@media (max-width: 640px) { .tree-row { grid-template-columns: 1fr; } }
.tree-q, .tree-a { padding: 20px 22px; }
.tree-q {
  border-right: 1px solid var(--border);
  color: var(--ice); font-size: 0.93rem; font-weight: 500; line-height: 1.6;
}
@media (max-width: 640px) { .tree-q { border-right: 0; border-bottom: 1px solid var(--border); } }
.tree-a { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }
.tree-a strong { color: var(--teal); font-weight: 600; display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ── FAQ ── */
.faq { margin: 32px 0 8px 0; border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 34px 20px 0; position: relative;
  color: var(--ice); font-size: 1rem; font-weight: 500; line-height: 1.55;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 18px;
  font-family: var(--mono); font-size: 1.2rem; font-weight: 400;
  color: var(--teal); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--teal); }
.faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.faq-a { padding: 0 34px 22px 0; color: var(--muted); font-size: 0.96rem; line-height: 1.75; }
.faq-a p { margin: 0; }
.faq-a p + p { margin-top: 14px; }

/* ── METHODOLOGY / DISCLOSURE ── */
.method {
  border: 1px solid var(--border); border-radius: 2px;
  padding: 26px 28px; margin: 44px 0 0 0;
  font-size: 0.82rem; line-height: 1.75; color: var(--steel);
}
.method h3 {
  font-family: var(--mono);
  font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 14px 0;
}
.method p { margin: 0; }
.method p + p { margin-top: 13px; }
.method strong { color: var(--muted); font-weight: 600; }
.method ol { margin: 12px 0 0 0; padding-left: 20px; }
.method li { margin-bottom: 8px; font-size: 0.8rem; }
.method li::marker { color: var(--border-teal); }

/* ── RELATED COMPARISONS ── */
.related { margin-top: 52px; border-top: 1px solid var(--border); padding-top: 34px; }
.related-label {
  font-family: var(--mono);
  font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 20px;
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  border: 1px solid var(--border); border-radius: 2px; padding: 20px 22px;
  display: block; transition: background-color 0.25s ease, border-color 0.25s ease;
}
.related-card:hover { background: var(--surface); border-color: var(--border-teal); }
.related-card .rc-title {
  font-family: var(--disp); font-variation-settings: "wdth" 104;
  font-size: 1.02rem; font-weight: 650; color: var(--ice);
  line-height: 1.3; margin-bottom: 7px;
}
.related-card .rc-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.related-card .rc-soon {
  font-family: var(--mono); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel);
  display: inline-block; margin-top: 10px;
}

/* ── HUB (/compare/) ──
   Reuses .episode-grid / .episode-card / .ep-* from article.css so the hub
   reads identically to the insights hub. Only the "planned" state is new:
   a page that does not exist yet must not be a link, or the crawler follows
   it into a 404.                                                            */
/* Differentiate planned cards with tokens, NOT a blanket opacity. Dimming the
   whole card composited the title down to ~3.1:1 against the light background;
   muting it to --muted keeps it at ~7:1 in both schemes. The "Planned" tag,
   the muted title, no hover and the default cursor carry the distinction. */
.episode-card.is-planned { cursor: default; }
.episode-card.is-planned:hover { background: transparent; }
.episode-card.is-planned .ep-title { color: var(--muted); font-weight: 600; }
/* .ep-deck deliberately left at --muted. Dropping it to --steel to differentiate
   further would put body copy at 3.9:1 in light mode, below AA. */

.hub-intro { max-width: 720px; margin-bottom: 34px; }
.hub-intro p { font-size: 1.04rem; line-height: 1.78; color: var(--muted); margin-bottom: 20px; }
.hub-intro p:last-child { margin-bottom: 0; }
.hub-intro strong { color: var(--ice); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .related-card, table.cmp tbody tr, .episode-card { transition: none; }
}
