/**
 * Election theme — แยกจากธีมกีฬาหลัก (The World Ready)
 * โทนข่าว/สาธารณะ: น่าเชื่อถือ อ่านง่าย เน้นข้อมูลก่อน
 */
.election-page {
  --el-bg: #f4f6f9;
  --el-surface: #ffffff;
  --el-ink: #0f172a;
  --el-ink-soft: #334155;
  --el-muted: #64748b;
  --el-line: #e2e8f0;
  --el-navy: #1e3a5f;
  --el-navy-dark: #0f2744;
  --el-accent: #b45309;
  --el-red: #b91c1c;
  --el-green: #15803d;
  --el-pink: #be185d;
  --el-maxw: 1100px;
  --el-font: 'Sarabun', 'Noto Sans Thai', system-ui, sans-serif;
  --el-mono: 'Sarabun', system-ui, sans-serif;
}

.election-page {
  background: var(--el-bg);
  color: var(--el-ink);
  font-family: var(--el-font);
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.election-page::before { display: none; }

.election-page h1,
.election-page h2,
.election-page h3 {
  font-family: var(--el-font);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.election-page a { color: var(--el-navy); text-decoration: none; }
.election-page a:hover { text-decoration: underline; }

/* ---- masthead ---- */
.el-masthead {
  background: var(--el-navy-dark);
  color: #fff;
  border-bottom: 4px solid var(--el-red);
}

.el-masthead-inner {
  max-width: var(--el-maxw);
  margin: 0 auto;
  padding: 14px 24px;
}

.el-masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.el-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--el-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.el-masthead a.el-brand {
  color: #fff;
  opacity: 0.95;
  text-decoration: none;
}

.el-masthead a.el-brand:hover {
  color: #fff;
  opacity: 1;
  text-decoration: none;
}

.el-masthead .el-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.el-masthead h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: #fff;
  margin: 0 0 6px;
}

.el-masthead .el-sub {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
  max-width: 640px;
}

.el-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--el-mono);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.65);
}

.el-trust-bar span::before {
  content: "✓ ";
  color: #86efac;
}

.el-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.el-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 4px 0;
}

.el-nav a:hover,
.el-nav a.active { color: #fff; text-decoration: underline; }

/* ---- layout ---- */
.el-wrap {
  max-width: var(--el-maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.el-main { flex: 1; padding: 28px 0 48px; }

/* ---- countdown (ธีมบัตรเลือกตั้ง กทม.) ---- */
.is-hidden { display: none !important; }

.el-countdown-wrap,
.el-results-hero {
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(15, 39, 68, 0.1);
  border: 1px solid var(--el-line);
  background: #fff;
}

.el-ballot-bar {
  display: flex;
  height: 10px;
}

.el-ballot-bar .green {
  flex: 1;
  background: linear-gradient(90deg, #1f7a3f, #3dba6a);
}

.el-ballot-bar .pink {
  flex: 1;
  background: linear-gradient(90deg, #d4578f, #f0a8c8);
}

.el-countdown-hero {
  padding: 32px 28px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(46, 158, 82, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(232, 145, 184, 0.06), transparent 60%),
    #fff;
}

.el-cd-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--el-navy);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.el-cd-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--el-navy-dark);
  margin: 0 0 6px;
}

.el-cd-sub {
  font-size: 0.92rem;
  color: var(--el-muted);
  margin: 0 0 24px;
}

.el-cd-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.el-cd-unit {
  background: #f8fafc;
  border: 1px solid var(--el-line);
  border-radius: 12px;
  padding: 16px 14px;
  min-width: 72px;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.05);
}

.el-cd-unit.green-top { border-top: 4px solid #2e9e52; }
.el-cd-unit.pink-top { border-top: 4px solid #e891b8; }

.el-cd-unit .num {
  display: block;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--el-navy-dark);
}

.el-cd-unit .lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--el-muted);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.el-cd-colon {
  font-size: 2rem;
  font-weight: 700;
  color: #cbd5e1;
  line-height: 1;
  padding-bottom: 18px;
}

.el-cd-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--el-navy);
  margin: 0 0 6px;
}

.el-cd-date {
  font-size: 0.9rem;
  color: var(--el-muted);
  margin: 0 0 20px;
}

.el-cd-sep { margin: 0 6px; opacity: 0.5; }

.el-cd-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--el-line);
}

.el-cd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--el-ink-soft);
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--el-line);
}

.el-cd-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.el-cd-chip.green .dot { background: #2e9e52; }
.el-cd-chip.pink .dot { background: #e891b8; }

.el-cd-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--el-navy) !important;
  text-decoration: none !important;
}

.el-cd-link:hover { text-decoration: underline !important; }

/* tablet: 4 คอลัมน์เท่ากัน ไม่มี colon */
@media (max-width: 720px) {
  .el-cd-colon { display: none; }

  .el-cd-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-items: stretch;
    justify-items: stretch;
    max-width: 100%;
    margin-bottom: 16px;
  }

  .el-cd-unit {
    min-width: 0;
    padding: 12px 8px;
  }

  .el-cd-unit .num { font-size: clamp(1.65rem, 6vw, 2.2rem); }
  .el-cd-unit .lbl { font-size: 0.62rem; margin-top: 6px; }
}

/* mobile แคบ: 2×2 สมดุล (แก้ปัญหา 3+1) */
@media (max-width: 400px) {
  .el-countdown-hero {
    padding: 22px 16px 20px;
  }

  .el-cd-title { font-size: 1.25rem; }
  .el-cd-sub { font-size: 0.84rem; margin-bottom: 16px; line-height: 1.5; }

  .el-cd-timer {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .el-cd-unit {
    padding: 14px 10px;
    border-radius: 14px;
  }

  .el-cd-unit .num { font-size: 2.1rem; }
  .el-cd-unit .lbl { font-size: 0.68rem; }

  .el-cd-message { font-size: 0.95rem; }
  .el-cd-date {
    font-size: 0.84rem;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
  .el-cd-sep { display: none; }

  .el-cd-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .el-cd-chip { justify-content: center; }
}

/* masthead mobile */
@media (max-width: 520px) {
  .el-masthead-inner { padding: 12px 16px; }
  .el-wrap { padding: 0 16px; }
  .el-masthead h1 { font-size: 1.35rem; line-height: 1.35; }
  .el-masthead .el-sub { font-size: 0.86rem; }
  .el-trust-bar { gap: 8px 12px; font-size: 0.62rem; }
  .el-nav { gap: 10px; font-size: 0.78rem; }
  .el-main { padding: 20px 0 36px; }
}

/* ---- ผลการเลือกตั้ง ---- */
.el-res-head {
  background: linear-gradient(145deg, var(--el-navy-dark), #1a4470);
  color: #fff;
  text-align: center;
  padding: 28px 24px;
}

.el-res-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.el-res-title {
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  color: #fff;
  margin: 0 0 12px;
}

.el-res-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.el-res-status.status-counting { background: #fbbf24; color: #78350f; }
.el-res-status.status-official { background: #86efac; color: #14532d; }
.el-res-status.status-unofficial { background: #fde68a; color: #92400e; }

.el-res-body { padding: 24px; }

.el-res-winner {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #f59e0b;
}

.el-res-winner-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #92400e;
  margin-bottom: 10px;
}

.el-res-winner-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: var(--el-navy);
  border-radius: 10px;
  margin-bottom: 10px;
}

.el-res-winner-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--el-navy-dark);
}

.el-res-winner-party { font-size: 0.88rem; color: var(--el-muted); margin-top: 4px; }
.el-res-winner-votes { font-size: 0.92rem; font-weight: 600; color: #b45309; margin-top: 10px; }

.el-res-pending {
  text-align: center;
  padding: 36px 24px;
}

.el-res-pending-icon { font-size: 3rem; margin-bottom: 12px; }
.el-res-pending p { margin: 0 0 8px; color: var(--el-ink-soft); }
.el-res-note { font-size: 0.88rem; color: var(--el-muted); margin-bottom: 16px !important; }

.el-res-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--el-navy);
}

.el-res-table-head h3 {
  font-size: 1.05rem;
  color: var(--el-navy-dark);
  margin: 0;
}

.el-res-table-head span { font-size: 0.75rem; color: var(--el-muted); }

.el-res-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--el-line);
}

.el-res-row.is-winner .el-res-name { color: var(--el-navy); font-weight: 700; }

.el-res-row-top {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.el-res-no {
  font-weight: 700;
  color: var(--el-navy);
  text-align: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 0;
}

.el-res-votes { font-weight: 600; color: var(--el-ink); white-space: nowrap; }
.el-res-votes small { font-weight: 400; color: var(--el-muted); }

.el-res-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.el-res-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--el-navy), #3b82f6);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.el-res-row.is-winner .el-res-bar span {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}

.el-res-source {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--el-muted);
  text-align: right;
}

/* ---- quick facts (รองลงมา) ---- */
.el-quickfacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.el-quickfacts-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 560px) {
  .el-quickfacts-info { grid-template-columns: 1fr; }
}

.el-kf-cta-wide {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px !important;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.2s;
}

.el-kf-cta-wide:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45) !important;
}

.el-kf-cta-wide .el-kf-icon {
  position: static;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.el-kf-cta-wide .el-kf-icon svg {
  width: 26px;
  height: 26px;
}

.el-kf-cta-body {
  flex: 1;
  min-width: 0;
}

.el-kf-cta-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
}

.el-kf-cta-arrow svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 560px) {
  .el-kf-cta-wide {
    flex-wrap: wrap;
    padding: 16px 18px !important;
  }
  .el-kf-cta-arrow {
    margin-left: auto;
  }
}

/* ---- key facts (legacy — quickfacts ใช้แทน) ---- */
.el-keyfacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .el-keyfacts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .el-keyfacts { grid-template-columns: 1fr; }
}

.el-kf {
  position: relative;
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: 10px;
  padding: 18px 20px 18px 62px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.el-kf-icon {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.el-kf-icon svg {
  width: 20px;
  height: 20px;
}

.el-kf-icon.ballot {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.el-kf-icon.calendar {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.el-kf.is-action {
  padding: 20px 20px 20px 62px;
  background: linear-gradient(145deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  border: 2px solid #1d4ed8;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  color: #fff;
}

.el-kf-cta-wide.is-action {
  padding-left: 22px !important;
}

.el-kf.is-action .el-kf-label {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.el-kf.is-action .el-kf-value {
  color: #fff;
  font-size: 1rem;
}

.el-kf-icon.action {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.el-kf.is-primary {
  border-color: var(--el-navy);
  border-left: 4px solid var(--el-red);
}

.el-kf-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--el-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.el-kf-value {
  font-family: var(--el-font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--el-ink);
  line-height: 1.3;
}

.el-kf-value.big {
  font-size: 2.4rem;
  color: var(--el-red);
  line-height: 1;
}

.el-kf-note { font-size: 0.82rem; color: var(--el-muted); margin-top: 6px; }

.el-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 18px;
  background: var(--el-navy);
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
}

.el-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.el-btn:hover {
  background: var(--el-navy-dark);
  transform: translateY(-1px);
}

.el-btn-cta {
  background: #fff !important;
  color: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  justify-content: center;
}

.el-btn-cta:hover {
  background: #f0f9ff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.el-ballot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  margin-top: 6px;
  color: var(--el-ink-soft);
}

.el-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.el-dot.green { background: var(--el-green); }
.el-dot.pink { background: var(--el-pink); }

/* ---- section ---- */
.el-section { margin-bottom: 40px; }

.el-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--el-navy);
}

.el-section-head h2 {
  font-size: 1.25rem;
  color: var(--el-navy-dark);
  margin: 0;
}

.el-section-meta {
  font-family: var(--el-mono);
  font-size: 0.68rem;
  color: var(--el-muted);
}

/* ---- news (3 vertical columns — แบบหนังสือพิมพ์) ---- */
.el-news-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: start;
}

.el-news-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 20px;
  min-width: 0;
}

.el-news-col:first-child { padding-left: 0; }
.el-news-col:last-child { padding-right: 0; }

.el-news-col + .el-news-col {
  border-left: 1px solid var(--el-line);
}

@media (max-width: 900px) {
  .el-news-columns {
    grid-template-columns: 1fr 1fr;
  }
  .el-news-col:nth-child(3) {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--el-line);
    padding: 20px 0 0;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .el-news-col:nth-child(3) .el-news-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 240px;
  }
}

@media (max-width: 560px) {
  .el-news-columns { grid-template-columns: 1fr; }
  .el-news-col,
  .el-news-col + .el-news-col {
    border: none;
    padding: 0;
  }
  .el-news-col:nth-child(3) {
    flex-direction: column;
    border-top: none;
    padding: 0;
  }
  .el-news-col:nth-child(3) .el-news-card {
    flex: none;
    min-width: 0;
  }
}

.el-news-card {
  display: flex;
  flex-direction: column;
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.el-news-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(15, 39, 68, 0.08);
}

.el-news-card.is-featured {
  border-left: 4px solid var(--el-red);
  background: linear-gradient(180deg, #fff 0%, #fef8f8 100%);
  padding: 22px 20px;
}

.el-news-card.is-featured h3 {
  font-size: 1.12rem;
}

.el-news-card.is-featured .summary {
  -webkit-line-clamp: 5;
}

.el-news-card .el-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--el-red);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.el-news-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 8px;
}

.el-news-card.is-featured h3 {
  font-size: 1.12rem;
}

.el-news-card h3 a {
  color: var(--el-ink);
  text-decoration: none;
}

.el-news-card h3 a:hover {
  color: var(--el-navy);
  text-decoration: underline;
}

.el-news-card .summary {
  font-size: 0.85rem;
  color: var(--el-muted);
  line-height: 1.55;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.el-news-card .el-news-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--el-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.65rem;
  color: var(--el-muted);
}

.el-news-meta .source { color: var(--el-navy); font-weight: 600; }

/* ---- timeline ---- */
.el-timeline { display: flex; flex-direction: column; gap: 0; }

.el-t-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--el-line);
}

.el-t-item:last-child { border-bottom: none; }

.el-t-item.is-next {
  background: #fffbeb;
  margin: 0 -12px;
  padding: 14px 12px;
  border-left: 3px solid var(--el-accent);
}

.el-t-item.is-past .el-t-title { color: var(--el-muted); }

.el-t-date {
  font-family: var(--el-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--el-navy);
}

.el-t-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.el-t-desc { font-size: 0.85rem; color: var(--el-muted); }

/* ---- candidates ---- */
.el-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.el-cand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: 6px;
  font-size: 0.88rem;
}

.el-cand-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--el-mono);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--el-bg);
  border: 1px solid var(--el-line);
  border-radius: 6px;
  color: var(--el-navy);
}

.el-cand.is-incumbent {
  border-color: var(--el-accent);
  background: #fffbeb;
}

.el-cand-name { font-weight: 600; line-height: 1.3; }
.el-cand-party { font-size: 0.75rem; color: var(--el-muted); margin-top: 2px; }

/* ---- faq ---- */
.el-faq-item {
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 8px;
}

.el-faq-q { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; color: var(--el-navy-dark); }
.el-faq-a { font-size: 0.88rem; color: var(--el-ink-soft); }

/* ---- disclaimer ---- */
.el-disclaimer {
  background: #f1f5f9;
  border: 1px solid var(--el-line);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.8rem;
  color: var(--el-muted);
  line-height: 1.6;
}

.el-disclaimer strong { color: var(--el-ink-soft); }

.el-empty {
  text-align: center;
  padding: 40px 24px;
  background: var(--el-surface);
  border: 1px dashed var(--el-line);
  border-radius: 8px;
  color: var(--el-muted);
  font-size: 0.9rem;
}

/* ---- footer ---- */
.el-footer {
  background: var(--el-surface);
  border-top: 1px solid var(--el-line);
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--el-muted);
}

.el-footer a { color: var(--el-navy); }

/* ---- แหล่งข้อมูลอ้างอิง (กะทัดรัด) ---- */
.el-section-compact {
  margin-bottom: 24px;
}

.el-sources-details {
  background: #f8fafc;
  border: 1px solid var(--el-line);
  border-radius: 8px;
  padding: 0;
}

.el-sources-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--el-navy-dark);
  cursor: pointer;
  list-style: none;
}

.el-sources-summary::-webkit-details-marker { display: none; }

.el-sources-summary::before {
  content: "▸ ";
  color: var(--el-muted);
  font-size: 0.75rem;
}

.el-sources-details[open] .el-sources-summary::before {
  content: "▾ ";
}

.el-sources-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--el-muted);
}

.el-sources-compact {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.el-src-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.el-src-row-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--el-muted);
  min-width: 52px;
}

.el-src-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--el-line);
  background: #fff;
  color: var(--el-navy);
  text-decoration: none !important;
}

.el-src-chip:hover {
  border-color: var(--el-navy);
  background: #eff6ff;
}

.el-src-chip.official {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.el-src-chip.media {
  border-color: #e2e8f0;
}

.el-sources-note {
  margin: 0;
  padding: 10px 16px 14px;
  border-top: 1px dashed var(--el-line);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--el-muted);
}

.el-sources-note code {
  font-size: 0.68rem;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
}

.el-src-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.el-src-badge.public { background: #dbeafe; color: #1e40af; }
.el-src-badge.media { background: #f1f5f9; color: #475569; }
.el-src-badge.official { background: #dcfce7; color: #166534; }

/* ---- แฮชแท็ก (override ธีมกีฬา) ---- */
.election-page .twro-tags { margin: 32px 0 0; max-width: none; text-align: left; padding: 0; }
.election-page .twro-tags-label { color: var(--el-muted); font-family: var(--el-font); letter-spacing: 0.08em; }
.election-page .twro-tag {
  font-family: var(--el-font);
  font-size: 0.82rem;
  border: 1px solid var(--el-line);
  background: var(--el-surface);
  color: var(--el-navy);
}
.election-page .twro-tag:hover {
  border-color: var(--el-navy);
  background: #eff6ff;
  color: var(--el-navy-dark);
}
.election-page .twro-tags-copy {
  font-family: var(--el-font);
  border: 1px solid var(--el-line);
  background: var(--el-surface);
  color: var(--el-navy);
}
.election-page .twro-tags-copy:hover {
  background: #eff6ff;
  border-color: var(--el-navy);
}
