:root {
  --navy-950: #081527;
  --navy-900: #0B1B33;
  --navy-800: #12253F;
  --navy-700: #1C3455;
  --navy-600: #2A4568;
  --orange-500: #FF6A2B;
  --orange-400: #FF8A52;
  --orange-300: #FFAB7A;
  --ink-100: #F4F2EC;
  --slate-400: #8C9BB5;
  --slate-500: #6E7F9C;

  --font-display: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--navy-950); color: var(--ink-100); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 0 80px; }
a, button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; }

.wrap { width: 100%; max-width: 760px; padding: 0 24px; }

nav { width: 100%; max-width: 760px; padding: 28px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.wordmark span { color: var(--orange-500); }
.navlinks { display: flex; gap: 22px; }
.navlink { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--slate-400); transition: color 0.15s ease; }
.navlink:hover { color: var(--ink-100); }
.navlink.active { color: var(--orange-500); }

.hero { width: 100%; padding: 48px 24px 8px; text-align: center; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-400); margin-bottom: 18px; }
.headline { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.96; letter-spacing: -0.01em; font-size: clamp(32px, 6.5vw, 52px); }
.headline .no-experts { color: var(--slate-400); }
.headline .decides { color: var(--ink-100); }
.subhead { margin-top: 16px; color: var(--slate-400); font-size: 15px; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.5; }

.hot-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.period-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 8px;
  color: var(--ink-100); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 30px 8px 14px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238C9BB5' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px;
  transition: border-color 0.15s ease;
}
.period-select:hover, .period-select:focus { outline: none; border-color: var(--orange-500); }
.period-select option { background: var(--navy-900); color: var(--ink-100); }

.topics-section { width: 100%; margin-top: 40px; }
.topics-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-400); margin-bottom: 14px; }
.topics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.topic-card { position: relative; text-align: left; background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 12px; padding: 20px; transition: border-color 0.15s ease, transform 0.15s ease; }
.topic-card:hover { border-color: var(--orange-500); transform: translateY(-2px); }
.topic-card .hot-tag { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-500); display: flex; align-items: center; gap: 5px; }
.topic-card .hot-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange-500); display: inline-block; }
.topic-card .name { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 18px; }
.topic-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); display: flex; justify-content: space-between; margin-top: 14px; }
.topic-card .leader { font-size: 13px; color: var(--ink-100); margin-top: 10px; }
.topic-card .leader b { color: var(--orange-400); font-weight: 600; }

.breadcrumb { font-family: var(--font-mono); font-size: 12px; color: var(--slate-500); margin: 36px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.breadcrumb button { color: var(--orange-400); text-decoration: underline; text-underline-offset: 3px; }

.debate-header { width: 100%; display: flex; align-items: baseline; justify-content: space-between; padding: 10px 4px 14px; border-bottom: 1px solid var(--navy-700); margin-bottom: 4px; }
.debate-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(16px, 3vw, 20px); letter-spacing: -0.01em; }
.vote-total { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); white-space: nowrap; }
.vote-total b { color: var(--orange-400); font-weight: 600; }

.search-bar { width: 100%; margin: 16px 0 10px; padding: 11px 14px; background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 8px; color: var(--ink-100); font-size: 14px; transition: border-color 0.15s ease; }
.search-bar::placeholder { color: var(--slate-500); }
.search-bar:focus { outline: none; border-color: var(--orange-500); }

.add-row { display: flex; gap: 8px; margin: 0 0 8px; }
.add-row input { flex: 1; padding: 11px 14px; background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 8px; color: var(--ink-100); font-size: 14px; }
.add-row input::placeholder { color: var(--slate-500); }
.add-row input:focus { outline: none; border-color: var(--orange-500); }
.add-row button { padding: 0 18px; background: var(--orange-500); color: var(--navy-950); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 8px; white-space: nowrap; transition: background 0.15s ease; }
.add-row button:hover { background: var(--orange-400); }
.add-hint { font-size: 12px; color: var(--slate-500); margin: 8px 0 18px; }
.add-hint.warn { color: var(--orange-400); }
.add-hint button { color: var(--orange-500); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.no-results { padding: 30px 4px; color: var(--slate-500); font-size: 14px; text-align: center; }

.board { width: 100%; margin-top: 6px; }
.tier-divider { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-500); padding: 18px 4px 8px; }

.row { display: grid; grid-template-columns: 44px 1fr 56px 88px; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--navy-800); position: relative; transition: background 0.2s ease; }
.row:hover { background: rgba(255,255,255,0.015); }
.rank { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--slate-500); text-align: center; position: relative; }

.row.row-top3 { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 10px; padding: 16px 14px; margin-bottom: 8px; }
.row.tier-1 { border-color: var(--orange-500); }
.row.tier-1 .name { font-size: 18px; font-weight: 800; }

.rank-badge { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 15px; flex-shrink: 0; }
.rank-badge.tier-1 { background: var(--orange-500); color: var(--navy-950); }
.rank-badge.tier-2 { background: rgba(255, 106, 43, 0.28); color: var(--orange-300); border: 1px solid var(--orange-500); }
.rank-badge.tier-3 { background: rgba(255, 106, 43, 0.12); color: var(--orange-400); border: 1px solid var(--navy-600); }
.seal { position: absolute; top: -10px; left: 38px; transform: rotate(-8deg); display: flex; align-items: center; gap: 4px; background: var(--navy-950); border: 1.5px solid var(--orange-500); color: var(--orange-500); font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; white-space: nowrap; pointer-events: none; }
.name-cell { min-width: 0; }
.name { font-size: 16px; font-weight: 600; }
.bar-track { margin-top: 7px; height: 4px; background: var(--navy-800); border-radius: 100px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--orange-500); border-radius: 100px; transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.count { font-family: var(--font-mono); font-size: 13px; color: var(--slate-400); text-align: right; }
.vote-buttons { display: flex; flex-direction: column; gap: 2px; }
.vote-btn { width: 32px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--slate-500); transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease; }
.vote-btn:hover { background: var(--navy-800); color: var(--orange-400); }
.vote-btn:active { transform: scale(0.9); }
.vote-btn svg { width: 12px; height: 12px; }
.vote-btn.single { width: 40px; height: 40px; border: 1px solid var(--navy-700); border-radius: 8px; }
.vote-btn.single svg { width: 14px; height: 14px; }

.community-tag { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-500); border: 1px solid var(--navy-700); padding: 2px 6px; border-radius: 4px; margin-left: 8px; white-space: nowrap; }

.row-compact { display: grid; grid-template-columns: 30px 1fr 56px 54px; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--navy-800); }
.row-compact:hover { background: rgba(255,255,255,0.015); }
.rank-compact { font-family: var(--font-mono); font-size: 12px; color: var(--slate-500); text-align: center; }
.name-compact { font-size: 13.5px; color: var(--ink-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count-compact { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate-400); text-align: right; }
.vote-compact { display: flex; gap: 2px; justify-content: flex-end; }
.vote-compact .vote-btn { width: 22px; height: 22px; }
.vote-compact .vote-btn svg { width: 9px; height: 9px; }

.cand-row { display: grid; grid-template-columns: 34px 1fr 70px 44px; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--navy-800); }

.countdown { display: flex; gap: 12px; justify-content: center; margin: 30px 0 6px; flex-wrap: wrap; }
.countdown .unit { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 10px; padding: 16px 20px; min-width: 76px; text-align: center; }
.countdown .num { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--orange-400); }
.countdown .lbl { font-family: var(--font-mono); font-size: 10px; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.section-note { text-align: center; color: var(--slate-400); font-size: 13px; max-width: 440px; margin: 6px auto 30px; line-height: 1.5; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 4px; }
.page-arrow { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--navy-700); border-radius: 9px; color: var(--ink-100); background: var(--navy-900); transition: border-color 0.15s ease, color 0.15s ease; }
.page-arrow:hover:not(:disabled) { border-color: var(--orange-500); color: var(--orange-400); }
.page-arrow:disabled { opacity: 0.32; cursor: default; }
.page-arrow svg { width: 15px; height: 15px; }
.page-info { font-family: var(--font-mono); font-size: 12px; color: var(--slate-400); letter-spacing: 0.03em; text-align: center; min-width: 160px; }
.page-info b { color: var(--ink-100); font-weight: 600; }

.strip { margin-top: 40px; width: 100%; background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 10px; padding: 22px 26px; text-align: center; }
.strip p { font-size: 14px; color: var(--slate-400); line-height: 1.6; }
.strip b { color: var(--orange-400); font-weight: 600; }

.chat-section { width: 100%; margin-top: 40px; }
.chat-header { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 12px; }
.chat-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 15px; letter-spacing: -0.01em; }
.chat-online { font-family: var(--font-mono); font-size: 11px; color: var(--slate-400); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chat-online::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange-500); box-shadow: 0 0 0 3px rgba(255,106,43,0.18); }
.chat-box { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: 12px; overflow: hidden; }
.chat-messages { max-height: 260px; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { display: flex; gap: 10px; }
.chat-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--navy-700); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--orange-400); flex-shrink: 0; }
.chat-msg.self .chat-avatar { background: var(--orange-500); color: var(--navy-950); }
.chat-body { min-width: 0; }
.chat-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.chat-author { font-size: 12.5px; font-weight: 600; color: var(--ink-100); }
.chat-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--slate-500); }
.chat-text { font-size: 13.5px; color: var(--slate-400); line-height: 1.45; word-break: break-word; }
.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--navy-700); }
.chat-input-row input { flex: 1; padding: 10px 12px; background: var(--navy-950); border: 1px solid var(--navy-700); border-radius: 8px; color: var(--ink-100); font-size: 13.5px; }
.chat-input-row input::placeholder { color: var(--slate-500); }
.chat-input-row input:focus { outline: none; border-color: var(--orange-500); }
.chat-input-row button { padding: 0 16px; background: var(--orange-500); color: var(--navy-950); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 8px; }
.chat-input-row button:hover { background: var(--orange-400); }

footer.site-footer { margin-top: 28px; font-size: 12px; color: var(--slate-500); text-align: center; }

@media (max-width: 480px) {
  .row { grid-template-columns: 32px 1fr 44px 72px; gap: 10px; }
  .row-compact { grid-template-columns: 24px 1fr 46px 44px; gap: 6px; }
  .cand-row { grid-template-columns: 26px 1fr 50px 40px; gap: 8px; }
  .name { font-size: 14px; }
  .seal { left: 28px; font-size: 8px; }
  .navlinks { gap: 14px; }
  .countdown .unit { min-width: 62px; padding: 12px 14px; }
  .countdown .num { font-size: 22px; }
  .add-row { flex-direction: column; }
}
