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

:root {
  --primary: #d71920;
  --primary-dark: #a90f15;
  --text: #171717;
  --muted: #737373;
  --border: #e7e7e7;
  --bg: #f6f7f9;
  --white: #ffffff;
  --dark: #111827;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
}

.topbar {
  background: #111827;
  color: #fff;
  font-size: 13px;
}

.topbar-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-note {
  opacity: .75;
}

.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -1px;
  white-space: nowrap;
}

.logo > span:last-child > span {
  color: var(--primary);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  border-radius: 7px;
  font-size: 22px;
  font-weight: 900;
}

.search-box {
  display: flex;
  width: min(460px, 50vw);
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 14px;
}

.search-box button {
  width: 48px;
  border: 0;
  background: #f2f2f2;
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
}

.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  border: 0;
  background: transparent;
  padding: 14px 16px;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.breaking {
  background: var(--primary);
  color: #fff;
}

.breaking-inner {
  height: 42px;
  display: flex;
  align-items: center;
}

.breaking-label {
  font-weight: 800;
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,.35);
  white-space: nowrap;
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  margin-left: 18px;
}

#tickerText {
  display: inline-block;
  animation: ticker 25s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.main {
  padding: 30px 0 55px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.page-heading h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.refresh-btn {
  border: 1px solid #ddd;
  background: #fff;
  padding: 10px 16px;
  border-radius: 7px;
  font-weight: 700;
}

.refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.status {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 20px;
  color: var(--muted);
}

.status.error {
  color: #9b1c1c;
  background: #fff5f5;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 35px;
}

.hero-card,
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.hero-card:hover,
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 25px rgba(0,0,0,.08);
}

.hero-card:first-child {
  grid-row: span 2;
}

.card-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #ddd;
}

.hero-card:first-child .card-image {
  height: 310px;
}

.card-body {
  padding: 15px;
}

.category {
  display: inline-block;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 7px;
}

.card-title {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
}

.hero-card:first-child .card-title {
  font-size: 27px;
}

.meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #111827;
  padding-bottom: 9px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 22px;
}

.section-title span {
  font-size: 12px;
  color: var(--muted);
}

.section-title.small {
  border-bottom-width: 2px;
}

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

.news-card .card-image {
  height: 190px;
}

.news-card .card-title {
  font-size: 18px;
}

.load-more {
  display: block;
  margin: 24px auto 0;
  padding: 11px 24px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
}

.load-more:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
}

.headline-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.headline-item:last-child {
  border-bottom: 0;
}

.headline-number {
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
  margin-right: 8px;
}

.headline-title {
  font-weight: 700;
  font-size: 14px;
}

.source-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.source-item:last-child {
  border-bottom: 0;
}

.source-name {
  font-weight: 700;
}

.source-count {
  color: var(--muted);
  font-size: 12px;
}

.empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 10px;
  color: var(--muted);
}

.footer {
  background: #111827;
  color: #fff;
  padding-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 35px;
  padding-bottom: 35px;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer h3 {
  margin-bottom: 8px;
}

.footer p {
  color: #c6cbd4;
  font-size: 14px;
}

.copyright {
  text-align: center;
  border-top: 1px solid #293244;
  padding: 17px;
  color: #aeb6c3;
  font-size: 13px;
}

.skeleton {
  height: 340px;
  background: linear-gradient(90deg,#eee,#f8f8f8,#eee);
  background-size: 200% 100%;
  animation: skeleton 1.2s infinite;
  border-radius: 10px;
}

@keyframes skeleton {
  to { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 20px, 1200px);
  }

  .top-note {
    display: none;
  }

  .header-inner {
    min-height: 68px;
    gap: 10px;
  }

  .logo {
    font-size: 23px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .search-box {
    width: auto;
    flex: 1;
  }

  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: block;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 5px 0;
  }

  .nav-link {
    text-align: left;
  }

  .breaking-label {
    padding-right: 10px;
  }

  .ticker {
    margin-left: 10px;
  }

  .page-heading {
    align-items: center;
  }

  .refresh-btn {
    padding: 8px 10px;
  }

  .hero-grid,
  .news-grid,
  .sidebar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card:first-child {
    grid-column: auto;
  }

  .hero-card:first-child .card-image,
  .card-image,
  .news-card .card-image {
    height: 220px;
  }

  .hero-card:first-child .card-title {
    font-size: 22px;
  }

  .sidebar {
    display: block;
  }

  .sidebar-card {
    margin-bottom: 18px;
  }
}
