*{box-sizing:border-box}html,body{margin:0;min-height:100%;}body{font-family:Arial,sans-serif;background:#8f9bb6 url(assets/background.webp) center top / max(100%,1440px) auto no-repeat;color:#111}.viewport{width:min(100%,1440px);margin:0 auto;container-type:inline-size}.stage{position:relative;width:100%;aspect-ratio:1440/1775;overflow:hidden}.layer{position:absolute;margin:0;padding:0;border:0;transform-origin:0 0}.photo{object-fit:contain;display:block}.text-layer{display:block;text-decoration:none;line-height:1;overflow:visible}.outline{position:absolute;display:block;max-width:none;pointer-events:none}.live,.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.editable .live{position:static;width:auto;height:auto;clip-path:none;overflow:visible;white-space:pre-line}.editable .outline{display:none}.nav-line{background:#bdbdbd;pointer-events:none}.red{background:url(assets/red.png) 0 0/100% 100%;cursor:pointer}.card{overflow:hidden;text-decoration:none;display:block}.card-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.nav-link:hover,.card:hover,.red:hover{filter:brightness(1.08)}a:focus-visible,button:focus-visible{outline:3px solid #e9bc4b;outline-offset:3px}.demo-label,.sample-label{position:absolute;margin:0;font:normal .65cqw Arial,sans-serif;letter-spacing:.03em;color:#25365b}.demo-label{top:.4cqw;right:9.24cqw}.sample-label{left:10.3cqw;top:58.4cqw}button{font:inherit}dialog{padding:24px;border:1px solid #25365b}dialog::backdrop{background:#0006}.subpage{width:min(92%,1174px);margin:30px auto;background:white;min-height:65vh;box-shadow:0 3px 16px #0003}.subnav{display:flex;flex-wrap:wrap;gap:20px;padding:18px;background:linear-gradient(#fff,#eee);border-bottom:1px solid #aaa}.subnav a{color:#25365b}.subcontent{padding:28px;max-width:760px}.subcontent h1{color:#25365b}.subcontent label{display:block;margin:12px 0}.subcontent input,.subcontent textarea{display:block;width:100%;padding:8px;font:inherit}.subcontent small{display:block;color:#53627b}.subcontent button{padding:8px 14px}.subcontent img{max-width:100%;height:auto}
@media(max-width:600px){.viewport{width:100%}.stage{aspect-ratio:1440/1775}.demo-label,.sample-label{font-size:max(.65cqw,5px)}}

/* White glow on Write Ryan! — works with the original Figma SVG lettering. */
.write { cursor: pointer; }
.write .outline { transition: filter 220ms ease; }
.write .live { transition: text-shadow 220ms ease; }
.write:is(:hover, :focus-visible) .outline {
  filter: drop-shadow(0 0 2px rgba(255,255,255,.95))
          drop-shadow(0 0 6px rgba(179,206,255,.85))
          drop-shadow(0 0 12px rgba(130,169,255,.65));
}
.editable .write:is(:hover, :focus-visible) .live {
  text-shadow: 0 0 3px #fff, 0 0 8px #b3ceff, 0 0 14px #82a9ff;
}
@media (prefers-reduced-motion: reduce) {
  .write .outline, .write .live { transition: none; }
}

/* Frame 2: About candidate. Same 1440px design grid and masthead as Home. */
.stage.about-stage { aspect-ratio:1440/1775; }
.about-stage .portrait {cursor:pointer;}

/* Frame 3: Media. Original 1440px canvas, ending at the white paper edge. */
.stage.media-stage { aspect-ratio:1440/1775; }
.media-stage .portrait { cursor:pointer; }
.media-photo { background:transparent; cursor:zoom-in; overflow:hidden; }
.media-photo img { display:block; width:100%; height:100%; object-fit:cover; }
.media-photo:focus-visible { z-index:2; }
#media-lightbox { position:fixed; inset:0; margin:auto; padding:0; border:0; overflow:visible; background:transparent; max-width:90vw; max-height:88vh; }
#media-lightbox::backdrop { background:rgba(8,12,25,.82); animation:media-backdrop-in 240ms ease both; }
#media-enlarged { display:block; width:auto; height:auto; max-width:90vw; max-height:86vh; object-fit:contain; border-radius:2px; box-shadow:0 12px 50px #0006; }
.media-close { position:absolute; right:8px; top:8px; z-index:1; width:42px; height:42px; border:0; border-radius:50%; background:rgba(0,0,0,.72); color:white; font:32px/1 Arial,sans-serif; cursor:pointer; }
body:has(#media-lightbox[open]) { overflow:hidden; }
@keyframes media-backdrop-in { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { #media-lightbox::backdrop { animation:none; } }

/* Frame 4: Programme — original headings and downloadable presentation rectangle. */
.stage.programme-stage { aspect-ratio:1440/1775; }
.presentation-preview { display:grid; place-items:center; cursor:pointer; color:#313131; overflow:hidden; text-decoration:none; }
.presentation-preview:focus-visible { z-index:2; }
.presentation-open { position:relative; z-index:1; display:grid; justify-items:center; gap:.8cqw; font:500 1.55cqw Arial,sans-serif; transition:transform 180ms ease; }
.presentation-open svg { width:3.8cqw; height:3.8cqw; }
.presentation-preview[href]:hover .presentation-open { transform:scale(1.07); }
.presentation-preview[aria-disabled="true"] { cursor:default; }
#presentation-status { font-size:1.05cqw; color:#444; }
#presentation-status[hidden] { display:none; }
@media(prefers-reduced-motion:reduce) { .presentation-open { transition:none; } }

/* Home: watch video without navigating away. Original card geometry is unchanged. */
#watch-video { cursor:pointer; text-align:left; }
#home-video-dialog { position:fixed; inset:0; margin:auto; width:min(900px,92vw); max-width:92vw; max-height:92vh; padding:0; border:0; border-radius:8px; background:#111827; color:white; box-shadow:0 16px 70px #0007; overflow:hidden; }
#home-video-dialog[open] { animation:home-video-open 280ms cubic-bezier(.2,.7,.25,1) both; }
#home-video-dialog::backdrop { background:rgba(8,12,25,.78); animation:media-backdrop-in 240ms ease both; }
.home-video-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; background:#293452; }
.home-video-header h2 { margin:0; font:500 20px Arial,sans-serif; }
#home-video-close { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:50%; background:#ffffff19; color:#fff; cursor:pointer; font:30px/1 Arial,sans-serif; }
#home-video-close:hover { background:#ffffff35; }
.home-video-screen { background:#101624; aspect-ratio:16/9; max-height:calc(92vh - 60px); display:grid; place-items:center; }
#home-video-player { display:block; width:100%; height:100%; min-height:0; object-fit:contain; background:#000; }
#home-video-placeholder { display:grid; justify-items:center; align-content:center; gap:12px; color:#d4d9e7; text-align:center; padding:16px; }
#home-video-placeholder strong { font-size:clamp(18px,3vw,26px); color:white; }
#home-video-placeholder span { font-size:clamp(12px,2vw,15px); }
#home-video-player[hidden], #home-video-placeholder[hidden] { display:none; }
body:has(#home-video-dialog[open]) { overflow:hidden; }
@keyframes home-video-open { from { opacity:0; transform:translateY(12px) scale(.96); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce) { #home-video-dialog[open], #home-video-dialog::backdrop { animation:none; } }

/* Frame 5: Where can I vote? Exact Figma geometry, responsive Yandex map. */
.stage.elections-stage { aspect-ratio:1440/1775; }
.elections-stage .portrait {cursor:pointer;}
.vote-map {overflow:hidden;background:#d9d9d9;}
.vote-map iframe {display:block;}
.map-attribution {position:absolute;color:#eee;font-size:12px;}
.vote-map-note {font:normal max(11px,1.05cqw)/1.45 Arial,sans-serif;color:#53627b;}
.vote-map-note a {color:#25365b;}

/* Frame 6: Write Ryan! Original Figma paper, field, and button geometry. */
.stage.appeals-stage {aspect-ratio:1440/1219;}
.appeals-stage .portrait {cursor:pointer;}
.appeals-message {display:block;background:#d9d9d9;resize:none;padding:1.25cqw;font:normal max(16px,1.8cqw)/1.4 'Jost',Arial,sans-serif;color:#111;border-radius:0;}
.appeals-message:focus-visible {outline:2px solid #1f297f;outline-offset:2px;}
.appeals-send {background:#1f297f;box-shadow:0 .2777778cqw .3333333cqw #0004;cursor:pointer;overflow:hidden;transition:filter .18s ease;}
.appeals-send:hover {filter:brightness(1.15);}
.appeals-note,.appeals-result {left:12.3611111cqw;width:69.3055556cqw;color:#53627b;font:normal max(10px,1.05cqw)/1.4 Arial,sans-serif;}
.appeals-note {top:59.3cqw;}
.appeals-result {top:61.7cqw;color:#1f297f;}
@media(prefers-reduced-motion:reduce){.appeals-send {transition:none;}}

/* Offline presentation preview: original frame position, full slide visible. */
.presentation-viewer { color:#25365b; }
.presentation-slide-link { display:grid; place-items:center; height:36.3888889cqw; background:#101624; overflow:hidden; cursor:pointer; }
.presentation-slide-link img { display:block; width:100%; height:100%; object-fit:contain; }
.presentation-slide-link:hover { box-shadow:0 0 0 2px #1f297f; }
.presentation-controls { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 0; }
.presentation-nav { display:flex; align-items:center; gap:8px; }
.presentation-nav button { border:1px solid #b6c0d2; color:#25365b; background:#f3f5f9; border-radius:4px; min-width:36px; min-height:36px; cursor:pointer; font-size:16px; }
.presentation-nav button:hover:not(:disabled) { background:#e0e5f0; }
.presentation-nav button:disabled { opacity:.4; cursor:default; }
#slide-count { min-width:50px; text-align:center; font:500 max(12px,1.15cqw) Arial,sans-serif; font-variant-numeric:tabular-nums; }
.presentation-download { display:inline-flex; align-items:center; gap:7px; background:#1f297f; color:#fff; padding:10px 14px; border-radius:4px; text-decoration:none; font:500 max(12px,1.2cqw) Arial,sans-serif; }
.presentation-download:hover { background:#303c96; }
.presentation-download svg { width:18px; height:18px; flex-shrink:0; }
.pptx-label { opacity:.8; }
@media(max-width:600px) { .presentation-controls { padding:7px 0; } .presentation-download { padding:8px 10px; } }
