/* TI PTSD Quiz — Frontend CSS v1.0.0 */
:root {
  --tiq-black:  #0a0a0a;
  --tiq-slate:  #1a2d2d;
  --tiq-mid:    #2a4040;
  --tiq-border: rgba(200,160,48,0.25);
  --tiq-gold:   #c8a030;
  --tiq-goldl:  #e0b840;
  --tiq-text:   #f0ede8;
  --tiq-muted:  #a8b8b8;
  --tiq-green:  #3a8a5a;
  --tiq-yellow: #b8860b;
  --tiq-orange: #c85020;
  --tiq-red:    #c83030;
  --tiq-r:      8px;
}

/* ── Wrap & screens ─────────────────────────────────────────────── */
.tiq-wrap { max-width: 760px; margin: 0 auto; font-family: 'Jost','Helvetica Neue',sans-serif; color: var(--tiq-text); }
.tiq-screen { display: none; }
.tiq-screen--active { display: block; }

/* ── Intro screen ───────────────────────────────────────────────── */
.tiq-intro-badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tiq-gold);
  border: 1px solid var(--tiq-border);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.tiq-main-title {
  font-family: 'Cormorant Garamond',Georgia,serif;
  font-size: clamp(1.8rem,4vw,2.8rem);
  font-weight: 300;
  color: var(--tiq-text);
  margin: 0 0 8px;
  line-height: 1.15;
}
.tiq-main-sub {
  color: var(--tiq-muted);
  font-size: 0.92rem;
  margin: 0 0 24px;
}
.tiq-intro-body {
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: var(--tiq-r);
  padding: 20px 24px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: var(--tiq-text);
  line-height: 1.7;
}
.tiq-intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--tiq-muted);
}
.tiq-disclaimer {
  background: rgba(26,45,45,0.6);
  border: 1px solid var(--tiq-border);
  border-left: 3px solid var(--tiq-gold);
  border-radius: 0 var(--tiq-r) var(--tiq-r) 0;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--tiq-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.tiq-disclaimer a { color: var(--tiq-gold); }

/* ── Buttons ────────────────────────────────────────────────────── */
.tiq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Jost',sans-serif;
  font-size: 0.78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--tiq-r);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  font-weight: 500;
}
.tiq-btn--primary {
  background: linear-gradient(135deg, var(--tiq-goldl), var(--tiq-gold));
  color: #0a0a0a;
}
.tiq-btn--primary:hover { transform: translateY(-1px); }
.tiq-btn--primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tiq-btn--gold { background: linear-gradient(135deg, var(--tiq-goldl), var(--tiq-gold)); color: #0a0a0a; font-size: 0.82rem; padding: 16px 32px; }
.tiq-btn--ghost {
  background: transparent;
  border: 1px solid var(--tiq-border);
  color: var(--tiq-muted);
}
.tiq-btn--ghost:hover { border-color: var(--tiq-gold); color: var(--tiq-text); }
.tiq-btn--sm { padding: 10px 18px; font-size: 0.7rem; }

/* ── Progress bar ───────────────────────────────────────────────── */
.tiq-progress-bar {
  height: 3px;
  background: var(--tiq-mid);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}
.tiq-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tiq-goldl), var(--tiq-gold));
  border-radius: 3px;
  transition: width .4s ease;
}
.tiq-progress-label {
  font-size: 0.72rem;
  color: var(--tiq-muted);
  text-align: right;
  margin-bottom: 20px;
}
.tiq-cluster-label {
  font-size: 0.68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tiq-gold);
  margin-bottom: 12px;
  min-height: 1.2em;
  transition: opacity .3s;
}

/* ── Question cards ─────────────────────────────────────────────── */
.tiq-question-stage { position: relative; min-height: 320px; }
.tiq-question {
  display: none;
  animation: tiq-fadein .3s ease;
}
.tiq-question--active { display: block; }
@keyframes tiq-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tiq-q-number {
  font-size: 0.7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tiq-muted);
  margin: 0 0 12px;
}
.tiq-q-text {
  font-family: 'Cormorant Garamond',Georgia,serif;
  font-size: clamp(1.1rem,2.5vw,1.4rem);
  font-weight: 300;
  color: var(--tiq-text);
  line-height: 1.4;
  margin: 0 0 8px;
}
.tiq-q-emphasis { display: block; color: var(--tiq-text); margin-top: 4px; }
.tiq-q-detail {
  font-size: 0.82rem;
  color: var(--tiq-muted);
  margin: 0 0 24px;
  line-height: 1.6;
  font-style: italic;
}

/* ── Scale (5 options) ──────────────────────────────────────────── */
.tiq-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
@media(max-width:520px) {
  .tiq-scale { grid-template-columns: 1fr 1fr; }
  .tiq-scale label:last-child { grid-column: 1 / -1; }
}
.tiq-scale-option { display: block; }
.tiq-scale-option input { display: none; }
.tiq-scale-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: var(--tiq-r);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.tiq-scale-btn:hover { border-color: var(--tiq-gold); background: rgba(200,160,48,0.06); }
.tiq-scale-option input:checked + .tiq-scale-btn {
  border-color: var(--tiq-gold);
  background: rgba(200,160,48,0.12);
}
.tiq-scale-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(200,160,48,0.4);
  transition: all .15s;
  flex-shrink: 0;
}
.tiq-scale-option input:checked + .tiq-scale-btn .tiq-scale-dot {
  background: var(--tiq-gold);
  border-color: var(--tiq-gold);
  box-shadow: 0 0 0 3px rgba(200,160,48,.2);
}
.tiq-scale-label {
  font-size: 0.72rem;
  color: var(--tiq-muted);
  line-height: 1.3;
}
.tiq-scale-option input:checked + .tiq-scale-btn .tiq-scale-label { color: var(--tiq-text); }

/* ── Nav ────────────────────────────────────────────────────────── */
.tiq-nav { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.tiq-anon-note { font-size: 0.72rem; color: rgba(168,184,184,0.5); text-align: center; margin: 0; }

/* ── Lead capture ───────────────────────────────────────────────── */
.tiq-lead-wrap {
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}
.tiq-lead-title { font-family: 'Cormorant Garamond',serif; font-size: 1.8rem; font-weight: 300; margin: 0 0 12px; }
.tiq-lead-sub { color: var(--tiq-muted); font-size: 0.9rem; margin: 0 0 24px; max-width: 480px; margin-left: auto; margin-right: auto; }
.tiq-lead-form { display: flex; flex-direction: column; gap: 10px; max-width: 400px; margin: 0 auto 20px; text-align: left; }
.tiq-input {
  background: rgba(10,10,10,.6);
  border: 1px solid rgba(200,160,48,.2);
  border-radius: var(--tiq-r);
  color: var(--tiq-text);
  font-family: 'Jost',sans-serif;
  font-size: 0.92rem;
  padding: 11px 14px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.tiq-input:focus { border-color: var(--tiq-gold); }
.tiq-input::placeholder { color: rgba(168,184,184,.4); }
.tiq-opt-in-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--tiq-muted);
  cursor: pointer;
  line-height: 1.5;
}
.tiq-opt-in-label input { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--tiq-gold); }
.tiq-lead-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ── Results ────────────────────────────────────────────────────── */

/* Score ring */
.tiq-score-section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 28px;
}
@media(max-width:560px){ .tiq-score-section { grid-template-columns: 1fr; text-align: center; } }
.tiq-score-ring-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.tiq-score-ring { width: 140px; height: 140px; }
.tiq-ring-bg   { stroke: rgba(200,160,48,0.12); }
.tiq-ring-fill { transition: stroke-dashoffset 1.5s cubic-bezier(.4,0,.2,1), stroke .4s; }
.tiq-ring-fill--green  { stroke: #3a8a5a; }
.tiq-ring-fill--yellow { stroke: #c8a030; }
.tiq-ring-fill--orange { stroke: #c87028; }
.tiq-ring-fill--red    { stroke: #c83030; }
.tiq-score-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tiq-score-num   { font-size: 2.2rem; font-weight: 500; line-height: 1; color: var(--tiq-text); }
.tiq-score-denom { font-size: 0.82rem; color: var(--tiq-muted); }

.tiq-band-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.tiq-band-pill--green  { background: rgba(58,138,90,.2);  color: #7dcfa0; border: 1px solid rgba(58,138,90,.3); }
.tiq-band-pill--yellow { background: rgba(200,160,48,.15); color: var(--tiq-goldl); border: 1px solid var(--tiq-border); }
.tiq-band-pill--orange { background: rgba(200,112,40,.15); color: #e09060; border: 1px solid rgba(200,112,40,.3); }
.tiq-band-pill--red    { background: rgba(200,48,48,.15);  color: #e08080; border: 1px solid rgba(200,48,48,.3); }

.tiq-result-headline { font-family: 'Cormorant Garamond',serif; font-size: 1.2rem; font-weight: 400; margin: 0 0 10px; color: var(--tiq-text); line-height: 1.3; }
.tiq-result-summary  { font-size: 0.88rem; color: var(--tiq-muted); line-height: 1.7; margin: 0; }

/* Cluster bars */
.tiq-clusters-section {
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 28px;
}
.tiq-section-title { font-family: 'Cormorant Garamond',serif; font-size: 1.3rem; font-weight: 400; color: var(--tiq-gold); margin: 0 0 6px; }
.tiq-section-sub   { font-size: 0.84rem; color: var(--tiq-muted); margin: 0 0 20px; line-height: 1.6; }

.tiq-cluster-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(200,160,48,.1);
}
.tiq-cluster-row:last-child { border-bottom: none; }
@media(max-width:560px){ .tiq-cluster-row { grid-template-columns: 1fr; gap: 6px; } }
.tiq-cluster-name { font-size: 0.82rem; font-weight: 500; color: var(--tiq-text); display: block; }
.tiq-cluster-desc { font-size: 0.72rem; color: var(--tiq-muted); display: block; }
.tiq-cluster-bar-wrap { display: flex; align-items: center; gap: 10px; }
.tiq-cluster-bar  { flex: 1; height: 8px; background: var(--tiq-mid); border-radius: 4px; overflow: hidden; }
.tiq-cluster-fill { height: 100%; background: linear-gradient(90deg, var(--tiq-gold), var(--tiq-goldl)); border-radius: 4px; width: 0%; transition: width 1.2s cubic-bezier(.4,0,.2,1); }
.tiq-cluster-score { font-size: 0.78rem; color: var(--tiq-muted); white-space: nowrap; min-width: 36px; text-align: right; }

/* Treatment recommendations */
.tiq-recs-section {
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 28px;
}
.tiq-recs { display: flex; flex-direction: column; gap: 14px; }
.tiq-rec-card {
  background: var(--tiq-mid);
  border: 1px solid var(--tiq-border);
  border-radius: var(--tiq-r);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--tiq-text);
  display: block;
  transition: border-color .2s;
}
.tiq-rec-card:hover { border-color: var(--tiq-gold); }
.tiq-rec-name { font-size: 1rem; font-weight: 500; color: var(--tiq-gold); margin-bottom: 6px; }
.tiq-rec-summary { font-size: 0.84rem; color: var(--tiq-muted); line-height: 1.6; margin-bottom: 8px; }
.tiq-rec-best { font-size: 0.78rem; color: rgba(168,184,184,.7); font-style: italic; }
.tiq-rec-link { font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tiq-gold); margin-top: 10px; display: inline-block; }

/* CTA section */
.tiq-cta-section {
  text-align: center;
  padding: 32px;
  background: var(--tiq-slate);
  border: 1px solid var(--tiq-border);
  border-radius: 12px;
  margin-bottom: 20px;
}
.tiq-caveat { font-size: 0.88rem; color: var(--tiq-muted); line-height: 1.7; margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.tiq-disclaimer-small { font-size: 0.72rem; color: rgba(168,184,184,.5); margin: 16px 0 20px; }
.tiq-crisis-box {
  background: rgba(200,48,48,.08);
  border: 1px solid rgba(200,48,48,.2);
  border-radius: var(--tiq-r);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--tiq-muted);
  display: inline-block;
}
.tiq-crisis-box strong { color: var(--tiq-text); }
.tiq-crisis-box a { color: var(--tiq-gold); }

.tiq-restart-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Admin */
.tiq-stat-cards { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.tiq-stat-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 20px 24px; min-width: 160px; }
.tiq-stat-num  { display: block; font-size: 2rem; font-weight: 600; color: #0073aa; }
.tiq-stat-label{ display: block; font-size: 12px; color: #888; margin-top: 4px; }
