:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #686f76;
  --line: #d9ded9;
  --paper: #f7f4ec;
  --panel: #fffdf7;
  --coal: #202326;
  --teal: #0f766e;
  --amber: #b7791f;
  --red: #b6423d;
  --blue: #2563a8;
  --green: #4d7c0f;
  --violet: #6b4aa0;
  --shadow: 0 16px 40px rgba(28, 31, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 21, 21, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
canvas {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.overview {
  min-height: 96vh;
  padding: 32px 0 28px;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 940px;
  font-size: clamp(2.5rem, 6.4vw, 5.35rem);
  line-height: 0.94;
  font-weight: 900;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.1;
}

.meta {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.signal-panel,
.brief-panel,
.topic-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
}

.signal-panel,
.brief-panel {
  padding: 22px;
}

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

.section-head.wide {
  margin-bottom: 22px;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 64px);
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ebe5d8;
}

.mode-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.mode-button.is-active {
  background: var(--coal);
  color: #fffdf7;
}

#signalCanvas {
  width: 100%;
  aspect-ratio: 1.52;
  display: block;
  border-radius: 6px;
  background: #f1ece0;
}

.brief-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--coal);
  color: #fffdf7;
}

.brief-panel h2 {
  color: #f7cc72;
}

.brief-panel p {
  margin: 24px 0;
  font-size: clamp(1.02rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid rgba(255, 253, 247, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 253, 247, 0.18);
}

.stat-strip div {
  min-width: 0;
  padding: 16px 10px;
  background: rgba(255, 253, 247, 0.08);
}

.stat-strip strong,
.stat-strip span {
  display: block;
  text-align: center;
}

.stat-strip strong {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.stat-strip span {
  margin-top: 6px;
  color: rgba(255, 253, 247, 0.72);
  font-size: 0.8rem;
}

.topic-band,
.timeline-band,
.takeaway-band {
  padding: 54px 0;
  border-top: 1px solid rgba(21, 21, 21, 0.12);
}

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

.topic-card {
  position: relative;
  min-height: 220px;
  padding: 18px;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: var(--accent);
}

.topic-card h3 {
  margin: 16px 0 12px;
  font-size: 1.05rem;
}

.topic-card p {
  margin: 0;
  color: #3f4549;
  line-height: 1.65;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.source-list span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, #ffffff);
  border-radius: 6px;
  color: color-mix(in srgb, var(--accent) 80%, #111111);
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.dot.product {
  background: var(--teal);
}

.dot.infra {
  background: var(--amber);
}

.dot.society {
  background: var(--red);
}

.dot.market {
  background: var(--blue);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.timeline-time {
  color: var(--muted);
  font-weight: 900;
}

.timeline-copy h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.timeline-copy p {
  margin: 0;
  color: #3f4549;
  line-height: 1.6;
}

.tag {
  align-self: start;
  min-width: 72px;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.takeaway-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.takeaway-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: takeaway;
}

.takeaway-list li {
  counter-increment: takeaway;
  position: relative;
  padding: 18px 18px 18px 62px;
  border-left: 5px solid var(--teal);
  background: rgba(255, 253, 247, 0.78);
  line-height: 1.68;
}

.takeaway-list li::before {
  content: counter(takeaway);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coal);
  color: #fffdf7;
  font-weight: 900;
  text-align: center;
  line-height: 28px;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 24px, 720px);
  }

  .overview {
    min-height: auto;
  }

  .masthead,
  .dashboard-grid,
  .takeaway-layout {
    grid-template-columns: 1fr;
  }

  .masthead {
    display: grid;
  }

  .meta {
    text-align: left;
  }

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

  .timeline-item {
    grid-template-columns: 82px 1fr;
  }

  .tag {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .signal-panel,
  .brief-panel {
    padding: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mode-switch {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

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

  .tag {
    grid-column: auto;
  }

  .takeaway-list li {
    padding-left: 52px;
  }
}
