/*!
 * ohm-ui-optimizer.css — mobile-first UI normalization + seamless-PWA layer + Verein contribution sheet
 * for all tongue-analysis.com landing pages and the VERA/OHM PWAs (Lebensfluss e.V. /vereinisch).
 *
 * Design tokens mirror the existing suite: gold #d4af37, cyan #00D8FF, ink #0a0a0a.
 */

:root {
  --ohm-gold: #d4af37;
  --ohm-gold-soft: #e8c75a;
  --ohm-cyan: #00d8ff;
  --ohm-teal: #2dd4bf;
  --ohm-ink: #0a0a0a;
  --ohm-ink-2: #0f0f19;
  --ohm-text: #eeeeee;
  --ohm-muted: #9aabbb;
  --ohm-safe-top: env(safe-area-inset-top, 0px);
  --ohm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ohm-safe-left: env(safe-area-inset-left, 0px);
  --ohm-safe-right: env(safe-area-inset-right, 0px);
}

/* ---------- 1. Conservative global mobile-first normalization ---------- */

html {
  -webkit-text-size-adjust: 100%;          /* stop iOS auto-zoom inflating text */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent; /* kill the grey tap flash */
}

/* Never let a stray wide element cause a horizontal scrollbar on phones. */
html, body { overflow-x: clip; }

/* Media should always fit its column on small screens. */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

/* Comfortable, accessible focus ring (keyboard users) without hurting mouse users. */
:focus-visible {
  outline: 2px solid var(--ohm-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Minimum 44x44px touch targets for the common interactive elements only —
   scoped so we don't bloat inline text links. */
@media (pointer: coarse) {
  button,
  a.btn, .btn,
  a.nav-link, .nav-link,
  [role="button"],
  input[type="button"], input[type="submit"] {
    min-height: 44px;
  }
}

/* Honour the device notch / home indicator on the common sticky chrome. */
.nav-header, header.nav-header {
  padding-top: calc(14px + var(--ohm-safe-top));
  padding-left: calc(24px + var(--ohm-safe-left));
  padding-right: calc(24px + var(--ohm-safe-right));
}
footer {
  padding-bottom: calc(40px + var(--ohm-safe-bottom));
}

/* Seamless PWA: when launched standalone, give the body top breathing room for the
   status bar and a touch less hero padding so it feels app-native, not web-in-a-frame. */
@media (display-mode: standalone), (display-mode: fullscreen) {
  body { padding-top: var(--ohm-safe-top); }
  header.hero { padding-top: 28px; }
  /* External-site links are usually noise inside an installed app — soften them. */
  .ohm-hide-in-pwa { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- 2. Verein contribution invite sheet (namespaced .ohm-don*) ---------- */

/* Self-contained sizing: never inherit the host page's box-sizing. */
.ohm-don-overlay, .ohm-don-overlay *, .ohm-don-fab { box-sizing: border-box; }

.ohm-don-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;          /* above app modals, below nothing of ours */
  background: rgba(4, 4, 8, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;        /* bottom-sheet on mobile */
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}
.ohm-don-overlay.ohm-don-in { opacity: 1; }

.ohm-don-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #14141f 0%, var(--ohm-ink-2) 60%, #0b0b12 100%);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + var(--ohm-safe-bottom));
  color: var(--ohm-text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.65);
  transform: translateY(18px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ohm-don-overlay.ohm-don-in .ohm-don-sheet { transform: translateY(0); }

/* Desktop: become a centred card with full rounding. */
@media (min-width: 640px) {
  .ohm-don-overlay { align-items: center; padding: 20px; }
  .ohm-don-sheet { border-radius: 22px; border-bottom: 1px solid rgba(212, 175, 55, 0.32); transform: scale(0.97); padding: 22px 22px 20px; }
  .ohm-don-overlay.ohm-don-in .ohm-don-sheet { transform: scale(1); }
}

.ohm-don-grip {
  width: 40px; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  margin: -6px auto 12px;
}
@media (min-width: 640px) { .ohm-don-grip { display: none; } }

.ohm-don-badge-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.ohm-don-badge {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.55px; color: var(--ohm-gold);
}
.ohm-don-pill {
  font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.52); color: #fde68a; background: rgba(212, 175, 55, 0.12);
  white-space: nowrap;
}

.ohm-don-heart { font-size: 2.1rem; text-align: center; line-height: 1; margin-bottom: 6px; }
.ohm-don-title {
  font-size: 1.24rem; font-weight: 800; text-align: center; margin: 0 0 6px;
  background: linear-gradient(135deg, var(--ohm-gold-soft), #fff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ohm-don-sub { font-size: 0.86rem; color: var(--ohm-muted); text-align: center; line-height: 1.48; margin: 0 auto 14px; max-width: 410px; }

/* Tier picker cards (3 tiers: Year -30%, Month -30%, One-Time Contribution) */
.ohm-don-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 420px) {
  .ohm-don-tiers { grid-template-columns: 1fr; }
}
.ohm-don-tier {
  text-align: left;
  padding: 10px;
  min-height: 70px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.12s ease;
}
.ohm-don-tier:active { transform: scale(0.98); }
.ohm-don-tier.is-active {
  border-color: rgba(212, 175, 55, 0.95);
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.ohm-don-tier-lbl { font-size: 0.7rem; font-weight: 700; color: #fde68a; line-height: 1.25; }
.ohm-don-tier[data-vtier="erstfoerderer_monat"] .ohm-don-tier-lbl { color: #86efac; }
.ohm-don-tier[data-vtier="projektbeitrag"] .ohm-don-tier-lbl { color: #9deaff; }
.ohm-don-tier-val { font-size: 1.04rem; font-weight: 800; margin: 3px 0 2px; color: #fff; }
.ohm-don-tier-val s { font-size: 0.7rem; font-weight: 500; color: #94a3b8; margin-left: 3px; }
.ohm-don-tier-sub { font-size: 0.67rem; color: #b8c7d9; line-height: 1.3; }

/* Conditional one-time contribution amounts (€3 Poster, €10, €15, €25, €50) */
.ohm-don-amts {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ohm-don-amts.is-open { display: flex; }
.ohm-don-amt {
  flex: 1 1 64px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe7f3;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.ohm-don-amt.is-active {
  border-color: var(--ohm-cyan);
  background: rgba(0, 216, 255, 0.16);
  color: #9deaff;
}

.ohm-don-after { margin-top: 8px; }
.ohm-don-after label { display: block; font-size: 0.76rem; color: var(--ohm-muted); margin-bottom: 4px; }
.ohm-don-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; min-height: 44px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: #070c14; color: var(--ohm-text); font-size: 0.88rem;
  margin-bottom: 10px;
}
.ohm-don-input:focus { border-color: var(--ohm-gold); outline: none; }

/* Mandatory non-prechecked Supporting Membership checkbox */
.ohm-don-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  margin-bottom: 11px;
  border-radius: 11px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.74rem;
  line-height: 1.42;
  color: #cfe6ff;
  cursor: pointer;
}
.ohm-don-check input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px; margin-top: 2px;
  accent-color: var(--ohm-gold); cursor: pointer;
}

.ohm-don-cta {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 48px;
  padding: 13px 18px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--ohm-gold), #f5d08a);
  color: #090d14; font-family: inherit; font-weight: 800; font-size: 0.98rem; text-align: center;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.36);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}
.ohm-don-cta:disabled { opacity: 0.6; cursor: wait; }
.ohm-don-cta:active { transform: scale(0.98); }
.ohm-don-cta small { display: block; font-weight: 600; font-size: 0.72rem; opacity: 0.78; margin-top: 2px; }

.ohm-don-msg { font-size: 0.78rem; min-height: 18px; margin-top: 7px; text-align: center; color: var(--ohm-teal); }

/* The "what you get" unlock block */
.ohm-don-unlock {
  margin: 14px 0 6px; padding: 14px;
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 14px;
}
.ohm-don-unlock h4 { margin: 0 0 8px; font-size: 0.92rem; color: var(--ohm-teal); display: flex; align-items: center; gap: 7px; }
.ohm-don-unlock ul { margin: 0; padding-left: 4px; list-style: none; }
.ohm-don-unlock li { font-size: 0.82rem; color: #d6e4e2; line-height: 1.48; padding: 2px 0 2px 22px; position: relative; }
.ohm-don-unlock li::before { content: "\2713"; position: absolute; left: 2px; top: 2px; color: var(--ohm-teal); font-weight: 800; }

.ohm-don-price {
  text-align: center; margin: 12px 0 4px; font-size: 0.84rem; color: var(--ohm-muted);
}
.ohm-don-price strong { color: var(--ohm-gold); font-size: 0.95rem; }

/* Sovereign Tools chips */
.ohm-don-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.ohm-don-chip {
  font-size: 0.72rem; padding: 4px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(212, 175, 55, 0.2);
  color: #d8cba0; white-space: nowrap;
}

/* Roadmap (collapsible) */
.ohm-don-roadmap { margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 10px; }
.ohm-don-roadmap > summary {
  cursor: pointer; list-style: none; font-size: 0.86rem; font-weight: 700; color: var(--ohm-gold);
  display: flex; align-items: center; gap: 7px; padding: 4px 0;
}
.ohm-don-roadmap > summary::-webkit-details-marker { display: none; }
.ohm-don-roadmap > summary::after { content: "\25BE"; margin-left: auto; transition: transform 0.2s ease; color: var(--ohm-muted); }
.ohm-don-roadmap[open] > summary::after { transform: rotate(180deg); }
.ohm-don-rmlist { margin: 8px 0 2px; padding: 0; list-style: none; }
.ohm-don-rmlist li {
  position: relative; padding: 5px 0 9px 22px; font-size: 0.82rem; color: #cdd6de; line-height: 1.42;
  border-left: 1.5px solid rgba(212, 175, 55, 0.25); margin-left: 6px;
}
.ohm-don-rmlist li::before {
  content: ""; position: absolute; left: -5.5px; top: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ohm-ink-2); border: 2px solid var(--ohm-gold);
}
.ohm-don-rmlist li[data-done]::before { background: var(--ohm-teal); border-color: var(--ohm-teal); }
.ohm-don-rmlist li[data-now]::before { background: var(--ohm-gold); border-color: var(--ohm-gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.25); }
.ohm-don-rmlist b { color: #fff; font-weight: 700; }
.ohm-don-rmtag { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ohm-muted); margin-left: 6px; }

.ohm-don-dismiss {
  display: block; width: 100%; margin-top: 8px; padding: 8px; min-height: 44px; border: 0; background: transparent;
  color: #6b7785; font-size: 0.82rem; cursor: pointer;
}
.ohm-don-dismiss:hover { color: #98a4b2; }

/* Tiny persistent contribution pill bottom-right after results appear */
.ohm-don-fab {
  display: none;
  position: fixed; right: 14px; bottom: calc(14px + var(--ohm-safe-bottom)); z-index: 2147482000;
  align-items: center; gap: 6px;
  padding: 10px 15px; border: none; border-radius: 30px; cursor: pointer;
  background: rgba(15, 15, 25, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.38); color: var(--ohm-gold);
  font-family: Inter, system-ui, sans-serif; font-weight: 700; font-size: 0.82rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.ohm-don-fab.ohm-don-fab-visible { display: inline-flex; }
.ohm-don-fab:active { transform: scale(0.96); }
