:root {
  --news-ink: #0f172a;
  --news-muted: #64748b;
  --news-line: #e2e8f0;
  --news-paper: #fff;
  --news-canvas: #f8fafc;
  --news-brand: #008f78;
  --news-brand-dark: #007563;
  --news-tint: #e8f7f3;
}

.news-index, .news-management { min-width: 320px; background: var(--news-canvas); color: var(--news-ink); }
.news-index [hidden] { display: none !important; }
.news-index a, .news-management a { text-decoration: none; }
.news-header { background: #ffffffed; border-bottom: 1px solid var(--news-line); }
.news-header-inner { width: min(100% - 48px, 1440px); min-height: 72px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.news-brand { display: flex; flex: none; align-items: center; gap: 9px; color: var(--news-ink); font-size: 19px; font-weight: 800; letter-spacing: -.7px; line-height: 1; }
.news-brand strong { color: var(--news-brand); }
.news-brand small { display: block; margin-top: 5px; color: var(--news-muted); font-size: 8px; letter-spacing: 1.6px; }
.news-brand-mark { display: block; width: 37px; height: 37px; fill: #f4ba4e; stroke: var(--news-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news-header-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; color: #475569; font-size: 12px; font-weight: 600; }
.news-header-links a:hover, .news-footer a:hover { color: var(--news-brand-dark); }
.news-category-nav { background: var(--news-paper); border-top: 1px solid #f1f5f9; }
.news-category-inner { width: min(100% - 48px, 1440px); margin: auto; display: flex; gap: 25px; overflow-x: auto; scrollbar-width: thin; }
.news-category-inner a { flex: 0 0 auto; padding: 14px 0 12px; border-bottom: 3px solid transparent; color: #475569; font-size: 12px; font-weight: 700; }
.news-category-inner a:hover, .news-category-inner a.is-active { color: var(--news-brand-dark); border-bottom-color: var(--news-brand); }

.news-ticker { border-bottom: 1px solid var(--news-line); background: #f1faf7; }
.news-ticker-inner { width: min(100% - 48px, 1440px); min-height: 48px; margin: auto; display: flex; align-items: center; gap: 15px; }
.news-ticker-label { align-self: stretch; display: flex; align-items: center; padding: 0 14px; background: var(--news-brand); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.news-ticker-inner > a { color: #334155; font-size: 12px; font-weight: 700; }
.news-ticker-inner > a:not(.news-ticker-all) { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.news-ticker-all { flex: none; white-space: nowrap; }

.news-index-main { width: min(100% - 48px, 1440px); min-height: calc(100vh - 230px); margin: auto; padding: 30px 0 56px; }
.news-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.news-eyebrow { color: var(--news-brand-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.news-intro h1 { margin: 7px 0 6px; color: var(--news-ink); font-size: clamp(26px, 3vw, 36px); letter-spacing: -1px; }
.news-intro p { margin: 0; color: var(--news-muted); font-size: 14px; }
.news-search { width: min(100%, 330px); }
.news-search label { display: block; margin-bottom: 7px; color: #475569; font-size: 11px; font-weight: 700; }
.news-search-row { display: flex; }
.news-search input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cbd5e1; border-right: 0; border-radius: 8px 0 0 8px; background: #fff; color: var(--news-ink); }
.news-search input:focus { outline: 2px solid #008f7840; outline-offset: 1px; }
.news-search button, .news-page button { border: 0; padding: 0 17px; border-radius: 0 8px 8px 0; background: var(--news-brand); color: #fff; font-weight: 700; }
.news-search button:hover, .news-page button:hover { background: var(--news-brand-dark); }

.news-lead { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 22px; align-items: stretch; }
.news-headlines { min-width: 0; overflow: hidden; border: 1px solid var(--news-line); border-radius: 14px; background: #dceee9; }
.news-headline { height: 430px; }
.news-headline-link, .news-feature-card a { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(135deg, #5c9185, #163d3a); color: #fff; }
.news-headline img, .news-feature-card img, .news-article-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-headline img, .news-feature-card img { position: absolute; inset: 0; transition: transform .3s ease; }
.news-headline-link:hover img, .news-feature-card a:hover img { transform: scale(1.025); }
.news-image-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(9, 20, 33, .18) 45%, rgba(9, 20, 33, .9) 100%); }
.news-headline-content { position: absolute; right: 0; bottom: 0; left: 0; padding: clamp(20px, 3vw, 34px); }
.news-lead-category { display: inline-block; margin-bottom: 12px; padding: 6px 9px; border-radius: 5px; background: var(--news-brand); color: #fff; font-size: 10px; font-weight: 800; }
.news-headline-content strong { display: block; max-width: 760px; font-size: clamp(23px, 3vw, 38px); line-height: 1.16; letter-spacing: -.7px; }
.news-lead-meta { display: block; margin-top: 12px; color: #e2f0ed; font-size: 12px; font-weight: 600; }
.news-slide-controls { display: flex; background: #fff; }
.news-slide-controls button { flex: 1; max-width: 60px; padding: 12px; border: 0; border-right: 1px solid var(--news-line); background: #fff; color: var(--news-muted); font-weight: 700; }
.news-slide-controls button:hover, .news-slide-controls button[aria-current="true"] { background: var(--news-tint); color: var(--news-brand-dark); }
.news-featured { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.news-featured h2 { margin: 0; padding: 0 0 10px; border-bottom: 1px solid var(--news-line); font-size: 20px; font-weight: 500; }
.news-featured h2 strong { color: var(--news-brand-dark); }
.news-feature-card { min-height: 180px; flex: 1; overflow: hidden; border: 1px solid var(--news-line); border-radius: 12px; background: #e7f2ef; }
.news-feature-content { position: absolute; right: 0; bottom: 0; left: 0; padding: 17px; }
.news-feature-line { display: block; width: 32px; height: 4px; margin-bottom: 8px; border-radius: 4px; background: #79c9b8; }
.news-feature-content strong { display: block; font-size: 17px; line-height: 1.25; }
.news-feature-content small { display: block; margin-top: 7px; color: #e2f0ed; font-size: 11px; }

.news-list-section { margin-top: 40px; }
.news-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--news-line); margin-bottom: 18px; }
.news-section-heading h2 { margin: 5px 0 0; color: var(--news-ink); font-size: 24px; }
.news-section-heading p { margin: 0; color: #94a3b8; font-size: 12px; }
.news-articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-article { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--news-line); border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .025); }
.news-article-priority { border-bottom: 3px solid var(--news-brand); }
.news-article-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #cce9e1, #edf7f4); color: var(--news-brand-dark); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.news-article-image > span > span { display: block; margin-top: 6px; color: #4b8175; font-size: 10px; letter-spacing: 3px; }
.news-article-body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.news-article-category { color: var(--news-brand-dark); font-size: 10px; font-weight: 800; }
.news-article h3 { margin: 9px 0; font-size: 17px; line-height: 1.35; }
.news-article h3 a { color: var(--news-ink); }
.news-article h3 a:hover { color: var(--news-brand-dark); }
.news-article p { margin: 0 0 16px; color: var(--news-muted); font-size: 13px; line-height: 1.55; }
.news-article-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; color: #94a3b8; font-size: 11px; }
.news-empty { padding: 42px 24px; border: 1px solid var(--news-line); border-radius: 12px; background: #fff; }
.news-empty h2 { margin-bottom: 8px; }
.news-empty a { color: var(--news-brand-dark); font-weight: 700; }
.news-footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px max(24px, calc((100% - 1392px) / 2)); border-top: 1px solid var(--news-line); background: #fff; color: var(--news-muted); font-size: 12px; }
.news-footer a { color: var(--news-brand-dark); font-weight: 700; }

.news-page { width: min(100% - 40px, 1160px); min-height: calc(100vh - 75px); margin: 0 auto; padding: 26px 0 60px; }
.news-page a { color: var(--news-brand-dark); }
.news-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--news-line); font-size: 13px; font-weight: 700; }
.news-management-heading { margin: 24px 0 20px; }
.news-management-heading h1 { margin: 6px 0; color: var(--news-ink); font-size: clamp(25px, 4vw, 34px); }
.news-management-heading p { margin: 0; color: var(--news-muted); font-size: 14px; }
.news-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 24px 0 12px; padding: 18px; border: 1px solid var(--news-line); border-radius: 12px; background: #fff; }
.news-filters label { display: grid; flex: 1 1 240px; gap: 7px; color: #334155; font-size: 12px; font-weight: 700; }
.news-page input, .news-page select { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--news-ink); }
.news-page button { min-height: 40px; padding: 0 16px; border-radius: 8px; cursor: pointer; }
.news-page button.news-delete { background: #b42332; }
.news-page button.news-delete:hover { background: #921c29; }
.news-fetch { margin: 12px 0 20px; }
.news-fetch button { background: #e8f7f3; color: var(--news-brand-dark); }
.news-fetch button:hover { background: #cceee4; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.news-card, .source-card { overflow: hidden; border: 1px solid var(--news-line); border-radius: 12px; background: #fff; }
.news-card.news-priority { border: 2px solid var(--news-brand); }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card-body { padding: 18px; }
.news-card h2 { margin: 12px 0; font-size: 1.15rem; }
.news-card p { margin: 12px 0; }
.news-card small { display: block; margin-top: 8px; color: var(--news-muted); }
.news-badge { display: inline-block; padding: 4px 9px; border-radius: 999px; background: var(--news-tint); color: var(--news-brand-dark); font-size: .8rem; font-weight: 700; }
.source-list { display: grid; gap: 12px; margin-top: 18px; }
.source-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 16px; overflow-wrap: anywhere; }
.source-card p { margin: 7px 0; color: var(--news-muted); overflow-wrap: anywhere; }
.source-card > div > span { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--news-tint); color: var(--news-brand-dark); font-size: 11px; font-weight: 700; }
.source-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.source-actions form { margin: 0; }
.news-message, .news-error { margin: 16px 0; padding: 12px 14px; border: 1px solid #b7ddd4; border-radius: 9px; background: #f1faf7; color: #176b5b; }
.news-error { border-color: #fecaca; background: #fff7f7; color: #b42332; }

@media (max-width: 900px) {
  .news-lead { grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 14px; }
  .news-headline { height: 380px; }
  .news-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .news-header-inner, .news-category-inner, .news-ticker-inner { width: min(100% - 32px, 1440px); }
  .news-header-inner { min-height: 64px; flex-wrap: wrap; gap: 9px 16px; padding: 11px 0; }
  .news-brand { font-size: 17px; }
  .news-brand-mark { width: 32px; height: 32px; }
  .news-header-links { gap: 8px 13px; font-size: 11px; }
  .news-category-inner { gap: 19px; }
  .news-category-inner a { padding: 12px 0 10px; font-size: 11px; }
  .news-ticker-inner { min-height: 42px; gap: 9px; }
  .news-ticker-label { padding: 0 9px; font-size: 9px; }
  .news-ticker-inner > a { font-size: 10px; }
  .news-ticker-all { display: none; }
  .news-index-main { width: min(100% - 32px, 1440px); padding: 22px 0 42px; }
  .news-intro { flex-direction: column; align-items: stretch; gap: 18px; }
  .news-search { width: 100%; }
  .news-lead { grid-template-columns: 1fr; }
  .news-headline { height: 340px; }
  .news-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-featured h2 { grid-column: 1 / -1; }
  .news-feature-card { min-height: 165px; }
  .news-feature-content { padding: 12px; }
  .news-feature-content strong { font-size: 14px; }
  .news-list-section { margin-top: 30px; }
  .news-section-heading { align-items: start; flex-direction: column; }
  .news-articles { gap: 10px; }
  .news-article-body { padding: 12px; }
  .news-article h3 { font-size: 14px; }
  .news-article p { font-size: 12px; }
  .news-article-meta { flex-wrap: wrap; font-size: 10px; }
  .news-footer { flex-wrap: wrap; padding: 18px 16px; }
  .news-page { width: min(100% - 32px, 1160px); padding-top: 18px; }
  .news-filters { padding: 13px; }
  .source-card { padding: 13px; }
}
@media (max-width: 390px) {
  .news-articles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .news-headline img, .news-feature-card img { transition: none; }
}
