@import url("/tokens.css");   /* 1524: the one token set (DESIGN.md) under every page that loads this sheet; a page sheet after it may still set its own */
/* 1525: the base stylesheet, loaded before each page's own. It holds the shared parts as they move here (docs/design/1525-shared-parts.md).
   Part 1, the header (src/parts/header.js), as 1459 option B draws it (docs/design/sketches/1459-picture.md): one bar on every page,
   56 px (48 sideways, 68 in Large & clear), sticky, contents held to 1200 px; links in the bar from 760 px, one menu below it;
   on a store, the store's band under the bar. Colours are the page's own tokens. */
header.site-hd { position: sticky; top: 0; z-index: 10; display: block; max-width: none; height: auto; min-height: 0; margin: 0; padding: env(safe-area-inset-top) 0 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid var(--line); font-family: var(--ui, -apple-system, system-ui, sans-serif); }
.site-in { --bar: 56px; display: flex; align-items: center; gap: 4px; height: var(--bar); max-width: var(--hd-max, 1200px); margin: 0 auto;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
[data-theme="large"] .site-in { --bar: 68px; }
/* the header's own text sizes: style.css's --body is a font family, so a size read from it drops the whole font rule (1541) */
.site-hd, .site-band { --hd-body: 17px; --hd-small: 16px; }   /* 1524: small text 16 px, DESIGN.md --t-small */
[data-theme="large"] .site-hd, [data-theme="large"] .site-band { --hd-body: 20px; --hd-small: 18px; }
[data-theme="large"] { --tap: 56px; }   /* pages without app.css (cards, leaving) reach 56 px targets too */
.site-sp { flex: 1 1 auto; min-width: 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap, 44px); padding: 0 4px; font: 700 20px/1 var(--ui, -apple-system, system-ui, sans-serif); letter-spacing: -.01em; color: var(--ink, inherit); text-decoration: none; white-space: nowrap; flex: none; }
[data-theme="large"] .logo { font-size: 1.5rem; }
.logo svg { width: 1.1em; height: 1.1em; flex: none; }
.logo .pin-head { fill: var(--pin-head, var(--accent)); }
.logo .pin-glint { fill: var(--pin-glint, var(--on-accent)); opacity: .55; }
.site-hd .signin { flex: none; min-height: var(--tap, 44px); display: inline-flex; align-items: center; padding: 0 8px; font: 600 var(--hd-small)/1 var(--ui, system-ui, sans-serif); color: var(--po-accent, var(--accent)); text-decoration: none; white-space: nowrap; border-radius: 10px; }
[data-theme="large"] .site-hd .signin { box-shadow: inset 0 0 0 1.5px var(--po-accent, var(--accent)); padding: 0 14px; }
/* 1524 (walk 2, build condition 2): Larger text, one tap, a pill in the bar. A static page carries both links and the theme shows one.
   Under 760 it takes Sign in's place (Sign in is in the menu). */
.site-larger { flex: none; min-height: var(--tap, 44px); display: inline-flex; align-items: center; padding: 0 12px; margin-inline-end: 4px; border: 1px solid var(--muted); border-radius: 999px;
  color: var(--ink); font: 600 var(--hd-small)/1 var(--ui, system-ui, sans-serif); text-decoration: none; white-space: nowrap; }
[data-theme="large"] .site-larger { border: 1.5px solid var(--ink); }
[data-theme="large"] .site-larger.to-large, :root:not([data-theme="large"]) .site-larger.to-plain { display: none; }
@media (max-width: 759.98px) { .site-hd:has(.site-larger) .signin { display: none; } }
/* links in the bar (760 px and wider) */
.site-nav { display: none; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--tap, 44px); padding: 0 10px; border-radius: 10px; font: 500 var(--hd-small)/1 var(--ui, system-ui, sans-serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-nav a[aria-current] { color: var(--po-accent, var(--accent)); font-weight: 700; }
/* the menu (below 760 px): a <details>, so it works with no script; open, the burger reads Close and the sheet drops under the bar */
.site-menu { flex: none; }
.site-menu > summary { list-style: none; width: var(--tap, 44px); height: var(--tap, 44px); display: grid; align-content: center; justify-items: center; gap: 5px; border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary i { display: block; width: 20px; height: 2px; background: var(--ink); }
[data-theme="large"] .site-menu > summary i { width: 24px; height: 3px; }
.site-menu > summary span { display: none; }
.site-menu[open] > summary { width: auto; padding: 0 8px; display: inline-flex; align-items: center; font: 600 var(--hd-small)/1 var(--ui, system-ui, sans-serif); color: var(--po-accent, var(--accent)); }
.site-menu[open] > summary i { display: none; }
.site-menu[open] > summary span { display: inline; }
.site-hd:has(.site-menu[open]) .signin, .site-hd:has(.site-menu[open]) .site-larger { visibility: hidden; }
:root { --site-sheet-shadow: 0 10px 40px rgba(0,0,0,.25), 0 0 0 100vmax rgba(0,0,0,.35); }   /* the menu's lift and the dim behind it */
.site-sheet { position: absolute; inset: 100% 0 auto 0; z-index: 21; background: var(--surface, var(--bg)); border-radius: 0 0 18px 18px; padding: 4px 16px 16px; box-shadow: var(--site-sheet-shadow); clip-path: inset(0 -100vmax -100vmax -100vmax); max-height: calc(100svh - 70px); overflow: auto; }
.site-sheet nav { display: grid; }
.site-sheet nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: calc(var(--tap, 44px) + 4px); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 600 var(--hd-body)/1.2 var(--ui, system-ui, sans-serif); }
.site-sheet nav a::after { content: "›"; color: var(--muted); font-size: 1.2em; }
.site-sheet nav a[aria-current] { color: var(--po-accent, var(--accent)); }
.site-hd .site-btn { display: flex; align-items: center; justify-content: center; min-height: var(--btn, 52px); margin-top: 12px; border-radius: 14px; background: var(--po-accent, var(--accent)); color: var(--po-on-accent, var(--on-accent, var(--accent-ink))); font: 700 var(--hd-body)/1.2 var(--ui, system-ui, sans-serif); text-decoration: none; }
/* a store's band under the bar (1459 B): its dot, its name in its own font (never cut), "A PinOnce store" */
.site-band { background: var(--surface, var(--bg)); border-bottom: 1px solid var(--line); }
.site-band-in { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: var(--hd-max, 1200px); margin: 0 auto; padding: 10px 16px 12px; color: var(--ink); text-decoration: none; }
.site-band .store-h { margin: 0; }
.site-band b, .site-band .store-h { font: 700 calc(var(--hd-body) + 3px)/1.2 var(--st-font, var(--ui, system-ui, sans-serif)); overflow-wrap: anywhere; }
.site-band small { font: 400 var(--hd-small)/1.3 var(--ui, system-ui, sans-serif); color: var(--muted); }
.site-hd .dot, .site-band .dot { display: inline-block; vertical-align: .12em; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 8px; background: var(--st-dot, var(--accent)); }
@media (prefers-color-scheme: dark) { .site-band .dot, .site-hd .dot { background: var(--st-dot-dark, var(--st-dot, var(--accent))); } }
@media (min-width: 760px) {
  .site-nav { display: flex; }
  .site-menu { display: none; }
  .site-in { padding: 0 24px; }
  .site-hd .signin { box-shadow: inset 0 0 0 1.5px var(--po-accent, var(--accent)); padding: 0 14px; margin-inline-start: 6px; }
}
/* sideways phone: a short screen keeps the bar short and lets it scroll away */
@media (max-height: 500px) { .site-in { --bar: 48px; } [data-theme="large"] .site-in { --bar: 56px; } header.site-hd { position: static; } }
.site-hd .close, [data-theme="large"] .site-hd .close { box-shadow: none; }
/* in the home-screen app (wayback.js's app bar on a static page) the app bar is the only bar (1542) */
body.inapp .site-hd { display: none; }

/* 1524: the shared parts DESIGN.md names (Components), on the tokens of public/tokens.css (imported at the top of this sheet). A page
   fills their slots and adds layout for its own body only; it never draws its own button, card, row, field, chip or sheet.
   The header and the logo are above (src/parts/header.js draws them); every part at the 9 sizes of tests/devices.json: /design/parts/. */
.po-base { margin: 0; background: var(--bg); color: var(--ink); font: var(--w-body) var(--t-body)/var(--lh) var(--ui); -webkit-text-size-adjust: 100%; }
.po-base h1, .po-title { font: var(--w-bold) var(--t-title)/var(--lh-title) var(--serif); letter-spacing: -.02em; text-wrap: balance; margin: 0 0 var(--s-3); }
.po-display { font: var(--w-bold) var(--t-display)/1.08 var(--serif); letter-spacing: -.02em; text-wrap: balance; margin: 0; }
.po-base h2, .po-heading { font: var(--w-bold) var(--t-heading)/1.18 var(--serif); margin: 0 0 var(--s-3); }
.po-lead { font-size: var(--t-lead); line-height: 1.4; margin: 0 0 var(--s-4); }
.po-small { font-size: var(--t-small); color: var(--muted); }
.po-tiny { font-size: var(--t-tiny); font-weight: 600; }
.po-base main a:where(:not([class])) { color: var(--accent); }   /* text links only; the bar keeps its own colours */

/* Footer (option B): line + languages, then the links - wrapped lines under 760, three titled columns from 760; legal row */
.po-ft { background: var(--surface); border-top: 1px solid var(--line); padding: var(--s-6) var(--edge) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); font-size: var(--t-small); }
.po-ft > * { max-width: var(--page); margin-inline: auto; }
.po-ft .po-chips { margin: var(--s-4) auto; }
.po-ft .po-cols { display: flex; flex-wrap: wrap; column-gap: var(--s-4); }
.po-ft .po-cols h3 { display: none; font-size: var(--t-small); margin: 0 0 var(--s-2); }
.po-ft .po-cols div { display: contents; }
.po-ft .po-cols a { min-height: var(--tap); display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.po-ft .po-legal { color: var(--muted); margin-top: var(--s-4); }
@media (min-width: 760px) {
  .po-ft .po-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
  .po-ft .po-cols div { display: flex; flex-direction: column; }
  .po-ft .po-cols h3 { display: block; }
}

/* Buttons: one main per screen; second; text for the rare and the way back */
.po-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--btn); padding: 0 20px; border-radius: var(--r);
  font: 700 var(--t-body)/1.2 var(--ui); text-decoration: none; cursor: pointer; border: 1.5px solid var(--accent); background: var(--accent); color: var(--on-accent);
  transition: transform 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.po-base .po-btn { color: var(--on-accent); }
.po-btn:active { transform: scale(.97); }
.po-btn.second, .po-base .po-btn.second { background: transparent; color: var(--accent); }
.po-btn.text, .po-base .po-btn.text { background: none; border-color: transparent; color: var(--accent); min-height: var(--tap); padding: 0 var(--s-2); font-weight: 600; }
.po-btn:focus-visible, .po-chip:focus-visible, .po-row:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
.po-form .po-btn { width: 100%; }
@media (min-width: 760px) { .po-form .po-btn { width: auto; } }

/* Card: surface, radius 14, padding 16, no shadow (a line edge in dark and Large) */
.po-card { display: block; background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r); padding: var(--s-4); color: var(--ink); text-decoration: none; }
.po-base .po-card { color: var(--ink); }
.po-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); margin-bottom: var(--s-3); background: var(--surface-2); }
.po-card b { display: block; font-weight: var(--w-label); }
.po-card span { font-size: var(--t-small); color: var(--muted); }
.po-cards { display: grid; gap: var(--s-3); align-items: start; }
@media (min-width: 600px) { .po-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .po-cards { grid-template-columns: repeat(3, 1fr); } }

/* List rows: grouped in one radius-14 surface, hairlines inset 16; › only when the row opens something */
.po-rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; }
.po-rows > li { position: relative; }
.po-rows > li + li::before { content: ""; position: absolute; top: 0; inset-inline: var(--s-4) 0; border-top: var(--line-w) solid var(--line); }
.po-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--btn); padding: var(--s-2) var(--s-4); color: var(--ink); text-decoration: none; font-weight: var(--w-label); }
.po-base .po-row { color: var(--ink); }
.po-row > :first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.po-row .val { font-weight: var(--w-body); color: var(--muted); font-size: var(--t-small); }
a.po-row::after { content: "›"; color: var(--muted); font-size: 1.4em; line-height: 1; }
a.po-row:active { background: var(--surface-2); }
[dir="rtl"] a.po-row::after { content: "‹"; }

/* Switch: an on/off in a row; the off track keeps a 1.5 px muted edge */
.po-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1.5px solid var(--muted); cursor: pointer; transition: background 150ms ease-out; }
.po-switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: var(--float); transition: inset-inline-start 150ms ease-out; }
.po-switch:checked { background: var(--ok); border-color: var(--ok); }
.po-switch:checked::after { inset-inline-start: 22px; }

/* Field: label above, 52 px box, 1.5 px line, radius 14; the error line says what to do */
.po-field { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.po-field label { font-weight: var(--w-label); }
.po-field input { min-height: var(--btn); padding: 0 14px; border: var(--field-w) solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font: var(--w-body) max(16px, var(--t-body)) var(--ui); }
.po-field input::placeholder { color: var(--muted); }
.po-field input:focus { outline: 2px solid var(--sel); outline-offset: 1px; }
.po-field .err { color: var(--bad); font-size: var(--t-small); }
.po-field input[aria-invalid="true"] { border-color: var(--bad); }

/* Chip: pill, 44 px; on = ink fill with a ✓ (colour alone is not enough) */
.po-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.po-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap); padding: 0 14px; border-radius: var(--r-pill); border: var(--line-w) solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 var(--t-small)/1 var(--ui); text-decoration: none; cursor: pointer; }
.po-base .po-chip { color: var(--ink); }
.po-chip[aria-pressed="true"], .po-chip[aria-current] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.po-chip[aria-pressed="true"]::before, .po-chip[aria-current]::before { content: "✓"; }

/* Sheet: from the bottom on a phone (grabber, title + Close, scrolls inside); a centred dialog from 760 and sideways.
   Opens with the popover attribute (popovertarget), so a page needs no script; outside tap and Esc close it. */
.po-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 90dvh; margin: 0; padding: var(--s-2) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  border: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--float); overflow: auto; overscroll-behavior: contain; box-sizing: border-box; }
.po-sheet::backdrop { background: var(--scrim); }
.po-sheet .grab { width: 36px; height: 5px; border-radius: var(--r-pill); background: var(--line); margin: 0 auto var(--s-2); }
.po-sheet .head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.po-sheet .head b { font-size: var(--t-lead); }
/* With a Done bar: the list scrolls between the title and Done, and Done sits at the very bottom (no list peeking under it);
   the list's bottom edge shades while there is more to scroll. */
[popover].po-sheet:not(:popover-open) { display: none; }
.po-sheet:has(> .foot) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.po-sheet:has(> .foot) > * { flex: none; }
.po-sheet:has(> .foot) > :nth-last-child(2) { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(transparent, var(--surface) 70%) 0 100% / 100% 32px no-repeat local,
    radial-gradient(farthest-side at 50% 100%, color-mix(in srgb, var(--ink) 30%, transparent), transparent) 0 100% / 100% 14px no-repeat scroll; }
.po-sheet .foot { padding: var(--s-3) 0 calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); background: var(--surface); }
.po-sheet .foot .po-btn { width: 100%; }
@media (min-width: 760px), (max-height: 500px) and (orientation: landscape) {
  .po-sheet { inset: 0; margin: auto; width: min(480px, calc(100% - 2 * var(--edge))); max-height: min(90dvh, 640px); border-radius: var(--r-lg); padding-bottom: var(--s-4); }
  .po-sheet .grab { display: none; }
}
/* Shared page body for desktop/wide (2320): centred at --page, a grid that fills the width, a two-column split from 980. */
.po-body { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--edge, 16px); box-sizing: border-box; }
.po-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--s-3, 12px); }
.po-cols { display: grid; gap: var(--s-4, 16px); }
@media (min-width: 980px) { .po-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; } }
