/* DopaBrain Interactive Wellness Lab Shared Stylesheet
 * 0px mobile overflow (390x844), >=44px touch targets, WCAG AA contrast.
 */
:root {
  --bg-dark: #070b14;
  --bg-card: rgba(16, 24, 42, 0.82);
  --bg-elevated: rgba(24, 35, 58, 0.9);
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #f1f5f9;
  --muted: #a1b0c7;
  --accent: #6366f1;
  --accent-2: #10b981;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --warn: #f59e0b;
  --danger: #f43f5e;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

body.has-bm-sticky {
  padding-bottom: 112px;
}

.skip {
  position: absolute;
  top: -999px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.hero {
  padding: 20px 16px 36px;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 72%);
  border-bottom: 1px solid var(--line-soft);
}

.top-nav {
  max-width: 920px;
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.top-nav a:hover, .top-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
}

.lang-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.lang-picker select {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

.hero-body {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 14px;
  color: #ffffff;
  word-break: break-word;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 20px;
}

.chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  color: #dbe6f5;
}

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  flex: 1;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.panel-head p {
  font-size: 0.95rem;
  color: var(--muted);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* Preset chips & text inputs */
.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.preset-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
}
.preset-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.text-input, .text-area {
  width: 100%;
  background: rgba(9, 13, 24, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color 0.2s;
}
.text-area {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}
.text-input:focus, .text-area:focus {
  outline: none;
  border-color: var(--accent);
}

/* Toggle cards grid (distortions, triggers, scenarios) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toggle-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  word-break: break-word;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.toggle-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}
.toggle-card[aria-pressed="true"],
.toggle-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.toggle-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
}
.toggle-card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Scenario rating rows (0-3) */
.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scenario-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}

.scenario-q {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #f8fafc;
}

.opt-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.opt-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  word-break: break-word;
  transition: all 0.15s;
}
.opt-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
}
.opt-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Action buttons */
.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.primary-btn, .ghost-btn, .story-btn {
  min-height: 48px;
  min-width: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s, background 0.2s, border-color 0.2s;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border: none;
  flex: 1 1 200px;
}
.primary-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.story-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: none;
  flex: 1 1 200px;
}
.story-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}

/* Result & Meters */
.result-card[hidden] {
  display: none;
}

.verdict-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 18px;
}

.verdict-title {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  color: #ffffff;
}

.verdict-desc {
  font-size: 0.98rem;
  color: #cbd5e1;
}

.meter-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.meter-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  min-width: 0;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.35s ease;
}

.callout-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.callout-box h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.callout-box p, .callout-box li {
  font-size: 0.94rem;
  color: #e2e8f0;
}

.callout-box ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.script-quote {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
  color: #ffffff;
  background: rgba(7, 11, 20, 0.65);
  border-left: 4px solid var(--accent-2);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 8px;
  word-break: break-word;
}

/* Timer widget (RSD 90s cool-down) */
.timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  margin-bottom: 18px;
}

.timer-clock {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #34d399;
  font-variant-numeric: tabular-nums;
}

.timer-phase {
  font-size: 0.95rem;
  color: #e2e8f0;
  max-width: 520px;
}

/* Bridges & Education / FAQ */
.bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bridge-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  min-height: 110px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  word-break: break-word;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.bridge-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}
.bridge-card strong {
  font-size: 0.96rem;
  color: #ffffff;
}
.bridge-card span {
  font-size: 0.84rem;
  color: var(--muted);
}

.edu-section {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  min-width: 0;
}
.faq-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}
.faq-card p {
  font-size: 0.88rem;
  color: var(--muted);
}

.references-box, .disclaimer-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.86rem;
  color: var(--muted);
}
.references-box h3, .disclaimer-box strong {
  display: block;
  color: #e2e8f0;
  margin-bottom: 8px;
  font-size: 0.94rem;
}
.references-box ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer {
  text-align: center;
  padding: 24px 16px 36px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.88rem;
}
footer a {
  color: #cbd5e1;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}

.wl-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #052e16;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  max-width: calc(100vw - 32px);
  text-align: center;
}

@media (max-width: 720px) {
  .card-grid,
  .meter-stack,
  .bridge-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .opt-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Therapy-Prep & Personal Journaling Print Stylesheet (50 Wellness Labs) */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .top-nav,
  .lang-picker,
  .action-row,
  .btn-row,
  .revenue-sticky-cta-wrap,
  .curated-resources-card,
  .db-pacer-box,
  .db-next-chain,
  .related-tools,
  .wl-toast,
  .skip {
    display: none !important;
  }
  .panel,
  .card,
  .result-card,
  .script-box,
  .note-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  h1, h2, h3, p, li, strong, span {
    color: #0f172a !important;
  }
}
