/* ─────────────────────────────────────────
   DO I HAVE DEPRESSION? — STYLES v2
   Aesthetic: calm editorial. like a really
   thoughtful medical journal that also
   knows how to be human. warm, not sterile.
───────────────────────────────────────── */

/* ── TOKENS ── */
:root {
  --slate:        #2c5f8a;
  --slate-light:  #e8f1f9;
  --slate-mid:    #8ab3d4;
  --slate-dark:   #1a3d5c;
  --slate-deep:   #0e2538;

  --teal:        #1a8c6e;
  --teal-light:  #e2f5ef;
  --teal-mid:    #5dc4a4;
  --teal-dark:   #0d5241;

  --amber:       #b8720f;
  --amber-light: #faf0dc;
  --amber-mid:   #f0be6a;
  --amber-dark:  #5e3600;

  --rust:        #c45830;
  --rust-light:  #faece6;
  --rust-mid:    #ee9a78;
  --rust-dark:   #6b2a0e;

  --red:         #992828;
  --red-light:   #fceaea;
  --red-mid:     #e88888;
  --red-dark:    #6e1c1c;

  --ink:         #1c1a18;
  --ink-2:       #3a3733;
  --ink-muted:   #6b6660;
  --ink-faint:   #9e9893;

  --paper:       #faf8f5;
  --paper-2:     #f3f0ea;
  --paper-3:     #ebe7de;

  --border:      rgba(28,26,24,0.09);
  --border-mid:  rgba(28,26,24,0.16);

  --font-serif:  'Fraunces', Georgia, serif;
  --font-body:   'Karla', system-ui, sans-serif;
  --font-mono:   'Courier New', monospace;

  --radius:      8px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --tr:          0.18s ease;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:         #f0ece5;
    --ink-2:       #c8c3ba;
    --ink-muted:   #9a948c;
    --ink-faint:   #635e58;
    --paper:       #141210;
    --paper-2:     #1c1a17;
    --paper-3:     #252118;
    --border:      rgba(240,236,229,0.08);
    --border-mid:  rgba(240,236,229,0.15);
    --slate-light:  rgba(44,95,138,0.15);
    --teal-light:  rgba(26,140,110,0.13);
    --amber-light: rgba(184,114,15,0.13);
    --rust-light:  rgba(196,88,48,0.13);
    --red-light:   rgba(153,40,40,0.15);
  }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--paper-3);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── LAYOUT ── */
.site-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.main-content { padding: 0 2rem; }
.hidden { display: none !important; }

/* ── ADS ── */
.ad-wrap {
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  gap: 4px;
}
.ad-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.ad-placeholder {
  width: 100%;
  max-width: 320px;
  height: 50px;
  border: 1px dashed var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-faint);
  border-radius: 4px;
  font-family: var(--font-mono);
}
.ad-top .ad-placeholder { max-width: 728px; height: 90px; }
.ad-mid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 24px 0;
  padding: 10px;
}
.ad-mid .ad-placeholder { max-width: 468px; height: 60px; }

/* ── CRISIS BAR ── */
.crisis-bar {
  background: var(--slate-light);
  border-bottom: 1px solid var(--slate-mid);
  padding: 10px 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.crisis-bar-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-dark);
  white-space: nowrap;
}
.crisis-bar-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.crisis-bar-links a {
  font-size: 11px;
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  transition: color var(--tr);
}
.crisis-bar-links a:hover { color: var(--slate-dark); }

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--slate);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 14px; height: 14px; fill: #fff; }
.logo-text {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo-tld { color: var(--slate); }
.header-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ── HERO ── */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 9vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: italic;
  color: var(--slate);
  font-weight: 600;
}
.hero-sub {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.75;
  max-width: 540px;
  font-weight: 300;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

/* ── INTRO BLOCK ── */
.intro-block {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
}
.intro-block p {
  font-size: 14px;
  line-height: 1.82;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  font-weight: 300;
}
.intro-block p:last-of-type { margin-bottom: 0; }
.intro-block strong { font-weight: 500; color: var(--ink); }
.phq-credit {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.65;
}

/* ── QUIZ ── */
.quiz-section { margin-bottom: 2rem; }

.quiz-header {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.quiz-instruction {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 2rem;
  line-height: 1.7;
  font-family: var(--font-mono);
}

/* Progress */
.progress-wrap {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.progress-track {
  height: 3px;
  background: var(--border-mid);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--slate);
  border-radius: 4px;
  transition: width 0.35s ease;
}

/* Question blocks */
.question-block {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 10px;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.question-block:has(.option-btn.selected) {
  border-color: var(--slate-mid);
  box-shadow: 0 2px 12px rgba(44,95,138,0.06);
}
.question-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.question-text {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 1.1rem;
  font-weight: 400;
}

/* Options */
.option-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}
.option-btn {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: border-color var(--tr), background var(--tr), color var(--tr);
  line-height: 1.35;
}
.option-btn:hover {
  border-color: var(--slate-mid);
  background: var(--slate-light);
  color: var(--slate-dark);
}
.option-btn.selected {
  border-color: var(--slate);
  background: var(--slate-light);
  color: var(--slate-dark);
}

.opt-dot {
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mid);
  position: relative;
  transition: background var(--tr), border-color var(--tr);
  flex-shrink: 0;
}
.option-btn.selected .opt-dot {
  background: var(--slate);
  border-color: var(--slate);
}
.option-btn.selected .opt-dot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.opt-label { line-height: 1.35; }

/* Q9 note */
.q9-note {
  margin-top: 1rem;
  background: var(--slate-light);
  border: 1px solid var(--slate-mid);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 12px;
  color: var(--slate-dark);
  line-height: 1.7;
}

/* Submit */
.submit-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 1.1rem;
  background: var(--paper-2);
  color: var(--ink-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: not-allowed;
  transition: background var(--tr), color var(--tr), border-color var(--tr), transform 0.1s;
}
.submit-btn.ready {
  background: var(--slate);
  color: #fff;
  border-color: var(--slate);
  cursor: pointer;
}
.submit-btn.ready:hover { opacity: 0.9; }
.submit-btn.ready:active { transform: scale(0.988); }

/* ── RESULT CARD ── */
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 2rem 0 1.5rem;
  position: relative;
  overflow: hidden;
}
.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.result-card.zone-minimal  { background: var(--teal-light);  border-color: var(--teal-mid); }
.result-card.zone-mild     { background: var(--slate-light); border-color: var(--slate-mid); }
.result-card.zone-moderate { background: var(--amber-light); border-color: var(--amber-mid); }
.result-card.zone-moderately-severe { background: var(--rust-light);  border-color: var(--rust-mid); }
.result-card.zone-severe   { background: var(--red-light);   border-color: var(--red-mid); }

.result-card.zone-minimal::before  { background: var(--teal); }
.result-card.zone-mild::before     { background: var(--slate); }
.result-card.zone-moderate::before { background: var(--amber); }
.result-card.zone-moderately-severe::before { background: var(--rust); }
.result-card.zone-severe::before   { background: var(--red); }

.result-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.zone-minimal .result-title           { color: var(--teal-dark); }
.zone-mild .result-title              { color: var(--slate-dark); }
.zone-moderate .result-title          { color: var(--amber-dark); }
.zone-moderately-severe .result-title { color: var(--rust-dark); }
.zone-severe .result-title            { color: var(--red-dark); }

.result-score {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
}
.result-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 300;
}
.result-guidance {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-weight: 300;
}

/* ── SHARE / SAVE SECTION ── */
.share-section {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 1.5rem 0 2rem;
}
.share-intro { margin-bottom: 1rem; }
.share-intro-heading {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.share-intro-sub {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.65;
  font-weight: 300;
}
.share-text-box {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.save-btns {
  display: flex;
  gap: 8px;
}
.share-btn, .save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 90px;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  background: var(--paper);
  color: var(--ink);
  transition: opacity var(--tr), transform 0.1s;
  justify-content: center;
}
.share-btn:hover, .save-btn:hover { opacity: 0.78; }
.share-btn:active, .save-btn:active { transform: scale(0.97); }

.btn-twitter  { background: #000; color: #fff; border-color: #000; }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.btn-copy     { background: var(--paper-3); color: var(--ink-2); }
.btn-save-txt { background: var(--slate-light); color: var(--slate-dark); border-color: var(--slate-mid); flex: none; }

/* ── CRISIS SECTION ── */
.crisis-section {
  background: var(--slate-light);
  border: 1px solid var(--slate-mid);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin: 2rem 0;
}
.section-header {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.section-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
  font-weight: 300;
}
.crisis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.crisis-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.crisis-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.crisis-number {
  font-size: 15px;
  font-family: var(--font-mono);
  color: var(--slate);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.crisis-desc {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 8px;
}
.crisis-link {
  font-size: 11px;
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── THERAPIST SECTION ── */
.therapist-section { margin: 2rem 0; }
.therapist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.therapist-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color var(--tr);
}
.therapist-card:hover { border-color: var(--slate-mid); }
.therapist-icon { font-size: 22px; display: block; margin-bottom: 7px; }
.therapist-name { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.therapist-region {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 5px;
}
.therapist-desc { font-size: 11px; color: var(--ink-muted); line-height: 1.55; margin-bottom: 8px; }
.therapist-link {
  font-size: 11px;
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── SELF-HELP ── */
.self-help-section { margin: 2rem 0; }
.self-help-list { display: flex; flex-direction: column; gap: 10px; }
.self-help-item {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.sh-title a {
  font-size: 13px;
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.4;
  display: block;
  margin-bottom: 3px;
  font-weight: 500;
}
.sh-source {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 5px;
}
.sh-desc { font-size: 12px; color: var(--ink-muted); line-height: 1.6; }

/* ── INFO STRIP ── */
.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin: 2.5rem 0;
}
.info-card {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.info-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.info-card-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.info-card-body { font-size: 12px; color: var(--ink-muted); line-height: 1.65; }

/* ── FAQ SECTION ── */
.faq-section {
  margin: 0 0 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.faq-heading {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.faq-a { font-size: 13px; color: var(--ink-muted); line-height: 1.78; font-weight: 300; }

/* ── ABOUT SECTION ── */
.about-section {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-bottom: 2.5rem;
}
.about-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.about-body p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
  font-weight: 300;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { font-weight: 500; color: var(--ink); }
.about-body a { color: var(--slate); text-decoration: underline; }

/* ── SISTER SITES ── */
.sister-sites {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
}
.sister-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.sister-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.sister-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--tr);
}
.sister-link:hover { color: var(--slate); }
.sister-sep { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2rem;
}
.footer-disclaimer {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.75;
  font-weight: 300;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  .main-content { padding: 0 1.25rem; }
  .site-header { padding: 1rem 1.25rem; }
  .crisis-bar { padding: 8px 1.25rem; }
  .site-footer { padding: 1.5rem 1.25rem; }
  .option-group { grid-template-columns: 1fr; }
  .crisis-grid, .therapist-grid, .info-strip { grid-template-columns: 1fr; }
  .share-btns { flex-direction: column; }
  .share-btn, .save-btn { flex: none; width: 100%; }
  .header-tag { display: none; }
  .hero { padding: 2.5rem 0 2rem; }
}
