/* Open-letter one-pager (hand-made style after the owner's pick, aletter.fun). Colours come from config.theme. */
@font-face{font-family:'Gaegu';font-style:normal;font-weight:400;font-display:swap;src:url(assets/fonts/gaegu-400.woff2) format('woff2')}
@font-face{font-family:'Gaegu';font-style:normal;font-weight:700;font-display:swap;src:url(assets/fonts/gaegu-700.woff2) format('woff2')}
@font-face{font-family:'Patrick Hand';font-style:normal;font-weight:400;font-display:swap;src:url(assets/fonts/patrick-hand-400.woff2) format('woff2')}
:root{--bg:#fff;--paper:#fff;--ink:#111;--soft:#666;--accent:#7b83f2;--accent-ink:#fff}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Patrick Hand','Comic Sans MS',cursive;font-size:19px;line-height:1.5;overflow-x:hidden}
.page{max-width:760px;margin:0 auto;padding:46px 22px 70px;text-align:center}
.hero .title{margin:0;font-family:Gaegu,'Comic Sans MS',cursive;font-weight:700;font-size:92px;line-height:.92;letter-spacing:.01em;text-transform:lowercase;overflow-wrap:anywhere}
.hero .subline{margin:14px auto 0;max-width:560px;font-size:22px;color:var(--soft)}
.stage{position:relative;max-width:620px;margin:132px auto 0}
.hero-art{position:absolute;z-index:3;top:-118px;left:-110px;width:min(250px,44%);transform:rotate(-7deg);mix-blend-mode:multiply;pointer-events:none}
.paper{position:relative;z-index:1;background:var(--paper);text-align:left;padding:104px 46px 40px;transform:rotate(.5deg)}
.paper>:not(.rough-svg){position:relative;z-index:1}
.rough{position:relative}
.rough-svg{position:absolute!important;inset:-6px;width:calc(100% + 12px);height:calc(100% + 12px);overflow:visible;pointer-events:none}
.rough-svg path{fill:none;stroke:var(--ink);stroke-width:3.4px;stroke-linecap:round;stroke-linejoin:round}
.letter-text p{margin:0 0 13px;font-size:18px;line-height:1.55}
.letter-text .dear{margin-bottom:12px;font-family:Gaegu,cursive;font-size:34px;font-weight:700}
.letter-text .last{margin-top:18px;font-family:Gaegu,cursive;font-size:25px;font-weight:700}
.sign-row{display:flex;align-items:baseline;gap:10px;margin:34px 0 12px}
.signed-by{font-family:Gaegu,cursive;font-size:30px;font-weight:700}
.count{color:var(--soft);font-size:18px}
.count b{color:var(--ink);font-weight:400}
.sigbox{margin-top:4px}
.sigs{list-style:none;margin:0;padding:16px 14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px 12px;max-height:236px;overflow-y:auto;scrollbar-width:none}
.sigs::-webkit-scrollbar{display:none}
.sig{min-height:58px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.sig .n{font-family:Gaegu,cursive;font-weight:700;font-size:23px;line-height:1.05;word-break:break-word}
.sig .r{font-size:14px;color:var(--soft);line-height:1.2}
.sign{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:26px}
.rough-input{flex:1 1 180px;min-width:0;font:inherit;font-size:18px;padding:8px 12px;border:2.5px solid var(--ink);border-radius:3px 9px 4px 11px/10px 4px 9px 3px;background:var(--paper);color:var(--ink)}
.rough-input:focus{outline:2px dashed var(--accent);outline-offset:2px}
.form-msg{flex-basis:100%;margin:0;min-height:1.4em;text-align:center;color:var(--soft);font-size:16px}
.share{text-align:center;margin-top:10px}
.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 22px 6px;border:0;background:transparent;color:var(--ink);font-family:Gaegu,cursive;font-size:25px;font-weight:700;text-decoration:none;cursor:pointer}
.btn.fill{background:var(--ink);color:var(--paper)}
.btn.small{font-size:19px;padding:4px 12px 3px}
.btn:focus-visible{outline:2px dashed var(--accent);outline-offset:4px}
.btn[disabled]{opacity:.45;cursor:default}
.ca{max-width:620px;margin:56px auto 0;padding:18px 22px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 14px}
.ca-label{flex-basis:100%;font-family:Gaegu,cursive;font-weight:700;font-size:24px}
.ticker{font-family:Gaegu,cursive;font-weight:700;font-size:28px;color:var(--accent)}
.ca code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;background:#f4f4f2;padding:4px 8px;border-radius:4px;word-break:break-all}
.ca-links{flex-basis:100%;display:flex;gap:16px;justify-content:center;font-size:17px}
.ca-links a{color:var(--ink)}
.footer{margin-top:48px;color:var(--soft);font-size:16px}
.footer a{color:var(--ink)}
.toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:var(--ink);color:var(--paper);padding:8px 16px;border-radius:6px;font-size:16px;opacity:0;pointer-events:none}
.toast.on{opacity:1}
@media (max-width:700px){
  body{font-size:18px}
  .page{padding:30px 14px 60px}
  .hero .title{font-size:58px}
  .hero .subline{font-size:19px}
  .stage{margin-top:96px}
  .hero-art{top:-86px;left:-4px;width:40%}
  .paper{padding:70px 22px 28px;transform:none}
  .letter-text p{font-size:17px}
  .letter-text .dear{font-size:30px}
  .sigs{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));max-height:212px}
  .signed-by{font-size:26px}
}

/* Dear CZ white-letter adaptation. Petition totals are supplied only by the shared API. */
:root{--bg:#ffffff;--paper:#ffffff;--ink:#17150f;--soft:#625d4d;--accent:#f0b90b;--accent-ink:#17150f}
body{overflow-x:visible}.hero .title{text-transform:none;font-size:clamp(66px,12vw,100px)}
.hero .ask{font:700 clamp(32px,6.8vw,47px)/1 Gaegu,cursive;margin:12px 0 0;letter-spacing:-.02em}
.hero .subline{max-width:540px;margin-top:16px;color:var(--ink)}
.hero .eyebrow{font-size:15px;margin:0 0 16px;color:var(--soft)}
.stage{margin-top:132px}.hero-art{height:auto;mix-blend-mode:normal}.paper{padding-top:86px}
.letter-text p{font-size:20px}.letter-text .last{font-size:29px;margin-top:26px}
.signoff{font-size:18px!important;color:var(--soft);max-width:400px}
.actions{display:flex;flex-wrap:wrap;gap:22px;align-items:center;justify-content:center;margin-top:32px}
.actions .btn{font-size:24px;min-height:48px}.btn.fill:hover{background:var(--accent);color:var(--ink)}
.sources{max-width:620px;margin:46px auto 0;text-align:left;font-size:16px;line-height:1.5;color:var(--soft)}
.sources h2{font:700 28px/1.1 Gaegu,cursive;color:var(--ink);margin-bottom:12px}
.sources p{margin:0 0 12px}.sources a{color:var(--ink);text-underline-offset:3px}
.sources .source-dates{font-size:15px}.ca{margin-top:32px}.ca code{background:#f1ead8}
.ca .pending{flex-basis:100%;font-size:15px;color:var(--soft)}.footer{font-size:15px}
@media(max-width:700px){.page{padding:30px 20px 46px}.paper{padding:70px 22px 28px}.letter-text p{font-size:19px;line-height:1.5}.stage{margin-top:105px}.hero-art{top:-100px;left:-4px;width:42%}.actions{gap:18px}.hero .subline{font-size:20px}.sources{margin-top:38px}.ca{padding:18px 16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.petition{margin-top:34px}.petition .signed-by{margin:0;font-size:29px}.petition .count{margin-left:auto;white-space:nowrap}.petition .count b{font-size:26px;font-weight:700;color:var(--ink)}.signature-state{margin:0;padding:5px 14px 13px;text-align:center;color:var(--soft);font-size:15px}.sigs:empty{padding:0}.sign-privacy{font-size:14px;line-height:1.3;color:var(--soft);text-align:center;margin:8px 0 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:420px){.petition .sign-row{gap:8px;flex-wrap:wrap}.petition .signed-by{font-size:26px}.petition .count{font-size:17px}.petition .count b{font-size:25px}.sign .btn{flex-basis:100%}}

/* R04: optional public numeric doodle, preserving the plain handmade letter. */
.draw-field{flex-basis:100%;min-width:0;text-align:left;margin:4px 0 9px}
.draw-label{font:700 25px/1.1 Gaegu,cursive;margin:0 0 7px}.draw-label span{font-size:19px;font-weight:400;color:var(--soft)}
.draw-help{font-size:15px;line-height:1.3;color:var(--soft);margin:0 0 10px}
.signature-pad{display:block;width:100%;height:auto;aspect-ratio:5/2;background:#fff;border:2px solid var(--ink);border-radius:5px 11px 6px 9px/8px 4px 10px 5px;touch-action:none;cursor:crosshair;user-select:none}
.draw-tools{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin-top:7px}.draw-tools .btn{font-size:17px;padding:5px 0;text-decoration:underline;text-underline-offset:3px;min-height:36px}
.draw-status{font-size:14px;line-height:1.25;margin:0;color:var(--soft);flex:1 1 180px}
.signature-doodle{display:block;width:100%;max-width:180px;height:auto;aspect-ratio:5/2;margin:7px auto 0;pointer-events:none}
.sig-date{font-size:12px;color:var(--soft);line-height:1.2;margin-top:3px}
.petition .sigs{max-height:270px;row-gap:18px}.petition .sig{justify-content:flex-start}
@media(max-width:420px){.draw-label{font-size:24px}.draw-tools{gap:3px}.petition .sigs{max-height:280px}.signature-pad{border-width:2px}}
.gallery-tools{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;align-items:center;margin:8px 0 0}.gallery-tools .btn{font-size:18px;padding:5px 0;text-decoration:underline;text-underline-offset:3px}.gallery-tools [hidden]{display:none!important}.gallery-status{flex-basis:100%;font-size:14px;color:var(--soft);margin:0}
.optional-name{flex-basis:100%;text-align:center;font-size:16px;color:var(--soft);margin-top:3px}.optional-name summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px;min-height:30px}.optional-name .rough-input{width:100%;margin-top:8px;font-size:17px}.optional-name p{font-size:14px;margin:4px 0 0}
