:root {
  --navy: #4a1d6e;
  --navy-2: #5f2a8a;
  --ink: #24182f;
  --muted: #665a75;
  --line: #e0d5ea;
  --soft: #f6f2fa;
  --bg: #f2edf7;
  --card: #ffffff;
  --yes: #13795b;
  --yes-soft: #e6f5ef;
  --no: #b3261e;
  --no-soft: #fcebea;
  --focus: #7c3aed;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', 'Noto Sans Arabic', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  background: var(--navy);
  color: #fff;
  padding: 28px 0 56px;
  text-align: center;
}
.top .seal {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.25);
}
.top h1 { margin: 0 0 6px; font-size: clamp(22px, 5.4vw, 32px); font-weight: 800; line-height: 1.4; }
.top p { margin: 0 auto; max-width: 560px; color: #e6dcf2; font-size: 15px; }

main.wrap { margin-top: -36px; padding-bottom: 32px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(74,29,110,.06), 0 6px 20px rgba(74,29,110,.05);
}
.sec-title {
  margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--navy);
  border-inline-start: 4px solid var(--navy); padding-inline-start: 10px; line-height: 1.5;
}
.sec-hint { margin: 0 0 18px; color: var(--muted); font-size: 14px; padding-inline-start: 14px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], select {
  width: 100%; max-width: 100%;
  font: inherit; color: inherit;
  padding: 11px 14px;
  border: 1px solid #cfc3dc; border-radius: 10px; background: #fff;
  min-height: 48px;
}
input[type=tel] { direction: ltr; text-align: right; }
input:focus, select:focus { outline: 3px solid rgba(124,58,237,.25); border-color: var(--focus); }

/* Option chips (radio) */
.opts { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.opts legend { padding: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; min-height: 44px;
  border: 1px solid #cfc3dc; border-radius: 999px; background: #fff;
  cursor: pointer; font-size: 15px; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.opt span::before {
  content: ''; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #a796b9; flex: none; background: #fff;
}
.opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.opt input:checked + span::before {
  border-color: #fff; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%234a1d6e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.opt input:focus-visible + span { outline: 3px solid rgba(124,58,237,.35); outline-offset: 2px; }

/* Question */
.question {
  background: var(--soft); border: 1px solid var(--line); border-inline-start: 4px solid var(--navy);
  border-radius: 10px; padding: 16px 18px; text-align: justify;
}
.question p { margin: 0 0 10px; }
.question ol { margin: 0; padding-inline-start: 22px; font-weight: 700; }
.question li { margin-bottom: 6px; }
.question li::marker { color: var(--navy); }

.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.ans { position: relative; }
.ans input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ans span {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; border: 2px solid #cfc3dc; border-radius: 12px; background: #fff;
  font-size: 22px; font-weight: 800; cursor: pointer; transition: all .15s;
}
.ans span::before {
  content: ''; width: 24px; height: 24px; border: 2px solid #a796b9; border-radius: 6px; background: #fff; flex: none;
}
.ans.yes input:checked + span { border-color: var(--yes); background: var(--yes-soft); color: var(--yes); }
.ans.no input:checked + span { border-color: var(--no); background: var(--no-soft); color: var(--no); }
.ans input:checked + span::before {
  border-color: currentColor; background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.ans input:focus-visible + span { outline: 3px solid rgba(124,58,237,.35); outline-offset: 2px; }

.confirm { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.confirm input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 17px;
  padding: 12px 22px; min-height: 52px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; width: 100%;
}
.btn:hover { background: var(--navy-2); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }

.note { color: var(--muted); font-size: 14px; margin: 10px 0 0; text-align: center; }
.error {
  display: none; margin-top: 8px; color: var(--no); font-size: 14px; font-weight: 600;
}
.field.bad .error, .error.show { display: block; }
.field.bad input, .field.bad select { border-color: var(--no); }
.form-error {
  display: none; background: var(--no-soft); color: var(--no); border: 1px solid #f1c3c0;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600;
}
.form-error.show { display: block; }

/* Done */
.done { text-align: center; padding: 34px 20px; }
.done .tick {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--yes-soft); display: grid; place-items: center; color: var(--yes);
}
.done h2 { margin: 0 0 6px; color: var(--navy); font-size: 24px; }
.receipt {
  display: inline-grid; grid-template-columns: auto auto; gap: 6px 18px; text-align: start;
  background: var(--soft); border: 1px dashed #c7b8d9; border-radius: 10px; padding: 14px 18px; margin: 16px 0 6px;
}
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 800; direction: ltr; text-align: right; }

footer.foot {
  background: var(--navy); color: #e6dcf2; text-align: center; padding: 22px 0 28px; font-size: 14px;
}
footer.foot strong { color: #fff; display: block; margin-top: 8px; font-size: 15px; }
/* visually hidden (no off-screen offset: on an RTL page that would make the page scroll sideways) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

@media (max-width: 480px) {
  .card { padding: 18px 14px; }
  .answers { gap: 10px; }
  .ans span { font-size: 20px; min-height: 58px; }
  .opt span { font-size: 14px; padding: 8px 12px; }
}

/* ---------- Language choice (every visit) ---------- */
body.lp-open { overflow: hidden; }
.lang-pick {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, #5f2a8a 0%, var(--navy) 60%);
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  color: #fff; text-align: center;
}
.lang-pick.gone { display: none; }
.lp-box { width: 100%; max-width: 560px; }
.lp-box .seal { margin: 0 auto 16px; }
.lp-q { margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.6; }
.lp-q[lang="en"] { font-size: 16px; font-weight: 600; color: #e6dcf2; }
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.lp-card {
  font: inherit; color: var(--navy); background: #fff; border: 0; border-radius: 14px; cursor: pointer;
  padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .15s;
}
.lp-card:hover, .lp-card:focus-visible { transform: translateY(-2px); outline: 3px solid #c9a24b; outline-offset: 2px; }
.lp-flag { display: block; width: 72px; height: 48px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lp-flag svg { display: block; width: 100%; height: 100%; }
@media (max-width: 480px) {
  .lp-cards { grid-template-columns: 1fr; }
  .lp-card { flex-direction: row; justify-content: center; padding: 14px; }
  .lp-flag { width: 54px; height: 36px; }
}

/* Language switch in the header */
.top .wrap { position: relative; }
.lang-switch { display: flex; justify-content: center; gap: 6px; margin: -10px 0 14px; flex-wrap: wrap; }
.lang-switch button {
  font: inherit; font-size: 13px; font-weight: 700; color: #e6dcf2; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 3px 12px; cursor: pointer;
}
.lang-switch button.on { background: #fff; color: var(--navy); border-color: #fff; }

/* Intro card ("Dear voter") */
.card.intro { border-inline-start: 4px solid #c9a24b; text-align: justify; }
.card.intro strong { color: var(--navy); }

fieldset.field { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.muted-s { color: var(--muted); }

/* Left-to-right (English) fixes */
[dir="ltr"] input[type=tel] { text-align: left; }
[dir="ltr"] .receipt dd { text-align: left; }
[dir="ltr"] .question, [dir="ltr"] .card.intro { text-align: left; }

@media (max-width: 600px) { .question, .card.intro { text-align: start; } }

/* Intro text at the top of the language page */
.lp-intro {
  margin: 0 auto 22px; max-width: 560px; padding: 14px 16px;
  font-size: 15.5px; line-height: 1.9; font-weight: 600; color: #fff; text-align: center;
  background: rgba(255,255,255,.07); border: 1px solid rgba(201,162,75,.55); border-radius: 12px;
}
@media (max-width: 480px) { .lp-intro { font-size: 14.5px; } }

/* ---------- Annex I / II tabs ---------- */
.card.annex { padding: 14px; }
.annex-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.annex-tab {
  font: inherit; color: var(--navy); background: var(--soft); cursor: pointer; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: background .15s, border-color .15s, color .15s;
}
.annex-tab b { font-size: 16px; font-weight: 800; }
.annex-tab small { font-size: 13px; color: var(--muted); font-weight: 600; }
.annex-tab::after { content: ''; width: 8px; height: 8px; margin-top: 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: .6; }
.annex-tab:hover { border-color: var(--navy); }
.annex-tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.annex-tab.on small { color: #e6dcf2; }
.annex-tab.on::after { transform: rotate(-135deg); margin-top: 8px; }
.annex-tab:focus-visible { outline: 3px solid rgba(124,58,237,.35); outline-offset: 2px; }
.annex-panel { margin-top: 14px; border-top: 3px solid #c9a24b; padding-top: 14px; }
.annex-title { margin: 0 0 10px; font-size: 17px; font-weight: 800; color: var(--navy); line-height: 1.6; }
.annex-body { text-align: justify; }
.annex-body p { margin: 0 0 10px; }
.annex-body ul { margin: 0; padding-inline-start: 20px; }
.annex-body li { margin-bottom: 10px; }
.annex-body li::marker { color: var(--navy); }
.annex-body strong { color: var(--navy); }
.annex-body .out { color: #6d28d9; }
.annex-close { margin-top: 6px; min-height: 44px; font-size: 15px; }
[dir="ltr"] .annex-body { text-align: left; }
@media (max-width: 600px) {
  .annex-body { text-align: start; }
  .annex-tab b { font-size: 15px; }
  .annex-tab small { font-size: 12px; }
}
.annex-tab.on b { color: #fff; }

/* Organisation line above the title, and the Notes card (PDF update 2026-11-18) */
.org-line { margin: 0 auto 4px !important; text-align: center; font-size: 14px !important; font-weight: 800; letter-spacing: .02em; color: #c9a24b !important; }
[dir="ltr"] .org-line { text-transform: uppercase; }
.notes-card { border-inline-start: 4px solid var(--navy); }
.notes-body { text-align: justify; }
.notes-body p { margin: 0 0 10px; }
.notes-body p:last-child { margin-bottom: 0; }
.notes-body strong { color: var(--navy); }
[dir="ltr"] .notes-body { text-align: left; }
@media (max-width: 600px) { .notes-body { text-align: start; } }

/* Four language cards (Sorani, Badini, Arabic, English) */
.lp-box { max-width: 680px; }
.lp-cards { grid-template-columns: repeat(4, 1fr); }
.lp-card small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) { .lp-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) {
  .lp-cards { grid-template-columns: 1fr; }
  .lp-card small { display: inline; margin: 0; }
}

/* Welcome page top box: organisation + title (owner 2026-11-18) */
.lp-intro p { margin: 0; }
.lp-org { color: #c9a24b; font-size: 15px; font-weight: 800; margin-bottom: 6px !important; }
.lp-title { color: #fff; font-size: 21px; font-weight: 800; line-height: 1.6; }
@media (max-width: 480px) { .lp-title { font-size: 18px; } }

.lp-title-2 { font-size: 16px; font-weight: 700; color: #ede6f6; margin-top: 4px !important; line-height: 1.6; }
@media (max-width: 480px) { .lp-title-2 { font-size: 14.5px; } }

/* Line above the appendix tabs */
.annex-lead { margin: 2px 4px 12px; font-weight: 700; color: var(--navy); font-size: 15.5px; }

/* PDF 2026-11-20: slogan in the header, main question highlighted, "voting choice" bar above YES/NO */
.top h1.slogan { font-size: clamp(20px, 4.6vw, 28px); line-height: 1.55; max-width: 720px; margin-inline: auto; }
.question p.q-main { margin: 14px 0 10px; font-weight: 800; color: var(--navy); font-size: 17px; line-height: 1.8; }
.answer-title { margin-top: 18px; background: var(--navy); color: #fff; text-align: center; font-weight: 800; padding: 8px 12px; border-radius: 10px 10px 0 0; }
.answer-title + .answers { margin-top: 0; padding: 10px; border: 2px solid var(--navy); border-top: 0; border-radius: 0 0 12px 12px; }

/* Turnstile robot check box (invisible unless Cloudflare needs the visitor) */
.ts-box { display: flex; justify-content: center; margin: 4px 0 12px; }
.ts-box:empty { margin: 0; }

/* Hint under the phone box (numbers abroad) */
.field-hint { margin: 6px 2px 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.field-hint .ltr-nums { font-weight: 700; color: var(--navy); white-space: nowrap; }


/* Owner's logo (2026-11-22) on a white card */
.logo-card { background: #fff; border-radius: 16px; padding: 10px 16px; margin: 0 auto 18px; max-width: 300px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.logo-card img { display: block; width: 100%; height: auto; }
.logo-card-sm { max-width: 220px; padding: 8px 14px; margin: 0 auto 12px; border-radius: 14px; }
@media (max-width: 480px) { .logo-card { max-width: 240px; } .logo-card-sm { max-width: 180px; } }

/* Send button: stays purple; a thin red outline + pulsing red ring draws attention (owner 2026-11-22: full red looked like danger) */
#submitBtn { animation: sendPulse 1.8s ease-out infinite; outline: 2px solid #d32f2f; outline-offset: 3px; }
#submitBtn[disabled] { animation: none; outline-color: transparent; }
@keyframes sendPulse {
  0%   { box-shadow: 0 0 0 3px rgba(211, 47, 47, .7); }
  70%  { box-shadow: 0 0 0 16px rgba(211, 47, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}
@media (prefers-reduced-motion: reduce) { #submitBtn { animation: none; box-shadow: 0 0 0 3px rgba(211, 47, 47, .35); } }
.send-cue { margin: 4px 0 12px; text-align: center; color: #d32f2f; font-weight: 800; font-size: 16px; line-height: 1.6; }

/* Public YES / NO results box (owner 2026-11-23) */
.tally { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 12px; margin: 0 0 16px; text-align: center; box-shadow: 0 4px 16px rgba(74,29,110,.08); }
.tally-lp { max-width: 560px; margin: 22px auto 0; box-shadow: 0 8px 24px rgba(0,0,0,.18); border: 0; }
.tally-title { margin: 0 0 10px; font-weight: 800; color: var(--navy); font-size: 16px; }
.tally-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tally-side { border-radius: 12px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.tally-side.yes { background: var(--yes-soft); color: var(--yes); }
.tally-side.no { background: var(--no-soft); color: var(--no); }
.tally-lab { font-weight: 800; font-size: 15px; }
.tally-side b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tally-side small { font-weight: 700; font-size: 13px; }
.tally-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; background: var(--soft); }
.tally-bar .yes { background: var(--yes); } .tally-bar .no { background: var(--no); }
.tally-total { margin: 0; font-size: 13px; color: var(--muted); }
.tally-total b { color: var(--navy); }
.done [hidden] { display: none !important; } /* thank-you screen shows only the tick + "Thank you" (owner 2026-11-24) */

/* Intro card open / close (owner 2026-11-24): closed = first 3 lines fading out + "read more" */
.intro.collapsed .intro-body { max-height: calc(1.75em * 3); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.more-btn { display: block; margin: 10px auto 0; font: inherit; font-size: 14px; font-weight: 800; color: var(--navy);
  background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 16px; cursor: pointer; }
.more-btn::after { content: ' ▾'; }
.intro:not(.collapsed) .more-btn::after { content: ' ▴'; }
.more-btn:hover { background: #ece3f5; }
/* Notes card open / close, same as the intro (owner 2026-11-24) */
.notes-card.collapsed .notes-body { max-height: calc(1.75em * 3); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.notes-card:not(.collapsed) .more-btn::after { content: ' ▴'; }
/* Closed intro / notes (owner 2026-11-24): ONE line on computers, TWO lines on phones; no fade, the line is just cut */
.intro.collapsed .intro-body, .notes-card.collapsed .notes-body {
  max-height: calc(1.75em * 1); -webkit-mask-image: none; mask-image: none; }
.intro.collapsed .intro-body > :first-child, .notes-card.collapsed .notes-body > :first-child { margin-top: 0; }
@media (max-width: 600px) {
  .intro.collapsed .intro-body, .notes-card.collapsed .notes-body { max-height: calc(1.75em * 2); }
}

/* Question explanation open / close (owner 2026-11-24): 1 line on computers, 2 on phones */
.question.collapsed .q-pre { max-height: calc(1.75em * 1); overflow: hidden; margin-bottom: 0; }
@media (max-width: 600px) { .question.collapsed .q-pre { max-height: calc(1.75em * 2); } }
.question .more-btn { margin: 8px auto 4px; }
.question:not(.collapsed) .more-btn::after { content: ' ▴'; }
/* Closed boxes end with "…" (owner 2026-11-24): the visible line(s) are clamped instead of just cut.
   Intro = plain text in .intro-body; Notes = first note only; Question = the .q-pre paragraph. */
.intro.collapsed .intro-body, .notes-card.collapsed .notes-body > p:first-child, .question.collapsed .q-pre {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1;
  overflow: hidden; max-height: none; text-overflow: ellipsis; }
.notes-card.collapsed .notes-body { max-height: none; overflow: visible; }
.notes-card.collapsed .notes-body > p:first-child { margin-bottom: 0; }
.notes-card.collapsed .notes-body > :not(:first-child) { display: none; }
@media (max-width: 600px) {
  .intro.collapsed .intro-body, .notes-card.collapsed .notes-body > p:first-child, .question.collapsed .q-pre {
    -webkit-line-clamp: 2; line-clamp: 2; max-height: none; }
}
/* Whole-word previews with " ..." replace the clamped text (owner 2026-11-24); built in app.js updatePreviews() */
.fold-preview { display: none; text-align: start; margin: 0; }
.fold-preview strong { color: var(--navy); }
.intro.collapsed .fold-preview, .notes-card.collapsed .fold-preview, .question.collapsed .fold-preview { display: block; }
.intro.collapsed .intro-body, .notes-card.collapsed .notes-body, .question.collapsed .q-pre { display: none !important; }

/* Gender / province / age / occupation as drop-down lists (owner 2026-11-24) */
.opts .opt-select { width: 100%; }
.opt-select:invalid, .opt-select option[value=""] { color: var(--muted); }
/* Title beside its drop-down list (owner 2026-11-24): title on the reading side, list next to it; error under both */
fieldset.field.sel-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; align-items: center; column-gap: 14px; }
fieldset.field.sel-row > legend { float: inline-start; width: auto; margin: 0; padding: 0; }
fieldset.field.sel-row > .opts { display: block; }
fieldset.field.sel-row > .error { grid-column: 1 / -1; }
/* Title beside the list, Safari-safe (2026-11-24): a plain flex row instead of the grid fieldset above */
fieldset.field.sel-row { display: block; }
.sel-line { display: flex; align-items: center; gap: 14px; }
.sel-label { flex: 0 0 38%; font-weight: 700; font-size: 15px; line-height: 1.5; }
.sel-line .opt-select { flex: 1 1 auto; min-width: 0; width: auto; }
/* Welcome page on phones: the top (logo) was cut off because the box was centred in a screen shorter than it.
   Auto margins centre it when it fits and let it start at the top (scrollable) when it doesn't. */
.lang-pick { align-items: flex-start; }
.lang-pick > .lp-box { margin-top: auto; margin-bottom: auto; }
.opts > .sel-line { flex: 1 1 100%; width: 100%; }
.sel-line .opt-select { flex: 1 1 0; }
/* "Read more" buttons: animated colour stroke running round the edge (owner 2026-11-24) */
.more-btn {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--soft), var(--soft)) padding-box,
    linear-gradient(90deg, #7c3aed, #c9a24b, #d32f2f, #7c3aed) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: moreStroke 3s linear infinite;
}
.more-btn:hover { background:
    linear-gradient(#ece3f5, #ece3f5) padding-box,
    linear-gradient(90deg, #7c3aed, #c9a24b, #d32f2f, #7c3aed) border-box;
  background-size: 100% 100%, 300% 100%; }
@keyframes moreStroke { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 150% 0; } }
@media (prefers-reduced-motion: reduce) { .more-btn { animation: none; } }

/* ===================== Secure version (2026-11-24) ===================== */
/* Font hosted on the site itself: no request to Google (privacy) and faster on weak connections */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Title above the explanation before the main question (change list row 12) */
.why-title { margin: 0 0 6px; font-weight: 800; color: var(--navy); font-size: 15px; }

/* Part Three: phone confirmation */
.verify-card { border-inline-start: 4px solid #229ed9; }
.method-box { margin: 4px 0 12px; }
.method-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.method-opt { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--soft); cursor: pointer; font-weight: 700; min-height: 44px; }
.method-opt:has(input:checked) { border-color: var(--navy); background: #ece3f5; }
.method-opt input { accent-color: var(--navy); width: 18px; height: 18px; margin: 0; }
.panel { margin-top: 6px; }
.panel-intro { margin: 0 0 10px; }
.btn.tg, a.btn.tg { background: #229ed9; color: #fff; display: flex; text-align: center; text-decoration: none; margin: 4px 0; }
.btn.tg:hover, a.btn.tg:hover { background: #1a8cc2; }
.btn.small { width: auto; display: inline-block; padding: 8px 18px; min-height: 0; font-size: 14px; }
.steps { margin: 0 0 10px; padding-inline-start: 22px; }
.steps li { margin: 3px 0; }
.tg-status { border-radius: 10px; padding: 10px 12px; font-weight: 700; margin: 10px 0 6px; }
.tg-status.waiting, .tg-status.opened { background: #fff7e6; color: #7a5200; }
.tg-status.waiting::before, .tg-status.opened::before { content: ''; display: inline-block; width: 12px; height: 12px;
  margin-inline-end: 8px; vertical-align: -1px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 1s linear infinite; }
.tg-status.confirmed { background: var(--yes-soft); color: var(--yes); }
.tg-status.expired { background: var(--no-soft); color: var(--no); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tg-status::before { animation: none; } }
#tgManual { word-break: break-word; }
.code-input { font-size: 22px !important; letter-spacing: 6px; text-align: center; }
.sms-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.link-btn { font: inherit; font-size: 14px; background: none; border: 0; color: var(--navy); text-decoration: underline;
  cursor: pointer; padding: 8px 0; min-height: 40px; }
.link-btn[disabled] { color: var(--muted); text-decoration: none; cursor: default; }
.ts-box { margin: 10px 0 0; }

/* Done screen: receipt code (no vote, no date) */
.receipt-box { margin: 14px auto 0; max-width: 420px; padding: 14px; border: 1px dashed var(--navy); border-radius: 12px; background: var(--soft); }
.receipt-title { margin: 0; font-weight: 800; color: var(--navy); }
.receipt-code { margin: 6px 0 10px; font-size: 26px; font-weight: 800; letter-spacing: 2px; font-family: Consolas, 'Courier New', monospace; color: var(--ink); }
.foot-links { margin-top: 6px; font-size: 14px; }
.foot-links a { color: inherit; }
/* Privacy and receipt-check pages */
.page-card .sec-title { margin-top: 18px; }
.page-card .sec-title:first-child { margin-top: 0; }
.page-card p { margin: 6px 0; text-align: justify; }
.page-card p.li { margin: 2px 0; padding-inline-start: 6px; }
.check-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.check-form input { flex: 1 1 220px; font: inherit; font-size: 20px; letter-spacing: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.check-form .btn { flex: 0 0 auto; width: auto; }
.check-out { font-weight: 800; margin: 8px 0; }
.check-out.good { color: var(--yes); }
.check-out.bad { color: var(--no); }

/* ---------- Team decisions 2026-11-24: two big method buttons, phone call, live count, voter guide ---------- */
.method-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.method-btn {
  font: inherit; cursor: pointer; background: #fff; color: var(--navy); border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  min-height: 112px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.method-btn:hover { border-color: var(--navy-2); }
.method-btn[aria-pressed="true"] { border-color: var(--navy); background: var(--soft); box-shadow: 0 0 0 3px rgba(74,29,110,.14); }
.method-btn .m-ico { font-size: 28px; line-height: 1.2; }
.method-btn .m-name { font-weight: 800; font-size: 17px; }
.method-btn .m-sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.btn.call { background: var(--yes); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.call:hover { background: #0f6a4f; }
.btn.call.big { font-size: 19px; padding: 16px; margin: 6px 0 4px; }
.call-now { margin: 0 0 8px; font-weight: 700; }
.call-number { margin: 8px 0 4px; text-align: center; font-size: 15px; }
.call-number bdi { display: inline-block; font-size: 24px; font-weight: 800; letter-spacing: .5px; color: var(--navy); font-variant-numeric: tabular-nums; }
.call-qr { text-align: center; margin: 6px 0 0; }
.call-qr .qr { width: 180px; height: 180px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.call-qr .qr svg { width: 100%; height: 100%; display: block; }
.live-count {
  margin: 14px auto 4px; max-width: 420px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font-weight: 800; color: var(--navy); font-size: 17px; text-align: center;
}
.guide-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.guide-btn {
  font: inherit; font-weight: 800; cursor: pointer; color: var(--navy); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 2px 10px rgba(74,29,110,.06);
}
.guide-btn:hover { border-color: var(--navy-2); }
.guide-btn .ico { font-size: 18px; }
.guide-dlg {
  border: 0; border-radius: 18px; padding: 0; width: min(560px, 94vw); max-height: 90vh; color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.guide-dlg::backdrop { background: rgba(36,24,47,.55); }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--navy); color: #fff; }
.guide-head h2 { margin: 0; font-size: 18px; }
.guide-x { font: inherit; font-size: 20px; background: transparent; color: #fff; border: 0; cursor: pointer; padding: 2px 8px; }
.guide-body { padding: 16px 18px 18px; }
.guide-steps { margin: 0; padding-inline-start: 22px; }
.guide-steps li { margin: 0 0 10px; }
.guide-steps li::marker { color: var(--navy); font-weight: 800; }
.guide-note { margin: 8px 0 0; padding: 10px 12px; background: var(--soft); border-radius: 12px; font-size: 14.5px; }
.guide-video { width: 100%; border-radius: 12px; background: #000; display: block; }
@media (max-width: 380px) { .method-opts, .guide-bar { grid-template-columns: 1fr; } }

/* "hidden" always wins over display rules above */
[hidden] { display: none !important; }

/* Owner 2026-11-24: call button and QR code side by side; "Final Click" grey until the phone is confirmed */
.call-ways { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.call-ways .btn.call.big { flex: 1; margin: 0; min-height: 64px; }
.call-ways .call-qr { flex: none; width: 200px; margin: 0; }
.call-ways .call-qr .qr { width: 170px; height: 170px; }
.call-ways .call-qr .field-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
@media (max-width: 520px) { .call-ways { flex-direction: column; align-items: stretch; } .call-ways .call-qr { width: auto; } }
#submitBtn.locked, #submitBtn.locked:hover { background: #b9b0c4; color: #fff; cursor: not-allowed; opacity: 1; box-shadow: none; animation: none; }
.lock-hint { margin: 8px 0 0; text-align: center; }
.lock-hint .link-btn { font-weight: 700; color: var(--navy); text-decoration: underline; }

/* Owner 2026-11-24: hint for prepaid SIMs without credit */
.credit-hint { margin: 0 0 10px; padding: 9px 12px; background: #fff8e1; border: 1px solid #f3d98b; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.credit-hint .link-btn { font-weight: 800; color: var(--navy); text-decoration: underline; padding: 0 4px; }

/* Owner 2026-11-24: WhatsApp share */
.share-box { max-width: 360px; margin: 14px auto 0; display: grid; gap: 8px; }
.btn.wa { background: #1f9d55; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.wa:hover { background: #17834a; }
.foot-links .wa-foot { color: #7ee2a8; font-weight: 700; }

/* Owner 2026-11-24: Home button (back to the language page) */
.lang-switch .home-btn { color: #2e0f45; background: #f5b400; border-color: #f5b400; }
.lang-switch .home-btn:hover { background: #ffc933; }

/* Owner 2026-11-24 (option 1): optional campaign list on the thank-you screen */
.join-box { max-width: 420px; margin: 16px auto 0; padding: 14px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; text-align: start; }
.join-box .join-title { margin: 0 0 6px; font-weight: 800; color: var(--navy); font-size: 16.5px; }
.join-box .note { margin: 0 0 10px; }
.join-box form .field { margin: 0 0 10px; }
.join-box input[type=text], .join-box input[type=tel], .join-box select { width: 100%; }
.join-done { margin: 6px 0 0; font-weight: 800; color: #13795b; }

/* Test copy only (SITE_LABEL = "test") */
.test-banner { position: sticky; top: 0; z-index: 9999; background: #c62828; color: #fff; text-align: center; font-weight: 800; padding: 8px 12px; font-size: 15px; }
