/* The news in the fund page's design. Only the tokens and the component shapes of fund.css are used here:
   no colour, font, gradient, shadow or shape of its own (one rule takes the template's film shadow
   away). Where a rule below says "as .am-xxx" it repeats that component's declarations for a part of a
   post that has a different name.

   Every rule is scoped under the parts of a news page (.fn-head, .fn-photo, .article of a post; .hero-vid,
   .news-grid, .xlink of the index), so this file can be linked from any page without touching anything
   that is not a news page.

   Load order: a few rules here have the same specificity as a rule of fund.css and win by coming later,
   so this file must be linked after fund.css (the news pages are, and a test holds it). The rules that
   keep a block visible do not depend on order: they win by specificity. */

/* Compatibility block: the old posts carried inline styles such as color:var(--lime); these names resolve
   to the fund palette so such styles would still read correctly on the light page. They are set on the
   post's own containers, not on :root, so they cannot reach another page. */
.fn-head,
.fn-photo,
.article,
.hero-vid,
.news-grid,
.xlink {
  --lime: var(--am-accent);
  --white: var(--am-dark);
  --gray-200: var(--am-text);
  --gray-300: var(--am-text);
  --gray-400: var(--am-text-muted);
  --gray-500: var(--am-text-muted);
  --bg: var(--am-bg);
  --bg-2: var(--am-bg-alt);
  --font-heading: var(--am-font);
  --font-mono: var(--am-font);
  --border-light: rgba(15, 16, 18, 0.1);
}

/* ── Post header ───────────────────────────────────────────
   Centred under the fixed nav. Kicker = .am-tag, title = .am-depth-title, dek = .am-depth-intro.
   --fn-nav-clearance is the space kept free above the header for the fixed nav (about 75px high today,
   plus air). If the nav grows taller, change this one number; a test checks that no text of a header
   is under the nav at 1440px and at 390px. */
.fn-head {
  --fn-nav-clearance: 120px;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--fn-nav-clearance) var(--am-gutter) 32px;
  text-align: center;
}

.fn-head .crumb {
  font-size: 12px;
  color: var(--am-text-muted);
  margin-bottom: 20px;
}

.fn-head .crumb a:hover {
  color: var(--am-accent);
}

/* The kicker lines are the .am-tag type. These four selectors are the only ones in this file that may set
   uppercase (a test holds the list). */
.fn-head .am-tag,
.fn-head .art-kick,
.article .card-drop .cd-label,
.article .film .fkick {
  display: block;
  font-size: 11px;
  font-weight: var(--am-fw-medium);
  letter-spacing: var(--am-letter-wider);
  text-transform: uppercase;
  color: var(--am-accent);
}

/* fund.css gives .am-tag a margin below; the header stacks its tag lines tightly instead. */
.fn-head .am-tag {
  margin-bottom: 0;
}

.fn-head .art-kick {
  margin-top: 14px;
}

.fn-head h1 {
  font-size: var(--am-h2);
  font-weight: var(--am-fw-light);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.1;
  color: var(--am-dark);
  margin: 20px 0;
}

.fn-head h1 .glow {
  color: var(--am-accent);
}

.fn-head .art-dek {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--am-text-muted);
  line-height: 1.75;
  max-width: 700px;
  margin-inline: auto;
}

.fn-head .art-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--am-text-muted);
}

.fn-head .art-meta .tag {
  color: var(--am-accent);
  font-weight: var(--am-fw-medium);
}

.fn-head .art-meta a {
  color: var(--am-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fn-head .art-meta a:hover {
  color: var(--am-accent-dim);
}

/* ── Header photo: the frame of .am-watch-frame, without its shadow ── */
.fn-photo {
  width: calc(100% - 2 * var(--am-gutter));
  max-width: 960px;
  margin: 8px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--am-dark);
}

.fn-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Body text: one 700px column ─────────────────────────── */
.article {
  padding: clamp(40px, 6vw, 64px) 0 24px;
}

.article .wrap {
  max-width: calc(700px + 2 * var(--am-gutter));
  margin: 0 auto;
  padding: 0 var(--am-gutter);
}

.article p {
  font-size: var(--am-body);
  line-height: 1.75;
  color: var(--am-text);
  margin-bottom: 1.2em;
}

.article p.lead {
  font-size: clamp(17px, 1.5vw, 20px);
}

.article strong {
  font-weight: var(--am-fw-medium);
  color: var(--am-dark);
}

/* Links in the text are .am-faq-link */
.article p a,
.article .art-list a,
.article .src-note a,
.article .art-fig figcaption a,
.article .film figcaption a,
.article .art-back a {
  color: var(--am-accent);
  font-weight: var(--am-fw-regular);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article p a:hover,
.article .art-list a:hover,
.article .src-note a:hover,
.article .art-fig figcaption a:hover,
.article .film figcaption a:hover,
.article .art-back a:hover {
  color: var(--am-accent-dim);
}

/* fund.js reveals a block once 12% of it is in view, which a wrapper taller than about seven screens
   never reaches, and with scripts off nothing is revealed at all. The text of a post is always shown. */
.article .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ── Numbered section heading: a hairline, .am-value-num, .am-value-bold ── */
.article .art-sub {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  margin: clamp(32px, 4vw, 48px) 0 20px;
  padding-top: clamp(20px, 2.5vw, 28px);
  border-top: 1px solid rgba(15, 16, 18, 0.1);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: var(--am-fw-medium);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.3;
  color: var(--am-dark);
}

.article .art-sub .n {
  font-size: var(--am-small);
  font-weight: var(--am-fw-medium);
  letter-spacing: 0.06em;
  color: var(--am-accent);
  padding-top: 4px;
}

/* ── Pull quote: light type, a hairline above and below, no box, no marks ── */
.article .pq {
  margin: 40px 0;
  padding: 28px 0;
  border-top: 1px solid rgba(15, 16, 18, 0.1);
  border-bottom: 1px solid rgba(15, 16, 18, 0.1);
  font-size: var(--am-h3);
  font-weight: var(--am-fw-light);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.35;
  color: var(--am-dark);
}

.article .pq.sm {
  font-size: clamp(17px, 1.8vw, 22px);
}

/* A pull quote has its own hairline below it; a section heading that follows takes no second one. */
.article .pq + .art-sub {
  border-top: 0;
  margin-top: 0;
}

/* ── List: no bullets, a hairline between items ──────────── */
.article .art-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.article .art-list li {
  padding: 14px 0;
  border-top: 1px solid rgba(15, 16, 18, 0.1);
  font-size: var(--am-body);
  line-height: 1.65;
  color: var(--am-text);
}

.article .art-list li:last-child {
  border-bottom: 1px solid rgba(15, 16, 18, 0.1);
}

/* ── Figures, films, charts ──────────────────────────────── */
.article .art-fig,
.article .art-film,
.article .film {
  margin: 8px 0 36px;
}

.article .art-fig picture,
.article .art-fig > img {
  display: block;
  max-width: 560px;
  margin-inline: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 16, 18, 0.07);
}

.article .art-fig picture img {
  display: block;
  width: 100%;
  height: auto;
}

.article .art-film video,
.article .film .fr {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--am-dark);
}

.article .film .fr video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.article .art-fig figcaption,
.article .art-film figcaption,
.article .film figcaption,
.article .card-drop figcaption {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--am-text-muted);
}

.article .art-fig figcaption b,
.article .art-film figcaption b,
.article .film figcaption b,
.article .card-drop figcaption b {
  font-weight: var(--am-fw-medium);
  color: var(--am-dark);
}

.article .art-fig figcaption span,
.article .art-film figcaption span {
  color: var(--am-text-muted);
}

.article .film .fkick,
.article .card-drop .cd-label {
  margin-bottom: 12px;
}

/* A chart is a card, the shape of .am-faq-card. At phone width the drawing keeps its 640px and the card
   scrolls sideways; the markup of a post cannot carry tabindex, so that scroll is reachable by touch and
   mouse only, not by keyboard. */
.article .art-fig .chart {
  display: block;
  width: 100%;
  padding: 12px 8px 6px;
  border: 1px solid rgba(15, 16, 18, 0.07);
  border-radius: var(--am-card-r);
  background: var(--am-bg);
  overflow-x: auto;
}

.article .art-fig .chart .tone-chart {
  display: block;
  width: 100%;
  height: auto;
  min-width: 640px;
}

/* The chart of "40 Days" was drawn in lime, teal and pale grey for a near-black page. Its labels are drawn
   at 9.5 to 13 units in a 1000-unit-wide picture, so they render at about 7px on the page, exactly as on
   the old live site; the post's markup and so the chart's geometry are not ours to change.

   Rules here answer the colours by attribute, so no colour is written in this file. A CSS rule beats an
   SVG presentation attribute (it cannot beat a style="" attribute; a test checks the finished page for
   that). Anything drawn with a colour not named below, and the drawn colour of any future chart, falls to
   the muted grey by default; "none" is never overridden. The default sits in :where() so that the named
   rules after it win. */
.article .tone-chart :where([stroke]:not([stroke="none" i])) {
  stroke: var(--am-text-muted);
}

.article .tone-chart :where([fill]:not([fill="none" i])) {
  fill: var(--am-text-muted);
}

.article .tone-chart text {
  font-family: var(--am-font);
  fill-opacity: 1;
}

/* Blue labels sit on the tinted band as well as on the card; --am-accent-dim keeps every one of them over
   4.5 to 1 on both. */
.article .tone-chart text[fill*="c5e000" i] {
  fill: var(--am-accent-dim);
}

.article .tone-chart line[stroke*="c5e000" i] {
  stroke: var(--am-accent);
}

.article .tone-chart rect[fill*="c5e000" i] {
  fill: var(--am-accent);
}

.article .tone-chart line[stroke*="ffffff" i] {
  stroke: var(--am-dark);
}

/* ── Number rows and small card groups: the shape of .am-faq-card ── */
.article .stat4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 8px 0 28px;
}

.article .stat4 .c,
.article .card-drop picture {
  border: 1px solid rgba(15, 16, 18, 0.07);
  border-radius: var(--am-card-r);
  background: var(--am-bg);
}

.article .stat4 .c {
  padding: clamp(18px, 2vw, 24px);
}

.article .stat4 .v {
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: var(--am-fw-medium);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.3;
  color: var(--am-dark);
}

.article .stat4 .l {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--am-text-muted);
}

.article .card-drop {
  margin: 44px 0 10px;
}

.article .card-drop .cd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.article .card-drop picture {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.article .card-drop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Source note and sign-off ────────────────────────────── */
.article .src-note {
  margin: 36px 0 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 16, 18, 0.1);
  font-size: 13px;
  line-height: 1.65;
  color: var(--am-text-muted);
}

.article p.signoff {
  margin-top: 14px;
  font-style: italic;
  color: var(--am-text-muted);
}

/* ── Closing call to action: the shape of .am-depth-closing on --am-bg-alt ── */
.article .art-cta {
  margin: 36px 0 8px;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px);
  text-align: center;
  background: var(--am-bg-alt);
  border-radius: var(--am-card-r);
}

.article .art-cta h2 {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: var(--am-fw-light);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.2;
  color: var(--am-dark);
  margin-bottom: 16px;
}

.article .art-cta p {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--am-text);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 24px;
}

.article .art-cta .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Buttons: .am-btn with .am-btn-filled and .am-btn-outline */
.article .art-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--am-font);
  font-size: 14px;
  font-weight: var(--am-fw-medium);
  padding: 12px 28px;
  border-radius: var(--am-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--am-duration) var(--am-ease),
              color var(--am-duration) var(--am-ease),
              border-color var(--am-duration) var(--am-ease),
              transform var(--am-duration) var(--am-ease);
}

.article .art-cta .btn:hover {
  transform: translateY(-1px);
}

.article .art-cta .btn-primary {
  background: var(--am-accent);
  color: var(--am-bg);
  border-color: var(--am-accent);
}

.article .art-cta .btn-primary:hover {
  background: var(--am-accent-dim);
  border-color: var(--am-accent-dim);
}

.article .art-cta .btn-ghost {
  background: transparent;
  color: var(--am-dark);
  border-color: rgba(15, 16, 18, 0.25);
}

.article .art-cta .btn-ghost:hover {
  background: var(--am-dark);
  color: var(--am-bg);
  border-color: var(--am-dark);
}

.article .art-back {
  margin-top: 36px;
  font-size: 14px;
}

/* ── Phones: one column, nothing wider than the screen ──────── */
@media (max-width: 640px) {
  .article .stat4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .article .art-sub {
    grid-template-columns: 36px 1fr;
    gap: 12px;
  }

  .article .art-cta .btn {
    white-space: normal;
    text-align: center;
  }
}

/* ── The index: the film, the cards, the cross-link ──────────
   The film's frame is .am-watch-frame itself (the markup carries the class). The cards are the shape of
   .am-depth-card with the picture on top; the pictures carry no text, so nothing sits on a photograph. */
.hero-vid {
  width: calc(100% - 2 * var(--am-gutter));
  max-width: 960px;
  margin: 8px auto 0;
}

.hero-vid .am-tag {
  margin-bottom: 12px;
}

/* The film's frame, without its shadow: the shadow was drawn for the template's dark band. */
.hero-vid .am-watch-frame {
  box-shadow: none;
}

.hero-vid figcaption {
  margin-top: 14px;
  font-size: var(--am-small);
  line-height: 1.65;
  color: var(--am-text-muted);
}

.hero-vid figcaption b {
  font-weight: var(--am-fw-medium);
  color: var(--am-dark);
}

.hero-vid figcaption a {
  color: var(--am-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-vid figcaption a:hover {
  color: var(--am-accent-dim);
}

/* The cards are always shown, never faded or moved, so scripts off or a tall window leave nothing hidden.
   The second selector out-ranks fund.css's .reveal.is-visible, which would leave a matrix transform. */
.news-grid .reveal,
.news-grid .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  width: calc(100% - 2 * var(--am-gutter));
  max-width: var(--am-max-w);
  margin: clamp(40px, 5vw, 64px) auto 0;
}

.news-grid:last-child {
  margin-bottom: clamp(64px, 8vw, 112px);
}

.news-grid .news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--am-bg);
  border: 1px solid rgba(15, 16, 18, 0.06);
  border-radius: var(--am-card-r);
  transition: border-color var(--am-duration) var(--am-ease);
}

.news-grid .news-card:hover {
  border-color: rgba(15, 16, 18, 0.25);
}

.news-grid .nc-media,
.news-grid .nc-media picture {
  display: block;
}

.news-grid .nc-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* The card's label sits under the picture, in the muted small type of the cards' own text. */
.news-grid .nc-tag {
  display: block;
  padding: clamp(18px, 2vw, 24px) clamp(24px, 3vw, 36px) 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--am-text-muted);
}

.news-grid .nc-tag b {
  font-weight: var(--am-fw-medium);
  color: var(--am-dark);
}

.news-grid .nc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 8px clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px);
}

/* The date: .am-depth-num */
.news-grid .nc-kick {
  display: inline-block;
  font-size: var(--am-small);
  font-weight: var(--am-fw-medium);
  letter-spacing: 0.06em;
  color: var(--am-accent);
  margin-bottom: 10px;
}

/* The headline: the h3 of .am-depth-card */
.news-grid .news-card h2 {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: var(--am-fw-medium);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.3;
  color: var(--am-dark);
  margin: 0 0 16px;
  overflow-wrap: break-word;
}

.news-grid .news-card p {
  font-size: clamp(14px, 1vw, 15px);
  color: var(--am-text-muted);
  line-height: 1.75;
  margin: 0 0 12px;
}

/* The link text: .am-faq-link */
.news-grid .nc-link {
  margin-top: auto;
  color: var(--am-accent);
  font-weight: var(--am-fw-regular);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-grid .news-card:hover .nc-link {
  color: var(--am-accent-dim);
}

/* The cross-link block: a card of the same shape, one row */
.xlink {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: calc(100% - 2 * var(--am-gutter));
  max-width: var(--am-max-w);
  margin: clamp(24px, 3vw, 40px) auto clamp(64px, 8vw, 112px);
  padding: clamp(18px, 2vw, 24px) clamp(24px, 3vw, 36px);
  background: var(--am-bg);
  border: 1px solid rgba(15, 16, 18, 0.06);
  border-radius: var(--am-card-r);
  transition: border-color var(--am-duration) var(--am-ease);
}

/* Always shown, as the cards are. The second selector (0,3,0) out-ranks fund.css's .reveal.is-visible (0,2,0);
   the first (0,2,0) is the same shape as the cards' pair. */
.xlink.reveal,
.xlink.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.xlink:hover {
  border-color: rgba(15, 16, 18, 0.25);
}

.xlink .xl-k {
  font-size: var(--am-small);
  font-weight: var(--am-fw-medium);
  letter-spacing: 0.06em;
  color: var(--am-accent);
  margin-bottom: 6px;
}

.xlink .xl-t {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: var(--am-fw-medium);
  letter-spacing: var(--am-letter-tight);
  line-height: 1.3;
  color: var(--am-dark);
}

.xlink .xl-go {
  color: var(--am-accent);
  font-weight: var(--am-fw-regular);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.xlink:hover .xl-go {
  color: var(--am-accent-dim);
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}
