/* =========================================================
   Abrira — base styles
   =========================================================

   Elevation ladder & contrast table (WCAG AA, Aug 2026 build)
   ─────────────────────────────────────────────────────────────
   Light mode:
     --text-primary  #1c2b4a on --bg-page    #f0ede8  → 12.8:1 ✓
     --text-primary  #1c2b4a on --bg-surface #ffffff  → 14.7:1 ✓
     --text-secondary #4b5166 on --bg-page   #f0ede8  →  6.9:1 ✓
     --text-secondary #4b5166 on --bg-surface #ffffff →  8.0:1 ✓
     --text-muted    #636a7e on --bg-page    #f0ede8  →  4.7:1 ✓  (was failing: old #64687a = 4.4:1 ✗)
     --text-muted    #636a7e on --bg-surface #ffffff  →  5.4:1 ✓
     --accent-fg     #236240 on --bg-page    #f0ede8  →  6.2:1 ✓
     --accent-fg     #236240 on --bg-surface #ffffff  →  7.3:1 ✓
     white text on --accent  #2d7d4f (btn bg)         →  5.1:1 ✓
     --border-emphasis #8d8a83 on --bg-surface #ffffff →  3.4:1 ✓  (UI 3:1; was failing: old #d5d1ca = 1.5:1 ✗)
     --text-secondary on --border-default (disabled)  →  5.3:1 ✓  (was failing: opacity:0.4 ≈ 2.1:1 ✗)
   Dark mode:
     --text-primary  #e2e8f0 on --bg-surface #1e2a3d  → 10.7:1 ✓
     --text-secondary #a8b2c8 on --bg-surface #1e2a3d →  6.8:1 ✓
     --text-muted    #8896b0 on --bg-surface #1e2a3d  →  4.9:1 ✓
     --accent-fg     #4dc98a on --bg-surface #1e2a3d  →  6.2:1 ✓
     white text on --accent  #318254 (btn bg)         →  4.7:1 ✓
     --accent #318254 against --bg-surface #1e2a3d   →  3.0:1 ✓  (UI 3:1 — replaces #3b5bdb blue)
     --border-emphasis #768090 on --bg-surface #1e2a3d → 3.6:1 ✓  (UI 3:1; was failing ✗)
     --text-secondary on --border-default (disabled)  →  4.9:1 ✓
   ─────────────────────────────────────────────────────────────
*/

/* ── Light mode (default) ── */
:root {
  /* Surfaces */
  --bg-page:           #f0ede8;
  --bg-surface:        #ffffff;
  --bg-surface-raised: #f5f3f0;   /* dropzone idle bg, elevated over card */

  /* Borders */
  --border-default:    #d5d1ca;   /* decorative card borders */
  --border-emphasis:   #8d8a83;   /* interactive UI borders — passes 3:1 on white */

  /* Text */
  --text-primary:      #1c2b4a;
  --text-secondary:    #4b5166;
  --text-muted:        #636a7e;   /* lightest text, still passes 4.7:1 on page bg */

  /* Accent — logo green family */
  --accent:            #2d7d4f;   /* button backgrounds (white text 5.1:1 ✓) */
  --accent-hover:      #236240;
  --accent-fg:         #236240;   /* text/icons on light surfaces (6.2:1 on page bg ✓) */
  --accent-bg:         #eef6f1;
  --accent-border:     #b5ddc8;
  --accent-count-bg:   rgba(45, 125, 79, 0.12);

  /* States */
  --error:             #b91c1c;
  --error-bg:          #fef2f2;
  --error-border:      #fca5a5;

  /* Focus rings */
  --focus-ring:        #1c2b4a;
  --focus-ring-inverse: rgba(255, 255, 255, 0.85);   /* on navy header surface */

  /* Header chrome */
  --navy:              #1c2b4a;
  --navy-light:        #2d3f63;

  /* Dropzone states */
  --dropzone-hover-bg: #f5f3f0;
  --dropzone-drag-bg:  #eeedf7;

  /* Tokens */
  --mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius:  10px;
  --shadow:  0 1px 4px rgba(28, 43, 74, 0.08), 0 4px 16px rgba(28, 43, 74, 0.06);

  /* Type scale */
  --text-sm:      0.8125rem;
  --text-base:    1rem;
  --text-lg:      1.125rem;
  --text-xl:      1.375rem;
  --text-display: clamp(1.75rem, 4vw, 2.5rem);
}

/* ── Dark mode ── */
[data-theme="dark"] {
  /* Surfaces */
  --bg-page:           #111827;
  --bg-surface:        #1e2a3d;
  --bg-surface-raised: #243352;

  /* Borders */
  --border-default:    #2a3754;
  --border-emphasis:   #768090;   /* passes 3.6:1 on #1e2a3d ✓ */

  /* Text */
  --text-primary:      #e2e8f0;
  --text-secondary:    #a8b2c8;
  --text-muted:        #8896b0;   /* 4.9:1 on surface ✓ */

  /* Accent — slightly lighter than logo green so button bg passes 3:1 against dark card */
  --accent:            #318254;   /* white text 4.7:1 ✓; vs surface 3.0:1 ✓ */
  --accent-hover:      #27734a;
  --accent-fg:         #4dc98a;   /* text/icons on dark surfaces — 6.2:1 ✓ */
  --accent-bg:         #162c20;
  --accent-border:     #264d36;
  --accent-count-bg:   rgba(77, 201, 138, 0.18);

  /* States */
  --error:             #f87171;
  --error-bg:          #2d1515;
  --error-border:      #7f2020;

  /* Focus rings */
  --focus-ring:        #4dc98a;   /* 9:1 on dark page, 6.2:1 on surface ✓ */

  /* Dropzone states */
  --dropzone-hover-bg: #243352;
  --dropzone-drag-bg:  #1e3154;

  --shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

/* Theme transitions — only fires on subsequent toggles, not the initial paint */
body,
.upload-card,
.results-card,
.error-box,
.site-header {
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Utility ── */
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 0.875em; }
.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;
}

/* ── Header ── */
.site-header {
  background: var(--navy);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0.875rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon { flex-shrink: 0; }
.brand-logo { height: 36px; width: auto; display: block; }

/* Nav links */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover { color: #ffffff; }
.site-nav a:focus-visible {
  outline: 2px solid var(--focus-ring-inverse);
  outline-offset: 3px;
  border-radius: 3px;
  color: #ffffff;
}

/* Theme toggle */
.theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: #ffffff; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--focus-ring-inverse);
  outline-offset: 2px;
  color: #ffffff;
}

/* Icon visibility — CSS-driven, correct before JS loads */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── Hero section ── */
.hero-section {
  padding: 4.5rem 1.5rem 5rem;
}
.hero-wrap {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.hero-text { text-align: center; }
.hero-title {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Upload card ── */
.upload-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed var(--border-emphasis);
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-surface-raised);
  transition: border-color 0.15s, background-color 0.15s;
}
.dropzone:hover {
  border-color: var(--navy-light);
  background-color: var(--dropzone-hover-bg);
}
[data-theme="dark"] .dropzone:hover { border-color: var(--accent-fg); }
.dropzone.drag-over {
  border-color: var(--navy);
  background-color: var(--dropzone-drag-bg);
}
[data-theme="dark"] .dropzone.drag-over { border-color: var(--accent-fg); }

/* Hidden file input — triggered programmatically by Browse button */
.file-input-hidden {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-icon {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.dropzone-label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.dropzone-label .mono { color: var(--accent-fg); }
.dropzone-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.875rem auto;
  max-width: 180px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.dropzone-divider::before,
.dropzone-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

/* Browse button inside dropzone */
.btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-emphasis);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-browse:hover {
  background: var(--bg-page);
  border-color: var(--text-muted);
}
[data-theme="dark"] .btn-browse {
  background: var(--bg-surface-raised);
}
[data-theme="dark"] .btn-browse:hover {
  background: var(--dropzone-hover-bg);
}
.btn-browse:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.dropzone-hint {
  display: block;
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Selected-file display */
.dropzone-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.5rem;
}
.selected-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}
.btn-remove-file {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  width: 22px; height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.12s, color 0.12s, background-color 0.12s;
}
.btn-remove-file:hover {
  border-color: var(--error);
  color: var(--error);
  background-color: var(--error-bg);
}
.btn-remove-file:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 50%;
}

/* ── Error box ── */
.error-box {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  color: var(--error);
  font-size: var(--text-sm);
}
.error-box svg { flex-shrink: 0; margin-top: 1px; }

/* ── Primary button ── */
.btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--navy);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
  min-height: 48px;
}
.btn-primary:hover:not(:disabled) { background: var(--navy-light); }
/* Disabled: explicit muted colors instead of opacity so contrast passes 4.5:1 */
.btn-primary:disabled {
  background: var(--border-default);
  color: var(--text-secondary);
  cursor: not-allowed;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}
/* Dark mode: green accent replaces navy (passes 3:1 against dark card and 4.7:1 for white text) */
[data-theme="dark"] .btn-primary:not(:disabled) { background: var(--accent); }
[data-theme="dark"] .btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

/* ── Secondary button ── */
.btn-secondary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-default);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: border-color 0.15s, background-color 0.15s;
  min-height: 48px;
}
.btn-secondary:hover {
  border-color: var(--border-emphasis);
  background-color: var(--dropzone-hover-bg);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Upload privacy note */
.upload-privacy-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loading { display: flex; align-items: center; gap: 0.5rem; }

/* ── Results card ── */
.results-card {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.results-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.results-icon { color: var(--accent-fg); flex-shrink: 0; }
.results-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--accent-fg);
  margin: 0;
}

/* Summary checklist */
.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.summary-list li {
  font-family: var(--mono);
  font-size: var(--text-sm);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--text-primary);
}
.summary-list li::before {
  content: '✓';
  color: var(--accent-fg);
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--sans);
}
.summary-list li.no-issues::before {
  content: '—';
  color: var(--text-muted);
}
.summary-list li.summary-overflow { display: none; }
.summary-list.expanded li.summary-overflow { display: flex; }

.see-more-btn {
  background: none;
  border: none;
  padding: 0.125rem 0;
  margin-top: 0.125rem;
  color: var(--accent-fg);
  font-family: var(--mono);
  font-size: var(--text-sm);
  cursor: pointer;
  text-align: left;
  text-underline-offset: 2px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}
.see-more-btn:hover { text-decoration-color: var(--accent-fg); }
.see-more-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

.summary-count {
  font-weight: 500;
  background: var(--accent-count-bg);
  color: var(--accent-fg);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

/* ── Rename field ── */
.rename-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.rename-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.rename-input-row {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rename-input-row:focus-within {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(28, 43, 74, 0.12);
}
[data-theme="dark"] .rename-input-row:focus-within {
  border-color: var(--accent-fg);
  box-shadow: 0 0 0 3px rgba(77, 201, 138, 0.18);
}
.rename-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.55rem 0 0.55rem 0.75rem;
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.rename-ext {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.rename-preview {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  min-height: 1.1em;
}

/* Download button */
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: 500;
  transition: background 0.15s;
  min-height: 48px;
  align-self: flex-start;
}
.btn-download:hover { background: var(--accent-hover); }
.btn-download:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.expiry-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.results-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--accent-border);
  padding-top: 1rem;
  line-height: 1.5;
}

/* ── Content sections (below hero) ── */
.content-section {
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--border-default);
}
#how-it-works   { background: var(--bg-page); }
#what-gets-fixed { background: var(--bg-surface); }
#privacy        { background: var(--bg-page); }

/* Scroll offset so sticky header doesn't cover section headings */
#how-it-works,
#what-gets-fixed,
#privacy {
  scroll-margin-top: 60px;
}

.content-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.section-heading {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.section-sub {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 580px;
  line-height: 1.65;
}

/* ── How it works — 3 steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.step { display: flex; flex-direction: column; gap: 0.625rem; }
.step-number {
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent-fg);
  letter-spacing: 0.04em;
}
.step-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}
.step-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── What gets fixed — 2-col grid ── */
.fixes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.fix-item {
  padding: 1.25rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
[data-theme="dark"] .fix-item {
  background: var(--bg-surface-raised);
  border-color: var(--border-default);
}
.fix-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.fix-check {
  color: var(--accent-fg);
  font-weight: 700;
  flex-shrink: 0;
}
.fix-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Privacy section ── */
.privacy-points {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 560px;
}
.privacy-point {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}
.privacy-arrow {
  color: var(--accent-fg);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0.1em;
  font-size: 0.9em;
}

/* ── Prose (privacy policy, long-form pages) ── */
.prose { max-width: 640px; }
.prose h2 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 0.5rem;
}
.prose p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
.prose h2 + p { margin-top: 0; }
.prose-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ── Contact form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 480px;
  margin-top: 2rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.form-input {
  padding: 0.625rem 0.875rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: border-color 0.15s;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(28, 43, 74, 0.12);
}
[data-theme="dark"] .form-input {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}
[data-theme="dark"] .form-input:focus {
  border-color: var(--accent-fg);
  box-shadow: 0 0 0 3px rgba(77, 201, 138, 0.18);
}
textarea.form-input {
  resize: vertical;
  min-height: 148px;
  line-height: 1.65;
}
/* Honeypot — visually hidden, keeps bots from filling the real fields */
.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  color: var(--accent-fg);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.form-success svg { flex-shrink: 0; margin-top: 1px; }

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--text-sm);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a,
.site-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover,
.site-footer a:hover { color: #ffffff; }
.footer-links a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--focus-ring-inverse);
  outline-offset: 2px;
  border-radius: 3px;
  color: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero-section { padding: 3rem 1rem 4rem; }
  .content-section { padding: 3.5rem 1rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .fixes-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .upload-card, .results-card { padding: 1.25rem; }
  .dropzone { padding: 2rem 1rem; }
  .btn-download { align-self: stretch; }
}

@media (max-width: 375px) {
  .hero-title { letter-spacing: -0.02em; }
}
