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

:root {
  --red: #cc0000;
  --red-dark: #a30000;
  --nav-bg: #0c0c0c;
  --text: #0c0c0c;
  --text-muted: #555;
  --border: #e0e0e0;
  --bg: #f7f7f7;
  --white: #fff;
  --tag-font: 11px;
}

body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Top Bar ── */
.top-bar {
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 44px;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 2px;
  font-style: italic;
}

.top-nav {
  display: flex;
  gap: 0;
}

.top-nav a {
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  border-right: 1px solid #2a2a2a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}

.top-nav a:first-child { border-left: 1px solid #2a2a2a; }
.top-nav a:hover { color: #fff; background: #1a1a1a; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-right a {
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.live-btn {
  background: var(--red);
  color: white !important;
  padding: 4px 10px;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
}

/* ── Breaking Ticker ── */
.ticker {
  background: var(--red);
  display: flex;
  align-items: center;
  height: 32px;
  overflow: hidden;
}

.ticker-label {
  background: var(--red-dark);
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  color: white;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: ticker-scroll 38s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── Page Container ── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ── Thumbnail Placeholder ── */
.thumb {
  width: 100%;
  display: block;
  background: linear-gradient(135deg, #1a2a3a 0%, #2a3a4a 100%);
  position: relative;
  overflow: hidden;
}

.thumb::after {
  content: attr(data-cat);
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
}

/* Per-category thumb colors */
.thumb[data-cat="World"]      { background: linear-gradient(135deg, #0d2137 0%, #1a3a5c 100%); }
.thumb[data-cat="Technology"] { background: linear-gradient(135deg, #0d1a2d 0%, #1a2d50 100%); }
.thumb[data-cat="Business"]   { background: linear-gradient(135deg, #0d2010 0%, #1a4020 100%); }
.thumb[data-cat="Science"]    { background: linear-gradient(135deg, #1a0d30 0%, #2d1a50 100%); }
.thumb[data-cat="Health"]     { background: linear-gradient(135deg, #300d0d 0%, #501a1a 100%); }
.thumb[data-cat="US"]         { background: linear-gradient(135deg, #2d200d 0%, #50381a 100%); }
.thumb[data-cat="Weather"]    { background: linear-gradient(135deg, #0d2030 0%, #1a3a50 100%); }

/* ── Category Tag ── */
.cat-tag {
  font-size: var(--tag-font);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 5px;
  display: block;
}

/* ── Hero Layout ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-main { position: relative; background: var(--white); }

.hero-main .thumb { height: 420px; }

.hero-main .card-body {
  padding: 16px;
}

.hero-main .headline {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-main .deck {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}

.hero-side .card {
  background: var(--white);
  flex: 1;
  display: grid;
  grid-template-columns: 130px 1fr;
}

.hero-side .thumb { height: 100%; min-height: 120px; }

.hero-side .card-body { padding: 12px; }

.hero-side .headline {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

/* ── Section Grid ── */
.section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 3px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

/* ── Card ── */
.card {
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.card .thumb { height: 190px; }

.card .card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .headline {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  flex: 1;
}

.card .deck {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.card .byline {
  font-size: 11px;
  color: #888;
  margin-top: 10px;
  font-weight: 600;
}

.card a:hover .headline { color: var(--red); }

/* ── Footer ── */
.site-footer {
  background: var(--nav-bg);
  color: #888;
  padding: 28px 16px;
  margin-top: 32px;
  font-size: 12px;
  text-align: center;
}

.site-footer .logo { font-size: 22px; margin-bottom: 12px; }
.site-footer a { color: #666; margin: 0 8px; }
.site-footer a:hover { color: #aaa; }
.footer-links { margin-bottom: 12px; }
.footer-copy { color: #555; font-size: 11px; }

/* ── Category Page ── */
.top-nav a.active { color: #fff; background: var(--red); }

.cat-banner {
  background: var(--red);
  padding: 18px 0 14px;
}
.cat-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.cat-banner-name {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}
.cat-banner-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.cat-featured { margin-bottom: 24px; }
.cat-featured .card {
  display: grid;
  grid-template-columns: 360px 1fr;
}
.cat-featured .thumb { height: 260px; }
.cat-featured .card-body { padding: 24px; }
.cat-featured .headline { font-size: 22px; font-weight: 800; line-height: 1.25; }
.cat-featured .deck { font-size: 15px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }

.cat-empty {
  text-align: center;
  padding: 72px 0;
  color: var(--text-muted);
}
.cat-empty-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.cat-empty-sub { font-size: 14px; }

/* ── Article Page ── */
.article-page { max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; }

.article-cat { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }

.article-headline {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.article-deck {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  font-weight: 400;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #888;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 24px;
}

.article-author { font-weight: 700; color: var(--text); }

.article-hero-img {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #1a2a3a, #2a4a6a);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.article-hero-img::after {
  content: attr(data-cat);
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
}

.img-caption {
  font-size: 12px;
  color: #888;
  margin-bottom: 28px;
  font-style: italic;
}

.article-body p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 22px;
  color: #1a1a1a;
}

.article-body p:first-child::first-letter {
  font-size: 60px;
  font-weight: 900;
  float: left;
  line-height: 0.85;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--red);
}

.related-section {
  border-top: 3px solid var(--red);
  margin-top: 40px;
  padding-top: 16px;
}

.related-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.related-list { list-style: none; }
.related-list li { border-bottom: 1px solid var(--border); padding: 10px 0; }
.related-list a { font-size: 15px; font-weight: 600; color: var(--text); }
.related-list a:hover { color: var(--red); }
