/* Salt Check — brand-matched to The Integrative Cardiologist / drazhak.com
   Palette: cream #FAF7F2, crimson #6B1F1F, sage #8AAE6B, gold #D4952A, charcoal #2B2F33
   Type: Cormorant Garamond for display, Inter for body & UI
*/

:root {
  /* Type scale — larger than typical for elderly readability */
  --text-xs: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  --text-sm: clamp(0.9375rem, 0.875rem + 0.35vw, 1.0625rem);
  --text-base: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem); /* 17-19px */
  --text-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.625rem, 1.4rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2.25rem, 1.6rem + 2.5vw, 3.25rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Brand colors */
  --cream: #faf7f2;
  --cream-2: #fdfbf7;
  --cream-warm: #f2ede3;
  --crimson: #6b1f1f;
  --crimson-bright: #c41e3a;
  --sage: #8aae6b;
  --sage-deep: #5e8347;
  --gold: #d4952a;
  --charcoal: #2b2f33;
  --charcoal-muted: #575c62;
  --charcoal-faint: #9a9ea2;
  --border: #e3ddd0;

  /* Traffic light — clinically clear */
  --green-bg: #e8f0dc;
  --green-fg: #3c6420;
  --green-border: #9ec377;
  --yellow-bg: #fbeecf;
  --yellow-fg: #8a5b00;
  --yellow-border: #e5c470;
  --red-bg: #f7dedc;
  --red-fg: #8f1c1c;
  --red-border: #d68680;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(43, 47, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(107, 31, 31, 0.08);
  --shadow-lg: 0 20px 48px rgba(107, 31, 31, 0.12);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* --- Header ---------------------------------------------------------------- */
.site-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 1160px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--crimson);
}

/* Language toggle in header */
.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: #FFF;
  flex-shrink: 0;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.lang-btn[aria-pressed="true"] {
  background: var(--crimson);
  color: #FFF;
}

.lang-btn:not([aria-pressed="true"]):hover {
  background: rgba(107, 31, 31, 0.08);
  color: var(--crimson);
}

.brand-mark-img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-line-1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--crimson);
  letter-spacing: 0.01em;
}

.brand-line-2 {
  font-size: 0.85rem;
  color: var(--charcoal-muted);
  letter-spacing: 0.02em;
}

/* --- Container ------------------------------------------------------------- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5) var(--space-16);
}

/* --- Hero ------------------------------------------------------------------ */
.hero {
  text-align: center;
  margin-bottom: var(--space-8);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--crimson);
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: var(--space-4);
}

.hero .lede {
  font-size: var(--text-lg);
  color: var(--charcoal-muted);
  max-width: 34ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.hero .lede strong {
  color: var(--charcoal);
  font-weight: 600;
}

/* --- Scan card ------------------------------------------------------------- */
.scan-card {
  background: var(--cream-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-md);
}

.upload-zone {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

.upload-idle {
  padding: var(--space-4) 0;
}

.camera-icon {
  width: 64px;
  height: 64px;
  color: var(--crimson);
  margin: 0 auto var(--space-4);
  opacity: 0.85;
}

.upload-primary {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.upload-secondary {
  color: var(--charcoal-muted);
  margin-bottom: var(--space-6);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  min-height: 52px;
  min-width: 180px;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--crimson);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #571818;
}

.btn-secondary {
  background: transparent;
  color: var(--crimson);
  border-color: var(--crimson);
}

.btn-secondary:hover {
  background: rgba(107, 31, 31, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal-muted);
  border-color: var(--border);
  min-height: 44px;
  min-width: 0;
  padding: var(--space-3) var(--space-5);
  font-size: 0.95rem;
}

.btn-ghost:hover {
  color: var(--charcoal);
  border-color: var(--charcoal-faint);
}

/* Preview */
.upload-preview img {
  max-height: 320px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 0 auto var(--space-4);
  border: 1px solid var(--border);
}

.upload-preview-actions {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

/* --- Post-photo chooser (shown after a file is picked) --------------------- */
.post-photo-chooser {
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  text-align: center;
}

.chooser-prompt {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--crimson);
  margin: 0 0 var(--space-4);
}

.mode-select-inline {
  margin: 0 auto var(--space-4);
}

.chooser-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
}

.chooser-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Loading */
.upload-loading p {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-top: var(--space-4);
}

.upload-loading-hint {
  font-size: 0.95rem !important;
  color: var(--charcoal-muted) !important;
  margin-top: var(--space-1) !important;
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 3px solid var(--cream-warm);
  border-top-color: var(--crimson);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* Tips */
.tips {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--cream-warm);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--charcoal-muted);
  text-align: center;
}

.tips strong {
  color: var(--charcoal);
}

/* --- Results --------------------------------------------------------------- */
.results {
  margin-top: var(--space-8);
  animation: slide-in 0.3s ease-out;
}

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

.verdict-card {
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6);
  border: 2px solid;
  text-align: center;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

@media (max-width: 600px) {
  .verdict-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
}

.verdict-card.green {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green-fg);
}

.verdict-card.yellow {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  color: var(--yellow-fg);
}

.verdict-card.red {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red-fg);
}

.verdict-card.unknown {
  background: var(--cream-warm);
  border-color: var(--border);
  color: var(--charcoal);
}

/* --- Mode select ----------------------------------------------------------- */
.mode-select {
  max-width: 720px;
  margin: 0 auto var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 560px) {
  .mode-select { grid-template-columns: 1fr; }
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-5);
  background: var(--cream-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  color: var(--charcoal);
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}

.mode-card:hover {
  border-color: var(--crimson);
}

.mode-card[aria-pressed="true"] {
  border-color: var(--crimson);
  background: #FFF;
  box-shadow: 0 2px 8px rgba(107, 31, 31, 0.08);
}

.mode-icon {
  width: 34px;
  height: 34px;
  color: var(--crimson);
  flex-shrink: 0;
}

.mode-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--crimson);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.mode-sub {
  font-size: 0.92rem;
  color: var(--charcoal-muted);
  line-height: 1.35;
}

.mode-badge {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #FFF;
}

/* --- Meal source chips ----------------------------------------------------- */
.meal-source {
  max-width: 720px;
  margin: 0 auto var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--cream-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.meal-source-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--crimson);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.meal-source-label.flash {
  animation: source-flash 0.9s ease-out;
}

@keyframes source-flash {
  0% { background: transparent; }
  30% { background: rgba(212, 149, 42, 0.22); }
  100% { background: transparent; }
}

.source-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.source-chip {
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--border);
  background: #FFF;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.source-chip:hover {
  border-color: var(--crimson);
}

.source-chip.selected,
.source-chip[aria-checked="true"] {
  background: var(--crimson);
  color: #FFF;
  border-color: var(--crimson);
}

.meal-source-hint {
  font-size: 0.88rem;
  color: var(--charcoal-muted);
  line-height: 1.45;
  margin: 0;
}

/* --- Estimate banner ------------------------------------------------------- */
.estimate-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(212, 149, 42, 0.12);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: var(--space-4);
  font-size: 0.92rem;
  line-height: 1.4;
}

.estimate-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: #FFF;
}

.estimate-note {
  color: var(--charcoal);
}

.how-estimated {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.02);
  border-left: 2px solid var(--charcoal-faint);
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 4px;
}

.components-line {
  margin-top: var(--space-3);
  font-size: 0.92rem;
  color: var(--charcoal-muted);
  line-height: 1.5;
}

/* --- Traffic light --------------------------------------------------------- */
.traffic-light {
  flex-shrink: 0;
}

.tl-housing {
  width: 68px;
  padding: 8px;
  background: #1c1f22;
  border-radius: 14px;
  border: 2px solid #0d0f11;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tl-lamp {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2a2d31;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.55),
    inset 0 -1px 2px rgba(255, 255, 255, 0.04);
  transition: background 0.2s, box-shadow 0.2s;
}

/* Lit lamp: solid brand color + soft outer glow */
.tl-lamp.tl-red.lit {
  background: radial-gradient(circle at 35% 30%, #ff6b6b 0%, #d9291f 55%, #8b1414 100%);
  box-shadow:
    0 0 14px 3px rgba(217, 41, 31, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.tl-lamp.tl-yellow.lit {
  background: radial-gradient(circle at 35% 30%, #ffe58a 0%, #e6a919 55%, #8a6510 100%);
  box-shadow:
    0 0 14px 3px rgba(230, 169, 25, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.22),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.tl-lamp.tl-green.lit {
  background: radial-gradient(circle at 35% 30%, #b3e29b 0%, #4a8f3a 55%, #1f5017 100%);
  box-shadow:
    0 0 14px 3px rgba(74, 143, 58, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.verdict-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}

@media (max-width: 600px) {
  .verdict-text {
    text-align: center;
  }
}

.verdict-headline {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.verdict-detail {
  font-size: 1.05rem;
  line-height: 1.5;
  text-wrap: pretty;
  margin: 0;
}

.product-summary {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
}

.product-summary h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3) var(--space-5);
}

.fact-item {
  display: flex;
  flex-direction: column;
}

.fact-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-muted);
  margin-bottom: var(--space-1);
}

.fact-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
}

.fact-value.emphasis {
  color: var(--crimson);
}

/* Swaps */
.swaps {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border-left: 4px solid var(--sage);
}

.swaps h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--sage-deep);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.swaps ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.swaps li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--charcoal);
}

.swaps li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  margin-top: 0.6rem;
}

/* Scan again button */
.scan-again {
  margin-top: var(--space-8);
  text-align: center;
}

/* Error state */
.error-card {
  background: var(--red-bg);
  border: 1.5px solid var(--red-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  color: var(--red-fg);
}

.error-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.error-card p {
  margin-bottom: var(--space-4);
  max-width: 44ch;
  margin-inline: auto;
}

/* --- Disclaimer & footer --------------------------------------------------- */
.disclaimer {
  margin-top: var(--space-10);
  padding: var(--space-5) var(--space-6);
  background: transparent;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--charcoal-muted);
  text-align: center;
}

.disclaimer strong {
  color: var(--charcoal);
}

.site-footer {
  padding: var(--space-7) var(--space-6);
  text-align: center;
  color: var(--charcoal-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.footer-wordmark {
  display: block;
  width: 110px;
  height: 110px;
  margin: 0 auto var(--space-4);
  object-fit: contain;
}

.site-footer a {
  color: var(--crimson);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-fine {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--charcoal-faint);
}

/* --- Modal ----------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 47, 51, 0.6);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  z-index: 100;
  animation: fade-in 0.2s ease-out;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: relative;
  background: var(--cream-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-lg);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  animation: modal-pop 0.25s ease-out;
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--charcoal-muted);
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--cream-warm);
  color: var(--charcoal);
}

.modal-body {
  text-align: center;
}

.modal-mark,
.modal-mark-img {
  width: 68px;
  height: 68px;
  margin: 0 auto var(--space-5);
  display: block;
  object-fit: contain;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--crimson);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.modal-lede {
  color: var(--charcoal-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: var(--space-6);
  max-width: 38ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.modal-lede strong {
  color: var(--charcoal);
  font-weight: 600;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.subscribe-form input[type='email'] {
  width: 100%;
  padding: var(--space-4);
  font-size: 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--charcoal);
  min-height: 52px;
  text-align: center;
}

.subscribe-form input[type='email']:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(107, 31, 31, 0.15);
}

/* Text inputs inside gate share the same treatment as email inputs */
.subscribe-form input[type='text'] {
  width: 100%;
  padding: var(--space-4);
  font-size: 1.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--charcoal);
  min-height: 52px;
  text-align: center;
  text-transform: uppercase;
}

.subscribe-form input[type='text']:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(107, 31, 31, 0.15);
}

/* Gate: OR divider between the code form and the email request button */
.gate-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--charcoal-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.gate-request-btn {
  width: 100%;
}

/* Reveal screen: big legible code block */
.gate-code-display {
  display: inline-block;
  padding: var(--space-4) var(--space-6);
  margin: var(--space-3) auto var(--space-4);
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--crimson);
  background: var(--cream);
  border: 2px dashed var(--crimson);
  border-radius: var(--radius-md);
  user-select: all;
  text-transform: uppercase;
}

.gate-reveal-fineprint {
  font-size: 0.9rem;
  color: var(--charcoal-muted);
  margin: 0 auto var(--space-5);
  max-width: 32ch;
  line-height: 1.5;
}

.subscribe-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.subscribe-actions .btn {
  width: 100%;
  min-width: 0;
}

.subscribe-error {
  color: var(--red-fg);
  font-size: 0.95rem;
  text-align: center;
  margin-top: -0.25rem;
}

.subscribe-fineprint {
  font-size: 0.85rem;
  color: var(--charcoal-faint);
  line-height: 1.5;
  text-wrap: pretty;
  margin-top: var(--space-2);
}

.modal-success-mark {
  width: 68px;
  height: 68px;
  margin: 0 auto var(--space-5);
  display: grid;
  place-items: center;
  background: var(--green-bg);
  border: 2px solid var(--green-border);
  border-radius: 50%;
  color: var(--green-fg);
}

.modal-success .btn {
  min-width: 200px;
  margin-top: var(--space-2);
}

/* --- Mobile tweaks --------------------------------------------------------- */
@media (max-width: 480px) {
  .site-header {
    padding: var(--space-4);
  }
  .brand-line-1 {
    font-size: 1.2rem;
  }
  .container {
    padding: var(--space-6) var(--space-4) var(--space-12);
  }
  .scan-card {
    padding: var(--space-6) var(--space-4);
    border-radius: var(--radius-lg);
  }
  .btn {
    width: 100%;
    min-width: 0;
  }
  .verdict-card {
    padding: var(--space-6) var(--space-4);
  }
  .verdict-headline {
    font-size: 1.75rem;
  }
}
