/* Gists. Same palette as the app: deep green masthead, amber highlights, serif headlines. */
body.show-news { display: block; height: auto; min-height: 100dvh; overflow: visible; background: var(--bg); }
body.show-news .app-shell, body.show-news .home { display: none; }
.news-link { margin-right: 4px; text-decoration: none; }
@media (max-width: 760px) { .news-link { display: none; } }

.news-view { min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font); --serif: "Fraunces", Georgia, serif; }
:where(.news-view) a { color: inherit; }

/* ---------- top bar + reading progress ---------- */
.news-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.news-back { color: var(--brand); font-weight: 700; text-decoration: none; }
.news-back:hover { text-decoration: underline; }
.news-back.inline { display: inline-block; margin: 0 0 14px; }
.news-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; color: var(--brand); }
.news-brand span { color: var(--ink); }
.news-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; background: linear-gradient(90deg, var(--brand), var(--amber)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.news-main { max-width: 1180px; margin: 0 auto; padding: 0 16px 64px; }

/* ---------- masthead ---------- */
.news-mast { position: relative; margin: 16px 0 22px; padding: 26px 26px 0; border-radius: 22px; color: var(--hero-text); overflow: hidden;
  background:
    radial-gradient(900px 300px at 85% -10%, rgba(255, 194, 74, 0.28), transparent 60%),
    radial-gradient(600px 260px at 0% 110%, rgba(43, 191, 138, 0.28), transparent 60%),
    linear-gradient(160deg, #0a3a2c, var(--ink-deep)); }
.news-mast::before { content: ""; position: absolute; inset: 0; opacity: 0.07; pointer-events: none;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 38px 38px; }
.news-mast > * { position: relative; }
.news-mast-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.news-date { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.news-mast h1 { font-family: var(--serif); font-size: clamp(40px, 7vw, 68px); line-height: 1; margin: 0 0 8px; letter-spacing: -0.03em; }
.news-sub { margin: 0; max-width: 46ch; color: rgba(244, 255, 249, 0.78); }
.news-live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 13px; font-weight: 700; }
.news-live i { width: 9px; height: 9px; border-radius: 50%; background: #ff5a4f; box-shadow: 0 0 0 0 rgba(255, 90, 79, 0.7); animation: news-pulse 1.6s infinite; }
.news-live small { font-size: 12px; font-weight: 500; opacity: 0.8; }
@keyframes news-pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 90, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0); } }

.news-tabbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.news-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.news-tabs::-webkit-scrollbar { display: none; }
.news-tab { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 11px 16px; border: 0; border-radius: 14px 14px 0 0; background: rgba(255, 255, 255, 0.07); color: rgba(244, 255, 249, 0.8); font: 700 14px var(--font); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.news-tab:hover { background: rgba(255, 255, 255, 0.14); }
.news-tab.on { background: var(--bg); color: var(--ink); }
.news-tab-ico { font-size: 16px; }
.news-toggle { border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: var(--hero-text); border-radius: 999px; padding: 7px 14px; font: 600 13px var(--font); cursor: pointer; margin-bottom: 8px; }
.news-toggle:hover { background: rgba(255, 255, 255, 0.12); }

.news-ticker { display: flex; align-items: center; gap: 12px; margin: 0 -26px; padding: 0 26px 0 0; background: var(--bg); color: var(--ink); border-top: 1px solid var(--line); overflow: hidden; }
.news-ticker[hidden] { display: none; }
.news-ticker-tag { flex: none; padding: 9px 14px 9px 26px; background: var(--amber); color: var(--amber-ink); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.news-ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.news-ticker-lane { display: flex; gap: 38px; width: max-content; animation: news-scroll 70s linear infinite; }
.news-ticker-track:hover .news-ticker-lane { animation-play-state: paused; }
.news-ticker-lane a { white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 0; }
.news-ticker-lane a::before { content: "\25CF"; color: var(--brand); margin-right: 10px; font-size: 9px; vertical-align: middle; }
.news-ticker-lane a:hover { color: var(--brand); }
@keyframes news-scroll { to { transform: translateX(-50%); } }

/* ---------- pictures, badges ---------- */
.news-pic { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--brand) 10%, var(--card)); }
.news-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.4s ease, transform 0.6s ease; }
.news-pic img.in { opacity: 1; }
.news-pic.none { display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(var(--h) 60% 22%)); }
.news-initial { font: 800 54px/1 var(--serif); color: rgba(255, 255, 255, 0.85); }
.news-pic.thumb { width: 86px; height: 72px; aspect-ratio: auto; border-radius: 10px; flex: none; }
.news-pic.thumb .news-initial { font-size: 28px; }
.news-pic.wide { border-radius: 20px; aspect-ratio: 16 / 9; }

.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); margin: 0 0 7px; }
.news-src { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; color: hsl(var(--h) 60% 30%); background: hsl(var(--h) 70% 90%); }
:root[data-theme="dark"] .news-src { color: hsl(var(--h) 80% 80%); background: hsl(var(--h) 40% 22%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .news-src { color: hsl(var(--h) 80% 80%); background: hsl(var(--h) 40% 22%); } }
.news-new { padding: 2px 8px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- top story + latest ---------- */
.news-top { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 30px; }
.news-lead { position: relative; display: block; border-radius: 22px; overflow: hidden; min-height: 440px; text-decoration: none; color: #fff; isolation: isolate; box-shadow: 0 18px 40px rgba(6, 36, 28, 0.18); }
.news-lead .news-pic { position: absolute; inset: 0; aspect-ratio: auto; z-index: -2; }
.news-lead:hover .news-pic img { transform: scale(1.04); }
.news-lead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(3, 20, 15, 0.92) 100%); }
.news-lead-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 26px 26px; }
.news-lead h2 { font-family: var(--serif); font-size: clamp(24px, 3.6vw, 38px); line-height: 1.12; margin: 8px 0 10px; letter-spacing: -0.02em; text-wrap: balance; }
.news-lead p { margin: 0; max-width: 60ch; color: rgba(255, 255, 255, 0.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-lead .news-meta { color: rgba(255, 255, 255, 0.8); margin: 8px 0 0; }
.news-lead .news-src { color: #fff; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(6px); }
.news-flag { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); font: 800 11px var(--font); letter-spacing: 0.08em; text-transform: uppercase; }

.news-latest { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 8px; }
.news-latest h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 6px; }
.news-latest-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; animation: news-rise 0.5s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
.news-latest-item:first-of-type { border-top: 0; }
.news-latest-item > div { flex: 1; min-width: 0; }
.news-latest-item h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.3; font-family: var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-latest-item .news-meta { margin: 0; }
.news-latest-item:hover h3 { color: var(--brand); }
.news-num { flex: none; width: 26px; font: 800 24px/1 var(--serif); color: var(--amber); opacity: 0.9; }

/* ---------- grid, cards, list ---------- */
.news-section { font-family: var(--serif); font-size: 26px; margin: 8px 0 16px; letter-spacing: -0.01em; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.news-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.news-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; animation: news-rise 0.5s ease both; animation-delay: calc(var(--i, 0) * 55ms); }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(6, 36, 28, 0.14); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.news-card:hover .news-pic img { transform: scale(1.05); }
.news-card-body { padding: 14px 16px 16px; }
.news-card h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.25; font-family: var(--serif); letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.row { flex-direction: row; }
.news-card.row .news-pic { width: 190px; flex: none; aspect-ratio: auto; min-height: 120px; }
.news-card.row h3 { font-size: 17px; }
@keyframes news-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.news-more-wrap { display: flex; justify-content: center; margin: 30px 0 6px; }
.news-more-btn { padding: 13px 30px; font-size: 15px; }
.news-more-btn:disabled { opacity: 0.6; cursor: progress; }
.news-credit { text-align: center; color: var(--muted); font-size: 12.5px; margin: 18px 0 0; }
.news-empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.news-empty-ico { font-size: 44px; margin-bottom: 8px; }

.news-skel { border-radius: 18px; background: linear-gradient(90deg, var(--card), color-mix(in srgb, var(--line) 70%, var(--card)), var(--card)); background-size: 200% 100%; animation: news-shimmer 1.2s linear infinite; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.news-skel.big { aspect-ratio: auto; min-height: 440px; }
.news-skel.tall { aspect-ratio: auto; min-height: 440px; }
.news-skel.hero { aspect-ratio: 16 / 9; border-radius: 20px; }
.news-skel.line { aspect-ratio: auto; height: 22px; margin-top: 18px; border-radius: 8px; }
.news-skel.line.short { width: 60%; }
@keyframes news-shimmer { to { background-position: -200% 0; } }

/* ---------- one story ---------- */
.news-article { max-width: 780px; margin: 22px auto 0; }
.news-story-hero { margin-bottom: 18px; box-shadow: 0 18px 40px rgba(6, 36, 28, 0.16); border-radius: 20px; }
.news-story-info .news-meta { font-size: 13.5px; }
.news-article h1 { font-family: var(--serif); font-size: clamp(28px, 5.2vw, 44px); line-height: 1.1; margin: 4px 0 22px; letter-spacing: -0.025em; text-wrap: balance; }
.news-text-wrap { border-top: 1px solid var(--line); padding-top: 24px; }
.news-text { font-size: 19px; line-height: 1.75; margin: 0 0 1.15em; }
.news-text.first { font-size: 21px; font-weight: 500; }
.news-text.first::first-letter { float: left; font: 800 3.6em/0.85 var(--serif); padding: 6px 10px 0 0; color: var(--brand); }
.news-note { color: var(--muted); font-style: italic; }
.news-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 6px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.news-actions .btn { text-decoration: none; }
.news-related { margin-top: 46px; }

@media (max-width: 860px) {
  .news-top { grid-template-columns: 1fr; }
  .news-lead, .news-skel.big { min-height: 380px; }
  .news-skel.tall { display: none; }
}
@media (max-width: 760px) {
  .news-main { padding: 0 12px 56px; }
  .news-mast { margin: 10px 0 18px; padding: 20px 16px 0; border-radius: 18px; }
  .news-ticker { margin: 0 -16px; padding-right: 16px; }
  .news-ticker-tag { padding-left: 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.row .news-pic { width: 120px; }
  .news-text { font-size: 17.5px; }
  .news-text.first { font-size: 19px; }
  .news-lead-text { padding: 18px; }
  .news-tab { padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-ticker-lane, .news-live i, .news-skel { animation: none; }
  .news-card, .news-latest-item { animation: none; transition: none; }
  .news-ticker-track { overflow-x: auto; }
}
