*{box-sizing:border-box}body{margin:0;background:#f7f8fa;color:#1c2430;font:17px/1.55 Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
main{max-width:640px;margin:0 auto;padding:16px}h1{font-size:24px;margin:8px 0}
a{color:#0f766e}.muted{color:#5b6573}.small{font-size:14px;color:#5b6573}
.top{background:#fff;border-bottom:1px solid #e3e6eb;padding:8px 16px;position:sticky;top:0;z-index:5}.brand{font-weight:700;font-size:15px;max-width:640px;margin:0 auto}
.top nav{display:flex;gap:4px;max-width:640px;margin:4px auto 0}.top nav a{flex:1;text-align:center;padding:12px 4px;min-height:48px;text-decoration:none;border-radius:10px;font-weight:600}.top nav a[aria-current]{background:#e6f4f2}
.card,details.race{background:#fff;border:1px solid #e3e6eb;border-radius:14px;padding:18px;margin:0 0 12px}
.sh{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#5b6573;margin:20px 0 8px;display:flex;justify-content:space-between}.card .sh{margin-top:0}
.prog{text-transform:none;letter-spacing:0}
.seg{display:flex;background:#eef0f3;border-radius:12px;padding:4px;margin-bottom:12px}.seg button{flex:1;min-height:48px;border:0;background:none;border-radius:9px;font:inherit;font-weight:600;color:#1c2430}.seg button[aria-selected=true]{background:#fff;color:#0f766e;box-shadow:0 1px 2px #0002}
label{display:block;font-weight:600;margin:8px 0}label.big input,select,textarea{display:block;width:100%;margin-top:6px;font:inherit;border:2px solid #d5dae1;border-radius:12px;padding:12px;background:#fff;color:#1c2430}label.big input{height:56px}
:focus-visible{outline:3px solid #0f766e66;outline-offset:2px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 18px;border-radius:12px;border:2px solid #d5dae1;background:#fff;color:#1c2430;font:inherit;font-weight:600;text-decoration:none;cursor:pointer;margin:6px 6px 0 0}
.btn.primary{background:#0f766e;border-color:#0f766e;color:#fff}.btn.primary:hover{background:#0b5e58}.btn.wide{width:100%;margin:8px 0 16px}
.row2{display:flex;flex-wrap:wrap}.link{background:none;border:0;color:#0f766e;font:inherit;font-weight:600;text-decoration:underline;min-height:48px;padding:0 4px;cursor:pointer}
.plist{max-height:60vh;overflow:auto}.confirm{border-left:4px solid #0f766e}
details.race{padding:0}summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:64px;padding:14px 18px;cursor:pointer}summary::-webkit-details-marker{display:none}summary>div:first-child{flex:1}
.rt{font-size:19px;font-weight:700;line-height:1.3}.sub{font-size:14px}.chev{transition:transform .2s;font-size:22px}details[open] .chev{transform:rotate(180deg)}
.body{padding:0 18px 18px}.feat{font-size:12px;background:#e6f4f2;color:#0b5e58;padding:2px 8px;border-radius:99px;vertical-align:middle}
.chip{font-size:13px;font-weight:600;padding:4px 10px;border-radius:99px;white-space:nowrap;max-width:45%;overflow:hidden;text-overflow:ellipsis}.chip.teal{background:#e6f4f2;color:#0b5e58}.chip.amber{background:#fef3c7;color:#b45309}.chip.grey{background:#eef0f3;color:#5b6573}
.cmp{display:grid;gap:12px}.cc{border:1px solid #e3e6eb;border-radius:12px;padding:14px}.cn{font-size:18px;font-weight:600}.cn .muted{font-size:14px;font-weight:400}
dl{margin:8px 0 0}dt{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#5b6573;margin-top:10px}dd{margin:2px 0 0}
h4{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:#5b6573;margin:18px 0 4px}ul{padding-left:20px}li{margin:6px 0}
.tag{font-size:12px;font-weight:700;padding:2px 8px;border-radius:6px;border:1px solid #d5dae1}.tag.danger::before{content:"● "}.tag.warning::before{content:"◐ "}.tag.success::before{content:"○ "}
.clamp p{font-size:16px;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:0}.clamp.open p{display:block;-webkit-line-clamp:unset;line-clamp:none;overflow:visible}
fieldset{border:0;padding:0;margin:16px 0 0}legend{font-weight:700;margin-bottom:6px}
.opt{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 14px;margin:0 0 8px;border:2px solid #d5dae1;border-radius:12px;background:#fff;font:inherit;font-weight:500;text-align:left;cursor:pointer;color:#1c2430}
.opt input{position:absolute;opacity:0}.dot{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid #5b6573}.opt.sel{border-color:#0f766e;background:#e6f4f2}.opt.sel .dot{border-color:#0f766e;background:radial-gradient(#0f766e 45%,#fff 50%)}.opt:focus-within{outline:3px solid #0f766e66}
.yn{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ynb{min-height:56px;border:2px solid #d5dae1;border-radius:12px;background:#fff;font:inherit;font-weight:700;cursor:pointer;color:#1c2430}.ynb.sel{border-color:#0f766e;background:#e6f4f2;color:#0b5e58}
.note{font-weight:500;font-size:14px;color:#5b6573}
.sticky{position:sticky;top:96px;z-index:4;background:#fff;border-bottom:1px solid #e3e6eb;padding:10px 16px;max-width:640px;margin:0 auto;display:flex;flex-wrap:wrap;justify-content:space-between}.bar{flex-basis:100%;height:8px;background:#eef0f3;border-radius:9px;margin-top:6px}.bar i{display:block;height:100%;background:#0f766e;border-radius:9px}
.rrow{display:flex;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e3e6eb;border-radius:12px;padding:12px 14px;margin-bottom:8px}.rrow.und{border-left:5px solid #b45309}.rp{text-align:right;display:flex;flex-direction:column;align-items:flex-end}.rp a{min-height:48px;display:flex;align-items:center}
.actions{display:flex;flex-wrap:wrap;margin:16px 0}
@media print{.top,.noprint,.sticky .bar{display:none!important}body{background:#fff;color:#000;font-size:12pt}.card,.rrow{border:1px solid #000;break-inside:avoid}.rrow.und{border-left:4px solid #000}.sticky{position:static}a{color:#000}}

@media print{.clamp p{display:block;-webkit-line-clamp:unset;overflow:visible}.more{display:none}}


/* Fun theme (Desk UI spec + Davis's choices) */
body{background:#fbfbfd}.card,details.race,.rrow{border-color:#e2e5ec}
.top{background:#1e3a8a;border-bottom:0}.brand{color:#fff;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px}
.top nav a{color:#fff}.top nav a[aria-current]{background:#ffffff26;color:#fff}
.fxt{min-height:48px;background:transparent;color:#fff;border:1px solid #ffffff80;border-radius:10px;font:inherit;font-size:13px;font-weight:600;padding:0 10px;cursor:pointer}
.stripe{height:4px;margin:8px -16px 0;background:linear-gradient(90deg,#c8102e 0 33.3%,#fff 33.3% 66.6%,#1e3a8a 66.6%);border-bottom:1px solid #e2e5ec}.top{padding-bottom:0}
a,.link{color:#1e3a8a}.btn.primary{background:#1e3a8a;border-color:#1e3a8a}.btn.primary:hover{background:#172e6e}
.sh{color:#1e3a8a}.confirm{border-left:4px solid #c8102e}.feat{background:#fdecee;color:#8a0b20}
.chip.teal{background:#eaf1fd;color:#1e3a8a}
.chip.t-rep{background:#fdecee;color:#8a0b20}.chip.t-dem{background:#eaf1fd;color:#1e3a8a}.chip.t-npa{background:#f1f2f4;color:#374151}.chip.t-yes{background:#e9f7ee;color:#14532d}.chip.t-no{background:#fdf6dc;color:#713f12}
.mascot{vertical-align:middle;flex:none}
.opt .ot{flex:1}.ck{font-weight:800}
.opt.sel{font-weight:700;border-left-width:2px}
.opt.sel.p-rep{background:#fdecee;border-color:#c8102e}.opt.sel.p-rep .dot{border-color:#c8102e;background:radial-gradient(#c8102e 45%,#fff 50%)}
.opt.sel.p-dem{background:#eaf1fd;border-color:#1e40af}.opt.sel.p-dem .dot{border-color:#1e40af;background:radial-gradient(#1e40af 45%,#fff 50%)}
.opt.sel.p-npa{background:#f1f2f4;border-color:#6b7280}.opt.sel.p-npa .dot{border-color:#6b7280;background:radial-gradient(#6b7280 45%,#fff 50%)}
.ynb.sel{font-weight:800}.ynb.sel.yn-yes{background:#e9f7ee;border-color:#15803d;color:#14532d}.ynb.sel.yn-no{background:#fdf6dc;border-color:#ca8a04;color:#713f12}
.rrow.t-rep{background:#fdecee;border-left:2px solid #c8102e}.rrow.t-dem{background:#eaf1fd;border-left:2px solid #1e40af}.rrow.t-npa{background:#f1f2f4;border-left:2px solid #6b7280}.rrow.t-yes{background:#e9f7ee;border-left:2px solid #15803d}.rrow.t-no{background:#fdf6dc;border-left:2px solid #ca8a04}
.rp b{display:inline-flex;align-items:center;gap:4px}
.bar i{background:#1e3a8a}
/* animation stage: adds its own space, never overlays text/buttons */
summary,#readyHost{position:relative}
.fxpad{padding-bottom:76px!important;transition:padding .2s}.fxpad96{padding-bottom:0!important;min-height:110px}
.fxstage{position:absolute;left:0;right:0;bottom:2px;height:72px;pointer-events:none;overflow:hidden;transition:opacity .2s}.fxstage.big{height:110px;bottom:auto;top:0}
.fxstage.fade{opacity:0}
.fxbox{position:absolute;width:72px;height:72px;bottom:0}
.fxbox.walk{left:0;transition:left 1.6s linear}.fxbox.walk.go{left:calc(100% - 72px)}
.fxbox.kick{right:8px}
.big .fxbox{width:96px;height:96px;bottom:4px}.fxbox.inL{left:-96px;transition:left 2s ease-out}.fxbox.inL.go{left:calc(50% - 100px)}
.fxbox.inR{right:-96px;transition:right 2s ease-out}.fxbox.inR.go{right:calc(50% - 100px)}.fxbox.inR canvas{transform:scaleX(-1)}
.ready{position:absolute;top:4px;left:0;right:0;text-align:center;font-weight:800;color:#1e3a8a;font-size:18px}
.fxstatic{position:absolute;right:8px;bottom:20px}.fxstatic .mascot{width:32px;height:24px}
.nudge{animation:nudge .5s}@keyframes nudge{30%{transform:translateX(4px)}60%{transform:translateX(-2px)}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media print{.stripe,.fxt,.fxstage{display:none}.rrow{background:#fff!important}}

.sticky{top:var(--hh,0px)!important}
.fxpad96{min-height:134px}.fxstage.big{height:134px}.big .fxbox{bottom:0}.fxbox.inL.go{left:calc(50% - 104px)}.fxbox.inR.go{right:calc(50% - 104px)}.ready{top:2px}

/* v5: never clip animations at page bottom */
main{padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))!important;overflow:visible}
html,body,#app,details.race,summary{overflow:visible}
.fxstage{scroll-margin-bottom:calc(16px + env(safe-area-inset-bottom,0px));scroll-margin-top:calc(var(--hh,0px) + 8px)}

/* Davis: pick animations pinned to the bottom of the screen */
.fxstage.fxfixed{position:fixed;left:0;right:0;top:auto;bottom:calc(env(safe-area-inset-bottom,0px) + 8px);height:72px;z-index:1000;pointer-events:none;overflow:visible;max-width:640px;margin:0 auto}
.fxstage.fxfixed.big{height:134px}
.fxbox.walk{width:96px}.fxbox.walk.go{left:calc(100% - 96px)}
.fxbox.kick{width:96px}
