/* Thank-you section (.ty) and "What's next" (.ty-next). Every rule is scoped to these two sections.
   Point the variables at the site's own colours if it has them. */
.ty,.ty-next{--ty-navy:var(--navy);--ty-green:var(--green);--ty-green-text:var(--green-text);--ty-ink:#1F2A37;--ty-muted:#4B5563;--ty-soft:#F2F6EC;--ty-line:#D9E1EA}
.ty *,.ty *::before,.ty *::after,.ty-next *,.ty-next *::before,.ty-next *::after{box-sizing:border-box}

.ty-in{max-width:1120px;margin:0 auto;padding:clamp(2rem,6vw,4rem) max(16px,env(safe-area-inset-right,0px)) clamp(2rem,5vw,3rem) max(16px,env(safe-area-inset-left,0px))}
.ty-head{max-width:46rem}
/* Ken's headshot beside the text from 820px up; hidden on phones so the group photo sits right under his message */
.ty-headshot{display:none}
@media (min-width:820px){
  .ty-top{display:grid;grid-template-columns:minmax(0,1fr) clamp(150px,19.5vw,300px);gap:clamp(2rem,4vw,3.5rem);align-items:center}
  /* Same treatment as the old campaign hero photo: circle inside a rotated green ring, no shadow */
  .ty-headshot{display:block;position:relative;width:100%;aspect-ratio:1/1;overflow:clip}
  .ty-ring{position:absolute;inset:0;border-radius:50%;border:12px solid transparent;border-top-color:var(--green);border-right-color:var(--green);transform:rotate(28deg)}
  .ty-headshot img{position:absolute;inset:26px;width:calc(100% - 52px);height:calc(100% - 52px);border-radius:50%;object-fit:cover}
}
@media (min-width:1200px){
  .ty-top{grid-template-columns:minmax(0,1fr) 320px}
}
.ty-pill{display:inline-block;margin:0;background:var(--ty-soft);color:var(--ty-navy);font-weight:700;font-size:.85rem;padding:.3rem .8rem;border-radius:999px}
.ty h1{margin:.8rem 0 0;color:var(--ty-navy);font-weight:800;font-size:clamp(2.6rem,8vw,4.6rem);line-height:1;letter-spacing:-.02em;text-wrap:balance}
.ty h1 span{color:var(--ty-green-text)}
.ty-msg{margin:1.6rem 0 0;padding:.2rem 0 .2rem 1.2rem;border-left:5px solid var(--ty-green)}
.ty-msg p{margin:0 0 .6rem;color:var(--ty-ink);font-size:clamp(1.1rem,2.2vw,1.3rem);line-height:1.5}
.ty-sig{margin-top:.4rem;color:var(--ty-green-text);font-weight:700}
.ty-results{display:inline-block;margin-top:1.25rem;color:var(--ty-navy);font-weight:700;text-decoration:none;border-bottom:2px solid var(--ty-green);padding-bottom:1px}
.ty-results:hover{color:var(--ty-green-text)}
.ty-results:focus-visible{outline:3px solid var(--ty-green);outline-offset:3px}

.ty-photo{margin:clamp(1.75rem,4vw,2.5rem) 0 0}
.ty-photo-btn{display:block;width:100%;padding:0;border:0;background:#0b1b33;border-radius:18px;overflow:hidden;cursor:zoom-in;box-shadow:0 18px 40px rgba(8,51,110,.18)}
.ty-photo-btn img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;transition:transform .4s ease}
.ty-photo-btn:hover img{transform:scale(1.02)}
.ty-photo-btn:focus-visible{outline:3px solid var(--ty-green);outline-offset:4px}
.ty-photo figcaption{margin-top:.6rem;color:var(--ty-muted);font-size:.92rem}
@media (max-width:640px){.ty-photo-btn{border-radius:12px}}

.ty-lightbox{width:100vw;height:100vh;max-width:100vw;max-height:100vh;margin:0;padding:0;border:0;background:rgba(4,14,32,.94);color:#fff}
.ty-lightbox[open]{display:grid;place-items:center}
.ty-lightbox::backdrop{background:rgba(4,14,32,.94)}
.ty-lightbox img{max-width:min(94vw,1400px);max-height:88vh;width:auto;height:auto;border-radius:10px}
.ty-close{position:absolute;top:max(1rem,env(safe-area-inset-top));right:1rem;width:48px;height:48px;border-radius:999px;border:0;cursor:pointer;
  background:rgba(255,255,255,.14);color:#fff;font-size:1.9rem;line-height:1;display:grid;place-items:center}
.ty-close:hover{background:rgba(255,255,255,.26)}
.ty-close:focus-visible{outline:3px solid var(--ty-green);outline-offset:2px}

.ty-next{background:var(--ty-navy);color:#fff}
.ty-next-in{max-width:1120px;margin:0 auto;padding:clamp(2rem,5vw,3.25rem) max(16px,env(safe-area-inset-right,0px)) clamp(2rem,5vw,3.25rem) max(16px,env(safe-area-inset-left,0px))}
.ty-next h2{margin:0;color:#fff;font-weight:800;font-size:clamp(1.6rem,4vw,2.3rem);line-height:1.15}
.ty-next-sub{margin:.5rem 0 1.5rem;color:rgba(255,255,255,.85);line-height:1.55}
.ty-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
@media (max-width:800px){.ty-cards{grid-template-columns:1fr}}
.ty-card{display:flex;flex-direction:column;align-items:flex-start;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:1.2rem;color:#fff;text-decoration:none;min-width:0}
.ty-card h3{margin:0 0 .4rem;color:#fff;font-size:1.1rem}
.ty-card p{margin:0;color:rgba(255,255,255,.85);font-size:.95rem;line-height:1.5}
.ty-card-live:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.4)}
.ty-card-live:focus-visible{outline:3px solid var(--ty-green);outline-offset:3px}
.ty-card .ty-tag{display:inline-block;margin-top:.9rem;padding:.2rem .6rem;font-size:.78rem;font-weight:700;border-radius:999px;background:var(--ty-green);color:var(--ty-navy)}
.ty-card .ty-soon{background:transparent;border:1px solid rgba(255,255,255,.45);color:#fff}

@media (prefers-reduced-motion:reduce){.ty-photo-btn img{transition:none}.ty-photo-btn:hover img{transform:none}}

/* Site fonts: headings in Poppins, body text in the site body font */
.ty,.ty-next{font-family:'Public Sans',system-ui,-apple-system,'Segoe UI',sans-serif}
.ty h1,.ty-next h2,.ty-card h3,.ty-pill,.ty-sig,.ty-tag{font-family:'Poppins',sans-serif}

/* Header: role title under Ken's name (text set by thanks.js) */
.brand{flex-direction:column;align-items:flex-start;gap:2px}
.brand-role{font-family:'Poppins',sans-serif;font-size:13px;font-weight:600;line-height:1.2;color:var(--green-text);white-space:nowrap}

/* The signature is a <footer> inside the quote: undo the site's page-footer styling for it */
.ty .ty-msg .ty-sig{background:none;padding:0;color:var(--ty-green-text)}

/* Smallest phones: the role line may wrap ("Councillor-elect," / "Ward 2") so the header stays on one row.
   It only wraps when it has to, so the shorter "Councillor, Ward 2" sits on one line. */
@media (max-width:340px){.brand{flex:0 1 auto}.brand-role{white-space:normal}}

/* Light sweep across "Thank you, Ward 2.": a soft band passes left to right every 6 seconds, then rests.
   At rest the colours are exactly the heading's own navy and green. Browsers without background-clip:text keep solid colours. */
.ty h1 .ty-w1,.ty h1 .ty-w2{display:inline-block}
.ty h1 .ty-w1{color:var(--ty-navy)}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  /* A little padding (cancelled by negative margin, so layout is unchanged) keeps letter edges and the "y" descender inside the painted area */
  .ty h1 .ty-w1,.ty h1 .ty-w2{padding:.08em .06em .22em;margin:-.08em -.06em -.22em}
  .ty h1 .ty-w1{
    background:linear-gradient(105deg,var(--ty-navy) 0 42%,#4E7BC4 50%,var(--ty-navy) 58% 100%);
    background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;
    animation:ty-sheen 6s cubic-bezier(.45,0,.25,1) infinite}
  .ty h1 .ty-w2{
    background:linear-gradient(105deg,var(--ty-green-text) 0 42%,#9BD45C 50%,var(--ty-green-text) 58% 100%);
    background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;
    animation:ty-sheen 6s cubic-bezier(.45,0,.25,1) .35s infinite}
}
@keyframes ty-sheen{0%{background-position:100% 0}45%,100%{background-position:0 0}}
@media (prefers-reduced-motion:reduce){
  .ty h1 .ty-w1,.ty h1 .ty-w2{animation:none;background-position:0 0}
}
