:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --text: #18211f;
  --muted: #60706b;
  --line: #dce4e1;
  --green: #207a55;
  --green-dark: #14583d;
  --amber: #a05c00;
  --amber-bg: #fff4df;
  --blue: #295f9f;
  --blue-bg: #eaf2ff;
  --red: #a13b35;
  --red-bg: #fff0ee;
  --shadow: 0 12px 35px rgba(24, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(246, 247, 248, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

h1 {
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
  letter-spacing: 0;
}

h3 {
  font-size: 16px;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

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

.sidebar,
.rightbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 12px;
}

.panel.compact p {
  color: var(--muted);
  font-size: 13px;
}

.report-item,
.filter-chip,
.segmented button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.report-item {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  text-align: left;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-item.active {
  border-color: var(--green);
  background: var(--surface-2);
}

.report-item span {
  display: block;
  font-weight: 750;
}

.report-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.filter-chip.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.content {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: stretch;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 122, 85, 0.1), transparent 38%),
    linear-gradient(315deg, rgba(41, 95, 159, 0.12), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.15;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-metrics div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics strong {
  font-size: 30px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.segmented,
.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented button,
.language-switch button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}

.segmented button.active,
.language-switch button.active {
  background: var(--green);
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.country-sections {
  display: grid;
  gap: 16px;
}

.country-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.country-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.country-head p {
  color: var(--muted);
  font-size: 13px;
}

.country-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.low {
  background: #e9f7ef;
  color: var(--green-dark);
}

.badge.watch {
  background: var(--amber-bg);
  color: var(--amber);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.topic-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topic-card.watch {
  background: linear-gradient(0deg, rgba(255, 244, 223, 0.55), rgba(255, 244, 223, 0.55)), #fff;
}

.topic-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.topic-title strong {
  overflow-wrap: anywhere;
}

.topic-card p {
  color: var(--muted);
  font-size: 13px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.priority-list,
.risk-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.priority-list {
  padding-left: 20px;
}

.priority-list li {
  padding-left: 4px;
}

.priority-list strong,
.risk-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.priority-list span,
.risk-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.risk-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--red-bg);
}

.risk-item span {
  color: var(--red);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(80px);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  opacity: 0;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .rightbar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 820px) {
  .topbar,
  .toolbar,
  .country-head {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

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

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

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .search-box {
    min-width: 0;
  }
}
