/* nine.zero — Perspectives article (Paper: 9.0 New Site, "Perspectives · Article").
   Generic for every note: title block, audio, at-a-glance, sticky contents rail, 760px body,
   numbered serif subheads, ruled pull quotes, "Fig. N" mono diagrams, sources, author, CTA, related.
   Column geometry: rail 240px + 64px gap + body 760px inside the 1280px .wrap. */

.article-page { --article-rail: 240px; --article-gap: 64px; --article-body: 760px; }

/* Shared rail label ("AT A GLANCE", "ABOUT THE AUTHOR") */
.rail-label {
  width: var(--article-rail); flex: none;
  font-family: var(--np-font-mono); font-size: 12px; line-height: 18px;
  color: var(--np-text-2);
}
.rail-label--green { color: #416556; }

/* ---------- Title block ---------- */
.article-hero { border-bottom: 1px solid var(--np-foot-hair); padding: 96px 0 56px; }
.article-hero .wrap { position: relative; display: flex; flex-direction: column; gap: 28px; }
.article-hero__eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: var(--np-font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--np-dark-muted);
}
.article-hero__eyebrow .slash { color: var(--np-lime); }
.article-hero__eyebrow .slash:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-hero h1 { max-width: 1040px; font-size: 88px; line-height: 88px; letter-spacing: -0.02em; color: var(--np-dark-text); }
.article-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-top: 8px; }
.article-hero__standfirst { max-width: 720px; font-size: 20px; line-height: 32px; color: var(--np-dark-muted); }
.article-hero__meta {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  font-family: var(--np-font-mono); font-size: 11px; line-height: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--np-dark-muted); text-align: right;
}
.article-hero__meta b { font-weight: 400; color: var(--np-dark-text); }

/* ---------- Audio ---------- */
.article-audio { border-bottom: 1px solid var(--np-hair); padding: 28px 0; }
.article-audio .wrap { display: flex; flex-direction: column; gap: 16px; padding-left: calc(var(--article-rail) + var(--article-gap)); }
.article-audio__label { font-size: 17px; line-height: 26px; color: var(--np-ink); }
.article-audio__player { display: flex; align-items: center; gap: 16px; width: var(--article-body); max-width: 100%; }
.article-audio__play {
  width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--np-ink);
  display: grid; place-items: center;
}
.article-audio__play:hover { background: var(--np-ink-2); }
.article-audio__track { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.article-audio__bar { --p: 0; position: relative; display: flex; align-items: center; height: 12px; cursor: pointer; }
.article-audio__knob { position: absolute; left: calc(var(--p) * (100% - 12px)); top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--np-ink); transition: left .1s linear; }
.article-audio__line { position: relative; flex: 1 1 auto; height: 3px; background: #d8dbd5; overflow: hidden; }
.article-audio__line::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: var(--np-ink); }
.article-audio__play svg path { transition: d .1s; }
.article-audio.is-playing .article-audio__play svg path { d: path("M5 3H8.5V17H5ZM11.5 3H15V17H11.5Z"); }
.article-audio__el { display: none; }
.article-audio__time { font-family: var(--np-font-mono); font-size: 12px; line-height: 18px; color: var(--np-text-2); }
.article-audio__speed {
  min-width: 56px; height: 44px; flex: none; padding: 0 12px; border-radius: 24px; border: 1px solid #777c82;
  font-size: 14px; line-height: 18px; color: var(--np-ink);
}
.article-audio__speed:hover { border-color: var(--np-ink); }
.article-audio__credit { font-size: 13px; line-height: 20px; color: var(--np-text-2); }

/* ---------- At a glance ---------- */
.article-glance { background: #e7eedf; padding: 48px 0; }
.article-glance .wrap { display: flex; gap: var(--article-gap); }
.article-glance__body { width: var(--article-body); max-width: 100%; display: flex; flex-direction: column; gap: 18px; }
.article-glance__title { font-size: 36px; line-height: 42px; letter-spacing: 0; color: var(--np-ink); }
.article-glance__summary { font-size: 18px; line-height: 29px; color: var(--np-ink); }
.article-glance__audience { font-size: 16px; line-height: 26px; color: #4f555c; }

/* ---------- Body: rail + content ---------- */
.article-body { padding: 64px 0 96px; }
.article-body .wrap { position: relative; display: flex; align-items: flex-start; gap: var(--article-gap); }

.rail {
  width: var(--article-rail); flex: none;
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 12px;
}
.rail__toc, .rail__toc ol, .rail__share { display: flex; flex-direction: column; gap: 14px; }
.rail li { display: flex; }
.rail summary, .rail__heading {
  font-family: var(--np-font-mono); font-size: 11px; line-height: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--np-ink);
}
.rail summary { list-style: none; cursor: default; pointer-events: none; }
.rail summary::-webkit-details-marker { display: none; }
.rail a, .rail__copy {
  display: inline-flex; gap: 6px; text-align: left;
  font-family: var(--np-font-mono); font-size: 11px; line-height: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--np-text-2);
  transition: color .15s ease;
}
.rail a:hover, .rail__copy:hover, .rail a[aria-current] { color: var(--np-ink); }
.rail__share { margin-top: 16px; }

.article-content { width: var(--article-body); max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.article-content > p { font-size: 18px; line-height: 31px; color: var(--np-ink); }
.article-content a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Numbered serif subheads */
.article-content > h2 {
  display: flex; align-items: flex-start;
  padding-top: 16px;
  font-size: 40px; line-height: 44px; letter-spacing: 0; color: var(--np-ink);
  scroll-margin-top: 24px;
}
.article-content > h2 .idx {
  width: 72px; flex: none; padding-top: 12px;
  font-family: var(--np-font-mono); font-size: 12px; line-height: 14px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--np-ink);
}

/* Pull quotes */
.pull { margin: 0; padding: 8px 0 8px 28px; border-left: 2px solid var(--np-ink); }
.pull p { max-width: 660px; font-size: 34px; line-height: 40px; letter-spacing: 0; color: var(--np-ink); }

/* "Fig. N" diagram blocks */
.fig { border-radius: 14px; overflow: hidden; background: var(--np-ground); border: 1px solid var(--np-hair); }
.fig figcaption {
  padding: 10px 20px; border-bottom: 1px solid var(--np-hair);
  font-family: var(--np-font-mono); font-size: 10px; line-height: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--np-text-2);
}
.fig pre {
  margin: 0; padding: 20px 24px; overflow-x: auto;
  font-family: var(--np-font-mono); font-size: 13px; line-height: 20px;
  color: var(--np-text-2);
}

/* Sources */
.article-sources { padding-top: 32px; border-top: 1px solid #d8d9d6; display: flex; flex-direction: column; gap: 20px; }
.article-sources__label { font-family: var(--np-font-mono); font-size: 12px; line-height: 18px; font-weight: 400; color: var(--np-text-2); }
.article-sources__intro { font-size: 16px; line-height: 26px; color: #4f555c; }
.article-sources ul { display: flex; flex-direction: column; }
.article-sources li { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--np-hair); }
.article-sources li a {
  align-self: flex-start;
  font-size: 17px; line-height: 25px; color: #294c3c;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-position: from-font;
}
.article-sources li a:hover { color: var(--np-ink); }
.article-sources li p { font-size: 15px; line-height: 24px; color: #4f555c; }

/* ---------- Author and CTA ---------- */
.article-author { padding: 64px 0; }
.article-author .wrap { display: flex; flex-direction: column; gap: 40px; }
.article-author__row, .article-cta { display: flex; gap: var(--article-gap); }
.article-author__body, .article-cta__body { width: var(--article-body); max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.article-author__name { font-size: 42px; line-height: 46px; letter-spacing: 0; color: var(--np-ink); }
.article-author__bio { font-size: 16px; line-height: 26px; color: #4f555c; }
.article-cta { padding-top: 32px; border-top: 1px solid #d8d9d6; }
.article-cta__body { gap: 20px; }
.article-cta__title { font-size: 36px; line-height: 42px; letter-spacing: 0; color: var(--np-ink); }
.article-cta__text { font-size: 17px; line-height: 27px; color: #4f555c; }
.article-cta__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.article-cta .btn { padding: 14px 22px; font-size: 15px; line-height: 22px; font-weight: 400; gap: 6px; }
.article-cta .btn--ghost { border-color: var(--np-text-2); }

/* ---------- Related notes ---------- */
.article-related { border-top: 1px solid var(--np-hair); padding: 64px 0 96px; }
.article-related__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--np-hair);
}
.article-related__head h2 {
  font-family: var(--np-font-mono); font-size: 11px; line-height: 14px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400;
  color: var(--np-ink);
}
.article-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 24px; }
.related-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  height: 100%; padding: 28px; border-radius: var(--np-radius-card); border: 1px solid var(--np-hair);
  transition: border-color .15s ease;
}
.related-card:hover { border-color: var(--np-muted); }
.related-card__meta {
  font-family: var(--np-font-mono); font-size: 11px; line-height: 14px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--np-text-2);
}
.related-card__title { font-size: 32px; line-height: 36px; letter-spacing: 0; color: var(--np-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-page { --article-rail: 180px; --article-gap: 40px; --article-body: 100%; }
  .article-hero h1 { font-size: 64px; line-height: 66px; }
  .article-content { flex: 1 1 0; }
}

@media (max-width: 900px) {
  .article-page { --article-rail: 100%; }
  .rail-label { width: auto; }

  .article-hero { padding: 36px 0; }
  .article-hero .wrap { gap: 24px; }
  .article-hero h1 { font-size: 44px; line-height: 48px; }
  .article-hero h1 br { display: none; }
  .article-hero__row { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 0; }
  .article-hero__standfirst { font-size: 17px; line-height: 28px; }
  .article-hero__meta { align-items: flex-start; text-align: left; }

  .article-audio { padding: 24px 0; }
  .article-audio .wrap { padding-left: 0; }

  .article-glance { padding: 32px 0; }
  .article-glance .wrap { flex-direction: column; gap: 20px; }
  .article-glance .rail-label { color: var(--np-ink); }
  .article-glance__title { font-size: 34px; line-height: 39px; }
  .article-glance__summary { font-size: 17px; line-height: 28px; }

  .article-body { padding: 32px 0 64px; }
  .article-body .wrap { flex-direction: column; gap: 24px; }
  .rail { position: static; width: 100%; padding-top: 0; gap: 0; }
  .rail__toc { gap: 0; border-bottom: 1px solid #777c82; }
  .rail summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px;
    font-family: var(--np-font-body); font-size: 16px; line-height: 20px; letter-spacing: 0; text-transform: none;
    cursor: pointer; pointer-events: auto;
  }
  .rail summary::after { content: "＋"; font-size: 16px; }
  .rail__toc[open] summary::after { content: "−"; }
  .rail__toc ol { gap: 12px; padding: 4px 0 20px; }
  .rail__share { display: none; }

  .article-content { gap: 20px; }
  .article-content > p { font-size: 17px; line-height: 28px; }
  .article-content > h2 { font-size: 32px; line-height: 36px; padding-top: 12px; }
  .article-content > h2 .idx { width: 48px; padding-top: 8px; }
  .pull { padding: 0; border-left: 0; }
  .pull p { font-size: 32px; line-height: 38px; }
  .fig pre { padding: 16px 20px; font-size: 12px; line-height: 18px; }

  .article-author { padding: 32px 0 48px; }
  .article-author .wrap { gap: 32px; }
  .article-author__row, .article-cta { flex-direction: column; gap: 20px; }
  .article-author__name { font-size: 36px; line-height: 40px; }
  .article-cta__title { font-size: 30px; line-height: 36px; }
  .article-cta .btn { width: 100%; }

  .article-related { padding: 40px 0 64px; }
  .article-related__grid { grid-template-columns: 1fr; }
  .related-card { padding: 24px; gap: 24px; }
  .related-card__title { font-size: 28px; line-height: 32px; }
}
