/* Property report page. Every selector is prefixed .pr- (the one hp-field rule is scoped by .pr-report / .pr-form).
   Colours and type come from the website's design system (nccc-site, src/assets/css/site.css): --navy, --ink, --muted,
   --brass, --brass-dark, --cream, --font, --serif and --radius. Each is read with the design system's own value as the
   fallback, so /dev/report (which has no site stylesheet) looks the same. Red and amber are the report's warning colours
   and stay as they were; they appear nowhere else on the site.
   Hairlines and soft panels are the report's own warm greys (the --pr- values on .pr-root), because the site's --line
   changes colour inside navy bands. Those greys are decorative only: a text field's border is its only edge on the
   white panel, so fields use --muted (6.0:1 on white; WCAG 1.4.11 asks for 3:1).
   Text never clips: record text wraps (overflow-wrap:anywhere) and only chips and pills refuse to wrap. */

.pr-report-host, .pr-search, .pr-status, .pr-quota-host, .pr-form-slot, .pr-turnstile {
  font-family: var(--font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  color: var(--ink, #0b1f33);
  font-size: 16px;
  line-height: 1.5;
  max-width: 100%;
  box-sizing: border-box;
}
/* The root's own light panel, so the report reads the same on a white, cream or navy band. */
.pr-root {
  --pr-line: #dcd5c7;
  --pr-line-strong: #c9bfae;
  --pr-soft: #faf8f3;
  --pr-chip: #efeae0;
  --pr-dash: #e5dfd2;
  --pr-amber: #d9a441;
  --pr-amber-soft: #fff1d6;
  --pr-radius: var(--radius, 2px);
  font-family: var(--font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  background: #fff; color: var(--ink, #0b1f33); border: 1px solid var(--pr-line); border-radius: var(--pr-radius);
  padding: 24px; margin: 0; min-width: 0;
}
.pr-report, .pr-report *, .pr-form, .pr-form *, .pr-search, .pr-search *, .pr-quota, .pr-quota * { box-sizing: border-box; }

/* ---------- search + status ---------- */
.pr-search { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.pr-search-input {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 16px; color: var(--ink, #0b1f33);
  padding: 11px 14px; border: 1.5px solid var(--muted, #5b6470); border-radius: var(--pr-radius); background: #fff;
}
.pr-search-input:focus-visible { outline: 3px solid var(--brass-dark, #886839); outline-offset: 1px; border-color: var(--navy, #0b1f33); }
.pr-search-secret { flex-basis: 100%; }
.pr-turnstile { margin: 0 0 8px; }
.pr-status { margin: 0 0 12px; overflow-wrap: anywhere; }
/* Screen-reader-only live region (announces loading, ready and errors): off-screen, never display:none */
.pr-sr-status {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: normal;
}
.pr-status-text { margin: 0 0 6px; color: var(--muted, #5b6470); }
.pr-lookup-error {
  margin: 0 0 8px; padding: 9px 12px; background: #fde2e1; border-left: 4px solid #c62828; border-radius: 0 var(--pr-radius) var(--pr-radius) 0;
  color: #a61b1b; font-weight: 600; overflow-wrap: anywhere;
}
.pr-candidates { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.pr-quota { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }

/* ---------- buttons ---------- */
.pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; min-height: 44px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; text-align: center; text-decoration: none;
  padding: 10px 18px; border-radius: var(--pr-radius); cursor: pointer; overflow-wrap: anywhere;
  color: var(--navy, #0b1f33); background: #fff; border: 1.5px solid var(--pr-line-strong);
}
.pr-btn:hover { background: var(--cream, #f4f1ea); text-decoration: none; }
.pr-btn--primary { background: var(--brass, #b8925a); border-color: var(--brass, #b8925a); color: var(--navy, #0b1f33); }
.pr-btn--primary:hover { background: var(--navy, #0b1f33); border-color: var(--navy, #0b1f33); color: #fff; }
.pr-btn[disabled] { opacity: .6; cursor: default; }
/* Address candidates / suggestions are .pr-btn too: keep these after the .pr-btn rules so the list look wins the cascade */
.pr-candidate, .pr-suggestion { width: 100%; justify-content: flex-start; text-align: left; font-weight: 500; letter-spacing: 0; }

/* Focus rings on everything interactive. Dark brass: brass itself is under 3:1 against white. */
.pr-btn:focus-visible, .pr-row-head:focus-visible, .pr-card-head:focus-visible, .pr-closed-toggle:focus-visible,
.pr-jump:focus-visible, .pr-official:focus-visible, .pr-field input:focus-visible, .pr-field textarea:focus-visible {
  outline: 3px solid var(--brass-dark, #886839); outline-offset: 2px;
}

/* ---------- report shell ---------- */
.pr-report { display: flex; flex-direction: column; gap: 16px; width: 100%; min-width: 0; }
.pr-report [hidden], .pr-row-body[hidden], .pr-card-detail[hidden], .pr-closed[hidden], .pr-progress[hidden] { display: none; }

/* header */
.pr-header {
  background: var(--navy, #0b1f33); color: #fff; padding: 18px 20px; border-bottom: 3px solid var(--brass, #b8925a);
  border-radius: var(--pr-radius); overflow-wrap: anywhere;
}
.pr-address {
  margin: 0; color: #fff; font-family: var(--serif, 'DM Serif Display', Georgia, 'Times New Roman', serif);
  font-size: 26px; font-weight: 400; line-height: 1.2;
}
.pr-meta { margin: 6px 0 0; font-size: 14px; opacity: .88; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.pr-meta-item { min-width: 0; }
.pr-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 12px; }
.pr-tag { display: inline-block; background: rgba(244, 241, 234, .14); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; max-width: 100%; overflow-wrap: anywhere; }

/* progress */
.pr-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted, #5b6470); }
.pr-progress-text { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pr-progress-bar { flex: 1 1 80px; height: 6px; background: var(--pr-line); border-radius: 3px; overflow: hidden; }
.pr-progress-fill { display: block; height: 100%; width: 0; background: var(--brass-dark, #886839); transition: width .25s ease; }

/* error / empty */
.pr-error {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: #fde2e1; border-left: 4px solid #c62828; border-radius: 0 var(--pr-radius) var(--pr-radius) 0; padding: 10px 12px; color: #a61b1b;
}
.pr-error-text { flex: 1 1 200px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pr-empty { margin: 0; padding: 14px; border: 1px dashed var(--pr-line-strong); border-radius: var(--pr-radius); color: var(--muted, #5b6470); overflow-wrap: anywhere; }

/* red-flag strip */
.pr-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-flag {
  background: var(--pr-amber-soft); border-left: 4px solid var(--pr-amber); border-radius: 0 var(--pr-radius) var(--pr-radius) 0;
  padding: 8px 12px; font-weight: 600; overflow-wrap: anywhere;
}
.pr-flag--high { background: #fde2e1; border-left-color: #c62828; color: #a61b1b; }
.pr-flag--medium { background: var(--pr-amber-soft); border-left-color: var(--pr-amber); }

/* key findings */
.pr-findings { background: #fff; border: 1px solid var(--pr-line); border-top: 2px solid var(--brass, #b8925a); border-radius: var(--pr-radius); padding: 14px 16px; }
.pr-section-title { margin: 0 0 6px; font-family: var(--serif, 'DM Serif Display', Georgia, 'Times New Roman', serif); font-size: 19px; font-weight: 400; color: var(--navy, #0b1f33); }
.pr-findings ul { margin: 0; padding-left: 20px; }
.pr-findings li { margin: 4px 0; overflow-wrap: anywhere; }

/* jump chips */
.pr-jumps { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-jump {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font: inherit; font-size: 14px; color: var(--navy, #0b1f33);
  background: #fff; border: 1px solid var(--pr-line-strong); border-radius: 999px; padding: 3px 14px; cursor: pointer;
}
.pr-jump:hover { background: var(--cream, #f4f1ea); }
.pr-jump.hot { border-color: var(--pr-amber); background: var(--pr-amber-soft); }
.pr-jump-n { font-weight: 700; }
.pr-jump-flag { font-size: 12px; font-weight: 700; color: #a61b1b; }

/* ---------- agency rows ---------- */
.pr-rows { display: flex; flex-direction: column; gap: 8px; }
/* The site header is sticky: jump links and scrollIntoView must not park a row or form under it. */
.pr-row, .pr-form { scroll-margin-top: 140px; }
.pr-row { background: #fff; border: 1px solid var(--pr-line); border-radius: var(--pr-radius); min-width: 0; }
.pr-row.hot { border-color: var(--pr-amber); }
.pr-row--clear { background: var(--cream, #f4f1ea); }
.pr-row-head {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 11px 14px; text-align: left;
  font: inherit; color: inherit; background: transparent; border: 0; border-radius: var(--pr-radius); cursor: pointer;
}
.pr-row-head:hover { background: rgba(11, 31, 51, .04); }
.pr-row-name {
  flex: 1 1 auto; min-width: 0; font-family: var(--serif, 'DM Serif Display', Georgia, 'Times New Roman', serif);
  font-size: 18px; font-weight: 400; color: var(--navy, #0b1f33); overflow-wrap: anywhere;
}
.pr-row--clear .pr-row-name { font-family: inherit; font-size: inherit; font-weight: 600; color: var(--muted, #5b6470); }
.pr-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: 0 1 auto; min-width: 0; }
.pr-caret { flex: 0 0 auto; color: var(--brass-dark, #886839); font-size: 16px; line-height: 1; transition: transform .15s ease; }
.pr-row-head[aria-expanded="true"] .pr-caret, .pr-closed-toggle[aria-expanded="true"] .pr-caret { transform: rotate(90deg); }
.pr-row-body { border-top: 1px solid var(--pr-line); background: var(--pr-soft); padding: 10px 14px 12px; border-radius: 0 0 var(--pr-radius) var(--pr-radius); min-width: 0; }

/* chips + pills (the only elements allowed to refuse wrapping) */
.pr-chip, .pr-pill {
  display: inline-block; white-space: nowrap; border-radius: 999px; font-weight: 600; line-height: 1.5;
  background: var(--pr-chip); color: var(--muted, #5b6470);
}
.pr-chip { padding: 1px 9px; font-size: 12px; }
.pr-chip--open, .pr-chip--due, .pr-chip--flag { background: #fde2e1; color: #a61b1b; }
.pr-chip--warn { background: #fff1d6; color: #8a5a00; }
.pr-pill { padding: 0 8px; margin-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: .03em; flex: 0 0 auto; }
.pr-pill--open { background: #fde2e1; color: #a61b1b; }
.pr-pill--closed, .pr-pill--info { background: var(--pr-chip); color: var(--muted, #5b6470); }

/* source lines */
.pr-sec { padding: 6px 0; border-bottom: 1px dashed var(--pr-dash); min-width: 0; }
.pr-sec:last-of-type { border-bottom: 0; }
.pr-src { font-size: 14.5px; overflow-wrap: anywhere; }
.pr-src-label { font-weight: 600; color: var(--navy, #0b1f33); }
.pr-src-detail { color: var(--ink, #0b1f33); }
.pr-src--none .pr-src-label { font-weight: 500; }
.pr-src-none { color: var(--muted, #5b6470); }
.pr-src-note { color: #8a5a00; font-size: 13px; font-style: italic; }
.pr-src--unavailable .pr-src-note { color: #a61b1b; }
.pr-src-pending { margin: 0; color: var(--muted, #5b6470); font-style: italic; }
.pr-asof { margin: 8px 0 0; font-size: 12.5px; color: var(--muted, #5b6470); }
.pr-fold-agency { padding: 8px 0; border-bottom: 1px dashed var(--pr-dash); }
.pr-fold-agency:last-child { border-bottom: 0; }
.pr-fold-title { margin: 0 0 4px; font-family: var(--serif, 'DM Serif Display', Georgia, 'Times New Roman', serif); font-size: 16px; font-weight: 400; color: var(--navy, #0b1f33); }

/* ---------- free tier lock box ---------- */
.pr-lock { background: #fff; border: 1px solid var(--brass, #b8925a); border-radius: var(--pr-radius); padding: 14px; margin-top: 10px; text-align: center; }
.pr-ghosts { text-align: left; margin-bottom: 8px; }
.pr-ghost { filter: blur(4px); user-select: none; -webkit-user-select: none; pointer-events: none; padding: 4px 0; border-bottom: 1px dashed var(--pr-dash); overflow-wrap: anywhere; font-size: 13.5px; }
.pr-lock-msg { margin: 6px 0 10px; font-weight: 600; color: var(--navy, #0b1f33); overflow-wrap: anywhere; }
.pr-lock-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- paid tier record cards ---------- */
.pr-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; min-width: 0; }
.pr-card { background: #fff; border: 1px solid var(--pr-line); border-left-width: 4px; border-radius: var(--pr-radius); min-width: 0; overflow-wrap: anywhere; }
.pr-card--open { border-left-color: #c62828; }
.pr-card--closed, .pr-card--info { border-left-color: var(--pr-line-strong); }
.pr-card-head {
  display: block; width: 100%; min-height: 44px; margin: 0; padding: 8px 10px; text-align: left; font: inherit; color: inherit;
  background: transparent; border: 0; border-radius: var(--pr-radius); cursor: pointer; overflow-wrap: anywhere;
}
.pr-card-head:hover { background: rgba(11, 31, 51, .04); }
.pr-card-line1 { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.pr-card-type { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pr-card-amount { flex: 0 0 auto; margin-left: auto; padding-left: 8px; font-weight: 700; color: var(--muted, #5b6470); text-align: right; }
.pr-card--open .pr-card-amount { color: #a61b1b; }
.pr-card-line2 { display: block; margin-top: 2px; font-size: 13px; color: var(--muted, #5b6470); overflow-wrap: anywhere; }
.pr-card-detail { padding: 2px 10px 10px; border-top: 1px dashed var(--pr-dash); font-size: 14px; overflow-wrap: anywhere; }
.pr-detail-desc { margin: 8px 0 4px; white-space: pre-line; overflow-wrap: anywhere; }
.pr-detail-meta { margin: 2px 0; color: var(--muted, #5b6470); font-size: 13px; }
.pr-official { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--navy, #0b1f33); text-decoration: underline; }
.pr-closed-group { margin-top: 2px; }
.pr-closed-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; margin: 0; padding: 8px 2px; text-align: left; font: inherit;
  font-size: 14px; font-weight: 600; color: var(--navy, #0b1f33); background: transparent; border: 0; cursor: pointer;
}
.pr-closed { display: flex; flex-direction: column; gap: 6px; }
.pr-truncated { margin: 6px 0 0; font-size: 12.5px; color: var(--muted, #5b6470); }

/* ---------- footer ---------- */
.pr-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.pr-disclaimer { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted, #5b6470); overflow-wrap: anywhere; }

/* ---------- lead forms ---------- */
.pr-form {
  display: flex; flex-direction: column; gap: 10px; margin: 12px 0; padding: 16px; text-align: left;
  background: #fff; border: 1px solid var(--brass, #b8925a); border-radius: var(--pr-radius); max-width: 520px;
  font-family: var(--font, 'Inter', system-ui, sans-serif); color: var(--ink, #0b1f33);
}
.pr-form-title { margin: 0; font-family: var(--serif, 'DM Serif Display', Georgia, 'Times New Roman', serif); font-size: 20px; font-weight: 400; color: var(--navy, #0b1f33); }
.pr-form-intro { margin: 0; font-size: 14.5px; color: var(--muted, #5b6470); overflow-wrap: anywhere; }
.pr-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-field-label { font-size: 14px; font-weight: 600; color: var(--navy, #0b1f33); }
.pr-field input, .pr-field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 9px 11px; color: var(--ink, #0b1f33); background: #fff;
  border: 1.5px solid var(--muted, #5b6470); border-radius: var(--pr-radius);
}
.pr-field textarea { resize: vertical; min-height: 90px; }
.pr-form-msg { margin: 0; min-height: 1.2em; font-size: 14.5px; overflow-wrap: anywhere; }
.pr-form-msg[role="alert"] { color: #a61b1b; font-weight: 600; }
.pr-form-msg--ok { padding: 10px 12px; background: #e3f4e8; border-radius: var(--pr-radius); color: #1d6b35; font-weight: 600; }
.pr-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-form--resolve { border-color: var(--navy, #0b1f33); }

/* honeypot: off-screen, never display:none (bots skip those) */
.pr-report .hp-field, .pr-form .hp-field {
  position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden;
}

/* ---------- print: the report only; no forms, buttons or the locked-record teaser ---------- */
@media print {
  .pr-lock, .pr-search, .pr-turnstile, .pr-btn { display: none !important; }
}

/* ---------- phones: single column, nothing wider than the viewport ---------- */
@media (max-width: 700px) {
  .pr-report-host, .pr-report, .pr-form { max-width: 100%; }
  .pr-root { padding: 14px; }
  .pr-search { flex-direction: column; }
  .pr-search-input { flex-basis: auto; width: 100%; }
  .pr-search .pr-btn { width: 100%; }
  .pr-header { padding: 14px 16px; }
  .pr-address { font-size: 22px; }
  .pr-row-head { flex-wrap: wrap; align-items: flex-start; padding: 11px 12px; }
  .pr-row-name { flex-basis: calc(100% - 28px); }
  .pr-chips { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .pr-caret { order: 2; margin-left: auto; }
  .pr-row-body { padding: 10px 12px 12px; }
  .pr-lock-actions { flex-direction: column; }
  .pr-lock-actions .pr-btn, .pr-footer .pr-btn, .pr-quota .pr-btn, .pr-form-actions .pr-btn { width: 100%; }
  .pr-form { padding: 14px; }
}
