:root {
  --bg: #f5f5f2;
  --card: #fff;
  --ink: #111;
  --muted: #777;
  --line: #deded8;
  --accent: #ff3b30;
  --shadow: 0 12px 40px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.topbar { background: #111; color: #fff; }
.topbar-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 25px; font-weight: 800; letter-spacing: -.05em; display: flex; align-items: center; gap: 9px; }
.brand-dot { width: 11px; height: 11px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,59,48,.18); }
.live-pill { font-size: 11px; letter-spacing: .14em; font-weight: 700; opacity: .9; display: flex; align-items: center; gap: 8px; }
.live-pill span { width: 7px; height: 7px; background: #63e06d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(99,224,109,.15); }
.top-actions { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #cfcfcf; }
.icon-btn { border: 1px solid #3a3a3a; border-radius: 10px; padding: 7px 10px; background: transparent; color: #fff; cursor: pointer; }

.nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.nav-inner { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link { background: none; border: 0; padding: 16px 13px; color: #707070; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; }
.nav-link.active { color: #111; box-shadow: inset 0 -2px 0 var(--accent); }

.main { padding: 54px 0 70px; }
.hero-head { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding-bottom: 40px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
h1 { font-size: clamp(48px, 7vw, 78px); line-height: .95; letter-spacing: -.06em; margin: 0 0 20px; max-width: 760px; }
h1 em { font-style: normal; color: #8f8f89; }
.hero-head p { margin: 0; color: var(--muted); max-width: 650px; line-height: 1.6; font-size: 15px; }
.refresh-card { background: #fff; border: 1px solid var(--line); padding: 18px 20px; min-width: 225px; box-shadow: var(--shadow); }
.refresh-label, .refresh-card small { display: block; color: #92928c; font-size: 11px; }
.refresh-card strong { display: block; font-size: 16px; margin: 8px 0 4px; }

.demo-banner { background: #fff6d7; border: 1px solid #ead898; color: #705a00; padding: 12px 14px; border-radius: 10px; margin: 0 0 22px; font-size: 13px; }
.hidden { display: none; }
.breaking { background: #111; color: #fff; display: flex; align-items: stretch; min-height: 48px; overflow: hidden; margin-bottom: 44px; }
.breaking-tag { background: var(--accent); font-size: 11px; letter-spacing: .12em; font-weight: 800; display: flex; align-items: center; padding: 0 18px; white-space: nowrap; }
.ticker { padding: 14px 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }

.section-title-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 17px; }
h2 { font-size: 32px; letter-spacing: -.04em; margin: 0; }
.refresh-btn { border: 1px solid var(--line); background: #fff; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.refresh-btn:hover { border-color: #b9b9b2; }
.news-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.lead-card { min-height: 430px; border-radius: 16px; overflow: hidden; background: #ddd; position: relative; color: #fff; box-shadow: var(--shadow); }
.lead-media { position: absolute; inset: 0; background-size: cover; background-position: center; }
.lead-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.85)); }
.lead-content { position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 28px; }
.badge { display: inline-flex; padding: 7px 9px; background: var(--accent); color: #fff; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; border-radius: 6px; }
.lead-content h3 { font-size: clamp(28px, 4vw, 48px); line-height: 1.02; letter-spacing: -.05em; margin: 14px 0 10px; max-width: 750px; }
.meta { color: #aaa; font-size: 11px; }
.trend-list { display: flex; flex-direction: column; gap: 10px; }
.trend-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; min-height: 95px; box-shadow: 0 5px 18px rgba(0,0,0,.03); }
.rank { font-size: 30px; line-height: 1; font-weight: 800; color: #c9c9c2; }
.trend-item h4 { margin: 0 0 7px; font-size: 15px; line-height: 1.25; letter-spacing: -.02em; }
.trend-item .meta { color: #999; }

.lower { margin-top: 58px; }
.muted { color: #999; font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,.025); transition: transform .2s ease, box-shadow .2s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-image { height: 180px; background: linear-gradient(135deg, #d9d9d3, #bdbdb7); background-size: cover; background-position: center; }
.news-body { padding: 16px; }
.news-body .badge { background: #f0f0ea; color: #333; }
.news-body h3 { font-size: 19px; line-height: 1.2; letter-spacing: -.035em; margin: 11px 0 10px; }
.news-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.source { font-weight: 700; color: #444; font-size: 11px; }

footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 90px; display: flex; justify-content: space-between; gap: 20px; align-items: center; color: #8a8a84; font-size: 11px; }
.footer-inner strong { color: #111; }

body.dark { --bg:#111; --card:#1a1a1a; --ink:#f5f5f2; --muted:#aaa; --line:#30302e; }
body.dark .nav, body.dark footer, body.dark .refresh-card, body.dark .trend-item, body.dark .news-card, body.dark .refresh-btn { background:#171717; }
body.dark .nav-link { color:#9d9d9d; }
body.dark .nav-link.active { color:#fff; }
body.dark .news-body .badge { background:#2c2c29; color:#fff; }
body.dark .source { color:#ddd; }

@media (max-width: 850px) {
  .hero-head, .news-layout { grid-template-columns: 1fr; }
  .refresh-card { min-width: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .container { width: min(100% - 24px, 1180px); }
  .topbar-inner { height: 62px; }
  .live-pill { display: none; }
  .main { padding-top: 34px; }
  h1 { font-size: 48px; }
  .card-grid { grid-template-columns: 1fr; }
  .lead-card { min-height: 370px; }
  .footer-inner { flex-direction: column; justify-content: center; align-items: flex-start; padding: 18px 0; }
}

.source-link { color: inherit; text-underline-offset: 3px; font-weight: 700; white-space: nowrap; }
.source-link:hover { opacity: .75; }
