/* Ardenwell — Articles (list + article pages)
   Loaded after ../styles.css, so it reuses the site's tokens, header, footer, labels and buttons. */

.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--brass); }
.mobile-nav a[aria-current="page"] { color: var(--brass); }

/* ---------- Page header (shorter than the home hero) ---------- */
.page-hero { position: relative; overflow: hidden; padding: calc(76px + clamp(48px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.page-hero .page-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(to right, transparent 30%, #000 75%); mask-image: linear-gradient(to right, transparent 30%, #000 75%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); max-width: 16em; }
.page-hero .hero-lede { max-width: 38em; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 30px; font-size: .85rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .25s, color .25s; }
.crumbs a:hover { color: var(--ink); border-color: var(--line-strong); }
.crumbs .sep { color: var(--line-strong); }

/* ---------- Article list ---------- */
.article-list { display: grid; gap: 0; border-top: 1px solid var(--line-strong); margin-top: 6px; }
.article-card { border-bottom: 1px solid var(--line); }
.ac-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px 56px; align-items: center; padding: clamp(28px, 3.4vw, 44px) 0; text-decoration: none; color: inherit; }
.ac-art { position: relative; aspect-ratio: 4 / 3; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; }
.ac-art svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--green); }
.ac-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--ink-3); margin-bottom: 14px; }
.ac-topic { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--brass); }
.ac-body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; transition: color .3s; }
.ac-body p.ac-excerpt { margin-top: 14px; color: var(--ink-2); max-width: 38em; }
.ac-more { display: inline-flex; gap: 8px; margin-top: 22px; font-size: .92rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: border-color .25s; }
.ac-link:hover h3 { color: var(--green); }
.ac-link:hover .ac-more { border-color: var(--ink); }
.ac-art .ac-roots path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.65, 0, .35, 1) .3s; }
.article-card.is-visible .ac-art .ac-roots path { stroke-dashoffset: 0; }

/* ---------- Article page ---------- */
.read-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 45; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; }

.article-head h1 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); max-width: 18em; }
.article-lede { max-width: 36em; margin-top: 24px; font-family: var(--font-serif); font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.5; color: var(--ink); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-3); max-width: 46rem; }
.article-meta strong { font-weight: 500; color: var(--ink-2); }

.article-layout { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr); gap: 32px 64px; align-items: start; padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(56px, 7vw, 104px); }
.toc { position: sticky; top: 104px; font-size: .88rem; }
.toc .label { margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-left: 1px solid var(--line); }
.toc a { display: block; padding-left: 14px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--ink-3); transition: color .25s, border-color .25s; }
.toc a:hover, .toc a.is-current { color: var(--ink); border-color: var(--green); }

.article-body { max-width: 44rem; font-size: 1.08rem; line-height: 1.78; color: var(--ink-2); }
.article-body > * + * { margin-top: 1.15em; }
.article-body h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1.15; color: var(--ink); margin-top: 2.2em; scroll-margin-top: 100px; }
.article-body h2:first-child { margin-top: 0; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol { padding: 0; list-style: none; display: grid; gap: .7em; }
.article-body ul li { position: relative; padding-left: 26px; }
.article-body ul li::before { content: ""; position: absolute; left: 0; top: .9em; width: 12px; height: 1px; background: var(--brass); }
.article-body ol { counter-reset: item; }
.article-body ol li { position: relative; padding-left: 40px; counter-increment: item; }
.article-body ol li::before { content: counter(item, decimal-leading-zero); position: absolute; left: 0; top: .1em; font-size: .78rem; font-weight: 600; letter-spacing: .1em; color: var(--brass); }
.article-body blockquote { margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--green); font-family: var(--font-serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; color: var(--ink); }
.takeaways { margin-top: 2.4em !important; padding: 28px 30px; background: var(--bg-alt); border-top: 2px solid var(--green); }
.takeaways .label { margin-bottom: 14px; }
.takeaways ul { gap: .55em; }
.article-note { font-size: .86rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 2.4em !important; }

.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 0 0; border-top: 1px solid var(--line-strong); margin-top: 2.6em !important; }
.article-foot a { font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: border-color .25s; }
.article-foot a:hover { border-color: var(--ink); }
.tags-inline { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags-inline li { font-size: .78rem; padding: 5px 11px; border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Reference documents (the control blueprint) ---------- */
/* the control path: four fixed steps, the human ones marked in brass */
.article-body .bp-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 1.8em; border-top: 1px solid var(--line-strong); }
.article-body .bp-path li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px 0 0; }
.article-body .bp-path li::before { content: ""; position: absolute; left: 0; top: -6px; width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--green); background: var(--green); }
.article-body .bp-path li.bp-human::before { border-color: var(--brass); background: var(--brass); }
.bp-who { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.bp-who b { font-weight: 600; color: var(--brass); margin-right: 8px; }
/* numbered parts of a reference document: "01" above the heading, as on the home page's steps */
.h-num { display: block; margin-bottom: 8px; font-family: var(--font-sans); font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--brass); }
.toc-num { margin-right: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; color: var(--brass); }
.bp-human .bp-who { color: var(--brass); }
.article-body .bp-path strong { font-family: var(--font-display); font-weight: 400; font-size: 1.22rem; line-height: 1.2; }
.bp-path li > span:last-child { font-size: .9rem; line-height: 1.55; color: var(--ink-2); }
.bp-note { font-size: .88rem; color: var(--ink-3); }

/* tables: hairline rules, captions as labels; wide ones scroll inside their own frame on phones */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 1.6em !important; }
.article-body table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
.article-body caption { caption-side: top; text-align: left; padding: 0 0 10px; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.article-body thead th { font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); border-top: 1px solid var(--line-strong); border-bottom-color: var(--line-strong); }
.article-body tbody th { font-weight: 600; color: var(--ink); }
.article-body .t-scores td { font-variant-numeric: tabular-nums; }
.article-body .t-scores td:nth-last-child(2) { font-weight: 600; color: var(--ink); }
.article-body .t-scores td:last-child { white-space: nowrap; }

/* audit record examples */
.article-body .record { margin: 1.8em 0 0; border: 1px solid var(--line); border-top: 2px solid var(--green); background: var(--bg-alt); }
.record figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.record-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; letter-spacing: .02em; color: var(--ink); }
.record-tag { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.record dl { margin: 0; padding: 4px 20px 10px; }
.record dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 2px 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.record dl div:last-child { border-bottom: 0; }
.record dt { padding-top: .25em; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.record dd { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--ink-2); }
.article-body a:not(.ac-link) { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color .25s; }
.article-body a:not(.ac-link):hover { text-decoration-color: var(--ink); }

:root[data-motion="off"] .ac-art .ac-roots path { transition: none; stroke-dashoffset: 0; }

@media (max-width: 860px) {
  .ac-link { grid-template-columns: 1fr; }
  .ac-art { aspect-ratio: 16 / 9; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }   /* minmax(0, …): wide tables scroll in their frame instead of widening the page */
  .toc { position: static; }
  .article-body .bp-path { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; border-top: 0; }
  .article-body .bp-path li { border-top: 1px solid var(--line-strong); }
  .record dl div { grid-template-columns: 1fr; }
  .page-hero .page-canvas { -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 90%); mask-image: linear-gradient(to bottom, transparent 40%, #000 90%); opacity: .6; }
}
