/* ============================================================
   THE MERIDIAN — Independent International Daily
   Design system. Self-contained. Light + dark, restrained ink
   palette with a single crimson accent.
   ============================================================ */

:root {
  --paper:      #FBFAF6;
  --paper-2:    #F3F0E8;
  --ink:        #17140F;
  --ink-soft:   #433E36;
  --ink-mute:   #6E675C;
  --rule:       #DED8CC;
  --rule-soft:  #EAE5DB;
  --accent:     #A4161A;   /* Meridian Red */
  --accent-ink: #7E1114;
  --surface:    #FFFFFF;
  --shadow:     rgba(23,20,15,0.10);

  --serif-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --serif-text:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1220px;
  --gap: clamp(18px, 2.2vw, 34px);
}

html[data-theme='dark'] {
  --paper:      #131110;
  --paper-2:    #1B1917;
  --ink:        #ECE7DC;
  --ink-soft:   #C7C0B2;
  --ink-mute:   #948C7E;
  --rule:       #322E29;
  --rule-soft:  #262320;
  --accent:     #E5484D;
  --accent-ink: #F06A6E;
  --surface:    #1A1815;
  --shadow:     rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; font-family: var(--serif-display); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sans { font-family: var(--sans); }

/* ---------- Utility top bar ---------- */
.utility {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
  background: var(--paper);
}
.utility .wrap { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 16px; }
.utility__left, .utility__right { display: flex; align-items: center; gap: 16px; }
.utility__left b { color: var(--ink-soft); font-weight: 600; }
.util-sep { width: 1px; height: 14px; background: var(--rule); }
.ticker-markets { display: flex; gap: 14px; }
.ticker-markets span { white-space: nowrap; }
.mk-up { color: #1f7a4d; } html[data-theme='dark'] .mk-up { color: #56c78a; }
.mk-dn { color: var(--accent); }
.btn-ghost, .btn-solid {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--rule); padding: 6px 12px; border-radius: 2px; cursor: pointer;
  background: transparent; color: var(--ink-soft); transition: .15s;
}
.btn-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
#themeToggle { background: none; border: none; cursor: pointer; color: var(--ink-mute); font-family: var(--sans); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
#themeToggle:hover { color: var(--ink); }
.lang-switch { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.lang-switch:hover { color: var(--accent); }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding: 22px 0 14px; border-bottom: 1px solid var(--ink); position: relative; }
.masthead__rule { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--ink-mute); font-family: var(--sans); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; }
.masthead__rule::before, .masthead__rule::after { content: ""; height: 1px; width: min(120px, 16vw); background: var(--rule); }
.masthead__title { display: inline-flex; align-items: center; gap: 16px; margin: 8px 0 6px; }
.masthead__title h1 {
  font-family: var(--serif-display); font-weight: 900;
  font-size: clamp(38px, 8vw, 82px); letter-spacing: -0.02em; line-height: 1;
}
.masthead__glyph { width: clamp(34px, 6vw, 56px); height: clamp(34px, 6vw, 56px); color: var(--accent); flex: none; }
.masthead__dateline { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.masthead__dateline b { color: var(--ink-soft); font-weight: 600; }

/* ---------- Primary nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--ink); }
.nav.scrolled { box-shadow: 0 2px 12px var(--shadow); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.nav__links { display: flex; gap: clamp(10px, 1.6vw, 26px); font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; }
.nav__links a { position: relative; padding: 6px 0; color: var(--ink-soft); white-space: nowrap; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .18s; }
.nav__links a:hover, .nav__links a.active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }
.nav__brand { font-family: var(--serif-display); font-weight: 900; font-size: 20px; display: none; }
.nav.scrolled .nav__brand { display: block; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink); }

/* ---------- Breaking ticker ---------- */
.breaking { display: flex; align-items: stretch; border-bottom: 1px solid var(--rule); background: var(--surface); overflow: hidden; }
.breaking__tag { background: var(--accent); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: .12em; padding: 0 14px; display: flex; align-items: center; white-space: nowrap; text-transform: uppercase; }
.breaking__track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.breaking__track ul { display: flex; gap: 42px; margin: 0; padding: 0 20px; list-style: none; white-space: nowrap; animation: ticker 42s linear infinite; font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); }
.breaking:hover .breaking__track ul { animation-play-state: paused; }
.breaking__track li b { color: var(--accent); font-weight: 700; margin-inline-end: 6px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Kicker / section labels ---------- */
.kicker { font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ink); padding-top: 10px; margin: 8px 0 18px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head .more { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.section-head .more:hover { color: var(--accent-ink); }

/* ---------- Editorial art (SVG placeholder frames) ---------- */
.art { display: block; width: 100%; position: relative; background: var(--paper-2); overflow: hidden; border: 1px solid var(--rule-soft); }
.art > svg { width: 100%; height: 100%; display: block; }
.art--16x9 { aspect-ratio: 16/9; }
.art--4x3 { aspect-ratio: 4/3; }
.art--1x1 { aspect-ratio: 1/1; }
.art--21x9 { aspect-ratio: 21/9; }

/* ---------- Story cards ---------- */
.story { display: block; }
.story .art { margin-bottom: 12px; }
.story h3 { font-size: 20px; margin-bottom: 6px; transition: color .15s; }
.story:hover h3 { color: var(--accent); }
.story .stand { font-family: var(--serif-text); color: var(--ink-soft); font-size: 15.5px; line-height: 1.5; margin: 0; }
.byline { font-family: var(--sans); font-size: 11.5px; color: var(--ink-mute); letter-spacing: .02em; margin-top: 8px; }
.byline b { color: var(--ink-soft); font-weight: 600; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--gap); padding: 26px 0; border-bottom: 1px solid var(--rule); }
.hero__lead h2 { font-size: clamp(30px, 4.6vw, 56px); line-height: 1.04; margin: 12px 0 14px; }
.hero__lead .stand { font-size: 19px; line-height: 1.55; max-width: 60ch; }
.hero__lead .art { margin: 16px 0; }
.hero__side { display: flex; flex-direction: column; }
.hero__side .story { padding: 16px 0; border-top: 1px solid var(--rule); }
.hero__side .story:first-child { border-top: none; padding-top: 0; }
.hero__side .story h3 { font-size: 18px; }
.mini { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.mini .art { margin: 0; }

/* Column grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.band { padding: 34px 0; border-bottom: 1px solid var(--rule); }
.col-rule > * + * { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 18px; }

/* Feature split within a band */
.feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gap); }
.feature__main h3 { font-size: clamp(24px, 3.2vw, 34px); }
.feature__list .story { display: grid; grid-template-columns: 1fr 84px; gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule); }
.feature__list .story:first-child { border-top: none; padding-top: 0; }
.feature__list .story h3 { font-size: 17px; }
.feature__list .story .art { margin: 0; }

/* ---------- Sidebar widgets ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: calc(var(--gap) + 8px); align-items: start; padding: 34px 0; }
.rail { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 30px; }
.widget h4 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 10px; }
.mostread { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.mostread li { counter-increment: mr; display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.mostread li:first-child { border-top: none; }
.mostread li::before { content: counter(mr); font-family: var(--serif-display); font-weight: 800; font-size: 26px; color: var(--accent); line-height: 1; }
.mostread a { font-family: var(--serif-text); font-size: 15.5px; line-height: 1.35; }
.mostread a:hover { color: var(--accent); }
.picks .story { padding: 12px 0; border-top: 1px solid var(--rule); }
.picks .story:first-child { border-top: none; padding-top: 0; }
.picks .story h3 { font-size: 16px; }
.newsletter { background: var(--surface); border: 1px solid var(--rule); padding: 20px; }
.newsletter h4 { border: none; margin-bottom: 6px; }
.newsletter p { font-size: 14px; color: var(--ink-soft); }
.newsletter form { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input { flex: 1; min-width: 0; font-family: var(--sans); font-size: 13px; padding: 9px 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 2px; }
.markets-w { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 13px; }
.markets-w li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--rule); }
.markets-w li:first-child { border-top: none; }

/* Opinion */
.op-card { padding: 18px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 48px 1fr; gap: 14px; }
.op-card:first-child { border-top: none; padding-top: 0; }
.op-mono { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif-display); font-weight: 800; font-size: 20px; }
.op-card h3 { font-size: 18px; font-style: italic; font-family: var(--serif-text); font-weight: 600; }
.op-card .who { font-family: var(--sans); font-size: 11.5px; color: var(--ink-mute); margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }

/* Badges */
.tag { font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tag--live { color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 2px; }

/* ---------- Article page ---------- */
.article { max-width: 720px; margin: 0 auto; padding: 34px 0 20px; }
.article__head { text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: 22px; margin-bottom: 24px; }
.article__head h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.08; margin: 12px 0 14px; }
.article__head .stand { font-family: var(--serif-text); font-size: 20px; color: var(--ink-soft); font-style: italic; }
.article__meta { font-family: var(--sans); font-size: 12.5px; color: var(--ink-mute); margin-top: 16px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.article__body { font-size: 19px; line-height: 1.72; }
/* Drop cap removed — uniform letter sizing across the whole article (both editions). */
.article__body p:first-of-type::first-letter { font: inherit; float: none; color: inherit; padding: 0; }
.article__body h2 { font-size: 26px; margin: 32px 0 12px; }
.pullquote { font-family: var(--serif-display); font-weight: 700; font-size: 27px; line-height: 1.25; color: var(--ink); border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); padding: 20px 0; margin: 30px 0; text-align: center; }
.article__hero { margin: 0 0 6px; }
.cap { font-family: var(--sans); font-size: 12px; color: var(--ink-mute); padding: 8px 2px 0; }

/* ---------- Page hero for section pages ---------- */
.page-hero { border-bottom: 3px solid var(--ink); padding: 26px 0 18px; margin-bottom: 6px; }
.page-hero h1 { font-size: clamp(34px, 6vw, 64px); }
.page-hero p { font-family: var(--sans); color: var(--ink-mute); max-width: 60ch; margin: 8px 0 0; }

/* ---------- About / founding ---------- */
.founding { max-width: 760px; margin: 0 auto; padding: 40px 0; }
.founding .stand { font-family: var(--serif-text); font-size: 22px; font-style: italic; color: var(--ink-soft); text-align: center; margin-bottom: 30px; }
.founding p { font-size: 19px; line-height: 1.72; }
.sign { text-align: center; margin-top: 34px; font-family: var(--serif-display); }
.sign .name { font-size: 28px; font-weight: 800; }
.sign .role { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); margin: 36px 0; }
.pillar { border-top: 3px solid var(--accent); padding-top: 14px; }
.pillar h3 { font-size: 20px; margin-bottom: 8px; }
.pillar p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.foot { border-top: 3px double var(--ink); margin-top: 20px; padding: 40px 0 30px; background: var(--paper-2); }
.foot__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--gap); }
.foot__brand h2 { font-family: var(--serif-display); font-size: 30px; font-weight: 900; }
.foot__brand p { font-family: var(--sans); font-size: 13px; color: var(--ink-mute); margin-top: 8px; max-width: 34ch; }
.foot__col h5 { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.foot__col a { display: block; font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); padding: 5px 0; }
.foot__col a:hover { color: var(--accent); }
.foot__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 30px; padding-top: 18px; font-family: var(--sans); font-size: 12px; color: var(--ink-mute); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile nav drawer ---------- */
.drawer { position: fixed; inset: 0; background: var(--paper); z-index: 100; transform: translateX(-100%); transition: transform .28s; padding: 24px; overflow: auto; }
.drawer.open { transform: none; }
.drawer a { display: block; font-family: var(--serif-display); font-weight: 800; font-size: 26px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.drawer__close { float: right; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail .widget { flex: 1 1 280px; }
  .hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .feature, .foot__top { grid-template-columns: 1fr; }
  .foot__top { gap: 24px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .utility__right .subscribe-txt, .util-markets-lg { display: none; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__brand { display: block; }
  .grid-3, .grid-4, .grid-2, .pillars { grid-template-columns: 1fr; }
  .mini { grid-template-columns: 80px 1fr; }
  .masthead__title { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .breaking__track ul { animation: none; }
}
