:root {
  --bg: #FAF6ED;
  --bg-panel-a: #e8eef4;
  --bg-panel-b: #f7ead2;
  --blue: #1B3A5E;
  --blue-deep: #122840;
  --ochre: #C98A3A;
  --ochre-deep: #a86e26;
  --ink: #23201A;
  --ink-soft: #5b5648;
  --card-bg: #FFFFFF;
  --card-border: rgba(27, 58, 94, 0.10);
  --shadow: 0 8px 24px rgba(27, 58, 94, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---------- Masthead ---------- */

.masthead-panel {
  position: relative;
  background:
    radial-gradient(120% 140% at 15% 0%, var(--bg-panel-b) 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 0%, var(--bg-panel-a) 0%, transparent 60%),
    linear-gradient(180deg, #FFFDF8 0%, var(--bg) 100%);
  padding: 44px 20px 36px;
  text-align: center;
  border-bottom: 1px solid rgba(27, 58, 94, 0.08);
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.36em;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 900;
  line-height: 1;
}

.logo-word {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.logo-text {
  display: block;
  font-size: clamp(2.1rem, 9vw, 3.1rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo-word--blue .logo-text {
  background: linear-gradient(180deg, #2f5f94 0%, #1B3A5E 55%, #10263e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-word--mid .logo-text {
  font-size: clamp(1.05rem, 4.2vw, 1.5rem);
  font-weight: 700;
  color: #171512;
  padding-bottom: 0.28em;
}

.logo-word--red .logo-text {
  background: linear-gradient(180deg, #e14a4a 0%, #c21f1f 55%, #8c1515 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-bar {
  height: 4px;
  border-radius: 3px;
  width: 100%;
}

.logo-bar--blue { background: linear-gradient(90deg, #15314f, #3d7ab8); }
.logo-bar--gold { background: linear-gradient(90deg, #a8701f, var(--ochre)); }
.logo-bar--red  { background: linear-gradient(90deg, #8c1515, #d93a3a); }

.masthead-kicker {
  margin: 0;
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}

/* ---------- Feed / Sections ---------- */

.feed {
  padding: 8px 16px 12px;
}

.section {
  margin-top: 34px;
}

.section-head {
  margin-bottom: 14px;
}

.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.pill--blue { background: var(--blue); }
.pill--ochre { background: var(--ochre); }

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(27, 58, 94, 0.14);
  outline: none;
}

.card-headline {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.14rem;
  line-height: 1.28;
  margin: 0 0 8px;
  color: var(--blue-deep);
}

.card-preview {
  font-size: 0.93rem;
  line-height: 1.52;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ochre-deep);
}

.card-link svg { transition: transform 0.15s ease; }
.card:hover .card-link svg { transform: translateX(3px); }

/* Politics: portrait image on the right, text wraps on the left */

.cards--politics .card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}

.cards--politics .card-body {
  flex: 1 1 auto;
  padding: 18px 16px 18px 18px;
  min-width: 0;
}

.cards--politics .card-media {
  flex: 0 0 34%;
  max-width: 150px;
  position: relative;
}

.cards--politics .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 160px;
}

/* Economy: full-width banner with overlaid headline */

.cards--economy .card-media {
  position: relative;
  width: 100%;
  height: 210px;
}

.cards--economy .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cards--economy .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 32, 0) 35%, rgba(8, 16, 26, 0.88) 100%);
}

.cards--economy .card-overlay-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  z-index: 1;
}

.cards--economy .card-overlay-text .card-headline {
  color: #fff;
  margin-bottom: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.cards--economy .card-body {
  padding: 14px 18px 18px;
}

/* Finance: text-only with colored top accent bar */

.cards--finance .card {
  border-top: 4px solid var(--ochre);
}

.cards--finance .card-body {
  padding: 18px 18px 18px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 48px;
  padding: 32px 20px 44px;
  text-align: center;
  border-top: 1px solid rgba(27, 58, 94, 0.1);
}

.footer-logo {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue-deep);
  margin-bottom: 6px;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Article overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.overlay.is-open { display: block; }

.overlay-inner {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
}

.overlay-close {
  position: sticky;
  top: 14px;
  left: 100%;
  transform: translateX(-54px);
  width: 40px;
  height: 40px;
  margin-right: 14px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--blue-deep);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.overlay-media {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  margin-top: -40px;
}

.overlay-media--none {
  height: 24px;
}

.overlay-body {
  padding: 22px 20px 56px;
}

.overlay-pill-row {
  margin-bottom: 14px;
}

.overlay-headline {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.62rem;
  line-height: 1.26;
  color: var(--blue-deep);
  margin: 0 0 18px;
}

.overlay-paragraph {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink);
  margin: 0 0 16px;
}

/* ---------- Responsive ---------- */

@media (min-width: 480px) {
  .cards--politics .card-media { flex-basis: 38%; max-width: 180px; }
}

@media (max-width: 380px) {
  .logo-word--mid .logo-text { font-size: 1rem; }
}
