:root {
  --bg: #f5efdf;
  --panel: rgba(255, 251, 241, 0.82);
  --panel-strong: rgba(255, 250, 239, 0.96);
  --ink: #1d2330;
  --muted: #57606f;
  --line: rgba(29, 35, 48, 0.14);
  --line-strong: rgba(29, 35, 48, 0.24);
  --accent: #0d7c66;
  --accent-soft: rgba(13, 124, 102, 0.14);
  --warm: #bf5a36;
  --warm-soft: rgba(191, 90, 54, 0.16);
  --warning: #b03a2f;
  --warning-soft: rgba(176, 58, 47, 0.14);
  --shadow: 0 24px 60px rgba(27, 33, 45, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(13, 124, 102, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(191, 90, 54, 0.16), transparent 24%),
    linear-gradient(180deg, #faf4e7 0%, var(--bg) 42%, #efe4d0 100%);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 35, 48, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 35, 48, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.44), transparent 88%);
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 40px;
}

.hero,
.panel,
.status-panel,
.footer-note {
  backdrop-filter: blur(18px);
}

.hero {
  position: relative;
  z-index: 10;
  display: grid;
  gap: 28px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: calc(var(--radius-xl) + 8px);
  background:
    linear-gradient(135deg, rgba(255, 248, 235, 0.98), rgba(249, 241, 224, 0.86)),
    rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  width: 100%;
  max-width: 100%;
}

.hero-title-row > div {
  min-width: 0;
}

.site-logo {
  display: block;
  flex: 0 1 clamp(132px, 16vw, 200px);
  width: clamp(132px, 16vw, 200px);
  height: auto;
  margin: 0;
  border-radius: 30px;
}

.eyebrow,
.panel-kicker,
.status-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.25rem, 7vw, 5.8rem);
  letter-spacing: -0.05em;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  letter-spacing: -0.03em;
}

.lede,
.status-message,
.score-summary,
.footer-note p,
.search-note {
  margin: 0;
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(29, 35, 48, 0.09);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 247, 0.84);
}

.field {
  display: grid;
  gap: 8px;
}

.autocomplete-shell {
  position: relative;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(13, 124, 102, 0.58);
  box-shadow: 0 0 0 4px rgba(13, 124, 102, 0.12);
  transform: translateY(-1px);
}

select {
  appearance: none;
}

.autocomplete-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 22px;
  background: rgba(255, 252, 245, 0.98);
  box-shadow: 0 18px 38px rgba(29, 35, 48, 0.12);
}

.autocomplete-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(13, 124, 102, 0.2);
  background: rgba(242, 249, 246, 0.96);
}

.autocomplete-main {
  font-weight: 700;
}

.autocomplete-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.search-actions,
.result-actions,
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.suggestion-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.button:hover,
.suggestion-button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.button-primary {
  color: #fffaf3;
  background: linear-gradient(135deg, #1a7e69, #0f6356);
  box-shadow: 0 12px 24px rgba(13, 124, 102, 0.22);
}

.button-secondary,
.suggestion-button {
  color: var(--ink);
  background: rgba(255, 250, 239, 0.88);
  border-color: rgba(29, 35, 48, 0.12);
}

.button-report {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(176, 58, 47, 0.28);
  gap: 8px;
}

.button-report:hover {
  background: rgba(176, 58, 47, 0.22);
}

.button-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.topline-watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(13, 124, 102, 0.28);
  cursor: pointer;
  transition: background 140ms ease;
}

.topline-watch-chip:hover {
  background: rgba(13, 124, 102, 0.22);
}

.app-main {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.status-panel,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 28px;
  text-align: center;
}

.status-message {
  margin-inline: auto;
}

.status-actions {
  justify-content: center;
}

.status-panel.is-loading {
  background:
    linear-gradient(90deg, rgba(255, 251, 241, 0.9), rgba(240, 247, 245, 0.95), rgba(255, 251, 241, 0.9));
  background-size: 200% 100%;
  animation: pulse-slide 1.3s ease infinite;
}

.panel {
  padding: 24px;
  animation: rise 420ms ease both;
}

.results {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.results-topline,
.report-grid {
  display: grid;
  gap: 22px;
  align-items: start;
}

.results-topline,
.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-column {
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: 0;
}

.report-column > .panel {
  min-width: 0;
}

.results-topline > * {
  min-width: 0;
}

.results-topline-side {
  justify-self: end;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 220px;
  padding-top: 22px;
  text-align: right;
}

.results-topline-side > .topline-watch-chip {
  align-self: flex-end;
}

.freshness {
  text-align: right;
}

.topline-reports {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topline-reports .button {
  width: 100%;
}

.muted-meta,
#data-freshness {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

#record-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.record-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(29, 35, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
}

.record-meta-chip-button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.record-meta-chip-button:hover {
  border-color: rgba(13, 124, 102, 0.34);
  background: rgba(13, 124, 102, 0.1);
  color: #0f6356;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.record-meta-chip.status-active {
  border-color: rgba(178, 65, 45, 0.28);
  background: rgba(178, 65, 45, 0.13);
  color: #8a3428;
}

.record-meta-chip.status-closed {
  border-color: rgba(13, 124, 102, 0.22);
  background: rgba(13, 124, 102, 0.1);
  color: #0f6356;
}

.parcel-address-disclosure {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warm-soft, rgba(191, 90, 54, 0.08));
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}

.scope-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
}

.scope-toggle-prompt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scope-toggle-segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 999px;
  background: rgba(29, 35, 48, 0.05);
}

.scope-toggle-option {
  appearance: none;
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  white-space: nowrap;
}

.scope-toggle-option:hover:not(.is-active) {
  color: var(--ink);
}

.scope-toggle-option.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(29, 35, 48, 0.12);
}

.scope-toggle-option:focus-visible {
  outline: 2px solid #0f6356;
  outline-offset: 2px;
}

.result-actions {
  margin-top: 16px;
}

.results-topline > .result-actions,
.results-topline > #share-row-topline,
.results-topline > #landlord-callout {
  grid-column: 1 / -1;
}

.results-topline > .result-actions {
  flex-direction: column;
}

@media (min-width: 720px) {
  .results-topline > .result-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .results-topline > .result-actions .button-primary {
    grid-column: 1 / -1;
  }
}

.status-actions {
  margin-top: 18px;
}

.result-actions .button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.94rem;
}

.score-panel {
  display: grid;
  gap: 18px;
}

.score-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 18px;
}

.grade-badge {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #fff9ef;
  background: linear-gradient(135deg, #717985, #3f4756);
}

.grade-a,
.grade-b {
  background: linear-gradient(135deg, #217866, #0f6157);
}

.grade-c {
  background: linear-gradient(135deg, #b07b17, #95630c);
}

.grade-d,
.grade-f {
  background: linear-gradient(135deg, #b9583e, #90301f);
}

.grade-neutral {
  background: linear-gradient(135deg, #717985, #4b5362);
}

.score-meter {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(29, 35, 48, 0.09);
}

.score-meter-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c25437, #0f7a68);
  transition: width 240ms ease;
}

.score-drivers {
  display: grid;
  gap: 10px;
}

.score-driver-heading {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-driver-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-drivers-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--warm);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-drivers-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.flag-list,
.theme-list,
.stack-list,
.overview-notes {
  display: grid;
  gap: 12px;
}

.context-block {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.snapshot-owner-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 16px 0 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(246, 250, 248, 0.88);
}

.snapshot-owner-strip-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snapshot-owner-strip-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.snapshot-owner-strip-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.overview-notes-shell {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.74);
}

.overview-notes-shell summary {
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.overview-notes-shell .overview-notes {
  padding: 0 12px 12px;
}

.theme-pill,
.note-pill {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.source-links-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.source-links-title {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-links-list a {
  padding: 8px 11px;
  border: 1px solid rgba(29, 35, 48, 0.11);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.74);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
}

.source-links-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.score-driver-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  border-left: 5px solid var(--accent);
  background: rgba(255, 253, 247, 0.84);
}

.score-driver-card.score-driver-high {
  border-left-color: var(--warning);
}

.score-driver-card.score-driver-medium {
  border-left-color: var(--warm);
}

.score-driver-card.score-driver-low {
  border-left-color: var(--accent);
}

.score-driver-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.45;
  text-align: left;
}

.score-driver-main {
  display: grid;
  gap: 4px;
}

.score-driver-main > span,
.score-driver-impact {
  font-weight: 900;
}

.score-driver-main small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.score-driver-impact {
  align-self: start;
  color: var(--warning);
}

.score-driver-button strong {
  grid-column: 1 / -1;
  color: var(--warm);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-driver-note {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 253, 247, 0.58);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.score-driver-note:hover {
  color: var(--warm);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.flag-detail {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.flag-record-list {
  display: grid;
  gap: 12px;
}

.flag-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-jump-button {
  padding: 9px 12px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.95);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.theme-jump-button:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.flag {
  border-left: 5px solid var(--warm);
}

.theme-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.theme-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.theme-group {
  display: grid;
  gap: 10px;
}

.theme-group + .theme-group {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 35, 48, 0.09);
}

.theme-group-header {
  display: grid;
  gap: 4px;
}

.theme-group-header strong {
  font-size: 0.96rem;
  font-weight: 900;
}

.theme-group-header span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.theme-group-list {
  display: grid;
  gap: 10px;
}

.theme-group-other .theme-card {
  background: rgba(255, 253, 247, 0.62);
}

.theme-toggle,
.stack-card-button,
.timeline-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.theme-toggle:hover strong,
.stack-card-button:hover strong,
.timeline-button:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.theme-toggle::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--warm);
}

.theme-card.is-open .theme-toggle::after {
  content: "−";
}

.theme-details {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.theme-detail-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.theme-related-list {
  display: grid;
  gap: 14px;
}

.theme-more-button {
  display: inline-grid;
  justify-items: start;
  gap: 4px;
  width: fit-content;
  padding: 11px 14px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
}

.theme-more-button span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.theme-pill strong,
.stack-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.theme-metrics,
.stack-card-meta,
.timeline-meta,
.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.84);
  border: 1px solid rgba(29, 35, 48, 0.09);
}

.context-badge {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(246, 250, 248, 0.88);
}

.context-badge-label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-badge-value {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.context-badge-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.stack-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.record-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.record-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(29, 35, 48, 0.07);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.stack-card-button {
  display: block;
  border-radius: inherit;
}

.stack-card-button .stack-card,
.timeline-button .timeline-card {
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.stack-card-button:hover .stack-card,
.timeline-button:hover .timeline-card {
  transform: translateY(-1px);
  border-color: rgba(13, 124, 102, 0.22);
  box-shadow: 0 10px 24px rgba(29, 35, 48, 0.08);
}

.stack-card.active {
  border-left: 5px solid var(--warning);
}

.stack-card.warning {
  border-left: 5px solid var(--warm);
}

.stack-card.notice {
  border-left: 5px solid #a66c18;
  background: rgba(255, 249, 232, 0.9);
}

.stack-card.fire {
  border-left: 5px solid #8a4728;
}

.stack-card.resident {
  border-left: 5px solid #3f6f93;
}

.stack-card.neutral {
  border-left: 5px solid var(--accent);
}

.stack-card p,
.timeline-card p,
.note-pill p {
  margin: 12px 0 0;
  line-height: 1.62;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.stack-card,
.timeline-card,
.note-pill {
  overflow-wrap: anywhere;
}

.stack-card-action {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(191, 90, 54, 0.12);
  color: #813521;
  font-size: 0.88rem;
  font-weight: 800;
}

.stack-card-button:hover .stack-card-action {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.record-field.is-focused {
  border-color: rgba(191, 90, 54, 0.38);
  background: rgba(255, 245, 225, 0.95);
  box-shadow: 0 0 0 4px rgba(191, 90, 54, 0.1);
}

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

.timeline-card {
  position: relative;
  padding: 16px 16px 16px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--warm));
}

.timeline-card.warning::before {
  background: linear-gradient(180deg, var(--warm), var(--warning));
}

.timeline-card.permit::before {
  background: linear-gradient(180deg, var(--accent), #1e5f8b);
}

.timeline-card.fire::before {
  background: linear-gradient(180deg, #b25f2b, #8a4728);
}

.timeline-card.resident::before {
  background: linear-gradient(180deg, #4a84ae, #2f5d7f);
}

.footer-note {
  margin-top: 22px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-xl);
  background: rgba(255, 249, 238, 0.68);
  box-shadow: var(--shadow);
}

.footer-note .footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-note .footer-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note .footer-legal a:hover {
  color: var(--accent);
}

.footer-note .footer-note-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.legal-shell {
  max-width: 880px;
}

.legal-header {
  padding: 12px 4px 24px;
}

.legal-header .eyebrow a {
  color: var(--muted);
  text-decoration: none;
}

.legal-header .eyebrow a:hover {
  color: var(--accent);
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 8px 0 6px;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.legal-updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-content {
  padding: 32px 36px;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 28px 0 8px;
  color: var(--ink);
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1rem;
  margin: 20px 0 6px;
  color: var(--ink);
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
}

.legal-content p {
  margin: 0 0 12px;
}

.legal-content ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a:not(.button) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.legal-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer a:hover {
  color: var(--accent);
}

.empty-state {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.8);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.record-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.record-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 35, 48, 0.36);
  backdrop-filter: blur(8px);
}

.record-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 24px));
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.98), rgba(250, 245, 233, 0.95)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 30px 80px rgba(27, 33, 45, 0.18);
}

.record-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin-left: auto;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.record-modal-summary {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-issue-modal-dialog {
  width: min(1100px, calc(100vw - 24px));
  max-height: min(92vh, 980px);
  height: 92vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.report-issue-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-issue-modal-head .record-modal-close {
  position: static;
  float: none;
  margin: 0;
}

.report-issue-modal-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.report-issue-modal-hint a {
  color: var(--muted);
  text-decoration: underline;
}

.report-issue-modal-frame {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.report-issue-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.report-issue-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.report-issue-modal-upsell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 4px 0;
}

.report-issue-upsell-title {
  margin: 0 0 12px;
  font-size: 20px;
}

.report-issue-upsell-timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.report-issue-upsell-timeline li {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(29, 35, 48, 0.08);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
}

.report-issue-upsell-pitch {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.record-field-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.modal-loading-state {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(13, 124, 102, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.84);
  color: var(--ink);
}

.modal-loading-state p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal-loading-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid rgba(13, 124, 102, 0.15);
  border-top-color: #0f6356;
  border-radius: 999px;
  animation: modal-spin 850ms linear infinite;
}

@keyframes modal-spin {
  to {
    transform: rotate(360deg);
  }
}

.record-detail-section-title {
  margin-top: 18px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.record-detail-section {
  display: grid;
  gap: 14px;
}

.dbi-subsection {
  display: grid;
  gap: 10px;
}

.dbi-subsection-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dbi-card-list,
.dbi-event-list {
  display: grid;
  gap: 10px;
}

.dbi-info-card,
.dbi-event-card {
  border: 1px solid rgba(29, 35, 48, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.84);
}

.dbi-info-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.dbi-info-card span {
  color: var(--muted);
  line-height: 1.5;
}

.dbi-event-card {
  display: grid;
  grid-template-columns: minmax(86px, 0.24fr) 1fr;
  overflow: hidden;
}

.dbi-event-date {
  padding: 14px;
  background: rgba(13, 124, 102, 0.08);
  color: #0f6356;
  font-weight: 800;
}

.dbi-event-body {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.dbi-event-body span,
.dbi-event-body small {
  color: var(--muted);
}

.dbi-event-body p {
  margin: 4px 0 0;
  line-height: 1.6;
}

.record-field {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.resource-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 35, 48, 0.09);
  background: rgba(255, 253, 247, 0.84);
}

.resource-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.record-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-field-value {
  line-height: 1.6;
  white-space: pre-wrap;
}

.record-field[data-field-key="notice-items"] .record-field-value {
  white-space: normal;
}

.notice-summary-card {
  padding: 14px;
  border: 1px solid rgba(166, 108, 24, 0.14);
  border-left: 4px solid #a66c18;
  border-radius: var(--radius-md);
  background: rgba(255, 249, 232, 0.64);
  white-space: normal;
}

.notice-summary-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notice-summary-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.notice-summary-categories {
  margin-top: 6px;
  color: #7a531b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.notice-summary-empty {
  margin-top: 10px;
  color: var(--muted);
  font-style: italic;
}

.notice-item-rows {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.notice-item-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(166, 108, 24, 0.18);
}

.notice-item-row:first-child {
  border-top: none;
}

.notice-item-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notice-item-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice-item-code {
  color: var(--ink);
  font-weight: 800;
}

.notice-item-description {
  margin: 0;
  line-height: 1.55;
}

.notice-status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29, 35, 48, 0.07);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.notice-status-pill.status-active {
  background: rgba(178, 65, 45, 0.12);
  color: #8a3428;
}

.notice-status-pill.status-closed {
  background: rgba(13, 124, 102, 0.09);
  color: #0f6356;
}

.record-field-action {
  width: fit-content;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(13, 124, 102, 0.22);
  border-radius: 999px;
  background: rgba(13, 124, 102, 0.08);
  color: #0f6356;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.otp-code-input {
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 1.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.otp-code-input::placeholder {
  letter-spacing: 0.4em;
  color: rgba(29, 35, 48, 0.3);
}

.form-resend {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-resend-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 0 4px;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.field-readonly {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink);
  font-size: 1.05rem;
}

.link-inline {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.link-inline:hover {
  color: #0f6356;
}

.form-resend-link:hover:not(:disabled) {
  color: #0f6356;
}

.form-resend-link:disabled {
  cursor: default;
  color: var(--muted);
  text-decoration: none;
}

.modal-checklist {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(29, 35, 48, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.84);
}

.modal-checklist label,
.modal-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.modal-checklist input,
.modal-consent input {
  width: auto;
  margin-top: 4px;
}

.modal-form-note,
.form-feedback {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-radio-group {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(29, 35, 48, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.84);
}

.modal-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.modal-radio:hover {
  border-color: var(--accent);
}

.modal-radio:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(13, 124, 102, 0.08);
}

.modal-radio input[type="radio"] {
  width: auto;
  margin-top: 4px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.modal-radio span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.4;
}

.modal-radio small {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.modal-price-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 18px 0 14px;
  padding: 16px 18px;
  border: 1px solid rgba(13, 124, 102, 0.22);
  border-radius: var(--radius-md);
  background: rgba(13, 124, 102, 0.06);
}

.modal-price-card-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-weight: 700;
}

.modal-price-currency {
  font-size: 20px;
  line-height: 1;
}

.modal-price-value {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.modal-price-period {
  margin-left: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.modal-price-card-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 14px;
}

@media (max-width: 540px) {
  .modal-plan-grid {
    grid-template-columns: 1fr;
  }
}

.modal-plan-option {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 14px 16px;
  border: 1px solid rgba(13, 124, 102, 0.22);
  border-radius: var(--radius-md);
  background: rgba(13, 124, 102, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.modal-plan-option:hover {
  border-color: rgba(13, 124, 102, 0.45);
}

.modal-plan-option:has(input:checked) {
  border-color: rgba(13, 124, 102, 0.85);
  background: rgba(13, 124, 102, 0.1);
  box-shadow: 0 1px 0 rgba(13, 124, 102, 0.12);
}

.modal-plan-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modal-plan-option-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.modal-plan-option-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-plan-option-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}

.modal-plan-option-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(13, 124, 102, 0.18);
  color: #0d7c66;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.modal-plan-option-price {
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
}

.modal-plan-option-period {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.modal-plan-option-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-benefits {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}

.modal-benefits li {
  margin-bottom: 4px;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 0 24px;
}

.account-button {
  font-size: 14px;
  padding: 8px 16px;
}

.notification-bell-shell {
  position: relative;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 50%;
  background: rgba(255, 250, 239, 0.88);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.notification-bell:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 35, 48, 0.08);
}

.notification-bell-icon {
  width: 20px;
  height: 20px;
}

.notification-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warning);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
  max-height: 480px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.98);
  box-shadow: 0 18px 38px rgba(29, 35, 48, 0.16);
  overflow: hidden;
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(29, 35, 48, 0.08);
}

.notification-panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.notification-panel-mark-all {
  border: none;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.notification-panel-mark-all:hover {
  text-decoration: underline;
}

.notification-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.notification-panel-empty {
  margin: 0;
  padding: 22px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.notification-item-row {
  position: relative;
  display: flex;
  align-items: stretch;
}

.notification-item-row + .notification-item-row {
  margin-top: 2px;
}

.notification-item {
  display: block;
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.notification-item-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #6b7280);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.notification-item-dismiss:hover,
.notification-item-dismiss:focus-visible {
  background: rgba(176, 58, 47, 0.12);
  color: #b03a2f;
  border-color: rgba(176, 58, 47, 0.28);
  outline: none;
}

.notification-item:hover {
  background: rgba(13, 124, 102, 0.06);
  border-color: rgba(13, 124, 102, 0.18);
}

.notification-item.is-unseen {
  background: rgba(176, 58, 47, 0.06);
}

.notification-item.is-unseen:hover {
  background: rgba(176, 58, 47, 0.1);
}

.notification-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-item-address {
  font-weight: 700;
  font-size: 0.95rem;
}

.notification-item-time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.notification-item-subject {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.notification-item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-item-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.notification-item-record {
  font-weight: 700;
  font-size: 0.95rem;
}

.notification-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.notification-item-badge.is-new {
  background: rgba(13, 124, 102, 0.14);
  color: #0d7c66;
}

.notification-item-badge.is-updated {
  background: rgba(191, 90, 54, 0.14);
  color: #bf5a36;
}

.notification-item-description {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
  font-style: italic;
}

.notification-item-status {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.notification-item-status strong {
  color: var(--ink);
}

.notification-item-diff {
  margin: 8px 0 0;
  padding: 8px 10px;
  list-style: none;
  background: rgba(29, 35, 48, 0.04);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item-diff-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.notification-item-diff-label {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.notification-item-diff-values {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
}

.notification-item-diff-before {
  color: #7a1c1c;
  text-decoration: line-through;
}

.notification-item-diff-arrow {
  color: var(--muted);
}

.notification-item-diff-after {
  color: #0d7c66;
  font-weight: 600;
}

.account-button[data-signed-in="true"] {
  border-color: rgba(13, 124, 102, 0.45);
  background: rgba(13, 124, 102, 0.1);
  color: #0f6356;
}

.account-modal .record-modal-dialog {
  max-width: 520px;
}

.confirm-modal .confirm-modal-dialog {
  max-width: 420px;
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.confirm-modal-title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.confirm-modal-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.confirm-modal-actions .button {
  min-height: 40px;
  padding: 0 16px;
}

.confirm-modal-actions .button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.retention-modal .retention-modal-dialog {
  max-width: 460px;
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.retention-options {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.retention-legend {
  padding: 0;
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.retention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
  font-size: 0.95rem;
  line-height: 1.3;
}

.retention-option:hover {
  border-color: var(--accent);
  background-color: rgba(0, 0, 0, 0.02);
}

.retention-option input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.retention-option > span {
  flex: 1;
}

.retention-option:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(46, 125, 50, 0.06);
}

.retention-detail {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 64px;
}

.retention-detail:focus {
  outline: none;
  border-color: var(--accent);
}

.retention-mute {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
}

.retention-mute input[type="checkbox"] {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 3px 0 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: none;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.retention-mute > span {
  flex: 1 1 auto;
}

.retention-mute:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(46, 125, 50, 0.06);
}

.account-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.account-modal-lede {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.account-modal-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-watches {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid rgba(13, 124, 102, 0.14);
  border-bottom: 1px solid rgba(13, 124, 102, 0.14);
}

.account-watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-watch-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 124, 102, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.6);
}

.account-watch-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.account-watch-info {
  flex: 1;
  min-width: 0;
}

.account-watch-address {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--ink);
}

.account-watch-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 12px;
  flex-shrink: 0;
}

.account-watch-cancel-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.account-watch-cancel {
  appearance: none;
  background: none;
  border: none;
  padding: 2px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #b3261e;
  cursor: pointer;
  letter-spacing: 0.02em;
  border-radius: 4px;
}

.account-watch-cancel:hover,
.account-watch-cancel:focus-visible {
  background: rgba(179, 38, 30, 0.08);
  text-decoration: underline;
  outline: none;
}

.account-watch-cancel:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  text-decoration: none;
  background: none;
}

.account-watch-stop-now {
  appearance: none;
  background: #b3261e;
  border: 1px solid #b3261e;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  border-radius: 4px;
  margin-right: 8px;
}

.account-watch-stop-now:hover,
.account-watch-stop-now:focus-visible {
  background: #8c1e17;
  border-color: #8c1e17;
  outline: none;
}

.account-watch-stop-now:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.account-watch-resume {
  appearance: none;
  background: none;
  border: none;
  padding: 2px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: 0.02em;
  border-radius: 4px;
}

.account-watch-resume:hover,
.account-watch-resume:focus-visible {
  background: var(--accent-soft);
  text-decoration: underline;
  outline: none;
}

.account-watch-resume:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  text-decoration: none;
  background: none;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-danger-zone {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.button-danger-outline {
  background: transparent;
  color: var(--warning);
  border: 1px solid rgba(176, 58, 47, 0.45);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.button-danger-outline:hover {
  background: var(--warning-soft);
  color: #8d2b23;
}

.button-danger {
  background: var(--warning);
  color: #fff;
  border: 1px solid var(--warning);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.button-danger:hover {
  background: #8d2b23;
  border-color: #8d2b23;
}

.button-danger:disabled,
.button-danger-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delete-account-list {
  margin: 6px 0 18px;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}

.delete-account-list li {
  margin-bottom: 6px;
}

.button-link {
  background: none;
  border: none;
  padding: 4px 8px;
  color: #0f6356;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button-link:hover {
  color: #0a4a40;
}

.form-feedback[data-tone="error"] {
  color: #8a3428;
  font-weight: 700;
}

.form-feedback[data-tone="info"] {
  color: #0f6356;
  font-weight: 700;
}

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

.inline-panel-action {
  margin-top: 12px;
  width: fit-content;
}

.privacy-card {
  display: grid;
  gap: 10px;
}

.privacy-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-chip-row span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(13, 124, 102, 0.08);
  color: #0f6356;
  font-size: 0.88rem;
  font-weight: 700;
}

.privacy-card-blurb {
  border-left: 5px solid var(--warm);
}

.landlord-callout {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(180, 30, 30, 0.35);
  border-left: 5px solid rgb(180, 30, 30);
  background: rgba(255, 240, 240, 0.85);
  display: grid;
  gap: 8px;
}

.landlord-callout-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(140, 20, 20);
}

.landlord-callout-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

.landlord-blurb-entry {
  display: grid;
  gap: 6px;
}

.landlord-blurb-entry p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink);
}

.landlord-blurb-entry + .landlord-blurb-entry {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.landlord-blurb-sources {
  margin: 2px 0 0;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--muted);
  display: grid;
  gap: 2px;
}

.landlord-blurb-sources li {
  line-height: 1.45;
}

.landlord-cross-property {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warm-soft);
  color: #6a2f17;
  font-size: 0.9rem;
  line-height: 1.5;
}

.landlord-callout small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.record-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.resource-link-row .record-link-row {
  margin-top: 0;
}

.record-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

@keyframes pulse-slide {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 20px, 1180px);
    margin-top: 10px;
  }

  .hero-title-row {
    align-items: start;
    justify-content: space-between;
    width: 100%;
  }

  .site-logo {
    width: clamp(78px, 18vw, 112px);
  }

  .hero,
  .status-panel,
  .panel,
  .footer-note {
    border-radius: 22px;
  }

  .results-topline,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .report-column-primary,
  .report-column-secondary {
    display: contents;
  }

  .score-panel {
    order: 1;
  }

  .snapshot-panel {
    order: 2;
  }

  .active-issues-panel {
    order: 3;
  }

  .themes-panel {
    order: 4;
  }

  .permits-panel {
    order: 5;
  }

  .timeline-panel {
    order: 6;
  }

  .resident-reports-panel {
    order: 7;
  }

  .privacy-reports-panel {
    order: 8;
  }

  .results-topline {
    position: relative;
  }

  .results-topline > .results-topline-side {
    display: contents;
  }

  .results-topline > .results-topline-meta {
    order: 1;
  }

  .results-topline-side > .topline-watch-chip {
    position: absolute;
    top: 22px;
    right: 0;
  }

  .results-topline:has(.topline-watch-chip:not([hidden])) > .results-topline-meta {
    padding-right: 120px;
  }

  .results-topline > #landlord-callout {
    order: 3;
  }

  .results-topline > .result-actions {
    order: 4;
  }

  .results-topline-side > .topline-reports {
    order: 5;
  }

  .results-topline > #share-row-topline {
    order: 6;
  }

  .results-topline-side > .freshness {
    order: 999;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .hero,
  .status-panel,
  .panel {
    padding: 20px;
  }

  h1 {
    white-space: normal;
  }

  .hero-title-row {
    gap: 14px;
  }

  .site-logo {
    width: 76px;
    border-radius: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card,
  .context-badge {
    padding: 13px;
  }

  .stat-value {
    font-size: 1.65rem;
  }

  .context-badge-value {
    font-size: 1.05rem;
  }

  .score-panel-head {
    align-items: center;
  }

  .grade-badge {
    width: 74px;
    height: 74px;
    font-size: 2rem;
  }

  .record-modal-dialog {
    padding: 20px;
  }

  .dbi-event-card {
    grid-template-columns: 1fr;
  }

  .dbi-event-date {
    padding-bottom: 8px;
  }
}

@media (max-width: 420px) {
  .stats-grid,
  .context-grid {
    grid-template-columns: 1fr;
  }
}

.footer-support {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--ink);
}

.footer-donate-link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 0;
}

.footer-donate-link:hover,
.footer-donate-link:focus-visible {
  color: var(--ink);
  outline: none;
}

.donate-modal-dialog {
  max-width: 480px;
}

.donate-lede {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.donate-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border: none;
  padding: 0;
  margin: 0 0 12px;
}

.donate-preset {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.donate-preset input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

.donate-preset:hover {
  border-color: var(--accent);
}

.donate-preset:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(13, 124, 102, 0.08);
}

.donate-preset > span {
  font-size: 1rem;
}

.donate-preset-custom > span {
  font-size: 0.95rem;
}

.donate-custom-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
}

.donate-custom-row[hidden] {
  display: none;
}

.donate-custom-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.donate-custom-input {
  position: relative;
  display: flex;
  align-items: center;
}

.donate-custom-prefix {
  position: absolute;
  left: 16px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.donate-custom-input input {
  width: 100%;
  padding: 14px 16px 14px 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
}

.donate-custom-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.donate-impact {
  margin: 6px 0 14px;
  padding: 10px 14px;
  background: rgba(13, 124, 102, 0.08);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  min-height: 1.4em;
}

.donate-impact:empty {
  display: none;
}

.donate-error {
  margin: 0 0 10px;
  color: #b3261e;
  font-size: 0.88rem;
}

.donate-actions {
  margin-top: 8px;
}

.donate-fineprint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.share-row[hidden] {
  display: none;
}

.share-row-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.share-row-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease;
}

.share-button:hover,
.share-button:focus-visible {
  background: var(--accent-soft);
  border-color: rgba(13, 124, 102, 0.32);
  color: var(--accent);
  outline: none;
}

.share-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(13, 124, 102, 0.18);
}

.share-button:active {
  transform: translateY(1px);
}

.share-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.share-button-icon svg {
  width: 100%;
  height: 100%;
}

.share-button-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff9ef;
}

.share-button-copied:hover,
.share-button-copied:focus-visible {
  background: var(--accent);
  color: #fff9ef;
}

.pre-move-panel {
  margin-top: 24px;
  padding: 0;
  background: var(--accent-soft);
  border: 1px solid rgba(13, 124, 102, 0.18);
}

.pre-move-details {
  padding: 0;
}

.pre-move-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-radius: inherit;
  transition: background 140ms ease;
}

.pre-move-summary::-webkit-details-marker {
  display: none;
}

.pre-move-summary:hover,
.pre-move-summary:focus-visible {
  background: rgba(13, 124, 102, 0.08);
  outline: none;
}

.pre-move-summary-text {
  flex: 1;
  min-width: 0;
}

.pre-move-summary-text h3 {
  margin: 4px 0 6px;
}

.pre-move-summary-text .muted-meta {
  margin: 0;
}

.pre-move-summary-toggle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pre-move-summary-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.pre-move-details[open] .pre-move-summary-toggle::before {
  transform: translateY(2px) rotate(-135deg);
}

.pre-move-details[open] > .pre-move-grid,
.pre-move-details > .pre-move-grid {
  padding: 4px 26px 26px;
}

.pre-move-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 880px) {
  .pre-move-grid {
    grid-template-columns: 1fr;
  }
}

.pre-move-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pre-move-column-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pre-move-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pre-move-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 239, 0.6);
}

.pre-move-text {
  color: var(--ink);
  line-height: 1.45;
}

.pre-move-reason {
  font-size: 0.84rem;
  color: var(--muted);
  font-style: italic;
}

.pre-move-records {
  margin-top: 4px;
}

.pre-move-records[open] .pre-move-reason-toggle::after {
  content: " ▴";
}

.pre-move-reason-toggle {
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: inline-block;
}

.pre-move-reason-toggle::-webkit-details-marker {
  display: none;
}

.pre-move-reason-toggle::after {
  content: " ▾";
  font-style: normal;
  opacity: 0.55;
}

.pre-move-reason-toggle:hover {
  color: var(--ink);
}

.pre-move-record-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(245, 239, 223, 0.45);
  border-radius: 6px;
}

.pre-move-record-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.pre-move-record-text {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
}

.pre-move-record-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.share-cta-panel {
  margin-top: 32px;
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.share-cta-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.share-cta-copy h3 {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.share-cta-copy p {
  margin: 0;
}

.share-row-footer {
  margin-top: 0;
  flex: 0 1 auto;
}

.share-row-modal {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.share-row-compact {
  margin-top: 20px;
}

.share-row-compact .share-row-buttons {
  gap: 4px;
}

.share-row-compact .share-button {
  padding: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  justify-content: center;
}

.share-row-compact .share-button-label {
  display: none;
}

.share-row-compact .share-button-icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 600px) {
  .share-button-label {
    display: none;
  }
  .share-button {
    padding: 8px 10px;
  }
  .share-cta-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 12px;
    margin-top: 22px;
  }
  .share-cta-copy {
    flex: 0 0 auto;
  }
  .share-cta-copy h3 {
    font-size: 1.2rem;
    margin: 2px 0 4px;
  }
}

/* Server-rendered address report (per-address SEO surface) */
.ssr-report {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.app-main:has(#results:not([hidden])) #ssr-report {
  display: none;
}

.app-main:has(#ssr-report) #status-panel {
  display: none !important;
}

.ssr-topline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 26px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ssr-address {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.ssr-subhead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.ssr-updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.ssr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.ssr-score-panel {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ssr-score-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.ssr-score-headline {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 4px 0 0;
}

.ssr-score-profile {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.ssr-grade-badge {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  flex-shrink: 0;
}

.ssr-summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}

.ssr-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(29, 35, 48, 0.09);
  overflow: hidden;
}

.ssr-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c25437, #0f7a68);
}

.ssr-stats {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ssr-stats-grid,
.ssr-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.ssr-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 239, 0.6);
}

.ssr-stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.ssr-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ssr-context {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 239, 0.4);
}

.ssr-context-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ssr-context-value {
  font-size: 0.95rem;
}

.ssr-section {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ssr-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
}

.ssr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ssr-record {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 239, 0.6);
}

.ssr-record-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
}

.ssr-record-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.ssr-record-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ssr-record-index-help {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ssr-record-index-group {
  border: 1px solid var(--border-soft, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.ssr-record-index-group > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 4px 0;
}

.ssr-record-index-group > summary::-webkit-details-marker {
  display: none;
}

.ssr-record-index-group > summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  color: var(--muted);
}

.ssr-record-index-group[open] > summary::before {
  content: "▾ ";
}

.ssr-record-index-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: grid;
  gap: 4px;
}

.ssr-record-index-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft, rgba(0, 0, 0, 0.04));
  font-size: 0.9rem;
}

.ssr-record-index-list li:last-child {
  border-bottom: none;
}

.ssr-record-index-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.ssr-record-index-link:hover {
  text-decoration: underline;
}

.ssr-record-index-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.is-directory-page .hero,
.is-directory-page #status-panel,
.is-directory-page #results,
.is-directory-page .share-row-topline,
.is-directory-page .share-row-footer,
.is-directory-page #share-cta-section {
  display: none !important;
}

.is-directory-page .app-main {
  padding-top: 8px;
}

.ssr-directory {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.ssr-directory > .ssr-topline {
  margin-bottom: 16px;
}

.ssr-directory-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.ssr-directory-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft, rgba(0, 0, 0, 0.05));
  font-size: 0.9rem;
  line-height: 1.3;
}

.ssr-directory-item:last-child {
  border-bottom: none;
}

.ssr-directory-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssr-directory-link:hover {
  text-decoration: underline;
}

.ssr-directory-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ssr-directory-chip.grade-good {
  background: var(--grade-good-soft, rgba(56, 161, 105, 0.18));
  color: var(--grade-good, #2f855a);
}

.ssr-directory-chip.grade-mixed {
  background: var(--grade-mixed-soft, rgba(214, 158, 46, 0.18));
  color: var(--grade-mixed, #b7791f);
}

.ssr-directory-chip.grade-warn {
  background: var(--grade-warn-soft, rgba(229, 62, 62, 0.18));
  color: var(--grade-warn, #c53030);
}

.ssr-directory-chip.grade-neutral {
  background: var(--accent-soft, rgba(0, 0, 0, 0.06));
  color: var(--muted);
}

.ssr-directory-meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .ssr-directory-item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 2px;
  }

  .ssr-directory-meta {
    grid-column: 2;
    text-align: left;
  }
}

.ssr-directory-empty {
  color: var(--muted);
  margin: 16px 0;
}

.ssr-directory-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.ssr-directory-sort-label {
  color: var(--muted);
  margin-right: 4px;
}

.ssr-directory-sort-link {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border-soft, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  font-weight: 500;
}

.ssr-directory-sort-link:hover {
  text-decoration: underline;
}

.ssr-directory-sort-link.is-active {
  background: var(--ink);
  color: var(--page-bg, #fff);
  border-color: var(--ink);
  pointer-events: none;
}

.ssr-directory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft, rgba(0, 0, 0, 0.08));
}

.ssr-directory-page-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.ssr-directory-page-link:hover {
  text-decoration: underline;
}

.ssr-directory-page-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.ssr-directory-page-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.ssr-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ssr-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9rem;
}

.ssr-theme-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.ssr-footnote {
  margin: 4px 4px 0;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.ssr-footnote a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-guides {
  margin-top: -4px;
  font-size: 0.92rem;
}

.search-guides a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-guides a:hover {
  text-decoration: none;
}

/* Recently viewed dropdown (top-left of nav) */
.recent-shell {
  position: relative;
  margin-right: auto;
}

.recent-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 50%;
  background: rgba(255, 250, 239, 0.88);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.recent-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 35, 48, 0.08);
}

.recent-button-icon {
  width: 20px;
  height: 20px;
}

.recent-button-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf3;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.recent-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
  max-height: 480px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(29, 35, 48, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.98);
  box-shadow: 0 18px 38px rgba(29, 35, 48, 0.16);
  overflow: hidden;
}

.recent-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(29, 35, 48, 0.08);
}

.recent-panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.recent-panel-clear {
  border: none;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.recent-panel-clear:hover {
  text-decoration: underline;
}

.recent-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.recent-panel-empty {
  margin: 0;
  padding: 22px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.4;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  transition: background-color 150ms ease;
}

.recent-item:hover {
  background: rgba(13, 124, 102, 0.06);
}

.recent-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.recent-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.recent-item-address {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item-meta {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-item-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fffaf3;
  background: linear-gradient(135deg, #717985, #3f4756);
  flex-shrink: 0;
}

.recent-item-grade-a,
.recent-item-grade-b {
  background: linear-gradient(135deg, #217866, #0f6157);
}

.recent-item-grade-c {
  background: linear-gradient(135deg, #b07b17, #95630c);
}

.recent-item-grade-d,
.recent-item-grade-f {
  background: linear-gradient(135deg, #b9583e, #90301f);
}

.recent-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease;
}

.recent-item-remove:hover {
  background: rgba(176, 58, 47, 0.12);
  color: var(--warning);
}

.nav-donate-button {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(13, 124, 102, 0.28);
}

.nav-donate-button:hover {
  background: rgba(13, 124, 102, 0.22);
}
