/**
 * @file styles.css
 * @description VoteWise India — Design System & Component Styles
 * Design tokens (CSS custom properties), layout, and all UI components.
 */

:root {
  --saffron: #FF6B00;
  --saffron-lt: rgba(255, 107, 0, 0.12);
  --saffron-glow: 0 0 32px rgba(255, 107, 0, 0.2);
  --white: #FDFAF6;
  --green: #138808;
  --green-lt: rgba(19, 136, 8, 0.12);
  --navy: #000080;
  --bg: #0D0F14;
  --bg-1: #12151C;
  --bg-2: #171B24;
  --bg-3: #1C2130;
  --bg-4: #212740;
  --border: #252B3B;
  --border-hi: #3A4460;
  --text: #EEE8DF;
  --text-2: #9A8E80;
  --text-3: #5A5248;
  --gold: #F0A500;
  --gold-lt: rgba(240, 165, 0, 0.12);
  --r: 10px;
  --r-sm: 6px;
  --font-h: 'Playfair Display', serif;
  --font-b: 'DM Sans', sans-serif;
  --font-m: 'DM Mono', monospace;
}

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

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Skip to content for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--saffron);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s;
  z-index: 999;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Ashoka Chakra inspired bg pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(19, 136, 8, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 0, 128, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--saffron-glow);
}

.logo-text {
  font-family: var(--font-h);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-text span {
  color: var(--saffron);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#auth-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--saffron-lt);
  border: 1px solid var(--saffron);
  color: var(--saffron);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-b);
  transition: all 0.15s;
  white-space: nowrap;
}

#auth-btn:hover {
  background: var(--saffron);
  color: #fff;
}

.lang-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--r-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-family: var(--font-b);
  cursor: pointer;
}

/* ── Nav ────────────────────────────────────────────────── */
nav {
  background: var(--bg-1);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--saffron), var(--white) 50%, var(--green)) 1;
  position: sticky;
  top: 64px;
  z-index: 99;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 1.5rem;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.1rem;
  height: 48px;
  font-family: var(--font-b);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.nav-btn:hover {
  color: var(--text);
}

.nav-btn.active {
  color: var(--saffron);
  border-bottom-color: var(--saffron);
}

/* ── Main ───────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Section Title ──────────────────────────────────────── */
.section-title {
  font-family: var(--font-h);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ── HOME ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.08), transparent 70%);
  pointer-events: none;
}

/* The 🇮🇳 is replaced by the rotating Ashoka Chakra (.chakra) */

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--saffron-lt);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--saffron);
  margin-bottom: 1rem;
}

.hero-tag::before {
  content: '●';
  font-size: 0.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

.hero h1 {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero h1 span {
  color: var(--saffron);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.6;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.fact-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.fact-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.fact-val {
  font-family: var(--font-h);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--saffron);
}

.fact-lbl {
  font-size: 0.78rem;
  color: var(--text-2);
  margin-top: 4px;
}

.election-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.type-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.type-card:hover {
  border-color: var(--border-hi);
}

.type-name {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--saffron);
}

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

.type-meta {
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 0.6rem;
}

/* ── HOW TO VOTE ────────────────────────────────────────── */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: start;
  transition: border-color 0.2s, transform 0.15s;
}

.step-card:hover {
  border-color: var(--saffron);
  transform: translateX(4px);
}

@media (max-width: 500px) {
  .step-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .step-num {
    margin-bottom: 0.5rem;
  }
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--saffron-lt);
  border: 2px solid rgba(255, 107, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--saffron);
}

.step-icon {
  font-size: 1.4rem;
  text-align: center;
}

.step-title {
  font-family: var(--font-h);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

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

/* ── QUIZ ───────────────────────────────────────────────── */
.quiz-container {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-text {
  font-family: var(--font-m);
  font-size: 0.75rem;
  color: var(--text-2);
  white-space: nowrap;
}

.quiz-question {
  font-family: var(--font-h);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-b);
  color: var(--text);
  transition: all 0.15s;
}

.quiz-option:hover {
  border-color: var(--saffron);
  background: var(--saffron-lt);
}

.quiz-option.selected {
  border-color: var(--saffron);
  background: var(--saffron-lt);
  color: var(--saffron);
  font-weight: 700;
}

.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-lt);
  color: #4CAF50;
  font-weight: 700;
}

.quiz-option.wrong {
  border-color: #ef5350;
  background: rgba(239, 83, 80, 0.1);
  color: #ef5350;
}

.quiz-option.dimmed {
  opacity: 0.45;
}

.quiz-review {
  margin-top: 1.5rem;
  text-align: left;
}

.review-item {
  border-left: 3px solid var(--border);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--bg-2);
}

.review-item.review-correct { border-left-color: var(--green); }
.review-item.review-wrong { border-left-color: #ef5350; }

.review-q {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.review-a {
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 0.35rem;
}

.review-explain {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
  font-style: italic;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.65rem 1.5rem;
  border-radius: var(--r-sm);
  font-family: var(--font-b);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--saffron);
  color: #fff;
}

.btn-primary:hover {
  background: #e55e00;
}

.btn-secondary {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-secondary:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

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

/* Quiz result */
.quiz-result {
  text-align: center;
  padding: 1rem;
}

.result-score {
  font-family: var(--font-h);
  font-size: 4rem;
  font-weight: 800;
  color: var(--saffron);
  line-height: 1;
}

.result-label {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.result-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ── VENUE MAP ──────────────────────────────────────────── */
.map-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media(max-width:768px) {
  .map-section {
    grid-template-columns: 1fr;
  }
}

.map-frame {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

.eci-info {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
}

.eci-info h3 {
  font-family: var(--font-h);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 0.75rem;
}

.eci-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  transition: all 0.15s;
}

.eci-link:hover {
  border-color: var(--saffron);
  color: var(--saffron);
}

/* ── AI CHAT ────────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 1.5rem;
}

@media(max-width:768px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
}

.chat-container {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  height: 560px;
}

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--saffron-glow);
}

.chat-title {
  font-family: var(--font-h);
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-sub {
  font-size: 0.72rem;
  color: var(--text-2);
}

.online-dot {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-m);
  font-size: 0.68rem;
  color: var(--green);
}

.online-dot::before {
  content: '●';
  font-size: 0.5rem;
  animation: pulse 2s infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  animation: fadeIn 0.2s ease;
}

.msg.user {
  flex-direction: row-reverse;
}

.msg-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  font-family: var(--font-m);
}

.msg.bot .msg-av {
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: #fff;
}

.msg.user .msg-av {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.msg-bubble {
  max-width: 78%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.845rem;
  line-height: 1.65;
}

.msg.bot .msg-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg.user .msg-bubble {
  background: var(--saffron-lt);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-bottom-right-radius: 4px;
}

.msg-bubble strong {
  color: var(--saffron);
}

.msg-bubble ul {
  padding-left: 1.2rem;
  margin-top: 0.3rem;
}

.msg-bubble li {
  margin-bottom: 0.2rem;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.7rem 1rem;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: .2s
}

.typing-dot:nth-child(3) {
  animation-delay: .4s
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .4
  }

  30% {
    transform: translateY(-6px);
    opacity: 1
  }
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

#chat-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-b);
  font-size: 0.85rem;
  color: var(--text);
  resize: none;
  max-height: 100px;
  min-height: 38px;
  outline: none;
  transition: border-color 0.15s;
}

#chat-input:focus {
  border-color: var(--saffron);
}

#chat-input::placeholder {
  color: var(--text-3);
}

#send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--saffron);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 15px;
  transition: background 0.15s, transform 0.1s;
}

#send-btn:hover {
  background: #e55e00;
}

#send-btn:active {
  transform: scale(0.95);
}

#send-btn:disabled {
  background: var(--bg-3);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

.sidebar-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-family: var(--font-h);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 0.75rem;
}

.quick-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: 0.45rem;
  transition: all 0.15s;
  font-family: var(--font-b);
}

.quick-btn:hover {
  background: var(--saffron-lt);
  border-color: var(--saffron);
  color: var(--saffron);
}

.quick-btn:last-child {
  margin-bottom: 0;
}

/* ── DATES ──────────────────────────────────────────────── */
.dates-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.date-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s;
}

@media (max-width: 600px) {
  .date-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .date-dot {
    display: none;
  }
  .cal-btn {
    width: 100%;
    justify-content: center;
  }
}

.date-card:hover {
  border-color: var(--border-hi);
}

.date-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.date-dot.election {
  background: var(--saffron);
}

.date-dot.general {
  background: var(--gold);
}

.date-dot.local {
  background: var(--green);
}

.date-dot.admin {
  background: var(--text-3);
}

.date-info {
  flex: 1;
}

.date-event {
  font-size: 0.9rem;
  font-weight: 600;
}

.date-when {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 2px;
}

.cal-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-b);
  flex-shrink: 0;
  transition: all 0.15s;
}

.cal-btn:hover {
  background: var(--saffron-lt);
  border-color: var(--saffron);
  color: var(--saffron);
}

/* ── ANNOUNCEMENTS ──────────────────────────────────────── */
.ann-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ann-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ann-item.info {
  border-left: 3px solid var(--saffron);
}

.ann-item.success {
  border-left: 3px solid var(--green);
}

.ann-item.warning {
  border-left: 3px solid var(--gold);
}

.ann-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.ann-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

.ann-time {
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Translate ──────────────────────────────────────────── */
.translate-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  max-width: 640px;
}

.translate-box select,
.translate-box textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-b);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}

.translate-box select:focus,
.translate-box textarea:focus {
  border-color: var(--saffron);
}

.translate-result {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  min-height: 60px;
  color: var(--text);
  margin-top: 0.75rem;
}

/* ── Utility ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.loading-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-3);
  font-family: var(--font-m);
  font-size: 0.8rem;
}

.error-state {
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.3);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  color: #ef5350;
  font-size: 0.85rem;
}

@media(max-width:640px) {
  main {
    padding: 1.25rem 1rem 3rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .step-card {
    grid-template-columns: 48px 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOTION & MICRO-INTERACTIONS
   All animations respect prefers-reduced-motion (see bottom).
   ═══════════════════════════════════════════════════════════ */

/* ── Ashoka Chakra — decorative, rotates slowly in the hero ── */
.chakra {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  opacity: 0.18;
  pointer-events: none;
  animation: chakra-spin 80s linear infinite;
}

.chakra svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes chakra-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ── Hero title staggered entrance ─────────────────────────── */
.hero-tag {
  opacity: 0;
  animation: hero-fade 0.5s ease-out 0.05s forwards;
}

.hero h1 {
  opacity: 0;
  animation: hero-fade 0.6s ease-out 0.2s forwards;
}

.hero-sub {
  opacity: 0;
  animation: hero-fade 0.6s ease-out 0.4s forwards;
}

@keyframes hero-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Logo idle glow ────────────────────────────────────────── */
.logo-icon {
  animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 32px rgba(255, 107, 0, 0.5);
  }
}

/* ── Nav active indicator: wipe-in underline ───────────────── */
.nav-btn {
  position: relative;
}

.nav-btn.active {
  border-bottom-color: transparent;
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: 2px 2px 0 0;
  animation: nav-slide 0.3s ease-out;
}

@keyframes nav-slide {
  from {
    left: 50%;
    right: 50%;
    opacity: 0;
  }

  to {
    left: 10%;
    right: 10%;
    opacity: 1;
  }
}

/* ── Scroll-reveal cards (facts, election types, steps, dates) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Fact card: saffron shimmer on hover ───────────────────── */
.fact-card {
  position: relative;
  overflow: hidden;
}

.fact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 107, 0, 0.1),
      transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.fact-card:hover::before {
  left: 100%;
}

/* ── Type card: animated border gradient on hover ──────────── */
.type-card {
  position: relative;
}

.type-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--saffron), transparent 40%, transparent 60%, var(--green));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.type-card:hover::after {
  opacity: 1;
}

/* ── Progress bar: moving shine ────────────────────────────── */
.progress-fill {
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  to {
    left: 150%;
  }
}

/* ── Quiz options: stagger-reveal on question change ───────── */
.quiz-option {
  animation: option-rise 0.3s ease-out forwards;
}

.quiz-option:nth-child(1) { animation-delay: 0s; }
.quiz-option:nth-child(2) { animation-delay: 0.07s; }
.quiz-option:nth-child(3) { animation-delay: 0.14s; }
.quiz-option:nth-child(4) { animation-delay: 0.21s; }

@keyframes option-rise {
  from {
    opacity: 0.3;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Button press feedback ─────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.35);
}

/* ── Step card enhanced hover ──────────────────────────────── */
.step-card {
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 107, 0, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.step-card:hover::before {
  opacity: 1;
}

.step-num {
  transition: transform 0.3s ease;
}

.step-card:hover .step-num {
  transform: scale(1.08) rotate(-5deg);
}

/* ── Filter Pills ───────────────────────────────────────── */
.filter-pills-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.78rem;
  font-family: var(--font-b);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.filter-pill.active {
  background: var(--saffron-lt);
  border-color: var(--saffron);
  color: var(--saffron);
  font-weight: 600;
}

/* ── Parliament / President shared grid ─────────────────── */
.parl-grid,
.pres-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media(max-width: 768px) {
  .parl-grid,
  .pres-grid {
    grid-template-columns: 1fr;
  }
}

.parl-card,
.pres-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.parl-card:hover,
.pres-card:hover {
  border-color: var(--border-hi);
}

.parl-card h3,
.pres-card h3 {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.parl-stat {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.parl-stat:last-child {
  border-bottom: none;
}

.parl-stat .label {
  color: var(--text-3);
  font-family: var(--font-m);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 90px;
}

.parl-stat .value {
  color: var(--text);
  text-align: right;
  line-height: 1.5;
}

.pres-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.pres-list li {
  font-size: 0.82rem;
  color: var(--text-2);
  padding: 0.4rem 0 0.4rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  line-height: 1.5;
}

.pres-list li:last-child {
  border-bottom: none;
}

.pres-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--saffron);
  font-size: 1rem;
  line-height: 1.4;
}

/* ── States Table ────────────────────────────────────────── */
.states-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 640px;
}

@media (max-width: 768px) {
  .states-table {
    min-width: 0 !important;
    display: block;
  }

  .states-table thead {
    display: none;
  }

  .states-table tbody, .states-table tr {
    display: block;
    width: 100%;
  }

  .states-table tr {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .states-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    gap: 1rem;
  }

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

  .states-table td::before {
    content: attr(data-label);
    font-family: var(--font-m);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    text-align: left;
    flex-shrink: 0;
  }
}

.states-table th {
  text-align: left;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-m);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border-bottom: 2px solid var(--border);
  background: var(--bg-1);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.states-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  vertical-align: middle;
}

.states-table tbody tr:hover {
  background: var(--bg-2);
}

.state-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-sm);
  font-family: var(--font-m);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-state {
  background: var(--saffron-lt);
  color: var(--saffron);
  border: 1px solid rgba(255, 107, 0, 0.3);
}

.badge-ut {
  background: var(--green-lt);
  color: var(--green);
  border: 1px solid rgba(19, 136, 8, 0.3);
}

/* ── Accessibility: visible focus indicator for keyboard users
   (WCAG 2.4.7). :focus-visible only triggers for keyboard focus,
   not mouse clicks — so it doesn't pollute the UI for mouse users. */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 4px;
}

.nav-btn:focus-visible,
.quick-btn:focus-visible,
.filter-pill:focus-visible,
.quiz-option:focus-visible,
.btn:focus-visible,
#auth-btn:focus-visible,
#send-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.15);
}

a:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 3px;
}

#chat-input:focus-visible,
.translate-box textarea:focus-visible,
.translate-box select:focus-visible,
.lang-select:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 1px;
  border-color: var(--saffron);
}

/* ── Section subtitle ──────────────────────────────────────── */
.section-sub {
  font-size: 0.88rem;
  color: var(--text-2);
  margin: -0.75rem 0 1.5rem;
  line-height: 1.65;
  max-width: 700px;
}

/* ── Voter Readiness Widget ────────────────────────────────── */
.readiness-widget {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border-hi);
  border-left: 4px solid var(--saffron);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.readiness-left {
  flex: 0 0 220px;
}

.readiness-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.readiness-subtitle {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}

.readiness-meter {
  background: var(--bg-4);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.readiness-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: 20px;
  transition: width 0.6s ease;
}

.readiness-pct {
  font-family: var(--font-m);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--saffron);
}

.readiness-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.readiness-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-2);
  font-family: var(--font-m);
}

.rd-icon {
  font-size: 1rem;
}

/* ── EVM Demo ───────────────────────────────────────────────── */
.evm-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.evm-steps-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evm-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  flex: 1;
  min-width: 140px;
  opacity: 0.5;
  transition: all 0.3s;
}

.evm-step.active {
  opacity: 1;
  border-color: var(--saffron);
  background: var(--saffron-lt);
}

.evm-step.completed {
  opacity: 0.8;
  border-color: var(--green);
  background: var(--green-lt);
}

.evm-step-num {
  width: 24px;
  height: 24px;
  background: var(--bg-4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.evm-step.active .evm-step-num  { background: var(--saffron); color: #fff; }
.evm-step.completed .evm-step-num { background: var(--green); color: #fff; }

.evm-step-label {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.3;
}

.evm-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .evm-main {
    grid-template-columns: 1fr 1fr;
  }
  .evm-layout {
    grid-template-columns: 1fr 280px;
  }
}

.evm-machine {
  background: #1a1f2e;
  border: 2px solid #2d3455;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.evm-header {
  background: linear-gradient(135deg, #0a0e1a, #161c2e);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #2d3455;
}

.evm-logo {
  font-size: 0.72rem;
  color: #8899bb;
  font-family: var(--font-m);
  margin-bottom: 0.2rem;
}

.evm-model {
  font-size: 0.65rem;
  color: #556680;
  font-family: var(--font-m);
}

.evm-control-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #141826;
  border-bottom: 1px solid #2d3455;
  flex-wrap: wrap;
}

.evm-ctrl-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #444;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.evm-ctrl-led.active {
  background: #22cc44;
  box-shadow: 0 0 8px rgba(34,204,68,0.6);
}

.evm-ctrl-status {
  font-size: 0.72rem;
  color: #8899bb;
  font-family: var(--font-m);
  flex: 1;
  min-width: 120px;
}

.evm-ballot-btn {
  background: #0a3a0a;
  border: 1px solid #22cc44;
  color: #22cc44;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-m);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.evm-ballot-btn:hover:not(:disabled) {
  background: #0f5a0f;
  box-shadow: 0 0 12px rgba(34,204,68,0.3);
}

.evm-ballot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.evm-candidates-list {
  padding: 0.5rem 0;
}

.evm-candidate-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #1e2438;
  transition: background 0.15s;
}

.evm-candidate-row:last-child { border-bottom: none; }
.evm-candidate-row:hover { background: rgba(255,255,255,0.03); }

.evm-slot-num {
  width: 20px;
  font-size: 0.7rem;
  color: #556680;
  font-family: var(--font-m);
  flex-shrink: 0;
}

.evm-symbol {
  width: 28px;
  text-align: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.evm-cand-info {
  flex: 1;
  min-width: 0;
}

.evm-cand-name {
  font-size: 0.82rem;
  color: #ccd0e0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evm-cand-party {
  font-size: 0.68rem;
  color: #8899bb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evm-vote-btn {
  background: #1a1f2e;
  border: 1px solid #3a4460;
  color: #8899bb;
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-family: var(--font-m);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.evm-vote-btn:not(:disabled):hover {
  background: #0a3060;
  border-color: #4a70cc;
  color: #aabbee;
}

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

.evm-vote-btn:not(:disabled) {
  background: #0d1e3e;
  border-color: #2a4898;
  color: #6688dd;
  animation: pulse-btn 1.5s infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(68,136,220,0.4); }
}

.evm-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c00;
  border: 1px solid #900;
  flex-shrink: 0;
  transition: all 0.3s;
}

.evm-led.voted {
  background: #22cc44;
  border-color: #22cc44;
  box-shadow: 0 0 8px rgba(34,204,68,0.6);
}

/* VVPAT Box */
.vvpat-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.vvpat-label {
  background: var(--bg-3);
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-2);
  font-family: var(--font-m);
  border-bottom: 1px solid var(--border);
}

.vvpat-window {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #0d1117;
}

.vvpat-idle {
  text-align: center;
  color: var(--text-3);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vvpat-slip {
  background: #fffef0;
  color: #111;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  width: 100%;
  max-width: 220px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: 1px dashed #ccc;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  animation: slip-in 0.4s ease;
}

@keyframes slip-in {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.vvpat-slip-header {
  font-size: 0.62rem;
  color: #555;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3rem;
}

.vvpat-slip-symbol { font-size: 2rem; }

.vvpat-slip-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
}

.vvpat-slip-party {
  font-size: 0.7rem;
  color: #444;
}

.vvpat-slip-num {
  font-size: 0.65rem;
  color: #777;
  font-family: monospace;
}

.vvpat-timer {
  font-size: 0.7rem;
  color: #c00;
  font-weight: 600;
  border-top: 1px solid #ddd;
  padding-top: 0.3rem;
  margin-top: 0.2rem;
}

.vvpat-info {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  font-family: var(--font-m);
}

.evm-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.evm-result-card {
  border-color: var(--green) !important;
  background: var(--green-lt) !important;
}

/* ── Checklist ──────────────────────────────────────────────── */
.checklist-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .checklist-layout {
    grid-template-columns: 1fr 260px;
  }
}

.checklist-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.checklist-progress-label {
  font-size: 0.88rem;
  color: var(--text-2);
}

.checklist-pct-badge {
  font-family: var(--font-m);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--saffron);
  background: var(--saffron-lt);
  border: 1px solid var(--saffron);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.checklist-bar-wrap { margin-bottom: 1.25rem; }

.checklist-bar {
  background: var(--bg-3);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.checklist-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  border-radius: 20px;
  transition: width 0.5s ease;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.checklist-item:hover {
  border-color: var(--saffron);
  background: var(--saffron-lt);
}

.checklist-item.done {
  background: var(--green-lt);
  border-color: var(--green);
  opacity: 0.85;
}

.checklist-item input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.cl-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}

.cl-content {
  flex: 1;
  min-width: 0;
}

.cl-task {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.checklist-item.done .cl-task {
  text-decoration: line-through;
  color: var(--text-2);
}

.cl-hint {
  display: block;
  font-size: 0.73rem;
  color: var(--text-3);
  line-height: 1.4;
}

.cl-priority {
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  font-family: var(--font-m);
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.priority-high   { background: rgba(220,30,30,0.15); color: #ee5555; border: 1px solid rgba(220,30,30,0.3); }
.priority-medium { background: var(--saffron-lt);    color: var(--saffron); border: 1px solid rgba(255,107,0,0.3); }
.priority-low    { background: var(--green-lt);      color: var(--green);   border: 1px solid rgba(19,136,8,0.3); }

.checklist-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn-secondary {
  background: var(--green-lt);
  border: 1px solid var(--green);
  color: var(--green);
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { background: rgba(19,136,8,0.25); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--text-2);
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover { border-color: var(--saffron); color: var(--saffron); }

.checklist-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Accessibility: honour reduced-motion preference ───────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .chakra {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
