:root {
  --navy: #0C3052;
  --teal: #1594BF;
  --cream: #F2F8FB;
  --dark-navy: #071E34;
  --btn-r: 9px;
  --ink: #1A1A1A;
  --gray-700: #444;
  --gray-600: #525252;
  --gray-500: #6b7280;
  --gray-400: #9CA3AF;
  --gray-300: #D8E8F0;
  --gray-200: #E2EDF3;
  --gray-100: #EEF4F8;
  --good: #1B7A4A;
  --attention: #B45309;
  --critical: #B42318;
  --white: #fff;
  --shadow: 0 10px 30px rgba(12, 48, 82, 0.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", sans-serif;
  --serif: "Lora", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
code { font-size: 0.92em; background: var(--gray-200); padding: 0.1em 0.35em; border-radius: 4px; }

h1, h2, h3, .btn, .eyebrow, .checkup-no, .health-score, .hero-badge-num {
  font-family: var(--cond);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; color: var(--navy); margin: 0 0 0.4rem; line-height: 1.05; }
h2 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: 0 0 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 0 0 0.4rem; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.35rem;
}
.lead { font-size: 1.05rem; color: var(--gray-600); max-width: 40rem; }
.serif-lead { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--navy); margin: 0.25rem 0 0.5rem; text-transform: none; letter-spacing: 0; }
.muted { color: var(--gray-500); font-size: 0.92rem; }
.tagline { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; margin: 0.25rem 0; }
.strong { font-weight: 700; color: var(--navy); text-decoration: none; }
.hidden { display: none !important; }
.inline { display: inline; }

.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.page-pad { padding: 2rem 0 4rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 2px solid transparent; }
.site-header__inner { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand img { display: block; width: 150px; height: auto; }
.header-right { display: flex; align-items: center; gap: 0.85rem; }
.header-phone { font-weight: 700; color: var(--navy); text-decoration: none; font-size: 16px; }
.nav-link { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav-link.is-active { color: var(--teal); }
.demo-banner { background: var(--navy); color: #fff; text-align: center; padding: 0.55rem 1rem; font-size: 0.9rem; }
.demo-banner code { background: rgba(255,255,255,0.12); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; border-radius: var(--btn-r); padding: 0.75rem 1.5rem; font-size: 16px; line-height: 1; border: none; cursor: pointer; text-decoration: none; background: var(--navy); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 14px; }
.btn-block { width: 100%; }
.btn:hover { opacity: 0.93; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkish { background: none; border: 0; color: var(--teal); cursor: pointer; font: inherit; text-decoration: underline; }

.card { background: #fff; border-radius: 18px; padding: 1.4rem 1.5rem; box-shadow: var(--shadow); margin: 0 0 1.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1rem; }
.form-grid.compact { margin-bottom: 1rem; }
.form-grid label, form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; font-weight: 600; color: var(--gray-600); }
.span-2 { grid-column: 1 / -1; }
input, select, textarea {
  font: inherit; color: var(--ink); border: 1px solid var(--gray-300); border-radius: 9px;
  padding: 0.6rem 0.75rem; background: #fff; width: 100%;
}
textarea { resize: vertical; min-height: 4rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid #1594BF; outline-offset: 1px; }
.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.search-row input, .search-row select { flex: 1; min-width: 200px; }

.alert { padding: 0.75rem 1rem; border-radius: 12px; background: var(--gray-100); }
.alert-error { background: #FDECEC; color: #8A1C16; }
.hint { font-size: 0.85rem; color: var(--gray-500); margin-top: 1rem; }

.login-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: min(32rem, 100%); background: #fff; border-radius: 18px; padding: 2rem; box-shadow: var(--shadow); }
.login-card form { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1rem; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th { text-align: left; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); padding: 0.55rem 0.5rem; }
.data-table td { padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.data-table tr.is-priority td { background: #FFF6F4; }

.status { display: inline-block; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--gray-200); color: var(--navy); }
.status-draft { background: var(--gray-200); }
.status-in_review, .status-needs-attention, .status-needs { background: #FEF3C7; color: #92400E; }
.status-sent, .status-good { background: #DCFCE7; color: #166534; }
.status-approved { background: #DBEAFE; color: #1E40AF; }
.status-critical, .status-poor { background: #FEE2E2; color: #991B1B; }
.pill { display: inline-block; margin-left: 0.4rem; border-radius: 999px; padding: 0.1rem 0.5rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.pill-demo { background: var(--navy); color: #fff; }

.result-list { display: grid; gap: 0.6rem; margin-top: 1rem; }
.result-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border: 1px solid var(--gray-200); border-radius: 12px; padding: 0.85rem 1rem; background: var(--gray-100); }
.result-card p { margin: 0.15rem 0 0; }

.inspect-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 3rem; }
.inspect-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; padding: 1.5rem 0 1rem; }
.inspect-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.section-tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 2px solid var(--gray-200); margin-bottom: 1rem; }
.section-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--gray-500); padding: 0.7rem 0.9rem; cursor: pointer; font-size: 1rem; }
.section-tabs button.is-active { color: var(--navy); border-bottom-color: var(--teal); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.map-frame { height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid var(--gray-200); margin: 0.75rem 0; background: var(--gray-200); }
.map-toolbar, .zones-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; justify-content: space-between; margin-bottom: 0.75rem; }
.map-toolbar label { font-size: 0.8rem; font-weight: 600; color: var(--gray-600); }
.pin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.pin-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }

.zone-editor, .zone-card { background: #fff; border-radius: 18px; padding: 1.15rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; border-left: 6px solid var(--teal); }
.zone-editor.status-Good, .zone-card.status-good { border-left-color: var(--good); }
.zone-editor.status-Needs, .zone-editor.status-Needs.Attention,
.zone-editor[data-status="Needs Attention"], .zone-card.status-needs-attention { border-left-color: var(--attention); }
.zone-editor[data-status="Critical"], .zone-editor[data-status="Poor"],
.zone-card.status-critical, .zone-card.status-poor { border-left-color: var(--critical); }
.zone-card header { position: relative; padding-right: 7rem; }
.zone-card header .status { position: absolute; top: 0; right: 0; }
.zone-meta { color: var(--gray-500); margin: 0 0 0.5rem; font-size: 0.9rem; }
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; margin-top: 0.7rem; }
.photo-row figure, .photo-grid figure { margin: 0; }
.photo-row img, .photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; margin-top: 0.8rem; }
figcaption { font-size: 0.85rem; color: var(--gray-600); margin-top: 0.35rem; }

.pricebook-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem; }
.chip { border: 1px solid var(--gray-300); background: #fff; border-radius: 999px; padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.85rem; color: var(--navy); }
.chip:hover { border-color: var(--teal); background: var(--gray-100); }
.quote-totals { margin-top: 1rem; margin-left: auto; width: min(22rem, 100%); }
.quote-totals div { display: flex; justify-content: space-between; padding: 0.3rem 0; }
.quote-totals .grand { border-top: 2px solid var(--navy); margin-top: 0.4rem; padding-top: 0.55rem; font-size: 1.15rem; color: var(--navy); }

.report-header { background: var(--cream); border-bottom: 3px solid var(--navy); }
.report-header__inner, .report-body { width: min(900px, calc(100% - 2rem)); margin: 0 auto; }
.report-header__inner { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 1rem; }
.report-logo { width: 200px; height: auto; }
.report-head-meta { text-align: right; }
.checkup-no { font-weight: 800; color: var(--navy); margin: 0; font-size: 1.2rem; }
.report-body { padding: 1.5rem 0 3rem; }
.report-mast { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1.25rem; align-items: stretch; margin-bottom: 1.25rem; }
.health-card { background: #fff; border-radius: 18px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow); border-top: 6px solid var(--attention); }
.health-card.condition-good { border-top-color: var(--good); }
.health-card.condition-critical, .health-card.condition-poor { border-top-color: var(--critical); }
.health-score { font-size: 3rem; font-weight: 900; color: var(--navy); margin: 0; line-height: 1; }
.health-score span { font-size: 1.1rem; margin-left: 0.2rem; color: var(--gray-500); }
.health-label { font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 1.2rem; margin: 0.3rem 0; }
.summary-text { font-size: 1.05rem; }
.callout-fixed { background: var(--gray-100); border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; padding: 0.8rem 1rem; margin-top: 1rem; }
.callout-fixed h3 { margin-bottom: 0.3rem; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.2rem; margin: 0; }
.spec-grid dt { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500); font-weight: 700; }
.spec-grid dd { margin: 0.15rem 0 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; list-style: none; padding: 0; margin: 0.4rem 0 0; font-size: 0.85rem; }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: -1px; }
.swatch-zone { background: var(--teal); }
.swatch-controller { background: var(--navy); }
.swatch-backflow { background: #64748B; }
.swatch-leak { background: var(--critical); }
.swatch-head { background: #D97706; }

.priority-flag, .optional-flag { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 0.1rem 0.45rem; margin-right: 0.3rem; }
.priority-flag { background: #FEE2E2; color: #991B1B; }
.optional-flag { background: var(--gray-200); color: var(--navy); }
.disclaimer { font-size: 0.85rem; color: var(--gray-500); margin-top: 1rem; }
.sign-pad-wrap { border: 1px solid var(--gray-300); border-radius: 12px; background: #fff; overflow: hidden; touch-action: none; }
#sig-pad { width: 100%; height: 220px; display: block; cursor: crosshair; }
.signature-img { max-width: 320px; background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; padding: 0.4rem; }
.sign-box-empty { height: 90px; border: 1px solid var(--gray-400); border-radius: 8px; margin-top: 0.8rem; }
.sign-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }
.pdf-link { text-align: center; margin: 1.5rem 0; }
.tceq-footer { font-size: 0.78rem; color: var(--gray-500); border-top: 1px solid var(--gray-300); padding-top: 1rem; margin-top: 2rem; }
.check-col { width: 2rem; text-align: center; }
.req-mark { color: var(--teal); }

.site-footer { background: var(--dark-navy); color: rgba(255,255,255,0.82); padding: 2rem 0; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer a { color: #fff; }
.site-footer.compact { padding: 1rem 0; text-align: center; }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.4rem; }
.dot-ok { background: var(--good); }
.dot-demo { background: var(--attention); }
.dot-bad { background: var(--critical); }
.check-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.8rem; font-weight: 600; }
.status-line { display: flex; align-items: center; }

.leaflet-container { font-family: var(--font); }
.map-pin {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  display: grid; place-items: center;
}
.map-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 11px; font-family: var(--cond); }

@media screen and (max-width: 800px) {
  .site-header__inner { height: 68px; }
  .form-grid, .report-mast, .spec-grid { grid-template-columns: 1fr; }
  .header-phone { display: none; }
  .map-frame { height: 320px; }
  .inspect-actions .btn, .page-head .btn { width: 100%; }
  .report-head-meta { text-align: left; }
  .report-header__inner { flex-direction: column; align-items: flex-start; }
}

/* Print / PDF — desktop layout (do not inherit the mobile breakpoint) */
@page { size: Letter; margin: 0.4in; }
.is-print { background: #fff; }
.is-print .site-footer, .is-print .pdf-link, .is-print .demo-banner { display: none !important; }
.is-print .report-header { border-bottom-width: 2px; }
.is-print .report-header__inner, .is-print .report-body { width: 100%; }
.is-print .report-header__inner { flex-direction: row; align-items: center; padding: 0.35rem 0 0.5rem; }
.is-print .header-phone { display: block; }
.is-print .report-body { padding: 0.6rem 0 0; }
.is-print .report-mast { grid-template-columns: 1.35fr 0.85fr; gap: 0.9rem; margin-bottom: 0.8rem; }
.is-print .spec-grid { grid-template-columns: 1fr 1fr; }
.is-print .photo-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.is-print .card, .is-print .zone-card, .is-print .health-card { box-shadow: none; border: 1px solid var(--gray-200); padding: 0.85rem 1rem; margin-bottom: 0.75rem; }
.is-print .health-card { break-inside: avoid; }
.is-print .zone-card { break-inside: avoid; }
.is-print .map-frame { break-inside: avoid; height: 280px; margin: 0.4rem 0; }
.is-print .leaflet-control-container { display: none !important; }
.is-print .photo-grid img, .is-print .photo-row img { max-height: 180px; aspect-ratio: 4/3; }
.is-print h1 { font-size: 2rem; }
.is-print h2 { font-size: 1.25rem; margin-bottom: 0.45rem; }
.is-print .tceq-footer { margin-top: 0.8rem; padding-top: 0.6rem; }
.is-print a { text-decoration: none; color: inherit; }
@media print {
  .site-footer, .pdf-link, .demo-banner { display: none !important; }
  .report-mast { grid-template-columns: 1.35fr 0.85fr; }
  .spec-grid, .form-grid { grid-template-columns: 1fr 1fr; }
  .header-phone { display: block !important; }
  .leaflet-control-container { display: none !important; }
}

/* 5-step field wizard */
.step-nav {
  position: sticky;
  top: 80px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  background: var(--cream);
  padding: 0.65rem 0 0.85rem;
  margin-bottom: 1rem;
}
.step-progress { display: none; }
.step-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid var(--gray-300);
  background: #fff;
  color: var(--gray-600);
  font-family: var(--cond);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 9px;
  cursor: pointer;
  padding: 0.45rem 0.4rem;
}
.step-btn.is-active { border-color: var(--teal); color: var(--navy); background: #fff; box-shadow: inset 0 -3px 0 var(--teal); }
.step-num {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--gray-200); color: var(--navy); font-size: 0.85rem;
}
.step-btn.is-active .step-num { background: var(--teal); color: #fff; }
.step-footer { display: flex; justify-content: space-between; gap: 0.75rem; margin: 1.25rem 0 2rem; }
.step-footer .btn { min-height: 44px; min-width: 8rem; }
.save-state { font-size: 0.85rem; color: var(--gray-500); min-width: 7rem; }
.save-state[data-kind="ok"] { color: var(--good); }
.save-state[data-kind="warn"] { color: var(--attention); }

.program-card { border: 1px solid var(--gray-200); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.85rem; background: #fff; }
.program-card.is-off { opacity: 0.62; }
.program-card header { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.chk { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--navy); }
.day-row, .start-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.day-chip {
  min-width: 44px; min-height: 36px; border: 1px solid var(--gray-300);
  background: #fff; border-radius: 8px; font-weight: 700; color: var(--navy); cursor: pointer;
}
.day-chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.start-time { font-size: 0.78rem; font-weight: 600; color: var(--gray-600); }
.schedule-totals { margin: 0.4rem 0 0; color: var(--navy); }
.data-table.compact th, .data-table.compact td { padding: 0.35rem 0.4rem; font-size: 0.88rem; }

.callout-heading { font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); margin: 0.8rem 0 0.45rem; font-size: 1.05rem; }
.callout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.4rem; margin-bottom: 0.8rem; }
.callout-chip {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 0.2rem;
  border: 1px solid var(--gray-300); border-radius: 8px; padding: 0.2rem 0.3rem 0.2rem 0.5rem;
  font-size: 0.78rem; font-weight: 600; color: var(--navy); background: #fff;
}
.callout-chip.has-count { border-color: var(--critical); background: #FFF6F4; }
.callout-chip .count-btn {
  width: 32px; height: 32px; border: 0; background: var(--gray-100); border-radius: 6px;
  font-size: 1.1rem; cursor: pointer; color: var(--navy);
}
.callout-chip strong { min-width: 1rem; text-align: center; }
.note-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.audio-row { display: flex; align-items: center; gap: 0.75rem; }
.photo-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.photo-library img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; display: block; }
.photo-tag { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal); }
.tiny { display: block; font-size: 0.75rem; margin-top: 0.25rem; font-weight: 600; color: var(--gray-600); }

/* Compact customer report */
.component-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.component-grid h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.spec-grid.stacked { grid-template-columns: 1fr; gap: 0.35rem; }
.report-section.tight { padding: 1rem 1.15rem; margin-bottom: 0.9rem; }
.schedule-meta { margin: 0 0 0.45rem; font-size: 0.92rem; }
.matrix-wrap { overflow-x: auto; }
.matrix-table { table-layout: fixed; font-size: 0.78rem; }
.matrix-table th, .matrix-table td { text-align: center; padding: 0.3rem 0.15rem; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; width: 4.2rem; }
.matrix-table th.rot { height: 5.2rem; vertical-align: bottom; }
.matrix-table th.rot span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; display: inline-block; font-size: 0.68rem;
}
.matrix-table td.has-count { background: #FEE2E2; color: var(--critical); font-weight: 800; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.65rem; }
.photo-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; }
.photo-strip figcaption { font-size: 0.78rem; margin-top: 0.3rem; }
.priority-flag.critical { background: #FEE2E2; color: #991B1B; }
.priority-flag.recommended { background: #DBEAFE; color: #1E40AF; }
.bang { color: var(--critical); font-weight: 900; font-size: 1.1rem; }

@media screen and (max-width: 800px) {
  .site-header { height: auto; }
  .step-nav { top: 68px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .step-label { display: none; }
  .component-grid { grid-template-columns: 1fr; }
  .callout-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  .report-page.page-1, .report-page.page-2 { break-after: page; page-break-after: always; }
  .report-page { break-inside: avoid; }
  .component-grid { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: repeat(5, 1fr); }
  .card, .report-section { box-shadow: none; border: 1px solid var(--gray-200); }
  .matrix-table th.rot { height: 4.4rem; }
  .sign-section, .tceq-footer { break-inside: avoid; }
}
.is-print .report-page.page-1, .is-print .report-page.page-2 { break-after: page; page-break-after: always; }
.is-print .component-grid { grid-template-columns: 1fr 1fr; }
.is-print .photo-strip { grid-template-columns: repeat(5, 1fr); }
.is-print .report-section.tight { padding: 0.7rem 0.8rem; margin-bottom: 0.55rem; }
