/* Art album (/art): the secondary-page shell from legal.css, widened to the landing's content width. Images keep their
   own proportions in justified rows: each tile grows in proportion to its aspect (--ar), so every image in a row has the
   same height and every row fills the width (growth capped at 3× for safety). The row height is 15.5% of the chapter
   width, so the packing is the same at every desktop size; art-page.mjs packRows mirrors it for the sizes attribute.
   Tokens and type follow site.css. */
.art-page .legal-prose{max-width:calc(var(--content) + var(--gutter)*2);padding-top:28px}
.art-page .legal-heading .legal-date{max-width:62ch;font-size:15px;line-height:1.55}

/* Chapter index */
.art-chapters ol{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0;list-style:none}
.legal-prose .art-chapters a{display:inline-flex;align-items:baseline;gap:10px;min-height:44px;padding:10px 16px 9px;border:1px solid #8ff0e033;background:#0b1a1e;color:var(--ash);font-family:Barlow,'Arial Narrow',sans-serif;font-weight:600;font-size:18px;line-height:1.2;text-decoration:none;overflow-wrap:normal}
.art-chapters a span{color:var(--amber);font-size:14px;letter-spacing:.08em}
.legal-prose .art-chapters a:hover{border-color:var(--scar);color:var(--bright)}

/* Chapters */
.art-chapter{container-type:inline-size;margin-top:clamp(64px,7vw,112px);scroll-margin-top:calc(var(--header-height) + 16px)}
.art-chapter-head{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 64px;align-items:end;margin-bottom:clamp(28px,3vw,44px);padding-top:30px;border-top:1px solid var(--line)}
.art-chapter-head::before{content:'';position:absolute;left:0;top:-1px;width:96px;height:2px;background:var(--scar);box-shadow:0 0 14px var(--scar)}
.legal-prose .art-chapter-head p{margin:0}
.legal-prose .art-chapter-head>p{color:var(--dim);max-width:56ch}
.legal-prose .art-chapter-number{font-family:Barlow,'Arial Narrow',sans-serif;font-weight:700;font-size:16px;letter-spacing:.1em;color:var(--amber);margin-bottom:8px}
.legal-prose .art-chapter h2{margin:0;font-size:clamp(34px,4.2vw,58px);line-height:1.02;max-width:18ch}
.art-status{display:inline-block;vertical-align:middle;margin:0 0 6px 6px;padding:3px 10px 2px;border:1px solid var(--amber);color:var(--amber);font-size:16px;font-weight:600;letter-spacing:.04em;line-height:1.3;white-space:nowrap}

/* Justified rows */
.art-grid{--row:clamp(140px,13.8vw,205px);display:flex;flex-wrap:wrap;gap:40px 18px;margin:0;padding:0;list-style:none}
.art-grid li{flex:var(--ar) 1 calc(var(--ar) * var(--row));max-width:calc(var(--ar) * var(--row) * 3);min-width:0}
@supports (width:1cqi){.art-grid{--row:max(140px,15.5cqi)}}
.ar-67{--ar:.6667}.ar-100{--ar:1}.ar-150{--ar:1.5}.ar-178{--ar:1.7778}.ar-215{--ar:2.1472}.ar-250{--ar:2.5}.ar-263{--ar:2.6266}.ar-300{--ar:3}
.art-grid figure{display:grid;align-content:start;gap:14px;margin:0}
.legal-prose .art-frame{position:relative;display:block;background:var(--hull);color:inherit;text-decoration:none;clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,0 100%)}
.art-frame img{width:100%;height:auto;transition:filter .2s}
.art-frame::after{content:'';position:absolute;inset:0;border:1px solid #8ff0e026;pointer-events:none}
.art-frame:hover img{filter:brightness(1.08)}
.art-frame:hover::after{border-color:#8ff0e080}
.art-frame:focus-visible{outline:none}
.art-frame:focus-visible::after{border:2px solid var(--scar)}
.art-grid figcaption{display:grid;gap:4px}
.art-tag{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ash)}
.art-tag::before{content:'';flex:none;width:7px;height:7px;border:1.5px solid var(--amber);transform:rotate(45deg)}
.art-title{font-family:Barlow,'Arial Narrow',sans-serif;font-weight:700;font-size:23px;line-height:1.1;color:var(--bright)}
.art-text{font-size:14.5px;line-height:1.55;color:var(--dim);max-width:62ch}

/* Viewer (extends .lightbox from site.css) */
.art-viewer{height:100vh;height:100dvh;inset:0}
.art-viewer[open]{display:grid;place-items:center}
.art-viewer-frame{display:grid;justify-items:center;gap:16px;width:100%;max-width:1680px}
.art-viewer-frame img{max-width:100%;max-height:calc(100vh - 210px);max-height:calc(100dvh - 210px);width:auto;height:auto;background:var(--hull);touch-action:pan-y}
.art-viewer-caption{display:grid;gap:4px;width:min(100%,72ch);text-align:left}
.art-viewer-meta{display:flex;justify-content:space-between;gap:16px;margin:0}
.art-viewer-count{font-size:13px;color:var(--dim);font-variant-numeric:tabular-nums}
.art-viewer-title{margin:0;font-family:Barlow,'Arial Narrow',sans-serif;font-weight:700;font-size:24px;line-height:1.15;color:var(--bright)}
.art-viewer-text{margin:0;font-size:15px;line-height:1.55;color:var(--ash)}
.art-viewer button svg{color:var(--bright)}

@media (max-width:900px){
  .art-chapter-head{grid-template-columns:1fr}
}
@media (max-width:700px){
  .art-grid{gap:36px}
  .art-grid li{flex:1 1 100%;max-width:none}
  .art-title{font-size:21px}
  .art-viewer{padding:56px 12px 84px}
  .art-viewer-frame img{max-height:calc(100dvh - 300px)}
  .art-viewer-title{font-size:20px}
  .art-viewer-text{font-size:14px}
}
