:root {
  --bg: #f7f2ea;
  --paper: rgba(255, 252, 246, .9);
  --line: #eadfcf;
  --text: #2c2925;
  --muted: #756d62;
  --deep: #24313a;
  --primary: #9a5a2e;
  --primary-2: #d6a14a;
  --blue: #2f6474;
  --green: #62744c;
  --rose: #ad5d54;
  --shadow: 0 18px 42px rgba(60, 43, 22, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214,161,74,.24), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(47,100,116,.16), transparent 32rem),
    linear-gradient(135deg, #fffaf1 0%, var(--bg) 55%, #f2efe8 100%);
}

a { color: inherit; }

button, input, select {
  font: inherit;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  color: var(--text);
}

button { cursor: pointer; }

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 16px 52px;
}

.hero, .panel, .report-card {
  background: var(--paper);
  border: 1px solid rgba(234, 223, 207, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  border-radius: 30px;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  color: var(--deep);
}

.desc {
  max-width: 760px;
  margin: 12px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(100%, 360px);
}

.hero-stats div {
  border-radius: 20px;
  padding: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}

.hero-stats b {
  display: block;
  color: var(--deep);
  font-size: 22px;
}

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

.controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
}

input, select { padding: 0 12px; }

.layout {
  display: grid;
  grid-template-columns: 210px minmax(340px, 480px) 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.panel {
  border-radius: 24px;
  padding: 14px;
}

.sidebar {
  position: sticky;
  top: 14px;
}

.section-title {
  font-weight: 900;
  color: var(--deep);
  margin-bottom: 10px;
}

.topic-chip {
  width: 100%;
  margin-bottom: 8px;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.65);
}

.topic-chip.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

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

.report-card {
  border-radius: 22px;
  padding: 14px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.report-card:hover, .report-card.selected {
  transform: translateY(-1px);
  border-color: rgba(154, 90, 46, .55);
  box-shadow: 0 18px 42px rgba(154, 90, 46, .18);
}

.report-card h2, .preview h2 {
  margin: 9px 0 6px;
  font-size: 17px;
  color: var(--deep);
  line-height: 1.35;
}

.report-card p, .preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.badge.industry { background: var(--blue); }
.badge.people { background: var(--rose); }
.badge.topic { background: var(--green); }
.badge.other { background: var(--muted); }

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.actions a, .primary-link {
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--deep), var(--blue));
}

.preview {
  position: sticky;
  top: 14px;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pdf-viewer {
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: white;
}

.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.empty {
  border-radius: 22px;
  padding: 22px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar, .preview { position: static; }
  .pdf-viewer { height: 76vh; min-height: 520px; }
}

@media (max-width: 760px) {
  .page { padding: 12px 10px 40px; }
  .hero { display: block; border-radius: 24px; }
  .hero-stats { margin-top: 16px; grid-template-columns: repeat(3, 1fr); min-width: 0; }
  .hero-stats b { font-size: 18px; }
  .controls { grid-template-columns: 1fr; }
  .preview-head { display: block; }
  .primary-link { display: inline-flex; margin-top: 10px; }
  .pdf-viewer { min-height: 70vh; }
}
