/* Theatre of War skin for paukoom articles (source: ~/paukoom-tools/theatre). Parchment and rubric: a vellum ground with Livy's own Latin (Book 21, the Hannibal book) in faint uncials,
   the hand of the oldest manuscript of those books; red ink for headings and marks, as scribes did.
   Type red-hat and radius soft from the Taste deal; the earlier stone-blueprint palette is in 2-theatre-stone.html. */
:root{
  --p-bg:#ecdfc0; --p-surface:#e2d1ab; --p-ink:#2b1d13; --p-muted:#5e4a36; --p-accent:#a3271b;
  --p-inv-bg:#2a1b12; --p-inv-surface:#3a281b; --p-inv-ink:#efe2c4; --p-inv-muted:#b6a080;
  --bg:var(--p-bg); --ink:var(--p-ink); --ink2:var(--p-muted); --ink3:#6a5539; --hair:rgb(60 36 18/.18); --hover:rgb(60 36 18/.07);
  --acc:var(--p-accent); --link:var(--p-accent); --sel:rgb(163 39 27/.2); --num:var(--ink); --speak:rgb(163 39 27/.12);
  --surface:var(--p-surface); --barbg:rgb(236 223 192/.86);
  --btn:var(--p-accent); --btnink:#fbf1dc; --btnhover:#84190f; --btnline:rgb(60 36 18/.4);
  --ok:#1f7a4d; --okbg:rgb(31 122 77/.1); --no:#b3261e;
  --display:"Red Hat Display",system-ui,sans-serif; --text:"Red Hat Text",system-ui,sans-serif; --ui:"Red Hat Text",system-ui,sans-serif;
  --fs:1.125rem; --measure:38rem; --h-weight:400; --h-track:-.025em; --r:14px;
  --u-roman:#e2553f; --u-gaul:#f1c27a; --u-afr:#5cc0ae; --u-edge:#ffffff; --u-cav:#ffe08a;
}
.bar .brand{font:600 1rem/1 var(--display);letter-spacing:-.01em;display:inline-flex;align-items:center;min-height:44px}
/* the vellum: a soft grain, a few darker patches, and the writing behind everything */
html{background:#ecdfc0}
body{background:#ecdfc0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E")}
body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;background:radial-gradient(60% 40% at 10% 20%,rgb(150 100 40/.10),transparent 70%),radial-gradient(50% 45% at 90% 75%,rgb(150 100 40/.12),transparent 70%),radial-gradient(120% 90% at 50% 50%,transparent 60%,rgb(110 70 30/.18))}
.script{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;font:400 44px/1.32 "Uncial Antiqua",serif;color:rgb(70 40 20/.05);word-break:break-all;text-align:justify;padding:20px}
#app{position:relative;z-index:1}
.bar{z-index:40}

/* buttons step on hover and press on click; underlines draw */
.btn{border-radius:999px;font:500 1rem/1 var(--ui);transition:transform .18s cubic-bezier(.2,.8,.2,1),background .2s,box-shadow .2s}
.btn:hover{transform:translateY(-2px)}.btn:active{transform:translateY(0) scale(.97)}
.btn.fill{background:var(--btn);color:var(--btnink)}.btn.fill:hover{background:var(--btnhover)}
.btn.line{box-shadow:inset 0 0 0 1.5px var(--btnline);color:var(--ink);background:none}
main a:not(.btn){text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:background-size .3s}
main a:not(.btn):hover{background-size:100% 1px}

/* hero: the Alps from orbit, the copy set on the dark sea at the bottom left */
.hero{position:relative;height:calc(100svh - 52px);min-height:600px;overflow:hidden;background:#0c1622;color:#fff}
.hero picture,.hero picture img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 40%}
.hero::after{content:"";position:absolute;inset:0;background:radial-gradient(120% 85% at 0% 100%,rgb(8 14 22/.92),rgb(8 14 22/.55) 45%,rgb(8 14 22/0) 75%),linear-gradient(180deg,rgb(8 14 22/0) 40%,rgb(8 14 22/.6) 75%,rgb(8 14 22/.9));pointer-events:none}
.hero .wrapx{position:absolute;left:0;right:0;bottom:0;z-index:2;max-width:1180px;margin:0 auto;padding:0 22px clamp(36px,7vh,72px)}
.hero .eyebrow{font:600 .95rem/1 var(--ui);letter-spacing:.02em;color:#fff;text-shadow:0 1px 8px rgb(0 0 0/.6);margin:0 0 14px}
.hero h1{font:400 clamp(4rem,12vw,10rem)/.86 var(--display);letter-spacing:-.035em;margin:0;color:#fff}
.hero .dek{font:400 clamp(1.15rem,1.8vw,1.45rem)/1.4 var(--text);color:rgb(255 255 255/.86);max-width:34ch;margin:18px 0 26px}
.hero .reads{justify-content:flex-start}
.hero .btn.line{color:#fff;box-shadow:inset 0 0 0 1.5px rgb(255 255 255/.55)}
.hero .btn.line:hover{background:rgb(255 255 255/.1)}
/* the entrance: the picture settles, the title rises, then the rest (keyframes, so it runs once the skin switches on) */
@keyframes tw-up{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes tw-settle{from{transform:scale(1.06)}to{transform:none}}
.m-in .hero img{animation:tw-settle 1.8s cubic-bezier(.16,1,.3,1) both}
.m-in .hero [data-e]{animation:tw-up .9s cubic-bezier(.16,1,.3,1) both}
.m-in .hero [data-e="2"]{animation-delay:.15s}.m-in .hero [data-e="3"]{animation-delay:.3s}.m-in .hero [data-e="4"]{animation-delay:.45s}
@media (prefers-reduced-motion:reduce){.m-in .hero img,.m-in .hero [data-e]{animation:none}}

/* overview and the quick read */
.overview .big{font:400 clamp(1.7rem,3.4vw,2.8rem)/1.2 var(--display);letter-spacing:-.025em}
.label,.fm-label{font:600 .85rem/1 var(--ui);letter-spacing:.04em;color:var(--acc)}
.hook{font:400 clamp(2rem,4.4vw,3.6rem)/1.05 var(--display);letter-spacing:-.03em}
.story .open::first-letter,.fbeat p.drop::first-letter{font-weight:500;color:var(--acc)}
.story p.punch,.fbeat p.punch{font:500 1.2em/1.32 var(--display);letter-spacing:-.015em}
.kick{font-weight:600;color:var(--acc)}
.pull p{font:400 clamp(1.4rem,2.1vw,1.85rem)/1.22 var(--display);letter-spacing:-.02em}
.nums li{border-top:1px solid var(--hair)}
.nums b{font-family:var(--display);font-weight:500;color:var(--ink)}

/* a photograph opens every chapter, on the wrap's edges, no caption */
.plate{width:min(1136px,calc(100% - 44px));margin:0 auto clamp(28px,4vw,44px);border-radius:var(--r);overflow:hidden;background:var(--surface);aspect-ratio:2.35/1;box-shadow:0 1px 0 rgb(255 250 235/.5),0 14px 30px -18px rgb(60 36 18/.5)}
.plate.map img{object-position:0 50%}
.plate img{width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.8,.2,1)}
.plate:hover img{transform:scale(1.025)}
.plate.coin{background:var(--surface);display:grid;place-items:center}
.plate.coin img{width:auto;height:92%;object-fit:contain;mix-blend-mode:multiply}
@media (max-width:700px){.plate{aspect-ratio:4/3}}
.ch{scroll-margin-top:70px}
.ch h2{font:400 clamp(2.2rem,4.4vw,3.6rem)/1.02 var(--display);letter-spacing:-.03em}
.keybox{background:var(--surface);border-radius:var(--r)}
.keybox h4{color:var(--acc)}
.keybox b{white-space:nowrap}
.nums-h{margin-top:30px}
.note{background:var(--surface);border-radius:var(--r)}
.march-card{background:#efe4cf;padding:8px}

/* the march in numbers: the old Traversette track beside the figures, on the inverse ground */
.band-stats{max-width:none;margin:clamp(90px,12vw,150px) 0;padding:clamp(56px,8vw,110px) max(22px,calc((100vw - 1136px)/2));background:var(--p-inv-bg);color:var(--p-inv-ink);display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:0 clamp(28px,5vw,72px);align-items:start}
.band-stats .ph{grid-row:span 3;border-radius:var(--r);overflow:hidden;aspect-ratio:602/538}
.band-stats .ph img{width:100%;height:100%;object-fit:cover}
.band-stats h3{color:#fff;font-family:var(--display);align-self:end}.band-stats .sub{color:var(--p-inv-muted);margin:0 0 40px}
.band-stats ul{grid-template-columns:1fr 1fr;gap:28px}
.band-stats li{border-top:1px solid rgb(223 222 219/.2)}
.band-stats b{font-family:var(--display);font-weight:500;color:#fff}
.band-stats li>span{color:var(--p-inv-muted)}
@media (max-width:820px){.band-stats{grid-template-columns:1fr}.band-stats .ph{grid-row:auto}}

/* Inside the Trap: the diagram laid over the Ofanto plain, where Cannae was fought, from orbit */
.cannae{max-width:none;margin:clamp(90px,12vw,150px) 0;padding:clamp(56px,8vw,110px) max(22px,calc((100vw - 1136px)/2));background:#10161c;color:#eef1f6;position:relative;overflow:hidden}
.cannae>.bgph{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.5}
.cannae>*:not(.bgph){position:relative}
.cannae .cn-head h3{color:#fff;font-family:var(--display)}.cannae .sub{color:#b9c2cf}
.cn-stage{background:rgb(8 12 16/.55);box-shadow:inset 0 0 0 1px rgb(255 255 255/.14);backdrop-filter:blur(2px)}
.cannae .cn-legend{color:#d5dbe4}
.cannae .cn-steps button{background:rgb(255 255 255/.08);color:#dfe4ec;box-shadow:inset 0 0 0 1px rgb(255 255 255/.2)}
.cannae .cn-steps button:hover{transform:translateY(-2px)}
.cannae .cn-steps button[aria-pressed="true"]{background:#fff;color:#10161c}
.cannae .cn-steps .cn-play{background:var(--acc);color:#fff;box-shadow:none}
.cannae .cn-cap{color:#fff}

/* the type moment: Maharbal's line lights word by word as it crosses the screen */
.band-quote{max-width:none;margin:0;padding:clamp(90px,14vw,180px) max(22px,calc((100vw - 1136px)/2));background:var(--p-inv-bg);text-align:left}
.band-quote p{font:400 clamp(2.4rem,6.2vw,5.6rem)/1.02 var(--display);letter-spacing:-.035em;max-width:16ch;margin:0 0 28px;color:#fff}
.band-quote p .w{transition:color .4s}.band-quote p .w.lit{color:#fff}
.band-quote figcaption{color:#e8846f;font-family:var(--ui)}
.band-quote,.band-stats{position:relative}
.band-quote p .w{color:#5a4632}
.tl li{background:var(--surface);box-shadow:none;border-radius:var(--r)}
.tl li.hi{box-shadow:inset 0 0 0 1.5px var(--acc)}.tl li.hi b{color:var(--acc)}
.tl b{font-family:var(--display);font-weight:500}
.quiz h2,.tomorrow h2,.band-tl h3,.cn-head h3{font-family:var(--display);font-weight:400}
.q-opts button{border-radius:var(--r);transition:transform .18s,background .2s}
.q-opts button:hover:not([aria-disabled]){transform:translateY(-2px)}
.end .credits{font:400 .78rem/1.5 var(--ui);color:var(--ink2);max-width:80ch;margin:14px auto 0}

/* skin plumbing: the original article stays in the page, hidden, for the app feed and for readers without JS */
html.tw body>*:not(#app):not(.script):not(script):not(svg):not(#potd-ov){display:none!important}
/* the full-story narration: the paragraph being read */
#full .speaking{background:var(--speak);box-shadow:-14px 0 0 var(--speak),14px 0 0 var(--speak);border-radius:4px;transition:background .3s}
.full-head .listen{margin-top:26px}
