* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
.container { max-width: 800px; margin: 0 auto; padding: 20px; }
h1 { font-size: 2.4em; margin-bottom: 12px; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 1.3em; margin: 20px 0 10px; color: #555; }
.card { background: white; border-radius: 8px; padding: 24px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card-alt { background: #f9fafb; }
.card-highlight { border: 2px solid #2563eb; background: #fafbff; }
.btn { display: inline-block; padding: 10px 24px; background: #2563eb; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 1em; text-decoration: none; transition: background 0.15s ease-out, transform 0.15s ease-out; }
.btn:hover { background: #1d4ed8; }
.btn:active { transform: scale(0.97); }
.btn:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }
.btn-full { width: 100%; font-size: 1.1em; padding: 14px; }
.btn-cta { width: 100%; font-size: 1.05em; padding: 12px; }
input[type="text"], input[type="number"], input[type="email"] { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1em; margin-bottom: 8px; }
input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.2); }
input.input-error { border-color: #dc2626; }
input.input-error:focus { box-shadow: 0 0 0 2px rgba(220,38,38,0.2); }
.field-error { color: #dc2626; font-size: 0.85em; margin: -4px 0 8px; display: none; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; font-size: 0.9em; color: #6b7280; }
.error { color: #dc2626; margin: 8px 0; }
.success { color: #16a34a; margin: 8px 0; }
.step { display: none; }
.step.active { display: block; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.8em; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-generated { background: #d1fae5; color: #065f46; }
label { display: block; margin-bottom: 4px; font-weight: 500; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: normal; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; }
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.property-grid .label { color: #6b7280; font-size: 0.9em; }
.property-grid .value { font-weight: 600; }
.nav-steps { display: flex; gap: 4px; margin-bottom: 20px; }
.nav-step { padding: 6px 16px; border-radius: 20px; font-size: 0.85em; background: #e5e7eb; color: #6b7280; }
.nav-step.active { background: #2563eb; color: white; }
.nav-step.done { background: #d1fae5; color: #065f46; }
.disclaimer { padding: 16px 0; color: #9ca3af; font-size: 0.75em; text-align: center; line-height: 1.5; border-top: 1px solid #e5e7eb; margin-top: 30px; }

/* Deficiency hints */
.deficiency-item { border-bottom: 1px solid #f3f4f6; padding-bottom: 4px; }
.deficiency-hint { margin: 4px 0 8px 26px; padding: 10px 14px; background: #f0f9ff; border-radius: 6px; border-left: 3px solid #2563eb; }
.deficiency-hint .hint-desc { font-size: 0.85em; color: #374151; margin-bottom: 6px; }
.deficiency-hint .hint-proof { font-size: 0.8em; color: #2563eb; font-weight: 500; }

/* Text helpers */
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.text-faint { color: #9ca3af; }
.text-sm { font-size: 0.9em; }
.text-xs { font-size: 0.85em; }
.text-xxs { font-size: 0.8em; }
.text-bold { font-weight: 600; }
.text-danger { color: #dc2626; }
.text-success-color { color: #16a34a; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* Loading spinner */
.loading {
    display: none;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    margin: 12px 0;
}
.loading.visible { display: flex; }
.spinner {
    width: 20px; height: 20px;
    border: 2.5px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Step numbers */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 8px;
}

/* 3-col grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Price anchoring boxes */
.price-box { padding: 16px; background: #f9fafb; border-radius: 6px; }
.price-box-active { background: #eff6ff; border: 2px solid #2563eb; }
.price-amount { font-size: 1.3em; font-weight: 700; }
.price-struck { color: #dc2626; text-decoration: line-through; }
.price-active { color: #2563eb; }

/* FAQ */
.faq-item { padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 500; }
.faq-item p { color: #6b7280; margin-top: 8px; font-size: 0.9em; }

/* Accent card */
.card-accent { background: #eff6ff; border: 1px solid #dbeafe; }

/* Document preview */
.doc-preview { background: #fff; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; text-align: left; }
.doc-preview-bar { background: #f3f4f6; padding: 6px 12px; font-size: 0.75em; color: #6b7280; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 6px; }
.doc-icon { font-size: 1em; }
.doc-preview-body { padding: 16px; position: relative; max-height: 280px; overflow: hidden; }
.doc-h1 { font-size: 0.95em; font-weight: 700; color: #1e3a5f; margin-bottom: 10px; }
.doc-h2 { font-size: 0.8em; font-weight: 600; color: #374151; margin: 10px 0 6px; border-bottom: 1px solid #e5e7eb; padding-bottom: 3px; }
.doc-table { font-size: 0.75em; }
.doc-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #f3f4f6; }
.doc-row-header { font-weight: 600; color: #6b7280; font-size: 0.95em; }
.doc-row-header span { flex: 1; }
.doc-row span { flex: 1; }
.doc-cell-label { color: #6b7280; }
.doc-cell-value { font-weight: 600; text-align: right; }
.doc-highlight { color: #16a34a; }
.doc-table-sm .doc-row span { font-size: 0.95em; }
.doc-text { font-size: 0.75em; color: #374151; line-height: 1.5; }
.doc-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 50px; background: linear-gradient(transparent, #fff); }

/* Suggestion dropdown */
.suggestions-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: white; border: 1px solid #d1d5db; border-top: none;
    border-radius: 0 0 6px 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10; max-height: 240px; overflow-y: auto;
}
.suggestion-item {
    padding: 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; font-size: 0.95em;
}
.suggestion-item:hover { background: #f3f4f6; }

/* Monitor box */
.monitor-box { background: #f0f9ff; padding: 16px; border-radius: 6px; margin: 16px 0; }

/* Deadline */
.deadline { color: #dc2626; font-size: 0.9em; margin-top: 12px; text-align: center; font-weight: 500; }

/* ROI line */
.roi-line { font-weight: 600; text-align: center; margin-bottom: 12px; font-size: 1.05em; }

/* Gap row */
.gap-row { border-top: 2px solid #e5e7eb; }
.gap-val { text-align: right; font-weight: 700; font-size: 1.2em; }
.savings-line { font-size: 1em; margin-top: 12px; font-weight: 600; text-align: center; }

/* Hero */
.hero { text-align: center; padding: 32px 0 16px; }
.hero-sub { color: #555; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; font-size: 1.05em; }

/* Social proof */
.social-proof { text-align: center; font-size: 0.9em; color: #555; margin: -8px 0 16px; }

/* Input wrapper for autocomplete */
.input-wrapper { position: relative; }

/* Trust line */
.trust-line { font-size: 0.9em; color: #6b7280; margin-top: 8px; text-align: center; font-weight: 500; }

/* Nav */
.site-nav { padding: 8px 0; margin-bottom: 8px; font-size: 0.9em; display: flex; gap: 16px; }
.site-nav a { color: #2563eb; text-decoration: none; }

/* Appeal list */
.appeal-list { margin: 12px 0 16px 20px; line-height: 1.8; }

/* Notes label spacer */
.notes-spacer { margin-top: 16px; }

/* Hint links */
.deficiency-hint a { color: #2563eb; font-size: 0.85em; margin-right: 12px; white-space: nowrap; }
.deficiency-hint a:hover { text-decoration: underline; }

/* Repair cost table */
.repair-costs table { font-size: 0.85em; margin-top: 4px; }
.repair-costs td { padding: 4px 12px 4px 0; border-bottom: 1px solid #f3f4f6; }

/* Data check card */
.data-check-item { display: inline-block; background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; padding: 4px 10px; margin: 2px 4px 2px 0; font-size: 0.85em; }
.data-check-item .check-label { color: #6b7280; }
.data-check-item .check-value { font-weight: 600; }

/* Evidence warning */
#evidence-warning { background: #fffbeb; border-left: 3px solid #f59e0b; }

/* Proof example gallery */
.proof-gallery { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.proof-gallery img {
    width: 120px; height: 80px; object-fit: cover; border-radius: 4px;
    border: 1px solid #e5e7eb; cursor: pointer; transition: transform 0.15s ease-out;
}
.proof-gallery img:hover { transform: scale(1.05); }
.proof-gallery-label { font-size: 0.8em; color: #6b7280; margin-top: 8px; }

/* Lightbox */
.lightbox {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    z-index: 100; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox.visible { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

/* Footer */
.footer { margin-top: 30px; border-top: 1px solid #e5e7eb; padding-top: 16px; }
.footer-nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.footer-nav a { color: #6b7280; text-decoration: none; font-size: 0.85em; }
.footer-nav a:hover { color: #2563eb; }
.disclaimer { color: #9ca3af; font-size: 0.75em; text-align: center; line-height: 1.5; }

/* Comp cards for mobile */
.comp-cards { display: none; }
.comp-card { background: #f9fafb; border-radius: 6px; padding: 12px; margin-bottom: 8px; }
.comp-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comp-card-header input { width: 18px; height: 18px; }
.comp-card-addr { font-weight: 600; font-size: 0.9em; }
.comp-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 0.85em; }
.comp-card-grid .label { color: #6b7280; }
.comp-card-grid .value { font-weight: 600; text-align: right; }

@media (max-width: 640px) {
    h1 { font-size: 1.7em; }
    .container { padding: 12px; }
    .card { padding: 16px; }
    .nav-steps { gap: 2px; }
    .nav-step { white-space: nowrap; flex-shrink: 0; padding: 6px 10px; font-size: 0.75em; }
    .nav-step .step-label { display: none; }
    .property-grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .step-number { width: 32px; height: 32px; font-size: 0.95em; }
    .sample-grid { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    /* Show comp cards, hide comp table on mobile */
    .comp-cards { display: block; }
    .comp-table-wrapper { display: none; }
}
