:root {
  --bg: #060b14;
  --bg-alt: #0b1220;
  --panel: rgba(13, 25, 44, 0.84);
  --line: rgba(137, 164, 199, 0.24);
  --line-strong: rgba(158, 186, 222, 0.4);
  --ink: #eef3ff;
  --muted: #afbdd8;
  --accent: #53c1ff;
  --accent-alt: #4de2cd;
  --btn-solid: #3f58bf;
  --up: #33d07a;
  --down: #ff6575;
  --shadow: 0 22px 64px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1180px 580px at 15% -12%, rgba(53, 139, 255, 0.2), transparent 64%),
    radial-gradient(900px 500px at 85% 2%, rgba(77, 226, 205, 0.14), transparent 58%),
    linear-gradient(180deg, #060b14, #0a1220 42%, #070d16 100%);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(transparent 97%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(90deg, transparent 97%, rgba(255, 255, 255, 0.03) 100%);
  background-size: 10px 10px, 10px 10px;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0.9rem;
  z-index: 10;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 17, 30, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-image: url("/site/ticker-logo.png");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(160, 190, 228, 0.32);
  filter: invert(1);
}

.brand-text {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

main {
  padding: 1.4rem 0 2.2rem;
  display: grid;
  gap: 0.95rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.hero {
  background:
    radial-gradient(780px 220px at 12% 0%, rgba(83, 193, 255, 0.16), transparent 64%),
    var(--panel);
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
}

h1 {
  margin-top: 0.35rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  line-height: 1.15;
}

h3 {
  font-size: 1rem;
}

.eyebrow {
  color: var(--accent-alt);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 600;
}

.lead {
  margin-top: 0.7rem;
  color: #d6e4ff;
}

.panel p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-top: 0.7rem;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
  color: #dbe8ff;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

input[type="email"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.66rem 0.78rem;
  font: inherit;
  color: var(--ink);
  background: rgba(6, 14, 24, 0.82);
}

input[type="email"]:focus-visible {
  outline: 2px solid rgba(83, 193, 255, 0.75);
  outline-offset: 1px;
}

.error {
  min-height: 1.2rem;
  color: #ffc1ca;
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

.status {
  min-height: 1.2rem;
  color: #bfe8ff;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.chip-counter {
  margin-top: 0.62rem;
  font-size: 0.9rem;
  color: #d6e7ff;
  font-weight: 600;
}

.support-note a {
  color: var(--accent-alt);
  text-decoration: none;
}

.support-note a:hover {
  text-decoration: underline;
}

.rank-list {
  margin-top: 0.72rem;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.5rem;
}

.rank-list li {
  position: relative;
  border: 1px solid rgba(156, 186, 222, 0.3);
  border-radius: 11px;
  background: rgba(10, 20, 34, 0.75);
  padding: 0.5rem 6.9rem 0.5rem 0.62rem;
  color: #e7f0ff;
}

.rank-list.is-empty {
  list-style: none;
  padding-left: 0;
}

.rank-list li.empty {
  padding-right: 0.62rem;
  color: #bfd1ee;
}

.rank-name {
  display: block;
  font-weight: 600;
}

.rank-count {
  position: absolute;
  right: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-alt);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

.vote-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.62rem;
}

.vote-item {
  border: 1px solid rgba(156, 186, 222, 0.3);
  border-radius: 12px;
  background: rgba(10, 20, 34, 0.75);
  padding: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.vote-copy {
  min-width: 0;
}

.vote-copy h3 {
  margin-top: 0.2rem;
}

.vote-meta {
  margin-top: 0;
  color: var(--accent-alt);
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.06em;
}

.vote-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.vote-state {
  width: 120px;
  text-align: center;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  color: #d2def4;
  background: rgba(13, 24, 39, 0.8);
}

.vote-state.selected {
  border-color: rgba(51, 208, 122, 0.48);
  color: #aaf0c8;
}

.vote-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: #eef5ff;
  background: var(--btn-solid);
}

.vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vote-btn:hover:not(:disabled) {
  border-color: rgba(147, 223, 255, 0.75);
}

.vote-btn.active {
  border-color: rgba(206, 223, 255, 0.82);
  background: var(--btn-solid);
  color: #eef5ff;
}

.action-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(147, 176, 213, 0.45);
  color: #eef5ff;
  background: var(--btn-solid);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 0.95rem;
}

.btn:hover:not(.disabled) {
  transform: translateY(-1px);
  border-color: rgba(191, 220, 255, 0.7);
}

.btn.secondary {
  background: var(--btn-solid);
  color: #eef5ff;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.bucket-grid {
  margin-top: 0.78rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.bucket {
  border: 1px solid rgba(155, 184, 220, 0.3);
  border-radius: 12px;
  background: rgba(11, 21, 36, 0.72);
  padding: 0.72rem;
}

.bucket ul,
details ul {
  margin-top: 0.55rem;
  padding-left: 1rem;
  color: #d8e4fb;
}

.bucket li,
details li {
  margin-top: 0.23rem;
}

.chip-row {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.chip-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(12, 24, 42, 0.66);
  font-size: 0.84rem;
  color: #dce7fd;
}

details {
  margin-top: 0.58rem;
  border: 1px solid rgba(154, 183, 220, 0.28);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(10, 20, 35, 0.73);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: #e4efff;
}

.site-footer {
  padding: 0.15rem 0 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.site-footer p {
  color: var(--muted);
}

.site-footer a {
  color: var(--accent-alt);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .bucket-grid {
    grid-template-columns: 1fr;
  }

  .vote-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .vote-controls {
    width: 100%;
    justify-content: space-between;
  }

  .vote-state {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .email-row {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  main {
    padding-top: 1rem;
  }
}
