/* ==========================================================================================================
   [art3] Ben's v2 art pack (ChatGPT illustrations from notes/chatgpt-asset-prompts-v2.md). Decorative, original art:
   it frames the real content and never stands in for a photograph of a real event. v11 tokens (polish.css) apply.
   ========================================================================================================== */

/* ---------- one-ink almanac glyphs (weather, goods): tinted by the text colour, so contrast follows the text ---------- */
.a3-ic { display: inline-block; flex: none; width: 1.15em; height: 1.15em; margin-right: .42em; vertical-align: -.2em; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.a3-wx { width: 1.4em; height: 1.4em; vertical-align: -.32em; }
.card dd .a3-wx { width: 1.25em; height: 1.25em; margin-right: .3em; }
.rc-t td .a3-g { width: 1.05em; height: 1.05em; margin-right: .4em; vertical-align: -.18em; }
.st-k .a3-g { margin-right: .35em; }
.a3-pad { background: none; }
#era .ch-h .a3-wx { width: .78em; height: .78em; margin-right: .22em; vertical-align: -.06em; }

/* ---------- era heading rule under every chapter title ---------- */
#era.era-40s { --a3-orn: url('/art/orn/rule-40s.webp?v=1'); --a3-stock: url('/art/stocks/40s.webp?v=1'); }
#era.era-50s { --a3-orn: url('/art/orn/rule-50s.webp?v=1'); --a3-stock: url('/art/stocks/50s.webp?v=1'); }
#era.era-60s { --a3-orn: url('/art/orn/rule-60s.webp?v=1'); --a3-stock: url('/art/stocks/60s.webp?v=1'); }
#era.era-70s { --a3-orn: url('/art/orn/rule-70s.webp?v=1'); --a3-stock: url('/art/stocks/70s.webp?v=1'); }
#era.era-80s { --a3-orn: url('/art/orn/rule-80s.webp?v=1'); --a3-stock: url('/art/stocks/80s.webp?v=1'); }
#era.era-90s { --a3-orn: url('/art/orn/rule-90s.webp?v=1'); --a3-stock: url('/art/stocks/90s.webp?v=1'); }
#era.era-00s { --a3-orn: url('/art/orn/rule-00s.webp?v=1'); --a3-stock: url('/art/stocks/00s.webp?v=1'); }
#era.era-10s { --a3-orn: url('/art/orn/rule-10s.webp?v=1'); --a3-stock: url('/art/stocks/10s.webp?v=1'); }
#era.era-20s { --a3-orn: url('/art/orn/rule-20s.webp?v=1'); --a3-stock: url('/art/stocks/20s.webp?v=1'); }
#era .ch-copy .ch-h::after { content: ""; display: block; width: min(220px, 60%); height: 12px; margin: 10px auto 0; background: var(--a3-orn) center / contain no-repeat; pointer-events: none; }
@media (min-width: 1000px) and (min-aspect-ratio: 5/4) { #era .ch-copy .ch-h::after { margin-left: 0; background-position: left center; } }
@media (max-height: 640px) { #era .ch-copy .ch-h::after { display: none; } }

/* ---------- internet chapter: the typographic cards sit on the era's document stock ---------- */
#era .ob-card { background: #f3eee4 var(--a3-stock) center / cover no-repeat; }

/* ---------- empty states: the open card-catalogue drawer beside the message ---------- */
.a3-empty { display: grid; justify-items: center; gap: var(--sp-3, 12px); padding: var(--sp-4, 16px) 0; }
.a3-empty img { display: block; width: clamp(88px, 20vmin, 150px); height: auto; }
.a3-empty > p { margin: 0 auto; }

/* ---------- The End: the date card wears the era's stamp and turns over to a postcard ---------- */
.a3-pc { display: grid; min-width: 0; perspective: 1600px; }
.a3-pc > .card, .a3-pc > .a3-front { grid-area: 1 / 1; }
/* two half-turns with a swap at 90° (no backface tricks, so WebKit never shows a mirrored face) */
.a3-has > .card { transition: transform var(--a3-half, .42s) cubic-bezier(.22,.61,.36,1) var(--a3-half, .42s), visibility 0s linear var(--a3-half, .42s); }
.a3-front { position: relative; margin: 0; width: calc(100% - 10px); justify-self: center; align-self: center; display: grid; gap: 0; background: #eadfca; color: #1d1812; box-shadow: 0 30px 60px rgba(0,0,0,.5); transform: rotateY(-90deg) rotate(1deg); visibility: hidden; transition: transform var(--a3-half, .42s) cubic-bezier(.55,0,.75,.2), visibility 0s linear var(--a3-half, .42s); }
.a3-front img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #eadfca; }
.a3-pc.flipped > .card { transform: rotateY(90deg) rotate(-1deg); visibility: hidden; transition: transform var(--a3-half, .42s) cubic-bezier(.55,0,.75,.2), visibility 0s linear var(--a3-half, .42s); }
.a3-pc.flipped > .a3-front { transform: rotate(1deg); visibility: visible; transition: transform var(--a3-half, .42s) cubic-bezier(.22,.61,.36,1) var(--a3-half, .42s), visibility 0s linear var(--a3-half, .42s); }
.a3-back { justify-self: end; min-height: var(--hit, 44px); padding: 0 var(--sp-4, 16px); background: none; border: 0; border-top: 1px solid rgba(29,24,18,.22); border-radius: 0; color: #1d1812; font: 600 11px/1 var(--sf, inherit); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; width: 100%; text-align: right; }
.a3-back:hover { background: rgba(29,24,18,.06); }
.a3-turn, .a3-stamp { position: relative; z-index: 1; float: right; margin: -6px -6px 8px 14px; }
.a3-turn { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; min-width: var(--hit, 44px); min-height: var(--hit, 44px); padding: 4px; background: none; border: 1px solid transparent; border-radius: 0; color: #1d1812; font: 600 10.5px/1.2 var(--sf, inherit); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.a3-turn img, .a3-stamp { display: block; width: 60px; height: auto; transform: rotate(3deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.28)); }
.a3-turn:hover { border-color: rgba(29,24,18,.45); }
.a3-turn:not(:has(img)) { align-content: center; padding: 0 10px; border-color: rgba(29,24,18,.5); }
#era .a3-turn:focus-visible, #era .a3-back:focus-visible { outline: 2px solid #1d1812; outline-offset: 2px; }
@media (min-width: 900px) { .a3-turn img, .a3-stamp { width: 72px; } }
@media (prefers-reduced-motion: reduce) { .a3-pc { --a3-half: 0s; } }
/* phones: a smaller stamp */
@media (max-width: 899px) { .a3-turn img, .a3-stamp { width: 44px; } .a3-turn { gap: 2px; font-size: 10px; letter-spacing: .12em; } }
