/* Dusk: the re-tone every inner page loads after site.css (tools/build.py adds the link).
   Plum sky, serif headlines, ivory newsprint, and the globe's own paper models. The home page carries the same rules inline. */
:root{--display:"Newsreader",Georgia,"Times New Roman",serif;--plum:#2B0F1D;--dusk:#40192A;--ivory:#F7EFDF}
.pg h1,.pg h2,.pg h3{font-weight:600;line-height:1.06}
/* Newsreader is spaced for every size by its own optical sizes, so it keeps its own spacing: semibold, headlines a hair in, big figures a little more */
.pg h1,.pg h2,.pg h3{letter-spacing:-.004em}
.pg .years b,.pg .figs b,.rd-num b{letter-spacing:-.01em}
.pg .sky-h h1{line-height:1.04}
.pg .sky{background:radial-gradient(90% 62% at 50% 104%,rgba(244,160,96,.30),rgba(244,160,96,0) 62%),linear-gradient(#2B0F1D 0%,#40192A 46%,#532636 100%)}
.pg .sky-top .sn a,.pg .sky-top .sn-menu{color:var(--ivory)}
/* the horizon photographed from the globe */
.pg .hzp.dhz{height:clamp(210px,29vw,430px);margin-top:clamp(10px,2.4vw,34px)}
.pg .hzp.dhz img{width:max(118vw,900px);filter:drop-shadow(0 -18px 40px rgba(255,190,120,.10))}
/* About: the four models stand on the page like the ones on the globe */
.pg .years img{filter:drop-shadow(0 10px 8px rgba(40,20,25,.30))}
/* Papers: each front page carries its town's model */
.ppg .pp-town img.pp-m{width:auto;max-width:100%;height:clamp(140px,16vw,215px);margin:0 auto;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 9px 7px rgba(40,20,25,.34))}
/* Advertise: the hole in the sheet looks out on dusk */
.pg .adv-pane{background:radial-gradient(85% 60% at 50% 108%,rgba(244,160,96,.42),rgba(244,160,96,0) 66%),linear-gradient(#2B0F1D,#4C2230)}
.pg .adv-pane i{filter:drop-shadow(0 8px 7px rgba(10,4,8,.5))}
/* show the town, the curve and the front page under it, not only the rooftops */
.pg .hzp.dhz img{width:max(100vw,760px)}
/* things printed on paper keep ink, whatever the sky says */
.pg .adv-piece,.pg .adv-page,.pg .inq .ask,.pg .inq-ask,.pg .inq .inq-card{color:var(--ink)}
.pg .adv-towns button{color:var(--ivory);opacity:.62}
.pg .ask{color:var(--ink)}
.pg .ask h2{line-height:1.04}
.pg .hzp.dhz{height:clamp(230px,32vw,480px)}
/* Blog index: same dusk as every other page */
.pg .rd-sky:not(.rd-own){background:radial-gradient(90% 62% at 50% 104%,rgba(244,160,96,.30),rgba(244,160,96,0) 62%),linear-gradient(#2B0F1D 0%,#40192A 46%,#532636 100%)}

/* the hero picture: a town on the paper globe at dusk, full width, its wall melting into the page's own sky */
.pg .hzp.dhz.hph{height:clamp(var(--hmin,250px),var(--hh,36.5vw),680px);margin-top:clamp(-46px,-2.6vw,-8px)}
.pg .hzp.dhz.hph img{width:max(100vw,880px);left:0;transform:translateX(min(0px,calc((100vw - 880px)*var(--cxn,.5))));filter:none;-webkit-mask-image:linear-gradient(transparent 0,#000 17%);mask-image:linear-gradient(transparent 0,#000 17%)}
.pg .adv-pane.ph{padding:0;background:var(--ph) center 58%/cover no-repeat,#2B0F1D}
/* Newsroom on a wide screen: the paper crust runs to the picture's edge, so the sides dissolve over a long eased fade and the crust is not chopped off */
@media (min-width:1041px){ .pg .nrx-scene .rp{-webkit-mask-image:linear-gradient(transparent 0,#000 4%,#000 93%,transparent 100%),linear-gradient(90deg,transparent 0,rgba(0,0,0,.18) 7%,rgba(0,0,0,.62) 16%,#000 27%,#000 73%,rgba(0,0,0,.62) 84%,rgba(0,0,0,.18) 93%,transparent 100%);mask-image:linear-gradient(transparent 0,#000 4%,#000 93%,transparent 100%),linear-gradient(90deg,transparent 0,rgba(0,0,0,.18) 7%,rgba(0,0,0,.62) 16%,#000 27%,#000 73%,rgba(0,0,0,.62) 84%,rgba(0,0,0,.18) 93%,transparent 100%)} }
/* every link answers the pointer: the logo, and the Advertise rows on the folded paper */
.pg .sky-top .home{transition:opacity .16s ease}
@media (hover:hover){ .pg .sky-top .home:hover{opacity:.78} .pg .adv-row:hover .btn.coral{background-color:#F4634A} .pg .adv-own{transition:color .16s ease} .pg .adv-own:hover{color:#B8371F} }

/* ---------- one piece with the home page ---------- */
/* the logo is the size it is on the home page, so it does not change size from page to page */
.pg .sky-top .home img{height:30px}
@media (max-width:700px){ .pg .sky-top .home img{height:26px} }
.pg .adv-say h1{line-height:1.02}
.pg .story .ch h2{line-height:1.02}
.pg .sf h2{font-family:var(--body);letter-spacing:0}
/* the blog's headlines sit on the same scale as every other page */
.pg .ix-h h1,.pg .rd-open h1{font-size:clamp(36px,5.6vw,76px);line-height:1.04;max-width:12em}
.pg .rd-open h1.long{font-size:clamp(30px,4.2vw,56px);line-height:1.06;max-width:17em}
.pg .ix-lead h2{font-size:clamp(32px,4.2vw,56px);line-height:1.02}
/* a post opens on the same dusk as every page, and its tile on the index is a piece of that sky */
.pg .rd-sky.rd-own{background:radial-gradient(90% 62% at 50% 104%,rgba(244,160,96,.30),rgba(244,160,96,0) 62%),linear-gradient(#2B0F1D 0%,#40192A 46%,#532636 100%)}
.rd .ix-tile{background:radial-gradient(95% 66% at 50% 112%,rgba(244,160,96,.46),rgba(244,160,96,0) 66%),linear-gradient(#2B0F1D 0%,#40192A 52%,#532636 100%)}
/* the globe's paper models, wherever they stand alone, take the warm evening light of the hero pictures */
:root{--warm:sepia(.46) saturate(1.42) hue-rotate(-7deg) brightness(.97)}
.rd .ix-tile img.pm{filter:var(--warm) drop-shadow(0 10px 10px rgba(8,4,12,.4))}
.rd-scene img.pm{filter:var(--warm) drop-shadow(0 8px 7px rgba(30,16,20,.3))}
.ppg .pp-town img.pp-m{filter:var(--warm) drop-shadow(0 9px 7px rgba(40,20,25,.34))}
.pg .years img{filter:var(--warm) drop-shadow(0 10px 8px rgba(40,20,25,.30))}
/* two doors side by side: their buttons share a line, however long each note is */
.pg .doors>div{display:flex;flex-direction:column}
.pg .doors .acts{margin-top:auto;padding-top:22px}
/* running text is one size on every page */
.pg .news .col p:not(.lede),.pg .vals p,.pg .doors p{font-size:clamp(17px,1.35vw,19px);line-height:1.55}
.pg #facts{margin-top:clamp(64px,8.5vw,116px)}
/* the inquiry: the towns you pick stand up as the globe's own models, and a picked place is inked in, so coral stays with Send */
.pg .inq-towns img{filter:var(--warm) drop-shadow(0 6px 5px rgba(20,8,12,.42))}
.pg .inq-towns img.on{margin:0 clamp(4px,.9vw,12px)}
.pg .inq-chips label{transition:background-color .16s ease,color .16s ease}
.pg .inq-chips label:has(:checked){background:var(--ink);color:var(--paper)}
.pg .inq-chips label:has(:checked):active{background:#000}
/* Contact: the sheet keeps the height of its first question, so the address under it does not jump from step to step */
.pg main.news .ask{min-height:clamp(470px,calc(337px + 22.2vw),600px)}
/* two links that did not answer the pointer: the address in the footer, and the papers named in the answers */
.sf a.sf-mail{transition:color .16s ease}
@media (hover:hover){ .sf a.sf-mail:hover{color:var(--coral)} .pg .qa-a a{transition:color .16s ease,text-decoration-color .16s ease} .pg .news .qa-a a:hover{color:#B8371F} }
/* the header row is as tall as the home page's, so the logo and the menu sit on the same line on every page */
.pg .sky-top{box-sizing:border-box;min-height:58px}
/* the logo's y hangs a quarter of the box below the line: drop the box so the letters, not the box, sit level with the menu */
.pg .sky-top .home img,.sm-top img{transform:translateY(12%)}
/* Advertise: the way to ask about several towns sits with the town names, not only on the paper note */
.pg .adv-many{display:inline-block;margin-top:clamp(12px,1.6vw,18px);font-size:15.5px;font-weight:500;color:var(--ivory);opacity:.86;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:rgba(247,239,223,.45);transition:opacity .16s ease,text-decoration-color .16s ease}
@media (hover:hover){ .pg .adv-many:hover{opacity:1;text-decoration-color:var(--coral)} }

/* ---------- other hours on the same globe ---------- */
/* A page can open at another time of day: its sky is drawn here, its picture is the same scene with the sky cut out,
   and the header turns to ink on a light sky. tools/pages.py (HOURS, PAGE_HOUR) says which page gets which hour. */
.pg .sky.h-gold{background:radial-gradient(60% 46% at 70% 96%,rgba(255,240,200,.95),rgba(255,224,160,.4) 46%,rgba(255,224,160,0) 74%),radial-gradient(70% 40% at 20% 0%,rgba(170,70,60,.28),rgba(170,70,60,0) 70%),linear-gradient(#D9764E 0%,#E98F5C 28%,#F4B176 58%,#FAD39C 84%,#FDE5B6 100%)}
.pg .sky.h-morning{background:radial-gradient(26% 34% at 16% 20%,rgba(255,251,236,.95),rgba(255,251,236,.3) 40%,rgba(255,251,236,0) 70%),linear-gradient(#6FA8D8 0%,#93C1E4 38%,#C3DDEF 72%,#E3EEF3 100%)}
.pg .sky.lit .sky-top .sn a:not(.sn-cta),.pg .sky.lit .sky-top .sn-menu{color:var(--on)}
.pg .sky.h-dawn{background:radial-gradient(55% 42% at 30% 98%,rgba(255,226,196,.9),rgba(255,214,186,.3) 48%,rgba(255,214,186,0) 74%),linear-gradient(#C98BA6 0%,#DCA0B0 32%,#EDBDB4 64%,#F8D7C0 100%)}
.pg .sky.h-overcast{background:radial-gradient(80% 50% at 50% 0%,rgba(255,255,255,.18),rgba(255,255,255,0) 70%),linear-gradient(#9FAEBD 0%,#B5C1CB 38%,#CDD5DA 74%,#E0E4E6 100%)}
/* night: a moon and a few stars, kept small and few */
.pg .sky.h-night{background:radial-gradient(3.2% 4.8% at 82% 18%,rgba(250,244,226,.95),rgba(250,244,226,.9) 40%,rgba(250,244,226,0) 100%),radial-gradient(18% 26% at 82% 18%,rgba(190,200,235,.22),rgba(190,200,235,0) 70%),
 radial-gradient(1.5px 1.5px at 12% 14%,#fff,transparent),radial-gradient(1px 1px at 23% 31%,#fff,transparent),radial-gradient(1.5px 1.5px at 38% 9%,rgba(255,255,255,.8),transparent),radial-gradient(1px 1px at 57% 22%,#fff,transparent),
 radial-gradient(1px 1px at 68% 8%,rgba(255,255,255,.8),transparent),radial-gradient(1.5px 1.5px at 92% 34%,#fff,transparent),radial-gradient(1px 1px at 6% 38%,rgba(255,255,255,.7),transparent),radial-gradient(1px 1px at 47% 40%,rgba(255,255,255,.6),transparent),
 linear-gradient(#0B1229 0%,#131E40 42%,#25325C 82%,#33416D 100%)}
/* on a phone the moon would sit behind the Menu button: it drops into the open sky between the words and the globe */
@media (max-width:700px){ .pg .sky.h-night{background-position:0 0} .pg .sky.h-night{background:radial-gradient(14px 14px at 86% 47%,rgba(250,244,226,.95),rgba(250,244,226,.85) 45%,rgba(250,244,226,0) 100%),radial-gradient(90px 90px at 86% 47%,rgba(190,200,235,.2),rgba(190,200,235,0) 70%),
 radial-gradient(1.5px 1.5px at 12% 44%,#fff,transparent),radial-gradient(1px 1px at 30% 52%,#fff,transparent),radial-gradient(1px 1px at 64% 40%,rgba(255,255,255,.8),transparent),radial-gradient(1px 1px at 50% 56%,rgba(255,255,255,.7),transparent),
 linear-gradient(#0B1229 0%,#131E40 42%,#25325C 82%,#33416D 100%)} }

/* ---------- polish pass: where things sit on a phone ---------- */
/* One scale for space on a phone, used by everything below: 44 between the header and the first words,
   72 between the words and the town under them, 48 to 56 from the torn edge to the first thing on the paper,
   64 between sections. */
@media (max-width:700px){
  /* The hero. The words used to sit 34px under the header with whatever sky the picture happened to have below them
     (130px on About, 55px on Privacy). Now they have room above, and the town is pulled up to a fixed distance under
     them: --st is where the town begins in the picture (tools/build.py, ART_TOP). */
  .pg .sky:not(.inq) .sky-h,.pg .adv-in{padding-top:44px}
  .pg .hzp.dhz.hph{margin-top:calc(72px - var(--st,82)*1px)}
  .pg .story .ch:first-child{padding-top:8px}
  .pg .sec+.sec,.pg .story .sec+.sec,.pg #facts{margin-top:64px}
}
/* a hero's second line is short: break it evenly, so one word is never left alone on the last line */
.pg .sky-h p,.pg .adv-say>p,.pg .adv-many{text-wrap:balance}
.pg .qa-a p,.rd-body p{text-wrap:pretty}
/* night on a phone: the moon hangs in the gap between the words and the town, at the right, and goes behind the
   rooftops. It is placed from the picture, not from the sky's height, so it cannot land on a line of words. */
@media (max-width:700px){
  .pg .sky.h-night{background:radial-gradient(1.5px 1.5px at 12% 44%,#fff,transparent),radial-gradient(1px 1px at 30% 52%,#fff,transparent),radial-gradient(1px 1px at 64% 40%,rgba(255,255,255,.8),transparent),radial-gradient(1px 1px at 50% 56%,rgba(255,255,255,.7),transparent),
   linear-gradient(#0B1229 0%,#131E40 42%,#25325C 82%,#33416D 100%)}
  .pg .sky.h-night .hzp.hph::before{content:"";position:absolute;right:calc(14% - 45px);top:calc(var(--st,82)*1px - 86px);width:90px;height:90px;
   background:radial-gradient(7px 7px at 50% 50%,rgba(250,244,226,.95),rgba(250,244,226,.85) 45%,rgba(250,244,226,0) 100%),radial-gradient(closest-side,rgba(190,200,235,.2),rgba(190,200,235,0) 70%)}
}

/* Papers on a narrow phone: the town slips are a touch tighter, so they fall three to a row, not in a ragged column */
@media (max-width:380px){ .ppg .pp-towns{gap:10px 8px} .ppg .pp-towns button{padding:0 12px} }

/* ---------- polish pass: where the words sit on a wide screen ---------- */
/* The picture fills the window's width, and the words used to sit 84px under the header however far down the town began:
   on About that left them 80px from the header and over 200px from the rooftops. --sc is where the town begins under
   the words (vw; tools/build.py, ART_TOP_WIDE). The words move down by half the difference and the picture moves up by
   the same amount, so the hero keeps its height and the words stand halfway between the header and the town. */
@media (min-width:881px){
  .pg .sky{--shift:max(0px,calc((clamp(-46px,-2.6vw,-8px) + var(--sc,0)*1vw - clamp(34px,7vw,84px))/2))}
  .pg .sky:not(.inq) .sky-h{padding-top:calc(clamp(34px,7vw,84px) + var(--shift))}
  .pg .sky-h+.hzp.dhz.hph{margin-top:calc(clamp(-46px,-2.6vw,-8px) - var(--shift))}
}
