/* ═══════════════════════════════════════════════════════════════════
   Envision Appraise — Light Design System
   Premium editorial aesthetic: clean whites, bold typography,
   rich emerald accents, soft depth
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg-base: #ffffff;
  --bg-page: #f8fafb;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-surface-hover: #f8fafc;
  --bg-hero: linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 25%, #f0f9ff 50%, #faf5ff 75%, #fefce8 100%);
  --bg-hero-mesh: radial-gradient(at 20% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                  radial-gradient(at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
                  radial-gradient(at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  --border-subtle: #e2e8f0;
  --border-base: #cbd5e1;
  --border-strong: #94a3b8;
  --border-focus: #10b981;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-muted: #cbd5e1;
  --accent-emerald: #059669;
  --accent-emerald-bright: #10b981;
  --accent-emerald-bg: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  --accent-blue: #2563eb;
  --accent-blue-bg: #eff6ff;
  --accent-blue-border: #bfdbfe;
  --accent-amber: #d97706;
  --accent-amber-bg: #fffbeb;
  --accent-amber-border: #fde68a;
  --accent-violet: #7c3aed;
  --accent-violet-bg: #f5f3ff;
  --accent-violet-border: #ddd6fe;
  --accent-red: #dc2626;
  --accent-red-bg: #fef2f2;
  --accent-red-border: #fecaca;
  --accent-cyan: #0891b2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.06), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-card-hover: 0 8px 25px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.15);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

#app { position: relative; z-index: 1; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

a { color: var(--accent-emerald); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #047857; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding: 3rem 0; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
}

.nav-brand .brand-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-brand span { letter-spacing: -0.02em; }
.nav-brand .brand-suffix { color: var(--text-tertiary); font-weight: 400; font-size: 0.8rem; margin-left: 2px; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
  letter-spacing: 0.04em;
}

.nav-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── Hero / Search ── */
.hero {
  text-align: center;
  padding: clamp(4rem, 10vw, 7rem) 0 3rem;
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-hero-mesh);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 18px 130px 18px 52px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg), 0 0 0 0 transparent;
}

.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus {
  border-color: var(--accent-emerald-bright);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 18px;
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.search-btn:hover { transform: translateY(-50%) scale(1.03); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
.search-btn:active { transform: translateY(-50%) scale(0.97); }
.search-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: translateY(-50%); box-shadow: none; }

.search-hint {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-card);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

/* ── Property Cards Grid ── */
.properties-section {
  padding: 3rem 0 4rem;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.prop-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.prop-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald-bright), var(--accent-blue));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.prop-card:hover::before { opacity: 1; }

.prop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.prop-card-address {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
  margin-right: 12px;
  color: var(--text-primary);
}

.prop-card-city {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.prop-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.prop-card-stat .label { margin-bottom: 5px; display: block; }
.prop-card-stat-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prop-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.prop-card-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.prop-card-delete {
  background: none;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-family: var(--font-mono);
}

.prop-card-delete:hover {
  color: var(--accent-red);
  border-color: var(--accent-red-border);
  background: var(--accent-red-bg);
}

/* ── Status Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-pending { background: var(--accent-amber-bg); color: var(--accent-amber); border: 1px solid var(--accent-amber-border); }
.badge-complete { background: var(--accent-emerald-bg); color: var(--accent-emerald); border: 1px solid var(--accent-emerald-border); }
.badge-error { background: var(--accent-red-bg); color: var(--accent-red); border: 1px solid var(--accent-red-border); }
.badge-processing { background: var(--accent-blue-bg); color: var(--accent-blue); border: 1px solid var(--accent-blue-border); }

/* ── Verdict Signals ── */
.signal-strong-buy { color: #15803d; }
.signal-buy { color: #059669; }
.signal-fair { color: #b45309; }
.signal-overpriced { color: #c2410c; }
.signal-avoid { color: #b91c1c; }

.signal-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.signal-badge.strong-buy { background: #dcfce7; color: #15803d; border: 1px solid #86efac; font-weight: 800; }
.signal-badge.buy { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.signal-badge.fair { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.signal-badge.overpriced { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.signal-badge.avoid { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; font-weight: 800; }

/* ── Property Detail ── */
.detail-header {
  padding: clamp(2rem, 5vw, 3rem) 0 1.5rem;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  font-family: var(--font-body);
}

.detail-back:hover { color: var(--accent-emerald); }

.detail-address {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.25rem;
}

.detail-location {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.detail-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.quick-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-stat .label { margin-bottom: 0; }
.quick-stat-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

/* ── Tabs ── */
.tabs-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 2rem;
  margin-top: 1.5rem;
}

.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
  bottom: -2px;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
  color: var(--accent-emerald);
  border-bottom-color: var(--accent-emerald);
}

.tab-content { animation: fadeIn 350ms ease; }

/* ── Verdict Panel ── */
.verdict-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.verdict-main-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #eff6ff 100%);
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.verdict-main-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.verdict-value-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.verdict-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  position: relative;
}

.verdict-vs {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.verdict-vs strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
}

.verdict-delta {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.verdict-delta.under {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.verdict-delta.over {
  background: var(--accent-red-bg);
  color: var(--accent-red);
  border: 1px solid var(--accent-red-border);
}

.verdict-confidence {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.confidence-meter {
  height: 8px;
  background: var(--bg-surface-alt);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 4px;
  transition: width 1s ease;
}

/* ── Key Findings ── */
.findings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Legacy finding-item (used in layout/finishes tabs) */
.finding-item {
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.finding-item:hover {
  border-color: var(--border-base);
  box-shadow: var(--shadow-sm);
}

/* Bloomberg-style Key Findings */
.findings-intel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finding-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.finding-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.finding-card-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
  width: 20px;
  text-align: center;
}

.finding-card-text { flex: 1; }

.finding-alert {
  background: #fef2f2;
  border-color: #fecaca;
}

.finding-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.finding-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-emerald);
}

.finding-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 1px;
}

/* ── Data Grid ── */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.data-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.data-cell:hover { box-shadow: var(--shadow-sm); }

.data-cell .label { display: block; margin-bottom: 8px; }

.data-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.data-val-sm {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.data-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 5px;
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-subtle);
  background: var(--bg-surface-alt);
}

.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: var(--bg-surface-alt);
}

.data-table .mono-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
}

.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-base) transparent;
}

/* ── Section Titles ── */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.section-title h3 { font-size: 1.1rem; }

.section-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: var(--accent-emerald-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--accent-emerald-border);
}

/* ── Breakdown Bars ── */
.breakdown-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-surface-alt);
  margin: 14px 0 10px;
}

.breakdown-seg {
  height: 100%;
  transition: width 1s ease;
}

.breakdown-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Finishes / Feature List ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.feature-item:hover { background: var(--bg-surface-alt); }

.feature-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.feature-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  max-width: 55%;
}

/* ── Loading State ── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  gap: 1.5rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-emerald-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.loading-sub {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ── Polling Progress ── */
.polling-bar {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99;
  overflow: hidden;
  background: var(--accent-emerald-bg);
}

.polling-bar-inner {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent-emerald-bright), transparent);
  animation: pollSlide 1.5s ease-in-out infinite;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.25;
}

.empty-title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-sub {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* ── Error State ── */
.error-banner {
  background: var(--accent-red-bg);
  border: 1px solid var(--accent-red-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--accent-red);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Source Attribution ── */
.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-surface-alt);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* ── Methodology Footer ── */
.methodology {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.methodology-item .label { display: block; margin-bottom: 5px; }
.methodology-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Color-coded top borders ── */
.border-top-emerald { border-top: 3px solid var(--accent-emerald-bright) !important; }
.border-top-blue { border-top: 3px solid var(--accent-blue) !important; }
.border-top-violet { border-top: 3px solid var(--accent-violet) !important; }
.border-top-amber { border-top: 3px solid var(--accent-amber) !important; }

/* ── Accent-colored cards ── */
.accent-card-emerald {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
}

.accent-card-blue {
  background: var(--accent-blue-bg);
  border-color: var(--accent-blue-border);
}

.accent-card-violet {
  background: var(--accent-violet-bg);
  border-color: var(--accent-violet-border);
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pollSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.animate-in {
  animation: fadeIn 450ms var(--transition-slow) forwards;
  opacity: 0;
}

.animate-in-1 { animation-delay: 60ms; }
.animate-in-2 { animation-delay: 120ms; }
.animate-in-3 { animation-delay: 180ms; }
.animate-in-4 { animation-delay: 240ms; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .verdict-hero { grid-template-columns: 1fr; }
  .detail-quick-stats { gap: 1.25rem; }
  .properties-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .tab-btn { padding: 12px 14px; font-size: 0.65rem; }
  .nav-pill { display: none; }
  .hero { padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
}

@media (max-width: 480px) {
  .prop-card-stats { grid-template-columns: repeat(2, 1fr); }
  .quick-stat-val { font-size: 0.95rem; }
  .verdict-value { font-size: 1.75rem; }
  .detail-quick-stats { padding: 1rem; gap: 1rem; }
}
