/* Section fronts: Essays (/blog/) and Field Guides (/field-guides/). Approved by Joe 11/16 from labs/pub-essays.html.
   A night band names the section and carries the four sections as picture icons on a constellation line (the homepage's
   look); below it, "Start here", then themed rooms on alternating grounds, then the full index folded shut.
   Pages are generated by scripts/section_fronts.py. Colours and fonts come from the page's own :root. */

/* the squircle: the macOS icon curve as four corner masks plus a cross, so it keeps its corner on any rectangle
   and needs no corner-shape (Safari). --r is the corner size; 50% on a square gives the full icon shape. */
.sq,.byway a,.secnav figure,.secnav figure span{--r:34px;border:0;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") top left/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%28100,0%29 scale%28-1,1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") top right/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%280,100%29 scale%281,-1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") bottom left/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%28100,100%29 scale%28-1,-1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") bottom right/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    linear-gradient(#000 0 0) center/calc(100% - 2*var(--r) + 1px) 100% no-repeat,
    linear-gradient(#000 0 0) center/100% calc(100% - 2*var(--r) + 1px) no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") top left/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%28100,0%29 scale%28-1,1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") top right/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%280,100%29 scale%281,-1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") bottom left/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22 preserveAspectRatio=%22none%22%3E%3Cpolygon transform=%22translate%28100,100%29 scale%28-1,-1%29%22 points=%220.00,100.00 0.05,69.27 0.22,59.48 0.49,52.39 0.88,46.65 1.38,41.76 1.99,37.48 2.71,33.67 3.55,30.22 4.51,27.08 5.59,24.21 6.80,21.58 8.13,19.15 9.59,16.91 11.20,14.85 12.94,12.94 14.85,11.20 16.91,9.59 19.15,8.13 21.58,6.80 24.21,5.59 27.08,4.51 30.22,3.55 33.67,2.71 37.48,1.99 41.76,1.38 46.65,0.88 52.39,0.49 59.48,0.22 69.27,0.05 100.00,0.00 100,100%22/%3E%3C/svg%3E") bottom right/calc(var(--r) + 1px) calc(var(--r) + 1px) no-repeat,
    linear-gradient(#000 0 0) center/calc(100% - 2*var(--r) + 1px) 100% no-repeat,
    linear-gradient(#000 0 0) center/100% calc(100% - 2*var(--r) + 1px) no-repeat;}

body{overflow-x:clip;}
.pubpad{padding-top:clamp(28px,4svh,44px);}
.kick,.archline .yr{font-size:.74rem;}

/* ---- the band ---- */
.band{position:relative;overflow:hidden;width:100vw;margin-left:calc(50% - 50vw);margin-top:14px;background-color:#27274b;background-image:radial-gradient(1.2px 1.2px at 6% 14%,rgba(207,168,119,.8) 50%,transparent 52%),radial-gradient(1px 1px at 17% 71%,rgba(254,249,241,.55) 50%,transparent 52%),radial-gradient(1.4px 1.4px at 29% 9%,rgba(254,249,241,.6) 50%,transparent 52%),radial-gradient(1px 1px at 41% 88%,rgba(207,168,119,.7) 50%,transparent 52%),radial-gradient(1.2px 1.2px at 58% 6%,rgba(207,168,119,.7) 50%,transparent 52%),radial-gradient(1px 1px at 66% 93%,rgba(254,249,241,.5) 50%,transparent 52%),radial-gradient(1.4px 1.4px at 79% 12%,rgba(254,249,241,.6) 50%,transparent 52%),radial-gradient(1px 1px at 88% 64%,rgba(207,168,119,.75) 50%,transparent 52%),radial-gradient(1.2px 1.2px at 96% 30%,rgba(254,249,241,.55) 50%,transparent 52%);}
.band.sky-on{background-image:none;}
.band .wb-sky{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.band .in{position:relative;z-index:1;max-width:1160px;margin:0 auto;padding:clamp(34px,6svh,60px) clamp(22px,4.5vw,48px) clamp(28px,4.5svh,44px);text-align:center;}
.band .pub{font-family:var(--util);font-size:.72rem;font-weight:600;letter-spacing:.26em;text-transform:uppercase;color:var(--star-gold);text-decoration:none;}
.band h1{font-family:var(--disp);font-weight:560;font-size:clamp(2.7rem,6.4vw,4.8rem);letter-spacing:-.03em;line-height:1;color:#fef9f1;margin-top:12px;}
.band h1 .dot{color:var(--star-gold);}
.band .say{font-style:italic;font-size:clamp(1.04rem,1.5vw,1.22rem);color:rgba(254,249,241,.76);margin-top:12px;}
/* the four sections hang from stars on a line, as the homepage's answers do; the one you are in is ringed */
.secnav{--g:clamp(8px,2vw,28px);position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:var(--g);max-width:760px;margin:clamp(24px,4svh,38px) auto 0;}
.secnav svg{position:absolute;top:0;left:calc(var(--g) / -2);width:calc(100% + var(--g));height:40px;overflow:visible;pointer-events:none;}
.secnav a{position:relative;display:block;text-decoration:none;color:#fef9f1;padding-top:34px;opacity:.74;transition:transform .2s ease,opacity .2s ease;}
.secnav a:nth-of-type(2){margin-top:22px;} .secnav a:nth-of-type(3){margin-top:6px;} .secnav a:nth-of-type(4){margin-top:26px;}
.secnav a::before{content:"\2726";position:absolute;top:0;left:50%;transform:translateX(-50%);color:var(--star-gold);font-size:17px;line-height:17px;text-shadow:0 0 12px rgba(207,168,119,.7);}
.secnav figure{width:min(100%,84px);aspect-ratio:1/1;margin:0 auto 10px;padding:2px;background:rgba(207,168,119,.85);--r:50%;}
.secnav figure span{display:block;width:100%;height:100%;overflow:hidden;background:var(--art-paper);--r:50%;}
.secnav img{width:100%;height:100%;object-fit:cover;transform:scale(1.08);}
.secnav b{display:block;font-family:var(--disp);font-weight:540;font-size:clamp(.92rem,1.3vw,1.12rem);letter-spacing:-.015em;line-height:1.14;}
.secnav a:hover,.secnav a:focus-visible,.secnav a[aria-current]{opacity:1;}
@media (hover:hover){.secnav a:hover{transform:translateY(-3px);}}
.secnav a[aria-current] figure{padding:4px;background:var(--star-gold);}
.secnav a[aria-current]::before{transform:translateX(-50%) scale(1.45);}
.secnav a:focus-visible{outline:2px solid #fef9f1;outline-offset:4px;}

/* ---- start here: the newest, large, and the two most read ---- */
.start{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:clamp(22px,3vw,44px);align-items:start;}
.start a,.room a.t{display:block;text-decoration:none;color:inherit;min-width:0;}
.start figure,.room figure{overflow:hidden;background:var(--art-paper);}
.start img,.room img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease;}
.start a:hover img,.room a.t:hover img{transform:scale(1.03);}
.start .big figure{aspect-ratio:16/10;--r:44px;margin-bottom:18px;}
.start .big h2{font-family:var(--disp);font-weight:560;font-size:clamp(1.7rem,3vw,2.5rem);line-height:1.06;letter-spacing:-.025em;}
.start .big p{font-size:clamp(1rem,1.3vw,1.12rem);color:#4a434c;line-height:1.55;margin-top:12px;max-width:52ch;}
.start .side{display:grid;gap:clamp(20px,3svh,30px);}
.start .side figure{aspect-ratio:16/9;--r:30px;margin-bottom:12px;}
.start .side h3,.room h3{font-family:var(--disp);font-weight:540;font-size:clamp(1.16rem,1.6vw,1.36rem);letter-spacing:-.02em;line-height:1.15;}
.start h2 .dot,.start h3 .dot,.room h3 .dot{color:var(--star-gold);}
.start a:hover h2,.start a:hover h3{color:var(--navy);}
.tag{display:inline-flex;align-items:center;gap:7px;font-family:var(--util);font-size:.74rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--navy);margin-bottom:8px;}
.tag::before{content:"\2726";color:var(--star-gold);font-size:13px;}

/* ---- the way on: the rooms as buttons ---- */
.byway{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:clamp(40px,6svh,64px) 0 0;padding:22px 0;font-family:var(--text);font-style:italic;font-size:1.12rem;color:#4a434c;}
.byway span{margin-right:4px;}
.byway a{--r:18px;font-family:var(--util);font-style:normal;font-weight:600;font-size:1rem;color:#fef9f1;background:var(--navy);text-decoration:none;padding:12px 20px;}
.byway a:hover{background:var(--star-gold);color:var(--ink);}

/* ---- a room: its own ground, a numbered name, one line, its own arrangement ---- */
.room{width:100vw;margin-left:calc(50% - 50vw);}
.room .in{max-width:1160px;margin:0 auto;padding:clamp(48px,8svh,88px) clamp(22px,4.5vw,48px);}
.room.paper{background:var(--art-paper);}
.room.night{background-color:#27274b;color:#fef9f1;background-image:radial-gradient(1.2px 1.2px at 6% 14%,rgba(207,168,119,.8) 50%,transparent 52%),radial-gradient(1px 1px at 17% 71%,rgba(254,249,241,.55) 50%,transparent 52%),radial-gradient(1.4px 1.4px at 29% 9%,rgba(254,249,241,.6) 50%,transparent 52%),radial-gradient(1px 1px at 41% 88%,rgba(207,168,119,.7) 50%,transparent 52%),radial-gradient(1.2px 1.2px at 58% 6%,rgba(207,168,119,.7) 50%,transparent 52%),radial-gradient(1px 1px at 66% 93%,rgba(254,249,241,.5) 50%,transparent 52%),radial-gradient(1.4px 1.4px at 79% 12%,rgba(254,249,241,.6) 50%,transparent 52%),radial-gradient(1px 1px at 88% 64%,rgba(207,168,119,.75) 50%,transparent 52%),radial-gradient(1.2px 1.2px at 96% 30%,rgba(254,249,241,.55) 50%,transparent 52%);}
.room .rh{margin-bottom:clamp(26px,4svh,40px);}
.room .rh .n{font-family:var(--util);font-size:.74rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);}
.room.night .rh .n{color:var(--star-gold);}
.room .rh h2{font-family:var(--disp);font-weight:560;font-size:clamp(2rem,4.4vw,3.3rem);letter-spacing:-.03em;line-height:1.02;margin-top:8px;}
.room .rh h2 .dot{color:var(--star-gold);}
.room .rh p{font-style:italic;font-size:clamp(1.04rem,1.4vw,1.2rem);color:#4a434c;margin-top:10px;}
.room.night .rh p{color:rgba(254,249,241,.76);}
.room .kick{margin-bottom:6px;}
.room.night .kick{color:var(--star-gold);}
.room.night .kick span{color:rgba(254,249,241,.62);}
.room.night a.t:hover h3{color:var(--star-gold);}
.room:not(.night) a.t:hover h3{color:var(--navy);}
/* A: one large piece and a short list beside it; .flip mirrors it */
.arrA{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:clamp(24px,3.4vw,52px);align-items:center;}
.arrA.flip{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);}
.arrA.flip .feat{order:2;}
.arrA .feat figure{aspect-ratio:16/10;--r:44px;margin-bottom:16px;}
.arrA .feat h3{font-size:clamp(1.5rem,2.4vw,2rem);}
.arrA .list{display:grid;gap:clamp(18px,2.6svh,26px);}
.arrA .list a.t{display:grid;grid-template-columns:clamp(96px,11vw,132px) minmax(0,1fr);gap:16px;align-items:center;}
.arrA .list figure{aspect-ratio:1/1;--r:50%;}
/* B: four across (also holds what does not fit in A's list) */
.arrB{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(26px,4svh,40px) clamp(16px,2.2vw,30px);}
.arrB figure{aspect-ratio:4/5;--r:34px;margin-bottom:14px;}
.arrA + .arrB{margin-top:clamp(30px,5svh,48px);}
/* C: two large, side by side */
.arrC{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(20px,3vw,44px);}
.arrC.one{grid-template-columns:minmax(0,640px);}
.arrC figure{aspect-ratio:16/10;--r:40px;margin-bottom:16px;}
.arrC h3{font-size:clamp(1.3rem,2vw,1.7rem);}

/* ---- the full index, folded ---- */
.every{margin-top:clamp(40px,6svh,64px);scroll-margin-top:16px;}
.every + .every{margin-top:22px;}
.every summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;font-family:var(--disp);font-weight:560;font-size:clamp(1.3rem,1.8vw,1.55rem);letter-spacing:-.02em;}
.every summary::-webkit-details-marker{display:none;}
.every summary::before{content:"\2726";color:var(--star-gold);font-size:17px;}
.every summary::after{content:"+";margin-left:auto;font-family:var(--util);font-weight:500;font-size:1.5rem;color:var(--navy);}
.every[open] summary::after{content:"\2212";}
.every summary:focus-visible{outline:2px solid var(--navy);outline-offset:4px;}
.every .archwrap{margin-top:18px;}

@media (prefers-reduced-motion:reduce){.secnav a,.start img,.room img{transition:none;}}
@media (max-width:900px){
  .start{grid-template-columns:1fr;}
  .start .big figure{--r:32px;}
  .start .side{grid-template-columns:1fr 1fr;gap:16px;}
  .start .side figure{--r:22px;} .start .side h3{font-size:1.04rem;}
  .byway{justify-content:flex-start;gap:8px;font-size:1.02rem;} .byway span{flex-basis:100%;} .byway a{font-size:.9rem;padding:10px 14px;}
  .arrA,.arrA.flip{grid-template-columns:1fr;} .arrA.flip .feat{order:0;} .arrA .feat figure{--r:32px;}
  .arrA .list a.t{grid-template-columns:88px minmax(0,1fr);gap:14px;}
  .arrB{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px;} .arrB figure{--r:24px;aspect-ratio:1/1;}
  .arrC{grid-template-columns:1fr;gap:28px;} .arrC figure{--r:30px;}
  .room h3{font-size:1.08rem;} .arrA .feat h3{font-size:1.4rem;}
}
@media (max-width:600px){.secnav{--g:10px;} .secnav b{font-size:.8rem;} .secnav figure{width:min(100%,66px);}}
