@charset "utf-8";
/* ============================================================================
   HUE Legacy Ventures — The Wire
   A financial newspaper front page. Loaded on top of site.css, which owns the
   palette and the fonts; everything here is layout and editorial hierarchy.
   ========================================================================= */

:root {
  --wire-gap:    clamp(1.1rem, 2.2vw, 2rem);
  --wire-rule:   1px solid var(--rule);
  --wire-hair:   1px solid var(--rule-soft);
  /* A newspaper wants a tighter measure than the essay pages. */
  --wire-page:   82rem;
}

/* ------------------------------------------------------------------ masthead */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: clamp(1.6rem, 4vw, 2.8rem) 0 0;
  margin-bottom: 0;
}
.masthead__wrap { max-width: var(--wire-page); margin-inline: auto; padding-inline: var(--gutter); }

.masthead__top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.4rem;
  padding-bottom: .7rem;
  border-bottom: var(--wire-hair);
  font-family: var(--mono);
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}
.masthead__top .spacer { margin-left: auto; }
.masthead__live { display: inline-flex; align-items: center; gap: .45rem; }
.masthead__live::before {
  content: ""; width: .4rem; height: .4rem; border-radius: 50%;
  background: var(--c10); flex: none;
}

.masthead__name {
  font-family: var(--display);
  font-size: calc(clamp(3.2rem, 11vw, 7.5rem) * var(--scale-display, 1));
  line-height: .92;
  letter-spacing: .01em;
  text-align: center;
  margin: clamp(1rem, 3vw, 2rem) 0 .4rem;
}
.masthead__standfirst {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto clamp(1.2rem, 3vw, 1.8rem);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* section rail */
.masthead__nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0;
  border-top: var(--wire-rule);
  border-bottom: 2px solid var(--ink);
}
.masthead__nav a {
  font-family: var(--mono);
  font-size: .655rem; letter-spacing: .17em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  padding: .72rem clamp(.6rem, 1.6vw, 1.15rem);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a[aria-current] { color: var(--ink); border-bottom-color: var(--c10); }
.masthead__nav .count { color: var(--faint); margin-left: .35rem; font-size: .9em; }

/* ------------------------------------------------------------------- layout */
.wirepage { max-width: var(--wire-page); margin-inline: auto; padding-inline: var(--gutter); }

.wire-tools {
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center;
  padding: .85rem 0;
  border-bottom: var(--wire-hair);
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.wire-tools form { margin-left: auto; display: flex; gap: .4rem; }
.wire-tools input[type=search] {
  font-family: var(--mono); font-size: .7rem;
  padding: .4rem .7rem; min-width: 13rem;
  border: var(--wire-rule); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
@media (max-width: 44rem) {
  .wire-tools form { margin-left: 0; width: 100%; }
  .wire-tools input[type=search] { flex: 1; min-width: 0; }
}

/* The front page: lead block, then a river. */
.front {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 0 var(--wire-gap);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-bottom: 2px solid var(--ink);
}
.front__lead { grid-column: 1; }
.front__rail {
  grid-column: 2;
  border-left: var(--wire-rule);
  padding-left: var(--wire-gap);
  display: flex; flex-direction: column;
}
@media (max-width: 60rem) {
  .front { grid-template-columns: 1fr; }
  .front__lead, .front__rail { grid-column: 1; }
  .front__rail {
    border-left: 0; padding-left: 0;
    border-top: var(--wire-rule); padding-top: var(--wire-gap); margin-top: var(--wire-gap);
  }
}

/* --------------------------------------------------------------- story unit */
.story { display: flex; flex-direction: column; gap: .5rem; }
.story a { text-decoration: none; color: inherit; }

.story__kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem;
  font-family: var(--mono);
  font-size: .615rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
.story__publisher { color: var(--ink); font-weight: 700; }
.story__cat {
  color: var(--accent, var(--c1));
  border-left: 1px solid var(--rule); padding-left: .6rem;
}
.story__badge {
  border: 1px solid var(--rule); border-radius: 2px;
  padding: .06rem .35rem; font-size: .55rem; letter-spacing: .1em;
}
.story__badge--full { border-color: var(--c1); color: var(--c1); }

.story__head {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
.story__head a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }

.story__dek {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}
.story__quote {
  margin: 0; padding-left: .85rem;
  border-left: 2px solid var(--rule);
  font-style: italic; color: var(--muted);
  font-size: .96rem; line-height: 1.55;
}
.story__byline {
  font-family: var(--mono);
  font-size: .62rem; letter-spacing: .1em;
  color: var(--faint);
  display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: baseline;
}
.story__byline b { color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .13em; }

.story__figure { margin: 0 0 .35rem; position: relative; }
.story__figure img {
  width: 100%; height: auto; display: block;
  background: var(--surface-2);
}
.story__figure figcaption {
  font-family: var(--mono);
  font-size: .58rem; letter-spacing: .07em;
  color: var(--faint);
  margin-top: .4rem; line-height: 1.5;
}

/* --- lead ------------------------------------------------------------- */
.story--lead .story__head { font-size: clamp(1.85rem, 4.4vw, 3.1rem); font-weight: 400; }
.story--lead .story__dek  { font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 38rem; }
.story--lead .story__figure img { aspect-ratio: 16 / 9; object-fit: cover; }

/* --- rail (the column beside the lead) -------------------------------- */
.rail__title {
  font-family: var(--mono);
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint);
  padding-bottom: .6rem; margin: 0 0 .9rem;
  border-bottom: 2px solid var(--ink);
}
.rail__item { padding: .85rem 0; border-bottom: var(--wire-hair); }
.rail__item:last-child { border-bottom: 0; }
.rail__item .story__head { font-size: 1.06rem; }
.rail__item .story__figure img { aspect-ratio: 3 / 2; object-fit: cover; }

/* --- river (the endless scroll) --------------------------------------- */
.river { border-bottom: var(--wire-rule); }
.river__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: var(--wire-gap);
  align-items: start;
  padding: clamp(1.1rem, 2.4vw, 1.7rem) 0;
  border-bottom: var(--wire-hair);
}
.river__item--noimg { grid-template-columns: minmax(0, 1fr); }
.river__body { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.river__item .story__head { font-size: clamp(1.15rem, 1.9vw, 1.5rem); }
.river__item .story__figure { margin: 0; }
.river__item .story__figure img { aspect-ratio: 3 / 2; object-fit: cover; }

@media (max-width: 46rem) {
  .river__item { grid-template-columns: 1fr; }
  /* Picture above the text on a phone, as a newspaper would break. */
  .river__figure { order: -1; }
  .river__item .story__figure img { aspect-ratio: 16 / 9; }
}

/* Every fifth story gets a heavier rule, so the river has visible stanzas. */
.river__item:nth-child(5n) { border-bottom: var(--wire-rule); }

/* --- briefs (headline-only items, set as a dense column block) --------- */
.briefs {
  columns: 2; column-gap: var(--wire-gap); column-rule: var(--wire-hair);
  padding: 1.3rem 0; border-bottom: var(--wire-rule);
}
.briefs__head {
  column-span: all;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint);
  padding-bottom: .55rem; margin: 0 0 .9rem; border-bottom: 2px solid var(--ink);
}
.brief { break-inside: avoid; padding: .55rem 0; border-bottom: var(--wire-hair); }
.brief .story__head { font-size: .99rem; font-weight: 500; }
.brief .story__kicker { margin-bottom: .25rem; }
@media (max-width: 46rem) { .briefs { columns: 1; } }

/* ------------------------------------------------------- infinite scroll */
.river__sentinel { height: 1px; }
.river__status {
  padding: 2.4rem 0 3rem; text-align: center;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.river__spinner {
  display: inline-block; width: .8rem; height: .8rem;
  border: 2px solid var(--rule); border-top-color: var(--c10);
  border-radius: 50%; vertical-align: -1px; margin-right: .6rem;
  animation: wire-spin .7s linear infinite;
}
@keyframes wire-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .river__spinner { animation: none; } }

/* The no-JS path: a plain link that always works. */
.river__more { display: block; text-align: center; margin: 2rem auto 3rem; }
html.js .river__more[data-auto] { display: none; }

/* ---------------------------------------------------------- article page */
.article { max-width: var(--wire-page); margin-inline: auto; padding-inline: var(--gutter); }

.article__head { padding: clamp(1.6rem, 4vw, 2.6rem) 0 0; }
.article__crumb {
  font-family: var(--mono); font-size: .63rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--faint);
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding-bottom: 1.2rem; border-bottom: var(--wire-hair); margin-bottom: 1.6rem;
}
.article__crumb a { color: var(--muted); text-decoration: none; }
.article__crumb a:hover { color: var(--ink); }

.article__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 0 0 .8rem; max-width: 24ch; text-wrap: balance;
}
.article__dek {
  font-style: italic; color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.48; max-width: 46ch; margin: 0 0 1.4rem;
}

/* The credit block — who wrote it, where it ran, when. */
.article__credit {
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: baseline;
  padding: .9rem 0; border-block: var(--wire-rule);
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .11em; color: var(--muted);
}
.article__credit dt {
  font-size: .58rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: .2rem;
}
.article__credit dd { margin: 0; color: var(--ink); }
.article__credit > div { min-width: 0; }

.article__figure { margin: clamp(1.6rem, 3vw, 2.4rem) 0; }
.article__figure img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.article__figure figcaption {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .06em;
  color: var(--faint); margin-top: .55rem; line-height: 1.6;
  display: flex; flex-wrap: wrap; gap: .3rem 1rem;
}
.article__figure .credit { color: var(--rule); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .article__figure .credit { color: var(--faint); }
}

.article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.4rem, 3vw, 2rem) 0 0;
}
@media (max-width: 64rem) {
  .article__layout { grid-template-columns: 1fr; }
  .article__aside { border-top: var(--wire-rule); padding-top: 1.6rem; }
}

/* the article body itself */
.article__body {
  max-width: 38rem;
  font-size: clamp(1.09rem, .5vw + .98rem, 1.2rem);
  line-height: 1.72;
}
.article__body > p:first-of-type::first-letter {
  float: left; font-family: var(--display);
  font-size: 3.4em; line-height: .84;
  padding: .05em .09em 0 0; color: var(--accent, var(--c1));
}
.article__body p { margin: 0 0 1.15em; }
.article__body h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.5rem; line-height: 1.25;
  margin: 2.2rem 0 .7rem;
}
.article__body h3 { font-size: 1.22rem; margin: 1.9rem 0 .5rem; }
.article__body h4 { font-family: var(--smallcaps); font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.article__body ul, .article__body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.article__body li { margin-bottom: .45em; }
/* Code samples (AI / developer articles): monospace, kept as blocks, scrolling sideways
   instead of breaking the page width. */
.article__body pre {
  margin: 0 0 1.3em; padding: .9rem 1.1rem; overflow-x: auto;
  background: color-mix(in oklab, currentColor 6%, transparent);
  border: 1px solid color-mix(in oklab, currentColor 16%, transparent);
  border-radius: 4px;
  font-family: var(--mono); font-size: .8rem; line-height: 1.55;
  white-space: pre; tab-size: 4; -webkit-overflow-scrolling: touch;
}
.article__body code { font-family: var(--mono); font-size: .88em; }
.article__body pre code { font-size: inherit; }
.article__body blockquote {
  margin: 1.8rem 0; padding-left: 1.3rem;
  border-left: 2px solid var(--accent, var(--c1));
  font-style: italic; color: var(--ink-soft);
}
.article__body a { color: var(--accent, var(--c1)); text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
.article__body a:hover { text-decoration-color: currentColor; }
.article__body strong { font-weight: 600; }
/* ---- data tables -------------------------------------------------------
   Financial tables are wide, use merged cells, and are read column-by-column.
   They get their own scroll container, tabular figures, and right-aligned
   numbers so decimal points line up. */
.article__body figure {
  margin: 1.8rem 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article__body table {
  width: 100%;
  min-width: 26rem;                 /* forces the scroll rather than crushing */
  border-collapse: collapse;
  margin: 0;
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums lining;
}
.article__body figure > table { margin: 0; }
.article__body table:not(figure > table) { margin: 1.8rem 0; }

.article__body caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 0 .6rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: .5rem;
}

.article__body th,
.article__body td {
  padding: .42rem .75rem;
  border-bottom: var(--wire-hair);
  vertical-align: top;
}
.article__body thead th,
.article__body thead td {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: var(--wire-rule);
  /* Sit the column heading over its figures, not centred above them. */
  text-align: right;
  vertical-align: bottom;
}
.article__body thead th:first-child,
.article__body thead td:first-child { text-align: left; }

/* Row stubs: the label column, left-aligned and quietly emphasised. */
.article__body tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  padding-right: 1.4rem;
}

/* Every non-stub cell is a figure, so it aligns right — including the lone
   cell of a continuation row under a rowspan, which is not a label however
   much it looks like the first column. */
.article__body tbody td { text-align: right; white-space: nowrap; }

/* A cell spanning rows belongs beside the whole group, not floating at its top. */
.article__body tbody th[rowspan],
.article__body tbody td[rowspan] { vertical-align: middle; }

.article__body tbody tr:last-child th,
.article__body tbody tr:last-child td { border-bottom: var(--wire-rule); }

.article__body table sub,
.article__body table sup { font-size: .72em; line-height: 0; }

.article__scroll { overflow-x: auto; }

/* provenance panel — prominent, because the words are somebody else's */
.provenance {
  border: var(--wire-rule); border-left: 3px solid var(--accent, var(--c1));
  padding: 1.1rem 1.2rem;
  margin: 2.6rem 0 0;
  background: var(--surface);
  max-width: 38rem;
}
.provenance h2 {
  font-family: var(--mono); font-weight: 400;
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 .7rem;
}
.provenance p { margin: 0 0 .6rem; font-size: .97rem; line-height: 1.6; color: var(--muted); }
.provenance p:last-child { margin-bottom: 0; }
.provenance strong { color: var(--ink); font-weight: 600; }
.provenance .btn { margin-top: .6rem; }

.article__aside .rail__title { margin-top: 0; }

/* ---------------------------------------------------------------- print */
@media print {
  .masthead__nav, .wire-tools, .river__status, .river__more, .article__aside { display: none; }
  .article__layout { grid-template-columns: 1fr; }
  .provenance { border: 1px solid #999; }
}
