/* =============================================================================
   Global Dashboard CSS Matrix
   ============================================================================= */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
}

/* Control accent color. Dash 4's built-in components (radio buttons,
   checkboxes, sliders, dropdown focus rings, tabs, loading spinners) all
   take their purple (#7f4bc4) from this one :root variable, which Dash
   injects at runtime -- html:root outranks its plain :root so this wins
   regardless of stylesheet order. accent-color covers any native
   checkbox/radio inputs outside Dash's own components. */
html:root {
    --Dash-Fill-Interactive-Strong: #68ACE5;
    accent-color: #68ACE5;
}

#react-entry-point,
#_dash-app-content {
    height: 100%;
    overflow: hidden;
}

/* The map pages are fixed, full-viewport layouts that manage their own
   internal scroll areas (e.g. .trend-panel), so the app shell above is
   deliberately non-scrolling. The landing page is ordinary taller-than-
   one-screen content (hero + cards + footer), though -- without this, it
   was being silently clipped by that same non-scrolling shell, with no
   scrollbar anywhere to reach whatever didn't fit above the fold.
   100vh, not 100% -- app.layout's own root <div> (landing-content's
   parent) has no height of its own for a percentage to resolve against,
   which made height: 100% here collapse to nothing and left this rule
   without a bounded box to actually scroll within. vh is relative to the
   viewport itself, not any ancestor, so it doesn't depend on that chain
   at all. */
#landing-content {
    height: 100vh;
    overflow-y: auto;
    /* Very pale tint (~12%) of the HouseNumbers wordmark's orange
       (#f59e0b, .brand-logo-house) behind the card grid, so the white
       cards -- including the bottom row -- stand out from the page. */
    background-color: #FEF3E2;
}

/* Shared Top Navigation Bar */
.global-production-topbar {
    height: 60px;
    background-color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.app-logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
}

.topbar-nav-links {
    display: flex;
    align-items: center;
}

.nav-btn {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: white;
    background-color: #334155;
}

.active-nav {
    color: white !important;
    background-color: #2563eb !important;
}

/* Primary Layout Container Workspace Wrapper */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
}

.topbar {
    height: 72px;
    box-sizing: border-box;
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* Keep banner and autocomplete above Leaflet panes/controls. */
    position: relative;
    z-index: 3000;
}

.app-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.app-subtitle {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.88;
}

.topbar .app-title {
    color: white;
}

.topbar .app-subtitle {
    color: rgba(255, 255, 255, 0.88);
}

/* HouseNumbers wordmark -- landing page hero only (see render_landing_page
   and .landing-brand-logo below for its size). flex-end lines up the
   *boxes'* bottom edges, but the 🏠 emoji glyph itself sits noticeably
   higher within its own box than the wordmark text does within its box
   (measured: roughly a quarter of the emoji's height was left hanging
   below the text) -- translateY nudges the visible glyph up by that
   fraction of its own rendered height to compensate, on top of the
   box-level flex-end alignment. */
.brand-logo {
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.brand-logo-icon {
    font-size: 24px;
    line-height: 1;
    transform: translateY(-8%);
    /* The 🏠 glyph carries a lot of built-in whitespace inside its own
       character box -- flex `gap` only affects space *between* elements,
       not this, so closing the visible gap needs a negative margin to
       actually pull the text into the icon's empty space instead. em,
       not px, so this scales correctly at the landing page's larger
       44px size (see .landing-brand-logo), not just the 24px default. */
    margin-right: -0.4em;
}

.brand-logo-text {
    font-family: 'Oswald', 'Segoe UI', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

/* Extra pull on top of the wordmark's overall letter-spacing above, for
   specific pairs that still looked loose: H/o, e/N (the House/Numbers
   join), and N/u. Applied by splitting those letters into their own
   spans (see render_landing_page) so this only tightens those three
   junctions instead of the whole word again. Oswald is condensed enough
   on its own that this no longer needs to do much -- left in place in
   case those specific joins still read as loose. */
.brand-logo-kern-tight {
    margin-left: -0.02em;
}

.brand-logo-house,
.brand-logo-numbers {
    color: #f59e0b;
}

.brand-logo-report {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.status-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    min-width: 180px;
    text-align: right;
}

/* Sales map's draw-selection status, relocated out of the (now
   page-independent, shared) top banner into its own trend-panel -- the
   base .status-box rule above is styled for the dark banner gradient it
   used to sit on, so this overrides colors/alignment for a light panel
   background instead. */
.status-box-panel {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    text-align: left;
    min-width: 0;
    margin-bottom: 12px;
}

/* Split Workspace Panels */
.content {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100%; /* put this back */
    position: relative;
    overflow: hidden;
}

/* The map fills the whole content area now (scoped to a direct child of
   .content -- the sales-map layout, the only page whose dl.Map has no
   map-panel wrapper -- via a stable class since each page's dl.Map now
   has its own unique id); the trend-panel floats on top of it as a
   translucent overlay instead of sitting in a side-by-side flex column,
   so the map -- and the parcel points on it -- stay visible underneath. */
.content > .content-map {
    flex: none;
    width: 100% !important;
    height: 100% !important;
    position: relative;
}

.trend-panel {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1500; /* above Leaflet's own panes/controls (max ~1000), below the .topbar banner (3000) */
    flex: none;
    width: 34%;
    max-width: 460px;
    min-width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-left: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
    padding: 0 0 24px 0; /* horizontal padding now lives on the children below instead, so their white "ground" can span edge-to-edge rather than being inset. No top padding -- see .trend-panel > :first-child below for why. */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Every map page's side panel used to have a translucent gap above its
   title -- the panel's own top padding sat *outside* the first child's
   white "card" background (see .trend-panel > *:not(.status-box) below),
   showing the panel's see-through blurred background through it. Moving
   that same 24px inset onto the first child itself instead makes its
   white background start flush with the top of the panel, with no seam,
   while keeping the title's visual spacing identical. */
.trend-panel > :first-child {
    padding-top: 24px;
}

/* The panel itself is quite see-through now, so anything that doesn't
   already define its own background (badges, cards, the status box, etc.
   -- all styled elsewhere -- keep whatever they already set, since inline/
   more-specific styles still win over this) gets a solid white "ground"
   behind it, so text stays readable against whatever's on the map below.
   Padding (not margin) carries the horizontal inset here, so the
   background itself reaches all the way to both edges of the panel while
   the content inside it stays visually indented. */
.trend-panel > *:not(.status-box) {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 6px;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* status-box keeps its own background/padding untouched (see
   .status-box-panel), so it needs margin instead to stay inset from the
   panel's edges now that the panel's own horizontal padding is gone. */
.trend-panel > .status-box {
    margin-left: 24px;
    margin-right: 24px;
}

.trend-panel {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.trend-panel::-webkit-scrollbar {
    width: 8px;
}

.trend-panel::-webkit-scrollbar-track {
    background: #f8fafc;
}

.trend-panel::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 999px;
    border: 2px solid #f8fafc;
}

.trend-panel::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Shared side-panel header (see side_panel_header in main_app.py): every
   map page's panel opens with the same title + italic instruction. */
.side-panel-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* A title with no instruction under it gets more room before the next
   section instead. */
.side-panel-title-solo {
    margin-bottom: 14px;
}

.side-panel-instruction {
    margin: 0 0 14px 0;
    font-size: 14px;
    font-style: italic;
    color: #475569;
    line-height: 1.5;
}

/* A solid white block grouping several panel sections, so no see-through
   gaps show between them (each direct .trend-panel child otherwise gets
   its own separate white ground -- see .trend-panel > * above). */
.side-panel-card {
    padding-bottom: 12px;
}

.trend-panel h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #111827;
}

/* Non-sales map pages (radon/slope/public safety/development/placeholders)
   use a wrapper map-panel with inline widths; override those inline values
   here so the map fills the content area, same as the sales layout, with
   the trend-panel (see the base rule above) floating on top of it as an
   overlay rather than sitting beside it. Each page's wrapper now has its
   own unique id, so this is scoped via a shared class instead. */
.content > .map-panel {
    flex: none !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
}

.content > .map-panel + .trend-panel .empty-panel-prompt {
    text-align: left;
    font-style: normal;
    padding-top: 12px;
    padding-bottom: 12px;
}

.crime-singleton-cluster {
    background-color: rgba(181, 226, 140, 0.6) !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 14px !important;
}

.crime-singleton-cluster div {
    background-color: rgba(110, 204, 57, 0.6) !important;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    margin-top: 4px;
    border-radius: 10px;
}

.crime-singleton-cluster span {
    line-height: 20px;
}

.trend-summary {
    font-size: 13px;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* View Mode Constraints Row */
.view-mode-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 10px;
}

.view-mode-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.view-mode-dropdown {
    flex: 1;
}

/* Action Triggers Grid Base */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.action-button {
    flex: 1;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-width: 120px;
    transition: all 0.15s ease;
}

.action-button:hover:not(:disabled) {
    background: #eef2ff;
}

.action-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.action-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.action-primary:disabled {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
    opacity: 1;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

/* Appreciation Metrics Deck Grid */
.appreciation-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.appreciation-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.appreciation-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.appreciation-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 4px 0;
}

.appreciation-positive { color: #16a34a; }
.appreciation-negative { color: #dc2626; }
.appreciation-na { color: #94a3b8; font-size: 1rem; font-weight: 500; }

.appreciation-detail {
    font-size: 0.75rem;
    color: #64748b;
}

/* Radon Map Specific Page Adjustments */
.analysis-inner-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.meta-row {
    margin-bottom: 15px;
}

.meta-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.meta-row h4 {
    margin: 4px 0 0 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.empty-panel-prompt {
    color: #94a3b8;
    font-style: italic;
    padding: 40px 0;
    text-align: center;
}

/* Sales map's post-"Add to Comparables" status line -- a short left-
   aligned caption, not a big centered empty-state message, and empty
   most of the time, so the shared .empty-panel-prompt padding (meant for
   pages' large placeholder text) is trimmed way down here instead. */
#comparables-add-status {
    text-align: left;
    font-style: normal;
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Report Page + Print Styles */
.report-wrapper {
    padding: 22px;
    max-width: 1180px;
    margin: 0 auto;
    height: calc(100vh - 72px);
    overflow-y: auto;
}

.report-page {
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 24px;
}

/* Everything in the report -- header, section titles, summary boxes, and
   the two-column card grid -- shares one centered 920px column, so it all
   lines up, with white space on the sides of wide screens. */
.report-page > * {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.report-print-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.report-print-icon {
    /* Only height is fixed -- the icon's own viewBox is taller than it is
       wide, so a fixed width too would stretch/distort it. */
    height: 32px;
    width: auto;
}

.report-print-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.report-title {
    margin: 0;
    font-size: 22px;
    color: #111827;
}

.report-kicker {
    margin-top: 4px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-subtext {
    margin-top: 6px;
    color: #6b7280;
    font-size: 11px;
}

.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 10px 0;
}

.report-stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
}

.report-section-title {
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 15px;
    color: #111827;
}

.report-summary-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.7;
    font-size: 14px;
}

.detail-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.detail-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
    break-inside: avoid;
    page-break-inside: avoid;
}

.detail-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.detail-card-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.detail-card-line {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

.report-missing,
.report-empty {
    color: #6b7280;
    padding: 14px 0;
    font-size: 14px;
}

.report-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaflet-tooltip {
    font-size: 12px;
    line-height: 1.35;
}

/* Sales map's polygon/rectangle draw toolbar (see draw-control in
   main_app.py, position="topright"). transform:scale rather than a plain
   width/height increase, since the toolbar's icons come from a sprite
   sheet sized for the default button dimensions -- resizing the box
   alone would crop them instead of scaling them. transform-origin is the
   top *right* corner here (not the more usual top left) since the
   toolbar is now anchored from the right (see the rule below) -- growing
   from its right edge keeps that edge fixed against the panel and lets
   the enlarged toolbar expand left into the open map instead of growing
   back into the panel it's sitting next to. The whole section is scaled
   -- the buttons and the Finish/Cancel bar beside them -- since Leaflet.Draw
   places that bar by the button's unscaled position; scaling the buttons
   alone left the rectangle's bar small and too high, over the polygon
   button. */
.leaflet-draw-section {
    transform: scale(1.35);
    transform-origin: top right;
}

.leaflet-draw-toolbar {
    margin-top: 12px !important;
}

/* Shifts the toolbar's anchor left by exactly the trend-panel's width
   (see .trend-panel above -- 34%, capped at 460px) so "topright" lands
   the toolbar in the open map strip immediately beside the panel rather
   than in the corner underneath it, which the panel covers entirely.
   Scoped to the sales map specifically since it's the only page with a
   draw toolbar. */
.sales-map-instance .leaflet-top.leaflet-right {
    right: min(34%, 460px);
}

@media (max-width: 1000px) {
    .content {
        flex-direction: column;
        overflow-y: auto;
    }

    /* The floating translucent-overlay panel (see the base .trend-panel
       rule) is a wide-screen design -- on a narrow screen there isn't
       enough width for the map to stay usable underneath a panel wide
       enough to read, so this goes back to today's stacked, non-overlay
       layout: map on top, panel below, both fully opaque. */
    .content-map,
    .content > .content-map {
        width: 100% !important;
        height: 56% !important;
        min-height: 340px;
    }

    .trend-panel {
        position: static;
        z-index: auto;
        width: 100%;
        max-width: none;
        height: 44%;
        background-color: white;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        box-shadow: none;
        padding: 16px;
    }

    .content > .map-panel,
    .content > .map-panel + .trend-panel {
        width: 100% !important;
        height: auto !important;
        flex: 1 1 auto !important;
    }

    .status-box {
        display: none;
    }

    .report-stat-grid,
    .detail-card-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    html, body {
        overflow: visible !important;
        background: white !important;
    }

    .topbar,
    .report-print-btn,
    .report-card .comparables-remove-btn {
        display: none !important;
    }

    .report-wrapper {
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .report-page {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0.5in !important;
    }

    .report-stat-card,
    .report-summary-box,
    .detail-card {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

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

    .report-section-title {
        page-break-after: avoid;
    }

    .detail-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* =============================================================================
   LANDING PAGE LAYOUT EXTENSIONS (Safe at the absolute bottom)
   ============================================================================= */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    /* The hero now sits above this container as its own full-width
       banner (see .landing-hero), so this only needs a little top
       breathing room before the card grid, not space for the hero. */
    padding: 20px 20px 12px;
}

/* Full-width banner, edge-to-edge like .landing-footer below -- sits at
   the very top of the page so the card grid starts higher up and more
   of it (all the way to the last row) fits on screen without scrolling.
   .landing-hero-inner re-applies the same max-width/centering
   .landing-container uses, so this banner's *content* still lines up
   with the cards below it. */
.landing-hero {
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
}

.landing-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
}

.landing-brand-logo {
    justify-content: center;
    gap: 12px;
}

.landing-brand-logo .brand-logo-icon {
    font-size: 44px;
}

.landing-brand-logo .brand-logo-text {
    font-size: 38px;
}

.landing-subtitle { 
    margin: 12px 0 0 0; 
    font-size: 16px; 
    opacity: 0.9; 
}

/* The intro paragraph: one flowing paragraph in a 760px column, with a
   bullet between sentences. */
.landing-subtitle-lead {
    display: block;
    max-width: 760px;
    margin: 0 auto;
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
    text-wrap: pretty;
}

/* The bullet hangs off the end of the sentence before it (joined by a
   no-break space), so a line can break after a bullet but never start
   with one. */
.landing-subtitle-sentence:not(:last-child)::after {
    content: "\00a0\00a0\2022\00a0\00a0 ";
}

/* The instruction line under the address search box. */
.landing-search-hint {
    margin: 5px 0 0;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.9;
}

.landing-address-search {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 18px auto 0;
    text-align: left;
    z-index: 3100;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Tighter between rows than between columns, so all three rows sit
       higher on the page. */
    row-gap: 14px;
    column-gap: 24px;
}

/* The homepage's <noscript> copy for crawlers (seo.about_html) --
   the same text the footer banner shows (.footer-about). It sits outside
   .landing-container, so it carries its own width and centering. */
.landing-about {
    max-width: 860px;
    margin: 36px auto 8px;
    padding: 0 4px;
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
}

/* The <noscript> copy has no .landing-container padding around it. */
noscript > .landing-about {
    padding: 0 16px;
}

.landing-about h1 {
    font-size: 22px;
    line-height: 1.3;
    color: #0f172a;
    margin: 0 0 12px;
}

.landing-about h2 {
    font-size: 17px;
    color: #0f172a;
    margin: 22px 0 8px;
}

.landing-about p,
.landing-about ul {
    margin: 0 0 12px;
}

.landing-about ul {
    padding-left: 20px;
}

.landing-about li {
    margin-bottom: 6px;
}

.landing-about strong {
    color: #0f172a;
    font-weight: 600;
}

/* Full-width banner, a sibling of the constrained .landing-container (see
   render_landing_page) so it spans edge-to-edge rather than stopping at
   .landing-container's 1200px max-width. Same gradient as .topbar/
   .landing-hero for brand consistency. landing-footer-inner re-applies
   the same max-width/centering .landing-container uses, so this banner's
   *content* still lines up with the hero/cards above it. */
.landing-footer {
    margin-top: 16px;
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
    color: rgba(255, 255, 255, 0.85);
}

.landing-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* The About text in the footer banner (landing_about_section): left-aligned,
   in columns, light on the banner's dark gradient. A rule below it sets off
   the "product of" and "Contact us" lines. */
.footer-about {
    text-align: left;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    padding: 8px 0 22px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-about h1 {
    font-size: 19px;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 8px;
}

.footer-about h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #93c5fd;
    margin: 0 0 10px;
}

.footer-about strong {
    color: #ffffff;
    font-weight: 600;
}

.footer-about-intro {
    margin: 0 0 22px;
}

.footer-about-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.footer-about-maps ul {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 28px;
}

.footer-about-maps li {
    break-inside: avoid;
    margin-bottom: 10px;
}

.footer-about-side p {
    margin: 0 0 10px;
}

@media (max-width: 800px) {
    .footer-about-columns {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .footer-about-maps ul {
        columns: 1;
    }
}

.landing-footer-label {
    color: rgba(255, 255, 255, 0.85);
}

.landing-footer-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.landing-footer-link:hover {
    text-decoration: underline;
}

/* Terms, Privacy, Refund Policy, Contact Us -- one row, wrapping on a phone. */
.landing-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.portal-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    border-color: #2563eb;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.portal-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #111827;
}

.portal-card p {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    .portal-grid { 
        grid-template-columns: 1fr; 
    }
}

/* Radon Page Address Search Styles */
.radon-search-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.radon-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.radon-search-input:focus {
    border-color: #ea580c;
}

.radon-search-btn {
    background-color: #ea580c;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.radon-search-btn:hover {
    background-color: #c2410c;
}

/* Scoped styling for action buttons in the top header bar */
.topbar .action-button {
    flex: 0 0 auto;
    min-width: auto;
    padding: 6px 12px;
    background: #475569;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    line-height: normal;
    font-weight: 500;
}

.topbar .action-button:hover:not(:disabled) {
    background: #334155;
    color: white;
}

.slope-view-row {
    padding: 10px 24px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.slope-view-radio {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #334155;
}

.slope-view-radio label {
    margin-right: 4px;
    cursor: pointer;
}

.slope-point-count {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Foreclosures & New Construction map: Permits / Foreclosures filter
   sections, kept visually separate since the two overlays are independent */
.development-filter-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.development-filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.development-filter-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 14px;
    margin-bottom: 10px;
}

.development-section-heading {
    margin-top: 0;
    margin-bottom: 12px;
}

/* Permits/Foreclosures subheads under the panel title -- outranks the
   panel's general 18px .trend-panel h4 rule. */
.trend-panel h4.development-section-heading {
    font-size: 14px;
}

/* Permits/Foreclosures section headings share a line with their own
   "Show ..." checkbox instead of stacking, to save vertical room in the
   sidebar. */
.development-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 12px;
}

.development-section-header-row .development-section-heading {
    margin: 0;
}

.development-section-header-row .development-filter-checklist {
    margin: 0;
}

/* Foreclosures filter: All/Tax/Lender laid out in one row (wrapping if the
   panel is narrow) instead of stacked, to save vertical room. */
.development-foreclosure-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

/* Foreclosures & New Construction map: Reason for Adjustment / Qualified
   Sales Status legend */
.development-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 420px;
    overflow-y: auto;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #334155;
    padding: 2px 0;
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.legend-label {
    flex: 1;
}

.legend-count {
    color: #64748b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Jurisdiction Policies map: legend + policy panel */
/* Jurisdiction Policies map legend: compact inline key at the top of the
   panel -- entries wrap onto as many rows as the panel width needs, with a
   dot between each, instead of one entry per row. */
.jurisdiction-policy-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 6px;
    font-size: 12.5px;
    color: #334155;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.jurisdiction-policy-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.jurisdiction-policy-legend-sep {
    color: #94a3b8;
    font-weight: 700;
}

/* Local Policies dropdown: bold categories (all selectable) with their
   areas indented beneath. Indent only inside the open list, not in the
   closed dropdown's selected-value display. */
.policy-option-category {
    font-weight: 700;
}

.dash-dropdown-options .policy-option-child {
    padding-left: 18px;
}

/* The "Asheville" subhead is disabled (not selectable) but shouldn't look
   grayed out -- outranks Dash's own
   .dash-options-list-option:has(input[disabled]) styling. */
.dash-options-list-option:has(input[disabled]):has(.policy-option-child) {
    color: var(--Dash-Text-Strong);
    cursor: default;
}

.jurisdiction-policy-bid-swatch {
    background-color: transparent;
    border: 1px solid #1f2937;
}

.jurisdiction-policy-disclaimer {
    font-size: 12.5px;
    font-style: italic;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 8px 0 16px 0;
}

.jurisdiction-policy-topic-heading {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 16px;
    margin-bottom: 6px;
}

.jurisdiction-policy-summary {
    font-size: 14.5px;
    line-height: 1.5;
    color: #334155;
    margin: 0;
}

.jurisdiction-policy-meta {
    font-size: 12.5px;
    color: #94a3b8;
    margin-top: 4px;
}

.jurisdiction-policy-meta a {
    color: #2563eb;
}

.jurisdiction-policy-unavailable {
    font-size: 14.5px;
    font-style: italic;
    color: #94a3b8;
}

/* Isochrone map: travel-mode checklist + status line */
.isochrone-mode-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-message {
    font-size: 12.5px;
    color: #b45309;
    min-height: 1em;
}

/* =============================================================================
   SHARED MAP BANNER (title/subtitle + address search + Add to Report + Return)
   ============================================================================= */
.map-banner {
    gap: 16px;
    height: auto;
    /* Deeper than the plain .topbar (72px) to fit the two-line search box
       (input + .address-search-hint) without the hint spilling past the
       banner's bottom edge -- see the map pages' .content height, kept in
       sync with this value (72px -> 90px, +18px). */
    min-height: 90px;
    flex-wrap: wrap;
}

.banner-left {
    flex: 0 1 auto;
    min-width: 220px;
}

.banner-center {
    flex: 1 1 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
}

.banner-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* "All Maps" nav dropdown in the banner-right area (native <details>, no JS) */
.nav-menu {
    position: relative;
    flex: 0 0 auto;
}

.nav-menu-summary {
    list-style: none;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: auto;
    padding: 6px 12px;
    background: #475569;
    color: white;
    border-radius: 6px;
    line-height: normal;
    font-weight: 500;
    font-size: 13px;
    user-select: none;
}

.nav-menu-summary::-webkit-details-marker,
.nav-menu-summary::marker {
    display: none;
    content: "";
}

.nav-menu-summary:hover {
    background: #334155;
}

.nav-menu[open] .nav-menu-summary {
    background: #2563eb;
}

.nav-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 260px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 3200;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.nav-menu-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.nav-menu-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex: 0 0 auto;
}

.address-search-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-width: 220px;
    z-index: 3100;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.address-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
    caret-color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.address-search-input::placeholder {
    color: #64748b;
}

.address-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Floats above the map (and everything else) so it's never clipped or
   partially hidden behind the Leaflet canvas below the banner. */
.address-suggestions-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 3200;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    max-height: 320px;
    overflow-y: auto;
}

.address-suggestion-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.address-suggestion-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

/* Persistent hint below the search box, on every map page. In normal flow
   (not absolutely positioned) so it takes up real space in the banner --
   .address-search-wrapper is a column flex, and .map-banner's min-height
   (see below) is sized to fit this second line without spilling over the
   map underneath. */
.address-search-hint {
    font-size: 11px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.78);
    padding: 0 2px;
}

/* Comparables dropdown (banner-right, next to "All Maps"): a running
   shortlist of properties the buyer has clicked/searched for, built
   automatically -- see add_selection_to_comparables -- with no separate
   "add" button. Reuses .nav-menu's <details>/<summary> disclosure pattern
   (native, no JS) with its own wider dropdown for the address list. */
.comparables-menu {
    margin-right: 4px;
}

.comparables-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 280px;
    max-width: 360px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3200;
}

/* The address list itself scrolls independently, within its own max-
   height -- the "View Report" button below it (see build_shared_map_
   banner) stays put outside that scroll area instead of being pushed out
   of view once the list is long. */
#comparables-list-panel {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comparables-view-report-btn {
    width: 100%;
    text-align: center;
}

.comparables-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
}

.comparables-item:hover {
    background: #eff6ff;
}

.comparables-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.comparables-item-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comparables-item-jurisdiction {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
}

.comparables-remove-btn {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    line-height: 1;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
}

.comparables-remove-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.comparables-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 1100px) {
    .map-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 18px;
    }
    /* Stacked in a column, the desktop flex sizes (e.g. banner-center's
       360px basis) would become heights and leave big empty gaps. */
    .banner-left,
    .banner-center,
    .banner-right {
        flex: 0 0 auto;
    }
    .banner-center {
        max-width: none;
    }
}

/* Phones: a compact banner, so the map gets most of the screen. */
@media (max-width: 600px) {
    .map-banner {
        gap: 8px;
        padding: 10px 14px;
    }
    .map-banner .app-title {
        font-size: 20px;
    }
    /* The map's controls go back to the edge -- the desktop offset makes
       room for a side panel that a phone stacks below the map instead. */
    .sales-map-instance .leaflet-top.leaflet-right {
        right: 0;
    }
    /* Map credits: small, one line, scrollable rather than covering the map. */
    .leaflet-control-attribution {
        font-size: 9px;
        max-width: 100vw;
        white-space: nowrap;
        overflow-x: auto;
    }
    /* Map pages (each mounted in a #<slug>-map-page container): the whole
       page scrolls instead of the panel scrolling in a thin strip under the
       map -- swiping up on the panel (or banner) moves banner and map off
       the top. The map keeps a fixed height; dragging on it still pans the
       map. */
    .app-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    [id$="-map-page"] .content {
        flex: none;
        height: auto !important;
        overflow: visible;
    }
    [id$="-map-page"] .content > .content-map,
    [id$="-map-page"] .content > .map-panel {
        height: 58vh !important;
        height: 58svh !important;
        min-height: 300px;
        flex: none !important;
    }
    [id$="-map-page"] .map-panel > .content-map {
        height: 100% !important;
        min-height: 0;
    }
    [id$="-map-page"] .trend-panel {
        height: auto !important;
        overflow: visible !important;
    }
    /* Banner menus (Go To, Comparables): lined up with their button's right
       edge they ran off the left of the screen, so here they span the
       banner's width instead, just under the button. */
    .map-banner {
        position: relative;
    }
    .map-banner .nav-menu {
        position: static;
    }
    .map-banner .nav-menu-dropdown,
    .map-banner .comparables-dropdown {
        top: auto;
        margin-top: 6px;
        left: 14px;
        right: 14px;
        min-width: 0;
        max-width: none;
    }
    /* Go To: only as wide as its page names, at the right edge, so there's
       room beside it to tap and close it. */
    .map-banner .nav-menu-dropdown {
        left: auto;
        width: max-content;
        max-width: calc(100% - 28px);
    }
}
/* Travel Time options sit in one row, with a little room between them. */
.isochrone-time-checklist label {
    margin-right: 14px;
}

/* ---------------------------------------------------------------------------
   Comparables report: one dense, color-coded card per property (see
   build_property_card / report_status_chips / REPORT_CHIP_STYLES in
   main_app.py). The left border is the card's concern count: green none,
   amber one, red two or more. Every box has a fixed size per kind (value
   tile, comparison tile, chip, ...) so cards line up identically across
   the report no matter how much text a value has -- longer text is cut
   off with an ellipsis, and the full text is in the hover title.
   --------------------------------------------------------------------------- */
.report-card-grid {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    text-rendering: optimizeLegibility;
}

/* Two listings side by side, in a centered column (white space on the
   sides of wide screens); one column on narrow screens. */
.report-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
    margin-bottom: 18px;
}

.report-card {
    background: #ffffff;
    /* Darker outline around each whole listing, so one card's edge is easy
       to tell from the next. */
    border: 1px solid #94a3b8;
    border-left: 7px solid #16a34a;
    border-radius: 8px;
    padding: 8px 10px 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.report-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Larger and heavier so the address stands out, with line-height held at
   20px -- the height of the remove button beside it, which already sets
   this row's height -- so the bigger text doesn't push anything down. */
.report-card-address {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 16px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-card-concerns {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
}

.report-card-location {
    margin: 1px 0 6px;
    font-size: 10px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-card-value-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    height: 32px;
    margin-bottom: 6px;
}

.report-card-value-tile {
    flex: 0 0 124px;
    box-sizing: border-box;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.report-card-value {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Single centered line, sized by line-height (not flex) so the ellipsis
   works on overflow. Neutral tile; the text itself is red or green (set
   inline from _value_comparison_text_color_bold) so it doesn't dominate
   the card the way a solid red/green block did. */
.report-card-compare {
    flex: 0 0 152px;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    line-height: 30px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Same two-line layout as the appraised value tile: price in black at the
   same size (.report-card-value), small blue "Last sold YYYY" label. */
.report-card-sold {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    overflow: hidden;
}

.report-card-sold-label {
    color: #1d4ed8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flood insurance / steep slope / foreclosure: white tiles with a larger
   label and a legend-style square -- filled in the flag's color for YES,
   empty with a diagonal slash for NO, dashed for N/A. */
/* Two rows of three: the three flood flags, then steep slope,
   foreclosure, and the crime chip. */
.report-flag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.report-flag {
    box-sizing: border-box;
    height: 66px;
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #ffffff;
    color: #0f172a;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}

.report-flag-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #0f172a;
}

/* YES/NO/N-A text. Presence (YES) is shown by the box's colored bottom
   stripe (set inline from REPORT_STRIPE_COLORS), not by the text color. */
.report-flag-state {
    margin: 3px 0 1px;
    font-size: 11px;
    font-weight: 800;
}

.report-flag-state-yes {
    color: #0f172a;
}

.report-flag-state-no,
.report-flag-state-na {
    color: #64748b;
}

.report-flag .report-chip-detail {
    color: #334155;
}

/* Row 2: finished area/studio/ADU (fixed height) beside the permit list
   (grows with the number of permits). */
.report-detail-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: start;
    gap: 4px;
    margin-bottom: 4px;
}

/* Box headers match the flag headers (.report-flag-label). The labels
   under the appraised value and last sale keep the smaller size. */
.report-chip .report-chip-label,
.report-permits .report-chip-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0f172a;
}

/* Crime chip: its comparison line ("Higher than 70% of Asheville
   properties") wraps to two lines instead of cutting off. */
.report-chip-wrap .report-chip-detail {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Every permit on record, newest first -- its height depends on how many
   permits the parcel has, unlike the fixed-size boxes above. */
.report-permits {
    box-sizing: border-box;
    min-height: 66px;
    padding: 3px 6px;
    border-radius: 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.report-permit-list {
    margin: 2px 0 0;
    padding-left: 16px;
    font-size: 10px;
    line-height: 1.4;
}

.report-permit-none {
    font-size: 10px;
    color: #475569;
}

/* Fixed height, the same for every chip: label line + value + up to two
   detail lines (the crime comparison wraps) under a header that may wrap
   to two lines, plus room for a 7px bottom
   stripe without it covering the text. Same height as .report-flag. */
.report-chip {
    box-sizing: border-box;
    height: 66px;
    padding: 3px 6px;
    border: 1px solid;
    border-radius: 5px;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}

.report-chip-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.report-chip-value {
    font-size: 10px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.report-chip-detail {
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A box filled with its category color (fill_style in main_app.py sets
   the box's text color): every line of text inside takes that color. */
.report-filled .report-flag-label,
.report-filled .report-flag-state,
.report-filled .report-chip-label,
.report-filled .report-chip-value,
.report-filled .report-chip-detail,
.report-filled .report-permit-list,
.report-filled .report-permit-none {
    color: inherit;
}

@media print {
    .report-card,
    .report-chip,
    .report-card-compare,
    .report-flag,
    .report-permits {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .report-card {
        break-inside: avoid;
    }
}

/* Crime map: selected-property block (crime_selection_detail_children). An
   orange bottom stripe, as on the Comparables report, when the property is
   higher than at least half of Asheville. */
.crime-selection-prompt {
    font-size: 13px;
    font-style: italic;
    color: #475569;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}

.crime-selection-card {
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.crime-selection-address {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.crime-selection-count {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.crime-selection-window {
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
}

.crime-selection-compare {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

/* ---------------------------------------------------------------------------
   Sign-in / subscriptions (auth_billing.py): landing-page account links,
   map-banner account button, and the subscribe page shown in place of a
   map or the report for anyone without an active subscription or trial.
   --------------------------------------------------------------------------- */
.landing-hero-inner {
    position: relative;
}

.landing-account-bar {
    position: absolute;
    top: 14px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Phones and tablets: there's no room beside the title, so the account buttons sit in
   their own row above it instead of floating over it. */
@media (max-width: 960px) {
    .landing-account-bar {
        position: static;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }
}

.account-link {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.account-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.account-link-primary {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #0f172a;
}

.account-link-primary:hover {
    background: #fbbf24;
}

.clerk-user-button {
    display: flex;
    align-items: center;
}

.paywall-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.paywall-card {
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.paywall-home {
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: none;
}

.paywall-title {
    margin: 12px 0 10px;
    font-size: 24px;
    color: #0f172a;
}

.paywall-text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: #334155;
}

/* "By subscribing you agree to..." under the buttons, with the policy links (legal.py). */
.paywall-legal {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.paywall-legal a {
    color: #1d4ed8;
}

.paywall-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.paywall-btn {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #94a3b8;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.paywall-btn:hover {
    background: #f8fafc;
}

.paywall-btn-primary {
    background: #f59e0b;
    border-color: #f59e0b;
}

.paywall-btn-primary:hover {
    background: #fbbf24;
}

@media (max-width: 900px) {
    /* minmax(0, ...) so a card never grows past the screen to fit its
       contents (a plain 1fr can't shrink below them). */
    .report-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phones: less padding around the report, and each card rearranged into
   two columns to fit -- appraised value beside the last sale, then the
   comparison beside the finished-area box, then the permit list across
   the card. The value and detail rows step aside (display: contents) so
   their boxes fall straight into the card's grid; the flags stay three
   across (the flood flags together). */
@media screen and (max-width: 600px) {
    .report-wrapper {
        padding: 8px;
    }

    .report-page {
        padding: 14px 12px;
    }

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

    .report-card-top,
    .report-card-location,
    .report-permits,
    .report-flag-grid {
        grid-column: 1 / -1;
    }

    .report-card-location {
        margin: -5px 0 0;
    }

    .report-card-value-row,
    .report-detail-row {
        display: contents;
    }

    .report-card-value-tile,
    .report-card-sold {
        height: 32px;
    }

    .report-card-value-tile { order: 1; }
    .report-card-sold { order: 2; }
    .report-card-compare { order: 3; }
    .report-detail-row > .report-chip { order: 4; }
    .report-permits { order: 5; }
    .report-flag-grid { order: 6; }

    /* As tall as the finished-area box beside it, text centered. */
    .report-card-compare {
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
        line-height: 1.3;
    }

    .report-flag-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 0;
    }
}

/* Phone mode: the "Tap to show parcels" button over a map until it's zoomed
   in far enough to show them (see PHONE_MIN_ZOOM and zoom_to_parcels in
   main_app.py); tapping it zooms in there. */
.phone-zoom-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.phone-zoom-hint:active {
    background: #1d4ed8;
}
.phone-zoom-hint-note {
    display: block;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
}
