:root {
  --bg: #efe6d6;
  --panel: rgba(255, 251, 244, 0.9);
  --panel-alt: #f5ece0;
  --ink: #1c2430;
  --muted: #5f6c78;
  --line: #d8c2a8;
  --accent: #9f4726;
  --accent-2: #0e6d6f;
  --accent-3: #284b63;
  --good: #17684d;
  --warn: #a96800;
  --bad: #9e2f35;
  --shadow: 0 22px 48px rgba(79, 54, 28, 0.08);
  --soft-shadow: 0 10px 22px rgba(79, 54, 28, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(159, 71, 38, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 109, 111, 0.12), transparent 34%),
    linear-gradient(180deg, #f8f0e2 0%, var(--bg) 100%);
  color: var(--ink);
}

.page-shell {
  width: min(1560px, calc(100vw - 30px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.hero, .panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(216, 203, 180, 0.8);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.top-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.top-ribbon span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.72);
  border: 1px solid rgba(216, 194, 168, 0.8);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 30px;
  margin-bottom: 16px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(159, 71, 38, 0.08), transparent 30%),
    linear-gradient(300deg, rgba(14, 109, 111, 0.08), transparent 35%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}

h1, h2 {
  margin: 0;
  font-family: "Georgia", "STSong", "Songti SC", serif;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 25px;
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.hero-copy-block {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 194, 168, 0.9);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 700;
}

.hero-sidecard {
  position: relative;
  z-index: 1;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(216, 194, 168, 0.85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 236, 224, 0.92));
  box-shadow: var(--soft-shadow);
}

.sidecard-kicker,
.section-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidecard-title {
  font-family: "Georgia", "STSong", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
}

.sidecard-copy {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.sidecard-points {
  display: grid;
  gap: 10px;
}

.sidecard-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(216, 194, 168, 0.85);
  font-weight: 700;
  color: var(--accent-3);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.status-bar {
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(14, 109, 111, 0.1);
  border: 1px solid rgba(14, 109, 111, 0.14);
  color: var(--accent-2);
  font-weight: 700;
  box-shadow: var(--soft-shadow);
}

.hint-bar {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(184, 110, 0, 0.18);
  border-radius: 18px;
  background: rgba(184, 110, 0, 0.08);
  color: #7d5200;
  line-height: 1.6;
  box-shadow: var(--soft-shadow);
}

.legend-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 251, 244, 0.72);
  border: 1px solid rgba(216, 194, 168, 0.82);
  box-shadow: var(--soft-shadow);
}

.legend-item span:last-child {
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.summary-grid, .meta-grid, .two-column {
  display: grid;
  gap: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(216, 203, 180, 0.9);
  border-radius: 18px;
  background: rgba(248, 242, 231, 0.85);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.filter-bar select,
.filter-bar input {
  min-width: 130px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(216, 194, 168, 0.85);
  background: rgba(255, 251, 244, 0.86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inline-select select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  outline: none;
  min-width: 118px;
}

.compact-hint {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 10px 12px;
  font-size: 12px;
}

.symbol-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.symbol-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(248, 242, 231, 0.92);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.symbol-pill .meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(248,242,231,0.96));
  border: 1px solid rgba(216, 203, 180, 0.8);
  border-radius: 24px;
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.88;
}

.summary-card .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card .value {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
}

.section-banner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 14px;
  padding: 0 4px;
}

.section-banner p:last-child {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.panel {
  position: relative;
  padding: 22px;
  margin-bottom: 18px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), rgba(14, 109, 111, 0.85));
  opacity: 0.55;
}

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

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.chip, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip {
  background: rgba(164, 73, 39, 0.12);
  color: var(--accent);
  border: 1px solid rgba(159, 71, 38, 0.12);
}

.badge-good { background: rgba(21, 111, 82, 0.14); color: var(--good); }
.badge-warn { background: rgba(184, 110, 0, 0.14); color: var(--warn); }
.badge-bad { background: rgba(161, 47, 47, 0.14); color: var(--bad); }
.badge-neutral { background: rgba(102, 113, 124, 0.14); color: var(--muted); }

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(216, 194, 168, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.table-wrap + .table-wrap {
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: rgba(245, 236, 224, 0.92);
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.28);
}

tbody tr:hover {
  background: rgba(159, 71, 38, 0.06);
}

td {
  vertical-align: top;
}

.address-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.address-text {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(17, 100, 102, 0.2);
  border-radius: 999px;
  background: rgba(17, 100, 102, 0.08);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(17, 100, 102, 0.14);
}

.copy-btn.copied {
  background: rgba(21, 111, 82, 0.14);
  color: var(--good);
  border-color: rgba(21, 111, 82, 0.28);
}

.party-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  white-space: normal;
}

.party-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  white-space: normal;
}

.review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 230px;
}

.review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(40, 75, 99, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.review-btn:hover {
  background: rgba(14, 109, 111, 0.08);
}

.review-btn.busy {
  opacity: 0.65;
  pointer-events: none;
}

.table-note {
  color: var(--muted);
  font-size: 12px;
}

.signal-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 260px;
  white-space: normal;
}

.signal-summary-top,
.signal-summary-bottom,
.signal-party-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signal-party-grid {
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
  white-space: normal;
}

.party-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(216, 194, 168, 0.62);
}

.party-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reason-cell {
  min-width: 260px;
  max-width: 340px;
  white-space: normal;
  line-height: 1.6;
  color: var(--muted);
}

.meta-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.meta-item {
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--soft-shadow);
}

.meta-item .k {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.meta-item .v {
  font-size: 18px;
  font-weight: 700;
}

.fold-panel {
  padding: 0;
  overflow: hidden;
  background: var(--panel);
}

.fold-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

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

.fold-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fold-label {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.fold-body {
  padding: 0 20px 20px;
  border-top: 1px solid rgba(216, 203, 180, 0.8);
}

.compact-table .table-wrap,
.compact-table {
  max-height: 420px;
}

.compact-table table td,
.compact-table table th {
  padding-top: 9px;
  padding-bottom: 9px;
}

@media (max-width: 1200px) {
  .layout-two,
  .hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 18px;
  }

  .legend-strip {
    grid-template-columns: 1fr;
  }

  .top-ribbon {
    gap: 8px;
  }

  .top-ribbon span,
  .hero-tag {
    font-size: 11px;
  }

  .review-actions {
    grid-template-columns: 1fr;
    min-width: 160px;
  }

  .fold-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .fold-side {
    width: 100%;
    justify-content: space-between;
  }
  th, td { padding: 8px 10px; }
}
