:root {
  --color-granite: #E3E5E1;
  --color-limestone: #F7F8F5;
  --color-ink: #15233B;
  --color-saffron: #F4C430;
  --color-backroom: #0E1828;
  --wa-green: #1F5E46;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-granite: #111C2E;
    --color-limestone: #1A2942;
    --color-ink: #F7F8F5;
  }
}

body {
  background-color: var(--color-granite);
  color: var(--color-ink);
  font-family: 'Archivo', sans-serif;
  margin: 0; padding: 0;
}

.display {
  font-family: 'Archivo', sans-serif; font-stretch: 75%; font-weight: 800; text-transform: none;
}

/* Minimal Header */
.connect-header { padding: 24px; text-align: center; }
.connect-header .brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit; font-weight: 800; font-size: 1.25rem;
}
.connect-header .brand__logo { width: 40px; height: 26px; }
.connect-header small { font-weight: normal; opacity: 0.8; font-size: 0.8em; }

.connect-layout {
  display: flex; justify-content: center;
  padding: 0 16px 64px;
}
.connect-column {
  width: 100%; max-width: 640px;
}

/* Progress */
.progress { margin-bottom: 32px; text-align: center; }
.progress__dots { display: inline-flex; gap: 12px; }
.progress__dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(0,0,0,0.1);
  transition: background 0.3s;
}
@media (prefers-color-scheme: dark) {
  .progress__dots .dot { background: rgba(255,255,255,0.2); }
}
.progress__dots .dot.is-active { background: var(--color-saffron); }

/* Steps general */
.step { outline: none; }
.step__title { font-size: 2rem; margin-bottom: 8px; text-align: center; }
.step__desc { margin-bottom: 32px; text-align: center; opacity: 0.9; }

.btn {
  display: block; width: 100%; text-align: center;
  padding: 14px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 1.1rem;
  border: none; cursor: pointer; transition: opacity 0.2s;
}
.btn--primary { background: var(--color-saffron); color: #15233B; }
.btn--secondary { background: var(--color-ink); color: var(--color-limestone); }
@media (prefers-color-scheme: dark) {
  .btn--secondary { background: var(--color-limestone); color: var(--color-ink); }
}
.btn:hover { opacity: 0.9; }

/* Step 1 */
.switches-list { list-style: none; padding: 0; margin: 0 0 24px 0; }
.switches-list li {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--color-limestone); padding: 16px; margin-bottom: 8px; border-radius: 8px;
}
@media (prefers-color-scheme: dark) {
  .switches-list li { background: var(--color-backroom); }
}
.switches-list strong { display: block; margin-bottom: 4px; }
.switches-list small { display: block; opacity: 0.7; }
.switch {
  appearance: none; width: 50px; height: 28px; background: rgba(0,0,0,0.2);
  border-radius: 14px; position: relative; cursor: pointer; border: none;
  transition: background 0.2s; flex-shrink: 0; margin-left: 16px;
}
@media (prefers-color-scheme: dark) {
  .switch { background: rgba(255,255,255,0.2); }
}
.switch[aria-checked="true"] { background: var(--wa-green); }
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; background: #fff; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch[aria-checked="true"]::after { transform: translateX(22px); }

.trust-line { text-align: center; color: var(--wa-green); margin-bottom: 16px; }
.consent-text { text-align: center; font-size: 0.85rem; opacity: 0.8; margin-bottom: 32px; }

/* Step 2 QR */
.qr-frame {
  max-width: 300px; margin: 0 auto 24px;
  position: relative;
}
.fanlight { display: block; width: 100%; height: auto; }
.door-body {
  background: #fff; border: 6px solid var(--color-ink); border-top: none;
  padding: 32px; text-align: center; min-height: 200px;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.3s;
}
.door-body.fade-out { opacity: 0; }
.qr-overlay {
  position: absolute; top: 40%; right: -24px; width: 48px; height: 48px;
  background: var(--color-granite); border-radius: 50%; padding: 4px;
}
.countdown-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { stroke: rgba(0,0,0,0.1); }
.ring-fg { stroke: var(--color-saffron); transition: stroke-dashoffset 1s linear; }

.demo-note { font-size: 0.8rem; text-align: center; opacity: 0.7; margin-bottom: 32px; }
.center { text-align: center; }

/* Step 3 */
.counters {
  display: flex; justify-content: space-around; gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.counter-box { text-align: center; }
.counter-box strong { display: block; font-size: 2.5rem; font-family: 'JetBrains Mono', monospace; color: var(--color-saffron); }
.counter-box span { font-weight: 600; opacity: 0.8; }
.connect-term {
  background: var(--color-backroom); color: #fff; border-radius: 12px;
  padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 14px;
  min-height: 250px; display: flex; flex-direction: column; overflow: hidden;
}

/* Step 4 */
.xray-panel {
  background: var(--color-limestone); padding: 24px; border-radius: 12px; margin-bottom: 24px;
}
.xray-panel.no-bg { background: transparent; padding: 0; }
@media (prefers-color-scheme: dark) {
  .xray-panel:not(.no-bg) { background: var(--color-backroom); border: 1px solid rgba(255,255,255,0.1); }
}
.xray-panel h2 { margin-top: 0; margin-bottom: 16px; font-size: 1.5rem; }
.xray-list { list-style: none; padding: 0; margin: 0; }
.xray-list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.1);
}
@media (prefers-color-scheme: dark) {
  .xray-list li { border-bottom: 1px solid rgba(255,255,255,0.1); }
}
.xray-list li:last-child { border-bottom: none; }
.xray-val { font-size: 1.5rem; font-weight: 800; color: var(--color-saffron); font-family: 'Archivo', sans-serif; }
.xray-lbl { opacity: 0.9; }

.connect-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }

/* Site footer overrides for connect page to remain minimal if needed */
.site-footer {
  background: var(--color-ink); color: var(--color-granite);
  padding: 48px 16px; text-align: center; font-size: 0.9rem;
}
.site-footer a { color: var(--color-saffron); text-decoration: none; }
.footer-nav { display: flex; justify-content: center; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
