/* SitePrior — full report stylesheet (sample + paid) */
:root {
  --ink: #0e1726;
  --ink-2: #1c2942;
  --ink-3: #2a3b5e;
  --paper: #fbfaf6;
  --paper-2: #f3f0e8;
  --line: #d8d3c4;
  --accent: #1c5b8a;
  --gold: #b88a3a;
  --gold-soft: #e6cf9c;
  --good: #2f7a4d;
  --warn: #b8841a;
  --bad: #a8362a;
  --muted: #5b6678;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #e8e4d8;
  color: var(--ink);
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  background: #fff;
  max-width: 850px;
  margin: 30px auto;
  padding: 50px 60px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-top: 5px solid var(--gold);
}

.print-bar {
  max-width: 850px;
  margin: 20px auto 0;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92em;
}
.print-bar a { color: var(--gold-soft); }
.print-bar button {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 3px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.report-head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 22px;
  margin-bottom: 28px;
}
.report-head .brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.report-head .brand .logo {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.report-head .brand .logo span { color: var(--gold); font-weight: 400; }
.report-head .brand .meta {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82em;
  color: var(--muted);
  text-align: right;
}
.report-head h1 {
  font-size: 1.9em;
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
}
.report-head .addr {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95em;
  color: var(--ink-3);
}
.report-head .coord {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.8em;
  color: var(--muted);
  margin-top: 4px;
}

.summary-box {
  background: var(--paper-2);
  border-left: 4px solid var(--gold);
  padding: 22px 26px;
  margin-bottom: 30px;
  border-radius: 2px;
}
.summary-box .label {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.summary-box p {
  margin: 0;
  font-size: 1.08em;
  line-height: 1.55;
  color: var(--ink);
}
.summary-box .verdict {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 2px;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9em;
  font-weight: 600;
}
.verdict.good { color: var(--good); border-left: 3px solid var(--good); }
.verdict.warn { color: var(--warn); border-left: 3px solid var(--warn); }
.verdict.bad { color: var(--bad); border-left: 3px solid var(--bad); }

.findings-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  font-size: 0.95em;
}
.findings-table th, .findings-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.findings-table th {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
}
.findings-table td.layer { font-weight: 600; color: var(--ink); width: 22%; }
.findings-table td.value { width: 28%; font-family: -apple-system, "Segoe UI", sans-serif; font-weight: 600; }
.findings-table td.value.good { color: var(--good); }
.findings-table td.value.warn { color: var(--warn); }
.findings-table td.value.bad  { color: var(--bad); }
.findings-table td.note { color: var(--ink-3); font-size: 0.93em; }

.section-detail {
  margin-bottom: 30px;
}
.section-detail h2 {
  font-size: 1.25em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin: 0 0 14px;
  color: var(--ink-2);
}
.section-detail .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  font-size: 0.95em;
}
.section-detail .grid .k {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85em;
  color: var(--muted);
}
.section-detail .grid .v {
  font-weight: 600;
  color: var(--ink);
}
.section-detail p {
  color: var(--ink-3);
  margin: 12px 0 0;
}

.rainfall-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92em;
}
.rainfall-table th, .rainfall-table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: center;
}
.rainfall-table th {
  background: var(--paper-2);
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rainfall-table td.first { text-align: left; font-weight: 600; }

.report-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78em;
  color: var(--muted);
  line-height: 1.55;
}
.report-foot b { color: var(--ink); }
.sources {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--paper-2);
  border-radius: 2px;
  font-size: 0.85em;
}

/* Risk flag detail (used in the post-payment report verdict section) */
.risk-counts {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9em;
  font-weight: 600;
}
.risk-count.risk-red { color: var(--bad); }
.risk-count.risk-yellow { color: var(--warn); }
.risk-count.risk-green { color: var(--good); }

.risk-detail h2 {
  margin-top: 0;
}

.risk-flag {
  background: #fff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 0 3px 3px 0;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.risk-flag.risk-red { border-left-color: var(--bad); }
.risk-flag.risk-yellow { border-left-color: var(--warn); }
.risk-flag.risk-green { border-left-color: var(--good); }

.risk-flag-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.risk-pill {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.7em;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
}
.risk-pill.risk-red { background: var(--bad); }
.risk-pill.risk-yellow { background: var(--warn); }
.risk-pill.risk-green { background: var(--good); }

.risk-flag-label {
  font-weight: 700;
  font-size: 1.05em;
  color: var(--ink);
}
.risk-flag-finding {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.88em;
  color: var(--muted);
  margin-bottom: 12px;
}
.risk-flag-section {
  margin-top: 10px;
}
.risk-flag-section p {
  margin: 4px 0 0;
  font-size: 0.95em;
  line-height: 1.55;
}
.risk-flag-eyebrow {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.risk-greens {
  margin-top: 14px;
  padding: 10px 14px;
  background: #eaf4ee;
  border-left: 3px solid var(--good);
  font-size: 0.9em;
  color: var(--ink-3);
  border-radius: 0 3px 3px 0;
}

@media print {
  body { background: #fff; }
  .page { box-shadow: none; margin: 0; padding: 30px; max-width: none; }
  .print-bar { display: none; }
  .risk-flag { break-inside: avoid; page-break-inside: avoid; }
}
