/* TPKILLC round 4 stylesheet. Built from Dash's round 4 mockup.css (same colours, type sizes and stage coordinates).
   Stage mode (1100px and wider, JS on): the fixed 1440x912 stage is scaled to the window (fit.js sets --s).
   Stacked mode (narrower, or JS off): same pieces in reading order, readable type. */

@font-face{font-family:"TPKI Sans";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/sans.e7a996f0.woff2) format("woff2")}
@font-face{font-family:"TPKI Sans";font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/sansbold.3aa3e9c8.woff2) format("woff2")}
@font-face{font-family:"TPKI Blackletter";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/blackletter.c9b2797b.woff2) format("woff2")}
@font-face{font-family:"TPKI Serif";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/serif.f2281a00.woff2) format("woff2")}
@font-face{font-family:"TPKI Serif Alt";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/serifalt.2a710ab9.woff2) format("woff2")}
@font-face{font-family:"TPKI Han";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/han.fdfd8578.woff2) format("woff2")}
@font-face{font-family:"TPKI Naskh";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/naskh.934df3d6.woff2) format("woff2")}
@font-face{font-family:"TPKI Bengali";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/bengali.62f9034f.woff2) format("woff2")}

*{box-sizing:border-box;margin:0;padding:0}
html{background:#1c1914;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:#1c1914;color:#1a1612;font-family:"TPKI Sans",Arial,Helvetica,sans-serif}

/* ---------- stacked mode (default) ---------- */
.stage{position:relative;display:flex;flex-direction:column;min-height:100vh;background:#e6d8c0;overflow:hidden}
.guilloche{display:none}

.chrome{position:relative;z-index:8;display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;min-height:24px;padding:4px 10px;
  font-family:"TPKI Sans",Arial,Helvetica,sans-serif;font-size:11px;letter-spacing:.04em;color:#d8e0e8;
  background:linear-gradient(#3d4e62 0%,#243244 48%,#1a2836 52%,#16202c 100%);border:1px solid #0a1016;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 -1px 0 rgba(0,0,0,.35),0 1px 0 #000}
.chrome .brand{flex:0 0 auto;font-weight:700;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#f2f5f8}
.chrome .brand a{color:inherit;text-decoration:none}
.chrome nav{display:flex;flex:1 1 auto;margin-left:8px}
.chrome nav a{color:#c5d0da;text-decoration:none;padding:4px 11px;border-left:1px solid #5a6a7a;line-height:16px}
.chrome nav a:hover{color:#fff}
.chrome form{display:flex;align-items:center;gap:3px;margin-left:auto}
.chrome input[type="text"]{width:132px;height:20px;border:1px solid #0a1016;box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #9aa;background:#fff;
  font:11px "TPKI Sans",Arial,sans-serif;padding:0 4px;color:#222}
.chrome button{height:20px;padding:0 7px;font:700 10px/16px "TPKI Sans",Arial,sans-serif;letter-spacing:.06em;color:#1a1a1a;
  background:linear-gradient(#f0f0f0,#c8c8c8);border:1px solid #333;box-shadow:inset 0 1px 0 #fff,0 1px 0 #000;cursor:default}

.tableau{position:relative}
.art{position:relative;aspect-ratio:16/9;background:#e6d8c0}
.art picture,.art img{display:block;width:100%;height:100%}
.art img{object-fit:fill}
.bb-hit{position:absolute;left:86.639%;top:85.284%;width:7.424%;height:7.358%;z-index:7;cursor:pointer;background:transparent;-webkit-tap-highlight-color:transparent}
.bb-hit::after{content:"";position:absolute;inset:-14px}  /* larger touch area, invisible */

.tableau main{padding:22px 20px 30px;max-width:46rem;margin:0 auto;text-align:center}
h1{font-family:"TPKI Blackletter","Old English Text MT",serif;font-weight:400;font-size:30px;line-height:1.15;letter-spacing:.01em;color:#16120e;margin:0 0 10px}
.manifesto-wrap{position:relative}
.manifesto{font-family:"TPKI Serif","TPKI Serif Alt",Georgia,serif;font-size:16px;line-height:1.5;color:#1c1814;text-align:start;hyphens:auto}
.manifesto p{margin:0 0 .7em}
.manifesto p:first-child{text-align:center;font-size:17px;margin-bottom:.85em}
.manifesto p:last-child{margin-bottom:0}
.manifesto:lang(zh){font-family:"TPKI Han","Source Han Sans SC",sans-serif;line-height:1.7}
.manifesto:lang(ar){font-family:"TPKI Naskh","TPKI Serif Alt",serif;font-size:18px;line-height:1.7}
.manifesto:lang(bn){font-family:"TPKI Bengali","TPKI Serif Alt",serif;font-size:17px;line-height:1.7}
.manifesto:lang(ru){font-family:"TPKI Serif Alt","TPKI Serif",serif}
.manifesto.is-leaving{animation:glitch-out .28s steps(3) forwards}
.manifesto.is-entering{animation:fade-in .32s ease-out forwards}
@keyframes glitch-out{
  0%{opacity:1;transform:none;filter:none}
  25%{opacity:.85;transform:skewX(10deg) translateX(-3px);filter:contrast(1.8) saturate(.4)}
  50%{opacity:.55;transform:skewX(-8deg) translateX(4px);filter:contrast(2)}
  75%{opacity:.25;transform:translateX(-6px)}
  100%{opacity:0;transform:none}}
@keyframes fade-in{from{opacity:0;filter:contrast(1.4)}to{opacity:1;filter:none}}

footer{position:relative;z-index:10;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 18px;padding:14px 12px 20px;margin-top:auto;
  font-family:"TPKI Sans",Arial,Helvetica,sans-serif;font-size:12px;letter-spacing:.06em;color:#1a1612}
footer .copy,footer .bez{color:#1a1612;background:rgba(236,224,200,.82);padding:5px 9px 4px;box-shadow:0 0 0 1px rgba(28,62,48,.18)}
footer .bez{text-decoration:underline;text-underline-offset:2px}

.bc-popup{position:fixed;z-index:30;left:50%;top:50%;width:min(96vw,1000px);transform:translate(-50%,-50%);line-height:0;
  opacity:0;visibility:hidden;pointer-events:none;
  box-shadow:0 0 0 2px #16120d,0 0 0 7px #f4ead6,0 0 0 8px #16120d,0 12px 40px rgba(0,0,0,.45);transition:opacity .7s ease}
.bc-popup.show{opacity:1;visibility:visible;transition:opacity .12s ease}
.bc-popup.fade{visibility:visible}
.bc-popup img{display:block;width:100%;height:auto}
.bc-popup.rotated{transform:translate(-50%,-50%) rotate(90deg)}

/* archives */
.archives-panel{position:relative;z-index:5;width:min(560px,calc(100% - 32px));margin:28px auto;text-align:center;padding:26px 34px 30px;background:rgba(236,224,200,.92);
  box-shadow:0 0 0 1px rgba(28,62,48,.35),0 0 0 5px rgba(236,224,200,.92),0 0 0 6px rgba(28,62,48,.35)}
.archives-panel h1{font-size:30px;margin-bottom:6px}
.archives-panel p{font-family:"TPKI Serif","TPKI Serif Alt",Georgia,serif;font-size:13px;color:#3a3228;margin:0 0 16px;letter-spacing:.02em}
.archives-panel form{display:flex;justify-content:center;gap:4px;flex-wrap:wrap}
.archives-panel select{font:12px "TPKI Sans",Arial,sans-serif;height:26px;min-width:min(300px,100%);max-width:100%;border:1px solid #0a1016;background:#fff;color:#222;box-shadow:inset 1px 1px 0 #9aa}
.archives-panel button{height:26px;padding:0 9px;font:700 10px/20px "TPKI Sans",Arial,sans-serif;letter-spacing:.06em;background:linear-gradient(#f0f0f0,#c8c8c8);border:1px solid #333;box-shadow:inset 0 1px 0 #fff,0 1px 0 #000}
.archives .art img{filter:sepia(.15) brightness(1.04)}

/* ---------- stage mode (>= 1100px with JS): Dash's fixed 1440x912 stage, scaled by --s ---------- */
.stage-mode body{overflow:hidden;height:calc(912px * var(--s))}
.stage-mode .stage{display:block;width:1440px;height:912px;min-height:0;transform-origin:0 0;transform:scale(var(--s));margin-left:calc((100vw - 1440px * var(--s)) / 2)}
.stage-mode .guilloche{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:multiply;z-index:9}
.stage-mode .chrome{position:absolute;top:30px;left:60px;right:60px;height:24px;min-height:0;flex-wrap:nowrap;gap:16px;padding:0 8px 0 10px}
.stage-mode .chrome nav a{padding:0 11px}
.stage-mode .chrome input[type="text"]{height:16px}
.stage-mode .chrome button{height:16px}
.stage-mode .tableau{position:absolute;left:60px;top:72px;width:1440px;height:810px;transform:scale(.916667);transform-origin:0 0;z-index:2}
.stage-mode .art{position:absolute;inset:0;aspect-ratio:auto}
.stage-mode .tableau main{position:absolute;z-index:5;left:50%;top:168px;width:580px;max-width:none;margin:0;padding:0;transform:translateX(-50%)}
.stage-mode h1{font-size:30px;text-shadow:0 0 14px rgba(236,224,200,.9),0 0 4px rgba(236,224,200,.9)}
.stage-mode .manifesto{font-size:12.5px;line-height:1.34;text-align:justify;text-justify:inter-word;text-shadow:0 0 8px rgba(236,224,200,.95),0 0 3px rgba(236,224,200,1)}
.stage-mode .manifesto p:first-child{font-size:14.5px}
.stage-mode .manifesto:lang(zh){font-size:13.5px;line-height:1.45}
.stage-mode .manifesto:lang(ar){font-size:15px;line-height:1.5;text-align:justify}
.stage-mode .manifesto:lang(bn){font-size:14.5px;line-height:1.5}
.stage-mode footer{position:absolute;left:60px;right:60px;top:820px;height:26px;padding:0;margin:0;flex-wrap:nowrap;gap:18px;font-size:11px}
.stage-mode footer .copy,.stage-mode footer .bez{padding:3px 9px 2px}
.stage-mode .bb-hit::after{display:none}
.stage-mode .bc-popup{left:50%;top:50%}  /* JS sets the width in whole device pixels; stays viewport-centred, including when rotated */
.stage-mode .archives-panel{position:absolute;left:50%;top:300px;width:560px;margin:0;transform:translateX(-50%)}
.stage-mode .archives-panel select{height:22px;min-width:300px}
.stage-mode .archives-panel button{height:22px}

@media (prefers-reduced-motion:reduce){
  .manifesto.is-leaving,.manifesto.is-entering{animation:none}
  .bc-popup,.bc-popup.show{transition:none}
}
