/* Serpent framed photo + motif (from Fredericks). Markup from server/serpent.js; art + window geometry from
   /brand/serpent/art.css (generated by scripts/sync-brand.sh from Mesa's brand/frame/snake/frames.json).

   <div class="sf sf--lg sf--land-lg" data-framed>     size: --lg | --md | --sm | --xs   composite: --land-lg | --land-sm | --port-sm
     <div class="sf__inner"> <picture>…</picture> or <div class="fr-ph">…</div> </div>
     <picture|span class="sf__frame" aria-hidden="true"> <img src="/brand/serpent/snake-….webp" alt=""> </…>
   </div>
   Mesa's realistic snake (Nov 26; Luke approved 9:00 PM PT): one fixed-size shaded composite per slot, scaled uniformly
   (never tiled or stretched). Head top-left facing left, body clockwise, rattle tail on the open left side, soft shadow:
   all baked in the art. The photo fills the window under the body (object-fit: cover keeps its own srcset/loading). */
.sf{position:relative;display:block;width:100%;max-width:100%;aspect-ratio:var(--sf-ar,2082/1819);margin:0}
.sf>.sf__inner{position:absolute;left:var(--sf-l);top:var(--sf-t);width:var(--sf-w);height:var(--sf-h);overflow:hidden;background:var(--fr-line)}
.sf[data-framed]>.sf__inner>picture,.sf[data-framed]>.sf__inner>.photo-zoom,.sf[data-framed]>.sf__inner>img,.sf[data-framed]>.sf__inner>.photo,.sf[data-framed]>.sf__inner>.fr-ph{display:block;width:100%;height:100%;aspect-ratio:auto;margin:0}
.sf[data-framed]>.sf__inner img{display:block;width:100%;height:100%;object-fit:cover}
.sf__inner>.fr-ph{box-shadow:none}
.sf__inner>.fr-ph::before{display:none}
/* Placeholder label (Mesa, Nov 27): centred in the photo window's clear zone, below the head cap (--sf-ph-t from
   frames.json head_px + photo_pct, generated in art.css), clear of the tail; no top rule line. */
.sf[data-framed]>.sf__inner>.fr-ph .fr-ph__label{position:absolute;top:calc(var(--sf-ph-t,0%) + 4%);left:6%;right:6%;bottom:6%;display:grid;place-content:center;padding:0}
.sf[data-framed]>.sf__inner>.fr-ph .fr-ph__label::before{display:none}
.sf>.sf__frame,.sf>.sf__frame>img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;pointer-events:none}
.sf>.sf__frame{z-index:1}
/* badges sit above the frame art, top-right inside the window, so the head never hides them */
.sf .ph-badge{z-index:2;left:auto;right:var(--fr-space-2);top:var(--fr-space-2)}

/* ---- section divider: head at the left end, the hairline as the body, the motif in the middle ----
   <div class="sd" role="separator"><span class="sd__head" aria-hidden="true"></span></div>  (+ sd--left) */
.sd{--sd-h:22px;position:relative;height:var(--sd-h);max-width:min(440px,76%);margin:var(--fr-space-8) auto;
  background:var(--sd-motif) center / auto calc(var(--sd-h) * .82) no-repeat,linear-gradient(var(--fr-ink),var(--fr-ink)) center / 100% 1.5px no-repeat}
.sd__head{position:absolute;left:0;top:50%;transform:translateY(-52%);height:calc(var(--sd-h) * 1.5);aspect-ratio:var(--sf-head-ratio);
  padding-right:6px;background:var(--sf-head) left center / contain no-repeat,var(--sd-bg,var(--fr-cream))}
.sd--left{margin-left:0}
.sec--sand .sd{--sd-bg:var(--fr-cream-deep)}
@media (max-width:480px){.sd{--sd-h:18px;max-width:88%}}
/* Serpent band v2 (Mesa, Nov 28; Luke: "looks broken"). The v1 divider drew the whole logo head at 1.5x a 22px hairline
   box (about 34x27px) on a solid --sd-bg patch, with no tail; the aged head SVG's feTurbulence filter is also rendered
   soft/washed in WebKit at that size. v2 = the style's own aged raster band art (the header band's head cap, body tile and
   tail cap from art.css), scaled uniformly by --sd-k, body snapped to whole tiles so the cap joins seamlessly; no patch,
   no SVG filter, no blur. The aged divider motif (raster) sits on the body as a clasp.
   <div class="sd sd--snake" role="separator"><span class="sd__snake-head"></span><span class="sd__snake-body"></span><span class="sd__snake-tail"></span></div>
   [role] + two classes out-rank the style layers' .sd backgrounds (public-dark.css, :where() layers, aged.css TR rule). */
.sd.sd--snake[role]{--sd-k:1;display:flex;justify-content:center;align-items:flex-start;height:calc(var(--sb-head-h) * var(--sd-k));
  max-width:min(460px,84%);background:none}
.sd.sd--left.sd--snake[role]{justify-content:flex-start}
.sd__snake-head,.sd__snake-body,.sd__snake-tail{display:block;flex:none;background-repeat:no-repeat;background-position:left top;pointer-events:none}
.sd__snake-head{width:calc(var(--sb-head-w) * var(--sd-k));height:calc(var(--sb-head-h) * var(--sd-k));background-size:100% 100%}
.sd__snake-body,.sd__snake-tail{margin-top:calc(var(--sb-head-dy) * -1 * var(--sd-k))}
.sd__snake-body{position:relative;height:calc(var(--sb-tile-h) * var(--sd-k));background-repeat:repeat-x;
  background-size:calc(var(--sb-tile-w) * var(--sd-k)) calc(var(--sb-tile-h) * var(--sd-k));
  width:calc(100% - (var(--sb-head-w) + var(--sb-tail-w)) * var(--sd-k));
  width:round(down,calc(100% - (var(--sb-head-w) + var(--sb-tail-w)) * var(--sd-k)),calc(var(--sb-tile-w) * var(--sd-k)))}
.sd__snake-tail{width:calc(var(--sb-tail-w) * var(--sd-k));height:calc(var(--sb-tail-h) * var(--sd-k));background-size:100% 100%}
/* the clasp: centred on the body line (body centre = 3/8 of the tile height in every set), 1.5 tiles tall */
.sd__snake-body::after{content:"";position:absolute;left:50%;top:calc(var(--sb-tile-h) * var(--sd-k) * .375);
  height:calc(var(--sb-tile-h) * var(--sd-k) * 1.5);aspect-ratio:392/108;transform:translate(-50%,-50%);
  background:var(--sd-motif) center / contain no-repeat}
/* Original's snake-v2 art is drawn 5/3 the size of the v3 sets: same on-screen size as the others */
html[data-site-style="original"] .sd.sd--snake[role]{--sd-k:.6}
/* phones: 5/6 (v3) and 1/2 (Original v2) keep the body tile a whole 15 CSS px, so repeats land on whole pixels (Claude review #6) */
@media (max-width:480px){.sd.sd--snake[role]{--sd-k:calc(5 / 6);max-width:92%}html[data-site-style="original"] .sd.sd--snake[role]{--sd-k:.5}}

/* The vector draft's header/footer edge bands and button head icon were retired Nov 26 (9:00 PM PT); Nov 27 (Luke)
   they come back as Mesa's realistic snake-v2 raster art below. The vector art stays in brand/ for print. */

/* ---- header/footer snake band + button heads (snake-v2 UI art; images + 1x sizes from the generated art.css) ----
   <div class="snake-band snake-band--hdr|--ftr" aria-hidden="true"> head cap | seamless body tile | tail cap </div>
   Mesa's rules (brand/frame/snake-v2/README.md): tile 30x20 CSS px repeat-x (x=0 = start of a white cell); head cap at the
   LEFT (its body sits 5px lower than the cap top, the tongue hangs ~30px below); tail cap at the RIGHT; the body is
   snapped to whole 30px tiles so the last cell before the tail is never cut. Footer: no head (ink on ink). */
.snake-band{position:relative;z-index:2;display:flex;align-items:flex-start;height:var(--sb-tile-h);pointer-events:none;
  padding-left:calc(var(--sb-head-w) + max(8px,env(safe-area-inset-left)));margin-bottom:var(--sb-shadow,-4px)} /* v3 (Mesa, Nov 27): 4px soft shadow below the body overhangs the next element; per site style via --sb-shadow (Original/v2: -6px). The header and footer bands set their own margins. */
.snake-band__head,.snake-band__body,.snake-band__tail{display:block;flex:none;background-repeat:no-repeat;background-position:left top}
.snake-band__head{position:absolute;left:max(8px,env(safe-area-inset-left));top:var(--sb-head-dy);width:var(--sb-head-w);height:var(--sb-head-h);background-size:var(--sb-head-w) var(--sb-head-h)}
.snake-band__body{height:var(--sb-tile-h);background-repeat:repeat-x;background-size:var(--sb-tile-w) var(--sb-tile-h);
  width:calc(100% - var(--sb-tail-w) - 8px);width:round(down,calc(100% - var(--sb-tail-w) - 8px),var(--sb-tile-w))}
.snake-band__tail{width:var(--sb-tail-w);height:var(--sb-tail-h);background-size:var(--sb-tail-w) var(--sb-tail-h)}
/* Header band (Mesa, Nov 27 round 2): head + whole-tile body + tail as ONE group, centred in the content area (the .wrap
   content box: centred --fr-max + --fr-gutter), so the leftover after the whole-tile snap splits evenly and both ends sit
   inside the margin. Phone (<=480px): head cap at 80% (Mesa) and, so its built-in body piece still meets the tiles without a
   step, the tile and tail at the same 80% (uniform scale, never stretched; snap to whole 24 px tiles); the header grows below the band so the tongue stays inside the
   header (never cropped). */
.snake-band--hdr{--sb-k:1;--sb-cx:max(calc(max(0px,(100% - var(--fr-max)) / 2) + var(--fr-gutter)),env(safe-area-inset-left));
  padding:0 var(--sb-cx);justify-content:center}
.snake-band--hdr .snake-band__head{position:static;margin-top:calc(var(--sb-head-dy) * var(--sb-k));
  width:calc(var(--sb-head-w) * var(--sb-k));height:calc(var(--sb-head-h) * var(--sb-k));background-size:100% 100%}
.snake-band--hdr{height:calc(var(--sb-tile-h) * var(--sb-k))}
.snake-band--hdr .snake-band__body{height:calc(var(--sb-tile-h) * var(--sb-k));background-size:calc(var(--sb-tile-w) * var(--sb-k)) calc(var(--sb-tile-h) * var(--sb-k));
  width:calc(100% - (var(--sb-head-w) + var(--sb-tail-w)) * var(--sb-k));
  width:round(down,calc(100% - (var(--sb-head-w) + var(--sb-tail-w)) * var(--sb-k)),calc(var(--sb-tile-w) * var(--sb-k)))}
.snake-band--hdr .snake-band__tail{width:calc(var(--sb-tail-w) * var(--sb-k));height:calc(var(--sb-tail-h) * var(--sb-k));background-size:100% 100%}
/* The band does the dividing (Mesa, update 8b): no header hairline through the head, and the band's bottom margin
   lets the tongue clear the header edge by ~8 px on desktop. */
.hdr.hdr--band{border-bottom:0;display:flow-root}  /* flow-root: the band's bottom margin stays inside the header (no collapse without the border) */
.snake-band--hdr{margin-bottom:calc((var(--sb-head-dy) + var(--sb-head-h) - var(--sb-tile-h)) * var(--sb-k) + 8px)}
@media (max-width:480px){
  .snake-band--hdr{--sb-k:.8;margin-bottom:calc((var(--sb-head-dy) + var(--sb-head-h) - var(--sb-tile-h)) * var(--sb-k) + 6px)}
}
/* Footer band (update 8b, Scaffold's live check): body + tail only (no head on ink), centred in the content box the same
   way as the header: whole-tile snap, leftover split evenly at both ends. Full size at every width. */
.snake-band--ftr{--sb-cx:max(calc(max(0px,(100% - var(--fr-max)) / 2) + var(--fr-gutter)),env(safe-area-inset-left));
  padding:0 var(--sb-cx);justify-content:center;margin:0 0 var(--fr-space-6)}
.snake-band--ftr .snake-band__body{width:calc(100% - var(--sb-tail-w));width:round(down,calc(100% - var(--sb-tail-w)),var(--sb-tile-w))}
.btn--snake::before{content:"";flex:none;width:var(--sbh-w);height:var(--sbh-h);margin-left:-6px;background-repeat:no-repeat;background-position:center;background-size:var(--sbh-w) var(--sbh-h)}
@media print{.snake-band{display:none}}
