:root {
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background: #f5f7f8;
  color: #172026;
}

body {
  margin: 0;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

p {
  margin: 8px 0 0;
  color: #5d6b73;
}

.link {
  color: #0c6b63;
  text-decoration: none;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel {
  background: #fff;
  border: 1px solid #dce4e8;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

.ask-panel {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

textarea,
input,
select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #b8c5cc;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
}

label {
  display: grid;
  gap: 6px;
  color: #32434b;
  font-size: 14px;
  font-weight: 700;
}

button {
  border: 0;
  border-radius: 6px;
  background: #0c6b63;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 16px;
}

button:disabled {
  background: #9aabad;
  cursor: not-allowed;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.6;
}

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

.evidence {
  border-left: 3px solid #0c6b63;
  padding: 10px 12px;
  background: #f7fbfa;
  line-height: 1.55;
}

.evidence-meta {
  font-size: 13px;
  font-weight: 700;
  color: #32434b;
  margin-bottom: 6px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.source-links a {
  color: #0c6b63;
  font-weight: 700;
  text-decoration: none;
}

.media-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.media-card {
  flex: 0 0 132px;
  border: 1px solid #dce4e8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.media-thumb {
  display: block;
  width: 100%;
  height: 84px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #edf3f4;
  cursor: zoom-in;
}

.media-thumb img,
.media-placeholder {
  width: 100%;
  height: 84px;
  display: block;
  object-fit: cover;
  background: #edf3f4;
}

.media-placeholder {
  box-sizing: border-box;
  padding: 10px;
  color: #5d6b73;
  font-size: 12px;
  line-height: 1.5;
}

.media-title {
  padding: 8px 10px 3px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.media-meta {
  padding: 0 10px 8px;
  color: #5d6b73;
  font-size: 12px;
  line-height: 1.45;
}

.media-card .source-links {
  padding: 0 10px 10px;
  font-size: 12px;
  margin-top: 0;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 44px 20px 28px;
  background: rgba(10, 20, 24, 0.78);
}

.image-modal img {
  max-width: min(920px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.modal-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: auto;
  margin: 0;
  background: #fff;
  color: #172026;
  padding: 8px 12px;
}

.modal-caption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  font-size: 14px;
}

.summary {
  color: #2c3a40;
  line-height: 1.6;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric {
  border: 1px solid #dce4e8;
  border-radius: 8px;
  padding: 12px;
  background: #f7fbfa;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #0c6b63;
}

.metric-label {
  margin-top: 4px;
  color: #5d6b73;
  font-size: 13px;
}

.warning-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.warning {
  border-left: 3px solid #b7791f;
  background: #fff7e6;
  color: #5f3b00;
  padding: 10px 12px;
  line-height: 1.55;
}

.edit-block {
  border-top: 1px solid #dce4e8;
  margin-top: 18px;
  padding-top: 18px;
}

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

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid #dce4e8;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f2f6f7;
  color: #32434b;
  font-weight: 700;
}

@media (max-width: 680px) {
  .topbar,
  .ask-panel {
    display: block;
  }

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

  button {
    width: 100%;
    margin-top: 12px;
  }
}
