:root {
  color-scheme: light;
  --page: #f4f7f4;
  --paper: #ffffff;
  --ink: #102018;
  --muted: #637169;
  --line: #d8e1db;
  --soft: #f7faf7;
  --green: #1f7a4d;
  --green-dark: #0f3c2a;
  --lime: #9fca3f;
  --red: #c94735;
  --shadow: 0 20px 60px rgba(31, 52, 41, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(31, 122, 77, 0.05) 1px, transparent 1px),
    linear-gradient(#eef4ef, #f7faf7);
  background-size: 48px 48px, 100% 100%;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

.report-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 20px auto 36px;
  border: 1px solid rgba(216, 225, 219, 0.94);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(23, 76, 53, 0.06), transparent 58%),
    #fff;
  padding: 30px 34px 26px;
}

.overline,
.report-info span,
.summary-grid span,
.section-heading span,
.conclusion-card span,
dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 4px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.02;
}

h2,
h3,
p {
  margin: 0;
}

.report-lede {
  max-width: 640px;
  color: #40554a;
  line-height: 1.7;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.ghost-action {
  border: 1px solid rgba(23, 76, 53, 0.22);
  background: #fff;
  color: var(--green-dark);
}

.primary-action {
  border: 1px solid #174c35;
  background: #174c35;
  color: #fff;
}

.report-info {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr 1.4fr 1fr;
  border-bottom: 1px solid var(--line);
}

.report-info article {
  min-height: 82px;
  border-right: 1px solid var(--line);
  padding: 17px 20px;
}

.report-info article:last-child {
  border-right: 0;
}

.report-info strong {
  display: block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: 16px;
  line-height: 1.35;
}

.summary-section,
.detail-section,
.side-rail {
  padding: 26px 34px;
}

.summary-section {
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.section-heading h2 {
  max-width: 780px;
  font-size: 25px;
  line-height: 1.25;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.compact h2 {
  font-size: 20px;
}

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

.summary-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 18px;
}

.summary-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: 32px;
  line-height: 1;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.detail-section {
  border-right: 1px solid var(--line);
}

.anomaly-list {
  display: grid;
  gap: 12px;
}

.anomaly-card {
  break-inside: avoid;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent, var(--green));
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.anomaly-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.anomaly-card__head span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, var(--green)) 14%, white);
  color: var(--accent, var(--green));
  font-size: 12px;
  font-weight: 900;
}

.anomaly-card__head strong {
  font-size: 17px;
}

.anomaly-card__head b {
  margin-left: auto;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--green-dark);
  padding: 6px 10px;
  font-size: 12px;
}

.anomaly-card__head b[data-risk="高"] {
  background: #fbe9e5;
  color: var(--red);
}

.anomaly-card h3 {
  font-size: 22px;
  line-height: 1.2;
}

.anomaly-card dl,
.work-order-meta {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.anomaly-card dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.anomaly-card dl div,
.work-order-meta div {
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

dd {
  margin: 5px 0 0;
  color: #26382f;
  font-weight: 800;
  line-height: 1.45;
}

.anomaly-card p {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #40554a;
  line-height: 1.65;
}

.side-rail {
  display: grid;
  gap: 14px;
}

.work-order-card,
.conclusion-card {
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.work-steps {
  margin: 14px 0 0;
  padding-left: 22px;
  color: #33473c;
  line-height: 1.7;
}

.work-steps li + li {
  margin-top: 6px;
}

.conclusion-card {
  background:
    linear-gradient(135deg, rgba(23, 76, 53, 0.96), rgba(31, 122, 77, 0.9)),
    var(--green-dark);
  color: #fff;
}

.conclusion-card span {
  color: rgba(255, 255, 255, 0.68);
}

.conclusion-card p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.75;
}

@media (max-width: 980px) {
  .report-header,
  .main-grid {
    display: block;
  }

  .report-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }

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

  .report-info article {
    border-bottom: 1px solid var(--line);
  }

  .summary-grid,
  .anomaly-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .report-shell {
    width: min(100vw - 20px, 1180px);
    margin: 10px auto 20px;
  }

  .report-header,
  .summary-section,
  .detail-section,
  .side-rail {
    padding: 22px 18px;
  }

  .report-info,
  .summary-grid,
  .anomaly-card dl {
    grid-template-columns: 1fr;
  }

  .report-info article {
    min-height: auto;
    border-right: 0;
  }

  .report-actions,
  .ghost-action,
  .primary-action {
    width: 100%;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body {
    background: #fff;
    color: #000;
  }

  .report-shell {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-actions {
    display: none;
  }

  .report-header,
  .summary-section,
  .detail-section,
  .side-rail {
    padding-left: 0;
    padding-right: 0;
  }

  .report-info {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .detail-section {
    border-right: 0;
  }

  .side-rail {
    padding-top: 0;
  }

  .summary-grid,
  .anomaly-card dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid article,
  .anomaly-card,
  .work-order-card,
  .conclusion-card {
    box-shadow: none;
  }

  .conclusion-card {
    background: #174c35;
    color: #fff;
  }
}

/* Unified executive report skin. */
body {
  background:
    linear-gradient(rgba(237, 245, 239, 0.88), rgba(247, 250, 247, 0.96)),
    url("./data/preview/agriculture-vision-2017/data2017_miniscale/field_images/rgb/JEGPDJQLK_7730-8885-8242-9397.jpg") center 0 / cover fixed;
}

.report-shell {
  width: min(1280px, calc(100vw - 32px));
  border-radius: 12px;
  border-color: rgba(206, 220, 212, 0.92);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 28px 84px rgba(27, 55, 39, 0.16);
}

.report-header {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
  background:
    linear-gradient(115deg, rgba(7, 31, 21, 0.96), rgba(22, 86, 55, 0.9)),
    #123f2c;
  color: #fff;
  padding: 34px 38px 32px;
}

.report-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 84% 36%, rgba(159, 202, 63, 0.22), transparent 28%);
  background-size: 50px 50px, 50px 50px, 100% 100%;
  pointer-events: none;
}

.report-header > * {
  position: relative;
  z-index: 1;
}

.report-header .overline {
  color: rgba(231, 246, 220, 0.76);
}

.report-header h1 {
  color: #fff;
  font-size: clamp(38px, 4.6vw, 66px);
}

.report-lede {
  color: rgba(239, 248, 240, 0.82);
  font-size: 17px;
}

.ghost-action {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(12px);
}

.primary-action {
  border-color: #fff;
  background: #fff;
  color: var(--green-dark);
}

.report-info {
  border-bottom-color: rgba(216, 225, 219, 0.7);
  background: #fff;
}

.report-info article {
  min-height: 92px;
}

.summary-grid article,
.anomaly-card,
.work-order-card,
.conclusion-card {
  border-radius: 10px;
  box-shadow: 0 14px 42px rgba(27, 55, 39, 0.08);
}

.summary-grid article:first-child {
  background:
    linear-gradient(145deg, rgba(18, 63, 44, 0.95), rgba(31, 122, 77, 0.88)),
    var(--green-dark);
  color: #fff;
}

.summary-grid article:first-child span,
.summary-grid article:first-child strong {
  color: #fff;
}

.anomaly-card {
  background: linear-gradient(180deg, #fff, #fbfdfb);
}

.conclusion-card {
  background:
    linear-gradient(145deg, rgba(8, 36, 24, 0.96), rgba(31, 122, 77, 0.9)),
    var(--green-dark);
}

@media (max-width: 640px) {
  .report-shell {
    width: min(100vw - 20px, 1280px);
  }

  .report-header {
    padding: 28px 20px;
  }
}
