:root {
  --bg: #060d1a;
  --surface: #0a1628;
  --surface-2: #0f1e35;
  --accent: #f0a832;
  --accent-dim: rgba(240, 168, 50, 0.12);
  --text: #e8dcc8;
  --text-muted: #7a8ba0;
  --text-dim: #3d5068;
  --border: rgba(240, 168, 50, 0.15);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* SECTION LABEL */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

/* =========================================
   MANIFESTO / HERO
   ========================================= */
.manifesto {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 6rem 8vw;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.manifesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(240, 168, 50, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 10% 100%, rgba(240, 168, 50, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.manifesto__inner { position: relative; z-index: 1; }

.manifesto__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0.8;
}

.manifesto__headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.manifesto__body {
  max-width: 460px;
}

.manifesto__body p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 3rem;
}

.manifesto__accent {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.accent-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.accent-text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

/* ORBIT VISUAL */
.manifesto__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 380px;
  margin: 0 auto;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.orbit-ring--outer {
  width: 100%;
  height: 100%;
  animation: orbit-spin 20s linear infinite;
  border-style: dashed;
}

.orbit-ring--inner {
  width: 60%;
  height: 60%;
  animation: orbit-spin 14s linear infinite reverse;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit-core {
  position: absolute;
  width: 88px;
  height: 88px;
  background: radial-gradient(circle at 40% 40%, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 0 40px rgba(240, 168, 50, 0.08);
}

.orbit-core__dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

.orbit-core__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.orbit-label {
  position: absolute;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: lowercase;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

.orbit-label--top { top: 5%; left: 50%; transform: translateX(-50%); }
.orbit-label--right { right: 5%; top: 50%; transform: translateY(-50%); }
.orbit-label--bottom { bottom: 5%; left: 50%; transform: translateX(-50%); }
.orbit-label--left { left: 5%; top: 50%; transform: translateY(-50%); }

/* =========================================
   PILLARS
   ========================================= */
.pillars {
  padding: 7rem 8vw;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pillars__header {
  text-align: center;
  margin-bottom: 4.5rem;
}

.pillars__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.pillar {
  padding: 2rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s;
}

.pillar:hover { border-color: var(--accent); }

.pillar__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.pillar h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.pillar p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =========================================
   PRINCIPLES
   ========================================= */
.principles {
  padding: 7rem 8vw;
  background: var(--bg);
}

.principles__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.principles__left h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.principles__sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 360px;
}

.principles__right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.principle {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: start;
}

.principle__num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1.4;
}

.principle h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.principle p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================
   CLOSING
   ========================================= */
.closing {
  padding: 8rem 8vw;
  text-align: center;
  background: var(--bg);
  position: relative;
}

.closing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(240, 168, 50, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.closing__inner { position: relative; z-index: 1; }

.closing__rule {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  margin: 0 auto 3rem;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.closing p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.closing__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 2.5rem 8vw;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.footer__tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer__meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .manifesto {
    grid-template-columns: 1fr;
    padding: 5rem 6vw;
    min-height: auto;
    gap: 3rem;
  }

  .manifesto__visual {
    max-width: 280px;
    margin: 0 auto;
  }

  .pillars__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .manifesto { padding: 4rem 5vw; }
  .pillars { padding: 5rem 5vw; }
  .pillars__grid { grid-template-columns: 1fr; }
  .principles { padding: 5rem 5vw; }
  .closing { padding: 5rem 5vw; }
  .footer { padding: 2rem 5vw; }
  .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
}

/* =========================================
   APP — NAV
   ========================================= */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: rgba(6, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.app-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.app-nav__logo {
  color: var(--accent);
  font-size: 1.2rem;
}

.app-nav__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-dot-sm {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}

/* =========================================
   APP CONTAINER
   ========================================= */
.app-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =========================================
   PANELS
   ========================================= */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.panel--hidden { display: none; }

.panel__header { margin-bottom: 1.5rem; }

.panel__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin: 0.4rem 0 0;
}

.panel__subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
}

/* =========================================
   FORMS
   ========================================= */
.form__row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.form__row:last-child { margin-bottom: 0; }

.form__input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form__input::placeholder { color: var(--text-muted); }

.form__input--sm { flex: 0 0 200px; }

.form__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  outline: none;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover { opacity: 0.85; }

.btn--accent {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--accent:hover { opacity: 0.9; }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn--vote {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(240, 168, 50, 0.3);
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  border-radius: 6px;
}
.btn--vote:hover {
  background: rgba(240, 168, 50, 0.2);
  border-color: var(--accent);
}

.btn--vote.voted {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* =========================================
   RANKINGS LIST
   ========================================= */
.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rankings-empty {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.3s;
}

.rank-item:hover { border-color: rgba(240, 168, 50, 0.3); }

.rank-item--top-1 { border-color: rgba(240, 168, 50, 0.5); background: rgba(240, 168, 50, 0.04); }

.rank-badge {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  text-align: center;
  line-height: 1;
}

.rank-item--top-1 .rank-badge { opacity: 1; }

.rank-info { min-width: 0; }

.rank-info__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.rank-votes {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =========================================
   TOAST
   ========================================= */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  z-index: 200;
  transition: opacity 0.3s;
}

.toast--hidden { opacity: 0; pointer-events: none; }

/* =========================================
   HERO
   ========================================= */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5rem 8vw 4rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero__sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero__stats .sep { color: var(--border); }

.hero__live-rank {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.live-rank__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.live-rank__dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

.live-rank__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 1;
}

.live-rank__count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.live-rank__list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.live-rank__empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.live-rank__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.hero-rank-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.hero-rank-item:hover { border-color: rgba(240, 168, 50, 0.2); }
.hero-rank-item--top { border-color: rgba(240, 168, 50, 0.3); background: rgba(240, 168, 50, 0.04); }

.hero-rank-item__badge {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.45;
  text-align: center;
}
.hero-rank-item--top .hero-rank-item__badge { opacity: 1; }

.hero-rank-item__name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-rank-item__votes {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-weight: 600;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 4rem 6vw 3rem; }
}

@media (max-width: 600px) {
  .app-nav { padding: 0.8rem 1rem; }
  .app-container { padding: 2rem 1rem 4rem; }
  .panel { padding: 1.5rem 1.25rem; }
  .form__input--sm { flex: 1; }
  .rank-item { grid-template-columns: 36px 1fr; grid-template-rows: auto auto; }
  .rank-meta { grid-column: 2; flex-direction: row; align-items: center; }
  .rank-votes { font-size: 0.72rem; }
  .hero { padding: 3.5rem 5vw 3rem; }
}