:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --panel: #ffffff;
  --ink: #17201c;
  --muted: #657069;
  --line: #d9dfda;
  --accent: #0f766e;
  --accent-dark: #0b4f4b;
  --warm: #c47b32;
  --shadow: 0 18px 45px rgba(24, 32, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 46%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #edf2ef 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

a,
button {
  font: inherit;
}

button {
  border: 0;
}

.site-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
}

.report-stage {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 56px);
}

.report-panel,
.viewer-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.report-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border-radius: 8px;
}

.panel-header {
  display: grid;
  gap: 14px;
}

.eyebrow,
.viewer-label {
  margin: 0;
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.summary {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

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

.meta-grid div {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin-top: 6px;
  font-weight: 800;
}

.action-row {
  display: grid;
  gap: 10px;
}

.primary-action,
.secondary-action,
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.primary-action {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
}

.secondary-action {
  color: var(--accent-dark);
  border: 1px solid rgba(15, 118, 110, 0.3);
  background: #f0f8f6;
}

.primary-action:hover,
.secondary-action:hover,
.icon-action:hover {
  transform: translateY(-1px);
}

svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: 0 0 auto;
}

.page-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.page-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.page-button.active {
  color: #ffffff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr);
  overflow: hidden;
  border-radius: 8px;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.viewer-toolbar h2 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.25;
}

.icon-action {
  width: 44px;
  min-height: 44px;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  background: #f9fbfa;
}

.page-frame {
  min-height: 0;
  padding: 24px;
  overflow: auto;
  background: #e8ece9;
}

.page-frame img {
  display: block;
  width: min(100%, 980px);
  height: auto;
  margin: 0 auto;
  border: 1px solid #d3d8d4;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(24, 32, 28, 0.12);
}

@media (max-width: 940px) {
  .site-shell {
    padding: 14px;
  }

  .report-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .report-panel {
    gap: 20px;
  }

  .viewer-panel {
    min-height: 72vh;
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 10px;
  }

  .report-panel,
  .viewer-toolbar {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

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

  .page-frame {
    padding: 12px;
  }
}
