:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #262626;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --primary: #d90429;
  --primary-dark: #a80020;
  --primary-soft: #fde8ec;
  --black: #0a0a0a;
  --serif: 'Libre Baskerville', Georgia, serif;
  --body: 'Source Serif 4', Georgia, serif;
  --ui: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 0; }

/* ---------- Layout shell ---------- */
.app { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }

/* Top bar search form: fields sit on one row and wrap on small screens */
.topbar-form { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.topbar-form .search { flex: 1 1 220px; max-width: 360px; }

/* Sponsor banner (horizontal) */
.sponsor-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(90deg, #0a0a0a 0%, #0a0a0a 55%, #d90429 100%);
  color: #ffffff; border-radius: 12px; padding: 18px 24px; margin-bottom: 8px;
}
.sponsor-banner strong { display: block; font-family: var(--serif); font-size: 18px; }
.sponsor-banner span { font-size: 14px; color: #f5f5f5; }
.sponsor-banner .btn { margin-left: auto; background: #ffffff; color: var(--black); border-color: #ffffff; }
.sponsor-banner .btn:hover { background: var(--black); color: #ffffff; border-color: #ffffff; }
.sponsor-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid #ffffff; border-radius: 4px; padding: 2px 8px;
}

/* Black sidebar: the main navigation is the first thing people see */
.sidebar {
  background: var(--black);
  color: #ffffff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  border-right: 4px solid var(--primary);
}

.brand { padding: 0 24px 22px; border-bottom: 1px solid #262626; margin-bottom: 14px; }
.brand a { text-decoration: none; }
.brand .name { font-family: var(--serif); font-size: 26px; font-weight: 700; display: block; color: #ffffff; }
.brand .name::after { content: ""; display: block; width: 36px; height: 3px; background: var(--primary); margin-top: 8px; }
.brand .tagline { color: #a3a3a3; font-size: 13px; display: block; margin-top: 6px; }

.nav-label {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #a3a3a3; padding: 16px 24px 6px;
}

.nav a {
  display: block; padding: 11px 24px; color: #e5e5e5;
  text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav a:hover { color: #ffffff; background: #1f1f1f; }
.nav a.sub { padding-left: 40px; color: #a3a3a3; font-size: 14px; }
.nav a.active { background: var(--primary); color: #ffffff; margin: 0 12px; padding-left: 12px; border-radius: 8px; }
.nav a.active:hover { background: var(--primary-dark); }
.nav a.active.sub { padding-left: 28px; }
.nav hr { border: 0; border-top: 1px solid #262626; margin: 14px 24px; }

.sidebar-foot {
  margin-top: auto; padding: 16px 24px 0; border-top: 1px solid #262626;
  display: flex; align-items: center; gap: 12px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #d90429, #0a0a0a);
}
.sidebar-foot strong { display: block; font-size: 14px; color: #ffffff; }
.sidebar-foot span { color: #a3a3a3; font-size: 12px; }

.main { min-width: 0; }

/* ---------- Top bar: search and filters ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 32px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--primary) 0 120px, transparent 120px); }

/* Search and filters share one row: same height, border and radius */
.topbar-form { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; }

.search {
  display: flex; align-items: center; gap: 10px; flex: 1 1 200px; min-width: 160px; height: 44px;
  border: 1px solid #cfcfcf; border-radius: 10px; padding: 0 14px; color: var(--muted);
  background: #fafafa; transition: border-color .15s ease, box-shadow .15s ease;
}
.search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.search:focus-within { border-color: var(--black); background: var(--surface); box-shadow: 0 0 0 3px rgba(217, 4, 41, .15); }
.search input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 100%; background: transparent; color: var(--ink); }
.search input::placeholder { color: #8a8a8a; }

.select {
  height: 44px; appearance: none; -webkit-appearance: none; cursor: pointer;
  border: 1px solid #d6d6d6; border-radius: 10px; padding: 0 38px 0 14px;
  background-color: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  min-width: 150px; flex: 0 1 auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d90429' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select option { color: var(--ink); font-weight: 500; }
.select:hover { border-color: #9a9a9a; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.select:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(217, 4, 41, .15); }

.topbar-form .btn { height: 44px; padding: 0 24px; }

.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar .date {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  background: var(--black); color: #ffffff; border-radius: 10px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  border-bottom: 3px solid var(--primary);
}

.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  position: relative; border: 1px solid #cfcfcf; border-radius: 10px; background: var(--surface);
  color: var(--black); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--black); }
.icon-btn::after {
  content: ""; position: absolute; top: 9px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #ffffff; border: 2px solid var(--primary); border-radius: 10px;
  padding: 12px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.dark { background: var(--black); border-color: var(--black); }
.btn.dark:hover { background: #2a2a2a; border-color: #2a2a2a; }
.btn.ghost {
  background: var(--surface); color: var(--black); border: 2px solid var(--black);
}
.btn.ghost:hover { background: var(--black); color: #ffffff; border-color: var(--black); }

.content { padding: 32px 36px 56px; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary);
}
.eyebrow .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 6px; }

/* Section titles: a short red rule above each heading helps scanning */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 44px 0 20px; }
.section-head h2 { font-size: 24px; padding-top: 12px; border-top: 3px solid var(--primary); }
.section-head a { color: var(--primary); font-size: 14px; text-decoration: none; font-weight: 700; }
.section-head a:hover { text-decoration: underline; }

/* ---------- Pills & tags ---------- */
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--primary); border: 1px solid var(--primary);
  font-size: 12px; font-weight: 600; color: #ffffff;
}
.tag.muted { background: var(--surface); color: var(--ink-soft); border-color: #bdbdbd; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; background: var(--primary-soft);
  color: var(--primary-dark); font-size: 13px; font-weight: 600;
}

.meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Image stand-ins: swap for real <img> files later. Red, white and black only. */
.media {
  width: 100%; aspect-ratio: 16 / 10; position: relative;
  background: linear-gradient(135deg, #d90429 0%, #0a0a0a 80%);
}
.media.warm { background: linear-gradient(135deg, #ff4d5e 0%, #7a0014 70%, #0a0a0a 100%); }
.media.cool { background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 60%, #d90429 100%); }
.media.green { background: linear-gradient(135deg, #ffffff 0%, #8a8a8a 70%, #1a1a1a 100%); }
.media.grey { background: linear-gradient(135deg, #ffffff 0%, #b5b5b5 100%); }
.media.violet { background: linear-gradient(135deg, #fca5ae 0%, #a80020 70%, #2a0008 100%); }
.media .tag { position: absolute; top: 14px; left: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
/* Long headlines show at most 3 lines in cards; the full text is on the article page */
.card h3, .brief-row h3 {
  font-size: 21px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card p { margin: 0; color: var(--ink-soft); font-family: var(--body); font-size: 16px; }
.card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.card .foot a { color: var(--primary); text-decoration: none; font-weight: 700; font-size: 14px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* ---------- Frontpage hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.hero .text { padding: 44px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: 38px; }
.hero p { margin: 0; font-family: var(--body); font-size: 18px; color: var(--ink-soft); }
.hero .actions { margin-top: auto; display: flex; align-items: center; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero .media { aspect-ratio: auto; height: 100%; min-height: 360px; }

/* Live update strip: plain-language label, easy to read at a glance */
.ticker {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--black); color: #f5f5f5; border-radius: 10px;
  padding: 12px 18px; margin-bottom: 22px; font-size: 14px;
}
.ticker strong { color: #ffffff; background: var(--primary); padding: 3px 10px; border-radius: 6px; letter-spacing: .04em; font-size: 12px; text-transform: uppercase; }
.ticker .right { margin-left: auto; color: #a3a3a3; }

/* ---------- Briefings list + sidebar panels ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }

.brief-row {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 16px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.brief-row:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.brief-row .media { aspect-ratio: 4 / 3; border-radius: 8px; }
.brief-row h3 { font-size: 20px; margin: 8px 0; }
.brief-row p { margin: 0; font-family: var(--body); color: var(--ink-soft); font-size: 16px; }
.brief-row .read { margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin-bottom: 22px;
}
.panel h4 {
  margin: 0 0 16px; font-family: var(--serif); font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding-bottom: 12px; border-bottom: 3px solid var(--primary);
}

.pick { display: grid; grid-template-columns: 40px 1fr; gap: 6px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.pick:first-of-type { border-top: 0; padding-top: 0; }
.pick .num { font-family: var(--serif); font-size: 24px; color: var(--primary); grid-row: span 2; }
.pick .cat { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pick .title { font-family: var(--serif); font-size: 15px; line-height: 1.4; }
.pick .meta { font-size: 12px; }

.newsletter { background: var(--black); border-color: var(--black); color: #ffffff; }
.newsletter h4 { color: #ffffff; border-bottom-color: var(--primary); }
.newsletter p { font-family: var(--body); color: #e5e5e5; margin: 8px 0 16px; font-size: 15px; }
.newsletter .meta { color: #a3a3a3; }
.newsletter .row { display: flex; gap: 8px; }
.newsletter input, .field {
  flex: 1; min-width: 0; border: 1px solid #bdbdbd; border-radius: 10px; padding: 11px 14px;
  font: inherit; background: var(--surface); color: var(--ink);
}
.newsletter input { border-color: #404040; }
.newsletter input:focus, .field:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: var(--black); color: #ffffff; border-radius: 12px; padding: 24px; margin: 28px 0; }
.stat-strip .big { font-family: var(--serif); font-size: 36px; color: #ff4d5e; }
.stat-strip .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #ffffff; font-weight: 700; margin-top: 4px; }
.stat-strip .meta { color: #a3a3a3; }

.quote { border-left: 5px solid var(--primary); background: var(--surface); padding: 22px 26px; margin: 30px 0; border-radius: 0 12px 12px 0; }
.quote blockquote { margin: 0; font-family: var(--body); font-style: italic; font-size: 20px; }
.quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); font-weight: 700; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin: 14px 0 8px; }
.bars div { flex: 1; background: #d4d4d4; border-radius: 4px 4px 0 0; }
.bars div.on { background: var(--primary); }

/* ---------- Article ---------- */
.article { max-width: 1040px; }
.article .title { font-size: 42px; margin: 14px 0 12px; }
.article .deck { font-family: var(--body); font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.byline { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; flex-wrap: wrap; }
.byline .who strong { display: block; font-size: 15px; }
.byline .who span { color: var(--muted); font-size: 13px; }
.byline .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.byline .tools span { border: 1px solid #bdbdbd; border-radius: 8px; padding: 7px 12px; font-size: 13px; color: var(--ink-soft); background: var(--surface); }
.article .media { border-radius: 14px; aspect-ratio: 16 / 8; }
.article-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; margin-top: 30px; }
.prose p { font-family: var(--body); font-size: 18px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 20px; }
.prose h2 { font-size: 24px; margin: 40px 0 14px; padding-top: 12px; border-top: 3px solid var(--primary); }
.prose .dropcap::first-letter { font-family: var(--serif); float: left; font-size: 60px; line-height: .9; padding: 6px 10px 0 0; color: var(--primary); font-weight: 700; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.aside-box h5 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.aside-box ul { margin: 0; padding-left: 20px; font-family: var(--body); color: var(--ink-soft); font-size: 15px; }
.aside-box li { margin-bottom: 10px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Category feed filters ---------- */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; }
.filters .label { color: var(--ink-soft); font-weight: 600; }
.filters .clear { color: var(--primary); font-size: 14px; margin-left: 6px; }
.filters .tag { font-size: 13px; padding: 6px 14px; }
.sortbar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.sortbar .label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 36px; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.pager .pages { display: flex; gap: 8px; align-items: center; }
.pager .pages a, .pager .pages span {
  min-width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--ink-soft); border: 1px solid #bdbdbd; background: var(--surface); font-weight: 600;
}
.pager .pages .cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Footer ---------- */
footer.site-foot { background: var(--black); color: #a3a3a3; font-size: 14px; border-top: 4px solid var(--primary); }
.foot-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px;
  max-width: 1200px; margin: 0 auto; padding: 44px 36px 32px;
}
.foot-name { display: block; font-family: var(--serif); font-size: 24px; color: #ffffff; }
.foot-text { margin: 10px 0 18px; max-width: 420px; }
.foot-links { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a, .foot-list a { color: #e5e5e5; text-decoration: none; }
.foot-links a:hover, .foot-list a:hover { color: var(--primary); text-decoration: underline; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a {
  color: #ffffff; text-decoration: none; font-weight: 700; font-size: 13px;
  border: 1px solid #404040; border-radius: 8px; padding: 8px 16px;
}
.social a:hover { background: var(--primary); border-color: var(--primary); }
.foot-col h5 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary);
}
.foot-col h5:not(:first-child) { margin-top: 26px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list li { padding: 8px 0; border-top: 1px solid #262626; }
.foot-list li:first-child { border-top: 0; padding-top: 0; }
.copy {
  border-top: 1px solid #262626; padding: 16px 36px; text-align: center; font-size: 13px; color: #a3a3a3;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .layout, .article-cols { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-inner { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar, .topbar-form { flex-wrap: wrap; }
  .topbar-form .search { flex-basis: 100%; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 4px solid var(--primary); padding: 16px 0; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav a, .nav a.active, .nav a.sub { margin: 0; border-radius: 0; padding: 10px 14px; font-size: 14px; }
  .nav-label, .nav hr, .sidebar-foot { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero .media { min-height: 240px; }
  .brief-row { grid-template-columns: 1fr; }
  .article .title { font-size: 32px; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .topbar .date { display: none; }
  .select { min-width: 0; flex: 1 1 140px; }
  .content { padding: 22px 16px 40px; }
  .hero .text { padding: 24px; }
  .hero h1 { font-size: 28px; }
  .stat-strip { grid-template-columns: 1fr; }
  .sortbar { margin-left: 0; }
  .ticker .right { margin-left: 0; }
}
