@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

/* *, *::before, *::after { box-sizing: border-box; } */

:root {
  --navy:      #0b1f3a;
  --navy2:     #163358;
  --navy-soft: #1e4a7a;
  --teal:      #1a6b5a;
  --teal-soft: #218a72;
  --warm-bg:   #faf8f5;
  --warm-card: #ffffff;
  --warm-mist: #f0ede8;
  --ink:       #0d1b2e;
  --body-text: #1e2d42;
  --muted:     #556070;
  --border:    #c8d0dc;
  --border-strong: #8fa0b5;
  --gold-soft: #fdf3e0;
  --danger:    #9b1c1c;
  --danger-bg: #fde8e8;
  --danger-border: #f5a0a0;
  --shadow-sm: 0 2px 8px rgba(11,31,58,0.08), 0 1px 3px rgba(11,31,58,0.05);
  --shadow-lg: 0 12px 40px rgba(11,31,58,0.13), 0 4px 16px rgba(11,31,58,0.08);
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;

  /* type scale */
  --text-xs:   17px;
  --text-sm:   20px;
  --text-base: 22px;
  --text-md:   26px;
  --text-lg:   32px;
  --text-xl:   42px;
  --text-hero: 68px;
}

html, body { width: 100%; min-height: 100%; }

body {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--body-text);
  background: var(--warm-bg);
  /* background-image: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(26,107,90,0.07) 0%, transparent 55%); */
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.012em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.app {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  /*background: var(--warm-bg);
  margin: 0 -28px;
  padding-left: 28px;
  padding-right: 28px;
  border-bottom: 1.5px solid var(--border);*/
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-shield {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--navy); color: white;
  border-radius: 10px; font-size: 19px; font-weight: 600;
  border: none;
  flex-shrink: 0;
}

.brand > span {
  font-family: 'Lora', serif;
  font-size: 22px; font-weight: 600;
  color: var(--navy); letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.brand {
  min-width: 0;
  flex-shrink: 1;
}

.top-actions {
  flex-shrink: 0;
}

.top-actions { display: flex; align-items: center; gap: 14px; }

.learn-btn {
  height: 40px; padding: 0 20px;
  border: 1.5px solid var(--border-strong); border-radius: 999px;
  background: white; color: var(--navy);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.learn-btn:hover { border-color: var(--navy); background: var(--warm-mist); }

.theme-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--border); border-radius: 50%;
  background: white; color: var(--navy);
  font-size: 17px; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s;
}
.theme-btn:hover { background: var(--warm-mist); }

/* ── MAIN FRAME ─────────────────────────────────────── */
.main-frame {
  background: var(--warm-card);
  /* border: 1.5px solid var(--border); */
  border-radius: var(--r-xl);
  /* box-shadow: var(--shadow-lg); */
  overflow: hidden;
  margin-top: 0;
}

/* ── UPDATED BADGE (shared with page.css) ───────────── */
.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.80);
  margin-bottom: 18px;
}
.updated-badge span { color: #7ee8c8; font-weight: 600; }

/* ── HERO ───────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 52px;
  background: linear-gradient(150deg, #000000 0%, var(--navy) 40%, var(--navy2) 70%, var(--navy-soft) 100%);
  min-height: 220px;
}

.hero-copy h1 {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: white;
}

.hero-copy h1 span { font-style: normal; color: #f6c34d; }

.hero-copy p {
  margin: 18px 0 0;
  font-size: 28px;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
  max-width: 44ch;
}

.privacy-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 24px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.18);
  text-align: center;
  max-width: 190px;
}

.lock-icon {
  font-size: 32px;
  line-height: 1;
}

.privacy-card-label {
  font-size: 17px;
  font-weight: 700;
  color: white;
  line-height: 1.25;
}

.privacy-card-text {
  font-size: 13px;
  color: rgba(255,255,255,0.52);
  line-height: 1.5;
  font-weight: 400;
}

/* ── CONTENT ────────────────────────────────────────── */
.content-area { padding: 44px 52px 56px; }

/* ── INPUT GRID ─────────────────────────────────────── */
.input-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 28px;
<<<<<<< HEAD
  margin-left: -52px;
  margin-right: -52px;
=======
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
}

.input-card {
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: border-color 0.2s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.input-card:focus-within {
  border-color: var(--teal-soft);
  box-shadow: 0 0 0 4px rgba(26,107,90,0.10), var(--shadow-sm);
}

.input-card h2 {
  margin: 0 0 20px;
  font-family: 'Lora', serif;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.textarea-box { position: relative; flex: 1; display: flex; flex-direction: column; }

textarea {
<<<<<<< HEAD
  box-sizing: border-box;
=======
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  width: 100%;
  height: 170px;
  flex: 1;
  display: block; resize: none;
  border: 2px solid var(--border); border-radius: var(--r-sm);
  padding: 16px 16px 42px;
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-base); line-height: 1.7;
  outline: none; background: var(--warm-bg);
  transition: border-color 0.2s, background 0.2s;
  letter-spacing: 0.012em;
}

textarea:focus {
  border-color: var(--teal-soft); background: white;
  box-shadow: 0 0 0 4px rgba(26,107,90,0.08);
}

textarea::placeholder { color: #8a9db5; font-size: var(--text-base); }

#charCount {
  position: absolute; right: 14px; bottom: 13px;
  color: var(--muted); font-size: var(--text-xs); font-weight: 600;
}

.drop-zone {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  flex: 1;
  min-height: 190px;
  border: 3px dashed var(--border); border-radius: var(--r-md);
  background: var(--warm-bg); text-align: center; cursor: pointer;
  padding: 20px;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover { border-color: var(--teal-soft); background: #f0f9f6; }
.drop-zone input { display: none; }

.upload-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: #e4eefb;
  color: var(--navy-soft); font-size: 24px; font-weight: 700;
  border: 1.5px solid #b8cfe8; margin-bottom: 6px;
}

.drop-zone strong { font-size: var(--text-md); font-weight: 700; color: var(--navy); line-height: 1.2; }
.drop-zone span   { font-size: var(--text-sm); color: var(--navy-soft); font-weight: 500; }
.drop-zone small  { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.drop-zone em     { font-style: normal; font-size: var(--text-sm); font-weight: 700; color: var(--teal); margin-top: 4px; }
.drop-zone.drag-over { border-color: var(--teal-soft); background: #e8f7f1; }

.input-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}


/* ── BUTTONS ────────────────────────────────────────── */
.primary-btn {
  flex-shrink: 0; height: 58px; padding: 0 30px; border: none;
  border-radius: var(--r-sm); background: var(--teal); color: white;
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-md); font-weight: 700; cursor: pointer;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}
.primary-btn:hover { background: var(--teal-soft); box-shadow: 0 6px 18px rgba(26,107,90,0.28); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.input-card .primary-btn {
  width: 100%;
  justify-content: center;
}
.primary-btn.blue-btn { background: var(--navy-soft); }
.primary-btn.blue-btn:hover { background: var(--navy2); box-shadow: 0 6px 18px rgba(11,31,58,0.28); }

.primary-btn.loading { position: relative; color: transparent; pointer-events: none; }
.primary-btn.loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.35); border-top-color: white;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.outline-btn {
  width: 100%; height: 52px; margin-top: 16px;
  border: 2px solid var(--border-strong); border-radius: var(--r-sm);
  background: transparent; color: var(--navy);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-sm); font-weight: 700; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.outline-btn:hover { border-color: var(--navy); background: var(--warm-mist); }

/* ── LOADING PANEL ──────────────────────────────────── */
.loading-panel {
  margin-top: 36px;
<<<<<<< HEAD
  margin-left: -52px;
  margin-right: -52px;
=======
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  padding: 48px 40px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  animation: slide-up 0.3s ease;
}

.loading-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 560px;
  margin: 0 auto;
}

.loading-spinner {
  flex-shrink: 0;
  width: 72px; height: 72px;
  color: var(--teal);
  animation: spin 1.1s linear infinite;
}

.loading-spinner svg { width: 100%; height: 100%; display: block; }

.loading-headline {
  margin: 0 0 20px;
  font-family: 'Lora', serif;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.loading-steps { display: flex; flex-direction: column; gap: 14px; }

.loading-step {
  display: flex; align-items: center; gap: 14px;
  font-size: var(--text-sm); color: var(--muted);
  font-weight: 500; transition: color 0.3s;
}

.loading-step.active { color: var(--teal); font-weight: 700; }
.loading-step.done   { color: var(--body-text); }
.loading-step.done .lstep-dot { background: var(--teal); }

.lstep-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
  transition: background 0.3s;
}

.loading-step.active .lstep-dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,107,90,0.20);
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.35); }
}

/* ── RESULTS ────────────────────────────────────────── */
.results-frame {
  margin-top: 36px;
<<<<<<< HEAD
  margin-left: -52px;
  margin-right: -52px;
=======
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  border: 2px solid var(--border); border-radius: var(--r-lg);
  background: white; box-shadow: var(--shadow-sm);
  overflow: hidden; animation: slide-up 0.4s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-title {
  padding: 26px 32px 24px;
  border-bottom: 2px solid var(--border);
  background: var(--warm-mist);
}

.results-title h2 {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: var(--text-xl); font-weight: 600;
  color: var(--navy); letter-spacing: -0.3px;
}

.results-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 2px solid var(--border);
}

.results-right-col {
  display: flex;
  flex-direction: column;
}

.result-card {
  padding: 28px 28px 24px;
}

/* warning card — top right, red left border, bottom divider */
.warning-card {
  border-bottom: 1.5px solid var(--border);
  border-left: 4px solid var(--danger-border);
}

/* what to do card — bottom right, green left border */
.what-to-do-card {
  border-left: 4px solid #a8d8bc;
  flex: 1;
}

.result-card h3 {
  margin: 0 0 18px;
  font-size: var(--text-xs); font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}

.what-to-do-card > h3 {
  color: var(--teal);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

/* score card */
.score-card { background: var(--navy); border-right: 1.5px solid rgba(255,255,255,0.10); display: flex; flex-direction: column; }
.score-card h3 { display: none; }

.score-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 16px 8px;
  flex: 1;
}

.risk-label {
  font-family: 'Lora', serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.01em;
  padding: 16px 24px;
  border-radius: var(--r-md);
  transition: color 0.5s, background 0.5s, border-color 0.5s;
  /* default neutral state */
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.10);
}
.risk-label.low {
  color: #6ee7b7;
  background: rgba(26,92,66,0.22);
  border-color: rgba(52,211,153,0.35);
}
.risk-label.medium {
  color: #fcd34d;
  background: rgba(180,115,9,0.20);
  border-color: rgba(251,191,36,0.35);
}
.risk-label.high {
  color: #fca5a5;
  background: rgba(155,28,28,0.22);
  border-color: rgba(248,113,113,0.35);
}

.risk-badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 0; padding: 10px 18px; border-radius: 999px;
  font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.02em;
}
.risk-badge.high   { background: rgba(155,28,28,0.20); color: #fca5a5; border: 1.5px solid rgba(155,28,28,0.32); }
.risk-badge.medium { background: rgba(180,115,9,0.20);  color: #fcd34d; border: 1.5px solid rgba(180,115,9,0.32); }
.risk-badge.low    { background: rgba(26,92,66,0.22);   color: #6ee7b7; border: 1.5px solid rgba(26,92,66,0.32); }

.gauge-area { min-width: 0; width: 100%; }
.risk-gauge-svg { width: 100%; max-width: 170px; display: block; margin: 0 auto 6px; }
.risk-gauge-svg path { fill: none; stroke-width: 18; stroke-linecap: butt; opacity: 0.8; }
.gauge-low { stroke: #34d399; } .gauge-mid { stroke: #fbbf24; } .gauge-high { stroke: #f87171; }
.risk-gauge-svg line {
  stroke: rgba(255,255,255,0.92); stroke-width: 4; stroke-linecap: round;
  transform-origin: 110px 110px;
  transition: transform 0.8s cubic-bezier(0.34,1.4,0.64,1);
}
.risk-gauge-svg circle { fill: rgba(255,255,255,0.92); }
.gauge-labels { display: flex; justify-content: space-between; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; width: 100%; max-width: 170px; margin: 0 auto; }
.gauge-labels span:first-child { color: #34d399; }
.gauge-labels span:last-child  { color: #f87171; }



/* flags + steps */


.warning-card h3 {
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}



.flag-list, .steps-list { list-style: none; padding: 0; margin: 0; }

.flag-list li, .steps-list li {
  padding: 12px 0; font-size: var(--text-base); line-height: 1.6;
  color: var(--body-text); border-bottom: 1.5px solid var(--border);
  display: flex; align-items: flex-start; gap: 10px;
  letter-spacing: 0.012em;
}
.flag-list li:last-child, .steps-list li:last-child { border-bottom: none; }

.flag-list li::before {
  content: "✕"; color: var(--danger); font-size: 18px;
  font-weight: 700; margin-top: 2px; flex-shrink: 0; line-height: 1;
}

.steps-list li::before {
  content: "✓"; color: var(--teal); font-size: 20px;
  font-weight: 700; margin-top: 1px; flex-shrink: 0; line-height: 1;
}

/* ── FULL ANALYSIS ──────────────────────────────────── */
.full-analysis {
  padding: 32px 32px 36px;
  border-top: 2px solid var(--border); background: var(--warm-bg);
}
.full-analysis.hidden { display: none; }

.full-analysis h3 {
  margin: 0 0 10px;
  font-family: 'Lora', serif; font-size: var(--text-md);
  font-weight: 600; color: var(--navy); letter-spacing: -0.2px;
}

.full-analysis p {
  margin: 0; color: var(--body-text);
  font-size: var(--text-base); line-height: 1.85;
  letter-spacing: 0.012em; width: 100%;
  text-align: justify;
}

#disclaimerText {
  margin-top: 20px !important;
  font-size: var(--text-xs) !important;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}

/* ── BOTTOM CALLOUT ─────────────────────────────────── */
.bottom-callout {
  padding: 22px 32px;
  background: linear-gradient(105deg, var(--navy) 0%, var(--navy-soft) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottom-callout .attribution {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  /* max-width: 62ch; */
  text-align: center;
}



<<<<<<< HEAD
/* ── DARK THEME ─────────────────────────────────────── */
body.dark {
  --warm-bg:       #0f1117;
  --warm-card:     #1a1d27;
  --warm-mist:     #252836;
  --ink:           #f1f5f9;
  --body-text:     #e2e8f0;
  --muted:         #94a3b8;
  --border:        #2d3748;
  --border-strong: #4a5568;
  --gold-soft:     #2d2510;
  --danger-bg:     #2d1515;
  --danger-border: #7f2020;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.25);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.35);
}

/* elements that use hardcoded colors rather than variables */
body.dark .brand > span { color: var(--body-text); }
body.dark .brand-shield { background: var(--warm-mist); color: var(--body-text); }

body.dark .learn-btn {
  background: var(--warm-card);
  color: var(--body-text);
  border-color: var(--border);
}
body.dark .learn-btn:hover { background: var(--warm-mist); border-color: var(--border-strong); }

body.dark .theme-btn { background: var(--warm-card); border-color: var(--border); color: var(--body-text); }
body.dark .theme-btn:hover { background: var(--warm-mist); }

body.dark .input-card { background: var(--warm-card); border-color: var(--border); }

body.dark textarea { background: var(--warm-mist); color: var(--body-text); }
body.dark textarea:focus { background: var(--warm-card); }
body.dark textarea::placeholder { color: var(--muted); }

body.dark .drop-zone { background: var(--warm-mist); border-color: var(--border); }
body.dark .drop-zone:hover { background: var(--warm-card); border-color: var(--border-strong); }
body.dark .drop-zone strong { color: var(--body-text); }
body.dark .drop-zone span   { color: var(--muted); }
body.dark .upload-icon { background: #1e2a3a; border-color: var(--border); color: #7eb8f7; }

body.dark .image-preview-wrap { border-color: var(--border); background: var(--warm-mist); }

body.dark .loading-panel { background: var(--warm-card); border-color: var(--border); }
body.dark .loading-headline { color: var(--body-text); }

body.dark .results-frame { background: var(--warm-card); border-color: var(--border); }
body.dark .results-title { background: var(--warm-mist); border-color: var(--border); }
body.dark .results-title h2 { color: var(--body-text); }

body.dark .result-card { background: var(--warm-card); }
body.dark .result-card h3 { color: var(--muted); }
body.dark .warning-card { border-color: var(--border); border-left-color: #7f2020; }
body.dark .what-to-do-card { border-left-color: #1a5c3a; }
body.dark .flag-list li, body.dark .steps-list li { color: var(--body-text); border-color: var(--border); }

body.dark .what-to-do-box { background: rgba(16,185,129,0.10); color: #6ee7b7; }

body.dark .full-analysis { background: var(--warm-mist); border-color: var(--border); }
body.dark .full-analysis h3 { color: var(--body-text); }
body.dark .full-analysis p  { color: var(--body-text); }

body.dark .full-explanation-bar { background: var(--warm-mist); border-color: var(--border); }
body.dark .full-explanation-btn {
  background: rgba(200,160,0,0.12);
  border-color: rgba(200,160,0,0.28);
  color: #fcd34d;
}
body.dark .full-explanation-btn:hover {
  background: rgba(200,160,0,0.22);
  border-color: rgba(200,160,0,0.5);
  box-shadow: none;
}

body.dark .reassurance-note { background: rgba(26,107,90,0.15); color: #6ee7b7; }

body.dark .clear-image-btn { background: var(--warm-card); color: #fca5a5; border-color: var(--border); }

=======
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
/* ── UTILITY ────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── RESPONSIVE ─────────────────────────────────────────────
   3 tiers:
   Desktop  > 960px  — side-by-side cards, full padding
   Tablet   640–960px — side-by-side cards, tighter padding, smaller type
   Phone    < 640px  — single column, compact type, stacked layout
   ─────────────────────────────────────────────────────────── */

/* ── TABLET (641px – 960px) ─────────────────────────── */
@media (max-width: 960px) {
  :root {
    --text-xs:   15px;
    --text-sm:   17px;
    --text-base: 18px;
    --text-md:   21px;
    --text-lg:   26px;
    --text-xl:   32px;
    --text-hero: 40px;
  }

  .app { padding: 14px 20px 44px; }

  .hero { padding: 36px 32px; gap: 20px; min-height: 200px; }
  .hero-copy p { max-width: 100%; font-size: 22px; }
  .privacy-card { max-width: 260px; padding: 18px 20px; }

  .content-area { padding: 28px 24px 40px; }

  /* keep 2-col input grid on tablet */
<<<<<<< HEAD
  .input-grid { gap: 20px; margin-left: -24px; margin-right: -24px; }
=======
  .input-grid { gap: 20px; }
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  .input-card { padding: 24px; }
  textarea { height: 140px; }
  .drop-zone { min-height: 160px; }

  /* results: 2 col on tablet — score full width, flags+steps side by side */
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
  .results-grid { grid-template-columns: 1fr; }
  .results-right-col { border-top: 1.5px solid var(--border); }
  .score-card {
    border-right: none;
    border-bottom: none;
  }
  .score-content { flex-direction: column; align-items: center; gap: 14px; }
  .result-card { border-right: none; border-bottom: 1.5px solid var(--border); }
  .result-card:last-child { border-bottom: none; }

  .results-title { padding: 20px 24px; }
  .result-card { padding: 22px 22px 20px; }
  .full-analysis { padding: 26px 24px 30px; }
  .bottom-callout { padding: 18px 24px; }

  .loading-inner { gap: 24px; }
<<<<<<< HEAD
  .loading-panel { padding: 36px 28px; margin-left: -24px; margin-right: -24px; }
  .results-frame { margin-left: -24px; margin-right: -24px; }
=======
  .loading-panel { padding: 36px 28px; }
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64

  .brand > span { font-size: 18px; }
  .brand-shield { width: 40px; height: 40px; font-size: 18px; }
  .theme-btn { display: none; }
  .learn-btn { height: 40px; padding: 0 18px; font-size: 15px; }
}

/* ── PHONE (≤ 640px) ────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --text-xs:   14px;
    --text-sm:   16px;
    --text-base: 17px;
    --text-md:   20px;
    --text-lg:   24px;
    --text-xl:   28px;
    --text-hero: 32px;
  }

  .app { padding: 10px 12px 36px; }
  .main-frame { border-radius: var(--r-lg); }

  /* hero stacks vertically on phone */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px 24px;
    gap: 16px;
  }
  .privacy-card { max-width: 100%; width: 100%; }

  .theme-btn { display: none; }
  .topbar { padding-bottom: 12px; }
  .learn-btn {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .brand-shield { width: 34px; height: 34px; font-size: 15px; border-radius: 8px; }
  .brand > span { font-size: 15px; }

  .content-area { padding: 22px 16px 32px; }

  /* single column inputs on phone */
<<<<<<< HEAD
  .input-grid { grid-template-columns: 1fr; gap: 16px; margin-left: -16px; margin-right: -16px; }
=======
  .input-grid { grid-template-columns: 1fr; gap: 16px; }
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  .input-card { padding: 20px 18px; }
  textarea { height: 130px; }
  .drop-zone { min-height: 150px; }
  .primary-btn { height: 56px; }

  /* results single column on phone */
  .results-grid { grid-template-columns: 1fr; }
  .score-card { grid-column: auto; border-bottom: 1.5px solid rgba(255,255,255,0.12); }
  .score-content { flex-direction: column; align-items: center; gap: 12px; }
  .score-number { font-size: 64px; }
  .result-card { border-right: none; border-bottom: 1.5px solid var(--border); }
  .result-card:last-child { border-bottom: none; }

  .results-title { padding: 18px 18px; }
  .result-card { padding: 18px 16px; }
  .full-analysis { padding: 20px 16px 24px; }

  .bottom-callout {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    gap: 14px;
  }
  .bottom-callout button { width: 100%; text-align: center; }

  .loading-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
<<<<<<< HEAD
  .loading-panel { padding: 28px 18px; margin-left: -16px; margin-right: -16px; }
  .results-frame { margin-left: -16px; margin-right: -16px; }
=======
  .loading-panel { padding: 28px 18px; }
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  .loading-spinner { width: 52px; height: 52px; }
}

/* ── WIDE SCREENS (> 1200px) ────────────────────────── */
@media (min-width: 1200px) {
  .app { max-width: 1160px; padding: 24px 40px 72px; }
  .hero { padding: 56px 60px; min-height: 240px; }
  .content-area { padding: 48px 60px 64px; }
<<<<<<< HEAD
  .input-grid { gap: 32px; margin-left: -60px; margin-right: -60px; }
  .loading-panel { margin-left: -60px; margin-right: -60px; }
  .results-frame { margin-left: -60px; margin-right: -60px; }
=======
  .input-grid { gap: 32px; }
>>>>>>> cf949338764075e0aba7cf037bdb8dbcb8efef64
  .results-title { padding: 28px 36px; }
  .result-card { padding: 30px 30px 26px; }
  .full-analysis { padding: 36px 36px 40px; }
  .bottom-callout { padding: 24px 36px; }
}

/* ── FEEDBACK BAR ───────────────────────────────────── */
.feedback-bar {
  display: flex;
  justify-content: center;
  padding: 32px 28px 56px;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 62px;
  padding: 0 36px;
  border-radius: 999px;
  background: var(--safe-bg);
  border: 2px solid #a8d8bc;
  color: var(--teal);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(26,107,90,0.14);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.feedback-btn:hover {
  background: #d4eede;
  border-color: var(--teal-soft);
  box-shadow: 0 6px 24px rgba(26,107,90,0.22);
  transform: translateY(-2px);
}

.feedback-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .feedback-bar { padding: 24px 14px 48px; }
  .feedback-btn { width: 100%; justify-content: center; font-size: var(--text-sm); height: 58px; }
}

/* ── IMAGE PREVIEW ──────────────────────────────────── */
.image-preview-wrap {
  margin-top: 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
  background: var(--warm-bg);
}

.image-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: var(--warm-bg);
}

.clear-image-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 34px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: white;
  color: var(--danger);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(11,31,58,0.10);
}

.clear-image-btn:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}


/* ── FULL EXPLANATION BAR ───────────────────────────── */
.full-explanation-bar {
  padding: 20px 28px;
  border-top: 1.5px solid var(--border);
  background: var(--warm-bg);
  display: flex;
  justify-content: center;
}

.full-explanation-btn {
  width: 100%;
  height: 56px;
  border: 2px solid #e8c84a;
  border-radius: var(--r-sm);
  background: #fdf3d0;
  color: rgb(0 0 0);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.full-explanation-btn:hover {
  border-color: #c8a000;
  background: #fae89a;
  box-shadow: 0 4px 14px rgba(212,160,10,0.22);
}

/* ── REASSURANCE NOTE ───────────────────────────────── */
.reassurance-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--safe-bg);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--teal);
  font-size: var(--text-sm);
  color: var(--safe);
  line-height: 1.55;
  font-style: italic;
}
