/* Report overrides */
.report-layout .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.report-layout .protest-teaser {
    margin-bottom: 1.5rem;
}

/* Report layout */
.report-layout {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Sidebar navigation */
.report-nav {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 200px;
    flex-shrink: 0;
    padding: 1.5rem 0.75rem;
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    min-height: 100vh;
}
.report-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.report-nav li a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--med-gray);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.report-nav li a:hover,
.report-nav li a.active {
    background: var(--light-bg);
    color: var(--dark-text);
    font-weight: 600;
}
.nav-pdf-section {
    margin-top: 1.5rem;
    text-align: center;
}
.nav-property-info {
    margin-top: 0.75rem;
    text-align: center;
}
.nav-address {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
}
.nav-acct-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--med-gray);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav-acct-copy:hover {
    background: var(--light-bg);
    color: var(--navy);
}
.nav-pdf-btn {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    width: 100%;
}
.pdf-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--med-gray);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: -2px;
    margin-right: 4px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile TOC toggle */
.report-toc-btn {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary-dark);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Report content area */
.report-content {
    flex: 1;
    min-width: 0;
    padding: 0 1.5rem 3rem;
}

/* Sections */
.report-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--light-gray);
}
.report-section:last-child {
    border-bottom: none;
}

/* Typography */
.section-title {
    font-size: 1.35rem;
    color: #fff;
    background: var(--navy);
    margin: 0 -1.5rem 1rem;
    padding: 0.6rem 2rem;
}
.section-subhead {
    font-size: 1rem;
    color: var(--dark-text);
    margin: 1.25rem 0 0.5rem;
}


/* Data tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table thead th {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
}
.data-table tbody td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--light-gray);
}
.data-table tbody tr:nth-child(even) {
    background: var(--light-bg);
}
.data-table .total-row td {
    font-weight: 700;
    border-top: 2px solid var(--primary-dark);
}
.data-table .rate-estimated td {
    font-style: italic;
    color: var(--med-gray);
}
.data-table .highlight-row {
    background: #F0F9E8 !important;
}
.data-table .highlight-row td {
    font-weight: 600;
}

/* Trend arrows */
.trend-cell {
    text-align: center;
    width: 2.5rem;
}
.trend-arrow {
    font-size: 1rem;
}
.trend-up, .trend-down, .trend-flat { color: var(--green); }

/* Lot size comparison bar */
.lot-comparison {
    margin: 1.25rem 0;
}
.lot-bar-track {
    position: relative;
    height: 8px;
    background: linear-gradient(to right, var(--light-gray), var(--primary), var(--light-gray));
    border-radius: 4px;
}
.lot-bar-marker {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background: var(--navy);
    border: 2px solid var(--white);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lot-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--med-gray);
    margin-top: 0.5rem;
}
.lot-bar-statement {
    font-size: 0.85rem;
    color: var(--med-gray);
    margin-top: 0.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}
.data-table tr:hover td {
    background: #F0F9E8;
    transition: background 0.15s;
}
.data-table tr:hover td.comp-match {
    text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
}
/* Property class info icon */
.class-info-toggle {
    cursor: pointer;
    display: inline-block;
    background: var(--green, #16A34A);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 1.15rem;
    height: 1.15rem;
    line-height: 1.15rem;
    text-align: center;
    border-radius: 50%;
    user-select: none;
    margin-left: 0.25rem;
    vertical-align: text-top;
}

/* Property class info card — slides out from under snapshot table */
.class-info-card {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 75%;
    margin: 0 auto;
    background: var(--white, #fff);
    border: none;
    border-radius: 0 0 8px 8px;
}
.class-info-card.open {
    max-height: 500px;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-top: none;
}
.class-info-card .class-info-table {
    margin-bottom: 0;
}
.class-info-card .class-info-table tbody {
    display: block;
    max-height: calc(6.25 * 2.1em);
    overflow-y: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}
.class-info-card .class-info-table thead,
.class-info-card .class-info-table tbody tr {
    display: table;
    width: 100%;
}
.class-info-card .class-info-table th:first-child,
.class-info-card .class-info-table td:first-child {
    width: 25%;
}
.class-info-card .class-info-table th:last-child,
.class-info-card .class-info-table td:last-child {
    width: 75%;
}

/* Highlighted row for current class */
.class-info-table tr.active-class {
    background: #E8F5D9;
    font-weight: 600;
}

/* Note at bottom of class info card */
.class-info-note {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 0.25rem;
}

.snapshot-table {
}
.snapshot-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--light-gray);
}
.snapshot-table td:nth-child(3) {
    padding-left: 2rem;
}
.snapshot-table .label-col {
    font-weight: 600;
    white-space: nowrap;
}
.table-scroll {
    overflow-x: auto;
}

/* Chart containers */
.chart-container {
    margin: 1.25rem 0;
    max-width: 100%;
}
.chart-container canvas {
    max-width: 100%;
}

/* Insights callout */
.insights-callout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
    border-radius: 8px;
}
.insight-item {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--dark-text);
}
.insight-icon {
    color: var(--primary);
    flex-shrink: 0;
}

/* Callouts */
.callout {
    background: var(--light-bg);
    border-left: 3px solid var(--primary-dark);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    border-radius: 0 6px 6px 0;
}
.callout-orange {
    background: #FFFBEB;
    border-left-color: var(--orange);
}

/* Guidance cards */
.guidance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.guidance-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}
.guidance-card-active {
    background: #F0F9E8;
    border-color: var(--primary);
}
.guidance-check {
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.25rem;
}

/* Evidence list */
.evidence-list {
    margin: 0.5rem 0 1rem 1.25rem;
    font-size: 0.9rem;
}
.evidence-list li {
    margin-bottom: 0.35rem;
}
.evidence-comp-table {
    margin: 0.4rem 0 0.6rem 0;
    font-size: 0.82rem;
}
.evidence-comp-table th,
.evidence-comp-table td {
    padding: 0.2rem 0.6rem;
}

/* Recommendation line */
.recommendation-line {
    font-size: 1.15rem;
    margin: 1rem 0;
}
.rec-green { color: var(--primary-dark); }
.rec-orange { color: var(--orange); }
.rec-red { color: var(--red); }

/* Owner tenure inline */
.owner-tenure {
    color: var(--med-gray);
    font-size: 0.85em;
    margin-left: 0.25rem;
}

/* Valuation per sqft info block */
.valuation-per-sqft {
    background: var(--light-bg);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
}
.valuation-per-sqft p {
    margin: 0.2rem 0;
}

/* Cap impact row */

/* Ownership duration detail */
.owner-tenure-detail {
    color: var(--med-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Utility */
.text-small { font-size: 0.7rem; }
.text-muted { color: var(--med-gray); }

/* ── Print / PDF styles ────────────────────────────────────────────── */
@media print {
    /* Hide chrome */
    .report-nav,
    .report-toc-btn,
    .navbar,
    .footer {
        display: none !important;
    }

    /* Layout reset */
    .report-layout {
        display: block;
    }
    .report-content {
        padding: 0;
    }

    /* Page breaks */
    .report-section {
        page-break-before: always;
        border-bottom: none;
        padding: 1rem 0;
    }
    #cover {
        page-break-before: avoid;
    }

    /* Charts and maps print natively via Playwright/Chromium */
    .chart-container {
        page-break-inside: avoid;
    }

    /* Table styling for print */
    .data-table {
        font-size: 0.75rem;
    }
    .data-table thead th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .data-table tbody tr:nth-child(even) {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .highlight-row {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .callout, .callout-orange {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .stat-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .report-layout {
        width: 100%;
        max-width: 100%;
    }
    .report-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        width: 100%;
        min-height: 100vh;
        background: rgba(255,255,255,0.97);
        padding: 3rem 2rem;
    }
    .report-nav.open {
        display: block;
    }
    .report-toc-btn {
        display: block;
    }
    .report-content {
        padding: 0 0.75rem 2rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .report-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .section-title {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding: 0.6rem 1rem;
        font-size: 1.1rem;
    }
    .data-table {
        width: 100%;
        max-width: 100%;
        table-layout: auto;
        font-size: 0.75rem;
    }
    .data-table th, .data-table td {
        padding: 0.35rem 0.4rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chart-container {
        max-width: 100%;
    }
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .leaflet-container {
        max-width: 100% !important;
    }
    .evidence-comp-table {
        font-size: 0.7rem;
    }
    .protest-teaser {
        flex-direction: column;
        text-align: center;
    }
    .lot-comparison {
        max-width: 100%;
    }
    .insights-callout {
        grid-template-columns: 1fr;
    }
    .hide-mobile {
        display: none !important;
    }
}
