/* The Market Brief — a clean, minimal, modern newspaper.
   Off-white paper, black ink, one restrained accent, hairline rules. */

:root {
  --paper:      #faf8f3;
  --paper-2:    #f3f0e8;
  --ink:        #1b1b1a;
  --ink-soft:   #55524c;
  --ink-faint:  #8a867d;
  --rule:       #dcd8cd;
  --rule-strong:#1b1b1a;
  --accent:     #8b1e2d;   /* deep newsprint red */
  --up:         #1a7f4b;
  --down:       #b3261e;
  --flat:       #8a867d;
  --maxw:       1120px;

  --serif-display: "Fraunces", Georgia, "Times New Roman", serif;
  --serif-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --sans:          "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:          ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Masthead ---------- */
.masthead { padding: 26px 0 0; text-align: center; }
.masthead .kicker {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 12px;
}
.masthead h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(38px, 8vw, 76px);
  line-height: .95; letter-spacing: -.01em;
  margin: 0;
}
.masthead h1 a { color: inherit; }
.masthead h1 a:hover { text-decoration: none; }

.dateline {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1.5px solid var(--rule-strong);
  border-bottom: 1.5px solid var(--rule-strong);
  padding: 9px 2px; margin-top: 18px;
}
.dateline .center { color: var(--accent); font-weight: 600; letter-spacing: .18em; }
.dateline a { color: var(--ink-soft); }

/* thin double rule under masthead band */
.rule-double { border-bottom: 1px solid var(--rule-strong); margin-top: 3px; }

/* ---------- Index strip (key movers) ---------- */
.tape {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  margin-bottom: 30px;
}
.tape .cell {
  flex: 1 1 auto; min-width: 120px;
  padding: 10px 14px;
  border-right: 1px solid var(--rule);
  text-align: left;
}
.tape .cell:last-child { border-right: none; }
.tape .sym { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.tape .val { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tape .chg { font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- Layout grid ---------- */
.layout { display: grid; grid-template-columns: 1fr; gap: 34px; padding-bottom: 60px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 44px; }
}

/* ---------- Section headings ---------- */
.section-head {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink); font-weight: 700;
  padding-bottom: 7px; margin: 0 0 16px;
  border-bottom: 2px solid var(--rule-strong);
  display: flex; justify-content: space-between; align-items: baseline;
}
.section-head .note { font-weight: 400; letter-spacing: .05em; color: var(--ink-faint); }

/* ---------- The Wrap (lead) ---------- */
.lead .eyebrow {
  font-family: var(--sans); font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 8px;
}
.lead h2 {
  font-family: var(--serif-display); font-weight: 600;
  font-size: clamp(26px, 4vw, 38px); line-height: 1.08; letter-spacing: -.01em;
  margin: 0 0 16px;
}
.lead .body { font-size: 19px; line-height: 1.62; }
.lead .body p { margin: 0 0 16px; }
.lead .body > p:first-of-type:not(.empty)::first-letter {
  font-family: var(--serif-display); font-weight: 600;
  float: left; font-size: 3.1em; line-height: .78;
  padding: 6px 10px 0 0; color: var(--accent);
}
.lead .empty { color: var(--ink-faint); font-style: italic; }

/* ---------- What to watch ---------- */
.watch { margin-top: 30px; padding: 18px 20px; background: var(--paper-2);
         border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.watch h3 { font-family: var(--sans); font-size: 11px; letter-spacing: .22em;
            text-transform: uppercase; margin: 0 0 10px; }
.watch ul { margin: 0; padding: 0; list-style: none; }
.watch li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 16px; line-height: 1.45; }
.watch li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Markets board ---------- */
.board-region { margin-bottom: 22px; }
.board-region h3 {
  font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); font-weight: 700; margin: 0 0 4px;
  padding-bottom: 5px; border-bottom: 1px solid var(--rule-strong);
  display: flex; justify-content: space-between;
}
.board-region h3 .ccy { color: var(--ink-faint); font-weight: 400; letter-spacing: .05em; }

.quote {
  display: grid; align-items: center;
  grid-template-columns: 1fr auto auto;
  gap: 4px 14px;
  padding: 9px 0; border-bottom: 1px solid var(--rule);
}
.quote:last-child { border-bottom: none; }
.quote .name-cell { min-width: 0; }
.quote .sym { font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.quote .name { color: var(--ink-soft); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote .spark { grid-row: span 2; }
.quote .figs { grid-row: span 2; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.quote .last { font-size: 15px; }
.quote .pcts { font-size: 12.5px; margin-top: 2px; white-space: nowrap; }
.quote .ytd-label { color: var(--ink-faint); }

.up   { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.na   { color: var(--ink-faint); }

/* ---------- Headlines ---------- */
.headlines { margin-top: 8px; }
.feed { break-inside: avoid; margin-bottom: 20px; }
.feed .src { font-family: var(--sans); font-size: 11px; letter-spacing: .16em;
             text-transform: uppercase; color: var(--accent); font-weight: 700;
             padding-bottom: 5px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.feed .src .region-tag { color: var(--ink-faint); font-weight: 400; }
.feed ul { margin: 0; padding: 0; list-style: none; }
.feed li { margin-bottom: 11px; line-height: 1.32; }
.feed li a { font-family: var(--serif-body); font-size: 17px; font-weight: 500; }
.feed li a:hover { color: var(--accent); }
.feed li .teaser { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.4; }
@media (min-width: 620px) { .headlines-cols { column-count: 2; column-gap: 34px; } }

/* ---------- Archive ---------- */
.archive-list { list-style: none; padding: 0; margin: 0; }
.edition {
  padding: 22px 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr; gap: 6px;
}
.edition .ed-date { font-family: var(--serif-display); font-weight: 600; font-size: 24px; }
.edition .ed-date a:hover { color: var(--accent); text-decoration: none; }
.edition .ed-teaser { color: var(--ink-soft); font-size: 17px; }
.edition .ed-meta { font-family: var(--sans); font-size: 12px; color: var(--ink-faint);
                    display: flex; flex-wrap: wrap; gap: 12px; letter-spacing: .04em; }
.chip { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.pager { display: flex; justify-content: space-between; align-items: center;
         font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
         padding: 14px 0; border-top: 1px solid var(--rule); margin-top: 8px; }
.pager a.disabled { color: var(--rule); pointer-events: none; }

/* ---------- Footer ---------- */
footer { border-top: 2px solid var(--rule-strong); padding: 24px 0 50px; margin-top: 20px;
         font-family: var(--sans); font-size: 12.5px; color: var(--ink-faint); line-height: 1.7; }
footer .sources { color: var(--ink-soft); }
footer .disclaimer { margin-top: 10px; font-style: italic; }
footer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- States ---------- */
.state { text-align: center; padding: 80px 20px; color: var(--ink-faint); font-style: italic; }

/* ---------- Nav (archive/home links) ---------- */
.topnav { display: flex; justify-content: center; gap: 26px; padding: 14px 0 0;
          font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.topnav a { color: var(--ink-soft); }
.topnav a.here { color: var(--accent); font-weight: 700; }
