/* ── UWS Declaration Platform — Styles ── */
:root {
  --navy:    #0a1628;
  --navy2:   #1a2d50;
  --gold:    #C9A84C;
  --gold2:   #E8C56A;
  --white:   #FFFFFF;
  --gray:    #8899AA;
  --border:  #2a4060;
  --danger:  #e53e3e;
  --success: #38a169;
}

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

html, body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
}

/* ── Layout ── */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 24px 20px;
  animation: fadeIn 0.25s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ── Header ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 16px; }
.nav-link {
  font-size: 13px;
  color: var(--gray);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.nav-link:hover { color: var(--white); }

/* ── Hero / Home ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero-title span { color: var(--gold); }
.hero-tagline {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 32px;
  line-height: 1.5;
}
.hero-tagline strong { color: var(--white); }

.countdown {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
}
.countdown-unit {
  text-align: center;
}
.countdown-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold);
  display: block;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}
.countdown-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gray);
  text-transform: uppercase;
}

.participant-badge {
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 32px;
}
.participant-badge strong { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--navy);
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  width: 100%;
}
.btn-outline:hover:not(:disabled) { background: rgba(201,168,76,0.08); }
.btn-ghost {
  background: transparent;
  color: var(--gray);
  padding: 10px 0;
}
.btn-ghost:hover { color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* ── Cards ── */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-gold {
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.05);
}

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 700;
}
.input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--gray); }

/* ── Progress stepper ── */
.stepper {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.step-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.step-dot.active { background: var(--gold); }
.step-dot.done { background: rgba(201,168,76,0.4); }

/* ── Section titles ── */
.screen-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.screen-sub {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Vote options ── */
.vote-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255,255,255,0.02);
}
.vote-option:hover { border-color: var(--gold); background: rgba(201,168,76,0.05); }
.vote-option.selected { border-color: var(--gold); background: rgba(201,168,76,0.1); }
.vote-option-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  min-width: 24px;
  text-align: center;
}
.vote-option.selected .vote-option-rank { color: var(--gold); }
.vote-option-label { flex: 1; font-size: 14px; font-weight: 600; }
.vote-option-count {
  font-size: 12px;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

/* ── Tally bar ── */
.tally-bar-wrap { margin-top: 6px; height: 3px; background: var(--border); border-radius: 2px; }
.tally-bar { height: 100%; border-radius: 2px; background: var(--gold); transition: width 0.4s; }

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { background: rgba(229,62,62,0.12); border: 1px solid rgba(229,62,62,0.3); color: #fc8181; }
.alert-success { background: rgba(56,161,105,0.12); border: 1px solid rgba(56,161,105,0.3); color: #68d391; }
.alert-info { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.3); color: var(--gold); }

/* ── Declaration confirmed ── */
.decl-number {
  font-size: 64px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 12px 0;
}
.decl-number-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.pillar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.pillar-item { }
.pillar-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
}
.pillar-value { font-size: 15px; font-weight: 700; margin-top: 2px; }

/* ── Loading spinner ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ── */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-gray { color: var(--gray); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Pill / tab ── */
.tab-row { display: flex; gap: 8px; margin-bottom: 20px; }
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--gray);
  background: transparent;
  transition: all 0.15s;
}
.tab.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }

@media (max-width: 360px) {
  .hero-title { font-size: 28px; }
  .countdown-number { font-size: 26px; }
}
