/* Scout by Prodig-e — Design System */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #000;
  --surface-0: #000;
  --surface-1: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1c1c1c;
  --surface-4: #242424;
  --border: rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.2);
  --text-primary: #fff;
  --text-secondary: rgba(255,255,255,0.62);
  --text-muted: rgba(255,255,255,0.38);
  --text-dim: rgba(255,255,255,0.2);
  --green: #0e6834;
  --green-600: #0a5228;
  --green-400: #14a352;
  --green-dim: rgba(14,104,52,0.15);
  --yellow: #f5a623;
  --yellow-dim: rgba(245,166,35,0.15);
  --red: #e53935;
  --red-dim: rgba(229,57,53,0.15);
  --blue: #2196f3;
  --blue-dim: rgba(33,150,243,0.15);
  --conf-high: #22c55e;
  --conf-mid: #f5a623;
  --conf-low: #ef4444;
  --font-display: 'Lato', -apple-system, sans-serif;
  --font-ui: 'Inter', -apple-system, sans-serif;
  --px: 1.25rem;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --topbar-h: 56px;
  --bnav-h: 72px;
  --chrome-bg: rgba(0,0,0,0.95);
}

[data-theme="light"] {
  --surface-0: #f5f7fa;
  --surface-1: #eef0f4;
  --surface-2: #ffffff;
  --surface-3: #f0f2f5;
  --surface-4: #e8eaee;
  --border: rgba(0,0,0,0.07);
  --border-md: rgba(0,0,0,0.12);
  --border-strong: rgba(0,0,0,0.20);
  --text-primary: #0f1117;
  --text-secondary: rgba(0,0,0,0.62);
  --text-muted: rgba(0,0,0,0.40);
  --text-dim: rgba(0,0,0,0.20);
  --green-dim: rgba(14,104,52,0.10);
  --yellow-dim: rgba(245,166,35,0.10);
  --red-dim: rgba(229,57,53,0.10);
  --blue-dim: rgba(33,150,243,0.10);
  --chrome-bg: rgba(255,255,255,0.95);
}

html { height: 100%; -webkit-tap-highlight-color: transparent; }
body {
  height: 100%;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app { height: 100%; position: relative; overflow: hidden; }

.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.view--active { opacity: 1; pointer-events: all; }
.hidden { display: none !important; }

/* Splash */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--black);
  gap: 3rem;
}
.splash__logo { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.splash__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: -0.04em;
}
.splash__parent {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-400);
}
.splash__loader {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Onboarding */
.onboarding {
  height: 100%;
  background: var(--surface-0);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.onboarding__header {
  padding: 1.25rem var(--px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.onboarding__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.onboarding__step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.onboarding__body {
  flex: 1;
  padding: 2rem var(--px) 1rem;
  display: flex;
  flex-direction: column;
}
.onboarding__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 0.875rem;
}
.onboarding__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 0.875rem;
}
.onboarding__sub {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 340px;
  margin-bottom: 2rem;
}
.onboarding__options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}
.option-card {
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
  background: var(--surface-1);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
  width: 100%;
}
.option-card:hover { border-color: var(--green); }
.option-card--selected {
  border-color: var(--green);
  background: var(--green-dim);
}
.option-card__icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.option-card__content { flex: 1; }
.option-card__label {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}
.option-card__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.onboarding__footer {
  padding: 1rem var(--px) calc(1.25rem + env(safe-area-inset-bottom));
}
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.125rem;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: var(--surface-4);
  transition: width 0.2s, background 0.2s;
}
.dot--active { width: 18px; background: var(--green); }

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--chrome-bg);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  gap: 0.375rem;
}
.topbar__back {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  flex: 1;
}
.topbar__right { display: flex; align-items: center; gap: 0.25rem; }
.topbar__btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.topbar__btn:hover { background: var(--surface-3); color: var(--text-primary); }

/* Scroll Area */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen {
  min-height: 100%;
  padding-bottom: calc(var(--bnav-h) + 1.5rem + env(safe-area-inset-bottom));
}

/* Bottom Nav */
.bottom-nav {
  height: var(--bnav-h);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: var(--chrome-bg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
  position: sticky;
  bottom: 0;
}
.bnav__item {
  flex: 1;
  height: 100%;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.bnav__item--active { color: var(--green-400); }
.bnav__icon { width: 22px; height: 22px; }
.bnav__cta {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  flex: none;
  gap: 0;
  transition: background 0.15s;
}
.bnav__cta:hover { background: var(--green-400); }
.bnav__cta svg { width: 22px; height: 22px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-appearance: none;
}
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn--primary { background: var(--green); color: #fff; padding: 0.875rem 1.5rem; width: 100%; }
.btn--primary:hover { background: var(--green-400); }
.btn--secondary { background: var(--surface-3); color: var(--text-primary); padding: 0.875rem 1.5rem; width: 100%; }
.btn--secondary:hover { background: var(--surface-4); }
.btn--outline { background: none; border: 1.5px solid var(--border-md); color: var(--text-primary); padding: 0.875rem 1.5rem; width: 100%; }
.btn--outline:hover { border-color: var(--green); color: var(--green-400); }
.btn--ghost { background: none; color: var(--text-secondary); padding: 0.5rem 0.75rem; width: auto; }
.btn--danger { background: var(--red); color: #fff; padding: 0.875rem 1.5rem; width: 100%; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; width: auto; }
.btn--icon { width: 36px; height: 36px; border-radius: var(--radius-full); padding: 0; width: auto; background: var(--surface-3); color: var(--text-secondary); }

/* Cards */
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card--pressable { cursor: pointer; transition: background 0.1s; }
.card--pressable:active { background: var(--surface-2); }

/* Section */
.section { padding: 1.5rem var(--px) 0; }
.section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.875rem; }
.section__title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); }
.section__action { font-size: 0.8125rem; font-weight: 500; color: var(--green-400); background: none; border: none; cursor: pointer; }

/* Form */
.field { margin-bottom: 1.25rem; }
.field__label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.4rem; }
.field__input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  outline: none;
  appearance: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field__input:focus { border-color: var(--green); }
.field__input::placeholder { color: var(--text-dim); }
.field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
textarea.field__input { min-height: 90px; resize: vertical; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--green { background: var(--green-dim); color: var(--green-400); }
.badge--yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge--red { background: var(--red-dim); color: var(--red); }
.badge--blue { background: var(--blue-dim); color: var(--blue); }
.badge--muted { background: var(--surface-3); color: var(--text-secondary); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Divider */
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }
.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1.25rem var(--px) 0.625rem;
}

/* Toasts */
#toasts {
  position: fixed;
  bottom: calc(var(--bnav-h) + 0.75rem + env(safe-area-inset-bottom));
  left: var(--px);
  right: var(--px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}
.toast {
  background: var(--surface-3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  animation: slideUp 0.2s ease;
}
.toast--success { border-left: 3px solid var(--conf-high); }
.toast--error { border-left: 3px solid var(--red); }
.toast--warning { border-left: 3px solid var(--yellow); }
@keyframes slideUp {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  backdrop-filter: blur(4px);
}
#modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 501;
  max-height: 92vh;
  background: var(--surface-1);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border-md);
  overflow-y: auto;
  padding: 1.25rem var(--px) calc(1.5rem + env(safe-area-inset-bottom));
  animation: sheetUp 0.25s ease;
}
@keyframes sheetUp {
  from { transform: translateY(32px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal__handle {
  width: 32px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.modal__title { font-family: var(--font-display); font-weight: 900; font-size: 1.375rem; letter-spacing: -0.03em; margin-bottom: 0.375rem; }
.modal__sub { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.6; }

/* Home */
.home-hero {
  padding: 1.25rem var(--px) 1.5rem;
  border-bottom: 1px solid var(--border);
}
.home-hero__greeting { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.home-hero__title { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 1rem; }
.location-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-full);
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.location-bar:hover { border-color: var(--green); }
.location-bar__icon { color: var(--green-400); flex-shrink: 0; display: flex; }
.location-bar__text { flex: 1; font-size: 0.875rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.location-bar__text--set { color: var(--text-primary); }
.location-bar__env {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--surface-4);
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Weather Widget */
.weather-widget {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
  margin: 1rem var(--px) 0;
}
.weather-widget__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.weather-widget__left {}
.weather-widget__temp { font-family: var(--font-display); font-weight: 900; font-size: 2.25rem; letter-spacing: -0.04em; line-height: 1; }
.weather-widget__unit { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.weather-widget__condition { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.25rem; }
.weather-widget__icon { font-size: 2.5rem; }
.weather-widget__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.weather-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.weather-stat__val { font-size: 0.9rem; font-weight: 600; }
.weather-stat__label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Diagnose CTA */
.diagnose-cta {
  margin: 1rem var(--px) 0;
  background: var(--green);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.diagnose-cta:hover { background: var(--green-400); }
.diagnose-cta__icon {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.diagnose-cta__text { flex: 1; }
.diagnose-cta__title { font-weight: 700; font-size: 0.9375rem; color: #fff; margin-bottom: 0.15rem; }
.diagnose-cta__sub { font-size: 0.8rem; color: rgba(255,255,255,0.75); }
.diagnose-cta__arrow { color: rgba(255,255,255,0.6); flex-shrink: 0; }

/* Timer Card */
.timer-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.timer-card__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }
.timer-card__info { flex: 1; }
.timer-card__product { font-size: 0.875rem; font-weight: 600; }
.timer-card__label { font-size: 0.75rem; color: var(--text-muted); }
.timer-card__time { font-family: var(--font-display); font-weight: 900; font-size: 0.9rem; color: var(--yellow); letter-spacing: -0.02em; }

/* Diagnose Screen */
.env-toggle {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.env-btn {
  flex: 1;
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 0.875rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.env-btn svg { width: 22px; height: 22px; }
.env-btn--active { border-color: var(--green); background: var(--green-dim); color: var(--text-primary); }

.upload-zone {
  border: 2px dashed var(--border-md);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 1.25rem;
}
.upload-zone:hover, .upload-zone--drag { border-color: var(--green); background: var(--green-dim); }
.upload-zone__icon { font-size: 2.25rem; margin-bottom: 0.625rem; }
.upload-zone__title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.upload-zone__sub { font-size: 0.8125rem; color: var(--text-secondary); }

.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; margin-bottom: 1.25rem; }
.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb__rm {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
}

/* Diagnosis Result */
.diag-header {
  padding: 1.5rem var(--px) 1.25rem;
  border-bottom: 1px solid var(--border);
}
.diag-header__eyebrow { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.diag-header__issue { font-family: var(--font-display); font-weight: 900; font-size: 2rem; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 0.2rem; }
.diag-header__scientific { font-size: 0.8125rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }
.conf-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.conf-bar__track { flex: 1; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.conf-bar__fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.conf-bar__fill--high { background: var(--conf-high); }
.conf-bar__fill--mid { background: var(--conf-mid); }
.conf-bar__fill--low { background: var(--conf-low); }
.conf-bar__label { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.conf-bar__label--high { color: var(--conf-high); }
.conf-bar__label--mid { color: var(--conf-mid); }
.conf-bar__label--low { color: var(--conf-low); }
.diag-header__desc { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.65; }
.severity-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.875rem; }
.sev-badge { padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.sev-badge--mild { background: var(--green-dim); color: var(--green-400); }
.sev-badge--moderate { background: var(--yellow-dim); color: var(--yellow); }
.sev-badge--severe { background: var(--red-dim); color: var(--red); }

.differential {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem var(--px);
  border-bottom: 1px solid var(--border);
}
.differential:last-child { border-bottom: none; }
.differential__name { font-size: 0.9375rem; font-weight: 500; }
.differential__factor { font-size: 0.8rem; color: var(--text-muted); }
.differential__conf { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem var(--px);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.tip-item:last-child { border-bottom: none; }
.tip-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Recommendation Cards */
.rec-card {
  margin: 0 var(--px) 0.875rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.rec-card--top { border-color: var(--green); }
.rec-card__head {
  padding: 0.875rem 1.125rem;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.rec-card__rank {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1.5px solid var(--green);
  color: var(--green-400);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rec-card__name { font-weight: 700; font-size: 0.9375rem; flex: 1; }
.rec-card__score { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; }
.rec-card__body { padding: 0.875rem 1.125rem; }
.rec-card__verdict {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  padding: 0.75rem 0.875rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green);
  margin-bottom: 0.875rem;
}
.rec-card__window {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}
.rec-card__window svg { color: var(--green-400); flex-shrink: 0; }
.rec-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--yellow);
  line-height: 1.5;
  margin-top: 0.4rem;
}
.rec-warning svg { flex-shrink: 0; margin-top: 0.1rem; }

/* Product Cards */
.product-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem var(--px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.product-row:last-child { border-bottom: none; }
.product-row:active { background: var(--surface-2); }
.product-row__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.product-row__info { flex: 1; min-width: 0; }
.product-row__name { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.15rem; }
.product-row__cat { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.product-row__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.product-row__right { text-align: right; flex-shrink: 0; }
.product-row__score { font-size: 0.875rem; font-weight: 700; }
.score--green { color: var(--conf-high); }
.score--yellow { color: var(--conf-mid); }
.score--red { color: var(--conf-low); }
.score--na { color: var(--text-muted); }

/* Chip Scroll */
.chip-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 var(--px) 0.75rem;
  scrollbar-width: none;
}
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1.5px solid var(--border-md);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip--active { border-color: var(--green); background: var(--green-dim); color: var(--text-primary); }

/* Site Cards */
.site-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
  margin-bottom: 0.625rem;
  cursor: pointer;
  transition: background 0.1s, border-color 0.15s;
}
.site-card:active { background: var(--surface-2); }
.site-card__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.625rem; }
.site-card__name { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.15rem; }
.site-card__address { font-size: 0.8rem; color: var(--text-muted); }
.site-card__env-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.site-card__stats { display: flex; gap: 1.5rem; }
.site-stat__val { font-size: 1rem; font-weight: 700; }
.site-stat__label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }

/* Log Items */
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem var(--px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.log-item:active { background: var(--surface-1); }
.log-item__date { text-align: center; flex-shrink: 0; width: 38px; }
.log-item__day { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1; }
.log-item__mon { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.log-item__info { flex: 1; }
.log-item__product { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.15rem; }
.log-item__site { font-size: 0.8125rem; color: var(--text-muted); }

/* Settings */
.settings-group { margin-bottom: 1.5rem; }
.settings-group__label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); padding: 0 var(--px); margin-bottom: 0.375rem; }
.settings-list { background: var(--surface-1); border: 1px solid var(--border); }
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem var(--px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: var(--surface-2); }
.settings-item__left { display: flex; align-items: center; gap: 0.75rem; }
.settings-item__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.settings-item__title { font-size: 0.9375rem; font-weight: 500; }
.settings-item__sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }
.settings-item__right { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.875rem; }
.settings-chevron { color: var(--text-dim); }

/* Toggle */
.toggle {
  width: 42px; height: 24px;
  border-radius: 12px;
  background: var(--surface-4);
  border: 1px solid var(--border-md);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}
.toggle--on { background: var(--green); border-color: var(--green); }
.toggle--on::after { transform: translateX(18px); background: #fff; }

/* Compliance Mode Banner */
.mode-banner {
  margin: 0 var(--px) 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}
.mode-banner--personal { background: var(--blue-dim); border: 1px solid rgba(33,150,243,0.2); }
.mode-banner--professional { background: var(--green-dim); border: 1px solid rgba(14,104,52,0.25); }
.mode-banner--quebec_certified { background: var(--yellow-dim); border: 1px solid rgba(245,166,35,0.2); }
.mode-banner__icon { font-size: 1rem; flex-shrink: 0; }
.mode-banner__mode { font-weight: 600; }
.mode-banner__desc { color: var(--text-secondary); margin-top: 0.1rem; }

/* Loading & Empty */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  gap: 0.875rem;
}
.loading__spinner {
  width: 26px; height: 26px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading__text { font-size: 0.9375rem; color: var(--text-muted); }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 2rem;
  gap: 0.75rem;
}
.empty__icon { font-size: 2.75rem; }
.empty__title { font-weight: 700; font-size: 1.0625rem; }
.empty__sub { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; max-width: 280px; }

/* Compliance Checklist */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem var(--px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.checklist-item:last-child { border-bottom: none; }
.check-box {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.check-box--on { border-color: var(--green); background: var(--green); }
.checklist-item__label { font-size: 0.9375rem; flex: 1; }
.checklist-item--done .checklist-item__label { text-decoration: line-through; color: var(--text-muted); }

/* REI/PHI bar */
.rei-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.rei-bar:last-child { border-bottom: none; }
.rei-bar__label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); min-width: 34px; }
.rei-bar__track { flex: 1; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.rei-bar__fill { height: 100%; border-radius: 2px; background: var(--yellow); }
.rei-bar__fill--expired { background: var(--conf-low); }
.rei-bar__time { font-size: 0.8125rem; font-weight: 600; min-width: 58px; text-align: right; }

/* Log Form */
.form-section { padding: 1.25rem var(--px); border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: none; }
.form-section__title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }

/* Soil CTA (secondary, on Home) */
.soil-cta { background: var(--surface-2); border: 1px solid var(--border); }
.soil-cta:hover { background: var(--surface-3); }
.soil-cta .diagnose-cta__icon { background: var(--green-dim); color: var(--green-400); }
.soil-cta .diagnose-cta__title { color: var(--text-primary); }
.soil-cta .diagnose-cta__sub { color: var(--text-muted); }
.soil-cta .diagnose-cta__arrow { color: var(--text-muted); }

/* Soil Guide */
.soil-caveat {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.soil-caveat svg { flex-shrink: 0; margin-top: 0.1rem; }

.soil-card { overflow: hidden; }
.soil-card__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.soil-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.soil-card__heading { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.soil-card__title { font-weight: 600; font-size: 0.95rem; }
.soil-card__summary { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.soil-card__chev { flex-shrink: 0; color: var(--text-muted); transition: transform 0.2s ease; }
.soil-card--open .soil-card__chev { transform: rotate(90deg); }
.soil-card__body { display: none; padding: 0 1rem 0.5rem; }
.soil-card--open .soil-card__body { display: block; }
.soil-detail { padding: 0.75rem 0; border-top: 1px solid var(--border); }
.soil-detail__label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
.soil-detail__text { font-size: 0.875rem; line-height: 1.6; color: var(--text-secondary); }

@media (min-width: 480px) { :root { --px: 1.5rem; } }
@media (min-width: 768px) {
  #view-app { max-width: 480px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
