:root {
  --navy: #0f2540; --navy-2: #173459; --gold: #b8923a; --gold-d: #9a7a2d;
  --ink: #1d2733; --muted: #5d6b7a; --line: #dfe4ea; --bg: #f6f7f9; --white: #fff; --red: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; margin: 0 0 .5em; }

.topbar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.topbar .wrap { padding: 14px 20px; }
.brand { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }

.hero { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; padding: 56px 0 64px; }
.eyebrow { color: #d9bf7e; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; margin: 0 0 14px; }
.recipient { color: #d3dbe6; margin: 0 0 18px; font-size: 1rem; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); max-width: 24ch; }

.candidate { display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 16px 20px; margin: 28px 0; max-width: 520px; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font: 700 1.2rem Georgia, serif; }
.cand-name { font: 600 1.2rem Georgia, serif; }
.cand-title { color: #c4cedb; font-size: .92rem; }

.btn { appearance: none; border: 0; cursor: pointer; background: var(--gold); color: #fff; font: 600 1rem inherit; font-family: inherit; padding: 14px 28px; border-radius: 8px; transition: background .15s; }
.btn:hover { background: var(--gold-d); }
.btn:focus-visible, input:focus-visible { outline: 3px solid #f0d99b; outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); }

.progress { margin-top: 28px; max-width: 520px; }
.count strong { font-size: 1.8rem; font-family: Georgia, serif; }
.bar { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.fill { height: 100%; width: 0; background: var(--gold); transition: width .6s; }
.goal { font-size: .85rem; color: #b9c5d4; }



footer { background: var(--navy); color: #b9c5d4; padding: 28px 0; font-size: .9rem; }
footer p { margin: 0 0 8px; }
footer .small { font-size: .78rem; color: #8fa0b5; }

/* the petition letter */
.paper { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 4px; margin: -28px 0 0; position: relative; padding: clamp(24px, 5vw, 56px); box-shadow: 0 8px 30px rgba(15,37,64,.08); }
.sec + .sec { margin-top: 36px; }
.sec h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.num { color: var(--gold-d); margin-right: 2px; }
.paper p { margin: 0 0 1em; font-size: 1.04rem; line-height: 1.8; }
.nominee { text-align: center; margin: 22px 0; padding: 20px 16px; background: #faf6ea; border-top: 1px solid #e6d9b2; border-bottom: 1px solid #e6d9b2; }
.nominee strong { display: block; font: 700 clamp(1.35rem, 3.5vw, 1.8rem) Georgia, serif; color: var(--navy); }
.nominee span { color: var(--muted); }
.point { display: flex; gap: 14px; margin: 22px 0 0; }
.badge { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .95rem; }
.point h3 { font-size: 1.08rem; color: var(--navy); margin: 4px 0 8px; }
.closing { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.closing .sign { font-weight: 600; margin-bottom: 0; }

.signatories { padding: 40px 20px 64px; }
.signatories h2 { font-size: 1.3rem; color: var(--navy); }
.cta-row { margin: 8px 0 24px; }
.signatories ul { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; counter-reset: n; }
.signatories ul:empty { display: none; }
.signatories li { counter-increment: n; display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.signatories li:last-child { border: 0; }
.signatories li::before { content: counter(n) "."; color: var(--muted); min-width: 1.8em; }
.signatories li .ag { color: var(--muted); margin-left: auto; text-align: right; }
.list-note { color: var(--muted); font-size: .85rem; margin-top: 10px; }

/* modal */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); color: var(--ink); }
dialog::backdrop { background: rgba(15,37,64,.65); }
form { padding: 24px; }
.dlg-head { display: flex; justify-content: space-between; align-items: start; }
.dlg-head h3 { color: var(--navy); font-size: 1.3rem; }
.x { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
input:not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-weight: 400; border: 1px solid #b9c2cd; border-radius: 6px; }
input[aria-invalid=true] { border-color: var(--red); }
.err { display: block; color: var(--red); font-size: .82rem; font-weight: 400; min-height: 0; margin-top: 4px; }
.check { display: flex; gap: 10px; font-weight: 400; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.form-err { color: var(--red); font-size: .9rem; margin: 8px 0; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
#thanks { text-align: center; padding: 16px 0 4px; }
.tick { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; background: #e7f4ea; color: #1e7b34; font-size: 2rem; display: grid; place-items: center; }
[hidden] { display: none !important; }

@media (max-width: 480px) { .actions { flex-direction: column-reverse; } .btn { width: 100%; } }

#ts { margin: 10px 0 0; min-height: 0; }
.closed-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; font-weight: 600; }

.topbar .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; overflow: hidden; }
.lang button { appearance: none; border: 0; background: transparent; color: #d3dbe6; font: 600 .78rem inherit; font-family: inherit; letter-spacing: .06em; padding: 5px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--gold); color: #fff; }
.lang button:focus-visible { outline: 3px solid #f0d99b; outline-offset: -3px; }
