:root {
  --navy: #0E2A5E;
  --navy-deep: #081A3D;
  --white: #FFFFFF;
  --paper: #F5F7FB;
  --gold: #C99A3E;
  --ink: #14171C;
  --ink-soft: #5B6270;
  --rule: #E1E5EE;
  --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .serif { font-family: 'Fraunces', serif; font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }

/* ---------- Masthead ---------- */
header.masthead { background: var(--navy-deep); }
.masthead .wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 122px;
}
.masthead-title-row { display: flex; align-items: baseline; gap: 22px; }
.wordmark {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 46px;
  color: #fff;
  letter-spacing: 0.01em;
}
.wordmark em {
  font-style: italic;
  font-weight: 500;
  color: #CBDAF5;
}
.today-date {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  color: #9DB8EF;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-left: 22px;
  border-left: 1px solid #2C4A85;
}
.badge-new {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #A9BEE8;
}
.badge-new span { background: var(--gold); color: var(--navy-deep); font-weight: 700; padding: 2px 7px; border-radius: 2px; font-size: 10.5px; }

/* ---------- Currency ticker ---------- */
.currency-ticker { background: var(--navy); border-top: 1px solid #1F3D82; }
.currency-ticker .wrap { display: flex; align-items: center; gap: 28px; height: 44px; overflow: hidden; }
.currency-ticker .label {
  font-size: 11px; font-weight: 700; color: #9DB8EF; text-transform: uppercase; letter-spacing: 0.04em;
  flex-shrink: 0; padding-right: 16px; border-right: 1px solid #2C4A85;
}
.ticker-track { display: flex; align-items: center; gap: 28px; flex-shrink: 0; animation: ticker-scroll 32s linear infinite; }
.currency-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.currency-ticker .pair { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 13px; }
.currency-ticker .pair .name { color: #CBDAF5; font-weight: 600; }
.currency-ticker .pair .value { color: #fff; font-weight: 700; }
.currency-ticker .pair .delta { font-size: 11.5px; font-weight: 600; }
.currency-ticker .pair .delta.up { color: #4ADE80; }
.currency-ticker .pair .delta.down { color: #F87171; }

/* ---------- Weather strip ---------- */
.weather-strip { border-bottom: 1px solid var(--rule); }
.weather-strip .wrap { display: flex; align-items: center; height: 44px; gap: 22px; font-size: 13px; overflow-x: auto; }
.weather-strip .label { color: var(--navy); font-weight: 700; font-size: 12px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.weather-strip .label::before { content: '☀'; }
.weather-strip .city { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.weather-strip .city .name { color: var(--ink); font-weight: 600; }
.weather-strip .city .temp { color: var(--ink-soft); }
.weather-strip .sep { color: var(--rule); }

.edition-row { border-bottom: 1px solid var(--rule); }
.edition-row .wrap { height: 38px; display: flex; align-items: center; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.breadcrumb a:hover { text-decoration: underline; color: var(--navy); }
.breadcrumb .sep { margin: 0 6px; color: var(--rule); }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px dashed var(--rule);
  color: var(--ink-soft); font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase;
}
.ad-leaderboard { max-width: 728px; height: 90px; margin: 20px auto; }
.ad-sidebar { width: 100%; height: 250px; margin-bottom: 20px; }
.ad-incontent { max-width: 728px; height: 90px; margin: 8px auto 32px; }

/* ---------- Main layout ---------- */
.main-grid { padding: 28px 0 40px; }
.main-layout {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  grid-template-areas:
    "aside lead side"
    "articles articles articles";
  gap: 28px;
  align-items: start;
}
.main-layout > aside { grid-area: aside; }
.main-layout > .lead-story { grid-area: lead; }
.main-layout > .side-col { grid-area: side; }
.main-layout > .articles-col { grid-area: articles; border-top: 1px solid var(--rule); padding-top: 28px; margin-top: 4px; }
.main-layout > .articles-col .section-head { margin-bottom: 20px; }
.main-layout > .articles-col .card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* Sidebar */
.brief-card { border: 1px solid var(--rule); border-radius: 4px; padding: 18px; margin-bottom: 20px; }
.brief-card h3 { font-size: 18px; margin-bottom: 8px; }
.brief-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 10px; }
.brief-card .by { font-size: 11.5px; color: var(--ink-soft); }

.tabs { display: flex; gap: 18px; border-bottom: 2px solid var(--rule); margin-bottom: 14px; }
.tabs .tab { font-size: 13.5px; font-weight: 700; padding-bottom: 8px; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs .tab.active { color: var(--ink); border-bottom-color: var(--gold); }

.rank-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.rank-item .num { font-family: 'Fraunces', serif; font-weight: 700; font-size: 17px; color: var(--navy); flex-shrink: 0; width: 18px; }
.rank-item .rank-body { flex: 1; min-width: 0; }
.rank-item .title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rank-item h4 { font-size: 13.5px; font-weight: 700; line-height: 1.3; margin-bottom: 3px; }
.rank-item h4 a:hover { text-decoration: underline; }
.rank-item .views { font-size: 11px; color: var(--ink-soft); }

/* ---------- Title row + Share button (reused everywhere a headline appears) ---------- */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.title-row > a { flex: 1; min-width: 0; }
.title-row h1 a:hover, .title-row h3 a:hover { text-decoration: underline; }

.share-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px; font-weight: 700;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 5px 12px;
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.share-btn:hover { background: #EAEFF9; border-color: #C9D3E8; }
.share-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.share-btn.small { font-size: 10.5px; padding: 3px 9px; }

/* Toast */
.share-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--navy-deep); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 100px; box-shadow: 0 8px 24px rgba(8,26,61,0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.share-toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Lead */
.lead-story .thumb-link { display: block; margin-bottom: 16px; }
.lead-story .thumb {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--paper), #DCE4F3);
  border: 1px solid var(--rule);
}
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 10px; }
.lead-story h1 { font-size: 36px; }
.lead-story .dek { font-size: 16px; color: var(--ink-soft); margin: 12px 0 10px; max-width: 56ch; }
.lead-story .byline { font-size: 12.5px; color: var(--ink-soft); }
.lead-story .byline a { font-weight: 600; text-decoration: underline; }

/* Right column stories */
.side-story { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.side-story .thumb-link { display: block; margin-bottom: 10px; }
.side-story .thumb { width: 100%; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--paper), #DCE4F3); border: 1px solid var(--rule); }
.side-story h3 { font-size: 19px; margin-bottom: 6px; }
.side-story .byline { font-size: 12px; color: var(--ink-soft); }
.side-story .byline a { font-weight: 600; text-decoration: underline; }

/* ---------- Section rows below ---------- */
.section-row { padding: 32px 0; border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 21px; }
.section-head a.more { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.section-head a.more:hover { text-decoration: underline; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card .thumb-link { display: block; margin-bottom: 10px; }
.card .thumb { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--paper), #DCE4F3); border: 1px solid var(--rule); }
.card h3 { font-size: 15.5px; }
.card .meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; }
.card .title-row { gap: 8px; }
.card .share-btn { padding: 4px 10px; font-size: 10.5px; }

/* ---------- Article detail page ---------- */
.article-page { padding: 8px 0 48px; }
.article-page .wrap.narrow { max-width: 760px; }
.article-page .tag { margin-top: 18px; }
.article-page h1 { font-size: 38px; margin-bottom: 14px; }
.article-page .dek { font-size: 17px; color: var(--ink-soft); margin-bottom: 16px; max-width: 62ch; }
.article-page .byline-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.article-page .byline { font-size: 13px; color: var(--ink-soft); }
.article-page .byline a { font-weight: 600; text-decoration: underline; color: var(--ink); }
.article-page .hero-thumb { width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--paper), #DCE4F3); border: 1px solid var(--rule); margin-bottom: 26px; }
.article-body p { font-size: 17px; line-height: 1.75; color: #262B33; margin-bottom: 20px; }
.article-body p:first-of-type { font-size: 18.5px; }
.share-row-bottom { display: flex; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.share-row-bottom span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- Static / info pages ---------- */
.info-page { padding: 40px 0 64px; }
.info-page .wrap.narrow { max-width: 720px; }
.info-page h1 { font-size: 34px; margin-bottom: 18px; }
.info-page h2 { font-size: 20px; margin: 28px 0 10px; }
.info-page p, .info-page li { font-size: 15.5px; line-height: 1.7; color: #33394A; margin-bottom: 14px; }
.info-page ul { padding-left: 20px; margin-bottom: 14px; }
.info-page .updated { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 28px; }

/* ---------- 404 ---------- */
.error-page { padding: 90px 0; text-align: center; }
.error-page .code { font-family: 'Fraunces', serif; font-weight: 700; font-size: 100px; color: var(--navy); line-height: 1; }
.error-page h1 { font-size: 26px; margin: 10px 0 12px; }
.error-page p { font-size: 15px; color: var(--ink-soft); margin-bottom: 26px; }
.error-page .home-btn { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; padding: 12px 26px; border-radius: 4px; }
.error-page .home-btn:hover { background: var(--navy-deep); }

/* ---------- Footer ---------- */
footer { background: var(--navy-deep); color: #A9BEE8; padding: 34px 0 20px; font-size: 12.5px; border-top: 1px solid #1F3D82; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid #1F3D82; }
.foot-grid .brand { font-family: 'Fraunces', serif; font-size: 19px; color: #fff; margin-bottom: 8px; }
.foot-grid .brand-desc { color: #8FA6D6; line-height: 1.6; max-width: 30ch; }
.foot-grid h5 { color: #fff; font-size: 11px; font-weight: 700; margin-bottom: 12px; letter-spacing: 0.02em; }
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a:hover { color: #fff; }
.foot-bottom { padding-top: 16px; display: flex; justify-content: space-between; color: #6E86BE; font-size: 11px; }

@media (max-width: 980px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lead"
      "side"
      "articles"
      "aside";
  }
  .main-layout > .articles-col .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .masthead .wrap { height: auto; padding: 20px 0; flex-direction: column; gap: 10px; }
  .badge-new { position: static; transform: none; }
  .wordmark { font-size: 34px; }
  .today-date { font-size: 13px; padding-left: 12px; }
  .lead-story h1 { font-size: 26px; }
  .article-page h1 { font-size: 27px; }
  .error-page .code { font-size: 72px; }
  .card-grid { grid-template-columns: 1fr; }
  .main-layout > .articles-col .card-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .ticker-track { animation: none !important; } }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }