/* ====================================================================
   additions.css — everything added to the home page since October 2026,
   kept out of styles.css on purpose so nothing existing changes there.
   Five sections:
     1. School-zone image pair (Cookstown "Safer streets")
     2. Mobile layout fix for the Cookstown priorities list
     3. Hero arc: same animation, moved to a compositor layer
     4. Collapsible Donate section (markup removed after the election;
        rules kept so nothing else here moves)
     5. Thank-you section and the turnout graphic
   ==================================================================== */

/* 1. School-zone image pair ------------------------------------------
   Mobile first: the two images stack on a phone and sit side by side
   from 600px. No animation. Images reuse the site's 4px radius and
   portrait shadow. The Cookstown list is a two- or three-column grid,
   so the "Safer streets" item spans the full panel width to give the
   pair room; browsers without :has() keep it in its column, stacked. */
.community-item:has(.school-zone){grid-column:1/-1}
.school-zone{margin:18px 0 0}
.school-zone-pair{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width:600px){.school-zone-pair{grid-template-columns:1fr 1fr}}
.school-zone-pair img{width:100%;aspect-ratio:2.9/1;object-fit:cover;border-radius:4px;box-shadow:var(--shadow-lift)}
.school-zone figcaption{margin-top:12px;font-size:.875rem;letter-spacing:.04em;line-height:1.6;color:var(--ink-500)}
.community-item .school-zone-credit{margin-top:6px;font-size:.8125rem;line-height:1.6;color:var(--ink-500)}
/* Link to the campaign binder PDF, under the image pair. The link
   downloads rather than opening in the tab: the site's CSP
   (default-src 'none', object-src 'none') stops Chrome's built-in
   viewer from rendering a PDF served from this origin. */
.community-item .binder-link{margin-top:14px;font-size:.9375rem;line-height:1.6}
.community-item .binder-link a{font-weight:600}

/* 2. Mobile layout fix ------------------------------------------------
   The Cookstown list's columns had a hard 300px minimum, wider than the
   card's inner width on phones (about 291 to 296px), so text and images
   ran past the card's right padding. Capping the minimum at the
   available width keeps everything inside the card. No change at widths
   where the card is already wider than 300px. */
.community-list.two-col{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr))}

/* 3. Hero arc on its own layer ---------------------------------------
   styles.css runs two transform animations on .arc-hero: the entrance
   (w7arcIn) and the endless 150-second rotation (w7spin). Two transform
   animations on one element cannot be handed to the compositor, so the
   browser recalculated styles for the arc on every frame for the whole
   visit (about 2.4% of a CPU core, measured). The rotation now runs on a
   pseudo-element that draws the identical ring, while the entrance stays
   on the span, so each element carries one animation and both run off
   the main thread. Same keyframes, durations, delays and easing; the
   ring looks exactly as before. */
.arc-hero{border-color:transparent;animation:w7arcIn 2000ms var(--ease-out) both;animation-delay:calc(var(--intro-delay) + 80ms)}
.arc-hero::after{content:"";position:absolute;inset:-48px;border-radius:50%;border:48px solid rgba(255,255,255,.075);animation:w7spin 150s linear infinite;animation-delay:calc(var(--intro-delay) + 2100ms)}
@media (max-width:720px){.arc-hero::after{inset:-30px;border-width:30px}}
@media (prefers-reduced-motion:reduce){.arc-hero::after{animation:none!important;transform:none!important}}

/* 4. Collapsible Donate section --------------------------------------
   The donate section is a <details> element, closed by default. The
   summary shows the eyebrow and heading in the section's existing
   styles plus a Show/Hide cue; the amount chips, button and notes are
   the untouched original markup inside. The summary is keyboard
   focusable and uses the site's gold focus ring on dark backgrounds. */
.donate-collapse{position:relative}
.donate-collapse summary{cursor:pointer;list-style:none;display:grid;gap:4px;justify-items:start}
.donate-collapse summary::-webkit-details-marker{display:none}
.donate-collapse summary .eyebrow{display:block;margin-bottom:4px}
.donate-summary-title{font-family:"Playfair Display",Georgia,serif;font-weight:800;font-size:clamp(1.75rem,2.8vw,2.5rem);line-height:1.15;color:#fff;margin:14px 0 6px}
.donate-summary-hint{font-size:.8125rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--gold-500);padding-bottom:3px;border-bottom:2px solid rgba(230,180,80,.6)}
.donate-summary-hint::before{content:"Show donation options"}
.donate-collapse[open] .donate-summary-hint::before{content:"Hide donation options"}
.donate-collapse[open] summary{margin-bottom:28px}
.donate-collapse summary:hover .donate-summary-hint{color:var(--gold-400)}

/* 5. Thank-you section and the turnout graphic ----------------------
   The thank-you letter sits beside the turnout panel on desktop and
   stacks above it on phones (the shared .split rule already collapses
   to one column under 900px). The graphic is built from real text and
   CSS so it scales with the visitor's text size, reads correctly to
   screen readers, and needs no image file or inline style (the site's
   Content Security Policy allows neither inline styles nor scripts).
   The bar tracks are decorative and hidden from assistive technology;
   the community name, percentage and count beside each one carry the
   same information as text. Colours are the site's own tokens; the
   lightest text on the plum panel is above 7:1 contrast. No new
   animation: the panel uses the existing section fade-in only. */
.thanks-grid{grid-template-columns:1.1fr .9fr;gap:clamp(32px,6vw,80px)}
.turnout{margin:0}
.turnout figcaption{font-size:.9375rem;line-height:1.7;color:var(--ink-500);margin-bottom:16px}
.turnout-panel{background:var(--plum-900);color:rgba(255,255,255,.86);border-radius:4px;padding:clamp(24px,3.5vw,40px);box-shadow:var(--shadow-lift)}
.turnout-rule{display:block;width:64px;height:3px;background:var(--gold-500);margin-bottom:18px}
.turnout-kicker{font-size:.75rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--gold-500);margin:0 0 10px}
.turnout-title{font-family:"Playfair Display",Georgia,serif;font-weight:800;font-size:clamp(1.75rem,2.6vw,2.4rem);line-height:1.1;color:#fff;margin:0 0 10px;text-wrap:balance}
.turnout-sub{font-size:1rem;line-height:1.6;color:rgba(255,255,255,.8);margin:0 0 24px}
.turnout-list{list-style:none;display:grid;gap:18px;margin:0;padding:0}
.turnout-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.turnout-name{font-weight:700;font-size:1.0625rem;color:#fff}
.turnout-pct{font-family:"Playfair Display",Georgia,serif;font-weight:800;font-size:1.375rem;color:#fff;white-space:nowrap}
.turnout-track{height:12px;border-radius:999px;background:rgba(255,255,255,.14);margin:6px 0 4px;overflow:hidden}
.turnout-fill{display:block;height:100%;border-radius:999px;background:var(--gold-500)}
.turnout-fill-gilford{width:40.9%}
.turnout-fill-churchill{width:39.5%}
.turnout-fill-cookstown{width:35.9%}
.turnout-fill-lefroy{width:25.5%}
.turnout-fill-other{width:14.4%}
.turnout-note{font-size:.875rem;line-height:1.6;color:rgba(255,255,255,.8);margin:0}
.turnout-total{margin:26px 0 0;font-size:1.125rem;line-height:1.6;color:rgba(255,255,255,.92)}
.turnout-total strong{color:var(--gold-500)}
.turnout-foot{margin:20px 0 0;padding-top:14px;border-top:1px solid var(--rule-dark);font-size:.8125rem;line-height:1.6;color:rgba(255,255,255,.8)}
