/* =========================================================
   HIGH BAR LOW BAR — Main Stylesheet
   Aesthetic: precision instrument / calibration gauge
   Fonts: Cormorant Garamond (display) + Space Mono (data/UI)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Space+Mono:wght@400;700&display=swap');

/* === CUSTOM PROPERTIES — dark mode (default) === */

:root,
[data-theme="dark"] {
  /* Background layers */
  --bg:         #0b0b10;
  --bg-surface: #111118;
  --bg-raised:  #17171f;

  /* Borders */
  --border:        #1e1e2c;
  --border-bright: #2a2a3e;

  /* Text */
  --text:   #e2ddd6;
  --text-2: #7a7488;
  --text-3: #3e3b48;

  /* Accent (amber) */
  --accent:       #e8a020;
  --accent-light: #f0b848;
  --accent-dim:   rgba(232, 160, 32, 0.10);
  --accent-glow:  rgba(232, 160, 32, 0.22);

  /* Status */
  --status-open-bg:    rgba(42, 102, 68, 0.25);
  --status-open-text:  #5bb88a;
  --status-closed-bg:  rgba(90, 40, 40, 0.30);
  --status-closed-text:#c07070;

  /* Gauge / instrument panel */
  --gauge-bg:    #0b0b10;
  --gauge-track: #16161f;

  /* Nav */
  --nav-bg: rgba(11, 11, 16, 0.92);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* Spacing scale */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-6:  1.5rem;
  --s-8:  2rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;

  /* Layout */
  --max-w:    1040px;
  --nav-h:    56px;
  --radius:   3px;
  --radius-lg:6px;
}

/* === LIGHT MODE OVERRIDES === */

[data-theme="light"] {
  --bg:         #f4f1ec;
  --bg-surface: #ffffff;
  --bg-raised:  #ede9e3;

  --border:        #dcd7ce;
  --border-bright: #c5bdb2;

  --text:   #1c1916;
  --text-2: #6b6458;
  --text-3: #aaa099;

  /* Darker amber so it reads on light backgrounds */
  --accent:       #b87200;
  --accent-light: #d08810;
  --accent-dim:   rgba(184, 114, 0, 0.10);
  --accent-glow:  rgba(184, 114, 0, 0.18);

  --status-open-bg:    rgba(20, 90, 55, 0.10);
  --status-open-text:  #176038;
  --status-closed-bg:  rgba(110, 20, 20, 0.10);
  --status-closed-text:#882020;

  /* The gauge illustration always stays dark — instrument panel aesthetic */
  --gauge-bg:    #0d0d14;
  --gauge-track: #16161f;

  /* Nav */
  --nav-bg: rgba(244, 241, 236, 0.95);
}

/* Smooth transition between themes (skip on initial load via JS) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.25s ease, color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* === RESET === */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
button, input, textarea, select { font: inherit; }

/* === TYPOGRAPHY === */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; }

.display-serif {
  font-family: var(--font-display);
}

.mono {
  font-family: var(--font-mono);
}

.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-2); }
.text-sm       { font-size: 0.75rem; }
.text-lg       { font-size: 1rem; }
.text-xl       { font-size: 1.125rem; }

/* === LAYOUT === */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.main {
  flex: 1;
  padding-bottom: var(--s-24);
}

/* === NAVIGATION === */

.nav {
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--accent); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.nav-cta:hover {
  background: var(--accent);
  color: #0b0b10;
}

.nav-theme-toggle {
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.nav-theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === FOOTER === */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-6) var(--s-6);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-3);
}
.footer a {
  color: var(--text-2);
}
.footer a:hover {
  color: var(--accent);
}

/* === BUTTONS === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 0 var(--s-6);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0b0b10;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-2);
}

.btn-danger {
  background: transparent;
  color: var(--status-closed-text);
  border: 1px solid var(--status-closed-text);
}
.btn-danger:hover {
  background: var(--status-closed-bg);
}

.btn-sm {
  min-height: 36px;
  font-size: 0.7rem;
  padding: 0 var(--s-4);
}

/* === FORMS === */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.form-label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-3);
  margin-left: var(--s-2);
}

.form-input,
.form-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  padding: var(--s-3) var(--s-4);
  min-height: 44px;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-3);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.form-hint {
  font-size: 0.7rem;
  color: var(--text-3);
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
  gap: var(--s-4);
}

.toggle-row:last-of-type {
  border-bottom: none;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.toggle-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.toggle-desc {
  font-size: 0.7rem;
  color: var(--text-2);
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: var(--border-bright);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--text-3);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s, background 0.2s;
}

.toggle-checkbox:checked + .toggle-track {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
}

.toggle-checkbox:checked + .toggle-track::after {
  transform: translateX(20px);
  background: var(--accent);
}

.toggle-checkbox:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Error message */
.form-error {
  background: var(--status-closed-bg);
  border: 1px solid var(--status-closed-text);
  color: var(--status-closed-text);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin-bottom: var(--s-6);
}

/* === BANNER / FLASH === */

.banner {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-6);
  margin-bottom: var(--s-8);
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
}

.banner-icon {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.banner-body {
  flex: 1;
}

.banner-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-1);
}

.banner-text {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* === STATUS BADGES === */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}

.badge-open {
  background: var(--status-open-bg);
  color: var(--status-open-text);
}

.badge-closed {
  background: var(--status-closed-bg);
  color: var(--status-closed-text);
}

.badge-public {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-private {
  background: var(--bg-raised);
  color: var(--text-2);
}

/* === CARD === */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-8);
}

/* === COPY LINK GROUP === */

.copy-group {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--s-4);
}

.link-display {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-raised);
  word-break: break-all;
  border: none;
  outline: none;
  cursor: text;
  user-select: all;
}

.btn-copy {
  background: var(--bg-surface);
  border: none;
  border-left: 1px solid var(--border-bright);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 var(--s-4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  min-height: 44px;
}

.btn-copy:hover {
  background: var(--accent);
  color: #0b0b10;
}

/* === RESPONSE TABLE === */

.response-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.response-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.response-table th {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  background: var(--bg-raised);
  color: var(--text-2);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.response-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.response-table tr:last-child td {
  border-bottom: none;
}

.response-table tr:hover td {
  background: var(--bg-raised);
}

.response-range {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.response-name {
  color: var(--text);
}

.response-anon {
  color: var(--text-3);
  font-style: italic;
}

.response-time {
  color: var(--text-2);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Hide extra columns on small screens */
@media (max-width: 480px) {
  .response-table .hide-sm {
    display: none;
  }
}

/* === STATS GRID (superadmin) === */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--s-2);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* === SECTION HEADING === */

.section-heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
}

/* === LANDING: HERO === */

.hero {
  padding: var(--s-24) 0 var(--s-16);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-12);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-style: italic;
  font-weight: 600;
  line-height: 0.95;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-6);
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-6);
  line-height: 1.7;
  max-width: 380px;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--s-8);
  font-family: var(--font-mono);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.7rem;
  color: var(--text-3);
}

/* Decorative gauge illustration — stays dark in both themes (instrument panel) */
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: var(--gauge-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.gauge-svg {
  filter: drop-shadow(0 0 24px var(--accent-glow));
}

/* Gauge band + histogram elements — delay set via inline style attribute */
.gauge-band {
  opacity: 0;
  animation: bandIn 0.7s ease forwards;
}

.gauge-handle {
  opacity: 0;
  animation: bandIn 0.4s ease 2.4s forwards;
}

/* Histogram bars and stats — delays set via inline style attribute */
.hist-bar {
  opacity: 0;
  animation: bandIn 0.45s ease forwards;
}

.gauge-stats {
  opacity: 0;
  animation: bandIn 0.5s ease forwards;
}

@keyframes bandIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* === LANDING: HOW IT WORKS === */

.how-it-works {
  padding: var(--s-16) 0;
  border-top: 1px solid var(--border);
}

.how-it-works h2 {
  font-style: italic;
  margin-bottom: var(--s-12);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8);
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(33.33% + var(--s-4));
  right: calc(33.33% + var(--s-4));
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--border));
}

.step {
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: var(--s-4);
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* === LANDING: USE CASES === */

.use-cases {
  padding: var(--s-16) 0;
  border-top: 1px solid var(--border);
}

.use-cases h2 {
  font-style: italic;
  margin-bottom: var(--s-8);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}

.use-case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  transition: border-color 0.2s, transform 0.2s;
}

.use-case-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.use-case-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.use-case-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
}

.use-case-high {
  font-size: 0.75rem;
  color: var(--status-open-text);
  margin-bottom: var(--s-1);
}

.use-case-low {
  font-size: 0.75rem;
  color: var(--status-closed-text);
}

/* === POLL CREATION PAGE === */

.create-layout {
  max-width: 600px;
  margin: var(--s-16) auto 0;
}

.create-header {
  margin-bottom: var(--s-12);
}

.create-header h1 {
  font-style: italic;
  margin-bottom: var(--s-3);
}

.create-header p {
  color: var(--text-2);
  font-size: 0.875rem;
}

.label-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.toggles-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}

/* === VOTE PAGE === */

.vote-layout {
  max-width: 500px;
  margin: var(--s-16) auto 0;
}

.vote-header {
  margin-bottom: var(--s-12);
}

.vote-title {
  font-style: italic;
  margin-bottom: var(--s-3);
}

.vote-question {
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: var(--font-mono);
}

.vote-name-field {
  margin-top: var(--s-8);
}

.vote-submit {
  margin-top: var(--s-8);
  width: 100%;
}

/* === THANKS PAGE === */

.thanks-layout {
  max-width: 600px;
  margin: var(--s-16) auto 0;
  text-align: center;
}

.thanks-icon {
  font-size: 2rem;
  margin-bottom: var(--s-4);
}

.thanks-title {
  font-style: italic;
  margin-bottom: var(--s-4);
}

.thanks-range {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-8);
  margin-bottom: var(--s-8);
}

.thanks-range-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.thanks-range-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.thanks-sep {
  color: var(--text-3);
  font-size: 0.875rem;
}

.thanks-results {
  text-align: left;
  margin-top: var(--s-12);
  padding-top: var(--s-8);
  border-top: 1px solid var(--border);
}

/* === ADMIN PAGE === */

.admin-layout {
  margin-top: var(--s-12);
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}

.admin-title-group {
  flex: 1;
}

.admin-title {
  font-style: italic;
  margin-bottom: var(--s-2);
}

.admin-badges {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  margin-top: var(--s-8);
}

.admin-share-section {
  margin-bottom: var(--s-8);
}

/* === RESULTS PAGE === */

.results-layout {
  max-width: 760px;
  margin: var(--s-12) auto 0;
}

.results-header {
  margin-bottom: var(--s-8);
}

.results-title {
  font-style: italic;
  margin-bottom: var(--s-3);
}

.results-count {
  font-size: 0.8rem;
  color: var(--text-2);
}

/* === RESULTS CHART === */

.chart-section {
  margin-top: var(--s-8);
}

.chart-stats {
  display: flex;
  gap: var(--s-8);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}

.chart-stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.chart-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
}

.chart-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.chart-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--s-8);
  align-items: start;
}

.chart-empty {
  color: var(--text-3);
  font-size: 0.875rem;
  text-align: center;
  padding: var(--s-12) 0;
}

/* === ERROR PAGE === */

.error-layout {
  max-width: 480px;
  margin: var(--s-24) auto 0;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--text-3);
  line-height: 1;
  margin-bottom: var(--s-4);
}

.error-message {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: var(--s-8);
}

/* === PAGE HEADER (generic) === */

.page-header {
  padding: var(--s-12) 0 var(--s-8);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-8);
}

/* === CLOSED POLL PAGE === */

.closed-layout {
  max-width: 480px;
  margin: var(--s-24) auto 0;
  text-align: center;
}

.closed-icon {
  font-size: 2.5rem;
  color: var(--text-3);
  margin-bottom: var(--s-6);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: var(--s-16) 0 var(--s-12);
    gap: var(--s-8);
  }

  .hero-illustration {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .steps::before { display: none; }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .label-pair {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --s-24: 3rem;
    --s-16: 2.5rem;
  }

  .create-layout,
  .vote-layout {
    margin-top: var(--s-8);
  }

  .admin-header {
    flex-direction: column;
  }
}
