:root {
  --rs-graphite-950: #050908;
  --rs-graphite-900: #101312;
  --rs-graphite-800: #1b211f;
  --rs-graphite-600: #4b5350;
  --rs-graphite-100: #f4f4f2;
  --rs-white: #ffffff;
  --rs-line: #e7e7e2;
  --rs-orange: #ff5a14;
  --rs-green: #2e8b57;
  --rs-yellow: #c99400;
  --rs-red: #c7432f;
  --rs-radius: 12px;
  --rs-shadow-panel: 0 22px 60px rgba(0,0,0,.14);
}

* { box-sizing: border-box; min-width: 0; }

html {
  background: #d9d9d4;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--rs-graphite-900);
  background: #d9d9d4;
  line-height: 1.48;
}

.report-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 auto 18px;
  color: var(--rs-white);
  background: var(--rs-graphite-950);
  border-radius: var(--rs-radius);
  padding: 14px 16px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border: 0;
  background: var(--rs-orange);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: var(--rs-radius);
  padding: 11px 16px;
  box-shadow: 0 12px 32px rgba(255,90,20,.22);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}

.logo span:not(.mark) { color: var(--rs-orange); }

.mark {
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  color: #fff;
  border: 1px solid var(--rs-orange);
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.page {
  min-height: 1120px;
  background: var(--rs-white);
  border-radius: 2px;
  box-shadow: var(--rs-shadow-panel);
  margin: 0 0 22px;
  padding: 56px;
  position: relative;
  overflow: hidden;
}

.page.dark {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5,9,8,.96), rgba(5,9,8,.78) 45%, rgba(5,9,8,.22)),
    url("hero-roofsignal-v6.png") center/cover;
}

.cover {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cover-top,
.page-header,
.page-footer,
.two-col,
.meta-grid,
.summary-grid,
.finding-head,
.cost-row {
  display: grid;
  gap: 18px;
}

.cover-top,
.page-header,
.page-footer {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.cover-content {
  align-self: center;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0 0 14px;
}

.orange { color: var(--rs-orange); }

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 62px;
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 22px;
  max-width: 760px;
}

h2 {
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 18px;
}

h3 {
  font-size: 19px;
  line-height: 1.22;
  margin-bottom: 8px;
}

.lead {
  font-size: 21px;
  max-width: 690px;
}

.muted {
  color: var(--rs-graphite-600);
}

.dark .muted {
  color: rgba(255,255,255,.72);
}

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

.cover-meta div,
.card,
.metric,
.legend,
.finding,
.risk-box,
.photo-block,
.thermo-block,
.signature {
  border: 1px solid var(--rs-line);
  border-radius: var(--rs-radius);
}

.cover-meta div {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.16);
  padding: 16px;
}

.cover-meta span,
.metric span,
.report-id span,
.finding-label,
.small-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: var(--rs-graphite-600);
}

.cover-meta span,
.dark .report-id span {
  color: rgba(255,255,255,.68);
}

.cover-meta strong,
.metric strong {
  display: block;
  font-size: 18px;
}

.report-id {
  text-align: right;
  font-size: 14px;
}

.page-header {
  border-bottom: 1px solid var(--rs-line);
  padding-bottom: 18px;
  margin-bottom: 34px;
}

.page-header .logo {
  color: var(--rs-graphite-950);
}

.page-header .mark {
  color: var(--rs-graphite-950);
}

.page-footer {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 28px;
  color: var(--rs-graphite-600);
  font-size: 12px;
  border-top: 1px solid var(--rs-line);
  padding-top: 12px;
}

.two-col {
  grid-template-columns: 1fr 1fr;
}

.two-col.wide-left {
  grid-template-columns: 1.28fr .72fr;
}

.meta-grid {
  grid-template-columns: repeat(3, 1fr);
}

.summary-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card,
.metric,
.legend,
.risk-box,
.signature {
  background: #fff;
  padding: 18px;
}

.metric strong {
  font-size: 30px;
  line-height: 1;
  margin-top: 8px;
}

.metric.red strong { color: var(--rs-red); }
.metric.yellow strong { color: var(--rs-yellow); }
.metric.orange strong { color: var(--rs-orange); }
.metric.green strong { color: var(--rs-green); }

.callout {
  background: var(--rs-graphite-950);
  color: #fff;
  border-radius: var(--rs-radius);
  padding: 22px;
}

.callout strong {
  display: block;
  font-size: 21px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.check-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.plain-list li {
  border-bottom: 1px solid var(--rs-line);
  padding: 10px 0;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--rs-orange);
  border-radius: 50%;
  margin-right: 10px;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--rs-line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rs-graphite-600);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
}

.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rs-orange);
}

.status.red::before { background: var(--rs-red); }
.status.yellow::before { background: var(--rs-yellow); }
.status.green::before { background: var(--rs-green); }

.photo-block,
.thermo-block {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  display: block;
  background:
    linear-gradient(130deg, rgba(5,9,8,.05), rgba(5,9,8,.25)),
    repeating-linear-gradient(35deg, #69736f 0 18px, #56605c 18px 36px);
}

.photo-block img,
.thermo-block img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: block;
  object-fit: cover;
}

.photo-block.detail,
.thermo-block.detail {
  min-height: 220px;
}

.photo-block.detail img,
.thermo-block.detail img {
  min-height: 220px;
}

.finding-photo {
  display: grid;
  gap: 8px;
}

.pin {
  position: absolute;
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: var(--rs-graphite-950);
  border: 1px solid var(--rs-orange);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pin::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 100%;
  width: 1px;
  height: 34px;
  background: var(--rs-orange);
}

.p1 { left: 9%; top: 18%; }
.p2 { left: 54%; top: 26%; }
.p3 { left: 18%; top: 58%; }
.p4 { left: 62%; top: 60%; }
.p5 { left: 39%; top: 43%; }
.lead-pin { left: 53%; top: 45%; }
.drain-pin { left: 42%; top: 35%; }
.solar-hotspot-1 { left: 43%; top: 43%; }
.solar-hotspot-2 { left: 58%; top: 45%; }
.facade-joint { left: 57%; top: 38%; }
.facade-crack { left: 75%; top: 46%; }
.facade-fascia { left: 37%; top: 22%; }

.caption {
  font-size: 12px;
  color: var(--rs-graphite-600);
  margin-top: 8px;
}

.finding {
  padding: 0;
  overflow: hidden;
  margin-bottom: 18px;
}

.finding-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rs-line);
  background: var(--rs-graphite-100);
}

.finding-body {
  padding: 18px;
}

.finding-label {
  color: var(--rs-orange);
  margin-bottom: 8px;
}

.priority {
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.priority.red { background: var(--rs-red); }
.priority.orange { background: var(--rs-orange); }
.priority.yellow { background: var(--rs-yellow); }
.priority.green { background: var(--rs-green); }

.risk-box {
  background: var(--rs-graphite-100);
}

.cost-row {
  grid-template-columns: 1.2fr .6fr .6fr .6fr;
  padding: 13px 0;
  border-bottom: 1px solid var(--rs-line);
  align-items: start;
}

.cost-row.head {
  color: var(--rs-graphite-600);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}

.total {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--rs-radius);
  background: var(--rs-graphite-950);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  border-left: 3px solid var(--rs-orange);
  padding: 4px 0 4px 16px;
}

.signature {
  min-height: 150px;
  display: grid;
  align-content: end;
}

@media (max-width: 820px) {
  .report-shell { padding: 0; }
  .report-toolbar { border-radius: 0; margin-bottom: 0; }
  .page {
    min-height: auto;
    margin: 0;
    padding: 30px 18px 72px;
    box-shadow: none;
  }
  .cover-meta,
  .summary-grid,
  .meta-grid,
  .two-col,
  .two-col.wide-left {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .page-footer {
    left: 18px;
    right: 18px;
  }
  .cost-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .cost-row.head { display: none; }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }
  html,
  body {
    background: #fff;
  }
  .report-shell {
    width: 100%;
    padding: 0;
  }
  .report-toolbar {
    display: none;
  }
  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 18mm;
    box-shadow: none;
    border-radius: 0;
    break-after: page;
  }
  .page-footer {
    left: 18mm;
    right: 18mm;
    bottom: 10mm;
  }
  .photo-block,
  .thermo-block {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
