/* === COMAL COUNTY PROPERTY TAX PROTEST TOOL === */
/* Clean, modern, professional UI */

:root {
    --bg: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;
    --green: #16a34a;
    --green-bg: #f0fdf4;
    --green-border: #bbf7d0;
    --red: #dc2626;
    --red-bg: #fef2f2;
    --red-border: #fecaca;
    --yellow: #d97706;
    --yellow-bg: #fffbeb;
    --yellow-border: #fde68a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --radius: 10px;
    --radius-sm: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* === HEADER === */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1 {
    font-size: 1.3rem;
    font-weight: 700;
}
header h1 a {
    color: var(--text);
    text-decoration: none;
}
header .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}
.header-badge {
    flex-shrink: 0;
}
.badge-free {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* === HERO === */
.hero {
    text-align: center;
    padding: 28px 0;
}
.hero h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}
.hero p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 28px;
    font-size: 1.05rem;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 24px 0;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: -6px;
}
.stat {
    text-align: center;
}
.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* === FORMS === */
.property-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 36px;
    box-shadow: var(--shadow);
}
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.step-badge {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.optional-label {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 0.85rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.form-group input, .reno-select {
    padding: 9px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .reno-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Radius selector */
.radius-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.radius-option {
    cursor: pointer;
    flex: 1;
    min-width: 100px;
}
.radius-option input {
    display: none;
}
.radius-card {
    display: block;
    text-align: center;
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    background: var(--bg);
}
.radius-option input:checked + .radius-card {
    border-color: var(--accent);
    background: var(--accent-light);
}
.radius-miles {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}
.radius-option input:checked + .radius-card .radius-miles {
    color: var(--accent);
}
.radius-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 13px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-secondary {
    padding: 13px 24px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-secondary:hover {
    background: var(--accent);
    color: white;
}
.btn-add {
    padding: 9px 16px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.btn-add:hover {
    background: var(--accent);
    color: white;
}

/* Loading */
.loading {
    text-align: center;
    padding: 36px;
}
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-steps {
    margin-top: 14px;
    text-align: left;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}
.loading-step {
    padding: 3px 0;
    font-size: 0.8rem;
    color: var(--text-dim);
    opacity: 0.4;
    transition: opacity 0.5s;
}
.loading-step.active {
    opacity: 1;
    color: var(--accent);
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.9rem;
}
.alert-error {
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red);
}

/* Live Lookup */
.lookup-result {
    margin-top: 14px;
}
.lookup-found {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}
.lookup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px;
    font-size: 0.85rem;
}
.lookup-searching {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.lookup-notfound {
    color: var(--yellow);
    font-size: 0.85rem;
    padding: 6px 0;
}
.lookup-outside {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 8px;
    color: #78350f;
    font-size: 0.95rem;
}

/* Draft-restore banner shown at top of page when localStorage has a saved draft */
.draft-restore-banner {
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
    border-bottom: 2px solid #16a34a;
    color: #064e3b;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.draft-restore-text { flex: 1; min-width: 220px; }
.draft-restore-actions { display: flex; gap: 10px; }
.draft-restore-btn {
    background: #16a34a;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.draft-restore-btn:hover { background: #15803d; }
.draft-discard-btn {
    background: transparent;
    color: #064e3b;
    border: 1px solid #064e3b;
    padding: 7px 14px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.draft-discard-btn:hover { background: rgba(6, 78, 59, 0.08); }
.lookup-outside strong {
    display: block;
    color: #92400e;
    margin-bottom: 6px;
    font-size: 1rem;
}
.lookup-outside-hint {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    color: #92400e;
    opacity: 0.85;
}

/* Collapsible */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.toggle-icon {
    font-size: 1.1rem;
    color: var(--text-dim);
}
.collapsible-body {
    margin-top: 12px;
}

/* === RENOVATION ITEMS === */
.renovation-add-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.reno-select {
    flex: 1;
    min-width: 200px;
}
.renovation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.reno-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.reno-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.reno-remove {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
}
.reno-item-controls {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
}
.reno-severity {
    display: flex;
    gap: 4px;
}
.reno-severity label {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s;
    color: var(--text-muted);
}
.reno-severity label.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}
.reno-severity input { display: none; }
.reno-qty, .reno-custom {
    display: flex;
    align-items: center;
    gap: 4px;
}
.reno-qty input, .reno-custom input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: inherit;
}
.reno-line-total {
    margin-left: auto;
    font-size: 0.95rem;
    color: var(--text);
}
.renovation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-top: 12px;
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.reno-note {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === INFO SECTION === */
.info-section {
    margin-bottom: 48px;
}
.info-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.step-num {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 auto 10px;
}
.step h4 {
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.step p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* === RESULTS PAGE === */
.results-header {
    margin-bottom: 20px;
}
.back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.results-header h2 {
    margin-top: 6px;
    font-size: 1.4rem;
}
.results-header .address {
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 600;
}
.results-header .owner,
.results-header .legal {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.search-info {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: var(--accent-light);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--accent);
}

/* Summary Card */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.summary-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.summary-item {
    text-align: center;
    min-width: 150px;
}
.summary-item h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.summary-item .big-number {
    font-size: 1.7rem;
    font-weight: 800;
}
.summary-item .detail {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 3px;
}
.summary-item.county .big-number { color: var(--red); }
.summary-item.argued .big-number { color: var(--green); }
.summary-item.savings .big-number { color: var(--accent); }
.summary-item.repairs .big-number { color: var(--yellow); }
.summary-item.arrow { min-width: auto; }
.arrow-icon {
    font-size: 1.6rem;
    color: var(--text-dim);
}

/* Sections */
.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.section-intro {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.subsection {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.subsection h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* Strategy sections */
.strategy-section {
    position: relative;
    border-left: 3px solid var(--accent);
}
.strategy-badge {
    position: absolute;
    top: -1px;
    right: 16px;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 0 0 6px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* GIS Map */
.gis-map {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    z-index: 1;
}
.map-no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.map-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.legend-dot.subject {
    background: var(--accent);
    box-shadow: 0 0 4px var(--accent);
}
.legend-dot.lot-sale {
    background: var(--green);
}
.legend-dot.comp-sale {
    background: #f97316;
}
.legend-dot.appraisal {
    background: #7c3aed;     /* purple — uncapped CAD appraisal */
}

/* Map markers */
.subject-marker .marker-pin {
    background: var(--accent);
    color: white;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    white-space: nowrap;
}
.lot-marker {
    background: var(--green);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.comp-marker {
    background: #f97316;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.appraisal-marker {
    background: #7c3aed;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.4);
}
.leaflet-popup-content {
    font-size: 12px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* PPSF Comparison */
.ppsf-comparison {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.ppsf-item {
    text-align: center;
    min-width: 160px;
}
.ppsf-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.ppsf-value {
    font-size: 1.6rem;
    font-weight: 800;
}
.ppsf-value.bad { color: var(--red); }
.ppsf-value.good { color: var(--green); }
.ppsf-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 3px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th {
    background: var(--bg);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.data-table .number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.data-table .row-good {
    background: var(--green-bg);
}
.data-table .row-bad {
    background: var(--red-bg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 4px;
}
.badge.good {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.badge.lot {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}
.badge.best {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #bfdbfe;
}
.badge.nbhd {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-dim { color: var(--text-dim); }

/* Scrollable table container */
.neighborhood-scroll {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.neighborhood-scroll .data-table {
    border: none;
}

/* Subject Details */
.subject-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px 20px;
}
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Subject Card */
.subject-card {
    background: var(--accent-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
}
.subject-card h4 {
    color: var(--accent);
    margin-bottom: 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.subject-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.subject-stats span {
    color: var(--text-muted);
}

/* Comp Cards */
.comp-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 14px;
    overflow: hidden;
}
.comp-favorable {
    border-left: 4px solid var(--green);
}
.comp-unfavorable {
    border-left: 4px solid var(--text-dim);
}
.comp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    background: var(--bg-card);
}
.comp-rank {
    background: var(--accent);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.comp-favorable .comp-rank { background: var(--green); }
.comp-addr {
    flex: 1;
}
.comp-addr strong {
    font-size: 0.9rem;
}
.comp-distance {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-left: 8px;
}
.comp-prices {
    text-align: right;
    flex-shrink: 0;
}
.comp-raw {
    font-size: 0.8rem;
    color: var(--text-dim);
}
.comp-adjusted {
    font-size: 1rem;
}
.comp-favorable .comp-adjusted strong { color: var(--green); }
.comp-verify {
    margin-top: 6px;
    font-size: 0.78rem;
}
.comp-verify .link-redfin {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.comp-verify .link-redfin:hover { text-decoration: underline; }
.comp-body {
    padding: 12px 16px;
}
.comp-comparison {
    margin-bottom: 10px;
}
.adj-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.adj-table th {
    background: var(--bg-card);
    padding: 5px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}
.adj-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
}
.adj-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.adj-total td {
    border-top: 2px solid var(--accent);
    background: var(--accent-light);
}

.comp-photo {
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 180px;
}
.comp-photo img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.comp-cad-values {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    border: 1px solid var(--border);
}
.comp-argument {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
    border: 1px solid var(--border);
}
.comp-argument strong { color: var(--text); }
.comp-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.comp-links a, .source-links a {
    display: inline-block;
    padding: 3px 9px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--accent);
    text-decoration: none;
}
.comp-links a:hover, .source-links a:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}
.source-links { white-space: nowrap; }

/* Renovation summary on results */
.reno-summary {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.reno-final {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 2px solid var(--green);
    font-size: 1rem;
}

/* Protest Document */
.protest-document {
    background: #ffffff;
    color: #111;
    padding: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    font-size: 0.92rem;
}
.protest-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 18px;
    margin-bottom: 24px;
}
.protest-header h2 {
    font-size: 1.3rem;
    letter-spacing: 0.08em;
}
.protest-header h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-top: 6px;
}
.protest-header p {
    color: #666;
    font-size: 0.85rem;
}
.protest-summary {
    background: #f8f8f8;
    padding: 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border: 1px solid #eee;
}
.protest-summary pre {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    color: #333;
}
.protest-section-content {
    margin-bottom: 20px;
}
.protest-section-content h4 {
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    margin-bottom: 10px;
    color: #1a1a2e;
}
.protest-text {
    color: #333;
}
.protest-conclusion {
    border-top: 2px solid #333;
    padding-top: 18px;
    margin-top: 24px;
}

.action-buttons {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}
.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    flex: 1;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    margin-top: 48px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}
footer p { margin-bottom: 6px; }
footer .deadline {
    color: var(--red);
    font-weight: 600;
    font-size: 0.85rem;
}
footer .disclaimer {
    margin-top: 12px;
    font-style: italic;
    font-size: 0.75rem;
}

/* ============================================================
   === VERDICT BANNER === (top of results page)
============================================================ */
.verdict {
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.verdict::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}
.verdict-strong {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}
.verdict-moderate {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
.verdict-weak {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
.verdict-no_case {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}
.verdict-content {
    position: relative;
    z-index: 1;
}
.verdict-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
    margin-bottom: 8px;
}
.verdict-savings {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.verdict-amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.verdict-period {
    font-size: 0.95rem;
    opacity: 0.9;
}
.verdict-sub {
    font-size: 0.92rem;
    margin-bottom: 18px;
    opacity: 0.92;
}
.verdict-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.verdict-stat {
    flex: 1;
    min-width: 140px;
}
.vs-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
    margin-bottom: 4px;
}
.vs-value {
    font-size: 1.1rem;
    font-weight: 700;
}
.verdict-arrow {
    font-size: 1.4rem;
    opacity: 0.6;
    flex: 0;
}
.verdict-tax-rate {
    margin-top: 12px;
    font-size: 0.72rem;
    opacity: 0.7;
}

/* ============================================================
   === ACTION PANEL === (what to do next)
============================================================ */
.action-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.action-header h3 {
    font-size: 1.15rem;
    margin: 0;
}
.deadline-pill {
    background: var(--red-bg);
    color: var(--red);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--red-border);
}
.action-list {
    counter-reset: action;
    list-style: none;
    padding: 0;
    margin: 0;
}
.action-list li {
    position: relative;
    padding: 12px 0 12px 44px;
    counter-increment: action;
    border-bottom: 1px solid var(--border);
}
.action-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.action-list li::before {
    content: counter(action);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.action-list li strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.action-list li p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
.action-list li code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    border: 1px solid var(--border);
}

/* ============================================================
   === SECTION HEADERS === (with badge)
============================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.section-header h3 { margin: 0; }
.badge-primary {
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-secondary {
    background: var(--bg);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border);
}
.evidence-primary {
    border-left: 4px solid var(--green);
}
.evidence-secondary {
    border-left: 4px solid var(--text-dim);
}

.request-segments {
    border-left: 4px solid var(--accent);
}
.request-segment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 14px;
}
.request-segment {
    min-width: 0;
    padding: 0 18px 0 0;
}
.request-segment + .request-segment {
    border-left: 1px solid var(--border);
    padding-left: 22px;
    padding-right: 0;
}
.request-segment-kicker {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.request-segment h4 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--text);
}
.request-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
    padding: 8px 0;
    font-size: 0.92rem;
}
.request-stat-row span {
    color: var(--text-muted);
}
.request-stat-row strong {
    white-space: nowrap;
}
.request-segment p,
.request-empty {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}
.request-final {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
}
.request-final strong {
    color: var(--green);
    font-size: 1.15rem;
}
.request-final span {
    display: block;
    color: var(--text-muted);
    margin-top: 2px;
}
.cad-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.cad-summary-strip span {
    display: block;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cad-summary-strip strong {
    display: block;
    margin-top: 2px;
    font-size: 1.05rem;
}
.cad-table-wrap {
    overflow-x: auto;
}
.cad-prop-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
}
.cad-prop-cell img {
    width: 58px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .request-segment-grid,
    .cad-summary-strip {
        grid-template-columns: 1fr;
    }
    .request-segment + .request-segment {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 16px;
    }
}

/* ============================================================
   === TOP 5 COMP CARDS === (primary evidence)
============================================================ */
.top-comps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.top-comp-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.top-comp-card.favorable {
    border-color: var(--green-border);
    background: linear-gradient(180deg, var(--green-bg) 0%, var(--bg-card) 60%);
}
.tc-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.top-comp-card.favorable .tc-rank {
    background: var(--green);
}
.tc-photo {
    height: 140px;
    overflow: hidden;
    background: var(--bg-card);
}
.tc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tc-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tc-addr {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.3;
}
.tc-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.tc-prices {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.tc-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.tc-row span {
    color: var(--text-muted);
}
.tc-final {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 6px;
    font-size: 0.95rem;
}
.tc-details {
    margin-top: 4px;
    font-size: 0.78rem;
}
.tc-details summary {
    cursor: pointer;
    color: var(--accent);
    user-select: none;
}
.tc-details .adj-table {
    margin-top: 6px;
    width: 100%;
    font-size: 0.78rem;
}
.tc-details .adj-table td {
    padding: 3px 4px;
}
.tc-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: auto;
}
.tc-links a {
    padding: 3px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--accent);
}
.tc-links a:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}

/* ============================================================
   === EQUITY STATS === (unequal appraisal)
============================================================ */
.equity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 14px;
}
.equity-stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.es-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    font-weight: 600;
}
.es-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.es-value.bad { color: var(--red); }
.es-value.good { color: var(--green); }
.equity-details {
    margin-top: 14px;
}
.equity-details summary {
    cursor: pointer;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
    user-select: none;
}
.equity-details summary:hover {
    background: var(--accent-light);
}
.equity-details[open] summary {
    margin-bottom: 12px;
}

/* ============================================================
   === RENOVATION CHIPS === (form)
============================================================ */
.reno-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
}
.reno-category {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.reno-cat-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 600;
}
.reno-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.reno-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 6px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.reno-chip:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.reno-chip .chip-cost {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 600;
}
.reno-chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.reno-chip.active .chip-cost {
    color: rgba(255,255,255,0.85);
}

/* ============================================================
   === HOW WE WIN GRID === (homepage info)
============================================================ */
.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.how-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow-sm);
}
.how-num {
    width: 30px;
    height: 30px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.how-item h4 {
    font-size: 0.92rem;
    margin-bottom: 6px;
}
.how-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   === LOOKUP RESULT === (improved)
============================================================ */
.lookup-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
}
.lookup-check {
    color: var(--green);
    font-weight: 700;
    font-size: 0.85rem;
}
.lk-label {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-right: 4px;
}

.address-input {
    font-size: 1rem !important;
    padding: 12px 14px !important;
}

/* Google Places Autocomplete dropdown — keep above sticky banner / modals */
.pac-container {
    z-index: 10001 !important;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
}
.pac-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}
.pac-item:hover, .pac-item-selected {
    background: #f3f4f6;
}
.pac-item-query {
    font-size: 0.95rem;
    color: var(--text);
}

.loading-hint {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* details/summary base styling */
details > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}
details > summary::-webkit-details-marker {
    display: none;
}
details.section > summary::after {
    content: ' +';
    color: var(--text-dim);
    font-weight: normal;
    font-size: 1.2rem;
}
details.section[open] > summary::after {
    content: ' -';
}

/* ============================================================
   === WIZARD FORM === (TurboTax-style step-by-step)
============================================================ */
.wizard-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 36px;
    box-shadow: var(--shadow);
}
.wizard-progress {
    margin-bottom: 28px;
}
.wp-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 14px;
}
.wp-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}
.wp-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;       /* default: NOT clickable */
    color: var(--text-dim);
    flex: 1;
    transition: color 0.2s, transform 0.15s;
    user-select: none;
}
.wp-step.active { color: var(--accent); cursor: default; }
.wp-step.done {
    color: var(--green);
    cursor: pointer;       /* only "done" steps are clickable for backward nav */
}
.wp-step.done:hover {
    transform: translateY(-1px);
}
.wp-step.done:hover .wp-num {
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.wp-num {
    width: 28px;
    height: 28px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    background: var(--bg-card);
}
.wp-step.active .wp-num {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.wp-step.done .wp-num {
    background: var(--green);
    color: white;
    border-color: var(--green);
}
.wp-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wizard-step {
    display: none;
    animation: stepFadeIn 0.25s ease-out;
}
.wizard-step.active {
    display: block;
}
@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.wizard-step .step-header h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}
.wizard-step .form-hint {
    margin-bottom: 18px;
    font-size: 0.92rem;
}
.step-subtitle {
    font-size: 0.95rem;
    margin: 18px 0 10px;
    color: var(--text);
    font-weight: 600;
}
.step-extras {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.step-extras > summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 500;
    list-style: none;
    padding: 6px 0;
    user-select: none;
}
.step-extras > summary::-webkit-details-marker {
    display: none;
}
.step-extras > summary::before {
    content: '+ ';
    color: var(--text-muted);
}
.step-extras[open] > summary::before {
    content: '− ';
}
.step-extras > div { margin-top: 10px; }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.wizard-nav .btn-primary,
.wizard-nav .btn-secondary {
    width: auto;
    flex: 0 0 auto;
    padding: 11px 22px;
}
.wizard-nav .btn-primary {
    margin-left: auto;
}

.wizard-summary {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 18px 0;
}
.wizard-summary h4 { margin-bottom: 8px; }
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.summary-list li {
    padding: 5px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list li strong { color: var(--text-muted); font-weight: 500; }

@media (max-width: 600px) {
    .wp-name { display: none; }
    .wizard-form { padding: 18px; }
    .wizard-nav { flex-direction: column; }
    .wizard-nav .btn-primary { margin-left: 0; }
    .wizard-nav button { width: 100% !important; }
}

/* ============================================================
   === COMP TIMELINE BANNER + SPARSE CALLOUT ===
============================================================ */
.comp-timeline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.comp-timeline strong { color: var(--text); }
.market-state {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 4px;
}
.market-state.cool {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.market-state.hot {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}
.market-state.balanced {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}
.alert-sparse {
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-border);
    color: var(--yellow);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.alert-sparse strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.alert-sparse p {
    color: var(--text);
    font-size: 0.88rem;
    margin: 0;
}
.cpp-list {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1px;
}

/* ============================================================
   === SELECT COMPS PAGE === (live preview + finalize)
============================================================ */
.select-preview {
    background: linear-gradient(135deg, var(--accent-light) 0%, #fff 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 12px;
    position: sticky;
    /* Sit below the sticky top-banner (~44px tall). When banner is closed, the
       gap is filled by surrounding margin, so this is safe both ways. */
    top: 52px;
    z-index: 1100;  /* above Leaflet (which uses up to 1000), below top-banner (1200) */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
/* When the user closes the banner (sessionStorage flag), the preview can slide
   higher since there's no banner to clear. */
body.banner-closed .select-preview { top: 10px; }
/* Constrain Leaflet so it never covers the sticky preview */
.comp-map { z-index: 1 !important; position: relative; }
.leaflet-pane, .leaflet-top, .leaflet-bottom, .leaflet-control { z-index: 400 !important; }
.select-preview-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.sp-stat { flex: 1; min-width: 100px; }
.sp-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 2px;
}
.sp-value {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.sp-value.sp-argued { color: var(--accent); }
.sp-value.sp-good { color: var(--green); }
.sp-value.sp-bad { color: #dc2626; }
.sp-arrow {
    font-size: 1.4rem;
    color: var(--text-dim);
    flex: 0;
}

/* Repair-deduction stat — visually distinct so users see repairs are part of the math */
.sp-stat.sp-repair-deduct {
    background: rgba(254, 226, 226, 0.5);
    border: 1px dashed #f87171;
    border-radius: 6px;
    padding: 6px 8px;
    margin: 0 -2px;
}
.sp-stat.sp-repair-deduct .sp-label {
    color: #b91c1c;
    font-weight: 700;
}

.select-preview-basis {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Uncapped CAD helper card */
.uncapped-helper {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0 24px;
}
.uncapped-helper-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.uncapped-helper-icon {
    font-size: 1.6rem;
    line-height: 1;
}
.uncapped-helper-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #1e3a8a;
    font-weight: 700;
}
.uncapped-helper-body {
    font-size: 0.94rem;
    line-height: 1.55;
    color: #1f2937;
}
.uncapped-helper-body p {
    margin: 0 0 10px;
}
.uncapped-helper-body p:last-child { margin-bottom: 0; }
.uncapped-helper-body em {
    font-style: italic;
    color: #1e3a8a;
}
.uncapped-helper-body a {
    color: var(--accent);
    text-decoration: underline;
}
.uncapped-helper-callout {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: 0.93rem;
    color: #78350f;
    line-height: 1.5;
}
.uncapped-helper-callout strong {
    color: #78350f;
}
.uncapped-helper-callout em {
    font-style: italic;
    color: #78350f;
}
.uncapped-helper-callout a {
    color: #b45309;
    font-weight: 600;
    text-decoration: underline;
}
.uncapped-helper-tips {
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}
.uncapped-helper-tips ul {
    margin: 6px 0 0 0;
    padding-left: 22px;
}
.uncapped-helper-tips li {
    margin-bottom: 4px;
    font-size: 0.92rem;
}
.uncapped-helper-tips li:last-child { margin-bottom: 0; }
.uncapped-helper-footer {
    font-size: 0.86rem;
    color: #4b5563;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid #e0e7ff;
}
@media (max-width: 600px) {
    .uncapped-helper { padding: 16px 18px; }
    .uncapped-helper-header h3 { font-size: 1rem; }
}

.select-finalize {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-top: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.btn-build-case {
    width: auto !important;
    padding: 14px 36px !important;
    font-size: 1.05rem !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.select-finalize-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .select-preview-row { gap: 8px; }
    .sp-arrow { display: none; }
    .sp-stat { flex: 1 1 45%; }
}

@media (max-width: 600px) {
    .select-preview { padding: 10px 12px; margin-bottom: 12px; }
    .select-preview-row { gap: 6px 10px; }
    .sp-stat { min-width: 0; flex: 1 1 47%; }
    .sp-label { font-size: 0.6rem; margin-bottom: 1px; letter-spacing: 0.03em; }
    .sp-value { font-size: 0.95rem; line-height: 1.15; }
    .sp-stat.sp-repair-deduct { padding: 4px 6px; margin: 0; }
    .sp-stat.sp-equals .sp-value { font-size: 1.05rem; }
    .select-preview-basis { font-size: 0.7rem; margin-top: 5px; padding-top: 5px; }
}

/* ============================================================
   === INTERACTIVE COMP SELECTOR === (results page)
============================================================ */
.comp-selector-section { padding: 24px 28px; }
.comp-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.comp-count { font-size: 0.88rem; color: var(--text); margin-right: auto; }
.comp-count strong { color: var(--accent); font-size: 1rem; }
.btn-mini {
    padding: 5px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
}
.btn-mini:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.comp-pick {
    display: block;
    cursor: pointer;
    position: relative;
}
.comp-pick input[type="checkbox"] {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 2;
    accent-color: var(--accent);
}
.comp-pick-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: all 0.15s;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comp-pick:hover .comp-pick-card {
    border-color: var(--text-dim);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.comp-pick-helpful .comp-pick-card {
    border-color: var(--green-border);
    background: linear-gradient(180deg, var(--green-bg) 0%, var(--bg) 70%);
}
.comp-pick-selected .comp-pick-card {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.comp-pick-helpful.comp-pick-selected .comp-pick-card {
    border-color: var(--green);
    background: var(--green-bg);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}
.comp-pick-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-right: 24px; /* room for checkbox */
}
.comp-pick-addr {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
    flex: 1;
}
.comp-pick-price {
    text-align: right;
    flex-shrink: 0;
    max-width: 50%;
    min-width: 0;
}
.comp-pick-price .cpp-raw,
.comp-pick-price .cpp-adj { word-break: break-word; }
.cpp-raw {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 700;
}
.comp-pick-helpful .cpp-raw { color: var(--green); }
.comp-pick-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 0.72rem;
}
.comp-pick-badges span {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.cpb-distance { background: var(--accent-light) !important; color: var(--accent) !important; border-color: #bfdbfe !important; }
.cpb-nbhd { background: #f0f9ff !important; color: #0369a1 !important; border-color: #bae6fd !important; font-weight: 600; }
.cpb-subdiv { background: #fdf4ff !important; color: #a21caf !important; border-color: #f5d0fe !important; font-weight: 600; }
.cpb-helpful { background: var(--green-bg) !important; color: var(--green) !important; border-color: var(--green-border) !important; font-weight: 700; }
.cpb-over-adjusted { background: #fef3c7 !important; color: #92400e !important; border-color: #f59e0b !important; font-weight: 700; }
.cpb-confidence-high { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; font-weight: 700; font-size: 0.72rem; }
.cpb-confidence-unverified { background: #fef3c7 !important; color: #854d0e !important; border-color: #fde68a !important; font-weight: 700; font-size: 0.72rem; }

/* Comp filter panel (Step 3) */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 0 16px;
    overflow: hidden;
}
.filter-panel-summary {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    user-select: none;
}
.filter-panel-summary::-webkit-details-marker { display: none; }
.filter-panel-summary::after {
    content: '▾';
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 120ms;
}
.filter-panel[open] .filter-panel-summary::after { transform: rotate(180deg); }
.filter-panel-summary:hover { background: var(--bg-2, #f8fafc); }
.fps-icon { font-size: 1.05rem; }
.fps-current {
    margin-left: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.filter-panel-body {
    padding: 12px 16px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg, #fff);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 110px;
}
.filter-btn {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.filter-btn:hover { background: var(--bg-2, #f1f5f9); }
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}
.filter-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 4px 0 0;
}

/* Distance filter (Step 4) */
.distance-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}
.distance-filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.distance-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.distance-btn:hover { background: var(--bg-2); }
.distance-btn.active {
    background: var(--accent);
    color: var(--white, #fff);
    border-color: var(--accent);
    font-weight: 600;
}

/* Expanded uncapped CAD card on Step 4 */
.uncapped-card { padding-bottom: 6px; }
.cpp-below { color: var(--green); font-weight: 700; font-size: 0.78rem; margin-top: 4px; line-height: 1.3; }
.uncapped-photo {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-2);
}
.uncapped-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.uncapped-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 14px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 6px 0;
    font-size: 0.85rem;
}
.us-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.us-row span { color: var(--text-muted); }
.us-row strong { color: var(--text); }
.us-match {
    color: var(--green);
    font-weight: 800;
    font-size: 0.95rem;
    margin-left: 2px;
}
.us-row-hero {
    grid-column: 1 / -1;
    background: rgba(34, 197, 94, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
    margin: 2px 0 6px;
    font-size: 0.95rem;
}
.us-row-hero strong { color: var(--green); font-size: 1.05rem; }
.us-vs-subject { color: var(--text-muted); font-weight: 500; font-size: 0.82rem; margin-left: 6px; }
.cpp-pct { font-weight: 600; color: var(--green); font-size: 0.72rem; display: block; }
.uncapped-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    padding: 4px 0;
}
.uncapped-links a {
    color: var(--accent);
    text-decoration: none;
}
.uncapped-links a:hover { text-decoration: underline; }
.comp-pick-over-adjusted .comp-pick-card { opacity: 0.65; }
.comp-pick-over-adjusted .comp-pick-card:hover { opacity: 1; }
.comp-pick-over-adjusted input:checked ~ .comp-pick-card { opacity: 1; border-color: #f59e0b !important; }
.comp-pick-photo {
    height: 140px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.comp-pick-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comp-pick-photo-link a.photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #fef3c7 0%, var(--accent-light) 100%);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.comp-pick-photo-link a.photo-placeholder:hover {
    background: var(--accent);
    color: white;
    border-style: solid;
}
.link-redfin {
    background: #c0124a !important;
    color: white !important;
    border-color: #c0124a !important;
    font-weight: 700 !important;
}
.link-redfin:hover {
    background: #a00d3d !important;
}
.cpp-list {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1px;
}
.comp-pick-detail summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--accent);
    user-select: none;
}
.comp-pick-detail table {
    width: 100%;
    margin-top: 6px;
    font-size: 0.75rem;
    border-collapse: collapse;
}
.comp-pick-detail td {
    padding: 3px 4px;
    border-bottom: 1px solid var(--border);
}
.comp-pick-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: auto;
}
.comp-pick-links a {
    padding: 3px 9px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--accent);
}
.comp-pick-links a:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}
.comp-finalize {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    text-align: center;
}
.comp-finalize-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.comp-finalize button {
    width: auto !important;
    padding: 11px 28px !important;
}

/* ============================================================
   === PROPERTY TYPE TOGGLE === (form) + TYPE PILL (results)
============================================================ */
.type-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.type-toggle-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.type-toggle-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.type-option {
    cursor: pointer;
}
.type-option input { display: none; }
.type-option span {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.15s;
}
.type-option input:checked + span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}
.type-option:hover span {
    border-color: var(--accent);
}
.type-pill {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}
.type-pill.type-home {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #bfdbfe;
}
.type-pill.type-lot {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}

/* ============================================================
   === SUPPORT / TIP CARD === (results page + footer)
============================================================ */
.support-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.support-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.support-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.support-badge {
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.support-msg {
    color: var(--text);
    margin-bottom: 16px;
    font-size: 0.92rem;
    line-height: 1.55;
}
.tip-form { margin-bottom: 16px; }
.tip-amounts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.tip-amount {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    color: var(--text);
    position: relative;
}
.tip-amount:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.tip-amount-suggested {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}
.tip-amount-suggested:hover {
    background: var(--accent-hover);
    color: white;
    border-color: var(--accent-hover);
}
.tip-amount-note {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-top: 2px;
}
.tip-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.tip-custom label { color: var(--text-muted); }
.tip-custom input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
}
.tip-custom button {
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
}
.support-extras {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid #fde68a;
    font-size: 0.85rem;
}
.support-extra { flex: 1; min-width: 240px; }
.support-extra strong { display: block; margin-bottom: 2px; color: var(--text); }
.support-extra a { color: var(--accent); font-weight: 500; }

.footer-creator {
    margin: 14px auto;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    max-width: 720px;
}
.footer-donate {
    margin: 8px 0 12px;
}
.footer-donate-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 120ms, transform 120ms;
}
.footer-donate-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}
/* Email button reuses .btn-primary .btn-pptx for visual parity with the
   Download button — same red filled treatment, same height, same font.
   Only difference is left margin so the two sit nicely side-by-side. */
.btn-email-export {
    margin-left: 10px;
    cursor: pointer;
    font-family: inherit;
}
@media (max-width: 600px) {
    .btn-email-export { margin-left: 0; margin-top: 10px; width: 100%; }
}

/* Mobile-aware download hint + button visibility */
.mobile-download-hint {
    display: none;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    margin: 0 0 14px;
    line-height: 1.45;
}
@media (max-width: 768px) {
    /* Browser downloads of .pptx are unreliable on iOS Safari (iframe quirks)
       and blocked entirely in many in-app browsers (Facebook, Instagram).
       Hide the Download button and show the email-instead hint. */
    .desktop-only-btn { display: none !important; }
    .mobile-download-hint { display: block; }
    .btn-email-export {
        margin-left: 0;
        width: 100%;
        font-size: 1rem;
        padding: 14px 18px;
    }
}
.footer-creator p {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.footer-links a { color: var(--accent); font-weight: 500; }

/* tip modal (shown before print) */
.tip-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.tip-modal-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: tipModalIn 0.25s ease-out;
}
@keyframes tipModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tip-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    line-height: 1;
}
.tip-modal-close:hover {
    background: var(--bg);
    color: var(--text);
}
.tip-modal-header h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.tip-modal-header p {
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.tip-modal-success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--green-bg, #dcfce7);
    color: var(--green, #166534);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.tip-modal-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--green, #166534);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}
.tip-modal-downloads-hint {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.5;
}
.tip-modal-downloads-hint code {
    background: var(--bg-2, #f1f5f9);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}
.tip-downloads-reminder {
    background: var(--accent-light, #eff6ff);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 14px 0 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}
.tip-downloads-reminder code {
    background: var(--bg-2, #f1f5f9);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.tip-modal .tip-amounts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.tip-modal-extras {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}
.tip-modal-extras p {
    color: var(--text-muted);
    margin-bottom: 6px;
}
.tip-modal-footer {
    margin-top: 16px;
    text-align: center;
}
.btn-skip {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    font-family: inherit;
    padding: 8px;
}
.btn-skip:hover { color: var(--text); }

@media print {
    .tip-modal { display: none !important; }
}

.tip-success-page { max-width: 560px; margin: 60px auto; padding: 0 20px; }
.tip-success-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.tip-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 auto 18px;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}
.tip-success-card h2 { margin-bottom: 10px; }
.tip-success-msg { color: var(--text-muted); margin-bottom: 26px; font-size: 1rem; }
.tip-actions { margin-bottom: 28px; }
.tip-creator-info {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.tip-creator-info p { margin-bottom: 6px; }
.tip-other-tools { list-style: none; padding: 0; margin: 0; }
.tip-other-tools li { padding: 4px 0; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .tip-amounts { grid-template-columns: repeat(3, 1fr); }
    .support-extras { flex-direction: column; gap: 10px; }
    .comp-grid { grid-template-columns: 1fr; }
    .comp-toolbar { flex-wrap: wrap; }
    .stats-bar { gap: 20px; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .summary-grid { flex-direction: column; }
    .summary-item.arrow { transform: rotate(90deg); }
    .ppsf-comparison { flex-direction: column; align-items: center; }
    .action-buttons { flex-direction: column; }
    .protest-document { padding: 20px; }
    .data-table { font-size: 0.78rem; }
    .comps-table { display: block; overflow-x: auto; }
    .radius-selector { flex-wrap: wrap; }
    .radius-option { min-width: 70px; }
    .reno-item-controls { flex-direction: column; align-items: flex-start; }
    .header-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 768px) {
    .verdict { padding: 22px; }
    .verdict-amount { font-size: 2.2rem; }
    .verdict-stats { gap: 12px; }
    .verdict-stat { min-width: 110px; flex: 1 1 45%; }
    .verdict-arrow { display: none; }
    .action-panel { padding: 18px; }
    .action-list li { padding-left: 38px; }
    .top-comps-grid { grid-template-columns: 1fr; }
    .equity-stats { grid-template-columns: 1fr 1fr; }
    .how-grid { grid-template-columns: 1fr 1fr; }
    .reno-chips { gap: 4px; }
    .reno-chip { font-size: 0.78rem; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .steps { grid-template-columns: 1fr; }
    .hero h2 { font-size: 1.4rem; }
    .lookup-grid { grid-template-columns: 1fr; }
    .how-grid { grid-template-columns: 1fr; }
    .equity-stats { grid-template-columns: 1fr; }
    .verdict-amount { font-size: 1.9rem; }
}

/* === PRINT STYLES === */
@media print {
    body { background: white; color: black; }
    header, footer, .back-link, .action-buttons, .hero,
    .property-form, .info-section, .loading, .search-info,
    .strategy-badge { display: none !important; }
    .section {
        break-inside: avoid;
        border: 1px solid #ddd;
        background: white;
        box-shadow: none;
    }
    .summary-card { background: white; border: 2px solid #333; box-shadow: none; }
    .summary-item .big-number { color: black !important; }
    .protest-document { padding: 0; border: none; }
    .results-header { text-align: center; }
}

/* ============================================================
   === PHOTO UPLOAD === (subject property photos)
============================================================ */
.photo-upload-section {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.photo-uploader { margin-top: 10px; }
.photo-drop {
    display: block;
    cursor: pointer;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 26px 18px;
    background: var(--bg);
    transition: all 0.15s;
}
.photo-drop:hover, .photo-drop.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}
.photo-drop-inner { text-align: center; }
.photo-drop-icon {
    width: 42px;
    height: 42px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 auto 10px;
}
.photo-drop-text { font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.photo-drop-text strong { color: var(--accent); }
.photo-drop-sub { font-size: 0.78rem; color: var(--text-dim); }
.photo-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.photo-thumb {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb.uploading img { opacity: 0.5; }
.photo-thumb-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.5);
}
.photo-thumb-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.photo-thumb-remove:hover { background: var(--red); }

.subject-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.subject-photo-card {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.subject-photo-card img { width: 100%; height: 100%; object-fit: cover; }
@media print {
    .subject-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        page-break-inside: avoid;
    }
}

/* Tip - 3-button layout + bigger custom amount */
.tip-amounts-3 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
}
.tip-custom-big {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--bg);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    display: block !important;
}
.tip-custom-big label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}
.tip-custom-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.tip-dollar-sign {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding-left: 4px;
}
.tip-custom-input {
    flex: 1;
    width: auto !important;
    padding: 14px 16px !important;
    font-size: 1.4rem !important;
    font-weight: 700;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-sm);
    font-family: inherit;
    text-align: center;
}
.tip-custom-input:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.tip-custom-btn {
    width: auto !important;
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    flex: 0 0 auto;
}
@media (max-width: 600px) {
    .tip-amounts-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .tip-custom-row { flex-direction: column; }
    .tip-dollar-sign { display: none; }
}

/* ============================================================
   === MULTI-PAGE SLIDE LAYOUT ===
============================================================ */
.protest-document.slides-mode {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    font-family: 'Inter', -apple-system, sans-serif;
}
.slide-page {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 44px;
    margin-bottom: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    min-height: 6in;
    page-break-after: always;
    break-after: page;
    color: #1a1a2e;
    line-height: 1.55;
    position: relative;
}
.slide-page:last-child {
    page-break-after: auto;
    break-after: auto;
    margin-bottom: 0;
}
.slide-h {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: #1a1a2e;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}
.slide-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) {
    .slide-grid-2 { grid-template-columns: 1fr; }
}
.slide-info-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
    gap: 12px;
}
.slide-info-row span { color: #666; }
.slide-info-row strong { color: #1a1a2e; text-align: right; }

/* Per-comp Subject vs Comp comparison table */
.comp-vs-subject {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.comp-vs-subject thead th {
    padding: 8px 10px;
    background: #2563eb;
    color: white;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-align: center;
    font-weight: 700;
}
.comp-vs-subject thead th:first-child { background: transparent; }
.comp-vs-subject tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #eef0f3;
}
.comp-vs-subject tbody tr:nth-child(even) { background: #f8fafc; }
.comp-vs-subject tbody td:first-child {
    color: #6b7280;
    font-size: 0.82rem;
    width: 30%;
}
.comp-vs-subject tbody td:not(:first-child) {
    text-align: center;
    font-weight: 700;
    color: #1f2937;
}
.comp-vs-subject .comp-val { color: #16a34a; }
.comp-vs-subject .muted { color: #6b7280; font-weight: 600; }
.comp-vs-subject sup { color: #6b7280; font-size: 0.65em; }
.comp-vs-subject-note {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #6b7280;
    font-style: italic;
}
.comp-same-subdivision {
    margin: 10px 0 0;
    padding: 8px 12px;
    background: #ecfdf5;
    border-radius: 6px;
    font-size: 0.88rem;
}

/* Summary slide: all comps + subject in one big table */
.slide-comps-summary .comps-summary-wrap {
    overflow-x: auto;
    margin-top: 14px;
}
.comps-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.comps-summary-table thead th {
    background: #2563eb;
    color: white;
    padding: 10px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}
.comps-summary-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef0f3;
    color: #1f2937;
}
.comps-summary-table tbody tr:nth-child(even) { background: #f8fafc; }
.comps-summary-table tbody tr.row-subject {
    background: #fef3c7 !important;
    font-weight: 700;
}
.comps-summary-table tbody tr.row-subject td {
    color: #78350f;
    border-bottom: 2px solid #f59e0b;
}
.comps-summary-table sup { color: #92400e; font-size: 0.65em; }
.comps-summary-note {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: #6b7280;
    font-style: italic;
}
.slide-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.slide-photo-card {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
}
.slide-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.slide-photo-card:hover img { transform: scale(1.04); }
.slide-photos-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 0.9rem;
    min-height: 200px;
}

/* COVER SLIDE */
.slide-cover {
    background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
    color: white;
    border: none;
    min-height: 7in;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide-cover-inner { max-width: 700px; }
.slide-cover-eyebrow {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.85;
    margin-bottom: 20px;
}
.slide-cover-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.2;
}
.slide-cover-meta { font-size: 1rem; opacity: 0.9; margin-bottom: 4px; }
.slide-cover-date { font-size: 0.9rem; opacity: 0.75; margin-top: 14px; margin-bottom: 32px; }
.slide-cover-verdict {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 22px 28px;
    margin-top: 24px;
}
.scv-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 8px;
}
.scv-savings {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}
.scv-sub { font-size: 0.95rem; opacity: 0.92; }

/* COMP SLIDE */
.slide-comp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}
.slide-comp-badge {
    background: var(--green);
    color: white;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
}
.slide-uncapped-badge {
    background: var(--accent);
}
.slide-comp-addr {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.slide-comp-photos { min-height: 200px; }
.slide-comp-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #fef3c7 0%, var(--accent-light) 100%);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.slide-comp-argument {
    grid-column: 1 / -1;
    background: var(--green-bg);
    border-left: 4px solid var(--green);
    padding: 14px 18px;
    margin-top: 18px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    line-height: 1.6;
}
.slide-comp-argument strong { color: var(--green); }
.slide-uncapped-arg {
    background: var(--accent-light);
    border-left-color: var(--accent);
}
.slide-uncapped-arg strong { color: var(--accent); }
.comp-photo-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.comp-photo-thumb {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
}
.comp-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.comp-photo-thumb:hover img { transform: scale(1.04); }
.comp-photo-strip .comp-photo-thumb:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16/9;
}

/* ARGUMENT SLIDE (text-heavy) */
.slide-argument .protest-text {
    font-size: 0.92rem;
    line-height: 1.7;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Courier New', monospace;
    background: #fafafa;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #eee;
}
.slide-conclusion .protest-text {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* SLIDE: REDUCTION MATH (mirrors PPTX _slide_reduction_math) */
.slide-math .math-start {
    margin-top: 18px;
    font-size: 1.05rem;
    color: #1f2937;
}
.slide-math .math-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.slide-math .math-two-col > div {
    background: #f8f9fb;
    padding: 16px;
    border-radius: 8px;
}
.slide-math .math-two-col h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}
.slide-math .math-empty {
    color: #6b7280;
    font-size: 0.95rem;
}
.slide-math .math-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}
.slide-math .math-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}
.slide-math .math-row:last-child {
    border-bottom: none;
}
.slide-math .math-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}
.slide-math .math-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}
.slide-math .math-value-red { color: #dc2626; }
.slide-math .math-value-green { color: #16a34a; }
.slide-math .math-row-final {
    background: #2563eb;
    border-radius: 8px;
    border: none;
    margin: 8px 0;
    padding: 18px 22px;
}
.slide-math .math-row-final .math-label,
.slide-math .math-row-final .math-value {
    color: #ffffff;
}
.slide-math .math-row-final .math-value {
    font-size: 1.7rem;
}
.slide-math .math-row-detail {
    padding-left: 36px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
}
.slide-math .math-label-sub {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}
.slide-math .math-row-tax {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    margin-top: 6px;
    padding: 12px 18px;
}
.slide-math .math-footer {
    margin-top: 28px;
    font-size: 0.92rem;
    color: #6b7280;
    line-height: 1.6;
    font-style: italic;
}
@media (max-width: 760px) {
    .slide-math .math-two-col {
        grid-template-columns: 1fr;
    }
}

/* LIGHTBOX */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.lightbox-close {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
}
.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 2.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.btn-pptx {
    background: #c0392b !important;
}
.btn-pptx:hover { background: #a83323 !important; }

/* PRINT: each slide gets its own page */
@media print {
    @page {
        size: letter landscape;
        margin: 0.4in;
    }
    .slide-page {
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0.4in !important;
        page-break-after: always;
        min-height: 7.5in;
    }
    .slide-cover {
        background: var(--accent) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .lightbox-overlay { display: none !important; }
    .btn-pptx, .pptxExportForm { display: none !important; }
    .verdict, .action-panel, .support-card, .alert-sparse,
    .comp-timeline, .section, .info-section, header, footer, .results-header {
        display: none !important;
    }
    .protest-document.slides-mode { display: block !important; }
}

/* ============================================================
   === VIEW TOGGLE (CARDS / MAP) === (comp selection page)
============================================================ */
.view-toggle {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
}
.view-toggle-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.view-toggle-btn.active {
    background: var(--accent);
    color: white;
}
.view-toggle-btn:not(.active):hover {
    background: var(--bg-card);
    color: var(--text);
}

.comp-map-view {
    margin-bottom: 18px;
}
.comp-map {
    width: 100%;
    height: 540px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.comp-map-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}
.map-popup {
    font-size: 0.85rem;
    line-height: 1.5;
}
.map-popup strong { color: var(--text); }

/* Spacing between action buttons and protest document preview */
.action-buttons-protest {
    margin-bottom: 24px;
    padding: 18px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.protest-divider {
    border: none;
    border-top: 2px dashed var(--border);
    margin: 30px 0 12px;
}
.protest-divider-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
    margin-bottom: 28px;
}

/* Bigger export buttons - 2 prominent buttons only */
.btn-export {
    flex: 1;
    padding: 16px 24px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    min-height: 56px;
}
.action-buttons-protest {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

/* Cover slide: primary focus on value transition */
.scv-savings {
    font-size: 2.2rem !important;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 6px;
}
.scv-pct {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    opacity: 0.95;
}

/* Big "no thanks just download" button on tip modal */
.tip-modal-skip {
    margin: 18px 0;
    text-align: center;
}
.btn-skip-big {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--text);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.btn-skip-big:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Talking points box (HTML preview - matches PPTX style) */
.talking-points-box {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-left: 4px solid var(--green);
    padding: 14px 18px;
    margin-top: 18px;
    border-radius: var(--radius-sm);
}
.tp-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.tp-list {
    list-style: disc;
    margin: 0 0 10px 24px;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.6;
    border: 1px dashed transparent;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: border 0.15s, background 0.15s;
}
.tp-list[contenteditable="true"]:focus {
    outline: none;
    border-color: var(--green);
    background: rgba(255,255,255,0.5);
}
.tp-list[contenteditable="true"]:hover {
    border-color: var(--green-border);
}
.tp-list li { margin-bottom: 4px; }
.tp-editable-hint {
    font-style: italic;
    color: var(--text-dim);
}
.tp-link-row { margin-top: 6px; }

/* ============================================================
   === STICKY TOP BANNERS === (always visible across pages)
============================================================ */
/* Status banner sits ABOVE the tip banner; both stack at the top. */
.status-banner {
    position: sticky;
    top: 0;
    z-index: 1201;   /* one above tip banner so it stays above when scrolling */
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
    border-bottom: 1px solid #f59e0b;
    padding: 7px 0;
    font-size: 0.85rem;
}
.status-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.4;
}
.sb-icon { font-size: 1rem; }
.sb-message strong { font-weight: 700; }
@media (max-width: 600px) {
    .status-banner { padding: 6px 8px; font-size: 0.78rem; }
}

.top-banner {
    position: sticky;
    top: 36px;       /* sit just below the status banner */
    z-index: 1200;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.top-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
}
.tb-deadline { font-weight: 600; }
.tb-deadline strong { font-weight: 800; }
.tb-divider { opacity: 0.55; }
.tb-message { opacity: 0.92; }
.tb-tip-btn {
    background: rgba(255,255,255,0.95);
    color: var(--accent);
    border: none;
    padding: 6px 16px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.tb-tip-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
/* Sponsor CTA inside the tip modal */
.tip-sponsor-cta {
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0 8px;
    text-align: center;
}
.tip-sponsor-cta h4 {
    margin: 0 0 6px;
    font-size: 1.02rem;
    color: var(--text);
}
.tip-sponsor-cta p {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}
.tip-sponsor-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: background 0.15s, transform 0.15s;
}
.tip-sponsor-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.tb-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.tb-close:hover { opacity: 1; }

@media print { .top-banner { display: none !important; } }
@media (max-width: 600px) {
    .tb-message, .tb-divider { display: none; }
    .top-banner-inner { gap: 8px; }
}

/* Custom repair input section (form Step 2) */
.custom-reno-section {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
}
.custom-reno-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.custom-reno-input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
}
.custom-reno-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.custom-reno-name { flex: 1; min-width: 200px; }
.custom-reno-cost { width: 100px; }
.custom-reno-dollar {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-weight: 700;
}
.btn-add-custom {
    padding: 10px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.btn-add-custom:hover {
    background: var(--accent-hover);
}
.custom-reno-hint {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Single big PowerPoint button (PDF removed) */
.btn-pptx-only {
    width: 100%;
    padding: 22px 32px !important;
    font-size: 1.2rem !important;
    background: linear-gradient(135deg, #c0392b 0%, #a83323 100%) !important;
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.3);
}
.btn-pptx-only:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.45);
}

/* Auto-loaded Redfin photos (pre-populated in Step 2) */
.photo-thumb.auto-loaded {
    border: 2px solid var(--green);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}
.photo-thumb-source {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    background: rgba(22, 163, 74, 0.9);
    color: white;
    font-size: 0.7rem;
    text-align: center;
    font-weight: 600;
}
.auto-photo-notice {
    margin: 10px 0 14px;
    padding: 10px 14px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius-sm);
    color: var(--green);
    font-size: 0.88rem;
}
.auto-photo-notice strong { color: var(--green); }
