/* ============================================================================
   article.css — Research section only
   Loaded AFTER css/global.css. Adds nothing to global tokens; overrides nothing
   in them. Covers two surfaces:
     § 1  /research/            — the index list
     § 2  /research/<slug>/     — article pages
   research/canon-for-web/ is a documented exception and does NOT load this file
   (it ships its own canon.css; see the IA spec, D6).
   ========================================================================== */


/* ============================================================================
   § 0 — SHARED
   ========================================================================== */

/* Back-link above H1 and in the footer. Matches nav link typography. */
.back-link {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--orange); }

/* Long-form measure on small screens.
   global.css indents .wrap by max(11vw,3rem) + 3rem padding, which leaves
   roughly 35 characters per line at 375px — acceptable for short marketing
   copy, too narrow for a 3,000-word article. Scoped to the research section
   only; no global token or layout rule is modified. */
@media (max-width: 680px) {
  body.research-page .wrap,
  body.research-page .footer-inner {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    padding-left: 0;
    padding-right: 0;
  }
}


/* ============================================================================
   § 1 — RESEARCH INDEX
   ========================================================================== */

/* Language notice + "how we verify" sit between the page header and the list. */
.research-notice {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-bottom: 2rem;
}

.how-we-verify {
  border-left: 2px solid var(--orange-bd);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin-bottom: 3rem;
}
.how-we-verify h2 {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}
.how-we-verify ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.how-we-verify li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
  max-width: 60ch;
}
.how-we-verify li:last-child { margin-bottom: 0; }

/* The list itself — flat, hairline-separated, no cards (IA spec D4). */
.research-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.research-item {
  position: relative;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.research-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.research-item-meta {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}
.research-item h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}
.research-item h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.research-item h2 a:hover { color: var(--orange); }

/* Whole item is the click target (IA spec D4) — one link, stretched.
   The accessible name stays the full title; no redundant "read more". */
.research-item h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* Keyboard users get the ring on the whole item, not just the title text. */
.research-item:has(a:focus-visible) {
  outline: 2px solid var(--orange);
  outline-offset: 6px;
  border-radius: 2px;
}

.research-item-dek {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 58ch;
  margin-bottom: 0.75rem;
}
.research-item-attr {
  font-size: 0.72rem;
  color: var(--ink-3);
}


/* ============================================================================
   § 2 — ARTICLE PAGE
   ========================================================================== */

.article-topbar { padding: 2.5rem 0 0; }

.article-header {
  padding: 1.5rem 0 0;
}
.article-header h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

/* Byline: authors · date · reading time · verification line */
.byline {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
}
.byline p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}
.byline p:last-child { margin-bottom: 0; }
.byline .byline-label {
  font-weight: 700;
  color: var(--ink);
}
.byline .verification {
  color: var(--orange);
  font-weight: 600;
}

.lang-note {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-bottom: 3rem;
}

/* --- Body prose ---------------------------------------------------------- */

.article-body { padding-bottom: 4rem; }

.article-body > h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 3rem 0 1rem;
}
.article-body > h2:first-child { margin-top: 0; }

.article-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body em { font-style: italic; }

.article-body ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.article-body ul li {
  position: relative;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.article-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

.article-body blockquote {
  border-left: 2px solid var(--orange);
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}
.article-body blockquote p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-2);
  font-style: italic;
  margin-bottom: 0;
}

/* Section-level evidence grade — a recurring device in this article. */
.article-body .grade {
  background: var(--orange-bg);
  border: 1px solid var(--orange-bd);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* --- Tables -------------------------------------------------------------- */
/* Wrapper scrolls; the page body never scrolls horizontally. */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.85rem;
}
.article-body caption {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}
.article-body th,
.article-body td {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule-light);
  color: var(--ink-2);
  vertical-align: top;
}
.article-body th {
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-2);
  white-space: nowrap;
}
.article-body tbody tr:last-child td { border-bottom: none; }

/* --- Sources ------------------------------------------------------------- */

.sources { margin-top: 1rem; }
.sources ol {
  margin: 0 0 1.5rem;
  padding-left: 1.6rem;
}
.sources li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 0.9rem;
}
.sources a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange-bd);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.sources a:hover { color: var(--orange); }
.sources .venue-note {
  color: var(--ink-3);
  font-size: 0.85rem;
}
.sources .dropped {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* --- Article footer ------------------------------------------------------ */

.article-end {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 4rem;
}


/* ============================================================================
   § 3 — PRINT
   ========================================================================== */
@media print {
  .back-link, .lang-note { display: none; }
  .table-wrap { overflow: visible; border: none; }
  .article-body table { min-width: 0; }
  .article-body blockquote { border-left-color: #999; }
}
