:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #d7dee8;
  --accent: #1769e0;
  --accent-soft: #e7f0ff;
  --green: #177245;
  --green-soft: #e5f7ed;
  --orange: #9a5a00;
  --orange-soft: #fff2d6;
  --shadow: 0 14px 34px rgba(23, 32, 51, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

button,
summary {
  font: inherit;
}

button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.24);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.topbar > div {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.22;
}

.subtitle {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.today-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.today-meta span,
.today-meta small {
  color: var(--muted);
  font-size: 13px;
}

.today-meta strong {
  margin: 5px 0;
  font-size: 19px;
}

.lead-brief,
.action-section,
.archive-section,
.plan-section,
.tool-section {
  margin-top: 14px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lead-brief {
  border-color: #9ec3ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.lead-label {
  display: inline-flex;
  padding: 4px 9px;
  margin-bottom: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #bfd6ff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.lead-brief h2 {
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1.28;
}

#leadVerdict {
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 700;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 14px;
}

.lead-grid > div,
.impact-block,
.next-actions {
  padding: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lead-grid h3,
.impact-block strong,
.next-actions strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.lead-grid p,
.lead-grid ul,
.impact-block p,
.next-actions ul {
  margin-bottom: 0;
  color: var(--muted);
}

.lead-grid ul,
.next-actions ul,
.archive-detail ul {
  padding-left: 20px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.action-card {
  padding: 18px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.action-card.primary {
  border-color: #9ec3ff;
  box-shadow: inset 4px 0 0 var(--accent);
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.card-topline span,
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #bfd6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card-topline span:first-child {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: #ffd691;
}

.action-card h3,
.archive-item h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.32;
}

.verdict {
  margin-bottom: 12px;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.chips span {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bde8cd;
}

.archive-heading {
  align-items: flex-start;
}

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

.filter-button {
  min-height: 34px;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #bfd6ff;
}

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

.archive-item {
  overflow: hidden;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.archive-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.archive-item summary::-webkit-details-marker {
  display: none;
}

.archive-item summary p {
  margin-bottom: 0;
  color: var(--muted);
}

.card-topline.compact {
  margin-bottom: 8px;
}

.heat-pill {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #bfd6ff;
  border-radius: 50%;
  font-weight: 800;
}

.archive-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.archive-detail section {
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.archive-detail h4 {
  margin-bottom: 6px;
  font-size: 14px;
}

.archive-detail p,
.archive-detail ul {
  margin-bottom: 0;
  color: var(--muted);
}

.source-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.source-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  background: var(--paper-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.plan-card {
  padding: 15px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan-card span {
  display: inline-flex;
  min-height: 25px;
  padding: 3px 8px;
  margin-bottom: 9px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #bde8cd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.plan-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
  line-height: 1.32;
}

.plan-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.plan-card ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 14px;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  padding: 15px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tool-card span {
  display: inline-flex;
  min-height: 25px;
  padding: 3px 8px;
  margin-bottom: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #bfd6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.tool-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
  line-height: 1.32;
}

.tool-card p,
.tool-card small,
.tool-card em {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.tool-card em {
  margin-bottom: 0;
  color: #7a5b14;
}

@media (max-width: 820px) {
  .app-shell {
    width: calc(100% - 22px);
    padding-top: 16px;
  }

  .topbar,
  .lead-grid,
  .action-list,
  .archive-detail,
  .plan-list,
  .tool-list {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .archive-heading {
    display: block;
  }

  .filters {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: calc(100% - 16px);
  }

  .topbar > div,
  .lead-brief,
  .action-section,
  .archive-section,
  .plan-section,
  .tool-section {
    padding: 16px;
  }

  h1 {
    font-size: 25px;
  }

  .lead-brief h2 {
    font-size: 22px;
  }

  #leadVerdict {
    font-size: 16px;
  }

  .archive-item summary {
    grid-template-columns: 1fr;
  }

  .heat-pill {
    width: auto;
    height: 34px;
    border-radius: 7px;
  }

  .filter-button {
    flex: 1 1 calc(50% - 8px);
  }
}
