/* ============================================================
   Article detail page — extends editorial.css
   ============================================================ */

/* Article header */
.a-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--rule);
  position: relative; overflow: hidden;
}
.a-hero-numeral {
  position: absolute;
  top: 40px; right: 40px;
  font-family: var(--display); font-style: italic;
  font-size: 260px; font-weight: 300; line-height: 1;
  color: var(--accent); opacity: .08; pointer-events: none;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -.04em;
}
.a-breadcrumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.a-breadcrumb a { color: var(--ink-2); text-decoration: none; }
.a-breadcrumb a:hover { color: var(--accent); }
.a-breadcrumb .sep { margin: 0 10px; color: var(--rule-2); }
.a-breadcrumb .here { color: var(--accent); }

.a-tag-row {
  display:flex; gap: 12px; align-items: center; margin-bottom: 28px;
}
.a-tag-pill {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 10px; border:1px solid var(--ink); color: var(--ink); background: var(--paper);
}
.a-tag-row .meta {
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em;
}
.a-tag-row .meta .sep { margin: 0 8px; color: var(--rule-2); }

.a-headline {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1.04; letter-spacing: -.025em;
  margin: 0 0 28px;
  max-width: 18ch;
}
.a-headline em { font-style: italic; color: var(--accent); font-variation-settings: 'opsz' 144; display: inline-block; transform: skewX(calc(-1 * var(--italic-skew))); }

.a-deck {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.5; color: var(--ink-2);
  max-width: 42ch;
  font-variation-settings: 'opsz' 144;
}

.a-byline {
  display:flex; align-items: center; gap: 16px;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--rule);
  max-width: 700px;
}
.a-byline-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--paper);
  display:grid; place-items:center;
  font-family: var(--display); font-weight: 600; font-size: 16px;
  flex-shrink: 0;
}
.a-byline-text { flex: 1; }
.a-byline-name { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.005em; }
.a-byline-role { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.a-byline-share { display:flex; gap: 6px; }
.a-byline-share button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
  display:grid; place-items: center;
  font-family: var(--mono); font-size: 12px;
}
.a-byline-share button:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* Full-width hero banner (top of article page, featured image) */
.a-hero-banner {
  width: 100%; overflow: hidden; line-height: 0;
}
.a-hero-image {
  display: block;
  max-width: 100%; max-height: 360px;
  width: auto; height: auto;
  margin: 0 auto;
}

/* Article cover — WP featured image (inline, legacy) */
.a-cover-img {
  margin: 40px 0 0;
  position: relative; overflow: hidden;
  border-radius: 6px;
  border-bottom: 1px solid var(--rule);
}
.a-cover-image {
  display: block; width: 100%; height: auto;
  max-height: 520px; object-fit: cover;
}
.a-cover-img .caption {
  position: absolute; left: 24px; bottom: 18px; right: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: #fff;
  display:flex; justify-content: space-between;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
@media (max-width: 768px) {
  .a-cover-img .caption { left: 16px; right: 16px; bottom: 12px; font-size: 9px; }
}

/* Article cover — decorative (JS-rendered, no featured image) */
.a-cover {
  margin: 60px 0 0; aspect-ratio: 24/10;
  background: var(--bg-2); position: relative; overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.a-cover::before {
  content: ''; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 70% 80% at 70% 30%, var(--accent-soft), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 14px, var(--rule) 14px 15px);
}
.a-cover .glyph {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--display); font-style: italic; font-size: 260px;
  color: var(--accent); font-weight: 300; line-height: 1; letter-spacing: -.04em;
  opacity: .85;
  font-variation-settings: 'opsz' 144;
}
.a-cover .caption {
  position: absolute; left: 24px; bottom: 18px; right: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2);
  display:flex; justify-content: space-between;
}

/* ============================================================
   Body grid:  toc · column · margin
   ============================================================ */
.a-body-wrap {
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--rule);
}
.a-body-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 680px) 220px;
  justify-content: center;
  gap: 60px;
}

/* TOC */
.a-toc {
  position: sticky; top: 100px; align-self: start;
  font-size: 13px;
}
.a-toc-head {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
  display:flex; align-items: center; gap: 8px;
}
.a-toc-head::before { content:''; flex:0 0 18px; height:1px; background: var(--ink-2);}
.a-toc-list { display:flex; flex-direction: column; gap: 4px; }
.a-toc-list a {
  text-decoration: none; color: var(--ink-2);
  padding: 6px 0; padding-left: 12px;
  border-left: 2px solid var(--rule);
  transition: color .2s, border-color .2s;
  font-size: 13px; line-height: 1.4;
}
.a-toc-list a.h2 { padding-left: 12px; }
.a-toc-list a.h3 { padding-left: 24px; font-size: 12px; color: var(--muted); }
.a-toc-list a:hover { color: var(--accent); border-color: var(--accent); }
.a-toc-list a.on { color: var(--accent); border-color: var(--accent); font-weight: 500; }

/* Article body typography */
.a-body {
  font-family: var(--serif); font-size: 18px; line-height: 1.78; color: var(--ink);
  max-width: 680px;
}
.a-body > :first-child { margin-top: 0; }
.a-body p { margin: 0 0 1.35em; }
.a-body h1, .a-body h2, .a-body h3 {
  font-family: var(--display); letter-spacing: -.015em;
  line-height: 1.18; margin-top: 2.2em; margin-bottom: .55em;
}
.a-body h1 { font-size: 36px; font-weight: 400; }
.a-body h2 {
  font-size: 28px; font-weight: 500;
  padding-top: .5em;
  position: relative;
}
.a-body h2::before {
  content: counter(h2c, decimal-leading-zero); counter-increment: h2c;
  position: absolute; left: -110px; top: 1.05em;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--accent); font-weight: 400;
}
.a-body { counter-reset: h2c; }
.a-body h3 { font-size: 20px; font-weight: 600; margin-top: 1.8em; }
.a-body ul, .a-body ol { margin: 0 0 1.4em 1.5em; padding: 0; }
.a-body li { margin-bottom: .55em; }
.a-body li::marker { color: var(--accent); }
.a-body ol li::marker { font-family: var(--display); font-style: italic; font-weight: 600; }
.a-body strong { font-weight: 600; color: var(--ink); }
.a-body em { font-style: italic; font-family: var(--display); color: var(--ink); font-variation-settings: 'opsz' 144;}
.a-body a {
  color: var(--accent); text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%; background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size .2s;
}
.a-body a:hover { background-size: 100% 2px; }
.a-body code {
  font-family: var(--mono); font-size: .85em;
  background: var(--bg-2); padding: 2px 6px; border-radius: 3px;
  color: var(--ink);
}
.a-body pre {
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  background: var(--bg-2); padding: 20px 24px; border-radius: 6px;
  margin: 1.6em 0; overflow-x: auto;
  border-left: 3px solid var(--accent);
}
.a-body pre code { background: none; padding: 0; color: var(--ink-2); }
.a-body blockquote {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 26px; line-height: 1.4; letter-spacing: -.01em;
  color: var(--ink);
  margin: 1.8em -40px;
  padding: 8px 0 8px 40px;
  border-left: 3px solid var(--accent);
  font-variation-settings: 'opsz' 144;
}
.a-body blockquote p { margin: 0; }
.a-body hr {
  border: 0; height: 1px; background: var(--rule);
  margin: 2.4em 0;
}
.a-body img {
  width: 100%; margin: 1.6em 0;
  border-radius: 4px;
}

/* Aside / margin notes */
.a-aside {
  position: sticky; top: 100px; align-self: start;
}
.a-aside-card {
  font-size: 12px; color: var(--muted);
  padding: 20px 22px; background: var(--paper); border: 1px solid var(--rule);
  margin-bottom: 14px;
}
.a-aside-card .head { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; color: var(--ink-2);}
.a-aside-card .row { display:flex; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--rule); font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.a-aside-card .row:first-of-type { border-top: 0; }
.a-aside-card .row .v { color: var(--ink); }
.a-aside-progress {
  height: 4px; background: var(--bg-2); border-radius: 999px; overflow: hidden;
  margin-top: 14px;
}
.a-aside-progress .bar {
  height: 100%; background: var(--accent); width: 0;
  transition: width .15s linear;
}

/* End-of-article signature */
.a-end {
  margin: 60px 0 0;
  text-align: center;
}
.a-end .mark {
  font-family: var(--display); font-style: italic; font-size: 40px;
  color: var(--accent); line-height: 1;
  font-variation-settings: 'opsz' 144;
}
.a-end .text {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-top: 14px;
}

/* Tags / share row at end */
.a-tail {
  max-width: 680px;
  margin: 50px auto 0;
  padding-top: 28px; border-top: 1px solid var(--rule);
  display:flex; justify-content:space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.a-tail-tags { display:flex; gap: 6px; }
.a-tail-tag {
  font-family: var(--mono); font-size: 11px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2);
}
.a-tail-share { display:flex; gap: 6px; align-items: center; }
.a-tail-share span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.a-tail-share a {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--rule); display:grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink);
  text-decoration: none; transition: background .2s, color .2s;
}
.a-tail-share a:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* Author bio */
.a-author {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 60px 0;
}
.a-author-grid {
  display:grid; grid-template-columns: 100px 1fr auto; gap: 40px; align-items: center;
}
.a-author-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--accent); color: var(--paper);
  display:grid; place-items: center;
  font-family: var(--display); font-style: italic; font-weight: 400; font-size: 44px;
  font-variation-settings: 'opsz' 144;
}
.a-author-text h3 {
  font-family: var(--display); font-weight: 600; font-size: 26px;
  letter-spacing: -.01em; margin: 0 0 6px;
}
.a-author-text p {
  font-size: 15px; color: var(--ink-2); line-height: 1.6;
  margin: 0 0 12px; max-width: 60ch;
}
.a-author-text .links {
  display:flex; gap: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
}
.a-author-text .links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.a-author-text .links a:hover { color: var(--accent); border-color: var(--accent); }
.a-author-cta a {
  font-family: var(--display); font-style: italic; font-size: 18px;
  color: var(--accent); text-decoration: none;
  font-variation-settings: 'opsz' 144;
}
.a-author-cta a::after { content:' →'; font-style: normal; font-family: var(--mono); font-size: 14px; }

/* Read next */
.a-readnext { padding: 90px 0; border-bottom: 1px solid var(--rule); }
.a-readnext .sec-head { margin-bottom: 40px; }
.a-readnext-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.rn {
  display:flex; flex-direction: column; gap: 12px;
  padding: 28px; border: 1px solid var(--rule); background: var(--paper);
  cursor: pointer; transition: background .25s, border-color .25s;
  position: relative; text-decoration: none; color: inherit;
}
.rn:hover { background: var(--bg-2); border-color: var(--rule-2); }
.rn:hover .rn-title { color: var(--accent); }
.rn-dir { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.rn-title { font-family: var(--display); font-size: 22px; font-weight: 400; line-height: 1.25; letter-spacing: -.015em; margin: 0; transition: color .2s; }
.rn-excerpt { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; max-width: 50ch; }
.rn-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--rule); }

/* Article-not-found */
.a-notfound {
  padding: 200px 0; text-align: center;
}
.a-notfound h1 { font-family: var(--display); font-style: italic; font-size: 64px; color: var(--accent); margin: 0 0 12px; font-variation-settings: 'opsz' 144; }
.a-notfound p { color: var(--ink-2); margin-bottom: 24px; }
.a-notfound a { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; text-decoration: none; }

@media (max-width: 1080px) {
  .a-body-grid { grid-template-columns: minmax(0, 680px); justify-content: center; gap: 0; }
  .a-toc, .a-aside { display: none; }
  .a-body h2::before { display: none; }
  .a-body blockquote { margin: 1.6em 0; }
  .a-readnext-grid { grid-template-columns: 1fr; }
  .a-author-grid { grid-template-columns: 1fr; text-align: left; gap: 20px; }
  .a-cover { aspect-ratio: 16/9; }
  .a-hero-numeral { font-size: 180px; }
}
