:root {
  --ink: #18212f;
  --muted: #657184;
  --line: #d9e1e8;
  --page: #f3f6f8;
  --panel: #ffffff;
  --nav: #202a37;
  --teal: #176f6b;
  --red: #b33b3b;
  --blue: #2e5f95;
  --gold: #aa7a2f;
  --soft: #eef4f4;
  --shadow: 0 18px 46px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  background: var(--nav);
  color: white;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  line-height: 1.2;
}

.brand span {
  margin-top: 3px;
  color: #b9c5d1;
  font-size: 0.78rem;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  color: #cad5df;
  text-align: left;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  background: #344255;
  color: white;
}

.workspace {
  min-width: 0;
  padding: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 188px;
  margin-bottom: 14px;
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(24, 33, 47, 0.96), rgba(23, 111, 107, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 92px);
  color: white;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: #c4e5e1;
  font-size: 0.84rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-metrics {
  display: grid;
  min-width: 430px;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 10px;
}

.hero-metrics article {
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  margin-bottom: 4px;
  font-size: 1.7rem;
}

.hero-metrics span {
  color: #d9e7e8;
  font-size: 0.82rem;
}

.toolbar,
.focus-grid,
.main-layout {
  display: grid;
  gap: 12px;
}

.toolbar {
  grid-template-columns: minmax(260px, 1fr) 170px 170px 150px 150px;
  margin-bottom: 12px;
}

.searchbox,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
}

.searchbox span {
  color: var(--teal);
  font-size: 1.3rem;
}

.searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

select {
  padding: 0 10px;
  color: var(--ink);
}

.focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.focus-grid article,
.feed-panel,
.side-panel section,
.news-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.focus-grid article {
  padding: 14px;
}

.focus-grid span,
.label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.focus-grid p {
  margin-bottom: 0;
  font-weight: 800;
}

.main-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.feed-panel,
.side-panel section {
  padding: 16px;
}

.summary-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.summary-head h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.summary-provider {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: #ecf7f5;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.summary-panel p {
  margin-bottom: 10px;
  color: var(--ink);
  line-height: 1.65;
}

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-meta span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  background: white;
  border: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.section-head h2,
.side-panel h2 {
  margin-bottom: 4px;
  font-size: 1.14rem;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

#copyBrief {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.news-list {
  display: grid;
  gap: 10px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.pagination-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-actions button {
  min-width: 78px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 850;
}

.pagination-actions button:not(:disabled):hover {
  border-color: var(--teal);
  color: var(--teal);
}

.pagination-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination-actions span {
  min-width: 58px;
  text-align: center;
  font-weight: 850;
  color: var(--ink);
}

.news-card {
  padding: 14px;
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.news-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.42;
}

.news-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.news-card h3 a:hover {
  color: var(--teal);
}

.news-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef2f5;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.badge.red {
  background: #fff0ee;
  color: var(--red);
}

.badge.teal {
  background: #ecf7f5;
  color: var(--teal);
}

.side-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.source-item,
.status-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.source-item a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.source-item p,
.status-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 18px 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal);
}

@media (max-width: 1120px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    height: auto;
    grid-template-columns: 1fr repeat(3, auto);
    gap: 8px;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav-item {
    width: auto;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .hero,
  .toolbar,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 12px;
  }

  .sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .brand {
    grid-column: 1 / -1;
  }

  .hero-metrics,
  .section-head,
  .news-card-header,
  .pagination {
    display: grid;
    min-width: 0;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination-actions {
    justify-content: space-between;
  }
}
