/* ==========================================================================
   Gram Vikas Portal — public + shared styles
   Mobile-first, Hindi-first typography, 44px+ touch targets, no heavy effects.
   ========================================================================== */

@font-face { font-family: "Noto Sans Devanagari"; font-weight: 400; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-devanagari-400-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Devanagari"; font-weight: 600; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-devanagari-600-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Devanagari"; font-weight: 700; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-devanagari-700-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Noto Sans Devanagari"; font-weight: 400; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Devanagari"; font-weight: 600; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Devanagari"; font-weight: 700; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --primary: #0f4c81;
  --primary-600: #0c3f6b;
  --primary-50: #eaf2fa;
  --accent: #e07b00;
  --accent-50: #fff4e5;
  --green: #1b7f3b;
  --green-50: #e8f6ed;
  --red: #b42318;
  --red-50: #fdecea;
  --amber: #a15c00;
  --amber-50: #fff6e0;
  --text: #1c2430;
  --muted: #5b6676;
  --border: #d9e0e8;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs: 16px;
}

html.big-text { --fs: 19px; }
html.high-contrast {
  --primary: #002b5c; --primary-600: #001a38; --primary-50: #ffffff;
  --text: #000; --muted: #1a1a1a; --border: #000; --bg: #fff; --surface: #fff;
  --accent: #8a3b00;
}
html.high-contrast .card, html.high-contrast .btn, html.high-contrast input, html.high-contrast select, html.high-contrast textarea { border-width: 2px !important; }
html.high-contrast a { text-decoration: underline; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 28px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-title h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 1.9rem; }
}

/* --- Top utility bar & header ------------------------------------------- */
.topbar { background: var(--primary-600); color: #fff; font-size: .85rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .prefs { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar .prefs a { padding: 6px 8px; border-radius: 6px; min-height: 32px; display: inline-flex; align-items: center; }
.topbar .prefs a.on, .topbar .prefs a:hover { background: rgba(255,255,255,.18); }
.lang-switch a { font-weight: 600; }
.lang-switch a.active { text-decoration: underline; text-underline-offset: 4px; }

.site-header { background: var(--surface); border-bottom: 3px solid var(--accent); }
.site-header .container { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; flex: 1; }
.brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.brand .logo-fallback { width: 48px; height: 48px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.brand strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.brand span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.menu-toggle { margin-left: auto; }
.main-nav { background: var(--primary); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: none; flex-direction: column; }
.main-nav.open ul { display: flex; }
.main-nav a { display: block; color: #fff; text-decoration: none; padding: 12px 16px; min-height: 44px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.14); }
@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .main-nav ul { display: flex; flex-direction: row; flex-wrap: wrap; }
  .main-nav a { padding: 10px 14px; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3; text-align: center; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-light { background: #fff; color: var(--primary); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 12px 24px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Cards --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.card-muted { background: var(--primary-50); border-color: #cfe0f1; box-shadow: none; }

/* --- Hero ------------------------------------------------------------------ */
.hero { background: linear-gradient(180deg, var(--primary-50), var(--bg)); padding: 22px 0 8px; }
.hero-inner { display: grid; gap: 18px; align-items: center; }
.candidate-card { display: flex; gap: 14px; align-items: center; }
.candidate-photo { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow); background: #dfe7ef; flex-shrink: 0; }
.symbol-box { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; background: #fff; font-size: .85rem; }
.symbol-box img { width: 40px; height: 40px; object-fit: contain; }
.hero h1 { margin-bottom: 4px; }
.hero .role { color: var(--accent); font-weight: 700; }
.banner-img { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.2fr 1fr; } .candidate-photo { width: 130px; height: 130px; } }

/* --- Big action cards ---------------------------------------------------- */
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }
.action-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 128px; padding: 16px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); font-weight: 700; font-size: 1.02rem; }
.action-card .ico { font-size: 2rem; line-height: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-50); }
.action-card:hover { border-color: var(--primary); }
.action-card.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.action-card.primary .ico { background: rgba(255,255,255,.18); }
.cta-band { background: var(--accent-50); border: 1px solid #f4d4a6; border-radius: var(--radius); padding: 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0; }

/* --- Stats ------------------------------------------------------------------ */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat .num { font-size: 1.7rem; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat .lbl { color: var(--muted); font-size: .9rem; }
.stat.green .num { color: var(--green); } .stat.amber .num { color: var(--amber); } .stat.red .num { color: var(--red); } .stat.orange .num { color: var(--accent); }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 420px; }

/* --- Badges ---------------------------------------------------------------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge-gray, .badge-slate { background: #eef1f4; color: #3c4653; }
.badge-blue, .badge-indigo { background: var(--primary-50); color: var(--primary); }
.badge-violet { background: #f1ecfb; color: #5b3aa4; }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-orange { background: var(--accent-50); color: #9a4f00; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }

/* --- Forms ------------------------------------------------------------------ */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--red); }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=tel], input[type=number], input[type=email], input[type=password], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b9c4d0; border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); background: #fffafa; }
.error-text { color: var(--red); font-size: .875rem; margin-top: 4px; font-weight: 600; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: var(--green-50); border-color: #a8dcb9; color: #0f5229; }
.alert-error { background: var(--red-50); border-color: #f2b8b5; color: #7a1a12; }
.alert-info { background: var(--primary-50); border-color: #bcd3ea; color: #0c3f6b; }
.alert-warning { background: var(--amber-50); border-color: #f1d08a; color: #6d4000; }
.two-col { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Checkbox / radio tiles — big touch targets, minimum typing */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tile-grid.wide { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 2px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; line-height: 1.3; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile .t-ico { font-size: 1.4rem; width: 32px; text-align: center; flex-shrink: 0; }
.tile .check { margin-left: auto; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #9aa7b5; flex-shrink: 0; display: grid; place-items: center; font-size: .8rem; color: #fff; }
.tile.radio .check { border-radius: 50%; }
.tile:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.tile:has(input:checked) .check { background: var(--primary); border-color: var(--primary); }
.tile:has(input:checked) .check::after { content: "✓"; }
.tile:has(input:focus-visible) { outline: 3px solid #ffbf47; outline-offset: 2px; }
.tile.disabled { opacity: .5; cursor: not-allowed; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg .tile { min-height: 48px; flex: 1 1 120px; justify-content: center; }
.urgency-very_urgent:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.urgency-urgent:has(input:checked) { border-color: var(--amber); background: var(--amber-50); }

/* Multi-step form */
.stepper { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.stepper li { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); }
.stepper li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 4px; border-radius: 50%; background: #e3e8ee; color: var(--muted); font-weight: 700; }
.stepper li.done::before { background: var(--green); color: #fff; content: "✓"; }
.stepper li.current { color: var(--primary); font-weight: 700; }
.stepper li.current::before { background: var(--primary); color: #fff; }
.step { display: none; }
.step.active { display: block; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--border); }
.step-nav .btn { flex: 1; }
.draft-note { font-size: .82rem; color: var(--green); }
.offline-banner { background: #3a3a3a; color: #fff; padding: 8px 16px; text-align: center; font-size: .9rem; }
.photo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-thumbs .ph { position: relative; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumbs button { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.captcha-q { font-size: 1.25rem; font-weight: 700; background: var(--primary-50); padding: 8px 14px; border-radius: 8px; letter-spacing: 1px; }
.captcha-row input { max-width: 120px; }
.notice-box { border-left: 4px solid var(--accent); background: var(--accent-50); padding: 10px 14px; border-radius: 6px; font-size: .92rem; }

/* Preview */
.kv { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.kv > div { display: grid; grid-template-columns: 38% 1fr; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv .k { padding: 8px 10px; background: #f7f9fb; font-weight: 600; color: var(--muted); font-size: .9rem; }
.kv dd, .kv .v { padding: 8px 10px; margin: 0; word-break: break-word; white-space: pre-wrap; }

/* Success */
.success-box { text-align: center; }
.success-box .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2.4rem; display: grid; place-items: center; margin: 0 auto 10px; }
.appno { font-size: 2rem; font-weight: 700; letter-spacing: 1px; color: var(--primary); background: var(--primary-50); border: 2px dashed var(--primary); border-radius: 10px; padding: 10px; margin: 10px auto; display: inline-block; word-break: break-all; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #e3e8ee; display: grid; place-items: center; font-size: .75rem; color: #fff; }
.timeline li.done .dot { background: var(--green); }
.timeline li.current .dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.timeline li.future { color: var(--muted); }
.timeline .when { font-size: .82rem; color: var(--muted); }
.timeline .remark { background: #f7f9fb; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; margin-top: 4px; font-size: .92rem; }

/* Lists / items */
.item-list { display: grid; gap: 12px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.item h3 { margin-bottom: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #eef1f4; font-size: .82rem; text-decoration: none; color: var(--text); min-height: 32px; }
.chip.active { background: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.news-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #e3e8ee; margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.prose { white-space: pre-line; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { background: #f2f5f8; font-weight: 700; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }

/* Footer */
.site-footer { background: #13263a; color: #d5dde6; margin-top: 32px; padding: 28px 0 90px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 18px; padding-top: 12px; font-size: .8rem; color: #aab7c4; }
@media (min-width: 960px) { .site-footer { padding-bottom: 28px; } }

/* Mobile bottom action bar */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 40; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.bottom-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; text-decoration: none; color: var(--text); font-size: .72rem; font-weight: 600; gap: 2px; }
.bottom-bar a span { font-size: 1.25rem; line-height: 1; }
.bottom-bar a.active { color: var(--primary); }
@media (min-width: 960px) { .bottom-bar { display: none; } }
.form-page .bottom-bar { display: none; }

/* Low-bandwidth mode: hide decorative imagery */
html.lite .lite-hide { display: none !important; }
html.lite .banner-img, html.lite .news-img, html.lite .gallery { display: none !important; }

.map-box { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); background: #e9eef3; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.disclaimer-inline { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 10px; }

@media print {
  .no-print, .topbar, .site-header, .main-nav, .site-footer, .bottom-bar, .offline-banner { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ==========================================================================
   Themes (Admin → Settings → theme) & campaign components
   ========================================================================== */
html.theme-green { --primary: #1f6b33; --primary-600: #154d24; --primary-50: #e9f5ec; --accent: #e8730c; --accent-50: #fff3e6; }
html.theme-saffron { --primary: #9a3412; --primary-600: #7c2d12; --primary-50: #fff1e7; --accent: #15803d; --accent-50: #ecfdf3; }
html.theme-green .site-header, html.theme-saffron .site-header { border-bottom-color: var(--accent); }
html.theme-green meta { color: inherit; }

.campaign-hero { background: linear-gradient(160deg, var(--primary-50) 0%, #fff 55%, var(--accent-50) 100%); padding: 22px 0 18px; border-bottom: 1px solid var(--border); }
.campaign-grid { display: grid; gap: 18px; align-items: center; }
@media (min-width: 900px) { .campaign-grid { grid-template-columns: 300px 1fr; } }
.cand-photo-wrap { position: relative; max-width: 220px; margin: 0 auto; }
@media (min-width: 900px) { .cand-photo-wrap { max-width: 300px; } }
.cand-photo { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(16,24,40,.15); background: #dfe7ef; }
.cand-photo-wrap .role-chip { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; }
.role-chip { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 999px; font-size: .95rem; box-shadow: var(--shadow); }
.campaign-hero h1 { font-size: 2.1rem; margin: 6px 0 0; color: var(--primary); }
@media (min-width: 720px) { .campaign-hero h1 { font-size: 2.7rem; } }
.cand-relation { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.cand-panchayat { font-size: 1.15rem; font-weight: 700; margin-top: 4px; }
.slogan-ribbon { display: inline-block; margin: 12px 0; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.15rem; padding: 8px 18px; border-radius: 8px; border-left: 6px solid var(--accent); }
.vote-box { display: inline-flex; align-items: center; gap: 12px; border: 2px solid var(--primary); border-radius: 12px; padding: 6px 14px; background: #fff; margin-top: 6px; }
.vote-box strong { font-size: 1.5rem; color: var(--primary); }
.vote-box img { width: 56px; height: 56px; object-fit: contain; }
.countdown { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.countdown .cd { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; text-align: center; min-width: 64px; }
.countdown .cd b { display: block; font-size: 1.5rem; color: var(--accent); line-height: 1.1; }
.countdown .cd span { font-size: .75rem; color: var(--muted); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-whatsapp:hover { background: #178a45; }

.panel-title { background: var(--primary); color: #fff; margin: -18px -18px 14px; padding: 10px 18px; border-radius: var(--radius) var(--radius) 0 0; font-size: 1.2rem; }
.hl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hl-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.hl-list li::before { content: "✔"; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: .85rem; }
.vision-list { list-style: none; padding: 0; margin: 0; counter-reset: v; display: grid; gap: 8px; }
.vision-list li { counter-increment: v; display: flex; gap: 10px; align-items: flex-start; }
.vision-list li::before { content: counter(v); flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.first100 { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-radius: var(--radius); padding: 18px; }
.first100 h2 { color: #fff; }
.first100 .vision-list li::before { background: #fff; color: var(--primary); }
.slogan-band { background: var(--primary); color: #fff; text-align: center; font-size: 1.5rem; font-weight: 700; padding: 18px 12px; margin-top: 24px; }
.slogan-band small { display: block; font-size: .9rem; font-weight: 400; opacity: .85; }

/* Manifesto (संकल्प पत्र) */
.manifesto { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.manifesto-head { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; border-bottom: 3px solid var(--accent); padding-bottom: 12px; margin-bottom: 14px; }
.manifesto-head img { width: 110px; height: 130px; object-fit: cover; border-radius: 10px; }
.manifesto-head h1 { margin: 0; color: var(--primary); }
.manifesto h2 { color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-top: 18px; font-size: 1.2rem; }
.manifesto .m-cat { margin-top: 12px; }
.manifesto .m-cat h3 { font-size: 1.05rem; margin-bottom: 6px; }
.manifesto .m-item { padding: 6px 0 6px 12px; border-left: 3px solid var(--primary-50); margin-bottom: 6px; }
.manifesto .m-item strong { display: block; }
.pdf-mode .manifesto { border: 0; }
@media print { .manifesto { border: 0; padding: 0; } .slogan-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (min-width: 960px) { .site-header .menu-toggle { display: none; } }

/* Voter totals + roll dates */
.voter-summary { background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.voter-summary .vs-title { font-weight: 700; font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.vs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.vs-num { background: var(--primary-50); border-radius: 8px; text-align: center; padding: 8px 4px; }
.vs-num b { display: block; font-size: 1.35rem; line-height: 1.2; color: var(--primary); }
.vs-num.total b { color: var(--accent); font-size: 1.6rem; }
.vs-num span { font-size: .8rem; color: var(--muted); }
.vs-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 4px; font-size: .9rem; }
.vs-inline { margin-bottom: 10px; }
