/* Parcel Hawk card. Big, bold, readable; one column at 360 px, no sideways scroll. */
.ph-card-page { max-width: 48rem; }
.ph-block {
  border: 1px solid var(--line, #dde3ea);
  border-radius: 10px;
  background: var(--paper, #fff);
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}
.ph-head { border: 0; padding: 0; background: none; }
.ph-head h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); line-height: 1.15; margin: 0.2rem 0 0.4rem; overflow-wrap: anywhere; }
.ph-ids { font-weight: 600; overflow-wrap: anywhere; }
.ph-block h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.ph-owner-name, .ph-big { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.ph-source { font-size: 0.9rem; color: var(--muted, #4f5f73); margin: 0.6rem 0 0; }
.ph-notice { border-color: #b45309; background: #fffbeb; }
.ph-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ph-table th, .ph-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line, #dde3ea); text-align: right; white-space: nowrap; }
.ph-table th[scope="row"], .ph-table thead th:first-child { text-align: left; }
.ph-table thead th { white-space: normal; vertical-align: bottom; }
.ph-pay { display: block; font-weight: 400; color: var(--muted, #4f5f73); font-size: 0.85rem; }
.ph-facts { margin: 0; display: grid; gap: 0.5rem; }
.ph-facts div { display: grid; grid-template-columns: minmax(7rem, 35%) 1fr; gap: 0.5rem; }
.ph-facts dt { font-weight: 600; }
.ph-facts dd { margin: 0; overflow-wrap: anywhere; }
.ph-footer { font-size: 0.95rem; color: var(--muted, #4f5f73); margin-top: 1.5rem; }
@media (max-width: 30rem) {
  .ph-facts div { grid-template-columns: 1fr; gap: 0; }
  .ph-block { padding: 0.85rem 0.75rem; }
  .ph-table th, .ph-table td { padding: 0.35rem 0.15rem; font-size: 0.8rem; }
}

/* Map and search page (/parcels). Leaflet sets its own sizes through the
   style property, which the CSP allows; nothing here relies on inline styles. */
.ph-map-page { max-width: 64rem; }
.ph-lede { font-size: 1.15rem; margin: 0 0 1rem; }
.ph-search {
  display: grid; gap: 0.75rem; margin: 0 0 1rem;
  border: 1px solid var(--line, #dde3ea); border-radius: 10px;
  background: var(--paper, #fff); padding: 1rem 1.1rem;
}
.ph-kind { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.ph-kind legend { font-weight: 700; padding: 0; margin-bottom: 0.3rem; }
.ph-kind label { font-size: 1.1rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.ph-field { display: grid; gap: 0.25rem; font-weight: 600; }
.ph-field input, .ph-field select { font-size: 1.1rem; padding: 0.6rem 0.7rem; width: 100%; box-sizing: border-box; }
.ph-field-search { position: relative; }
.ph-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1200; margin-top: 0.25rem;
  background: var(--paper, #fff); border: 1px solid var(--line, #dde3ea); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); overflow: hidden; font-weight: 400;
}
.ph-suggest-item {
  display: grid; gap: 0.1rem; width: 100%; box-sizing: border-box; text-align: left;
  padding: 0.55rem 0.8rem; background: none; border: 0; border-bottom: 1px solid var(--line, #dde3ea);
  font: inherit; cursor: pointer; overflow-wrap: anywhere;
}
.ph-suggest-item.is-active { background: #e8f3e8; }
.ph-suggest-main { font-weight: 700; font-size: 1.05rem; }
.ph-suggest-meta { color: var(--muted, #4f5f73); font-size: 0.92rem; }
.ph-suggest-source { display: block; padding: 0.4rem 0.8rem; color: var(--muted, #4f5f73); font-size: 0.78rem; }
.ph-go { font-size: 1.15rem; justify-self: start; min-width: 9rem; }
.ph-turnstile.is-needed { outline: 3px solid #b45309; outline-offset: 3px; }
.ph-note { font-weight: 600; margin: 0.4rem 0; }
.ph-results { margin: 0 0 1rem; }
.ph-result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ph-result-link {
  display: grid; gap: 0.15rem; padding: 0.75rem 0.9rem; text-decoration: none;
  border: 1px solid var(--line, #dde3ea); border-radius: 10px; background: var(--paper, #fff);
  overflow-wrap: anywhere;
}
.ph-result-owner { font-size: 1.15rem; font-weight: 700; }
.ph-result-meta { color: var(--muted, #4f5f73); }
.ph-map-wrap { position: relative; margin: 0 0 1rem; }
.ph-map { height: 70vh; min-height: 22rem; border-radius: 10px; background: #1b2a1b; }
.ph-map-hint {
  position: absolute; z-index: 1001; top: 0.6rem; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 0.4rem 0.8rem; border-radius: 999px; pointer-events: none;
  background: rgba(10, 22, 40, 0.85); color: #fff; font-weight: 700; text-align: center;
  max-width: 85%;
}
.ph-panel {
  position: absolute; z-index: 1001; left: 0.5rem; right: 0.5rem; bottom: 0.5rem;
  max-height: 65%; overflow-y: auto; padding: 1rem 1rem 0.8rem;
  background: var(--paper, #fff); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.ph-panel-title { font-size: 1.35rem; margin: 0 2rem 0.25rem 0; overflow-wrap: anywhere; }
.ph-panel-close {
  position: absolute; top: 0.4rem; right: 0.4rem; width: 2.4rem; height: 2.4rem;
  padding: 0; font-size: 1.6rem; line-height: 1; border-radius: 50%;
}
.ph-panel-block { margin: 0.6rem 0 0; }
.ph-panel .ph-notice { border: 1px solid #b45309; border-radius: 8px; padding: 0.5rem 0.6rem; }
.ph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.8rem; }
.ph-shared { font-weight: 600; overflow-wrap: anywhere; }
.ph-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
@media (min-width: 60rem) {
  .ph-panel { left: auto; right: 0.75rem; top: 0.75rem; bottom: 0.75rem; width: 22rem; max-height: none; }
}

/* Before and after photos (Task 5.2): the outline is an SVG laid over the image. */
.ph-pair { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .ph-pair { grid-template-columns: 1fr 1fr; } }
.ph-photo { margin: 0; }
.ph-photo-frame { position: relative; aspect-ratio: 6 / 5; background: #1b2a1b; border-radius: 8px; overflow: hidden; }
.ph-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-photo-outline { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-photo-outline polygon { fill: none; stroke: #ff3b30; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ph-photo-none {
  aspect-ratio: 6 / 5; margin: 0; display: grid; place-items: center; text-align: center; padding: 1rem;
  border: 1px dashed var(--line, #dde3ea); border-radius: 8px; color: var(--muted, #4f5f73); font-weight: 600;
}
.ph-photo figcaption { margin-top: 0.35rem; font-size: 1rem; }

/* Fly-to (Task 4.2). The poster fills the stage until the 3D view replaces it. */
.ph-fly-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 78vh;
  overflow: hidden;
  border-radius: 10px;
  background: #25331f;
  margin: 1rem 0 0.5rem;
}
.ph-fly-poster { margin: 0; position: absolute; inset: 0; }
.ph-fly-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-fly-poster-ui {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  text-align: center;
}
.ph-fly-poster-ui p { margin: 0.5rem 0 0; font-size: 0.95rem; }
.ph-fly-start { font-size: 1.15rem; padding: 0.8rem 1.4rem; }
.ph-fly-stage.is-running .ph-fly-poster { display: none; }
.ph-fly-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ph-fly-status {
  position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.ph-fly-hud {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem;
}
.ph-fly-hud .button {
  width: auto; min-width: 0; margin: 0;
  font-size: 0.95rem; line-height: 1.2; padding: 0.5rem 0.4rem;
}
@media (min-width: 640px) {
  .ph-fly-hud { grid-template-columns: repeat(4, 1fr); }
}
.ph-fly-hud[hidden], .ph-fly-error[hidden] { display: none; }
.ph-fly-error {
  position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem;
  margin: 0; padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: #fff4e5; color: #5a3200;
  font-weight: 700;
}
.ph-fly-none { font-size: 1.1rem; font-weight: 700; }

/* County pages and coverage (Task 6.1). */
.ph-facts { display: grid; gap: 0.4rem; margin: 0 0 0.75rem; }
.ph-facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); padding: 0.3rem 0; }
.ph-facts dt { font-weight: 400; }
.ph-facts dd { margin: 0; font-weight: 700; text-align: right; }
.ph-county-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.4rem 1rem; }
.ph-county-list a { font-weight: 700; font-size: 1.05rem; }
.ph-county-list span { display: block; font-size: 0.9rem; }
.ph-table-wrap { overflow-x: auto; margin: 1rem 0; }
.ph-coverage { border-collapse: collapse; font-size: 0.95rem; min-width: 56rem; }
.ph-coverage th, .ph-coverage td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(0, 0, 0, 0.12); text-align: left; vertical-align: top; }
.ph-coverage .num { text-align: right; white-space: nowrap; }
.ph-coverage thead th { position: sticky; top: 0; background: #fff; }
