/* ════════════════════════════════════════════════════════
   TIPPING POINT — House of Atlas  |  v1.0.0
   dark (default) · light · auto (follows system)
   ════════════════════════════════════════════════════════ */

/* ── Scoped box-sizing reset ───────────────────────────── */
.tpd,
.tpd *,
.tpd *::before,
.tpd *::after {
  box-sizing: border-box;
}

/* ── Design tokens — dark (default) ───────────────────── */
.tpd {
  --tpd-bg:   #0d0d0d;
  --tpd-surf: #151515;
  --tpd-c:    #f0ede8;
  --tpd-c70:  rgba(240,237,232,.70);
  --tpd-c45:  rgba(240,237,232,.45);
  --tpd-c28:  rgba(240,237,232,.28);
  --tpd-c15:  rgba(240,237,232,.15);
  --tpd-c08:  rgba(240,237,232,.08);
  --tpd-f:    'Abel', sans-serif;
}

/* ── Light tokens ──────────────────────────────────────── */
.tpd[data-theme="light"] {
  --tpd-bg:   #f5f2ed;
  --tpd-surf: #ece9e3;
  --tpd-c:    #1a1714;
  --tpd-c70:  rgba(26,23,20,.70);
  --tpd-c45:  rgba(26,23,20,.45);
  --tpd-c28:  rgba(26,23,20,.28);
  --tpd-c15:  rgba(26,23,20,.15);
  --tpd-c08:  rgba(26,23,20,.08);
}

/* ── Auto — match system preference ───────────────────── */
@media (prefers-color-scheme: light) {
  .tpd[data-theme="auto"] {
    --tpd-bg:   #f5f2ed;
    --tpd-surf: #ece9e3;
    --tpd-c:    #1a1714;
    --tpd-c70:  rgba(26,23,20,.70);
    --tpd-c45:  rgba(26,23,20,.45);
    --tpd-c28:  rgba(26,23,20,.28);
    --tpd-c15:  rgba(26,23,20,.15);
    --tpd-c08:  rgba(26,23,20,.08);
  }
}

/* ── Base ──────────────────────────────────────────────── */
.tpd {
  background:              var(--tpd-bg);
  color:                   var(--tpd-c);
  font-family:             var(--tpd-f);
  padding:                 80px clamp(24px, 5vw, 80px);
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.tpd-inner {
  max-width: 1000px;
  margin:    0 auto;
}

/* ── Header ────────────────────────────────────────────── */
.tpd-tag {
  display:         inline-block;
  font-family:     var(--tpd-f);
  font-size:       12px;
  letter-spacing:  .25em;
  text-transform:  uppercase;
  color:           var(--tpd-c45);
  background:      var(--tpd-c08);
  padding:         5px 11px;
  margin-bottom:   28px;
}
.tpd-h {
  font-family:    var(--tpd-f);
  font-size:      clamp(40px, 7vw, 72px);
  line-height:    .98;
  letter-spacing: .01em;
  text-transform: uppercase;
  color:          var(--tpd-c);
  margin-bottom:  20px;
  font-weight:    normal;
}
.tpd-intro {
  font-family:   var(--tpd-f);
  font-size:     17px;
  color:         var(--tpd-c70);
  max-width:     620px;
  line-height:   1.6;
  margin-bottom: 56px;
}

/* ── Metric grid ───────────────────────────────────────── */
.tpd-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  border:                .5px solid var(--tpd-c15);
  border-bottom:         none;
  margin-bottom:         14px;
}
.tpd-panel {
  padding:        34px 34px 28px;
  border-right:   .5px solid var(--tpd-c15);
  border-bottom:  .5px solid var(--tpd-c15);
  display:        flex;
  flex-direction: column;
}
.tpd-panel:nth-child(2n) { border-right: none; }

.tpd-pnum {
  font-family:        var(--tpd-f);
  font-size:          clamp(42px, 7vw, 68px);
  line-height:        .95;
  letter-spacing:     -.02em;
  color:              var(--tpd-c);
  font-variant-numeric: tabular-nums;
  margin-bottom:      12px;
  font-weight:        normal;
}
.tpd-pclaim {
  font-family:   var(--tpd-f);
  font-size:     15px;
  color:         var(--tpd-c70);
  line-height:   1.5;
  margin-bottom: 16px;
  letter-spacing:.01em;
}
.tpd-pref {
  font-family:   var(--tpd-f);
  font-size:     11px;
  color:         var(--tpd-c45);
  line-height:   1.55;
  letter-spacing:.02em;
  margin-bottom: 20px;
}
.tpd-pref em { font-style: italic; }

/* ── Per-panel toggle ──────────────────────────────────── */
.tpd-ask {
  margin-top:  auto;
  padding-top: 18px;
  border-top:  .5px solid var(--tpd-c08);
}
.tpd-ask-q {
  font-family:    var(--tpd-f);
  font-size:      13px;
  letter-spacing: .04em;
  color:          var(--tpd-c45);
  margin-bottom:  11px;
}
.tpd-toggle { display: flex; gap: 7px; }

.tpd-tg {
  font-family:    var(--tpd-f);
  font-size:      13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding:        7px 16px;
  border:         .5px solid var(--tpd-c15);
  color:          var(--tpd-c45);
  background:     transparent;
  cursor:         pointer;
  transition:     border-color .15s, color .15s, background .15s;
  line-height:    1;
}
.tpd-tg:hover   { border-color: var(--tpd-c45); color: var(--tpd-c70); }
.tpd-tg.on-yes  { border-color: var(--tpd-c);   color: var(--tpd-c); background: var(--tpd-c08); }
.tpd-tg.on-no   { border-color: var(--tpd-c70); color: var(--tpd-c); background: transparent; }

.tpd-verdict {
  font-family:   var(--tpd-f);
  font-size:     13px;
  letter-spacing:.02em;
  line-height:   1.5;
  color:         var(--tpd-c70);
  margin-top:    12px;
  min-height:    18px;
  opacity:       0;
  transition:    opacity .3s;
}
.tpd-verdict.show { opacity: 1; }

/* ── Tipping-point axis ────────────────────────────────── */
.tpd-axis-wrap {
  border:         .5px solid var(--tpd-c15);
  padding:        40px 40px 34px;
  margin-bottom:  56px;
}
.tpd-axis-label {
  font-family:    var(--tpd-f);
  font-size:      12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color:          var(--tpd-c45);
  margin-bottom:  8px;
}
.tpd-axis-title {
  font-family:    var(--tpd-f);
  font-size:      clamp(22px, 3vw, 30px);
  color:          var(--tpd-c);
  line-height:    1.2;
  margin-bottom:  40px;
  letter-spacing: .01em;
  font-weight:    normal;
}
.tpd-axis {
  position:   relative;
  height:     2px;
  background: var(--tpd-c15);
  margin:     0 0 8px;
}
.tpd-axis-fill {
  position:   absolute;
  left: 0; top: 0;
  height:     100%;
  background: var(--tpd-c28);
  width:      0;
  transition: width 1s cubic-bezier(.22,1,.36,1);
}
.tpd-mark {
  position:   absolute;
  top:        50%;
  transform:  translate(-50%,-50%);
  transition: left 1s cubic-bezier(.22,1,.36,1);
}
.tpd-mark-dot { width: 13px; height: 13px; border-radius: 50%; }
.tpd-mark-market .tpd-mark-dot { background: var(--tpd-c45); }
.tpd-mark-you    .tpd-mark-dot { background: var(--tpd-c); box-shadow: 0 0 0 5px var(--tpd-c08); }

.tpd-mark-flag {
  font-family:    var(--tpd-f);
  position:       absolute;
  left:           50%;
  transform:      translateX(-50%);
  white-space:    nowrap;
  font-size:      12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tpd-mark-market .tpd-mark-flag { bottom: 22px; color: var(--tpd-c45); }
.tpd-mark-you    .tpd-mark-flag { top:    22px; color: var(--tpd-c); }

.tpd-scale {
  display:         flex;
  justify-content: space-between;
  margin-top:      14px;
  font-family:     var(--tpd-f);
  font-size:       11px;
  letter-spacing:  .14em;
  text-transform:  uppercase;
  color:           var(--tpd-c28);
}
.tpd-axis-read {
  font-family:   var(--tpd-f);
  font-size:     15px;
  color:         var(--tpd-c70);
  line-height:   1.6;
  margin-top:    30px;
  max-width:     640px;
  letter-spacing:.01em;
  min-height:    48px;
  opacity:       0;
  transition:    opacity .4s;
}
.tpd-axis-read.show { opacity: 1; }
.tpd-axis-read strong {
  font-weight:   normal;
  color:         var(--tpd-c);
  border-bottom: .5px solid var(--tpd-c45);
}

/* ── Live counter ──────────────────────────────────────── */
.tpd-live {
  border:        .5px solid var(--tpd-c15);
  background:    var(--tpd-surf);
  padding:       40px;
  text-align:    center;
  margin:        42px 0 56px;
}
.tpd-live-label {
  font-family:    var(--tpd-f);
  font-size:      12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color:          var(--tpd-c45);
  margin-bottom:  20px;
}
.tpd-live-num {
  font-family:          var(--tpd-f);
  font-size:            clamp(46px, 10vw, 88px);
  line-height:          .9;
  letter-spacing:       -.02em;
  color:                var(--tpd-c);
  font-variant-numeric: tabular-nums;
  margin-bottom:        10px;
  font-weight:          normal;
}
.tpd-live-unit {
  font-family: var(--tpd-f);
  font-size:   clamp(18px, 3vw, 28px);
  color:       var(--tpd-c45);
}
.tpd-live-foot {
  font-family:   var(--tpd-f);
  font-size:     11.5px;
  color:         var(--tpd-c45);
  line-height:   1.6;
  max-width:     560px;
  margin:        18px auto 0;
  letter-spacing:.02em;
  font-style:    italic;
}
.tpd-live-foot .tpd-d {
  display:        inline-block;
  width:          5px;
  height:         5px;
  border-radius:  50%;
  background:     var(--tpd-c70);
  margin-right:   8px;
  vertical-align: middle;
  animation:      tpd-pulse 2.4s ease-in-out infinite;
}
@keyframes tpd-pulse {
  0%, 100% { opacity: .15; }
  50%       { opacity: .85; }
}

/* ── Conclusion + CTA ──────────────────────────────────── */
.tpd-concl {
  border-top:      .5px solid var(--tpd-c15);
  padding-top:     52px;
  display:         flex;
  align-items:     flex-end;
  justify-content: space-between;
  gap:             32px;
  flex-wrap:       wrap;
}
.tpd-concl-line {
  font-family:    var(--tpd-f);
  font-size:      clamp(24px, 3.6vw, 38px);
  line-height:    1.25;
  color:          var(--tpd-c);
  max-width:      600px;
  letter-spacing: .01em;
  font-weight:    normal;
}
.tpd-concl-line span { color: var(--tpd-c45); }

.tpd-cta-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            12px;
  font-family:    var(--tpd-f);
  font-size:      14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--tpd-c);
  text-decoration:none;
  border:         .5px solid var(--tpd-c45);
  padding:        15px 28px;
  background:     transparent;
  transition:     background .2s, border-color .2s, color .2s;
  white-space:    nowrap;
  cursor:         pointer;
  line-height:    1;
}
.tpd-cta-btn:hover {
  background:   var(--tpd-c08);
  border-color: var(--tpd-c);
  color:        var(--tpd-c);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 680px) {
  .tpd { padding: 56px 22px; }
  .tpd-grid { grid-template-columns: 1fr; }
  .tpd-panel { border-right: none; }
  .tpd-axis-wrap,
  .tpd-live { padding: 28px 22px; }
  .tpd-concl { flex-direction: column; align-items: flex-start; }
}

/* ── Accessibility ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tpd-live-foot .tpd-d { animation: none; }
  .tpd-axis-fill,
  .tpd-mark { transition: none; }
}
