/* ============================================================
   MARKETWATCH.IE — DESIGN SYSTEM
   Shared stylesheet for all pages.
   v1.0 — April 2026
   ============================================================ */

:root {
  /* Surfaces */
  --ink: #0B0F17;
  --ink-2: #0F1420;
  --surface: #141A28;
  --surface-2: #1B2233;
  --hairline: #232B3D;
  --hairline-bright: #38425A;

  /* Type colours */
  --paper: #F2EBDA;
  --paper-dim: #C9C2B0;
  --muted: #8A93A6;
  --muted-2: #5C6377;

  /* Brand */
  --gold: #E8B948;
  --gold-deep: #B8902F;
  --gold-soft: rgba(232, 185, 72, 0.14);

  /* Direction */
  --up: #2BC78A;
  --up-soft: rgba(43, 199, 138, 0.14);
  --down: #E55A50;
  --down-soft: rgba(229, 90, 80, 0.14);
  --flat: #8A93A6;

  /* Type stacks */
  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1280px;
  --rail: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 600px at 12% -10%, rgba(232,185,72,0.07), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(43,199,138,0.04), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: #1a1408; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--rail); }

/* ===== Utility bar ============================================== */
.utility {
  background: #07090F;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.utility .row { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 24px; }
.utility .left, .utility .right { display: flex; align-items: center; gap: 18px; }
.utility .pip { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 2.4s cubic-bezier(.4,0,.6,1) infinite; }
.dot.warn { background: var(--gold); animation-name: pulse-warn; }
.dot.down { background: var(--down); animation-name: pulse-down; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43,199,138,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(43,199,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,199,138,0); }
}
@keyframes pulse-warn {
  0% { box-shadow: 0 0 0 0 rgba(232,185,72,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(232,185,72,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,185,72,0); }
}
@keyframes pulse-down {
  0% { box-shadow: 0 0 0 0 rgba(229,90,80,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(229,90,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,90,80,0); }
}
.utility a:hover { color: var(--gold); }

/* ===== Masthead ================================================ */
.masthead {
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, #0B0F17 0%, #0E1320 100%);
  position: relative;
  overflow: hidden;
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-deep), transparent);
  opacity: 0.7;
}
.mast-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 16px; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; color: var(--paper); }
.brand .lockup {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand .lockup .accent { color: var(--gold); }
.brand .crest {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold), var(--gold-deep) 70%, #6f5418);
  position: relative; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(232,185,72,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}
.brand .crest::before {
  content: "8";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: 22px;
  color: #1a1408;
}
.brand .strap {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--paper-dim);
  letter-spacing: 0.01em;
}
nav.primary { display: flex; gap: 26px; align-items: center; }
nav.primary a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-dim);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
nav.primary a:hover, nav.primary a.current { color: var(--paper); }
nav.primary a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px;
  width: 0; background: var(--gold);
  transition: width .25s ease;
}
nav.primary a:hover::after, nav.primary a.current::after { width: 100%; }
nav.primary a.cta {
  background: var(--gold);
  color: #1a1408;
  padding: 9px 16px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}
nav.primary a.cta:hover { background: #f0c460; color: #1a1408; }
nav.primary a.cta::after { display: none; }

/* ===== Live ticker ============================================= */
.tape {
  background: #07090F;
  border-bottom: 1px solid var(--hairline);
  border-top: 1px solid var(--hairline);
  overflow: hidden; position: relative;
}
.tape::before, .tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none;
}
.tape::before { left: 0; background: linear-gradient(90deg, #07090F, transparent); }
.tape::after { right: 0; background: linear-gradient(270deg, #07090F, transparent); }
.tape-track {
  display: inline-flex; gap: 36px; padding: 11px 0; white-space: nowrap;
  animation: scroll 90s linear infinite;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em;
}
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; gap: 8px; align-items: baseline; }
.tape-item .sym { color: var(--paper-dim); font-weight: 500; }
.tape-item .px { color: var(--paper); }
.tape-item .ch { font-weight: 500; }
.tape-item .ch.up { color: var(--up); }
.tape-item .ch.down { color: var(--down); }
.tape-item .arrow { font-size: 10px; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Sub-nav (page hat) ====================================== */
.subnav {
  background: var(--ink-2);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
}
.subnav .row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.subnav .crumbs a { color: var(--paper-dim); }
.subnav .crumbs a:hover { color: var(--gold); }
.subnav .crumbs .sep { color: var(--muted-2); margin: 0 10px; }
.subnav .meta { color: var(--paper-dim); }

/* ===== Page hero (used across section pages) =================== */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--hairline);
}
.page-hero .eyebrow {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.page-hero .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  margin: 0 0 18px;
  color: var(--paper);
  max-width: 18ch;
}
.page-hero h1 em { font-style: italic; color: var(--gold); }
.page-hero .lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--paper-dim);
  max-width: 60ch;
  margin: 0;
}
.page-hero .lede strong { color: var(--paper); font-weight: 500; }

/* ===== Section heads =========================================== */
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 20px; margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.018em;
  margin: 0; line-height: 1;
  color: var(--paper);
}
.section-head h2 .ord {
  font-family: var(--mono); font-weight: 500; font-size: 0.42em;
  color: var(--gold); letter-spacing: 0.18em;
  vertical-align: super; margin-right: 14px;
}
.section-head .sub {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--paper-dim);
  max-width: 42ch; text-align: right;
}

/* ===== Generic section ========================================= */
.section { padding: 56px 0; border-top: 1px solid var(--hairline); }
.section.no-rule { border-top: none; }

/* ===== Card primitive ========================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 24px;
}
.card.elev { background: var(--surface-2); }

/* ===== Direction utilities ===================================== */
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }

/* ===== Sparkline gradients (colour fallback in <defs>) =========
   Selectors target the path classes directly so they apply to any
   sparkline wrapper (.spark, .spark-big, or anything else). =====*/
.spark svg { width: 100%; display: block; }
path.area-up   { fill: url(#gradUp); }
path.area-down { fill: url(#gradDown); }
path.line-up   { stroke: var(--up);   fill: none; stroke-width: 1.6; }
path.line-down { stroke: var(--down); fill: none; stroke-width: 1.6; }

/* ===== Market card (homepage + markets page) =================== */
.eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.market {
  background: var(--surface);
  padding: 22px 22px 18px;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 230px;
  transition: background .3s ease;
  cursor: pointer;
}
.market:hover { background: var(--surface-2); }
.market::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gold);
  opacity: 0; transition: opacity .3s ease;
}
.market:hover::before { opacity: 1; }
.market .ord {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.2em;
  margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.market .ord .status {
  display: inline-flex; align-items: center; gap: 6px;
  text-transform: uppercase; font-size: 9px; color: var(--muted);
}
.market .ord .status .d { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.market .ord .status.closed .d { background: var(--muted-2); }
.market .ord .status.closed { color: var(--muted-2); }
.market .name {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: 22px; line-height: 1.1;
  color: var(--paper); letter-spacing: -0.01em; margin-bottom: 2px;
}
.market .place {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted); margin-bottom: 18px;
}
.market .price {
  font-family: var(--mono); font-size: 26px; font-weight: 500;
  color: var(--paper); letter-spacing: -0.01em; line-height: 1;
}
.market .change {
  font-family: var(--mono); font-size: 13px;
  margin-top: 8px;
  display: flex; align-items: center; gap: 12px;
}
.market .change.up { color: var(--up); }
.market .change.down { color: var(--down); }
.market .change .pct { background: var(--up-soft); padding: 2px 6px; border-radius: 2px; font-weight: 500; }
.market .change.down .pct { background: var(--down-soft); }
.market .spark { margin-top: auto; padding-top: 16px; }
.market .spark svg { height: 44px; }

/* ===== MW8 gauge =============================================== */
.gauge-wrap { position: relative; display: grid; place-items: center; padding: 8px; }
.gauge-frame {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.gauge-frame::before {
  content: "";
  position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(from 90deg, transparent 0%, rgba(232,185,72,0.18) 25%, transparent 50%, rgba(43,199,138,0.18) 75%, transparent);
  filter: blur(28px); opacity: 0.7; z-index: 0;
}
svg.gauge { width: 100%; height: 100%; position: relative; z-index: 1; }
.gauge-readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; z-index: 2;
}
.gauge-readout .label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.gauge-readout .value {
  font-family: var(--serif); font-weight: 700;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: 92px; line-height: 1;
  color: var(--paper); letter-spacing: -0.04em;
}
.gauge-readout .value sup {
  font-size: 18px; font-weight: 500; color: var(--muted);
  vertical-align: top; margin-left: 2px;
}
.gauge-readout .verdict {
  margin-top: 10px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 18px; color: var(--gold);
}
.gauge-readout .delta {
  font-family: var(--mono); font-size: 12px;
  color: var(--paper-dim); margin-top: 6px; letter-spacing: 0.02em;
}

/* ===== Briefing prose ========================================= */
.briefing-grid {
  display: grid; grid-template-columns: 1fr 2.2fr; gap: 56px; align-items: start;
}
.briefing aside { position: sticky; top: 30px; }
.briefing aside .stamp {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.briefing aside h3 {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
  font-size: 38px; line-height: 1; margin: 0 0 16px;
  color: var(--paper); letter-spacing: -0.022em;
}
.briefing aside h3 em {
  font-style: italic; color: var(--gold);
  font-variation-settings: "opsz" 144, "WONK" 1;
}
.briefing aside .by {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; border-top: 1px solid var(--hairline);
  padding-top: 14px; margin-top: 18px;
}
.briefing aside .by b { color: var(--paper-dim); font-weight: 500; }

.prose {
  font-family: var(--serif); font-weight: 400;
  font-size: 19px; line-height: 1.6; color: var(--paper-dim);
}
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--paper); font-weight: 500; }
.prose em { color: var(--paper); font-style: italic; }
.prose-2col { column-count: 2; column-gap: 36px; column-rule: 1px solid var(--hairline); }
.prose-2col p { break-inside: avoid-column; }
.prose .dropcap::first-letter {
  font-family: var(--serif); font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: 5.6em; float: left; line-height: 0.85;
  margin: 0.05em 0.08em 0 -0.04em; color: var(--gold);
}

/* ===== Sectors ================================================= */
.heatmap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.sector {
  position: relative; padding: 24px 22px;
  border-radius: 3px; overflow: hidden;
  min-height: 130px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid transparent;
  transition: border-color .25s ease, transform .25s ease;
  cursor: pointer;
}
.sector:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-1px); }
.sector .label {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: 18px; color: var(--paper); line-height: 1.05; letter-spacing: -0.01em;
}
.sector .pct {
  font-family: var(--mono); font-size: 22px; font-weight: 500;
  color: var(--paper); letter-spacing: -0.01em;
}
.sector .meta {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.s-1 { background: rgba(43,199,138,0.55); }
.s-2 { background: rgba(43,199,138,0.40); }
.s-3 { background: rgba(43,199,138,0.25); }
.s-4 { background: rgba(43,199,138,0.12); }
.s-5 { background: rgba(229,90,80,0.12); }
.s-6 { background: rgba(229,90,80,0.25); }
.s-7 { background: rgba(229,90,80,0.40); }
.s-8 { background: rgba(229,90,80,0.55); }

/* ===== Stock rows / tables ===================================== */
.row-stock {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 16px; align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.row-stock:hover { background: var(--ink-2); }
.row-stock .rank { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }
.row-stock .name { font-weight: 500; color: var(--paper); }
.row-stock .name .tic { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; letter-spacing: 0.06em; }
.row-stock .px { font-family: var(--mono); font-size: 14px; color: var(--paper-dim); }
.row-stock .ch { font-family: var(--mono); font-size: 13px; font-weight: 500; min-width: 80px; text-align: right; }

.movers-head { display: flex; gap: 24px; margin-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.movers-tab {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 10px 0; color: var(--muted);
  border-bottom: 1px solid transparent; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
  margin-bottom: -1px;
}
.movers-tab.active { color: var(--paper); border-bottom-color: var(--gold); }
.movers-tab:hover { color: var(--paper); }

/* ===== News list =============================================== */
.news-list { display: flex; flex-direction: column; }
.news-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid; grid-template-columns: 70px 1fr; gap: 22px;
  align-items: start; cursor: pointer;
  transition: opacity .2s ease;
}
.news-item:hover { opacity: 0.85; }
.news-item:hover .news-headline { color: var(--gold); }
.news-time { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; padding-top: 4px; }
.news-time .src { display: block; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 4px; color: var(--gold-deep); }
.news-headline {
  font-family: var(--serif); font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-size: 19px; line-height: 1.3;
  color: var(--paper); letter-spacing: -0.005em;
  transition: color .2s ease;
}
.news-headline .lede { display: block; font-style: italic; color: var(--paper-dim); font-size: 16px; font-weight: 400; margin-top: 4px; line-height: 1.45; }
.tag {
  display: inline-block; font-family: var(--mono);
  font-size: 9px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-soft);
  padding: 2px 6px; border-radius: 2px;
  margin-right: 10px; vertical-align: 3px;
}

/* ===== FX board =============================================== */
.fx-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px; overflow: hidden;
}
.fx-cell { background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 6px; transition: background .25s ease; }
.fx-cell:hover { background: var(--surface-2); }
.fx-pair { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--gold); }
.fx-rate { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--paper); letter-spacing: -0.01em; }
.fx-ch { font-family: var(--mono); font-size: 12px; font-weight: 500; }

/* ===== CTA strip ============================================== */
.cta-strip {
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(700px 300px at 80% 50%, rgba(232,185,72,0.10), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #08070A 100%);
}
.cta-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.cta-grid h3 {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.02; margin: 0 0 14px; letter-spacing: -0.022em;
  color: var(--paper);
}
.cta-grid h3 em { font-style: italic; color: var(--gold); }
.cta-grid p { font-family: var(--serif); font-size: 18px; color: var(--paper-dim); margin: 0; max-width: 56ch; }
.cta-form {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 24px; border-radius: 3px; position: relative;
}
.cta-form::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.cta-form label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); }
.cta-form input {
  background: transparent; border: none;
  border-bottom: 1px solid var(--hairline-bright);
  padding: 12px 0;
  font-family: var(--serif); font-size: 18px; color: var(--paper);
  outline: none; transition: border-color .2s ease;
}
.cta-form input::placeholder { color: var(--muted-2); font-style: italic; }
.cta-form input:focus { border-bottom-color: var(--gold); }
.cta-form button {
  background: var(--gold); color: #1a1408; border: none;
  padding: 13px 18px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px; margin-top: 6px;
  transition: background .2s ease, transform .15s ease;
}
.cta-form button:hover { background: #f0c460; }
.cta-form button:active { transform: translateY(1px); }
.cta-form .micro { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; }

/* ===== Footer ================================================= */
footer.site {
  background: #07090F; border-top: 1px solid var(--hairline);
  padding: 56px 0 28px; font-size: 13px;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; margin-bottom: 40px; }
.foot-grid h5 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 14px;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-grid a { color: var(--paper-dim); transition: color .2s ease; }
.foot-grid a:hover { color: var(--paper); }
.foot-about { font-family: var(--serif); font-size: 16px; color: var(--paper-dim); line-height: 1.55; max-width: 36ch; }
.foot-about .brand-mini {
  font-family: var(--serif); font-weight: 700;
  font-variation-settings: "opsz" 144, "WONK" 1;
  font-size: 22px; color: var(--paper); margin-bottom: 12px;
  display: block; letter-spacing: -0.01em;
}
.foot-about .brand-mini .accent { color: var(--gold); }
.foot-bottom {
  border-top: 1px solid var(--hairline); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em;
}
.foot-bottom a:hover { color: var(--gold); }

/* ===== Reveal animations ====================================== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Defensive override: dynamically-generated cards (the eight market cards
   on index.html and the deep cards on markets.html) are *always* visible
   regardless of whether the IntersectionObserver caught them. The reveal
   animation still applies to the static .reveal elements (hero, eyebrow,
   page-hero, etc.) — only these grid cards bypass it. */
.eight-grid .market,
.deep-list .deep-card { opacity: 1 !important; transform: none !important; }

/* ===== Page-specific helpers ================================== */

/* Stat tile (used on stock + mw8 pages) */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px; overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat .k {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.stat .v {
  font-family: var(--mono); font-size: 22px; font-weight: 500;
  color: var(--paper); letter-spacing: -0.01em;
}
.stat .v.serif {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-weight: 600; font-size: 26px;
}
.stat .sub { font-family: var(--mono); font-size: 11px; color: var(--paper-dim); letter-spacing: 0.02em; }

/* Big chart frame */
.chart-frame {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 22px;
  position: relative;
}
.chart-frame .chart-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.chart-frame .chart-head .ranges { display: flex; gap: 4px; }
.chart-frame .chart-head .range {
  padding: 4px 10px; border-radius: 2px; cursor: pointer;
  color: var(--paper-dim); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; transition: background .2s ease;
}
.chart-frame .chart-head .range.active { background: var(--gold); color: #1a1408; }
.chart-frame .chart-head .range:hover:not(.active) { color: var(--paper); }
.chart-frame svg { width: 100%; height: 320px; display: block; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cal-day {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  border-radius: 3px;
}
.cal-day .head {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: 18px; color: var(--paper);
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--hairline); padding-bottom: 10px;
}
.cal-day .head .date { font-family: var(--mono); font-size: 11px; color: var(--gold); letter-spacing: 0.16em; }
.cal-event {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start;
  font-size: 13px;
}
.cal-event .t { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; }
.cal-event .e { color: var(--paper-dim); line-height: 1.35; }
.cal-event .e .flag {
  display: inline-block; font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: 0.16em; color: var(--paper); background: var(--surface-2);
  padding: 1px 6px; border-radius: 2px; margin-right: 8px; vertical-align: 1px;
}
.cal-event .imp { display: flex; gap: 2px; padding-top: 5px; }
.cal-event .imp .d { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.cal-event .imp.high .d:nth-child(-n+3) { background: var(--down); }
.cal-event .imp.med .d:nth-child(-n+2) { background: var(--gold); }
.cal-event .imp.low .d:nth-child(-n+1) { background: var(--up); }

/* Filter chip row */
.chip-row {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 0;
}
.chip {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 2px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--paper-dim); cursor: pointer;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--hairline-bright); color: var(--paper); }
.chip.on { background: var(--gold); color: #1a1408; border-color: var(--gold); }

/* Simple two-column split */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.split.flip { grid-template-columns: 1fr 1.3fr; }

/* Pulled quote */
.pullquote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-variation-settings: "opsz" 144, "WONK" 1;
  font-size: 28px; line-height: 1.25;
  color: var(--paper);
  border-left: 2px solid var(--gold);
  padding: 8px 0 8px 24px;
  margin: 30px 0;
  max-width: 32ch;
}
.pullquote cite {
  display: block; margin-top: 10px;
  font-family: var(--mono); font-style: normal;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}

/* Definition list (used on mw8/about) */
.deflist { display: grid; grid-template-columns: 200px 1fr; gap: 14px 32px; }
.deflist dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
  padding-top: 4px;
}
.deflist dd {
  margin: 0; color: var(--paper-dim);
  font-family: var(--serif); font-size: 17px; line-height: 1.5;
}
.deflist dd strong { color: var(--paper); font-weight: 500; }

/* Big stock header (stock page) */
.stock-head {
  display: grid; grid-template-columns: 1fr auto; gap: 32px;
  align-items: end; padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 32px;
}
.stock-head .name {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 0.98; letter-spacing: -0.022em;
  color: var(--paper);
}
.stock-head .ticker {
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.14em; color: var(--muted);
  margin-top: 8px;
}
.stock-head .ticker .pip { color: var(--gold); margin: 0 8px; }
.stock-head .price-block { text-align: right; }
.stock-head .price-block .px {
  font-family: var(--mono); font-size: 44px; font-weight: 500;
  color: var(--paper); letter-spacing: -0.02em; line-height: 1;
}
.stock-head .price-block .ch {
  font-family: var(--mono); font-size: 16px; margin-top: 6px;
}

/* Archive list (briefing page) */
.archive-item {
  display: grid; grid-template-columns: 90px 60px 1fr auto; gap: 24px;
  padding: 22px 0; align-items: start;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer; transition: background .2s ease;
}
.archive-item:hover { background: var(--ink-2); }
.archive-item:hover .ah { color: var(--gold); }
.archive-item .when {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; padding-top: 6px;
}
.archive-item .when b { display: block; color: var(--paper); font-size: 22px; font-weight: 500; line-height: 1; margin-bottom: 4px; letter-spacing: -0.01em; }
.archive-item .mw8 {
  font-family: var(--mono); font-size: 13px;
  background: var(--gold-soft); color: var(--gold);
  padding: 6px 8px; border-radius: 2px;
  text-align: center; letter-spacing: 0.04em; min-width: 56px;
}
.archive-item .mw8 small { display: block; font-size: 9px; letter-spacing: 0.18em; opacity: 0.7; margin-top: 1px; }
.archive-item .ah {
  font-family: var(--serif); font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  font-size: 20px; line-height: 1.3; color: var(--paper);
  letter-spacing: -0.005em; transition: color .2s ease;
}
.archive-item .ah .lede { display: block; font-style: italic; font-weight: 400; color: var(--paper-dim); font-size: 15px; margin-top: 6px; line-height: 1.45; }
.archive-item .read {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); padding-top: 8px;
  white-space: nowrap;
}

/* Sector deep panel */
.sector-deep {
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
}
.sector-deep:first-of-type { border-top: none; padding-top: 0; }
.sector-deep .top {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px;
  align-items: end; margin-bottom: 18px;
}
.sector-deep .top .lab {
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  font-size: 28px; color: var(--paper); letter-spacing: -0.018em; line-height: 1;
}
.sector-deep .top .blurb { font-family: var(--serif); font-style: italic; color: var(--paper-dim); font-size: 15px; max-width: 50ch; }
.sector-deep .top .pct { font-family: var(--mono); font-size: 24px; font-weight: 500; }

/* Page-internal nav (anchor pills) */
.anchors {
  display: flex; gap: 2px; padding: 6px;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  margin-bottom: 32px;
  overflow-x: auto;
}
.anchors a {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 2px;
  color: var(--paper-dim); white-space: nowrap;
  transition: all .2s ease;
}
.anchors a:hover { color: var(--paper); background: var(--surface); }
.anchors a.on { background: var(--gold); color: #1a1408; }

/* ===== Responsive ============================================= */
@media (max-width: 1080px) {
  .eight-grid { grid-template-columns: repeat(2, 1fr); }
  .heatmap { grid-template-columns: repeat(2, 1fr); }
  .fx-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .briefing-grid, .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .briefing aside { position: static; }
  .prose-2col { column-count: 1; }
  .cta-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cal-grid { grid-template-columns: 1fr 1fr; }
  .stock-head { grid-template-columns: 1fr; }
  .stock-head .price-block { text-align: left; }
  .archive-item { grid-template-columns: 80px 60px 1fr; }
  .archive-item .read { display: none; }
  .deflist { grid-template-columns: 1fr; gap: 6px 0; }
  .deflist dt { padding-top: 14px; }
  nav.primary { display: none; }
}
@media (max-width: 640px) {
  :root { --rail: 18px; }
  .utility .row { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 10px; }
  .utility .left, .utility .right { gap: 12px; flex-wrap: wrap; }
  .page-hero { padding: 40px 0 32px; }
  .section { padding: 40px 0; }
  .eight-grid { grid-template-columns: 1fr; }
  .heatmap { grid-template-columns: 1fr 1fr; }
  .fx-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .gauge-readout .value { font-size: 72px; }
  .section-head { flex-direction: column; align-items: start; }
  .section-head .sub { text-align: left; }
  .prose { font-size: 17px; }
  .foot-grid { grid-template-columns: 1fr; }
  .cal-grid { grid-template-columns: 1fr; }
  .archive-item { grid-template-columns: 70px 1fr; }
  .archive-item .mw8 { display: none; }
  .pullquote { font-size: 22px; padding-left: 18px; }
}

/* ===== Reduced motion ========================================
   Respect the OS-level "Reduce motion" preference. Stops the
   ticker, freezes reveal animations into their visible state,
   and collapses transitions to near-zero so nothing slides or
   fades for users who've asked us not to.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tape-track { animation: none !important; }
  .dot { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  #needle { transition: none !important; }
}

/* ===== Accessibility =========================================
   Visible focus rings on every interactive element, plus a
   skip-to-main link that's hidden until focused.
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 12px;
  background: var(--gold); color: #1a1408;
  padding: 12px 18px;
  font-family: var(--mono); font-size: 12px;
  font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
  border-radius: 2px; z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; outline: none; box-shadow: 0 0 0 3px rgba(232,185,72,0.4); }

:focus { outline: none; } /* defer to :focus-visible */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
nav.primary a:focus-visible { outline-offset: 6px; }
nav.primary a.cta:focus-visible { outline-offset: 3px; }
.cta-form input:focus-visible { outline: none; } /* keep its existing border-bottom emphasis */
.market:focus-visible, .deep-card:focus-visible,
.fx-cell:focus-visible, .sector:focus-visible { outline-offset: -2px; }
.tape-item:focus-visible { outline: none; } /* ticker items aren't navigable */

/* ===== Print ==================================================
   Strip the chrome (masthead, ticker, footer, CTA strip), reformat
   the prose for paper, and let the editorial breathe. The briefing
   prints especially well on A4.
   ============================================================ */
@media print {
  :root {
    --paper:        #111;
    --paper-dim:    #333;
    --muted:        #555;
    --muted-2:      #777;
    --ink:          #fff;
    --ink-2:        #fafafa;
    --surface:      #fff;
    --surface-2:    #f4f4f4;
    --hairline:     #ccc;
    --hairline-bright: #999;
    --gold:         #8a6a16;
    --gold-deep:    #5e4810;
    --gold-soft:    #f5efdb;
    --up:           #1f7a4a;
    --down:         #b03b32;
    --up-soft:      #e8f5ee;
    --down-soft:    #fbe9e8;
  }

  @page { margin: 18mm 16mm 22mm; size: A4; }

  body {
    background: #fff !important;
    color: #111 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11pt; line-height: 1.5;
    background-image: none !important;
  }

  /* Hide site chrome */
  .utility, .tape, .subnav, nav.primary, .anchors,
  footer.site, .cta-strip, .skip-link,
  .gauge-wrap, .reveal { display: none !important; }

  /* Masthead becomes a slim print header */
  .masthead { border-bottom: 2px solid #111; padding: 0 0 8mm; margin-bottom: 8mm; }
  .masthead::after { display: none; }
  .mast-row { padding: 0 !important; }
  .brand .crest { display: none; }
  .brand .lockup {
    font-size: 22pt; color: #111;
    font-family: Georgia, serif; font-weight: 700;
  }
  .brand .lockup .accent { color: #8a6a16; }
  .brand .strap {
    color: #555; font-style: italic; font-size: 10pt;
  }

  /* Hero / page-hero */
  .hero, .page-hero, .section, .section.no-rule {
    border-top: none !important;
    padding: 4mm 0 !important;
    page-break-inside: avoid;
  }
  .hero h1, .page-hero h1 {
    font-size: 28pt !important;
    color: #111 !important;
    margin-bottom: 4mm;
  }
  .hero h1 em, .hero h1 .num,
  .page-hero h1 em { color: #8a6a16 !important; font-style: italic; }
  .hero .lede, .page-hero .lede {
    font-size: 12pt; color: #333;
  }
  .eyebrow, .page-hero .eyebrow {
    color: #8a6a16; font-size: 9pt;
  }

  /* Section heads */
  .section-head h2 {
    font-size: 18pt !important; color: #111 !important;
    border-bottom: 1px solid #111; padding-bottom: 2mm;
  }
  .section-head .sub { color: #555; font-size: 10pt; }
  .section-head h2 .ord { color: #8a6a16; }

  /* Prose */
  .prose, .prose-2col {
    color: #222 !important;
    column-count: 1 !important;
    font-size: 11pt;
    max-width: none;
  }
  .prose strong { color: #111 !important; }
  .prose em { color: #111 !important; }
  .prose .dropcap::first-letter {
    color: #8a6a16 !important;
    font-size: 4em;
  }
  .pullquote {
    color: #111 !important;
    border-left-color: #8a6a16 !important;
    page-break-inside: avoid;
  }

  /* Briefing layout collapses to single column for print */
  .briefing-grid { grid-template-columns: 1fr !important; gap: 6mm !important; }
  .briefing aside { position: static !important; margin-bottom: 4mm; }
  .briefing aside h3 { font-size: 16pt; color: #111; }
  .briefing aside h3 em { color: #8a6a16 !important; }
  .briefing aside .stamp { color: #8a6a16 !important; }

  /* Tables / grids */
  .eight-grid, .heatmap, .stat-grid, .fx-grid,
  .quick-stats, .components, .related, .principles,
  .team, .deep-list, .week-meta {
    border: 1px solid #ccc !important;
    background: #fff !important;
    page-break-inside: avoid;
  }
  .market, .stat, .fx-cell, .sector, .deep-card,
  .quick-stat, .comp-row, .rel-card, .principle, .person, .wm-cell {
    background: #fff !important;
    color: #111 !important;
    border: none !important;
    border-right: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
  }
  .market .name, .stat .v, .deep-card .head .name {
    color: #111 !important;
  }
  .market .price, .deep-card .price-block .px {
    color: #111 !important;
  }
  .stock-head .name { color: #111 !important; font-size: 22pt; }
  .stock-head .price-block .px { color: #111 !important; font-size: 22pt; }

  /* Sector heatmap — flatten to neutral with text colour for direction */
  .sector { background: #fff !important; }
  .sector .label, .sector .pct { color: #111 !important; }

  /* Direction (up/down) — keep readable in black on white */
  .up { color: #1f7a4a !important; }
  .down { color: #b03b32 !important; }
  .change.up, .change.down,
  .ch.up, .ch.down,
  .fx-ch.up, .fx-ch.down { background: transparent !important; }
  .change .pct { background: transparent !important; padding: 0 !important; }

  /* Sparklines / charts: keep them but in black */
  path.area-up, path.area-down { fill: #ddd !important; }
  path.line-up { stroke: #1f7a4a !important; }
  path.line-down { stroke: #b03b32 !important; }
  .chart-frame { border: 1px solid #ccc !important; background: #fff !important; }
  .chart-frame .chart-head { color: #555 !important; }
  .chart-frame .ranges { display: none; }

  /* Tags, pills, dots */
  .tag {
    background: transparent !important;
    color: #8a6a16 !important;
    border: 1px solid #8a6a16;
  }
  .dot, .pip, .crest { display: none !important; }

  /* News list */
  .news-item { page-break-inside: avoid; border-color: #ccc !important; }
  .news-headline { color: #111 !important; font-size: 12pt; }
  .news-time { color: #555 !important; }

  /* Archive */
  .archive-item { border-color: #ccc !important; page-break-inside: avoid; }
  .archive-item .ah { color: #111 !important; }
  .archive-item .when b { color: #111 !important; }
  .archive-item .mw8 { background: #f5efdb !important; color: #8a6a16 !important; }

  /* Calendar */
  .cal-grid { grid-template-columns: 1fr 1fr !important; }
  .cal-day { border: 1px solid #ccc !important; background: #fff !important; }
  .cal-day .head { color: #111 !important; border-bottom: 1px solid #111; }
  .cal-event .e { color: #222 !important; }
  .imp .d { background: #999 !important; }
  .imp.high .d:nth-child(-n+3) { background: #b03b32 !important; }
  .imp.med .d:nth-child(-n+2) { background: #8a6a16 !important; }

  /* Make every link readable in print */
  a, a:visited { color: #111; text-decoration: underline; }

  /* Hide JS-only / no-print bits */
  #tape, .gauge { display: none !important; }

  /* Force a sensible page break between the major sections of about.html */
  #standards, #team, #contact { page-break-before: avoid; }
}
