/* ══════════════════════════════════════════════════════════
   SafeHome AI v8 — Styles
   Design: Warm cream + teal palette, editorial typography
   ══════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-darker: #134e4a;
    --teal-light: #f0fdfa;
    --teal-mid: #ccfbf1;
    --cream: #faf8f5;
    --cream-dark: #f0ebe3;
    --border: #e5e0d8;
    --warm9: #1c1917;
    --warm7: #44403c;
    --warm5: #78716c;
    --warm3: #d6d3d1;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --amber: #d97706;
    --amber-light: #fffbeb;
    --amber-mid: #fde68a;
    --red: #dc2626;
    --red-light: #fef2f2;
    --red-mid: #fecaca;
    --font-display: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--warm9);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scoreIn { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes bodyIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(13,148,136,0.3); } 50% { box-shadow: 0 0 0 12px rgba(13,148,136,0); } }

/* ── Screens ── */
.screen { display: none; min-height: 100vh; flex-direction: column; }
.screen.active { display: flex; }
.screen-body { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.screen-body.pad-bottom-nav { padding-bottom: 140px; }

/* ── App Header ── */
.app-header {
    padding: 14px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 32px; height: 32px; border-radius: 10px;
    background: var(--teal); display: flex; align-items: center; justify-content: center;
}
.logo-text { font-size: 17px; font-weight: 700; color: var(--warm9); font-family: var(--font-display); }
.header-right-text { font-size: 12px; color: var(--warm5); font-weight: 500; }
.header-badge {
    background: var(--teal-light); border: 1px solid var(--teal-mid);
    border-radius: var(--radius-xs); padding: 6px 12px;
    font-size: 12px; font-weight: 700; color: var(--teal);
}
.btn-header-pdf {
    display: flex; align-items: center; gap: 6px;
    background: var(--teal); border: none; border-radius: 10px;
    padding: 8px 14px; font-size: 12.5px; font-weight: 700; color: #fff;
    box-shadow: 0 2px 10px rgba(13,148,136,0.28); transition: background 0.2s;
}
.btn-header-pdf:hover { background: var(--teal-dark); }
.btn-header-pdf:disabled { background: #94a3b8; cursor: wait; }
.btn-header-pdf .spinner {
    width: 13px; height: 13px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

/* ── Disclaimer Footer ── */
.disclaimer-footer {
    padding: 10px 20px 12px;
    background: rgba(250,248,245,0.97);
    border-top: 1px solid var(--border);
    font-size: 10px; color: #a8a29e; line-height: 1.5; text-align: center;
}

/* ── Buttons ── */
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 24px; border-radius: 14px;
    background: var(--green); color: #fff; font-weight: 700; font-size: 16px;
    border: none; box-shadow: 0 4px 16px rgba(22,163,74,0.3);
    transition: all 0.2s; white-space: nowrap;
}
.btn-primary:hover { transform: scale(0.98); }
.btn-primary:disabled { background: #d1d5db; box-shadow: none; cursor: not-allowed; }
.btn-primary.btn-full { width: 100%; }

.btn-secondary {
    padding: 16px; border-radius: 14px; background: transparent;
    border: 1.5px solid var(--border); color: var(--warm9);
    font-weight: 600; font-size: 16px;
}
.btn-white {
    padding: 13px 28px; border-radius: var(--radius-sm);
    background: #fff; color: var(--teal); font-weight: 700; font-size: 15px; border: none;
}
.btn-dashed {
    width: 100%; padding: 14px; border-radius: var(--radius-sm);
    background: transparent; border: 1.5px dashed var(--teal);
    color: var(--teal); font-weight: 600; font-size: 15px;
}
.btn-small-teal {
    padding: 0 24px; border-radius: var(--radius-sm);
    background: var(--teal); color: #fff; font-weight: 600; border: none; font-size: 15px;
    height: 48px;
}
.btn-text { color: var(--warm5); font-size: 14px; background: none; border: none; padding: 0 10px; }
.btn-teal-full {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border-radius: 14px;
    background: var(--teal); color: #fff; font-weight: 700; font-size: 14px;
    border: none; box-shadow: 0 4px 14px rgba(13,148,136,0.28);
}
.btn-teal-outline {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border-radius: 14px;
    background: var(--teal-light); border: 1.5px solid var(--teal-mid);
    color: var(--teal); font-weight: 700; font-size: 14px;
}

/* ── Navigation Buttons (fixed) ── */
.nav-buttons {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, #fff 70%, transparent);
    padding: 16px 20px 24px; display: flex; gap: 12px; z-index: 40;
}
.nav-buttons .btn-secondary { flex: 1; }
.nav-buttons .btn-primary { flex: 2; }

/* ── Sections ── */
.section-pad { padding: 24px 20px; }
.section-break { height: 8px; background: var(--cream-dark); }
.overline { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--teal); margin-bottom: 6px; }
.section-title { font-family: var(--font-display); font-size: 19px; color: var(--warm9); margin-bottom: 18px; }
.centered-header { text-align: center; margin-bottom: 28px; }
.centered-header h1 { font-family: var(--font-display); font-size: 24px; color: var(--warm9); line-height: 1.2; margin: 8px 0; }
.centered-header .sub { font-size: 14.5px; color: var(--warm5); line-height: 1.5; }

/* ── Landing Hero ── */
.landing-hero {
    padding: 24px 20px 22px;
    background: linear-gradient(180deg, var(--teal-light) 0%, #faf7f2 100%);
    border-bottom: 1px solid var(--border);
}
.trust-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 50px;
    background: var(--teal-light); border: 1px solid var(--teal-mid);
    color: var(--teal); font-size: 11.5px; font-weight: 600; margin-bottom: 14px;
}
.landing-hero h1 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; color: var(--warm9); margin-bottom: 10px; }
.gradient-text {
    background: linear-gradient(90deg, #0f766e, #0d9488, #14b8a6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub { font-size: 14px; color: var(--warm7); line-height: 1.55; margin-bottom: 20px; }
.hero-note { font-size: 12px; color: var(--warm5); text-align: center; margin-top: 10px; }

/* ── How It Works ── */
.how-step { display: flex; align-items: flex-start; gap: 14px; }
.step-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.step-icon.teal { background: var(--teal-light); border: 1.5px solid var(--teal-mid); }
.step-icon.orange { background: #fff7ed; border: 1.5px solid #fed7aa; }
.step-icon.green { background: var(--green-light); border: 1.5px solid #bbf7d0; }
.step-content { flex: 1; padding-top: 2px; }
.step-label { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.step-num-badge { font-size: 10px; font-weight: 800; color: var(--warm5); background: var(--cream-dark); border-radius: 4px; padding: 2px 6px; letter-spacing: 0.4px; }
.step-name { font-size: 14.5px; font-weight: 700; color: var(--warm9); font-family: var(--font-display); }
.step-content p { font-size: 13.5px; color: var(--warm5); line-height: 1.5; }
.step-divider { border-bottom: 1px solid var(--border); margin: 14px 0; }

/* ── Benefits ── */
.benefit-list { display: flex; flex-direction: column; }
.benefit-item {
    display: flex; align-items: center; gap: 14px;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.benefit-item.last { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.benefit-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0;
    background: var(--teal-light); border: 1.5px solid var(--teal-mid);
    display: flex; align-items: center; justify-content: center;
}
.benefit-stat { display: block; font-size: 15px; font-weight: 800; color: var(--warm9); font-family: var(--font-display); line-height: 1.1; margin-bottom: 2px; }
.benefit-desc { font-size: 13px; color: var(--warm5); line-height: 1.4; }

/* ── CTA Card ── */
.cta-card {
    background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
    border-radius: 20px; padding: 20px; text-align: center;
}
.cta-title { font-size: 18px; font-weight: 700; color: #fff; font-family: var(--font-display); margin-bottom: 6px; }
.cta-card p { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.5; margin-bottom: 16px; }

/* ── Forms ── */
.form-card {
    background: #fff; border-radius: var(--radius); padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(44,36,22,0.06); border: 1px solid var(--border);
}
.form-group { margin-bottom: 0; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-optional { font-weight: 400; color: var(--warm5); font-size: 12px; }

/* Select Pills */
.select-pills { display: flex; flex-direction: column; gap: 8px; }
.select-pill {
    padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--cream); border: 2px solid var(--border);
    font-size: 14px; color: var(--warm7); cursor: pointer;
    transition: all 0.15s; line-height: 1.4;
}
.select-pill:hover { border-color: var(--teal-mid); }
.select-pill.selected {
    background: var(--teal-light); border-color: var(--teal);
    color: var(--warm9); font-weight: 600;
}
.form-label { font-size: 13px; font-weight: 600; color: var(--warm9); margin-bottom: 8px; display: block; }
.form-help { font-size: 13px; color: var(--warm5); margin-bottom: 16px; line-height: 1.5; }
.form-input {
    width: 100%; padding: 14px 16px; font-size: 18px;
    border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    background: var(--cream); color: var(--warm9); outline: none;
}
.form-input:focus { border: 2px solid var(--teal); }
.form-textarea {
    width: 100%; min-height: 100px; padding: 14px 16px; font-size: 14px;
    border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    background: var(--cream); color: var(--warm9); resize: vertical; outline: none;
}
.form-textarea:focus { border: 2px solid var(--teal); }

/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tag {
    display: flex; align-items: center; gap: 8px;
    background: var(--teal-light); border: 1.5px solid var(--teal-mid);
    padding: 10px 16px; border-radius: 999px; font-size: 15px; color: var(--warm9); font-weight: 500;
}
.tag .remove { cursor: pointer; font-size: 20px; line-height: 1; color: var(--teal); font-weight: 700; }
.add-condition-row { display: flex; gap: 10px; flex-wrap: wrap; }
.add-condition-row .form-input { flex: 1; min-width: 200px; font-size: 16px; padding: 14px 16px; border-color: var(--teal); }

/* ── Privacy Card ── */
.privacy-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 20px; background: #fff; border-radius: var(--radius);
    border: 1.5px solid var(--border); margin-top: 16px;
}
.privacy-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
    background: var(--teal-light); border: 1.5px solid var(--teal-mid);
    display: flex; align-items: center; justify-content: center;
}
.privacy-card strong { display: block; font-size: 14px; color: var(--warm9); margin-bottom: 6px; }
.privacy-card p { font-size: 13px; color: var(--warm5); line-height: 1.65; margin: 0; }

/* ── Room Grid ── */
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.room-card {
    padding: 10px 16px; border-radius: var(--radius); background: #fff;
    border: 2px solid var(--border); text-align: center; cursor: pointer;
    transition: all 0.2s; position: relative;
}
.room-card.selected { border-color: var(--teal); box-shadow: 0 4px 16px rgba(13,148,136,0.15); }
.room-card .room-icon { margin-bottom: 8px; }
.room-card .room-icon svg { stroke: var(--warm3); }
.room-card.selected .room-icon svg { stroke: var(--teal); }
.room-card .room-name { font-size: 15px; font-weight: 600; color: var(--warm9); line-height: 1.3; }
.room-card .check-badge {
    display: none; position: absolute; top: -8px; right: -8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--teal); color: #fff; font-size: 16px;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.room-card.selected .check-badge { display: flex; }

/* ── Photo Upload Cards ── */
.photo-cards { display: flex; flex-direction: column; gap: 14px; }
.photo-card {
    background: #fff; border-radius: 18px; border: 2px solid var(--border);
    overflow: hidden; transition: all 0.25s;
}
.photo-card.uploaded { border-color: var(--teal); box-shadow: 0 4px 16px rgba(13,148,136,0.13); }
.photo-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px 10px; border-bottom: 1px solid var(--border);
}
.photo-card-header .room-icon-sm { width: 34px; height: 34px; border-radius: 10px; background: #f5f3f0; display: flex; align-items: center; justify-content: center; }
.photo-card-header .room-label { font-size: 15px; font-weight: 700; color: var(--warm9); font-family: var(--font-display); }
.photo-card-body {
    padding: 14px; background: var(--cream);
}
.upload-btn-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.upload-opt {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 8px; border-radius: var(--radius-sm);
    background: #fff; border: 2px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--warm7);
    cursor: pointer; transition: all 0.15s;
}
.upload-opt:hover, .upload-opt:active { border-color: var(--teal); background: var(--teal-light); color: var(--teal); }

.photo-thumbs {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px;
}
.photo-thumbs:empty { padding: 0; }
.photo-thumb {
    width: 68px; height: 68px; border-radius: var(--radius-xs);
    overflow: hidden; position: relative; border: 2px solid var(--border);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-remove {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff;
    border: none; font-size: 11px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo-thumb.add-more {
    display: flex; align-items: center; justify-content: center;
    background: var(--cream); border: 2px dashed var(--teal);
    cursor: pointer;
}
.photo-thumb.add-more:hover { background: var(--teal-light); }

.photo-count { font-size: 11px; font-weight: 700; color: var(--green); margin-left: auto; }

.photo-card.uploaded .photo-card-header { border-bottom-color: var(--teal); }
.photo-card.uploaded .upload-opt { border-color: var(--teal-mid); }
.upload-progress-wrap {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 14px; padding: 12px 16px;
    border: 1.5px solid var(--border); margin-bottom: 24px;
}
.upload-progress-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.upload-progress-fill { height: 100%; border-radius: 99px; background: var(--teal); width: 0%; transition: width 0.4s; }
.upload-progress-text { font-size: 13px; font-weight: 700; color: var(--teal); white-space: nowrap; }
.tip-banner {
    display: flex; align-items: flex-start; gap: 10px;
    margin-top: 24px; background: var(--amber-light); border-radius: 14px;
    border: 1.5px solid var(--amber-mid); padding: 13px 16px;
}
.tip-banner span { font-size: 13px; color: #92400e; line-height: 1.55; }

/* Hidden file input */
.hidden-input { display: none; }

/* ── Analyzing Screen ── */
.analyzing-content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 30px; text-align: center; min-height: 70vh; }
.analyzing-spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--teal); animation: spin 1s linear infinite; margin-bottom: 24px; }
.analyzing-content h2 { font-family: var(--font-display); font-size: 22px; color: var(--warm9); margin-bottom: 8px; }
.analyzing-content > p { font-size: 14px; color: var(--warm5); margin-bottom: 20px; }
.analyzing-progress-wrap { width: 100%; max-width: 300px; margin-bottom: 24px; }
.analyzing-progress-bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.analyzing-progress-fill { height: 100%; border-radius: 99px; background: var(--teal); width: 0%; transition: width 0.5s; }
.analyzing-tip {
    font-size: 13px; color: var(--teal); font-weight: 600; line-height: 1.6; max-width: 320px;
    min-height: 20px; transition: opacity 0.3s;
}
.analyzing-screen-note {
    font-size: 11px; color: var(--warm4); margin-top: 16px;
}

/* ══════════════════════════════════════════════════════════
   REPORT STYLES
   ══════════════════════════════════════════════════════════ */

/* Score Hero */
.score-hero {
    margin: 20px 16px 0; padding: 22px 20px; border-radius: 22px;
    background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
    animation: scoreIn 0.5s ease both;
}
.score-hero .overline { color: var(--teal-mid); }
.score-hero-inner { display: flex; align-items: center; gap: 16px; }
.score-hero-left { flex: 1; }
.score-hero-left h2 { font-family: var(--font-display); font-size: 21px; color: #fff; line-height: 1.2; margin-bottom: 12px; }
.score-stats-row { display: flex; gap: 0; }
.score-stat { display: flex; align-items: center; }
.score-stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.2); margin: 0 14px; }
.score-stat-val { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.score-stat-label { font-size: 10px; color: var(--teal-mid); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.score-date { margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.6); }

/* Score Ring (SVG) */
.score-ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.score-ring svg { width: 100%; height: 100%; }
.score-ring-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring-num { font-size: 25px; font-weight: 800; color: #fff; line-height: 1; font-family: var(--font-display); }
.score-ring-label { font-size: 10px; font-weight: 700; color: var(--teal-mid); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 1px; }

/* Tailored Banner */
.tailored-banner {
    margin: 12px 16px 0; background: var(--amber-light);
    border: 1.5px solid var(--amber-mid); border-radius: var(--radius);
    padding: 13px 16px; display: flex; gap: 10px; align-items: flex-start;
}
.tailored-banner .icon { font-size: 20px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.tailored-banner .tag { font-size: 11px; font-weight: 800; color: var(--amber); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.tailored-banner p { font-size: 13px; color: #92400e; line-height: 1.55; margin: 0; }

/* ── Top 3 Priorities ── */
.top3-section {
    margin: 0 16px 16px; background: #fffbeb; border: 1.5px solid #fde68a;
    border-radius: var(--radius-lg); overflow: hidden;
}
.top3-header {
    padding: 12px 16px; font-size: 14px; font-weight: 800; color: #92400e;
    border-bottom: 1px solid #fde68a; background: #fef3c7;
}
.top3-icon { font-size: 16px; }
.top3-list { padding: 8px 12px; }
.top3-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px;
    border-bottom: 1px solid #fef3c7;
}
.top3-item:last-child { border-bottom: none; }
.top3-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: #dc2626; color: #fff; font-size: 13px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.top3-body { flex: 1; }
.top3-title { font-size: 13px; font-weight: 700; color: var(--warm9); line-height: 1.3; }
.top3-room { font-size: 11px; color: var(--warm5); margin-top: 3px; }

/* Priority Pills */
.priority-pills { display: flex; gap: 8px; padding: 14px 16px 0; }
.priority-pill {
    flex: 1; border-radius: var(--radius-sm); padding: 10px 8px; text-align: center;
}
.priority-pill.high { background: var(--red-light); border: 1.5px solid var(--red-mid); }
.priority-pill.med { background: var(--amber-light); border: 1.5px solid var(--amber-mid); }
.priority-pill.low { background: var(--green-light); border: 1.5px solid #bbf7d0; }
.priority-pill .pill-count { font-size: 20px; font-weight: 800; line-height: 1; }
.priority-pill.high .pill-count { color: var(--red); }
.priority-pill.med .pill-count { color: var(--amber); }
.priority-pill.low .pill-count { color: var(--green); }
.priority-pill .pill-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }
.priority-pill.high .pill-label { color: var(--red); }
.priority-pill.med .pill-label { color: var(--amber); }
.priority-pill.low .pill-label { color: var(--green); }

/* Cost Estimate */
.cost-bar {
    margin: 10px 16px 0; background: #fff; border: 1.5px solid var(--border);
    border-radius: 14px; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.cost-bar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--warm7); }
.cost-bar-amount { font-size: 17px; font-weight: 800; color: var(--warm9); }

/* What's Good Section */
.whats-good {
    margin: 12px 0 0; background: var(--green-light);
    border: 1.5px solid #bbf7d0; border-radius: var(--radius); overflow: hidden;
}
.whats-good-header {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px;
    cursor: pointer; user-select: none;
}
.whats-good-header .check-circle {
    width: 28px; height: 28px; border-radius: 50%; background: var(--green);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.whats-good-header .wg-title { font-size: 14px; font-weight: 700; color: var(--green); font-family: var(--font-display); }
.whats-good-header .wg-sub { font-size: 12px; color: #15803d; margin-top: 1px; }
.whats-good-header .wg-chevron { flex-shrink: 0; transition: transform 0.25s; }
.whats-good-header.open .wg-chevron { transform: rotate(180deg); }
.whats-good-body { border-top: 1px solid #bbf7d0; padding: 12px 16px; display: none; }
.whats-good-body.open { display: block; }
.wg-room { margin-bottom: 12px; }
.wg-room:last-child { margin-bottom: 0; }
.wg-room-name { font-size: 13.5px; font-weight: 700; color: #15803d; margin-bottom: 6px; }
.wg-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.wg-item .wg-check { width: 18px; height: 18px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.wg-item span { font-size: 13px; color: #166534; line-height: 1.5; }

/* Finding Cards */
.findings-section { padding: 0 16px; }

/* Additional Observations Section */
.obs-section { margin: 16px 16px 0; background: #eff6ff; border-radius: 18px; border: 2px solid #bfdbfe; overflow: hidden; }
.obs-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.obs-icon { width: 32px; height: 32px; border-radius: 50%; background: #dbeafe; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.obs-title { font-size: 14px; font-weight: 700; color: #1d4ed8; font-family: var(--font-display); }
.obs-sub { font-size: 12px; color: #3b82f6; margin-top: 1px; }
.obs-chevron { flex-shrink: 0; transition: transform 0.25s; }
.obs-header.open .obs-chevron { transform: rotate(180deg); }
.obs-body { border-top: 1px solid #bfdbfe; padding: 12px 16px; display: none; }
.obs-body.open { display: block; }
.obs-room-group { margin-bottom: 12px; }
.obs-room-group:last-child { margin-bottom: 0; }
.obs-room-header { font-size: 13px; font-weight: 700; color: #1d4ed8; margin-bottom: 6px; }
.obs-item { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 5px; }
.obs-bullet { color: #3b82f6; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.obs-text { font-size: 13px; color: #1e3a5f; line-height: 1.5; }

/* Verify In Person Section */
.verify-section { margin: 12px 16px 0; background: #f5f3ff; border-radius: 18px; border: 2px solid #ddd6fe; overflow: hidden; }
.verify-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.verify-icon { width: 32px; height: 32px; border-radius: 50%; background: #ede9fe; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.verify-title { font-size: 14px; font-weight: 700; color: #6d28d9; font-family: var(--font-display); }
.verify-sub { font-size: 12px; color: #7c3aed; margin-top: 1px; }
.verify-chevron { flex-shrink: 0; transition: transform 0.25s; }
.verify-header.open .verify-chevron { transform: rotate(180deg); }
.verify-body { border-top: 1px solid #ddd6fe; padding: 12px 16px; display: none; }
.verify-body.open { display: block; }
.verify-room-group { margin-bottom: 12px; }
.verify-room-group:last-child { margin-bottom: 0; }
.verify-room-header { font-size: 13px; font-weight: 700; color: #6d28d9; margin-bottom: 6px; }
.verify-item { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 5px; }
.verify-bullet { color: #7c3aed; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.verify-text { font-size: 13px; color: #4c1d95; line-height: 1.5; }
.findings-section h3 { font-family: var(--font-display); font-size: 18px; color: var(--warm9); margin: 20px 0 12px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-pill {
    padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 600;
    border: 1.5px solid var(--border); background: #fff; color: var(--warm5);
    cursor: pointer; white-space: nowrap;
}
.filter-pill.active { background: var(--warm9); color: #fff; border-color: var(--warm9); }
.filter-pill.active-high { background: var(--red-light); color: var(--red); border-color: var(--red-mid); }
.filter-pill.active-med { background: var(--amber-light); color: var(--amber); border-color: var(--amber-mid); }
.filter-pill.active-low { background: var(--green-light); color: var(--green); border-color: #bbf7d0; }

.finding-card {
    background: #fff; border-radius: 18px; border: 2px solid var(--border);
    overflow: hidden; margin-bottom: 12px; transition: all 0.2s;
    animation: fadeIn 0.35s ease both;
}
.finding-card.open { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.finding-card.high.open { border-color: var(--red-mid); box-shadow: 0 4px 20px rgba(220,38,38,0.09); }
.finding-card.med.open { border-color: var(--amber-mid); box-shadow: 0 4px 20px rgba(217,119,6,0.09); }
.finding-card.low.open { border-color: #bbf7d0; box-shadow: 0 4px 20px rgba(22,163,74,0.09); }

.finding-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; cursor: pointer; user-select: none; transition: background 0.2s;
}
.finding-card.high.open .finding-header { background: var(--red-light); }
.finding-card.med.open .finding-header { background: var(--amber-light); }
.finding-card.low.open .finding-header { background: var(--green-light); }
.finding-emoji { font-size: 22px; line-height: 1; flex-shrink: 0; width: 34px; text-align: center; }
.finding-meta { flex: 1; min-width: 0; }
.finding-priority { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; }
.finding-priority.high { color: var(--red); }
.finding-priority.med { color: var(--amber); }
.finding-priority.low { color: var(--green); }
.finding-room { font-size: 10px; color: var(--warm5); margin-left: 6px; }
.finding-issue { font-size: 14px; font-weight: 700; color: var(--warm9); line-height: 1.3; font-family: var(--font-display); margin-top: 3px; }
.finding-chevron { flex-shrink: 0; transition: transform 0.25s; }
.finding-card.open .finding-chevron { transform: rotate(180deg); }

.finding-body { display: none; padding: 0 16px 18px; animation: bodyIn 0.22s ease both; }
.finding-card.open .finding-body { display: block; }
.finding-body-divider { height: 1px; margin-bottom: 14px; }
.finding-card.high .finding-body-divider { background: var(--red-mid); }
.finding-card.med .finding-body-divider { background: var(--amber-mid); }
.finding-card.low .finding-body-divider { background: #bbf7d0; }
.finding-detail { font-size: 13.5px; color: var(--warm7); line-height: 1.65; margin-bottom: 14px; }

.fix-box {
    background: var(--teal-light); border-radius: var(--radius-sm);
    padding: 12px 14px; border: 1px solid var(--teal-mid); margin-bottom: 14px;
}
.fix-box-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--teal); margin-bottom: 5px; }
.fix-box p { font-size: 13.5px; color: var(--warm9); line-height: 1.55; margin: 0; }

.product-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--cream); border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 12px;
}
.product-info { flex: 1; min-width: 0; }
.product-label { font-size: 10px; font-weight: 700; color: var(--warm5); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.product-name { font-size: 13px; font-weight: 700; color: var(--warm9); line-height: 1.3; }
.product-tag { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700; color: var(--teal); background: var(--teal-mid); border-radius: 4px; padding: 2px 7px; }
.product-link { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--teal); text-decoration: none; }
.product-link:hover { text-decoration: underline; }
.product-price { font-size: 17px; font-weight: 800; color: var(--warm9); text-align: right; flex-shrink: 0; }
.product-est { font-size: 11px; color: var(--warm5); text-align: right; margin-top: 2px; }

/* ── Email Capture ── */
.email-capture {
    margin: 24px 0 0; border-radius: 22px; overflow: hidden;
    box-shadow: 0 8px 36px rgba(13,148,136,0.16); animation: fadeIn 0.5s ease both;
}
.email-capture-header {
    background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
    padding: 22px 22px 0;
}
.email-capture-header .ec-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.email-capture-header .ec-icon {
    width: 50px; height: 50px; border-radius: 15px;
    background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.28);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 24px;
}
.email-capture-header .ec-free { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.3px; color: var(--teal-mid); margin-bottom: 6px; }
.email-capture-header .ec-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #fff; line-height: 1.35; }
.email-capture-header .ec-pills { display: flex; gap: 6px; padding-bottom: 20px; flex-wrap: wrap; }
.email-capture-header .ec-pill {
    background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22);
    border-radius: 99px; padding: 6px 12px; font-size: 11.5px; font-weight: 600;
    color: rgba(255,255,255,0.92); white-space: nowrap;
}
.email-capture-form { background: #fff; padding: 22px; }
.email-capture-form label { font-size: 13.5px; font-weight: 700; color: var(--warm7); margin-bottom: 10px; display: block; }
.email-capture-form input {
    width: 100%; padding: 16px 18px; font-size: 17px;
    border-radius: 14px; border: 2px solid var(--border);
    background: var(--cream); color: var(--warm9); outline: none; margin-bottom: 14px;
}
.email-capture-form input:focus { border-color: var(--teal); background: var(--teal-light); }
.email-capture-dismiss { text-align: center; margin: 12px 0 16px; }
.email-capture-dismiss button {
    background: none; border: none; font-size: 14px; color: var(--warm5); padding: 4px 12px;
}
.email-capture-privacy {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px; background: var(--cream); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.email-capture-privacy span { font-size: 11.5px; color: var(--warm5); line-height: 1.45; }
.email-capture-sent {
    background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
    padding: 32px 24px; text-align: center;
}

/* ── Save Report Card ── */
.save-card {
    margin-top: 16px; background: #fff; border-radius: 18px;
    border: 1.5px solid var(--border); padding: 20px 18px; text-align: center;
}
.save-card .save-icon { font-size: 28px; margin-bottom: 8px; }
.save-card .save-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--warm9); margin-bottom: 6px; }
.save-card p { font-size: 13px; color: var(--warm5); line-height: 1.55; margin-bottom: 16px; }
.save-card .btn-row { display: flex; gap: 10px; margin-bottom: 10px; }
.save-card .btn-row button { flex: 1; }

/* ── Share Section ── */
.share-section { margin-top: 20px; }
.share-label {
    font-size: 12px; font-weight: 700; color: var(--warm5);
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; text-align: center;
}
.share-btns { display: flex; gap: 10px; }
.share-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 8px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: #fff;
    font-size: 12px; font-weight: 700; color: var(--warm7); cursor: pointer;
    transition: all 0.15s;
}
.share-btn:hover { border-color: var(--teal-mid); background: var(--teal-light); }
.share-fb:hover { border-color: #1877F2; background: #e7f0ff; color: #1877F2; }
.share-x:hover { border-color: #000; background: #f5f5f5; color: #000; }

/* ── Expert Help Button ── */
.expert-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border-radius: 14px;
    background: var(--teal-light); border: 1.5px solid var(--teal-mid);
    color: var(--teal); font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 20px;
}

/* ── Rating Widget ── */
.rating-widget {
    margin: 20px 0 0; background: #fff; border: 1.5px solid var(--border);
    border-radius: 18px; padding: 18px; text-align: center;
}
.rating-widget h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--warm9); margin-bottom: 4px; }
.rating-widget p { font-size: 13px; color: var(--warm5); margin-bottom: 14px; }
.rating-btns { display: flex; gap: 12px; }
.rating-btns button {
    flex: 1; padding: 14px; border-radius: 14px; font-size: 20px;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700;
}
.rating-btns .rate-up { background: var(--green-light); border: 2px solid #bbf7d0; color: var(--green); }
.rating-btns .rate-down { background: var(--red-light); border: 2px solid var(--red-mid); color: var(--red); }

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(28,25,23,0.6); display: flex; align-items: flex-end;
}
.modal-sheet {
    width: 100%; background: #fff;
    border-top-left-radius: 28px; border-top-right-radius: 28px;
    padding: 24px 20px 32px; max-height: 88%; overflow-y: auto;
    animation: slideUp 0.28s ease both;
}
.modal-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--warm3); margin: 0 auto 20px; }

/* ── Responsive ── */
@media (min-width: 640px) {
    .screen-body { max-width: 600px; margin: 0 auto; }
    .nav-buttons { max-width: 600px; margin: 0 auto; left: 50%; transform: translateX(-50%); }
    .score-hero, .tailored-banner, .priority-pills, .cost-bar, .findings-section {
        max-width: 600px; margin-left: auto; margin-right: auto;
    }
}
