/* THE HUMANS ARE FINE — article + evidence file styles.
   Loaded only by pages under /articles/. Does not alter existing homepage rules. */

.article{padding:34px 0 56px;max-width:820px}
.article h1{margin:0 0 16px;font:400 clamp(34px,5vw,58px)/1.04 var(--sans);letter-spacing:-.04em;overflow-wrap:break-word}
.article h1.h1-sm{font-size:clamp(30px,4.2vw,46px)}
.article .standfirst{max-width:760px;margin:0 0 18px;color:var(--muted);font:20px/1.45 var(--serif)}
.article-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 28px;margin:22px 0 0;padding:16px 0;list-style:none;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font:11px/1.5 var(--mono);color:var(--muted);letter-spacing:.03em}
.article-meta b{display:block;color:var(--green);font-weight:400;text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.article-meta a{color:var(--ink)}
.article-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:24px 0 8px}
.article-body{margin-top:30px}
.article-body h2{margin:38px 0 12px;font:400 clamp(22px,3vw,30px)/1.15 var(--sans);letter-spacing:-.02em}
.article-body h2:first-child{margin-top:0}
.article-body p{margin:0 0 16px;color:#e2e2da;font:17px/1.65 var(--serif)}
.article-body ul,.article-body ol{margin:0 0 18px;padding-left:22px;color:#e2e2da;font:17px/1.6 var(--serif)}
.article-body li{margin-bottom:9px}
.article-body a,.sources a{color:var(--green);text-decoration:underline;text-underline-offset:2px;overflow-wrap:break-word}
.article-body a:hover{color:#d7f0dc}
.sources{padding-left:20px;font:16px/1.55 var(--serif)}
.sources li{margin-bottom:10px}
.file-note{margin-top:26px;padding-top:14px;border-top:1px solid var(--line);color:var(--muted);font:12px/1.6 var(--mono)!important}

/* Inside the AI Newsroom */
.newsroom{margin:46px 0 10px;padding:26px;border:1px solid var(--line);background:var(--panel2)}
.newsroom h2{margin:0 0 8px;font:400 clamp(24px,3.4vw,34px)/1.1 var(--sans);letter-spacing:-.03em}
.newsroom-note{margin:0 0 20px;color:var(--muted);font:13px/1.6 var(--sans)}
.newsroom details{border-top:1px solid var(--line);padding:0}
.newsroom details+details{margin-top:0}
.newsroom summary{cursor:pointer;padding:15px 0;font:11px var(--mono);letter-spacing:.05em;text-transform:uppercase;color:var(--green);list-style:none}
.newsroom summary::-webkit-details-marker{display:none}
.newsroom summary::before{content:"+ ";color:var(--amber)}
.newsroom details[open] summary::before{content:"\2212 "}
.newsroom summary:hover{color:#d7f0dc}
.ns-body{padding:2px 0 18px}
.ns-body p{margin:0 0 14px;color:#dfe3e0;font:15.5px/1.65 var(--serif)}
.ns-body b{color:var(--ink)}
.disposition{color:var(--amber)!important;font:11px var(--mono)!important;letter-spacing:.05em;text-transform:uppercase}
.ns-table{width:100%;border-collapse:collapse;font:13px/1.5 var(--sans)}
.ns-table th,.ns-table td{text-align:left;vertical-align:top;padding:9px 10px;border-bottom:1px solid var(--line)}
.ns-table th{color:var(--green);font:10px var(--mono);letter-spacing:.06em;text-transform:uppercase;font-weight:400}
.ns-table td{color:#dfe3e0}
.ns-table td:first-child{color:var(--muted);white-space:nowrap}

/* Evidence file table */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 0 8px}
.evidence-table{width:100%;min-width:620px;border-collapse:collapse;font:13px/1.55 var(--sans)}
.evidence-table th,.evidence-table td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid var(--line)}
.evidence-table th{color:var(--green);font:10px var(--mono);letter-spacing:.06em;text-transform:uppercase;font-weight:400}
.evidence-table td{color:#dfe3e0}
.evidence-table td:first-child{font-family:var(--mono);font-size:11px;color:var(--amber);white-space:nowrap}
.evidence-table tr:last-child td{border-bottom:0}

/* Article footer nav */
.article-foot{display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-top:34px;padding-top:16px;border-top:1px solid var(--line)}
.article-foot a{color:var(--green);font:10px var(--mono);letter-spacing:.05em;text-transform:uppercase;text-decoration:none}
.article-foot a:hover{color:#d7f0dc}

@media(max-width:800px){
  .article{padding:26px 0 44px;max-width:100%}
  .article-meta{grid-template-columns:1fr}
  .article-body p,.article-body ul,.article-body ol{font-size:16.5px;line-height:1.62}
  .newsroom{padding:18px 16px}
  .article-body h2{margin-top:30px}
}
@media(max-width:420px){
  .article h1{font-size:30px;letter-spacing:-.03em}
  .article h1.h1-sm{font-size:26px}
  .article .standfirst{font-size:18px}
  .article-actions{display:block}
  .article-actions .button{margin-bottom:12px}
  .newsroom{padding:16px 13px}
  .ns-table{min-width:520px}
  .ns-body p{font-size:15.5px}
}

/* ============================================================
   FOR HUMAN CONSUMPTION
   Permanent editorial feature. Every article ends with it.
   Contract: see site/docs/editorial-fhc-standard.md
   ------------------------------------------------------------
   Markup (inside .article-body, before the final supporting
   editorial block — Related reading / Context / Sources):

   <section class="hfc" aria-labelledby="hfc-title">
     <h2 class="hfc-title" id="hfc-title">For Human Consumption</h2>
     <div class="hfc-body">
       <p>... 75-125 words ...</p>
       <p class="hfc-sig">THE HUMANS ARE FINE.</p>
     </div>
   </section>

   Selectors are intentionally two-class deep. The host page's
   `.article-body h2` and `.article-body p` rules would otherwise
   win on specificity and strip this component's identity.
   ============================================================ */

.hfc{
  position:relative;
  margin:46px 0 12px;
  padding:26px 28px 24px;
  border:1px solid var(--line);
  border-top:2px solid var(--green);
  background:var(--panel2);
  overflow-wrap:break-word;
}
.hfc .hfc-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 16px;
  font:400 11px/1.4 var(--mono);
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--green);
  white-space:nowrap;
}
.hfc .hfc-title::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:var(--line);
}
.hfc .hfc-body p{
  margin:0 0 14px;
  color:#e2e2da;
  font:17px/1.65 var(--serif);
}
.hfc .hfc-body p:last-child{margin-bottom:0}
.hfc .hfc-body .hfc-sig{
  margin:16px 0 0;
  color:var(--green);
  font:400 11px/1.4 var(--mono);
  letter-spacing:.18em;
  text-transform:uppercase;
}
.hfc .hfc-body .hfc-sig::before{
  content:"";
  display:block;
  width:34px;
  height:1px;
  margin:0 0 12px;
  background:var(--amber);
}

@media(max-width:800px){
  .hfc{padding:22px 18px 20px;margin-top:38px}
  .hfc .hfc-body p{font-size:16.5px;line-height:1.62}
  .hfc .hfc-title{letter-spacing:.16em}
}
@media(max-width:420px){
  .hfc{padding:20px 14px 18px;margin-top:32px}
  .hfc .hfc-title{font-size:10px;letter-spacing:.12em;gap:10px;white-space:normal}
  .hfc .hfc-body p{font-size:16px;line-height:1.6}
  .hfc .hfc-body .hfc-sig{font-size:10px;letter-spacing:.14em}
}

/* Long machine tokens (URLs, hashes, identifiers) must not widen the page.
   Added during Batch 001 validation: a <code> span in the Story B Evidence File
   pushed the 390px document to 433px. Wrap-only; no visual change on desktop. */
.article-body code,
.evidence-table code,
.hfc code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Plain-text long tokens get the same treatment. Batch 001 final gate: the
   Story B Evidence File prints bare DOI/arXiv URLs as paragraph text, not as
   <code> or <a>, so the rule above never applied to them. One such URL held
   the 375px document at 377px (2px). break-word wraps only tokens that would
   otherwise overflow, so ordinary prose is unaffected. */
.article-body p,
.article-body li,
.article-body dd {
  overflow-wrap: break-word;
}

/* Verbatim machine output (one block, in the Vos Evidence File). A default <pre>
   keeps white-space:pre, so its longest line set a 404px min-content width and the
   320px and 375px documents scrolled sideways by 84px and 29px. Wrapped rather
   than scrolled: the lines are short command output, so nothing is lost, and the
   block still scrolls internally if a line ever exceeds the column. */
.code-block{
  margin:0 0 18px;padding:14px 16px;background:var(--panel);
  border:1px solid var(--line);border-left:3px solid var(--green);
  overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere;
}
.code-block code{
  font:12px/1.6 var(--mono);color:var(--muted);
  background:none;border:0;padding:0;
}

.clarification{margin:40px 0 0;padding:20px 22px;background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--amber)}
.clarification .clarification-title{margin:0 0 10px;color:var(--amber);font:600 11px/1.4 var(--mono);letter-spacing:.16em;text-transform:uppercase}
.clarification p{margin:0;color:var(--muted);font:15.5px/1.65 var(--sans)}
@media (max-width:800px){.clarification{padding:18px 16px}.clarification p{font-size:15px}}

/* --- breadcrumb trail (added Release 2 / audience build) -------------------
   A reader landing from a search result should be able to see where they are
   and step up to the topic archive in one tap. Matching BreadcrumbList markup
   is emitted by scripts/thaf-apply-metadata.ps1 from this same visible trail. */
.crumbs{
  font:600 12px/1.5 var(--thaf-mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#6b6b6b;
  margin:18px 0 6px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.5em;
}
.crumbs a{color:#6b6b6b;text-decoration:none;border-bottom:1px solid transparent;padding-bottom:1px}
.crumbs a:hover,.crumbs a:focus-visible{color:#111;border-bottom-color:currentColor}
.crumbs [aria-current="page"]{color:#111;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(100%,34ch)}
@media (max-width:560px){
  .crumbs{font-size:11px;letter-spacing:.04em}
  .crumbs [aria-current="page"]{max-width:100%;white-space:normal}
}
@media (prefers-color-scheme:dark){
  .crumbs,.crumbs a{color:#9a9a9a}
  .crumbs a:hover,.crumbs a:focus-visible,.crumbs [aria-current="page"]{color:#fff}
}

/* thaf:ai-disclosure - body-level authorship disclosure.
   Palette falls back to the site :root values so the block stays on-brand
   whether or not the custom properties are in scope on this stylesheet. */
.ai-disclosure{
  margin:2rem 0 0;
  padding:1rem 1.15rem;
  border:1px solid var(--line,#46535a);
  border-left:3px solid var(--amber,#e8be7a);
  background:var(--panel,#121a20);
  font-size:.95rem;
  line-height:1.6;
}
.ai-disclosure p{margin:0}
.ai-disclosure strong{color:var(--ink,#f5f3ea)}
.ai-disclosure a{color:inherit;text-decoration:underline}
.ai-disclosure a:hover,.ai-disclosure a:focus-visible{text-decoration-thickness:2px}
@media (max-width:560px){
  .ai-disclosure{padding:.85rem .9rem;font-size:.92rem;margin-top:1.5rem}
}

/* ============================================================
   READER EXPERIENCE (Day Shift 6)
   A single responsive headline treatment, applied by length tier
   rather than per-article correction. scripts/thaf-reader-experience.ps1
   sets .h1-lg (13-19 words) or .h1-xl (20+ words) on the article <h1></h1>
   from the headline's own word count, so a new article inherits the
   treatment without anyone editing this file again.

   Tiers, in the order a reader sees them:
     default (1-12 words)  58px desktop / 30px phone
     .h1-lg  (13-19 words) 52px desktop / 27px phone
     .h1-xl  (20+ words)   46px desktop / 25px phone
   Long headlines give up size and gain line spacing, so they stop
   filling the viewport while staying typographically calm.
   ============================================================ */
.article h1{line-height:1.06;text-wrap:pretty}
.article h1.h1-lg{font-size:clamp(32px,4.4vw,52px);line-height:1.08;letter-spacing:-.035em}
.article h1.h1-xl{font-size:clamp(30px,4vw,46px);line-height:1.1;letter-spacing:-.03em}
@media(max-width:420px){
  .article h1.h1-lg{font-size:27px;line-height:1.1}
  .article h1.h1-xl{font-size:25px;line-height:1.12}
}

/* Related coverage sits between the newsroom block and the footer nav.
   It had no styling, so the h2 fell back to the browser default (22.5px bold)
   and read as a different publication from the rest of the page. */
.related-title{margin:44px 0 12px;font:400 clamp(22px,3vw,30px)/1.15 var(--sans);letter-spacing:-.02em}

/* Share row: plain outbound links, no scripts, no tracking pixels. */
.share-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin:30px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.share-label{color:var(--muted);font:10px var(--mono);letter-spacing:.08em}
.share-row a{display:inline-flex;align-items:center;min-height:26px;color:var(--green);font:10px var(--mono);letter-spacing:.05em;text-transform:uppercase;text-decoration:none;border-bottom:1px solid transparent;padding-bottom:1px}
.share-row a:hover,.share-row a:focus-visible{color:#d7f0dc;border-bottom-color:currentColor}

/* Breadcrumb contrast. #6b6b6b on #0b1014 measured 3.59:1 — below the 4.5:1
   AA floor for 11-12px text. Worse, [aria-current="page"] was #111, which on
   this background measured about 1.05:1: the current page name was invisible
   for every reader whose OS was not in dark mode. Both are fixed here, and the
   dark-mode block is reconciled so the two modes agree instead of diverging. */
.crumbs,.crumbs a{color:#93a0a7}
.crumbs a:hover,.crumbs a:focus-visible{color:var(--ink);border-bottom-color:currentColor}
.crumbs [aria-current="page"]{color:var(--ink)}
@media (prefers-color-scheme:dark){
  .crumbs,.crumbs a{color:#93a0a7}
  .crumbs a:hover,.crumbs a:focus-visible,.crumbs [aria-current="page"]{color:var(--ink)}
}

/* Day Shift 8: what the FOR HUMAN CONSUMPTION block is, and is not. */
.hfc .hfc-note{
  margin:0 0 1rem;
  font-size:.82rem;
  letter-spacing:.02em;
  text-transform:none;
  color:var(--muted, #6b6b6b);
  border-left:3px solid var(--amber, #d99a2b);
  padding-left:.7rem;
}