/* report */
#panel-report{padding:12px;gap:8px}
/* Report-overlay export actions (app chrome around the preview — NOT part of the exported
   document, which carries its own inline styles). Were inline style blobs in index.html. */
.rpt-action{color:#fff;border:none;border-radius:var(--radius);font-size:var(--t-md);font-weight:600;cursor:pointer}
.rpt-action:hover{filter:brightness(1.08)}
.rpt-action.pdf{padding:10px 28px;background:var(--teal)}
.rpt-action.word{padding:10px 24px;background:#2b5797} /* Word-blue: deliberate, matches the .doc export's own branding */
/* report-gen loading overlay — shown for the duration of generateReport(), which can run
   several seconds (fitting the map, forcing layers visible, capturing). Without this, the
   only feedback during that stretch was a toast that auto-dismissed after 3.5s, so a slow
   generation looked identical to a locked-up tab and could trip Chrome's own "Page
   Unresponsive" dialog with nothing on-page to reassure the user it was still working. */
#report-gen-overlay{position:fixed;inset:0;z-index:2000;display:none;align-items:center;justify-content:center;background:rgba(8,18,34,.6);animation:fadeBg .15s ease}
#report-gen-overlay.visible{display:flex}
.rgo-box{background:var(--navy-mid);border:1px solid var(--divider);border-radius:var(--radius);padding:26px 34px;display:flex;flex-direction:column;align-items:center;gap:13px;box-shadow:0 20px 60px rgba(0,0,0,.4);animation:fInModal .2s ease;min-width:220px}
.rgo-spinner{width:32px;height:32px;border-radius:50%;border:3px solid var(--teal-border);border-top-color:var(--teal);animation:rgoSpin .8s linear infinite;flex-shrink:0}
@keyframes rgoSpin{to{transform:rotate(360deg)}}
.rgo-status{font-size:12px;color:var(--text-muted);text-align:center;line-height:1.4}
/* ── PRINT / PDF REPORT STYLES ── */
#report-overlay {
  display:none;position:fixed;inset:0;z-index:15400;
  background:rgba(0,0,0,0.75);align-items:flex-start;justify-content:center;
  overflow-y:auto;padding:20px 0
}
#report-overlay.visible { display:flex; }
#report-frame {
  background:#fff;color:#1a1a1a;
  width:210mm;max-height:90vh;overflow-y:auto;
  border-radius:8px;box-shadow:0 24px 80px rgba(0,0,0,0.6);
  font-family:'Avenir Next','Segoe UI',Arial,sans-serif;
  font-size:11pt;line-height:1.5
}
.rpt-close {
  position:absolute;top:16px;right:16px;
  background:rgba(255,255,255,0.15);border:none;
  color:#fff;font-size:20px;cursor:pointer;
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center
}
.rpt-close:hover{background:rgba(255,255,255,0.25)}
/* Report content */
.rpt { padding:14mm 16mm; }
.rpt-header { display:flex;align-items:flex-start;justify-content:space-between;padding-bottom:10px;border-bottom:3px solid #1D9E75;margin-bottom:16px }
.rpt-logo-wrap { display:flex;align-items:center;gap:10px }
.rpt-logo { width:44px;height:44px }
.rpt-app-name { font-size:20pt;font-weight:700;color:#111;letter-spacing:-.02em }
.rpt-app-sub { font-size:9pt;color:#666;margin-top:2px }
.rpt-meta { text-align:right;font-size:9pt;color:#666;line-height:1.6 }
.rpt-meta strong { color:#111 }
.rpt-section { margin-bottom:18px }
.rpt-section-title {
  font-size:10pt;font-weight:700;color:#fff;
  background:#1a2e44;padding:5px 10px;
  border-radius:4px;margin-bottom:10px;
  letter-spacing:.04em;text-transform:uppercase
}
.rpt-map-wrap { width:100%;overflow:hidden;border:2px solid #222;margin-bottom:4px }
.rpt-map-wrap img { width:100%;height:auto;display:block }
.rpt-map-cap { font-size:8pt;color:#888;text-align:center;margin-bottom:14px }
/* Summary grid */
.rpt-summary-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:14px }
.rpt-tc { border-radius:5px;padding:10px 6px;text-align:center;border:1px solid #ddd }
.rpt-tc-icon { font-size:18px;display:block;margin-bottom:3px }
.rpt-tc-label { font-size:8pt;font-weight:600;display:block;margin-bottom:3px;color:#444 }
.rpt-tc-count { font-size:16pt;font-weight:700;display:block }
.rpt-tc-sub { font-size:7pt;color:#888;display:block;margin-top:1px }
.rpt-tc-green { background:#f0f8e8;border-color:#3B6D11 }
.rpt-tc-green .rpt-tc-count { color:#3B6D11 }
.rpt-tc-amber { background:#fef5e7;border-color:#EF9F27 }
.rpt-tc-amber .rpt-tc-count { color:#b87800 }
.rpt-tc-red { background:#fdf0f0;border-color:#F09595 }
.rpt-tc-red .rpt-tc-count { color:#c0392b }
.rpt-tc-none { background:#f8f8f8;border-color:#e0e0e0 }
.rpt-tc-none .rpt-tc-count { color:#bbb }
/* Legal triggers */
.rpt-legal-box { background:#fff5f5;border:1.5px solid #F09595;border-radius:5px;padding:10px 14px;margin-bottom:14px }
.rpt-legal-title { font-size:10pt;font-weight:700;color:#c0392b;margin-bottom:8px;display:flex;align-items:center;gap:6px }
.rpt-trigger { border-top:1px solid #fcc;padding:7px 0;font-size:10pt }
.rpt-trigger:first-of-type { border-top:none;padding-top:0 }
.rpt-trigger-name { font-weight:700;color:#c0392b;margin-bottom:2px }
.rpt-trigger-action { font-size:9pt;color:#444;margin-bottom:3px }
.rpt-trigger-link { font-size:9pt;color:#1D9E75 }
/* Constraint register */
.rpt-group { margin-bottom:12px;break-inside:avoid }
.rpt-group-hdr { display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:4px;margin-bottom:4px }
.rpt-group-dot { width:10px;height:10px;border-radius:2px;flex-shrink:0 }
.rpt-group-name { font-size:10pt;font-weight:700;flex:1 }
.rpt-group-count { font-size:9pt;font-weight:600;padding:1px 8px;border-radius:10px }
.rpt-feat-table { width:100%;border-collapse:collapse;font-size:9pt }
.rpt-feat-table th { background:#f0f0f0;padding:4px 8px;text-align:left;font-weight:600;color:#444;border:1px solid #ddd }
.rpt-feat-table td { padding:4px 8px;border:1px solid #eee;vertical-align:top;color:#333 }
.rpt-feat-table tr:nth-child(even) td { background:#fafafa }
/* Disclaimer */
.rpt-disc { background:#f8f8f8;border:1px solid #ddd;border-radius:4px;padding:10px 14px;font-size:8.5pt;color:#666;line-height:1.6 }
.rpt-disc strong { color:#333 }
/* Footer */
.rpt-footer { margin-top:14px;padding-top:10px;border-top:1px solid #ddd;display:flex;justify-content:space-between;align-items:center;font-size:8pt;color:#aaa }
/* Print media */
@media print {
  #app, #loading, #toast-c, #authGate { display:none !important }
  body { background:#fff !important; overflow:visible !important; height:auto !important }
  html { overflow:visible !important; height:auto !important }
  #report-overlay {
    display:block !important;
    position:static !important;
    inset:auto !important;
    background:none !important;
    padding:0 !important;
    overflow:visible !important;
  }
  #report-overlay > div {
    position:static !important;
    width:100% !important;
    max-height:none !important;
    overflow:visible !important;
  }
  #report-frame {
    box-shadow:none !important;
    border-radius:0 !important;
    max-height:none !important;
    overflow:visible !important;
    width:100% !important;
  }
  * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; color-adjust:exact !important; }
  .rpt-close, #rpt-print-btn, #rpt-word-btn, #rpt-close-btn, #rpt-toolbar, .rpt-summary-view { display:none !important }
  /* Whitespace comes from .rpt's own padding, not @page's margin — the browser's print
     dialog "Margins" dropdown (None/Minimum/Custom) can override @page's margin down to
     zero, and with no fallback padding the report content then sits flush against the
     physical page edge and gets clipped by the printer/PDF renderer. Self-contained
     padding here means the report looks right regardless of what margin option is picked. */
  .rpt { padding:14mm 16mm }
  @page { margin:0; size:A4 portrait }
}

/* ── Report setup card ────────────────────────────────────────────────────────
   The author/branding/notes block now uses the same .tc-card shell as the Define
   panel's cards, so all four steps share one card language. These rules replace a
   pile of inline style blobs with hardcoded 10/11/12px sizes and 5px radii (rule 6b);
   values move onto the token scale. #rd-brand keeps its own sizing because a native
   <input type="color"> needs explicit dimensions to render sanely. */
.rd-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--s3)}
.rd-wide{grid-column:1/3}
.rd-brand-row{display:flex;align-items:center;gap:var(--s3);margin-top:2px}
#rd-brand{width:40px;height:30px;padding:2px;background:var(--navy);border:1px solid var(--divider);
  border-radius:var(--r-md);cursor:pointer;flex-shrink:0}
/* Sub-section within the card — divider rather than another nested box, so the card
   reads as one object instead of a stack of panels. */
.rd-sub{margin-top:var(--s6);padding-top:var(--s5);border-top:1px solid var(--divider)}
.rd-sub-lbl{font-size:var(--t-xs);font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--text-dim);margin-bottom:var(--s3);display:block}
.rd-sub-row{display:flex;align-items:center;gap:var(--s3)}
.rd-btn{font-size:var(--t-sm);font-weight:600;color:var(--teal);background:var(--teal-dim);
  border:1px solid var(--teal-border);border-radius:var(--r-md);padding:var(--s2) var(--s5);
  cursor:pointer;font-family:inherit;transition:background .15s,border-color .15s}
.rd-btn:hover{background:var(--teal-border)}
.rd-notes{width:100%;min-height:56px;padding:var(--s2) var(--s3);background:var(--navy);
  border:1px solid var(--divider);border-radius:var(--r-md);color:var(--text);
  font-size:var(--t-base);font-family:inherit;resize:vertical}
