/*
 * The new look's skin (web-heritage spec §6, W1): today's layout and components in the app's Heritage and Classic.
 * Loaded only while the archive's "New look" switch lets this visit have it (App\Archive\Look\Look), after
 * archive-app.css and archive-theme.css (the variables); every rule starts at [data-style] so it wins over today's.
 * Rules carried from the app: gold only for the one main action; small controls are a surface pill with a fine edge,
 * chosen = ring + tint; the focus ring 2 px in --focus with a 3 px offset; sepia on small photos in Heritage only, full
 * colour under the mouse; Cormorant never clipped (no overflow/ellipsis/line-clamp on display text, line-height >= 1.2).
 */

/* ---------- base ---------- */
[data-style] body { background: var(--bg-glow), var(--bg); background-attachment: fixed; font: var(--fs-body)/1.45 var(--text); font-variant-numeric: lining-nums; }
[data-style] :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[data-style] :where(a) { text-underline-offset: 4px; }
[data-style] .num, [data-style] .count { font-variant-numeric: lining-nums tabular-nums; }
[data-style] .skip { top: -300px; background: var(--primary-fill); color: var(--on-primary); border-radius: 999px; } /* far enough up at Larger text too */
[data-style] .skip:focus { top: 12px; }
[data-style] svg.i { stroke-width: 1.6; }

/* Display titles in Cormorant / Figtree 800: never clipped (Safari on iPhone cuts Cormorant in a tight box, spec §10). */
[data-style] .pagehead h1, [data-style] .h1 { font: var(--title-w) var(--fs-title)/var(--title-lh) var(--display); letter-spacing: var(--title-ls); }
[data-style] .empty h2, [data-style] .vinfo h2 { font: var(--title-w) var(--fs-section)/var(--title-lh) var(--display); letter-spacing: var(--title-ls); }
[data-style] .panel h2, [data-style] .fieldset > legend, [data-style] .fieldset > .legend { font: var(--title-w) var(--fs-card)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .kpi .val { font: var(--title-w) calc(34px * var(--kt))/1.2 var(--display); }
/* The family's name in the top bar (today's layout): smaller than the column's brand of W2, on as many lines as it needs. */
[data-style] .brand .name { font: var(--title-w) calc(21px * var(--kt))/1.2 var(--display); letter-spacing: var(--title-ls); overflow: visible; text-overflow: clip; white-space: normal; }
[data-style] .app { grid-template-rows: minmax(var(--top), auto) minmax(0, 1fr); }
[data-style] .topbar { padding-top: 6px; padding-bottom: 6px; }
/* Overlines (CATEGORY, the details' headings): letter-spaced, gold words. */
[data-style] .details h3, [data-style] .card-h3, [data-style] .navlabel, [data-style] .search-hint h3, [data-style] .menu .mlabel, [data-style] .section h2 {
  font: 600 var(--fs-over)/1.3 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
[data-style="classic"] .details h3, [data-style="classic"] .card-h3, [data-style="classic"] .navlabel, [data-style="classic"] .menu .mlabel, [data-style="classic"] .section h2 { font-weight: 700; letter-spacing: .08em; }

/* The catalogue number: Heritage in Crimson Pro in a fine pill; Classic keeps Atkinson Mono (spec, font.catalogue-number). */
[data-style="heritage"] .catno { font: 600 var(--fs-over)/1 var(--text); letter-spacing: .08em; background: transparent; border-color: var(--line); border-radius: 999px; padding: 5px 10px; }
[data-style="heritage"] .catno::before { display: none; }
[data-style="heritage"] .card .sub .catno { letter-spacing: .02em; padding: 3px 8px; }
/* Never cut (web-design W1 review): the row wraps, the year or the pill drops to the next line. */
[data-style] .card .sub { flex-wrap: wrap; row-gap: 4px; }
[data-style] .card .sub .catno { overflow: visible; text-overflow: clip; min-width: auto; flex: none; max-width: 100%; white-space: nowrap; line-height: 1.25; } /* never broken inside (web-design #40 WS-C): the year goes under it; the grid keeps the tile wide enough (WS-B) */

/* ---------- buttons ---------- */
/* ":root[data-style]:not([data-x])" only lifts a rule over today's "@media dark :root:not([data-theme=light]) …" ones. */
/* Secondary: transparent pill, 1.5 px line-strong. Primary: the one gold action. Danger keeps its words in --danger. */
[data-style] .btn { min-height: calc(2.5rem + 4px); padding: 0 20px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font: 600 var(--fs-label)/1.2 var(--text); transition: background-color .15s, transform .1s, filter .15s; }
[data-style] .btn:hover { background: var(--soft); }
[data-style] .btn:active { transform: scale(.98); }
[data-style] .btn.primary, :root[data-style]:not([data-x]) .btn.primary { background: var(--primary-fill); color: var(--on-primary); border: 1px solid var(--primary-edge); font-weight: 700; }
[data-style] .btn.primary:hover, :root[data-style]:not([data-x]) .btn.primary:hover { background: var(--primary-fill); border-color: var(--primary-edge); filter: brightness(1.05); }
[data-style="heritage"] .btn.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px -10px rgba(214,180,124,.55); }
[data-style] .btn.primary[disabled], [data-style] .btn.primary[aria-disabled="true"] { box-shadow: none; }
[data-style] .btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
[data-style] .btn.danger:hover { background: var(--danger-soft); }
[data-style] .btn.danger.solid { background: var(--danger); color: var(--bg); border-color: var(--danger); }
[data-style] .btn.ghost { border-color: transparent; }
[data-style] .btn.ghost:hover { background: var(--soft); }
[data-style] .btn.sm { min-height: calc(2rem + 2px); padding: 0 14px; font-size: var(--fs-meta); }
[data-style] .btn.lg { min-height: calc(3rem + 4px); padding: 0 26px; }
[data-style] .iconbtn { color: var(--ctl-icon); }
[data-style] .iconbtn:hover { background: var(--ctl-pressed); color: var(--ink); }
[data-style] .iconbtn[aria-pressed="true"] { background: var(--ctl-tint); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--ctl-ring); }
[data-style] .linkbtn { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
[data-style] .linkbtn:hover { text-decoration-thickness: 2px; }

/* ---------- the shell ---------- */
[data-style] .topbar { background: transparent; border-bottom-color: var(--line); }
[data-style] .brand:hover { background: var(--soft); }
[data-style] .brand .mark { background: transparent; color: var(--accent); border: 1.5px solid var(--primary); border-radius: 50%; font: var(--title-w) 1.1rem/1.2 var(--display); box-shadow: var(--ring-glow); }
[data-style] .brand .sub { font: 600 var(--fs-tag)/1.2 var(--text); letter-spacing: .3em; color: var(--accent); }
[data-style="classic"] .brand .sub { letter-spacing: .08em; }
[data-style] .brand { color: var(--ink); }
/* Classic: the brand's wordmark (tokens.json): Tinos 400 for OneLegacy archives, Montserrat 700 for Mulryan, in ink. */
[data-style="classic"] .brand .name { font: 400 calc(21px * var(--kt))/1.2 "Tinos", Georgia, serif; letter-spacing: 0; color: var(--ink); }
[data-style="classic"][data-brand="mulryan"] .brand .name { font: 700 calc(20px * var(--kt))/1.2 "Montserrat", system-ui, sans-serif; letter-spacing: -.02em; }

/* Search: a pill on --ctl-fill with an edge that reaches 3:1 (--field-line). */
[data-style] .search input { height: calc(2.5rem + 6px); background: var(--ctl-fill); border: 1px solid var(--field-line); border-radius: 999px; font-size: var(--fs-body); }
[data-style] .search input:hover { background: var(--ctl-pressed); }
[data-style] .search input:focus { background: var(--surface); border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
[data-style] .search > .i { color: var(--ctl-icon); }
[data-style] .search-hint { background: var(--surface); border: 1px solid var(--ctl-edge); border-radius: 20px; box-shadow: var(--shadow-2); }
[data-style] .search-hint .row { border-radius: 12px; }
[data-style] .search-hint .row:hover, [data-style] .search-hint .row.active { background: var(--soft); }
[data-style] .search-hint .row .i { color: var(--ctl-icon); }
[data-style] .search-hint .row .thumbmini img { filter: var(--photo); }

/* Help and other words in the top bar: control pills. */
[data-style] .textbtn { background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); font: 500 var(--fs-label)/1.2 var(--text); }
[data-style] .textbtn .i { color: var(--ctl-icon); }
[data-style] .textbtn:hover, [data-style] .textbtn[aria-current="page"] { background: var(--ctl-pressed); }
[data-style] .textbtn[aria-current="page"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }

/* The avatar: a gold ring with the initials in display. */
[data-style] .avatar { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--primary); font: var(--title-w) 1rem/1.2 var(--display); }
[data-style] .avatarbtn .avatar { width: 46px; height: 46px; font-size: 18px; }
[data-style] .avatarbtn:hover .avatar { box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 4px var(--soft); }

/* The left column: --bg-2 washing into the page, a fine edge on the right. */
[data-style] .sidebar { background: linear-gradient(180deg, var(--bg-2), transparent 70%); border-right: 1px solid var(--line); }
[data-style] .newbtn { border-radius: 999px; height: calc(2.5rem + 8px); padding: 0 24px 0 18px; background: var(--primary-fill); color: var(--on-primary); border: 1px solid var(--primary-edge); box-shadow: none; font: 700 var(--fs-label)/1.2 var(--text); }
[data-style="heritage"] .newbtn { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px -10px rgba(214,180,124,.55); }
[data-style] .newbtn:hover { background: var(--primary-fill); filter: brightness(1.05); box-shadow: none; }
[data-style] .newbtn .i { color: currentColor; }
[data-style] .nav { gap: 2px; }
[data-style] .nav a, [data-style] .nav button.navlink { min-height: calc(2.5rem + 6px); border-radius: 14px; color: var(--ink-2); font: 500 var(--fs-label)/1.25 var(--text); }
[data-style] .nav a .i { color: var(--ctl-icon); }
[data-style] .nav a:hover { background: var(--soft); color: var(--ink); }
[data-style] .nav a[aria-current="page"] { background: var(--ctl-tint); box-shadow: inset 0 0 0 1.5px var(--ctl-ring); color: var(--ink); font-weight: 700; }
[data-style] .nav .count, [data-style] .nav .quiet { color: var(--muted); font-size: var(--fs-meta); }
[data-style] .side-sep { background: var(--line); }
[data-style] .badge { background: var(--primary-fill); color: var(--on-primary); border-radius: 999px; font-weight: 700; }
[data-style] .storage { color: var(--muted); font-size: var(--fs-meta); }
[data-style] .storage b { color: var(--ink-2); }

/* The category tree. */
[data-style] .tree-filter input { height: calc(2rem + 6px); border: 1px solid var(--field-line); border-radius: 999px; background: var(--ctl-fill); }
[data-style] .tree-filter .i { color: var(--ctl-icon); }
[data-style] .trow { border-radius: 12px; }
[data-style] .trow:hover { background: var(--soft); }
[data-style] .trow.current { background: var(--ctl-tint); box-shadow: inset 0 0 0 1.5px var(--ctl-ring); }
[data-style] .trow.drop-target { background: var(--ctl-tint); box-shadow: inset 0 0 0 2px var(--ctl-ring); }

/* The page and its head. */
[data-style] .main { background: transparent; }
[data-style] .pagehead { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
[data-style] .pagehead .lede { color: var(--muted); font-size: var(--fs-body); }
[data-style] .crumbs a { color: var(--ink-2); }
[data-style] .crumbs a:hover { background: var(--soft); }
[data-style] .filterbar { background: transparent; }
[data-style] .details { background: var(--card-fill); box-shadow: 0 0 0 1px var(--line); border-top: 2px solid var(--rule); }

/* ---------- small controls (app-controls spec) ---------- */
/* Segment: a track with a fine edge; chosen = surface + ring, 700. */
[data-style] .seg { padding: 4px; gap: 4px; border: 1px solid var(--ctl-edge); border-radius: 24px; background: var(--ctl-track); overflow: visible; flex-wrap: wrap; }
[data-style] .seg button, [data-style] .seg a, [data-style] .seg .segopt { height: auto; min-height: calc(2.25rem + 4px); padding: 0 16px; border: 1.5px solid transparent; border-radius: 999px; color: var(--ink-2); font: 500 var(--fs-label)/1.2 var(--text); }
[data-style] .seg button + button, [data-style] .seg a + a, [data-style] .seg .segopt + .segopt { border-left: 1.5px solid transparent; }
[data-style] .seg button:hover, [data-style] .seg a:hover, [data-style] .seg .segopt:hover { background: var(--soft); }
[data-style] .seg button[aria-pressed="true"], [data-style] .seg button[aria-checked="true"], [data-style] .seg a[aria-current="true"], [data-style] .seg .segopt:has(input:checked) {
  background: var(--ctl-fill); border-color: var(--ctl-ring); color: var(--ink); font-weight: 700; }
:root[data-style][data-theme="light"] .seg button[aria-pressed="true"], :root[data-style][data-theme="light"] .seg button[aria-checked="true"] { box-shadow: 0 1px 3px rgba(0,0,0,.18); }
/* Chips: control pills; chosen = tint + ring, 700, the × in a disc. */
[data-style] .chip { height: auto; min-height: calc(2.25rem + 2px); padding: 0 14px; border: 1px solid var(--ctl-edge); border-radius: 999px; background: var(--ctl-fill); color: var(--ink); font: 500 var(--fs-label)/1.2 var(--text); }
[data-style] .chip .i { color: var(--ctl-icon); }
[data-style] .chip:hover { background: var(--ctl-pressed); }
[data-style] .chip.on { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }
[data-style] .chip .x { width: 28px; height: 28px; background: var(--ctl-fill); box-shadow: inset 0 0 0 1px var(--ctl-edge); }
[data-style] .chip .x:hover { background: var(--ctl-pressed); }
/* The decades above the files: chips; the chosen one tint + ring, not a gold block (gold is for the one main action). */
[data-style] .decadebar a { background: var(--ctl-fill); border: 1px solid var(--ctl-edge); border-radius: 14px; color: var(--ink); }
[data-style] .decadebar a:hover { background: var(--ctl-pressed); }
[data-style] .decadebar a[aria-current="true"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); color: var(--ink); }
[data-style] .decadebar a[aria-current="true"] .num { color: var(--ink-2); opacity: 1; }
[data-style] .tabs { border-bottom-color: var(--line); }
[data-style] .tabs a { color: var(--ink-2); font: 600 var(--fs-label)/1.2 var(--text); }
[data-style] .tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); }
[data-style] .pill { background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink-2); font: 600 var(--fs-meta)/1 var(--text); height: auto; min-height: 28px; }
[data-style] .pill.accent, [data-style] .pill.role-manager { background: var(--ctl-tint); }
[data-style] .pill.role-administrator { background: var(--ink); color: var(--bg); }

/* ---------- surfaces ---------- */
[data-style] .panel, [data-style] .fieldset, [data-style] .kpi { background: var(--card-fill); border-color: var(--line); border-radius: 16px; }
[data-style] .kpi:hover { background: var(--soft), var(--card-fill); }
[data-style] .tile { background: var(--card-fill); border: 1px solid var(--line); border-radius: 14px; }
[data-style] .tile:hover { background: var(--soft); }
[data-style] .tile .ico { background: var(--surface-2); color: var(--accent); box-shadow: 0 0 0 1px var(--line); border-radius: 10px; }
[data-style] .tile .ico img { filter: var(--photo); transition: filter .3s; }
[data-style] .tile:hover .ico img { filter: none; }
[data-style] .tile .t b { font-size: var(--fs-label); }
[data-style] .tile .t span { font-size: var(--fs-meta); }
[data-style] .tile.drop-target { border-color: var(--ctl-ring); background: var(--ctl-tint); }
[data-style] .tile.folder.unfilled { background: transparent; border: 1px dashed var(--line-strong); }

/* File tiles: 4:3, radius 12, a fine edge, the caption under; sepia in Heritage, full colour under the mouse. */
[data-style] .card { background: transparent; border: 1px solid transparent; border-radius: 16px; }
[data-style] .card:hover { background: var(--soft); }
[data-style] .card.selected { background: var(--ctl-tint); border-color: var(--ctl-ring); box-shadow: inset 0 0 0 1px var(--ctl-ring); }
[data-style] .thumb { margin: 6px 6px 0; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
[data-style] .thumb > img, [data-style] .thumb picture img, [data-style] .strip img, [data-style] .table .namecell img, [data-style] .details .preview img { filter: var(--photo); transition: filter .3s; }
[data-style] .card:hover .thumb > img, [data-style] .card:hover .thumb picture img, [data-style] .card .open:focus-visible .thumb img,
[data-style] .strip a:hover img, [data-style] .strip a:focus-visible img, [data-style] .table tr:hover .namecell img, [data-style] .details .preview:hover img { filter: none; }
[data-style] .thumb.processing > img { filter: blur(6px) saturate(.4); }
[data-style] .card .cap { font: 600 var(--fs-label)/1.3 var(--text); }
[data-style] .card .sub { color: var(--muted); font-size: var(--fs-meta); }
[data-style] .card .check, [data-style] .row-check { border-radius: 50%; width: 28px; height: 28px; background: var(--ctl-fill); box-shadow: inset 0 0 0 1px var(--ctl-edge); }
[data-style] .card .check input, [data-style] .row-check input, [data-style] .table input[type="checkbox"] { accent-color: var(--primary); }
[data-style] .card .more { background: var(--ctl-fill); color: var(--ctl-icon); box-shadow: inset 0 0 0 1px var(--ctl-edge); }
[data-style] .selbar { background: var(--surface-2); border-top: 2px solid var(--rule); border-radius: 20px; box-shadow: var(--shadow-2); }

/* Facts lists: the labels' column in em, so it grows with the text (today's phone rule is 110 px, too narrow at Larger). */
[data-style] dl.props, [data-style] dl.props.wide, [data-style] .vinfo dl.props.wide { grid-template-columns: minmax(6em, max-content) minmax(0, 1fr); font-size: var(--fs-meta); }
[data-style] dl.props dt { overflow-wrap: anywhere; }

/* Rows and tables: rows in a box, hover --soft, chosen --ctl-tint. */
[data-style] .table th { background: transparent; color: var(--accent); font: 600 var(--fs-over)/1.3 var(--text); letter-spacing: .12em; text-transform: uppercase; }
[data-style] .table td { border-bottom-color: var(--line); }
[data-style] .table tbody tr:hover { background: var(--soft); }
[data-style] .table tbody tr.selected { background: var(--ctl-tint); }
[data-style] .table .namecell img, [data-style] .table .namecell .mini { border-radius: 8px; }

/* Callouts: the soft fills, words in ink, the icon in its colour. Toasts: surface-2 with a fine edge. */
[data-style] .callout { background: var(--surface-2); color: var(--ink); border-radius: 14px; font-size: var(--fs-body); }
[data-style] .callout.info .i { color: var(--accent); }
[data-style] .toast, :root[data-style]:not([data-x]) .toast { background: var(--surface-2); color: var(--ink); border: 1px solid var(--ctl-edge); border-radius: 16px; box-shadow: var(--shadow-2); }
[data-style] .toast .i, :root[data-style]:not([data-x]) .toast .i { color: var(--ok); }
[data-style] .toast button, :root[data-style]:not([data-x]) .toast button { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
[data-style] .toast button:hover { background: var(--soft); }
[data-style] .toast .toast-x { color: var(--ink-2); text-decoration: none; }

/* Fields: --ctl-fill, an edge that reaches 3:1, radius 14; the focus ring and edge in --focus. */
[data-style] .field > label, [data-style] .field > .label { font: 600 var(--fs-label)/1.3 var(--text); }
[data-style] .input, [data-style] .select, [data-style] .textarea { min-height: calc(2.5rem + 8px); border: 1px solid var(--field-line); border-radius: 14px; background: var(--ctl-fill); font-size: var(--fs-body); }
[data-style] .input:hover, [data-style] .select:hover, [data-style] .textarea:hover { border-color: var(--line-strong); }
[data-style] .input:focus, [data-style] .select:focus, [data-style] .textarea:focus { border-color: var(--focus); box-shadow: none; outline: 2px solid var(--focus); outline-offset: 3px; }
[data-style] .input[readonly], [data-style] .input:disabled, [data-style] .select:disabled, [data-style] .textarea:disabled { background: var(--surface-2); color: var(--muted); }
/* Switches: track --ctl-track with the edge; on = --primary, knob --on-primary. */
[data-style] .switch input[type="checkbox"] { background: var(--ctl-track); box-shadow: inset 0 0 0 1px var(--field-line); }
[data-style] .switch input[type="checkbox"]::after { background: var(--ink-2); box-shadow: none; }
[data-style] .switch input[type="checkbox"]:checked { background: var(--primary); box-shadow: none; }
[data-style] .switch input[type="checkbox"]:checked::after { background: var(--on-primary); }
[data-style] .switch input[type="checkbox"]:focus-visible { outline-offset: 3px; }

/* Menus and sheets: surface, a fine edge that stays on dark, radius 20. */
[data-style] .menu { background: var(--surface); border: 1px solid var(--ctl-edge); border-radius: 20px; box-shadow: var(--shadow-2); padding: 8px; }
[data-style] .menu [role="menuitem"], [data-style] .menu [role="menuitemradio"], [data-style] .menu [role="menuitemcheckbox"] { min-height: calc(2.5rem + 4px); border-radius: 12px; font: 500 var(--fs-label)/1.25 var(--text); color: var(--ink); }
[data-style] .menu [role="menuitem"]:hover, [data-style] .menu [role="menuitem"]:focus, [data-style] .menu [role="menuitemradio"]:hover, [data-style] .menu [role="menuitemradio"]:focus { background: var(--soft); }
[data-style] .menu [role="menuitem"] .i { color: var(--ctl-icon); }
[data-style] .menu [role="menuitem"].danger, [data-style] .menu [role="menuitem"].danger .i { color: var(--danger); }
[data-style] .menu [role="separator"] { background: var(--line); }
[data-style] .menu .mhead { color: var(--muted); font-size: var(--fs-meta); }
[data-style] .menu .mhead b { font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); }
/* The account menu's three settings as segments (spec §3: Style, Light or dark, Text size). */
[data-style] #account-menu { width: calc(340px * min(var(--k), 1.3)); max-width: calc(100vw - 24px); }
[data-style] .menu .mseg { padding: 2px 4px 8px; }
[data-style] .menu .mseg .mlabel { padding: 8px 8px 6px; }
[data-style] .menu .mseg-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ctl-track); border: 1px solid var(--ctl-edge); }
[data-style] .menu .mseg-row [role="menuitemradio"] { flex: 1 1 auto; justify-content: center; width: auto; min-height: calc(2.25rem + 4px); padding: 0 12px; border-radius: 999px; border: 1.5px solid transparent; color: var(--ink-2); font-weight: 500; }
[data-style] .menu .mseg-row [role="menuitemradio"][aria-checked="true"] { background: var(--ctl-fill); border-color: var(--ctl-ring); color: var(--ink); font-weight: 700; }
[data-style] .menu .mseg-row [role="menuitemradio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .sheet, [data-style] .addsheet { background: var(--surface); color: var(--ink); }
[data-style] .addsheet { border-top: 1px solid var(--ctl-edge); border-radius: 28px 28px 0 0; }
[data-style] .sheet .grp, [data-style] .sheet .row { border-color: var(--line); }
[data-style] .sheet .grp-h { font: 600 var(--fs-over)/1.3 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
[data-style] .sheet .row .i, [data-style] .sheet .go { color: var(--ctl-icon); }
[data-style] .tiles2 .tile .i { color: var(--accent); }
[data-style] .scrim, [data-style] .sheet-scrim { background: var(--scrim); }
[data-style] .empty .art { background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); }

/* The phone bar: the app's tab bar, + as the raised gold disc. */
[data-style] .bottomnav { background: color-mix(in srgb, var(--bg-2) 96%, transparent); border-top: 1px solid var(--line); }
[data-style] .bottomnav a, [data-style] .bottomnav button { color: var(--ink-2); font-family: var(--text); }
[data-style] .bottomnav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
[data-style] .bottomnav .fab { background: var(--primary-fill); color: var(--on-primary); border: 1px solid var(--primary-edge); box-shadow: 0 8px 20px -10px rgba(214,180,124,.55); }
[data-style] .bottomnav .bn-badge { background: var(--primary-fill); color: var(--on-primary); }

/* ---------- one file ---------- */
/* The stage stays near-black in every style and scheme; the photo is never toned. The pane gets the gold top edge. */
[data-style] .viewer { background: var(--viewer); }
[data-style] .vinfo { background: var(--card-fill); border-top: 2px solid var(--rule); }
[data-style] .viewer .vbar .btn, [data-style] .viewer .vbar .iconbtn { background: rgba(34,26,21,.7); border: 1px solid rgba(214,180,124,.55); color: #F3E9DC; }
[data-style] .viewer .vbar .btn .i, [data-style] .viewer .vbar .iconbtn .i { color: #D6B47C; }
[data-style] .viewer .vbar .btn.primary { background: linear-gradient(180deg, #E2C28E 0%, #D6B47C 55%, #B98F55 100%); color: #1E150E; border-color: transparent; }
[data-style] .viewer .vbar .btn.primary .i { color: currentColor; }
[data-style] .viewer :focus-visible { outline-color: #D6B47C; }
[data-style] .vinfo .strip img { filter: var(--photo); }
[data-style] .filmstrip a[aria-current="true"] { border-color: transparent; outline: 2px solid #D6B47C; outline-offset: 2px; overflow: visible; }
[data-style] .filmstrip a[aria-current="true"] img { border-radius: 4px; }
[data-style] .filmstrip { padding-top: 10px; padding-bottom: 10px; }

/* ---------- My account › How the archive looks ---------- */
[data-style] .me-look-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
[data-style] .me-look-row .lbl, [data-style] .text-size-row .lbl { font: 600 var(--fs-label)/1.3 var(--text); min-width: 9em; }
[data-style] .style-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(200px * var(--k)), 1fr)); gap: 12px; flex: 1 1 420px; }
[data-style] .style-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px 14px; border-radius: 16px; border: 1px solid var(--ctl-edge); background: var(--ctl-fill); color: var(--ink); font: 400 var(--fs-meta)/1.35 var(--text); }
[data-style] .style-card:hover { background: var(--ctl-pressed); }
[data-style] .style-card[aria-pressed="true"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); }
[data-style] .style-card b { font-size: var(--fs-label); font-weight: 700; }
[data-style] .style-card > span:not(.style-pic) { color: var(--muted); }
/* The little pictures: each style's own colours, whatever the page's. */
[data-style] .style-pic { display: flex; gap: 6px; align-items: flex-end; width: 100%; height: 64px; padding: 10px; margin-bottom: 6px; border-radius: 10px; }
[data-style] .style-pic i { display: block; border-radius: 999px; }
[data-style] .style-card.heritage .style-pic { background: radial-gradient(120% 90% at 50% -10%, #2A1F17 0%, #15100D 60%); border: 1px solid rgba(214,180,124,.28); }
[data-style] .style-card.heritage .style-pic i:nth-child(1) { width: 56%; height: 14px; background: #F3E9DC; }
[data-style] .style-card.heritage .style-pic i:nth-child(2) { width: 22%; height: 22px; background: linear-gradient(180deg, #E2C28E, #B98F55); }
[data-style] .style-card.heritage .style-pic i:nth-child(3) { width: 14%; height: 10px; background: rgba(214,180,124,.5); }
[data-style] .style-card.classic .style-pic { background: #F4F1EA; border: 1px solid #D8D2C4; }
[data-style] .style-card.classic .style-pic i:nth-child(1) { width: 56%; height: 14px; background: #12252E; }
[data-style] .style-card.classic .style-pic i:nth-child(2) { width: 22%; height: 22px; background: #12252E; border-radius: 8px; }
[data-style] .style-card.classic .style-pic i:nth-child(3) { width: 14%; height: 10px; background: #C9A96E; }

/* ---------- print: black on white, no sepia, no column or bars, the serif kept (spec §8) ---------- */
@media print {
  [data-style] body { background: #fff !important; color: #000 !important; }
  [data-style] img { filter: none !important; }
  [data-style] .sidebar, [data-style] .topbar, [data-style] .bottomnav, [data-style] .selbar, [data-style] .toasts, [data-style] .skip { display: none !important; }
  [data-style] .panel, [data-style] .fieldset, [data-style] .kpi, [data-style] .tile, [data-style] .card, [data-style] .details, [data-style] .vinfo { background: #fff !important; border-color: #999 !important; box-shadow: none !important; }
  [data-style] a { color: #000 !important; }
}
@media (prefers-reduced-motion: reduce) { [data-style] * { transition: none !important; } }

/* ---------- the frame, C · Hybrid (spec §4, W2) ---------- */
/* The left column runs the full height; the top row (search, Help, the account) sits over the page and its pane. */
[data-style] .app { grid-template-columns: var(--rail) minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
[data-style] .rail { grid-column: 1; grid-row: 1 / span 2; gap: 6px; padding: 24px 18px 32px; }
[data-style] .app > .topbar { grid-column: 2 / -1; grid-row: 1; border-bottom: 0; padding: 22px max(32px, env(safe-area-inset-right)) 0 32px; gap: 16px; }
[data-style] .app > .topbar .search { max-width: 560px; }
[data-style] .top-actions { gap: 12px; }
[data-style] .main { --main-pad: 12px; padding-top: var(--main-pad); }

/* The family's name: Heritage the sprig, the name in display and the tag; Classic the logo or the wordmark. */
[data-style] .rail-brand { width: auto; display: block; padding: 4px 10px 18px; border-radius: 14px; }
[data-style] .rail-brand .brand-heritage { display: flex; align-items: center; gap: 12px; }
[data-style] .rail-brand .sprig { width: 32px; height: 32px; color: var(--primary); stroke-width: 1.4; }
[data-style] .rail-brand .name { display: block; font: var(--title-w) var(--fs-brand)/1.15 var(--display); }
[data-style] .rail-brand .tag { display: block; margin-top: 4px; font: 600 var(--fs-tag)/1.2 var(--text); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
[data-style] .rail-brand .brand-classic { display: none; }
[data-style="classic"] .rail-brand .brand-heritage { display: none; }
[data-style="classic"] .rail-brand .brand-classic { display: block; }
[data-style="classic"] .rail-brand .name { font: 400 calc(26px * var(--kt))/1.15 "Tinos", Georgia, serif; color: var(--ink); }
[data-style="classic"][data-brand="mulryan"] .rail-brand .name { font: 700 calc(24px * var(--kt))/1.15 "Montserrat", system-ui, sans-serif; letter-spacing: -.02em; }
[data-style] .rail-brand img { height: 36px; max-width: 100%; }

/* Add: the column's one gold button, as wide as its words. */
[data-style] .rail .newbtn { margin: 0 6px 14px; align-self: flex-start; }
/* Library's list: indented with a dotted rule on the left, while on a Library page. */
[data-style] .nav-sub { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 30px; padding: 0 0 0 14px; border-left: 1px dotted var(--line-strong); }
[data-style] .nav-sub a { display: block; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: var(--fs-meta); }
[data-style] .nav-sub a:hover { background: var(--soft); color: var(--ink); }
[data-style] .nav-sub a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--ctl-tint); }
@media (min-width: 861px) {
  [data-style] .nav-sub-tree { margin: -4px 0 6px 30px; padding-left: 14px; border-left: 1px dotted var(--line-strong); }
}
[data-style] .rail .storage { margin-top: auto; padding: 24px 14px 0; }

/* A small round control (the phone's Search). */
[data-style] .ctl.round { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ctl-icon); }
[data-style] .ctl.round:hover { background: var(--ctl-pressed); }

/* Phones and narrow windows: the app's top bar (account · name · Search) and tab bar; the column is the Categories drawer. */
@media (max-width: 860px) {
  [data-style] .hide-phone { display: none !important; }
  [data-style] .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  [data-style] .app > .topbar { grid-column: 1; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; padding: 10px 16px 8px; }
  [data-style] .app > .topbar .search { grid-column: 1 / -1; }
  [data-style] .brand-phone { justify-self: center; width: auto; text-align: center; padding: 4px 8px; }
  [data-style] .brand-phone .name { font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); }
  [data-style="classic"] .brand-phone .name { font: 400 calc(21px * var(--kt))/1.2 "Tinos", Georgia, serif; }
  [data-style="classic"][data-brand="mulryan"] .brand-phone .name { font: 700 calc(19px * var(--kt))/1.2 "Montserrat", system-ui, sans-serif; }
  [data-style] .topbar .avatarbtn { position: relative; justify-self: start; }
  [data-style] .topbar .avatarbtn .bn-badge { position: absolute; top: -4px; right: -6px; }
  [data-style] .topbar .ctl.round { justify-self: end; }
  [data-style] .rail { grid-row: auto; padding: 16px 12px 32px; background: var(--bg); border-right: 0; }
  [data-style] .bottomnav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(72px + env(safe-area-inset-bottom)); }
  [data-style] .bottomnav a, [data-style] .bottomnav button { font: 500 min(.875rem, 16px)/1.2 var(--text); color: var(--ink-2); }
  [data-style] .bottomnav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  [data-style] .bottomnav .fab { width: 60px; height: 60px; border-radius: 50%; margin-top: -30px; }
}
[data-style] .bn-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary-fill); color: var(--on-primary); font: 700 .75rem/1 var(--text); }
/* The "You" sheet's head: the person, as the app's. */
[data-style] .you-head { display: flex; align-items: center; gap: 14px; padding: 4px 4px 16px; }
[data-style] .you-head .avatar { width: 52px; height: 52px; font-size: 20px; }
[data-style] .you-head b { display: block; font: var(--title-w) calc(24px * var(--kt))/1.2 var(--display); }
/* Library's list sits inside the places list: its rows are lighter than a place (no ring, its own height). */
[data-style] .nav .nav-sub a { display: block; min-height: 0; padding: 7px 10px; border-radius: 10px; font: 400 var(--fs-meta)/1.3 var(--text); }
[data-style] .nav .nav-sub a[aria-current="page"] { box-shadow: none; font-weight: 700; }

/* One "you are here" (web-design, W2 review): the exact item has the ring and tint; its place (Library) shows open. */
[data-style] .nav a.open { color: var(--ink); font-weight: 700; }
/* The name block: the sprig on the first line; a long name a size smaller. */
[data-style] .rail-brand .brand-heritage { align-items: flex-start; }
[data-style] .rail-brand .sprig { margin-top: 2px; }
[data-style] .rail-brand .name.long { font-size: calc(24px * var(--kt)); }
/* Library's views and its categories as one list under one dotted rule, a small gap between them. */
@media (min-width: 861px) {
  [data-style] .nav .nav-sub { margin-bottom: 0; padding-bottom: 10px; }
  [data-style] .nav-sub-tree { margin-top: -6px; padding-top: 0; }
}
/* Between the phone and the wide page (861–1180 px): the category's pane goes under the files, never over them
   (web-design, W2 review; W4 makes the pane open on demand). */
@media (min-width: 861px) and (max-width: 1180px) {
  [data-style] .app { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  [data-style] .app > .details { position: static; grid-column: 2; grid-row: 3; width: auto; max-height: 38vh; margin: 0 32px 16px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
}

/* ---------- Home (spec §5.1, canvas Main, W3) ---------- */
[data-style] .home { max-width: 1240px; padding: 12px 32px 64px; }
[data-style] .home-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 32px; }
[data-style] .home-head .lede { margin-top: 6px; color: var(--muted); font-size: var(--fs-body); }
[data-style] .over { font: 600 var(--fs-over)/1.3 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
[data-style="classic"] .over { font-weight: 700; letter-spacing: .08em; }
/* Display text in Cormorant: never in a clipping box (Safari on iPhone, spec §10). */
[data-style] .hero-t { font: var(--title-w) var(--fs-hero)/var(--title-lh) var(--display); letter-spacing: var(--title-ls); text-wrap: balance; }
[data-style] .card-t { display: block; font: var(--title-w) var(--fs-card)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .meta { color: var(--muted); font-size: var(--fs-meta); }
[data-style] .home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
[data-style] .sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
[data-style] .sec-h h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); }
@container (max-width: 980px) { [data-style] .home-grid { grid-template-columns: minmax(0, 1fr); } }
[data-style] .main { container-type: inline-size; }

/* Cards with a gold ring (event icons). */
[data-style] .home-card { display: flex; gap: 16px; padding: 22px; text-decoration: none; color: var(--ink); }
[data-style] a.home-card:hover { background: var(--soft), var(--card-fill); }
[data-style] .home-card-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
[data-style] .home-welcome .btn { margin-top: 10px; }
[data-style] .ring { display: grid; place-items: center; width: calc(52px * var(--k)); height: calc(52px * var(--k)); border-radius: 50%; border: 1.5px solid var(--primary); color: var(--accent); background: var(--bg); box-shadow: var(--ring-glow); flex: none; }
[data-style] .ring.sm { width: calc(40px * var(--k)); height: calc(40px * var(--k)); }
[data-style] .btn.big { min-height: 3.5rem; padding: 0 28px; }

/* Doors: a photo with the shade, the title in display on the photo (fixed light words, ≥ 5.7:1 over white). */
[data-style] .door { position: relative; display: block; min-height: calc(180px * var(--k)); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #120C09; color: #FBF4E8; text-decoration: none; }
[data-style] .door picture, [data-style] .door picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-style] .door picture img { filter: var(--photo); transition: filter .3s; }
[data-style] .door:hover picture img, [data-style] .door:focus-visible picture img { filter: none; }
[data-style] .door .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,9,6,.88) 0%, rgba(14,9,6,.55) 45%, rgba(14,9,6,.05) 100%); }
[data-style] .door .shade.up { background: linear-gradient(0deg, rgba(14,9,6,.9) 0%, rgba(14,9,6,.45) 45%, rgba(14,9,6,.05) 100%); }
[data-style] .door .in { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: inherit; height: 100%; padding: 22px 24px; }
[data-style] .door .card-t { color: #FBF4E8; }
[data-style] .door .meta { color: rgba(251,244,232,.86); }
[data-style] .door .over { color: #E2C28E; }
[data-style] .door .ring { background: rgba(14,9,6,.6); color: #E2C28E; border-color: #D6B47C; }
[data-style] .door .go { position: absolute; right: 18px; bottom: 18px; color: #E2C28E; }
[data-style] .door:focus-visible { outline-offset: 3px; }

/* Through the decades: a sideways row (the one row that may scroll sideways, spec §7). */
[data-style] .decades { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 8px; scroll-snap-type: x proximity; }
[data-style] .dec { flex: none; display: flex; flex-direction: column; gap: 6px; width: calc(150px * var(--k)); text-decoration: none; color: var(--ink); scroll-snap-align: start; }
[data-style] .dec .pic { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
[data-style] .dec .pic img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); transition: filter .3s; }
[data-style] .dec:hover .pic img, [data-style] .dec:focus-visible .pic img { filter: none; }
[data-style] .dec b { font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); }

@media (max-width: 860px) {
  [data-style] .home { padding: 12px 16px 28px; }
  [data-style] .hero-t { font-size: calc(38px * var(--kt)); }
}
/* Home's cards are not file tiles: their own fill and edge, the ring beside the words (web-design, W3 review). */
[data-style] .home-card { flex-direction: row; align-items: flex-start; background: var(--card-fill); border: 1px solid var(--line); border-radius: 16px; }
[data-style] a.home-card:hover { background: var(--card-fill); border-color: var(--line-strong); }
/* A place without a picture is a light card, not a dark slab (web-design, W3 review). */
[data-style] .door.bare { background: var(--card-fill); color: var(--ink); }
[data-style] .door.bare .shade { display: none; }
[data-style] .door.bare .card-t { color: var(--ink); }
[data-style] .door.bare .meta { color: var(--muted); }
[data-style] .door.bare .ring { background: var(--bg); color: var(--accent); border-color: var(--primary); }
[data-style] .home-card .meta { padding: 0; display: block; } /* not the file tile's caption box */

/* ---------- Library and a category (spec §5.3, W4) ---------- */
/* The page head: Back and one action on a row, the "In:" line, the overline, the title, the lede (§4.3). */
[data-style] .phead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
[data-style] .backlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); font: 500 var(--fs-label)/1.2 var(--text); text-decoration: none; }
[data-style] .backlink:hover { background: var(--ctl-pressed); }
[data-style] .backlink .i { color: var(--ctl-icon); }
[data-style] .ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); font: 500 var(--fs-label)/1.2 var(--text); text-decoration: none; cursor: pointer; }
[data-style] .ctl:hover { background: var(--ctl-pressed); }
[data-style] .ctl .i { color: var(--ctl-icon); }
[data-style] .ctl[aria-expanded="true"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }
[data-style] .crumb-line { margin: 0 0 4px; }
[data-style] .pagehead .over { margin-bottom: 4px; }
[data-style] .pagehead .lede { margin-top: 6px; }

/* The Details pane: on demand, closed until asked for (below 1180 px too). */
[data-style] .app:not(.details-open) > .details { display: none; }

/* Library's chips; its categories as doors; a category's Inside rows. */
[data-style] .lib-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
[data-style] .cat-doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(240px * var(--k)), 1fr)); gap: 16px; margin-bottom: 8px; }
[data-style] .cat-door { min-height: calc(150px * var(--k)); }
[data-style] .cat-door.drop-target { outline: 3px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card-fill); overflow: hidden; margin-bottom: 8px; }
[data-style] .rowl { display: flex; align-items: center; gap: 16px; min-height: calc(72px * var(--k)); padding: 10px 18px 10px 12px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
[data-style] .rowl:first-child { border-top: 0; }
[data-style] .rowl:hover { background: var(--soft); }
[data-style] .rowl:focus-visible { outline-offset: -3px; }
[data-style] .rowl.drop-target { background: var(--ctl-tint); box-shadow: inset 0 0 0 2px var(--ctl-ring); }
[data-style] .rowl .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
[data-style] .rowl b { font: 600 var(--fs-label)/1.3 var(--text); }
[data-style] .rowl .go { color: var(--ctl-icon); }
[data-style] .rthumb { flex: none; display: grid; place-items: center; width: calc(64px * var(--k)); height: calc(64px * var(--k)); border-radius: 12px; overflow: hidden; background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); }
[data-style] .rthumb picture, [data-style] .rthumb img { width: 100%; height: 100%; object-fit: cover; }
[data-style] .rthumb img { filter: var(--photo); transition: filter .3s; }
[data-style] .rowl:hover .rthumb img { filter: none; }

/* ---------- one file (spec §5.4, W4) ---------- */
/* The pane: overline (kind · year), the title in display 38 × kt, the facts; the stage keeps its fixed viewer pills. */
[data-style] .vinfo h2 { font: var(--title-w) calc(38px * var(--kt))/var(--title-lh) var(--display); letter-spacing: var(--title-ls); }
[data-style] .vinfo .over { margin-bottom: 4px; }
[data-style] .viewer .pos { color: #F3E9DC; font: 500 var(--fs-meta)/1 var(--text); }
/* With a Back row, the titles take the whole width (Back left, the action right); the view tools go under them. */
[data-style] .pagehead:has(.phead-row) .titles { flex-basis: 100%; }
[data-style] .details-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Phones (W4 review): one tools row, one filter row that scrolls sideways with a fade, the decades under it; photos on the first screen. */
@media (max-width: 860px) {
  [data-style] .pagehead { padding-bottom: 4px; }
  [data-style] .pagehead .viewtools { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
  [data-style] .pagehead .viewtools .btn { min-height: 44px; padding: 0 10px; }
  [data-style] .pagehead .viewtools .seg { margin-left: auto; padding: 2px; }
  [data-style] .pagehead .viewtools .seg .btn { min-height: 40px; padding: 0 10px; }
  [data-style] .sort-word { display: none; }
  [data-style] .filterbar { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-right: 32px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  [data-style] .filterbar > * { flex: none; scroll-snap-align: start; }
  [data-style] .decadebar { flex-wrap: nowrap; margin-bottom: 12px; }
  [data-style] .page { padding-top: 8px; }
}
@media (max-width: 860px) {
  [data-style] .pagehead h1 { font-size: calc(36px * var(--kt)); }
  [data-style] .phead-row { margin-bottom: 6px; }
  [data-style] .pagehead .lede { margin-top: 2px; }
  [data-style] .decadebar a { min-height: 44px; padding: 4px 10px; }
  [data-style] .section { margin-top: 8px; }
}

/* ---------- the Timeline (spec §5.2, W5) ---------- */
[data-style] .phead-end { justify-content: flex-end; }
[data-style] .tl-seg { margin-bottom: 24px; }
[data-style] .tl-decades { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(220px * var(--k)), 1fr)); gap: 16px; }
[data-style] .tl-decade { min-height: calc(200px * var(--k)); }
/* The dotted gold timeline: the year in display, a ring node on a dotted line, a card. */
[data-style] .tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: calc(84px * var(--k)) calc(52px * var(--k)) minmax(0, 1fr); column-gap: 18px; row-gap: 18px; max-width: 880px; }
[data-style] .tl-row { display: contents; }
[data-style] .tl-yr { text-align: right; padding-top: 8px; font: var(--title-w) calc(24px * var(--kt))/1.2 var(--display); color: var(--ink); }
[data-style] .tl-node { position: relative; display: flex; justify-content: center; }
[data-style] .tl-node::after { content: ""; position: absolute; top: calc(44px * var(--k)); bottom: -24px; left: 50%; border-left: 2px dotted color-mix(in srgb, var(--primary) 55%, transparent); }
[data-style] .tl-node.last::after { display: none; }
[data-style] .tl-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--card-fill); border: 1px solid var(--line); border-radius: 16px; }
[data-style] a.tl-card:hover { border-color: var(--line-strong); }
[data-style] .tl-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
[data-style] .tl-thumbs .pic { display: block; width: calc(108px * var(--k)); aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
[data-style] .tl-thumbs img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); transition: filter .3s; }
[data-style] .tl-card:hover .tl-thumbs img { filter: none; }
[data-style] .tl-card .meta { padding: 0; }
[data-style] .tl-more { margin-top: 24px; }
@media (max-width: 860px) {
  [data-style] .tl { grid-template-columns: calc(56px * var(--k)) calc(40px * var(--k)) minmax(0, 1fr); column-gap: 10px; }
  [data-style] .tl-yr { font-size: calc(20px * var(--kt)); }
  [data-style] .tl-thumbs .pic { width: calc(72px * var(--k)); }
}
/* Lining figures for years and counts (tokens: font.numbers); a `font:` shorthand resets them, so they are set last. */
[data-style] .num, [data-style] h1.num, [data-style] .tl-yr, [data-style] .dec b, [data-style] .card-t.num { font-variant-numeric: lining-nums tabular-nums; }
/* The Whole tree's cards (W6): measured on the server in the style's faces (CardSizes heritage | classic, the app's
   tables): Heritage Crimson Pro 600 / 400, Classic Figtree 600 / 400, tabular figures. */
[data-style] .gn-box .gn-pn b { font-family: var(--text); font-weight: 600; }
[data-style] .gn-box .gn-pn small { font-family: var(--text); font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }

/* The family tree on a phone (W6a review): one action and More in the head; the page never scrolls sideways, the map
   pans inside its own box; the view segment on one line (stacked at Larger). */
@media (max-width: 860px) {
  [data-style] .gn-actions > .btn:not(.primary):not(.gn-addperson) { display: none; } /* F6: Add a person (.gn-addperson, a plain pill) is the one action */
  [data-style] .gn-actions:not(:has(.btn.primary, .btn.gn-addperson)) > .btn[href^="/archive/genealogy/print"] { display: inline-flex; } /* the tree's one action without editing: Print */
  [data-style] .gn-actions:not(:has(.btn.primary, .btn.gn-addperson)) .menu a[href^="/archive/genealogy/print"] { display: none; }
  [data-style] .gn-treepage, [data-style] .gn-treebody, [data-style] .gn-stage { max-width: 100%; min-width: 0; }
  [data-style] .gn-mapwrap { max-width: 100%; overflow: auto; }
  [data-style] .gn-seg { display: flex; width: 100%; max-width: 100%; }
  [data-style] .gn-seg > a { flex: 1 1 auto; white-space: nowrap; justify-content: center; text-align: center; padding-left: 12px; padding-right: 12px; }
  :root[data-style][data-text="larger"] .gn-seg { flex-direction: column; border-radius: 22px; }
  [data-style] .gn-stage-top { flex-wrap: wrap; min-width: 0; }
  [data-style] .gn-stage-top > * { min-width: 0; max-width: 100%; }
}
[data-style] .gn-head-more { order: 2; } /* after the one action */

/* ---------- A life and a person (spec §5.2, §5.5, W6) ---------- */
/* A life: the year, the age under it; a card with the title, its line, the family event and the photos with them. */
[data-style] .tl-yr small { display: block; margin-top: 2px; font: 500 var(--fs-meta)/1.3 var(--text); color: var(--muted); }
[data-style] .tl-event { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); text-decoration: none; min-height: 44px; }
[data-style] .tl-event:hover { background: var(--ctl-pressed); }
[data-style] .tl-event .i { color: var(--ctl-icon); flex: none; }
[data-style] .tl-event > span { display: flex; flex-direction: column; min-width: 0; }
[data-style] .tl-event b { font: 600 var(--fs-label)/1.3 var(--text); }
[data-style] .tl-life .tl-thumbs a.pic:hover img, [data-style] .tl-life .tl-thumbs a.pic:focus-visible img { filter: none; }
[data-style] .tl-allphotos { color: var(--accent); }
/* Names: the view segment and the search row 16 px apart, as on Family (web-design, W6a review). */
[data-style] .gn-seg + .gn-tools { margin-top: 16px; }
/* A person (canvas Person): Back and one action; the mount (portrait, sepia in Heritage, or initials in display), the
   overline, the name, the lede; one gold "Show … close family" and the life on the Timeline; then Life | Family. */
[data-style] .pn-page { --pn-pad-l: 32px; max-width: 1240px; padding: 12px 32px 64px; }
[data-style] .pn-who { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; margin: 8px 0 40px; }
[data-style] .pn-mount { flex: none; display: grid; place-items: center; width: calc(132px * var(--k)); height: calc(132px * var(--k)); padding: 5px; border-radius: 50%; border: 1.5px solid var(--primary); box-shadow: var(--ring-glow); }
[data-style] .pn-mount .pn-face { display: block; width: 100%; height: 100%; border-radius: 50%; filter: var(--photo); transition: filter .3s; }
[data-style] .pn-mount:hover .pn-face { filter: none; }
[data-style] .pn-initials { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: var(--title-w) calc(46px * var(--kt))/1.2 var(--display); }
[data-style] .pn-t { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; }
[data-style] .pn-name { font: var(--title-w) var(--fs-title)/var(--title-lh) var(--display); letter-spacing: var(--title-ls); overflow-wrap: anywhere; }
[data-style] .pn-t .lede { color: var(--muted); font-size: var(--fs-body); }
[data-style] .pn-t .gn-forms { font: italic var(--fs-label)/1.35 var(--text); color: var(--muted); }
[data-style="classic"] .pn-t .gn-forms { font-style: normal; }
[data-style] .pn-t .gn-proofline { margin: 4px 0 0; }
[data-style] .pn-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; max-width: 100%; }
/* Never wider than the screen (390 at Larger): the buttons wrap their words. */
[data-style] .pn-acts .btn { max-width: 100%; height: auto; padding-block: 10px; white-space: normal; text-align: left; }
[data-style] .pn-also .btn { min-height: 44px; }
[data-style] .pn-also { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -14px; }
[data-style] .pn-also form { display: contents; }
/* Life on the left; Family, then Story and Memories, on the right; in one column Story → Life → Family (the DOM's order). */
[data-style] .pn-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "life fam" "life story"; grid-template-rows: auto 1fr; gap: 32px 40px; align-items: start; }
[data-style] .pn-story { grid-area: story; display: grid; gap: 24px; }
[data-style] .pn-story:empty { display: none; }
[data-style] .pn-lifecol { grid-area: life; min-width: 0; }
[data-style] .pn-famcol { grid-area: fam; min-width: 0; }
[data-style] .pn-story .gn-card { background: var(--card-fill); border-color: var(--line); border-radius: 16px; }
@container (max-width: 1100px) { [data-style] .pn-two { grid-template-columns: minmax(0, 1fr); grid-template-areas: "story" "life" "fam"; grid-template-rows: auto; } }
[data-style] .pn-sec { min-width: 0; }
[data-style] .pn-sec > h2, [data-style] .pn-sec .gn-card-head h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); margin-bottom: 16px; }
[data-style] .pn-sec .gn-card-head { margin-bottom: 0; }
[data-style] .pn-sec .gn-card-head .btn { margin-bottom: 16px; }
/* Life, record by record: the fact in display on its card, the date and place under it; records and links as today. */
[data-style] .pn-life .tl-card { gap: 8px; }
/* The year column takes its width from its words ("c. 1948" in Classic, Larger), never on two lines. */
[data-style] .tl-yr { white-space: nowrap; }
[data-style] .pn-life { grid-template-columns: minmax(calc(84px * var(--k)), max-content) calc(52px * var(--k)) minmax(0, 1fr); }
/* The card's overline (year · age) shows only where the year column goes, on a phone. */
[data-style] .tl-over { display: none; }
/* One rule for a card's actions (web-design M5/M6): the quiet link, left, lined up with the words, 8 px apart; a 44 px
   target with the space taken back from the line. Inside a record box Change stays on the right, as the same link. */
[data-style] .pn-life .gn-what .gn-note:has(.i) { white-space: normal; margin: 0; }
[data-style] .pn-life .gn-change-inline, [data-style] .pn-life .gn-add-record, [data-style] .pn-life .linkbtn, [data-style] .pn-life .gn-note:has(.i) > a, [data-style] .pn-life .gn-proof .gn-change {
  display: inline-flex; align-items: flex-start; gap: 6px; align-self: flex-start; min-height: 44px; margin: -10px 0; padding: 10px 0; border: 0; background: none; border-radius: 0;
  color: var(--accent); font: 600 var(--fs-label)/1.35 var(--text); text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
[data-style] .pn-life .gn-change-inline:hover, [data-style] .pn-life .gn-add-record:hover, [data-style] .pn-life .linkbtn:hover, [data-style] .pn-life .gn-note:has(.i) > a:hover, [data-style] .pn-life .gn-proof .gn-change:hover { text-decoration-thickness: 2px; background: none; }
[data-style] .pn-life .linkbtn .i, [data-style] .pn-life .gn-note:has(.i) > .i { flex: none; margin-top: .2em; color: var(--accent); }
[data-style] .pn-life .gn-note:has(.i) { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
[data-style] .pn-life .gn-proof .gn-change { margin-left: auto; }
[data-style] .pn-life .gn-what > b, [data-style] .pn-life .gn-what > b + a { font: var(--title-w) var(--fs-card)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .pn-life .gn-what .gn-when { display: block; color: var(--muted); font-size: var(--fs-meta); }
[data-style] .pn-life .gn-what { padding-bottom: 14px; }
[data-style] .pn-life .tl-yr.approx { font-style: italic; color: var(--ink-2); }
[data-style] .ring.check { border-style: dashed; }
/* Family: label-weight headings over rows; Married to on the tint; "Living" in --ink-2. */
[data-style] .pn-fam .gn-eyebrow { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; font: 600 var(--fs-label)/1.3 var(--text); letter-spacing: 0; text-transform: none; color: var(--ink); }
[data-style] .pn-fam > .gn-eyebrow:first-of-type, [data-style] .pn-fam > h2 + .gn-eyebrow { margin-top: 0; }
[data-style] .pn-fam .gn-records { font: 500 var(--fs-meta)/1.3 var(--text); color: var(--accent); }
[data-style] .pn-fam .gn-union { margin: 0; padding: 0; border: 0; }
[data-style] .pn-rel.on { background: var(--ctl-tint); }
[data-style] .pn-rel.on:hover { background: var(--ctl-pressed); }
[data-style] .pn-rel .meta.living { color: var(--ink-2); }
[data-style] .pn-rel .gn-mono { width: calc(40px * var(--k)); height: calc(40px * var(--k)); background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); font: 600 var(--fs-meta)/1 var(--text); }
[data-style] .pn-fam .gn-add { margin-top: 20px; }
/* The rest, one under the other: Story and Memories, photographs, heirlooms, documents, suggestions. */
[data-style] .pn-rest { display: grid; gap: 24px; margin-top: 48px; }
[data-style] .pn-rest .gn-card { background: var(--card-fill); border-color: var(--line); border-radius: 16px; }
[data-style] .pn-rest .gn-card > h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); margin-bottom: 16px; }
[data-style] .pn-rest .gn-photos img, [data-style] .pn-rest .gn-photos .gn-face, [data-style] .pn-rest .gn-pic img { filter: var(--photo); transition: filter .3s; }
[data-style] .pn-rest .gn-photos a:hover .gn-face, [data-style] .pn-rest a:hover .gn-pic img { filter: none; }
@media (max-width: 860px) {
  [data-style] .pn-page { --pn-pad-l: 16px; padding: 8px 16px 28px; }
  [data-style] .pn-who { gap: 18px; margin-bottom: 28px; }
  [data-style] .pn-mount { width: calc(96px * var(--k)); height: calc(96px * var(--k)); }
  [data-style] .pn-name { font-size: calc(36px * var(--kt)); }
}

/* ---------- Family events and an event (spec §5.7, W6) ---------- */
/* The list: the decades in display over a fine rule; each event a card with its first 1–3 pictures (sepia, colour under
   the mouse), the kind · date as an overline, the title in display; the tree's facts as quiet lines. */
[data-style] .ev-filters .chip[aria-current="page"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }
[data-style] .ev-filters .input { border-radius: 999px; }
[data-style] .ev-line { gap: 12px; max-width: 980px; }
[data-style] .ev-decade h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); margin: 28px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
[data-style] .ev-fact { font-size: var(--fs-meta); color: var(--muted); padding-left: 4px; }
[data-style] .ev-card { gap: 18px; padding: 14px 18px 14px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card-fill); color: var(--ink); }
[data-style] .ev-card:hover, [data-style] .ev-card:focus-visible { background: var(--soft), var(--card-fill); border-color: var(--line-strong); }
[data-style] .ev-covers img, [data-style] .ev-nocover { width: calc(76px * var(--k)); height: calc(76px * var(--k)); border-radius: 12px; background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
[data-style] .ev-covers img { filter: var(--photo); transition: filter .3s; }
[data-style] .ev-card:hover .ev-covers img { filter: none; }
[data-style] .ev-covers img + img { margin-left: calc(-26px * var(--k)); box-shadow: -3px 0 0 var(--card-fill); }
[data-style] .ev-text { gap: 4px; }
[data-style] .ev-over { font: 600 var(--fs-over)/1.3 var(--text); letter-spacing: .16em; color: var(--accent); }
[data-style="classic"] .ev-over { font-weight: 700; letter-spacing: .08em; }
[data-style] .ev-title { font: var(--title-w) var(--fs-card)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .ev-text .muted { font-size: var(--fs-meta); }
[data-style] .ev-text .muted .i { color: var(--ctl-icon); }
/* An event: the overline, the title, the place; who was there as chips; the story as a quote with the gold rule; the
   tree's facts as chips; its photos under a heading with the one gold "Add photos". */
[data-style] .pagehead .ev-over { margin-bottom: 4px; }
[data-style] .pagehead .lede .i { color: var(--ctl-icon); }
[data-style] .ev-people { gap: 8px; margin-bottom: 20px; }
[data-style] .ev-people a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); font: 500 var(--fs-label)/1.2 var(--text); text-decoration: none; }
[data-style] .ev-people a:hover { background: var(--ctl-pressed); }
[data-style] .ev-story { max-width: 760px; margin: 0 0 24px; padding: 4px 0 4px 20px; border-left: 2px solid var(--primary); font: italic calc(20px * var(--kt))/1.5 var(--display); color: var(--ink); }
[data-style="classic"] .ev-story { font: 400 var(--fs-body)/1.55 var(--text); }
[data-style] .ev-story footer { font: 500 var(--fs-meta)/1.3 var(--text); color: var(--muted); margin-top: 8px; }
[data-style] .ev-sec { align-items: center; margin-top: 28px; }
[data-style] .ev-h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); margin: 0; }
[data-style] .ev-sec .ev-h2 { margin: 0; }
[data-style] .ev-over { text-transform: uppercase; }
[data-style] .ev-grid + p[data-gap] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* ---------- Help (spec §5.7, W6) ---------- */
/* The topics as cards with a gold ring icon; the section headings in display; the topic's number as a small ring. */
[data-style] .help-card { background: var(--card-fill); border-color: var(--line); border-radius: 16px; min-height: calc(72px * var(--k)); grid-template-columns: calc(52px * var(--k)) minmax(0, 1fr); }
[data-style] .help-card:hover { background: var(--soft), var(--card-fill); border-color: var(--line-strong); }
[data-style] .help-card .art { width: calc(52px * var(--k)); height: calc(52px * var(--k)); background: var(--bg); border: 1.5px solid var(--primary); color: var(--accent); box-shadow: var(--ring-glow); }
[data-style] .help-card b { font: var(--title-w) var(--fs-card)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .help-card span { font-size: var(--fs-meta); color: var(--ink-2); }
[data-style] .help-page h2.h2 { font: var(--title-w) var(--fs-section)/1.2 var(--display); letter-spacing: var(--title-ls); }
[data-style] .help-num { background: var(--bg); border: 1.5px solid var(--primary); color: var(--accent); font: 600 var(--fs-meta)/1 var(--text); }

/* ---------- Assets & Collections (spec §5.7, W6) ---------- */
/* An object's Family view | All details: the app's segment (pills in a track), not the old square buttons. */
[data-style] .obj-head .seg .btn { border-radius: 999px; border: 1.5px solid transparent; }
[data-style] .obj-head .seg .btn[aria-current="true"] { background: var(--ctl-fill); border-color: var(--ctl-ring); color: var(--ink); font-weight: 700; }

/* A phone (under 600 px of content): Life's year · age become the card's overline, the rail stays with a 36 px ring, the
   card takes the rest (web-design M4); A life the same at Larger. Page actions go under the title, on the left (S5). */
@container (max-width: 600px) {
  [data-style] .pn-life, :root[data-style][data-text="larger"] .tl-life { grid-template-columns: calc(36px * var(--k)) minmax(0, 1fr); column-gap: 12px; }
  [data-style] .pn-life .tl-yr, :root[data-style][data-text="larger"] .tl-life .tl-yr { display: none; }
  [data-style] .pn-life .tl-over, :root[data-style][data-text="larger"] .tl-life .tl-over { display: block; }
  [data-style] .pn-life .ring.sm, :root[data-style][data-text="larger"] .tl-life .ring.sm { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
  [data-style] .pn-life .tl-node::after, :root[data-style][data-text="larger"] .tl-life .tl-node::after { top: calc(36px * var(--k) + 4px); }
  [data-style] .pn-sec .gn-card-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  [data-style] .pn-sec .gn-card-head h2, [data-style] .pn-sec .gn-card-head .btn { margin: 0; }
}
@media (max-width: 860px) {
  [data-style] .pagehead .titles:has(> .phead-end) { display: flex; flex-direction: column; }
  [data-style] .pagehead .titles > .phead-end { order: 9; justify-content: flex-start; margin: 12px 0 0; }
}

/* An event's tiles as Library's (§5.3, web-design S4): the caption, then one meta line (the number, the year beside it or
   under it the same way on every tile); the tick is the file tiles' disc below. */
[data-style] .ev-grid .card .cap { min-height: 0; }
[data-style] .ev-grid .card .sub { flex-wrap: wrap; row-gap: 2px; }
[data-style] .ev-grid .card .sub .catno { flex: none; }
[data-style] .ev-grid .card:has(.check input:checked) { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
/* Library's, a category's and an event's file tiles (web-design, iPhone pass 04.11; §6, W6 S4): the selection box is the
   app's, an empty 28 px disc with a 1.5 px ring at rest, gold with the tick when chosen; never the native square. The
   input is the disc; the label around it is the hit area (at least the disc; 44 px × k on a touch screen) and keeps its
   show-on-hover. One set of rules for both grids, so they cannot drift. */
[data-style] :is(.grid[data-selectable], .ev-grid) .card .check { min-width: 28px; min-height: 28px; padding: 0; background: none; box-shadow: none; border-radius: 50%; display: grid; place-items: center; }
@media (pointer: coarse) { [data-style] :is(.grid[data-selectable], .ev-grid) .card .check { width: calc(44px * var(--k)); height: calc(44px * var(--k)); } }
[data-style] :is(.grid[data-selectable], .ev-grid) .card .check input { appearance: none; -webkit-appearance: none; grid-area: 1 / 1; width: 28px; height: 28px; margin: 0; border-radius: 50%;
  background: var(--ctl-fill); box-shadow: inset 0 0 0 1.5px var(--line-strong), 0 1px 3px rgba(0, 0, 0, .25); cursor: pointer; }
[data-style] :is(.grid[data-selectable], .ev-grid) .card .check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[data-style] :is(.grid[data-selectable], .ev-grid) .card .check input:checked { background: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
[data-style] :is(.grid[data-selectable], .ev-grid) .card .check:has(input:checked)::after { content: ""; grid-area: 1 / 1; width: 16px; height: 16px; background: var(--on-primary); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
/* An event's people as person chips: the initials in a disc, the name. The credit under the story in meta. */
[data-style] .ev-people a { gap: 8px; padding: 0 14px 0 4px; min-height: 44px; }
[data-style] .ev-people .mono { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); font: 600 var(--fs-tag)/1 var(--text); letter-spacing: .04em; }
/* Find on a phone: a round icon button beside the field (S5). */
@media (max-width: 600px) {
  [data-style] .ev-filters .chips { flex-basis: 100%; }
  [data-style] .ev-filters .input { flex: 1 1 0; }
  [data-style] .ev-find { width: calc(48px * var(--k)); min-width: 44px; height: calc(48px * var(--k)); padding: 0; justify-content: center; border-radius: 50%; }
  [data-style] .ev-find-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Help: the topic cards in a row are one height (S6). */
[data-style] .help-cards > li { display: flex; }
[data-style] .help-cards .help-card { width: 100%; height: 100%; }

/* An object's head (§4.3, web-design's review): Back + the action, the meta line, the sheet as a ghost; the view segment
   is the content's first row, on the left. */
[data-style] .obj-head .obj-also { margin: 8px 0 0 -14px; }
[data-style] .obj-seg { display: inline-flex; margin: 0 0 20px; }
/* The sticky head and filter band (Library, Assets & Collections) on the head's ground; the fine edge only while stuck
   (a scroll-driven animation on .main; where not supported, no edge). */
/* Round 4 #44: it sticks at the very top of the scroll area, not under .main's top padding (a sticky box keeps clear of
   its scroller's padding), on an opaque ground: nothing scrolls past above it. */
[data-style] .sticky-head { top: calc(-1 * var(--main-pad, 0px)); background: var(--bg); border-bottom: 1px solid transparent; }
[data-style] .sticky-head .pagehead, [data-style] .sticky-head .filterbar { background: transparent; backdrop-filter: none; }
@supports (animation-timeline: scroll()) {
  [data-style] .sticky-head { animation: look-stuck linear both; animation-timeline: scroll(nearest block); animation-range: 0 1px; }
  @keyframes look-stuck { to { border-bottom-color: var(--line); } }
}
[data-style] .ev-grid .card .sub, [data-style] .ev-grid .card .sub .catno { font-variant-numeric: lining-nums tabular-nums; }
/* The overline's year keeps its case ("c. 1948"); display titles take lining figures too (web-design, W6 round 2). */
[data-style] .tl-over-yr { text-transform: none; letter-spacing: .04em; }

/* ---------- the visual check #40: shared causes (web-design, WS-A…WS-I) ---------- */
/* WS-A: lining figures everywhere, once. The `font:` shorthand resets font-feature-settings too (CSS Fonts 4), so an
   inherited value is lost wherever a rule sets `font:`; hence on every element, above the shorthand. No other rule here
   uses font-feature-settings (tabular figures stay font-variant-numeric). */
/* Round 4 #44: Crimson Pro's fi/fl ligature is drawn broken in our subset ("All files" in the column), so common ligatures
   are off in Heritage until the subset is fixed (spec §5.3b); here, as font-variant-ligatures is reset by `font:` as well. */
:root[data-style="heritage"] :where(*, *::before, *::after) { font-feature-settings: "lnum" 1, "liga" 0 !important; } /* Classic untouched (web-design) */
/* WS-B: sizes follow the text size k. Badges round their digit; icons beside words; every control 44 × k; the ring 52 × k;
   ticks 18 × k; tile grids min 190 × k (one column on a phone at Larger); the tree's monograms by kt, capped. */
[data-style] .badge, [data-style] .bn-badge { display: inline-grid; place-items: center; min-width: calc(22px * var(--k)); min-height: calc(22px * var(--k)); height: auto; line-height: 1; padding: 2px 6px; }
[data-style] svg.i { width: calc(20px * var(--k)); height: calc(20px * var(--k)); }
[data-style] svg.i.sm { width: calc(16px * var(--k)); height: calc(16px * var(--k)); }
[data-style] svg.i.lg { width: calc(28px * var(--k)); height: calc(28px * var(--k)); }
[data-style] .ctl, [data-style] .backlink, [data-style] .chip, [data-style] .textbtn, [data-style] .seg > a, [data-style] .seg > button, [data-style] .seg .segopt, [data-style] .seg .btn { min-height: calc(44px * var(--k)); }
[data-style] .tl .ring.sm { width: calc(52px * var(--k)); height: calc(52px * var(--k)); }
[data-style] .tl-node::after { top: calc(56px * var(--k)); }
[data-style] :where(input[type="checkbox"], input[type="radio"]):not(.switch input):not(.ev-grid .check input):not(.grid[data-selectable] .check input) { width: calc(18px * var(--k)); height: calc(18px * var(--k)); }
[data-style] .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(190px * var(--k))), 1fr)); }
@media (max-width: 860px) {
  [data-style] .gn-p.v .gn-mt { --mt: min(calc(3.25rem / var(--k) * var(--kt)), 22vw) !important; }
  [data-style] .gn-p.v.mid .gn-mt, [data-style] .gn-pane .gn-pane-mt .gn-mt { --mt: min(calc(4.5rem / var(--k) * var(--kt)), 22vw) !important; }
  [data-style] .gn-p.v.partner .gn-mt { --mt: min(calc(3.5rem / var(--k) * var(--kt)), 22vw) !important; }
}
/* WS-C: the catalogue number never breaks; captions wrap evenly. */
[data-style] .catno { white-space: nowrap; max-width: 100%; width: fit-content; }
[data-style] .card .cap { text-wrap: pretty; }
/* WS-E: scroll rows on a phone keep the 16 px gutter, with the fade on the right. */
@media (max-width: 860px) {
  [data-style] .filterbar { padding-inline: 16px; scroll-padding-inline: 16px; }
  [data-style] .decadebar { padding-inline: 16px; scroll-padding-inline: 16px; margin-inline: -16px; }
}
/* WS-F: a segment never wraps: its items share the track, their words may wrap inside. */
[data-style] .seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); flex-wrap: nowrap; max-width: 100%; }
[data-style] .seg > a, [data-style] .seg > button, [data-style] .seg .segopt, [data-style] .seg .btn { white-space: normal; text-align: center; justify-content: center; padding-inline: 12px; }
/* WS-G: §4.3 below 1024 px or at a larger text: Back alone on its row, the page's action after the lede, on the left;
   the two pills the same height and centred. */
[data-style] .phead-row { align-items: center; }
[data-style] .phead-row > .backlink, [data-style] .phead-row > .ctl { height: auto; margin: 0; }
@media (max-width: 1023px) {
  [data-style] .pagehead .titles:has(> .phead-row) { display: flex; flex-direction: column; align-items: flex-start; }
  [data-style] .pagehead .titles > .phead-row { display: contents; }
  [data-style] .pagehead .titles > .phead-row > .backlink { order: -1; margin-bottom: 12px; }
  [data-style] .pagehead .titles > .phead-row > :not(.backlink) { order: 9; margin-top: 12px; }
  [data-style] .pn-page > .phead-row > .ctl { display: none; }
  [data-style] .pn-act-narrow { display: inline-flex; }
}
:root[data-style][data-text="large"], :root[data-style][data-text="larger"] {
  & .pagehead .titles:has(> .phead-row) { display: flex; flex-direction: column; align-items: flex-start; }
  & .pagehead .titles > .phead-row { display: contents; }
  & .pagehead .titles > .phead-row > .backlink { order: -1; margin-bottom: 12px; }
  & .pagehead .titles > .phead-row > :not(.backlink) { order: 9; margin-top: 12px; }
  & .pn-page > .phead-row > .ctl { display: none; }
  & .pn-act-narrow { display: inline-flex; }
}
[data-style] .pn-act-narrow { display: none; }
@media (max-width: 1023px) { [data-style] .pn-t .pn-act-narrow { display: inline-flex; } }
:root[data-style][data-text="large"] .pn-t .pn-act-narrow, :root[data-style][data-text="larger"] .pn-t .pn-act-narrow { display: inline-flex; }
/* WS-I: a placeholder that does not fit ends in an ellipsis, never mid-word cut. */
[data-style] input::placeholder { text-overflow: ellipsis; }
[data-style] input[type="search"], [data-style] .input { text-overflow: ellipsis; }
[data-style] .pn-act-narrow { align-self: flex-start; }

/* ---------- the visual check #40: web-build's rows (web-design's list, WS3…WS43) ---------- */
/* WS3: an event's card stacks below 520 px (its pictures above the words); a title never breaks inside a word. */
[data-style] .ev-title { overflow-wrap: break-word; }
@container (max-width: 520px) { [data-style] .ev-card { flex-direction: column; align-items: flex-start; } [data-style] .ev-covers { max-width: 100%; } }
/* WS4: the viewer's top row on a phone: 16 px gutters, every control a 44 × k circle, the title left to the pane, the row
   wraps rather than squeezing. */
@media (max-width: 600px) {
  [data-style] .viewer .vbar { padding: max(8px, env(safe-area-inset-top)) 16px 8px; flex-wrap: nowrap; min-height: calc(60px * var(--k)); }
  /* One row (web-design): the rest is in ⋯. */
  [data-style] .viewer .vbar:has(.v-more) > .rg-draw-btn, [data-style] .viewer .vbar:has(.v-more) > .rotate-tools, [data-style] .viewer .vbar:has(.v-more) > a.btn[data-key="e"],
  [data-style] .viewer .vbar:has(.v-more) > form[data-danger], [data-style] .viewer .vbar > .catno { display: none; }
  [data-style] .viewer .vbar #item-title { display: none; }
  [data-style] .viewer .vbar .iconbtn, [data-style] .viewer .vbar .btn { min-width: calc(44px * var(--k)); min-height: calc(44px * var(--k)); border-radius: 999px; }
}
/* WS11: the object's tabs wrap on a narrow screen (nothing hidden off the edge). */
[data-style] .obj-page .tabs { flex-wrap: wrap; row-gap: 4px; overflow: visible; }
/* WS13: the empty archive's big button wraps its words; its cards fit the screen. */
[data-style] .home-welcome .btn { max-width: 100%; height: auto; white-space: normal; text-align: left; padding-block: 12px; }
[data-style] .home-welcome { min-width: 0; }
/* WS15: at a larger text, captions up to 3 lines and the level as its word: the dots alone carry no meaning, so they go
   and "Started", "Described", "Complete" stay (web-design, #50 review). */
:root[data-style][data-text="large"] .card .cap, :root[data-style][data-text="larger"] .card .cap { -webkit-line-clamp: 3; }
:root[data-style][data-text="large"] .lvl .dots, :root[data-style][data-text="larger"] .lvl .dots { display: none; }
/* WS16: a decade's years and Family events take A life's narrow layout below 600 px (and below 768 at a larger text). */
@container (max-width: 600px) {
  [data-style] .tl { grid-template-columns: calc(36px * var(--k)) minmax(0, 1fr); column-gap: 12px; }
  [data-style] .tl .tl-yr { display: none; }
  [data-style] .tl .tl-over { display: block; }
  [data-style] .tl .ring.sm { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
  [data-style] .tl .tl-node::after { top: calc(36px * var(--k) + 4px); }
}
@container (max-width: 768px) {
  :root[data-style][data-text="large"] .tl, :root[data-style][data-text="larger"] .tl { grid-template-columns: calc(36px * var(--k)) minmax(0, 1fr); column-gap: 12px; }
  :root[data-style][data-text="large"] .tl .tl-yr, :root[data-style][data-text="larger"] .tl .tl-yr { display: none; }
  :root[data-style][data-text="large"] .tl .tl-over, :root[data-style][data-text="larger"] .tl .tl-over { display: block; }
}
[data-style] .tl-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
[data-style] .tl-thumbs .pic { width: auto; }
/* WS39: up to six pictures on one row (no orphan) where there is room. */
@container (min-width: 760px) { [data-style] .tl-thumbs:not(:has(.pic:nth-child(7))) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* WS17: the tree's side card, stacked under the map, shows all of itself. */
@media (max-width: 1180px) { [data-style] .gn-pane { position: static; height: auto; max-height: none; overflow: visible; } }
/* WS18: at least 12 px between a portrait disc and the name. */
[data-style] .gn-p.v { row-gap: 12px; }
/* WS21: the viewer's pane grows with the text (to 1.2×); at a larger text the labels sit above their values. */
[data-style] .viewer .vinfo { width: calc(380px * min(var(--k), 1.2)); }
/* #83 (spec §5.4b, Stewart): the info column never gets wider than itself, so it scrolls only up and down: one minmax(0, 1fr)
   track (its implicit auto column took the longest unbreakable word), children min-width 0, every text free to wrap (URLs
   anywhere); the catalogue-number pill alone stays on one line. Titles and names carry <wbr> break points (Format::breakable). */
[data-style] .vinfo { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; overscroll-behavior: contain; }
[data-style] .vinfo > * { min-width: 0; }
[data-style] .vinfo :is(h2, .desc, dd, dd a, .memories-block, .memory-text, .rg-panel, [aria-labelledby="rg-panel-h"]) { overflow-wrap: anywhere; min-width: 0; }
[data-style] .vinfo dd.catline a { min-width: 0; }
[data-style] .vinfo .catno { white-space: nowrap; overflow-wrap: normal; }
[data-style] .vinfo h2.long { font-size: calc(28px * var(--kt)); } /* #83: a title over 48 characters, so the facts stay on the first screen */
:root[data-style][data-text="large"] .vinfo dl.props, :root[data-style][data-text="larger"] .vinfo dl.props { grid-template-columns: minmax(0, 1fr); }
/* WS25: Home's decades are a sideways row on a phone (the one row that scrolls sideways, §7), snapping. */
@media (max-width: 860px) {
  [data-style] .home .decades { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 4px 16px 12px; margin-inline: -16px; scroll-padding-inline: 16px; }
  [data-style] .home .decades > * { flex: 0 0 calc(150px * var(--kt)); scroll-snap-align: start; }
}
/* WS26: 12 px between the top row and the page's frame. */
@media (min-width: 861px) { [data-style] .topbar { margin-bottom: 12px; } }
/* WS27: no opaque box inside the frame on Help and My account. */
[data-style] .help-page, [data-style] .main > .page { background: transparent; }
/* WS28: on a page with its own gold, the column's Add is a control pill with a gold icon. */
[data-style] .app:has(.main .btn.primary:not(:is(.pn-acts, .selbar, dialog, template, [hidden]) .btn, [hidden])) .newbtn { background: var(--ctl-fill); color: var(--ink); border: 1px solid var(--ctl-edge); box-shadow: none; }
[data-style] .app:has(.main .btn.primary:not(:is(.pn-acts, .selbar, dialog, template, [hidden]) .btn, [hidden])) .newbtn .i { color: var(--accent); }
/* WS32: one count, not two: the result line goes when the heading says it. */
[data-style] .pagehead:has(.lede) ~ * .resultline, [data-style] .resultline:has(+ .grid) { display: none; }
/* WS33: the tile grid lines up with the page's edge; the focus ring has room outside. */
[data-style] .grid { padding: 0; }
[data-style] .grid .card:focus-within { outline-offset: 2px; }
/* WS34: 44 × k targets: See all, Back to the contents, the phone's family name, the tree's toggles, the column's
   sub-links, Grid/List, the object's source pills, the event's choose disc, the You sheet's rows, standalone list links. */
[data-style] .linkbtn, [data-style] .help-top, [data-style] .brand-phone, [data-style] .nav-sub a, [data-style] .tree .tog, [data-style] .viewtools .seg .btn, [data-style] .src, [data-style] .ev-fact a, [data-style] .sheet .rowl {
  position: relative; }
[data-style] .linkbtn::before, [data-style] .help-top::before, [data-style] .tree .tog::before, [data-style] .src::before, [data-style] .ev-fact a::before {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: max(100%, calc(44px * var(--k))); height: max(100%, calc(44px * var(--k))); transform: translate(-50%, -50%); }
[data-style] .brand-phone, [data-style] .nav-sub a, [data-style] .viewtools .seg .btn, [data-style] .sheet .rowl { min-height: calc(44px * var(--k)); }
/* WS37: Help's number ring sits on the title's centre; the two "website / app" cards take the width. */
[data-style] .help-head h1 { align-items: center; }
[data-style] .help-pair, [data-style] .help-two { width: 100%; }
/* WS38: 28 px from a head to its first card; the You sheet's boxes 16 px in; a menu shows focus only from the keyboard. */
[data-style] .pagehead + .page > :first-child { margin-top: 0; }
[data-style] .sheet .sheet-body, [data-style] .sheet > div:not(.sheet-head) { padding-inline: 16px; }
[data-style] .menu [role^="menuitem"]:focus:not(:focus-visible) { box-shadow: none; background: transparent; }
/* WS43: door and hero titles balance their lines (no lone "5"). */
[data-style] .door .card-t, [data-style] .hero-t, [data-style] .door b { text-wrap: balance; }
/* WS31: the portrait's pencil is a control disc (one gold in the view); the side card keeps 400 px beside the map. */
[data-style] .gn-pencil { background: var(--ctl-fill); color: var(--ctl-icon); box-shadow: inset 0 0 0 1px var(--ctl-edge); }
[data-style] .gn-pencil:hover { background: var(--ctl-pressed); }
@media (min-width: 1101px) { [data-style] .gn-pane { flex: 0 0 400px; max-width: 400px; } }
/* WS29: Assets & Collections on a phone: Add object and More (the other actions in the menu), then the view switch. */
@media (max-width: 860px) {
  [data-style] .coll-tools > .btn:not(.primary) { display: none; }
  [data-style] .coll-tools > .coll-more { order: 2; }
}
/* The tree's view segment on a phone: its words never run past the edge (stacked at Larger, as W6a). */
@media (max-width: 860px) { [data-style] .gn-seg > a { min-width: 0; white-space: normal; } }
[data-style] .v-more-menu .rotate-tools { display: flex; gap: 4px; padding: 4px 8px; }
[data-style] .v-more-menu form { display: contents; }
@media (max-width: 600px) { [data-style] .viewer .vbar .v-more { order: 9; } }
/* WS4 at Larger on a phone: Back · Details · Download · ⋯ (Favourite in ⋯), so the row fits at 44 × k with its gutters. */
[data-style] .v-more-menu .v-more-fav { display: none; }
@media (max-width: 600px) {
  :root[data-style][data-text="larger"] .viewer .vbar:has(.v-more) > form:has(.fav-btn) { display: none; }
  :root[data-style][data-text="larger"] .v-more-menu .v-more-fav { display: contents; }
  [data-style] .viewer .vbar { column-gap: 6px; }
}
@media (max-width: 600px) {
  [data-style] .viewer .vbar .btn { padding: 0; width: calc(44px * var(--k)); justify-content: center; }
  [data-style] .viewer .vbar > form:has(> .btn.primary) { order: 8; }
}
@media (max-width: 860px) { [data-style] .filterbar.coll-filters { padding-inline: 16px; scroll-padding-inline: 16px; } }
/* WS45/WS44: on a phone every filter row keeps its 16 px gutter (above the Manage sheet's padding-inline: 0). */
@media (max-width: 860px) { :root[data-style] main .filterbar, :root[data-style] .sticky-head .filterbar { padding-inline: 16px; scroll-padding-inline: 16px; } }
/* WS48: a head's buttons are as tall as its pills (44 × k). */
[data-style] .pagehead .viewtools .btn, [data-style] .gn-actions .btn { min-height: calc(44px * var(--k)); height: auto; }

/* ---------- Category doors (web-design #40, Karol 2026-11-03; spec §5.3) ---------- */
/* Their pictures turn (archive-look.js): the next one over the last, faded in over .8 s; still sepia, colour on hover. */
[data-style] .door > picture { position: absolute; inset: 0; }
[data-style] .door > picture.rot-next { opacity: 0; transition: opacity .8s ease; }
[data-style] .door > picture.rot-next.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { [data-style] .door > picture.rot-next { transition: none; } }
/* A door with no picture: the light card with the drawer icon, as tall as the others. */
[data-style] .cat-door.bare { min-height: calc(150px * var(--k)); }
/* Door titles fit the door: the size follows its width, a step smaller past 40 letters, broken after "/", never cut. */
[data-style] .cat-door { container-type: inline-size; }
[data-style] .cat-door .card-t { font-size: clamp(1.25rem, 8cqi, 1.9rem); overflow-wrap: break-word; hyphens: manual; }
[data-style] .cat-door .card-t.long { font-size: clamp(1.125rem, 6.5cqi, 1.6rem); }
/* §4.1: at least 12 px between the search pill and the page's frame (Karol: "Search nie ma marginesu"). */
@media (min-width: 861px) { [data-style] .topbar { padding-bottom: 12px; margin-bottom: 0; } }
@media (min-width: 861px) { [data-style] .app > .topbar { height: auto; min-height: 0; padding-bottom: 12px; } }
/* Doors in rows of one height: the empty door as tall as its neighbours, whatever their titles. */
[data-style] .cat-doors { grid-auto-rows: 1fr; }

/* ---------- Round 4 #59 (spec §5.3d): Library's categories fold into a Dock ---------- */
/* Folded by default (ol-lib-cats, :root[data-lib-cats="open"] before paint); open is today's doors, the first 30 then
   "Show 30 more". The grid is display:none while folded, so its lazy pictures do not load. */
[data-style] .lib-cats { container: libcats / inline-size; }
[data-style] .lib-cats-h { align-items: center; gap: 8px; }
[data-style] .lib-cats-h h2 { margin-right: auto; }
[data-style] .lib-cats-h h2, [data-style] .lib-cats-pill { white-space: nowrap; }
[data-style] .lib-cats-pill { flex: none; }
[data-style] .lib-cats-pill .lc-short { display: none; }
@container libcats (max-width: 599px) {
  [data-style] .lib-cats-pill .lc-long { display: none; }
  [data-style] .lib-cats-pill .lc-short { display: inline; }
  [data-style] .lib-cats-pill { padding-inline: 12px; gap: 4px; }
  [data-style] .lib-cats-h { gap: 6px; }
}
[data-style] .lib-cats-pill .lc-open, :root[data-lib-cats="open"] .lib-cats-pill .lc-closed { display: none; }
:root[data-lib-cats="open"] .lib-cats-pill .lc-open { display: inline; }
[data-style] .lib-cats-pill .i { transition: transform .2s; }
:root[data-lib-cats="open"] .lib-cats-pill .i { transform: rotate(180deg); }
[data-style] .lib-cats-find { display: none; }
:root[data-lib-cats="open"] .lib-cats-find { display: inline-flex; }
[data-style] .lib-cats-grid { display: none; }
:root[data-lib-cats="open"] .lib-cats-grid { display: grid; }
:root[data-lib-cats="open"] .lib-dock { display: none; }
@container libcats (max-width: 599px) {
  [data-style] .lib-cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-style][data-text="larger"] .lib-cats-grid { grid-template-columns: minmax(0, 1fr); }
}
/* No fold within two door rows (web-design 04.11: a few categories folding into a tiny Dock read as a mistake): the grid's
   own rule (doors at least 240 px × k, 16 px apart, two a row under 600 px and one at Larger), per count and text size. */
@container libcats (max-width: 599px) {
  :root[data-style]:not([data-text="larger"]) .lib-cats:is([data-n="1"], [data-n="2"], [data-n="3"], [data-n="4"]) :is(.lib-cats-pill, .lib-dock), :root[data-style][data-text="larger"] .lib-cats:is([data-n="1"], [data-n="2"]) :is(.lib-cats-pill, .lib-dock) { display: none; }
  :root[data-style]:not([data-text="larger"]) .lib-cats:is([data-n="1"], [data-n="2"], [data-n="3"], [data-n="4"]) .lib-cats-grid, :root[data-style][data-text="larger"] .lib-cats:is([data-n="1"], [data-n="2"]) .lib-cats-grid { display: grid; }
}
@container libcats (min-width: 600px) {
  [data-style] .lib-cats:is([data-n="1"], [data-n="2"]) :is(.lib-cats-pill, .lib-dock) { display: none; }
  [data-style] .lib-cats:is([data-n="1"], [data-n="2"]) .lib-cats-grid { display: grid; }
}
@container libcats (min-width: 600px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="3"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="3"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 600px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="4"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="4"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 752px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="5"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="5"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 752px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="6"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="6"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1008px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="7"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="7"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1008px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="8"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="8"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1264px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="9"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="9"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1264px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="10"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="10"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1520px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="11"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="11"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1520px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="12"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="12"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1776px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="13"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="13"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1776px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="14"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="14"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2032px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="15"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="15"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2032px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="16"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="16"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2288px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="17"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="17"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2288px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="18"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="18"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2544px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="19"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="19"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2544px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="20"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="20"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2800px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="21"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="21"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2800px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="22"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="22"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3056px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="23"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="23"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3056px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="24"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .lib-cats[data-n="24"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 616px) { :root[data-style][data-text="large"] .lib-cats[data-n="3"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="3"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 616px) { :root[data-style][data-text="large"] .lib-cats[data-n="4"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="4"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 932px) { :root[data-style][data-text="large"] .lib-cats[data-n="5"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="5"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 932px) { :root[data-style][data-text="large"] .lib-cats[data-n="6"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="6"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1248px) { :root[data-style][data-text="large"] .lib-cats[data-n="7"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="7"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1248px) { :root[data-style][data-text="large"] .lib-cats[data-n="8"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="8"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1564px) { :root[data-style][data-text="large"] .lib-cats[data-n="9"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="9"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1564px) { :root[data-style][data-text="large"] .lib-cats[data-n="10"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="10"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1880px) { :root[data-style][data-text="large"] .lib-cats[data-n="11"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="11"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1880px) { :root[data-style][data-text="large"] .lib-cats[data-n="12"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="12"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2196px) { :root[data-style][data-text="large"] .lib-cats[data-n="13"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="13"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2196px) { :root[data-style][data-text="large"] .lib-cats[data-n="14"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="14"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2512px) { :root[data-style][data-text="large"] .lib-cats[data-n="15"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="15"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2512px) { :root[data-style][data-text="large"] .lib-cats[data-n="16"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="16"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2828px) { :root[data-style][data-text="large"] .lib-cats[data-n="17"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="17"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2828px) { :root[data-style][data-text="large"] .lib-cats[data-n="18"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="18"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3144px) { :root[data-style][data-text="large"] .lib-cats[data-n="19"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="19"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3144px) { :root[data-style][data-text="large"] .lib-cats[data-n="20"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="20"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3460px) { :root[data-style][data-text="large"] .lib-cats[data-n="21"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="21"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3460px) { :root[data-style][data-text="large"] .lib-cats[data-n="22"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="22"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3776px) { :root[data-style][data-text="large"] .lib-cats[data-n="23"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="23"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3776px) { :root[data-style][data-text="large"] .lib-cats[data-n="24"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="large"] .lib-cats[data-n="24"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 736px) { :root[data-style][data-text="larger"] .lib-cats[data-n="3"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="3"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 736px) { :root[data-style][data-text="larger"] .lib-cats[data-n="4"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="4"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1112px) { :root[data-style][data-text="larger"] .lib-cats[data-n="5"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="5"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1112px) { :root[data-style][data-text="larger"] .lib-cats[data-n="6"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="6"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1488px) { :root[data-style][data-text="larger"] .lib-cats[data-n="7"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="7"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1488px) { :root[data-style][data-text="larger"] .lib-cats[data-n="8"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="8"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1864px) { :root[data-style][data-text="larger"] .lib-cats[data-n="9"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="9"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 1864px) { :root[data-style][data-text="larger"] .lib-cats[data-n="10"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="10"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2240px) { :root[data-style][data-text="larger"] .lib-cats[data-n="11"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="11"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2240px) { :root[data-style][data-text="larger"] .lib-cats[data-n="12"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="12"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2616px) { :root[data-style][data-text="larger"] .lib-cats[data-n="13"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="13"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2616px) { :root[data-style][data-text="larger"] .lib-cats[data-n="14"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="14"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2992px) { :root[data-style][data-text="larger"] .lib-cats[data-n="15"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="15"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 2992px) { :root[data-style][data-text="larger"] .lib-cats[data-n="16"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="16"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3368px) { :root[data-style][data-text="larger"] .lib-cats[data-n="17"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="17"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3368px) { :root[data-style][data-text="larger"] .lib-cats[data-n="18"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="18"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3744px) { :root[data-style][data-text="larger"] .lib-cats[data-n="19"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="19"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 3744px) { :root[data-style][data-text="larger"] .lib-cats[data-n="20"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="20"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 4120px) { :root[data-style][data-text="larger"] .lib-cats[data-n="21"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="21"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 4120px) { :root[data-style][data-text="larger"] .lib-cats[data-n="22"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="22"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 4496px) { :root[data-style][data-text="larger"] .lib-cats[data-n="23"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="23"] .lib-cats-grid { display: grid; } }
@container libcats (min-width: 4496px) { :root[data-style][data-text="larger"] .lib-cats[data-n="24"] :is(.lib-cats-pill, .lib-dock) { display: none; } :root[data-style][data-text="larger"] .lib-cats[data-n="24"] .lib-cats-grid { display: grid; } }

/* The folded row, touch and under 600 px (the default): small doors with names, snapping, a fade at the right edge. */
[data-style] .lib-dock { position: relative; margin-bottom: 8px; }
[data-style] .dock-vp { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
[data-style] .dock-vp::-webkit-scrollbar { display: none; }
[data-style] .dock-row { position: relative; display: flex; gap: 12px; width: max-content; padding: 2px 48px 4px 2px; }
[data-style] .dk { position: relative; flex: none; display: flex; flex-direction: column; gap: 6px; width: calc(118px * var(--k)); scroll-snap-align: start; color: var(--ink); text-decoration: none; }
[data-style] .dk .ph { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); color: var(--ctl-icon); }
[data-style] .dk .ph picture, [data-style] .dk .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-style] .dk .ph img { filter: var(--photo); transition: filter .3s; }
[data-style] .dk:hover .ph img, [data-style] .dk:focus-visible .ph img { filter: none; }
/* A category without a photo (.dk.empty): not the page's empty state (its padding and centring sat the tile lower and smaller
   than the photos; web-design 05.11). :where keeps it under the Dock's own .dk rules below. */
[data-style] .dk:where(.empty) { display: flex; justify-items: normal; text-align: left; gap: 6px; padding: 0; max-width: none; margin: 0; }
[data-style] .dk .ph > .i { width: 40%; height: 40%; }
[data-style] .dk:focus-visible { outline: none; }
[data-style] .dk:focus-visible .ph { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ctl-ring); }
[data-style] .dk-t { display: grid; gap: 2px; min-width: 0; }
[data-style] .dk-t b { font: var(--label-w, 600) var(--fs-label, calc(14px * var(--kt)))/1.25 var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
[data-style] .dk-t small { color: var(--muted); font-size: calc(13px * var(--k)); }
[data-style] .dk.all .ph { background: none; box-shadow: none; border: 1.5px dashed var(--line-strong); font: 600 calc(14px * var(--kt))/1.2 var(--text); color: var(--ink); text-align: center; padding: 6px; box-sizing: border-box; }
[data-style] .dk-all-n { display: none; }
[data-style] .dock-label, [data-style] .dock-step { display: none; }
/* Turning (slow, archive-dock.js): the next picture fades in over the shown one. */
[data-style] .dk .ph > picture.dk-next { opacity: 0; transition: opacity .8s ease; }
[data-style] .dk .ph > picture.dk-next.on { opacity: 1; }

/* The Dock: a fine pointer and at least 600 px. Round 4 #65 (spec §5.3e): polaroid prints 92 × k wide (a 5 × k border, a
   24 × k bottom margin with the name in a hand), each slot tilted −3/+2/−1/+3/−2°, growing from their bottom edge to 1.6×
   under the pointer and straightening as they grow (archive-dock.js sets --s, --x and --tilt). No band is kept: the
   viewport is lifted over the section head by --lift (the script measures it), the head dims while the Dock is in use
   (.dock-on on .lib-cats) and the label floats over it. Edge glide and ‹ › on a side with more (.more-l / .more-r). */
@media (hover: hover) and (pointer: fine) {
  @container libcats (min-width: 600px) {
    [data-style] .lib-dock { display: flow-root; --dock: 1; --ds: calc(92px * var(--k)); --print: #FFFFFF; --print-ink: #3B2D22; --print-shadow: 0 8px 16px -8px rgba(60,40,20,.45); }
    [data-style] .dock-vp { position: relative; z-index: 2; scroll-snap-type: none; -webkit-mask-image: none; mask-image: none; pointer-events: none;
      margin-top: calc(-1 * var(--lift, 56px * var(--k))); padding-top: calc(var(--lift, 56px * var(--k)) + 10px * var(--k)); }
    [data-style] .dock-row { pointer-events: auto; }
    [data-style] .lib-cats-h { transition: opacity .15s; }
    [data-style] .lib-cats.dock-on .lib-cats-h { opacity: .32; }
    [data-style] .lib-dock.more-r .dock-vp { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
    [data-style] .lib-dock.more-l .dock-vp { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
    [data-style] .lib-dock.more-l.more-r .dock-vp { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
    [data-style] .dock-row { gap: calc(14px * var(--k)); align-items: stretch; padding: 0 60px calc(12px * var(--k)) 6px; }
    [data-style] .dk { --s: 1; --x: 0px; --r0: 0deg; display: block; width: var(--ds); height: auto; flex: none; scroll-snap-align: none; align-self: flex-end;
      padding: calc(5px * var(--k)) calc(5px * var(--k)) 0; border-radius: 2px; background: var(--print); color: var(--print-ink); box-shadow: var(--print-shadow);
      transform: translateX(var(--x)) rotate(calc(var(--r0) * var(--tilt, 1))) scale(var(--s)); transform-origin: 50% 100%; transition: transform .16s ease-out; will-change: transform; }
    [data-style] .dk.empty { justify-items: stretch; gap: 0; max-width: none; margin: 0; } /* not the page's .empty state (its centring shrank the caption) */
    [data-style] .dk:nth-child(5n+1) { --r0: -3deg; }
    [data-style] .dk:nth-child(5n+2) { --r0: 2deg; }
    [data-style] .dk:nth-child(5n+3) { --r0: -1deg; }
    [data-style] .dk:nth-child(5n+4) { --r0: 3deg; }
    [data-style] .dk:nth-child(5n+5) { --r0: -2deg; }
    [data-style] .dk .ph { position: relative; inset: auto; aspect-ratio: 1; border-radius: 0; box-shadow: none; background: var(--surface-2); color: var(--accent); }
    [data-style] .dk .ph > .i { width: 34%; height: 34%; }
    [data-style] .dk:focus-visible .ph { box-shadow: none; }
    [data-style] .dk:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 4px; }
    [data-style] .dk-t { display: block; height: calc(24px * var(--k)); padding: calc(5px * var(--k)) 2px 0; box-sizing: border-box; text-align: center; }
    [data-style] .dk-t b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: none; color: var(--print-ink);
      font: 600 calc(11px * var(--k))/1.15 var(--text); letter-spacing: .01em; }
    :root[data-style="heritage"] .dk-t b { font: 600 calc(14px * var(--k))/1 "Caveat", "Segoe Print", "Bradley Hand", cursive; letter-spacing: 0; }
    [data-style] .dk-t small { display: none; }
    [data-style] .dk.all { --r0: 0deg; align-self: stretch; display: grid; place-items: center; padding: 0; background: none; box-shadow: none; border: 1.5px dashed var(--line-strong); color: var(--ink); }
    [data-style] .dk.all .ph { position: static; aspect-ratio: auto; background: none; border: 0; border-radius: 0; font: 600 calc(15px * var(--k))/1.2 var(--text); color: var(--ink); }
    [data-style] .dk-all-n { display: inline; }
    [data-style] .dk-all-t { display: none; }
    [data-style] .dock-label { display: block; position: absolute; z-index: 5; top: 0; left: 0; max-width: calc(380px * var(--k)); padding: 5px 12px 6px; box-sizing: border-box;
      background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-2); white-space: nowrap; pointer-events: none;
      transform: translateX(-50%); opacity: 0; transition: opacity .12s; }
    [data-style] .dock-label.on { opacity: 1; }
    [data-style] .dock-label b { display: block; font: var(--title-w) calc(18px * var(--kt))/1.3 var(--display); overflow: hidden; text-overflow: ellipsis; }
    [data-style] .dock-label b.caps { font-size: calc(18px * var(--kt) * .86); letter-spacing: .045em; }
    [data-style] .dock-label small { display: block; color: var(--muted); font-size: calc(13px * var(--k)); line-height: 1.3; }
    [data-style] .dock-step:not([hidden]) { display: inline-grid; position: absolute; z-index: 4; bottom: calc(6px + var(--ds) / 2); width: calc(36px * var(--k)); height: calc(36px * var(--k)); transform: translateY(50%); }
    [data-style] .dock-prev { left: 4px; }
    [data-style] .dock-next { right: 4px; }
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  @container libcats (min-width: 600px) {
    [data-style] .dk { transform: rotate(var(--r0)); transition: none; }
    [data-style] .dk:is(:hover, :focus-visible) { outline: 2px solid var(--ctl-ring); outline-offset: 4px; }
  }
}
/* #65's prints per look: Heritage from archive-theme.css (--g-print*: cream with #61's bloom in dark, #FFFDF8 with L1's amber bloom in light, #74); Classic's ink and shadow. */
:root[data-style="classic"] .lib-dock { --print-ink: #12252E; --print-shadow: 0 6px 14px -8px rgba(20,24,28,.35); }
:root[data-style="classic"][data-theme="dark"] .lib-dock { --print-shadow: 0 10px 22px -8px rgba(0,0,0,.7); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .lib-dock { --print: var(--g-print); --print-shadow: var(--g-print-shadow); } /* #74: light #FFFDF8 with L1's amber bloom */
@media (prefers-color-scheme: dark) {
  :root[data-style="classic"]:not([data-theme="light"]) .lib-dock { --print-shadow: 0 10px 22px -8px rgba(0,0,0,.7); }
}
@media (prefers-reduced-motion: reduce) { [data-style] .dk .ph > picture.dk-next { transition: none; } }

/* Round 4 #54 (spec §5.3c): a category's Inside as doors in the Pictures view: 16:10 (shorter than Library's, so the files
   stay near), at least 220 × k wide; past 12 the 12th is "Show all N" (the light card). Phone: two a row (min 150 px) at
   4:3, one a row at Larger. */
[data-style] .inside-doors { grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(220px * var(--k))), 1fr)); }
[data-style] .inside-doors .cat-door, [data-style] .inside-doors .cat-door.bare { min-height: 0; aspect-ratio: 16 / 10; }
[data-style] .inside-doors .door[hidden] { display: none; }
[data-style] .inside-doors .door .in { padding: 16px 18px; overflow: hidden; justify-content: safe flex-end; } /* safe: overflow goes down, never off the top */
/* The last step of the fit (archive-look.js): three lines and an ellipsis, with room above and below the letters. */
[data-style] .inside-doors .card-t.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; line-height: 1.25; padding-block: .08em; }
[data-style] .inside-all { width: 100%; font: inherit; text-align: left; cursor: pointer; }
[data-style] .inside-all:hover { border-color: var(--line-strong); }
[data-style] .inside-all:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 860px) {
  [data-style] .inside-doors { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  [data-style] .inside-doors .cat-door, [data-style] .inside-doors .cat-door.bare { aspect-ratio: 4 / 3; }
  [data-style] .inside-doors .door .in { padding: 12px 14px; }
  :root[data-style][data-text="larger"] .inside-doors { grid-template-columns: minmax(0, 1fr); }
}
/* #40 doors review: on a computer Library's filter row lines up with the title again (the Manage sheet's padding 0 is for
   its own bars); the full-width scroller with its 16 px gutter is the phone's. */
@media (min-width: 861px) { :root[data-style] .sticky-head .filterbar { padding-inline: var(--s5); } }
/* The empty door: the drawer icon above its name (§5.3). */
[data-style] .cat-door.bare .in { display: flex; flex-direction: column; gap: 4px; }
[data-style] .cat-door .door-icon { color: var(--ctl-icon); width: calc(28px * var(--k)); height: calc(28px * var(--k)); margin-bottom: 6px; }
/* #40 final: on a phone Activity's (and Members', Categories') wrapped filter bar ends 16 px from the edge, as its list;
   Categories' stacked rows hold their words 16 px inside the box. */
@media (max-width: 860px) { :root[data-style] main form.filterbar[action] { padding-right: 16px; box-sizing: border-box; } }
@media (max-width: 1023px) { :root[data-style] .mgr-row { padding-inline: 16px; } }

/* ---------- Home in the person's app layout (spec §5.1b, W3b) ---------- */
/* The app's iPad rule made responsive: 4 columns from 1100 px of content (1440's page is ~1,170), 2 below; Small 1, Wide 2, Large 2 × 2 (full
   width below 1180, double height); rows at least 200 × k; a later Small may move up into a hole. */
[data-style] .hl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; grid-auto-flow: row dense; gap: 20px; }
/* #106 (web-design 11.11): the 200 × k minimum is the tiles', not the rows', so the Quick actions block's row is as tall as
   its tiles and the next item follows at the grid's gap. */
[data-style] .hl-grid > :not(.hl-quick) { min-height: calc(200px * var(--k)); }
[data-style] .hl-item { min-width: 0; min-height: 0; }
[data-style] .hl-wide { grid-column: span 2; }
[data-style] .hl-large { grid-column: span 2; grid-row: span 2; }
@container (max-width: 1099px) {
  [data-style] .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  [data-style] .hl-wide, [data-style] .hl-large { grid-column: 1 / -1; }
}
@container (max-width: 599px) { :root[data-style][data-text="larger"] .hl-item { grid-column: 1 / -1; } }
[data-style] .hl-grid .door.hl-small { min-height: 0; height: 100%; }
[data-style] .hl-grid .home-card.hl-small { flex-direction: column; justify-content: space-between; }
/* Wide and Large: a card with the widget's overline, its pictures, its words and an "Open" control (no gold). */
[data-style] section.hl-item { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--card-fill); border: 1px solid var(--line); border-radius: 16px; }
[data-style] .hl-pic { position: relative; flex: 1 1 auto; min-height: calc(140px * var(--k)); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
[data-style] .hl-pic picture, [data-style] .hl-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-style] .hl-pic img { filter: var(--photo); transition: filter .3s; }
[data-style] .hl-item:hover .hl-pic img { filter: none; }
[data-style] .hl-files { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 8px; }
[data-style] .hl-files .pic { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
[data-style] .hl-files img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); transition: filter .3s; }
[data-style] .hl-files .file:hover img, [data-style] .hl-files .file:focus-visible img { filter: none; }
[data-style] .hl-decades { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
[data-style] .hl-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
[data-style] .hl-foot .ctl { flex: none; }
[data-style] .hl-decades .dec { width: auto; }
[data-style] .hl-text { margin: 0; color: var(--ink-2); font-size: var(--fs-body); line-height: 1.5; }
/* Controls (they open, play or page; no gold): a row of ctl pills; ‹ › as round ones. On a phone Large keeps its first. */
[data-style] .hl-ctls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
[data-style] .hl-ctls .ctl.icon { width: calc(44px * var(--k)); padding: 0; justify-content: center; }
[data-style] .hl-ctls .ctl:disabled { opacity: .4; cursor: default; }
[data-style] .hl-ctls .ctl.quiet { background: none; border-color: transparent; color: var(--ink-2); }
@container (max-width: 599px) { [data-style] .hl-large .hl-ctls > :not(:first-child):not([data-not-now]) { display: none; } }
/* ---------- Stewart's Home (spec §5.1d): Quick actions, the Library hero, the know strip ---------- */
/* Quick actions: a run of action kinds as one block over the grid's width, a centred overline between two rules fading
   outwards; tiles 4 a row (2 under 600 px, 1 at Larger there), an accent icon over the label, never broken inside a word. */
[data-style] section.hl-item.hl-quick { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; padding: 0; background: none; border: 0; border-radius: 0; }
[data-style] .hl-quick-h { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; }
[data-style] .hl-quick-h span { flex: none; white-space: nowrap; }
[data-style] .hl-quick-h::before, [data-style] .hl-quick-h::after { content: ""; flex: 0 1 160px; min-width: 16px; height: 1px; }
[data-style] .hl-quick-h::before { background: linear-gradient(to left, var(--line), transparent); }
[data-style] .hl-quick-h::after { background: linear-gradient(to right, var(--line), transparent); }
/* #106 rule 3 (web-design 11.11): balanced rows, the count per row from the block (--qa-wide from 1000 px of content, --qa-mid
   from 600); the tiles share their row, so the last row has no hole and no lone full-width tile. Under 600: 2 a row. */
[data-style] .hl-qa { --qa-n: var(--qa-mid, 3); display: flex; flex-wrap: wrap; gap: 12px; }
@container (min-width: 1000px) { [data-style] .hl-qa { --qa-n: var(--qa-wide, 4); } }
[data-style] .hl-qa > * { flex: 1 1 calc((100% - (var(--qa-n) - 1) * 12px) / var(--qa-n)); min-width: 0; }
[data-style] .hl-qt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; min-height: calc(112px * var(--k));
  margin: 0; padding: 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card-fill); color: var(--ink); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
[data-style] .hl-qt:hover { background: var(--soft); }
[data-style] .hl-qt:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .hl-qt .i { flex: none; width: calc(26px * var(--k)); height: calc(26px * var(--k)); color: var(--accent); }
[data-style] .hl-qt-t { font: 600 calc(18px * var(--kt))/1.2 var(--display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: manual; }
@container (max-width: 599px) { [data-style] .hl-qa { --qa-n: 2; } :root[data-style][data-text="larger"] .hl-qa { --qa-n: 1; } }
@container (min-width: 600px) { :root[data-style][data-text="larger"] .hl-qa { --qa-n: 2; } }
/* Row mode (Larger): the icon beside the label, left-aligned, 64 × k high (web-design 04.11). */
:root[data-style][data-text="larger"] .hl-qa .hl-qt { flex-direction: row; justify-content: flex-start; text-align: left; gap: 14px; min-height: calc(64px * var(--k)); padding: 16px; }
/* The phone feature's dialog: where it is in the app, and Add files here instead. */
[data-style] .hl-phone-in { display: grid; gap: 8px; padding: 24px; }
[data-style] .hl-phone-in h2 { margin: 0; font: var(--title-w) calc(24px * var(--kt))/1.25 var(--display); }
[data-style] .hl-phone-what { margin: 0; font-weight: 600; }
[data-style] .hl-phone-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* The Library hero: the cover right-aligned over 60 % of the card, fading in from the fill (opaque at 40 %, clear at
   62 %), the words on the left (at most 52 %); ▶/❚❚ at the bottom right, beside the card's one link. */
[data-style] .hl-hero-wrap { position: relative; min-width: 0; }
[data-style] .hl-hero { position: relative; display: flex; flex-direction: row; height: 100%; min-height: calc(150px * var(--k)); box-sizing: border-box; border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; background: var(--card-fill); color: var(--ink); text-decoration: none; }
[data-style] .hl-hero:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .hl-hero-pic { position: absolute; inset: 0 0 0 40%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36.7%); mask-image: linear-gradient(to right, transparent 0, #000 36.7%); }
[data-style] .hl-hero-pic picture, [data-style] .hl-hero-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-style] .hl-hero-pic img { filter: var(--photo); transition: filter .3s; }
[data-style] .hl-hero:hover .hl-hero-pic img, [data-style] .hl-hero:focus-visible .hl-hero-pic img { filter: none; }
[data-style] .hl-hero-pic > picture.rot-next { opacity: 0; transition: opacity .8s ease; }
[data-style] .hl-hero-pic > picture.rot-next.on { opacity: 1; }
[data-style] .hl-hero-t { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; max-width: 52%; padding: 22px 24px; box-sizing: border-box; }
[data-style] .hl-hero-t .i { width: calc(26px * var(--k)); height: calc(26px * var(--k)); margin-bottom: 6px; color: var(--accent); }
[data-style] .hl-hero-t b { font: 600 calc(34px * var(--kt))/1.1 var(--display); }
[data-style] .hl-hero-t i { font: italic 500 calc(19px * var(--kt))/1.3 var(--display); color: var(--ink-2); }
/* ▶ sits in a box the size of the card, or of the photo when the hero stacks, at its bottom right. */
[data-style] .hl-hero-ctl { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
[data-style] .hl-hero-play { pointer-events: auto; position: absolute; right: 14px; bottom: 14px; width: calc(44px * var(--k)); height: calc(44px * var(--k)); background: rgba(21, 16, 13, .55); border: 1.5px solid var(--primary); color: #FFF7EA; }
[data-style] .hl-hero-play:hover { background: rgba(21, 16, 13, .7); }
[data-style] .hl-hero-play .pause, [data-style] .hl-hero-wrap.playing .hl-hero-play .play { display: none; }
[data-style] .hl-hero-wrap.playing .hl-hero-play .pause { display: inline; }
@media (prefers-reduced-motion: reduce) { [data-style] .hl-hero-pic > picture.rot-next { transition: none; } }
/* Photo of the day Wide as the same hero (web-design 04.11): the overline, a 20 × 2 bar, the caption in display 22 × kt,
   View Photo →; under 600 px and at Larger the photo on top, 16:9. */
[data-style] .hl-hero-bar { display: block; width: 20px; height: 2px; margin: 6px 0 4px; border-radius: 1px; background: var(--primary); }
[data-style] .hl-hero-cap { font: 600 calc(22px * var(--kt))/1.25 var(--display); overflow-wrap: anywhere; }
[data-style] .hl-hero-view { align-self: flex-start; margin-top: 10px; pointer-events: none; }
[data-style] .hl-hero-wrap.day .hl-hero-t .meta { color: var(--ink-2); }
/* Under 600 px and at Larger every hero stacks (the app's §9.3): the photo on top at 16:9, the words under it, ▶ on the photo. */
@container (max-width: 599px) {
  [data-style] .hl-hero-wrap .hl-hero { flex-direction: column; }
  [data-style] .hl-hero-pic { position: relative; inset: auto; aspect-ratio: 16 / 9; -webkit-mask-image: none; mask-image: none; }
  [data-style] .hl-hero-t { max-width: none; }
  [data-style] .hl-hero-ctl { inset: 0 0 auto; aspect-ratio: 16 / 9; }
}
:root[data-style][data-text="larger"] .hl-hero-wrap .hl-hero { flex-direction: column; }
:root[data-style][data-text="larger"] .hl-hero-pic { position: relative; inset: auto; aspect-ratio: 16 / 9; -webkit-mask-image: none; mask-image: none; }
:root[data-style][data-text="larger"] .hl-hero-t { max-width: none; }
:root[data-style][data-text="larger"] .hl-hero-ctl { inset: 0 0 auto; aspect-ratio: 16 / 9; }
/* "Do you know this photo?" at Wide: a strip inset 26 × k from the item's edges, the thumbnail (a hint, so cropped), a
   rule, the overline and the line, an accent arrow; the whole strip one link. */
[data-style] .hl-strip-in { display: flex; flex-direction: row; align-items: center; gap: 16px; width: 100%; }
[data-style] .card.hl-strip { container: knowstrip / inline-size; display: block; align-self: center; margin-inline: calc(26px * var(--k)); min-height: calc(104px * var(--k)); padding: 10px 18px 10px 10px;
  box-sizing: border-box; border: 1px solid var(--line); border-radius: 16px; background: var(--card-fill); color: var(--ink); text-decoration: none; }
[data-style] .hl-strip:hover { background: var(--soft); }
[data-style] .hl-strip:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .hl-strip-pic { position: relative; flex: none; width: calc(132px * var(--k)); height: calc(84px * var(--k)); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
[data-style] .hl-strip-pic picture, [data-style] .hl-strip-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-style] .hl-strip-pic img { filter: var(--photo); }
[data-style] .hl-strip:hover .hl-strip-pic img, [data-style] .hl-strip:focus-visible .hl-strip-pic img { filter: none; }
[data-style] .hl-strip-t { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; padding-left: 16px; border-left: 1px solid var(--line); }
[data-style] .hl-strip-t .over { color: var(--accent); }
[data-style] .hl-strip-l { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[data-style] .hl-strip .go { flex: none; color: var(--accent); }
@container (max-width: 599px) { [data-style] .card.hl-strip { margin-inline: 0; } }
/* The strip, narrow (web-design 04.11): the text column under 240 × k, so the thumbnail goes on top and nothing is cut. */
@container knowstrip (max-width: 455px) { :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .hl-strip-in { flex-direction: column; align-items: stretch; gap: 12px; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .hl-strip-pic { width: 100%; height: auto; aspect-ratio: 16 / 9; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .hl-strip-t { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .hl-strip-l { display: block; overflow: visible; } :root[data-style]:not([data-text="large"]):not([data-text="larger"]) .hl-strip .go { align-self: flex-end; } }
@container knowstrip (max-width: 548px) { :root[data-style][data-text="large"] .hl-strip-in { flex-direction: column; align-items: stretch; gap: 12px; } :root[data-style][data-text="large"] .hl-strip-pic { width: 100%; height: auto; aspect-ratio: 16 / 9; } :root[data-style][data-text="large"] .hl-strip-t { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); } :root[data-style][data-text="large"] .hl-strip-l { display: block; overflow: visible; } :root[data-style][data-text="large"] .hl-strip .go { align-self: flex-end; } }
@container knowstrip (max-width: 641px) { :root[data-style][data-text="larger"] .hl-strip-in { flex-direction: column; align-items: stretch; gap: 12px; } :root[data-style][data-text="larger"] .hl-strip-pic { width: 100%; height: auto; aspect-ratio: 16 / 9; } :root[data-style][data-text="larger"] .hl-strip-t { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); } :root[data-style][data-text="larger"] .hl-strip-l { display: block; overflow: visible; } :root[data-style][data-text="larger"] .hl-strip .go { align-self: flex-end; } }
/* Slideshows (Favourites L, a category W): the doors' turn of pictures, every 8 s. */
[data-style] .hl-pic > picture.rot-next { opacity: 0; transition: opacity .8s ease; }
[data-style] .hl-pic > picture.rot-next.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { [data-style] .hl-pic > picture.rot-next { transition: none; } }
/* #57 Do you know this photo? (spec §5.1c): the whole photo as one #46 print, never cropped, at one fixed −2° (reduced
   motion changes nothing), centred on the box's --soft ground with 16 px × k of ground at the tightest side. The box is a
   size container; the print's picture is as wide as both the box's width and its height allow at the photo's own ratio
   (--ar, set from the preview). Wide: the box is the card's left half, the row's height; Large: the top two thirds; a
   phone: full width, 220 px × k high, the question under it. */
[data-style] .hl-pic.hl-print { container-type: size; display: grid; place-items: center; background: var(--soft); min-height: calc(220px * var(--k)); }
[data-style] .hl-print .print { display: block; padding: calc(6px * var(--k)) calc(6px * var(--k)) calc(16px * var(--k)); background: var(--print); border: 1px solid var(--print-edge);
  box-shadow: var(--shadow); transform: rotate(-2deg); line-height: 0; }
[data-style] .hl-pic.hl-print picture, [data-style] .hl-pic.hl-print img { position: static; inset: auto; display: block; }
[data-style] .hl-pic.hl-print picture { aspect-ratio: var(--ar, 4 / 3);
  width: min(calc(100cqw - 44px * var(--k) - 2px), calc((100cqh - 54px * var(--k) - 2px) * var(--ar, 1.3333))); }
[data-style] .hl-pic.hl-print img { width: 100%; height: 100%; object-fit: contain; }
[data-style] .hl-item:focus-within .hl-print img { filter: none; }
[data-style] .hl-wide.hl-k-know_photo:has(> .hl-print) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; }
[data-style] .hl-wide > .hl-print { grid-column: 1; grid-row: 1 / span 2; min-height: calc(200px * var(--k) - 36px); }
[data-style] .hl-wide.hl-k-know_photo:has(> .hl-print) > .hl-head { grid-column: 2; grid-row: 1; }
[data-style] .hl-wide.hl-k-know_photo:has(> .hl-print) > .hl-foot { grid-column: 2; grid-row: 2; align-self: end; }
[data-style] .hl-large > .hl-print { flex: 1 1 0; min-height: calc(300px * var(--k)); } /* the rest of the card after the head and the words (the card grows to hold them): about its top two thirds */
@container (max-width: 599px) {
  [data-style] .hl-wide.hl-k-know_photo:has(> .hl-print) { display: flex; }
  [data-style] .hl-wide > .hl-print, [data-style] .hl-large > .hl-print { flex: 0 0 auto; height: calc(220px * var(--k)); min-height: 0; }
}
/* Years ago: Large's captions under its prints. */
[data-style] .hl-year { display: grid; gap: 12px; }
[data-style] .hl-year[hidden] { display: none; }
[data-style] .hl-cap { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A person: their portrait in the ring (Small), or beside the words (Meet, Wide). */
[data-style] .ring.hl-face { overflow: hidden; padding: 0; }
[data-style] .ring.hl-face .gn-face { width: 100%; height: 100%; display: block; }
[data-style] .hl-face-lg { display: block; width: calc(120px * var(--k)); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
[data-style] .hl-face-lg .gn-face { width: 100%; height: 100%; display: block; }
/* Listen: the memories' rows, with the play disc as a control (no gold). */
[data-style] .hl-listen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
[data-style] .hl-listen .memory { grid-template-columns: auto minmax(0, 1fr); background: var(--surface-2); border-color: var(--line); }
[data-style] .hl-listen .memory.playing { background: var(--ctl-pressed); border-color: var(--ctl-edge); }
[data-style] .hl-listen .memory-play { width: calc(56px * var(--k)); height: calc(56px * var(--k)); background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ctl-icon); }
[data-style] .hl-listen .memory-sub .i { vertical-align: -2px; margin-right: 4px; }
/* "Change Home in the app": quiet, under the grid. */
[data-style] .hl-app { margin: 16px 0 0; color: var(--ink-2); font-size: var(--fs-label); display: flex; align-items: center; gap: 6px; }
[data-style] .hl-item[hidden] { display: none; }
/* ---------- The family's mark (spec §4.4, Karol 2026-11-03) ---------- */
/* The archive's site icon as a rounded tile beside its name: never toned, a fine ring inside, a soft shadow in light. */
[data-style] .fam-mark { position: relative; flex: none; display: inline-block; width: calc(44px * var(--kt)); height: calc(44px * var(--kt)); border-radius: 22.5%; overflow: hidden; }
[data-style] .fam-mark img { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; }
[data-style] .fam-mark::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
:root[data-style][data-theme="light"] .fam-mark { box-shadow: var(--shadow-1); }
@media (prefers-color-scheme: light) { :root[data-style]:not([data-theme]) .fam-mark { box-shadow: var(--shadow-1); } }
[data-style] .fam-mark.sm { width: 28px; height: 28px; }
[data-style="heritage"] .rail-brand .brand-heritage:has(.fam-mark) { display: flex; align-items: flex-start; gap: 12px; }
[data-style="classic"] .rail-brand .brand-classic:has(.fam-mark) { display: flex; align-items: center; gap: 12px; }
[data-style] .brand-phone:has(.fam-mark) { display: inline-flex; align-items: center; gap: 8px; }
@media print { [data-style] .fam-mark { display: none; } }
/* The mark with the name as one group (web-design): on the phone centred in the bar, the name wrapping first, the tile beside
   it; in the column (both styles) the tile on the name's first line. */
@media (max-width: 860px) {
  [data-style] .brand-phone:has(.fam-mark) { justify-self: center; width: fit-content; max-width: 100%; min-width: 0; }
  [data-style] .brand-phone:has(.fam-mark) .name { flex: 0 1 auto; min-width: 0; text-align: left; }
}
[data-style="classic"] .rail-brand .brand-classic:has(.fam-mark) { align-items: flex-start; }
[data-style="classic"] .rail-brand .brand-classic:has(.fam-mark) .name { margin-top: calc((44px * var(--kt) - 1.2em) / 2); }
@media (max-width: 860px) {
  /* The name's box no wider than its two balanced lines, so the group (tile + name) sits in the bar's real centre. */
  [data-style] .brand-phone:has(.fam-mark) .name { text-wrap: balance; } /* archive-look.js narrows its box to the longest line */
}
/* ---------- W8 (spec §5.7): the pages before sign-in, with the archive's new look On (archive/auth.blade.php) ---------- */
/* Heritage in the device's scheme; the family's mark (72 px) or the sprig over its name on the radial glow; the studio's
   form partials (site/forms/*) as the new look's fields, labels above them, one gold button, the quiet links. */
[data-style] .auth-page { min-height: 100dvh; }
[data-style] .auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px 32px; box-sizing: border-box; }
[data-style] .auth-card { width: min(calc(420px * var(--k)), 100%); display: grid; gap: 16px; }
[data-style] .auth-brand { display: grid; justify-items: center; gap: 14px; text-align: center; margin-bottom: 8px; }
[data-style] .auth-mark { width: 72px; height: 72px; }
[data-style] svg.auth-sprig { width: calc(44px * var(--kt)); height: calc(44px * var(--kt)); color: var(--accent); }
[data-style] .auth-name { margin: 0; font: var(--title-w) calc(34px * var(--kt))/1.15 var(--display); color: var(--ink); text-wrap: balance; }
/* The family's name in capitals ("HARTLEY FAMILY LEGACY", web-design 04.11): the column tree's caps rule (#52, §5.3c) where the
   name is drawn large (this card, the column, the phone's top bar): .86 em of the name's own size, .045 em tracking, the
   same font and weight. Decided on the server (App\Support\Caps::name), so nothing jumps; mixed-case names untouched. */
[data-style] .caps-name { font-size: .86em; letter-spacing: .045em; }
[data-style] .auth-h { margin: 0; text-align: center; font: 600 var(--fs-label)/1.3 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
[data-style] .auth-card .intro { margin: 0; color: var(--ink-2); font-size: var(--fs-body); line-height: 1.5; text-align: center; }
[data-style] .auth-card .message { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
[data-style] .auth-card form { display: grid; gap: 8px; }
[data-style] .auth-card form label.sr-only { position: static !important; width: auto; height: auto; margin: 8px 0 0; clip: auto; clip-path: none; overflow: visible; white-space: normal;
  font: 600 var(--fs-label)/1.3 var(--text); color: var(--ink-2); }
[data-style] .auth-card .field { box-sizing: border-box; width: 100%; min-height: calc(52px * var(--k)); padding: 0 16px; border-radius: 14px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge);
  color: var(--ink); font: 400 var(--fs-body)/1.3 var(--text); }
[data-style] .auth-card .field:hover { border-color: var(--line-strong); }
[data-style] .auth-card .field:focus-visible { border-color: var(--focus); }
[data-style] .auth-card .field::placeholder { color: transparent; } /* the label above says it */
[data-style] .auth-card .submit { margin-top: 12px; min-height: calc(48px * var(--k)); border-radius: 999px; border: 1px solid var(--primary-edge, transparent); background: var(--primary-fill); color: var(--on-primary);
  font: 700 var(--fs-label)/1.2 var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
[data-style] .auth-card .submit:hover { filter: brightness(1.05); }
[data-style] .auth-card .submit:active { transform: scale(.98); }
[data-style] .auth-card .submit[disabled] { opacity: .5; }
[data-style] .auth-card .keep { display: flex; align-items: center; gap: 10px; min-height: calc(44px * var(--k)); color: var(--ink-2); font-size: var(--fs-label); }
[data-style] .auth-card .keep[hidden] { display: none; }
[data-style] .auth-card .keep input { flex: none; margin: 0; }
/* Checkboxes in the look's colour and size (web-design, WS19): sign-in, and the new family event's "Also add it to the tree". */
[data-style] .auth-card input[type="checkbox"], [data-style] .ev-tree input[type="checkbox"] { accent-color: var(--primary); width: calc(20px * var(--k)); height: calc(20px * var(--k)); }
[data-style] .auth-card .help { text-align: center; color: var(--ink-2); font-size: var(--fs-label); background: none; border: 0; padding: 0; margin: 0; box-shadow: none; }
[data-style] .auth-card a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
[data-style] .auth-card a:hover { text-decoration-thickness: 2px; }
[data-style] .auth-card .help a { display: inline-flex; align-items: center; min-height: calc(44px * var(--k)); }
/* An archive's 403 and 404 in the new look (WS24): the same card, the title in display, what to do now as a list. */
[data-style] .err-t { margin: 0; text-align: center; font: var(--title-w) calc(30px * var(--kt))/1.2 var(--display); color: var(--ink); text-wrap: balance; }
[data-style] .err-todo { margin: 0; padding-left: 1.25rem; display: grid; gap: 6px; color: var(--ink-2); }
[data-style] .auth-card a.submit { text-decoration: none; color: var(--on-primary); }
/* web-design's W3b review: one anatomy (the overline and the pill that opens on one row, the content, a title only when it is
   new, the actions); strips of equal pictures filling one row (5 at Wide, 4 a row at Large, 3 on a phone), extras dropped;
   meta lines on the titles' edge; Coming up as a list; a person without photos as the mount and a line. */
[data-style] .hl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: calc(44px * var(--k)); }
[data-style] .hl-head .over { margin: 0; min-width: 0; }
[data-style] .hl-head .ctl { flex: none; padding: 0 12px 0 16px; }
[data-style] .hl-item .meta { padding: 0; display: block; }
[data-style] .hl-wide .hl-files > :nth-child(n+6), [data-style] .hl-wide .hl-decades > :nth-child(n+6) { display: none; }
[data-style] .hl-large .hl-files > :nth-child(n+9), [data-style] .hl-large .hl-decades > :nth-child(n+9) { display: none; }
@container (max-width: 599px) {
  [data-style] .hl-files, [data-style] .hl-decades { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-style] .hl-wide .hl-files > :nth-child(n+4), [data-style] .hl-wide .hl-decades > :nth-child(n+4) { display: none; }
  [data-style] .hl-large .hl-files > :nth-child(n+7), [data-style] .hl-large .hl-decades > :nth-child(n+7) { display: none; }
}
[data-style] .hl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
[data-style] .hl-list li { display: grid; gap: 2px; }
[data-style] .hl-list a { color: inherit; text-decoration: none; }
[data-style] .hl-list a:hover .card-t { text-decoration: underline; }
[data-style] .hl-list .card-t { font-size: calc(20px * var(--kt)); }
[data-style] .hl-empty { margin: 0; }
[data-style] .hl-face-lg { display: grid; place-items: center; }
[data-style] .hl-initials { font: var(--title-w) calc(40px * var(--kt))/1 var(--display); color: var(--ink-2); }
[data-style] .hl-ctls .ctl.ghost { background: none; }
[data-style] .hl-face-lg { text-decoration: none; }
/* web-design: the content sits under the head; when the card is taller than it, the room goes at the bottom (a picture grows). */
[data-style] section.hl-item .hl-foot { margin-top: 0; }

/* ---------- Round 4 #44 (spec §5.3b): the column's category tree (A) and a column people can widen ---------- */
/* The column's width: the default is the narrowest; a width the person dragged (--col-w, per browser: the head script)
   is kept within today's range, never ignored: at most 480 × min(k, 1.2) and 40 % of the window, leaving 640 px for the
   page. Only from 1024 px; between 861 and 1023 the default. */
[data-style] .app { --rail-min: calc(clamp(260px, 18vw, 300px) * min(var(--k), 1.2));
  --rail-max: max(var(--rail-min), min(calc(480px * min(var(--k), 1.2)), 40vw, calc(100vw - 640px)));
  --rail: clamp(var(--rail-min), var(--col-w, var(--rail-min)), var(--rail-max)); }
@media (max-width: 1023px) { [data-style] .app { --rail: var(--rail-min); } }
/* Rows: one line, [chevron][name][count], 44 × k high; no icon; the count right, muted, tabular; 16 px a level on the
   dotted guide. */
[data-style] .tree-wrap .trow { display: grid; grid-template-columns: calc(22px * var(--k)) minmax(0, 1fr) auto; align-items: center; gap: 0; min-height: calc(44px * var(--k)); padding: 0 10px 0 4px; }
[data-style] .tree-wrap .trow .tog { width: calc(22px * var(--k)); height: calc(22px * var(--k)); margin: 0; align-self: center; }
[data-style] .tree-wrap .trow .tog.leaf { display: block; visibility: hidden; }
[data-style] .tree-wrap .trow > a { display: flex; align-items: center; align-self: stretch; min-width: 0; padding: 0 0 0 6px; }
[data-style] .tree-wrap .trow > a > .i { display: none; }
[data-style] .tree-wrap .trow > a:focus-visible { outline-offset: -2px; border-radius: 10px; }
[data-style] .tree-wrap .trow .label { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-style] .tree-wrap .trow .label wbr { display: none; }
[data-style] .tree-wrap .trow .label.caps { font-size: .86em; letter-spacing: .045em; font-weight: 600; }
[data-style] .tree-wrap .trow .count { align-self: center; line-height: 1.2; margin-left: 10px; color: var(--muted); font-size: calc(13.5px * var(--k)); font-variant-numeric: lining-nums tabular-nums; }
[data-style] .tree-wrap .trow.current .count { color: var(--ink-2); }
[data-style] .tree-wrap .tree .tree { margin-left: 16px; padding-left: 0; }
/* web-design's review (V1): from 861 px the rows use the column's width: the chevron sits on the dotted guide, the name
   starts where "All files" does, the count ends 12 px from the column's edge. */
@media (min-width: 861px) {
  [data-style] .nav-sub-tree .trow { margin: 0 -7px 0 calc(-19px - 11px * var(--k)); padding-right: 0; }
  [data-style] .nav-sub-tree .trow > a { padding-left: max(4px, calc(25px - 11px * var(--k))); }
}
/* Round 4 #52 (spec §5.3c): one rule per level. The name and the count share a baseline (the chevron stays centred); the
   size is the same at every level, 16 × k in the face's measure (--fs-label is 18 × k × fa), the weight 600 at the top
   level and 500 below, capitals by name at every level with that level's weight, the current row too. One count column:
   4ch, right-aligned, ending 12 px inside the scroll area at every level; from 861 px the row's box (the current row's
   tint and ring) runs from its chevron's gutter to the scroll area's edge (the rail's 18 px padding), the count inside it. */
[data-style] .tree-wrap .trow { align-items: baseline; }
[data-style] .tree-wrap .trow .tog { align-self: center; }
[data-style] .tree-wrap .trow > a, [data-style] .tree-wrap .trow.current > a { align-self: baseline; min-height: calc(44px * var(--k)); font: 600 calc(var(--fs-label) * 16 / 18)/1.25 var(--text); }
[data-style] .tree-wrap .tree .tree .trow > a { font-weight: 500; }
[data-style] .tree-wrap .trow .label.caps { font-weight: inherit; }
[data-style] .tree-wrap .trow .count { align-self: baseline; min-width: 4ch; text-align: right; }
@media (min-width: 861px) {
  [data-style] .nav-sub-tree .trow { margin-right: -18px; padding-right: 12px; }
}
/* web-design (3.11, seen at 1440 Larger): "To look at" never breaks; when the row is too narrow, its count ("Nothing", or the
   badge) goes under it, at the right. The search field grows with the text size (the full placeholder fits at Larger). */
[data-style] .nav a.look { flex-wrap: wrap; row-gap: 0; padding-top: 4px; padding-bottom: 4px; }
[data-style] .nav a.look > span:not(.badge):not(.quiet) { white-space: nowrap; }
[data-style] .nav a.look > .quiet, [data-style] .nav a.look > .badge { margin-left: auto; }
[data-style] .app > .topbar .search { max-width: calc(560px * var(--k)); }
[data-style] .tree-wrap .tree-filter input { min-height: calc(44px * var(--k)); padding-left: calc(14px + 22px * var(--k)); }
[data-style] .tree-wrap .tree-filter .i { left: 12px; top: 50%; transform: translateY(-50%); }
/* The whole name beside the column, when the row cuts it (archive-look.js): hover 400 ms or focus. */
[data-style] .col-tip { position: fixed; z-index: 60; max-width: 320px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--ctl-edge); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12); color: var(--ink); font: 400 var(--fs-meta)/1.35 var(--text); overflow-wrap: break-word; pointer-events: none; }
[data-style] .col-tip[hidden] { display: none; }
/* The handle: an 8 px strip on the column's right edge, full height; a fine line at rest, the ring's colour 2 px on hover,
   drag and focus. A grid item of .app, so it stays put while the column scrolls. */
[data-style] .col-handle { grid-column: 1; grid-row: 1 / -1; justify-self: end; position: relative; z-index: 4; width: 8px; margin-right: -4px; cursor: col-resize; touch-action: none; outline: none; }
[data-style] .col-handle::after { content: ""; position: absolute; inset: 0 auto 0 50%; width: 1px; transform: translateX(-50%); background: var(--line); }
[data-style] .col-handle:hover::after, [data-style] .col-handle.dragging::after, [data-style] .col-handle:focus-visible::after { width: 2px; background: var(--ctl-ring); }
[data-style] .col-handle:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ctl-ring); border-radius: 4px; }
:root[data-style].col-dragging, :root[data-style].col-dragging * { transition: none !important; user-select: none !important; cursor: col-resize !important; }
@media (max-width: 1023px) { [data-style] .col-handle { display: none; } }
@media print { [data-style] .col-handle, [data-style] .col-tip { display: none; } }
/* ---------- Round 4 #47 (spec §4.5): quiet scrollbars, and a resize handle people can see ---------- */
/* The bars of the column, the main area, popovers, sheets and the life picker (not the viewer's stage): a transparent
   track, a thumb faint at rest (never gone, so it can be found and dragged), brighter while the pointer is over the area,
   for 1 s after a scroll (.is-scrolling, archive-look.js) and while dragged. Only with a mouse; phones keep their overlay
   bars, and forced colours the system's. Chromium and Safari draw a 4 px thumb in a 12 px bar (6 px when bright); Firefox
   its thin bar (Chromium would take scrollbar-color over the -webkit- bar, so Firefox only). */
@media (hover: hover) and (pointer: fine) and (forced-colors: none) {
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body)::-webkit-scrollbar { width: 12px; height: 12px; }
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body)::-webkit-scrollbar-track,
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body)::-webkit-scrollbar-corner { background: transparent; }
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body)::-webkit-scrollbar-thumb {
    border: 4px solid transparent; border-radius: 999px; background-color: var(--scroll-thumb); background-clip: padding-box; }
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body):is(:hover, .is-scrolling)::-webkit-scrollbar-thumb,
  [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body)::-webkit-scrollbar-thumb:active { border-width: 3px; background-color: var(--scroll-thumb-hover); }
  @supports not selector(::-webkit-scrollbar) {
    [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body) { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
    [data-style] :is(.rail, .main, .details, .search-hint, .menu, .lib-filters, .tl-picker, .sheet, .pk-list, .dlg-body):is(:hover, .is-scrolling) { scrollbar-color: var(--scroll-thumb-hover) transparent; }
  }
  /* The column keeps the bar's room, so names don't move when it appears. */
  [data-style] .rail { scrollbar-gutter: stable; }
}
/* The column's edge: [scroll area][the 8 px handle]. The column's own border becomes the handle's strip (transparent, on
   the column's wash), so its bar ends 8 px before the edge; the handle draws the 1 px --line edge on the strip's right. */
@media (min-width: 1024px) {
  [data-style] .rail { border-right: 8px solid transparent; }
  [data-style] .col-handle { margin-right: 0; }
  [data-style] .col-handle::after { inset: 0 0 0 auto; transform: none; }
  /* Focus and drag: one 2 px ring edge and the pill (web-design), not #44's ring around the strip as well. */
  [data-style] .col-handle:focus-visible { box-shadow: none; }
}
/* #66 (spec §4.9 point 1, every look): a place's row is as wide as the column's scroll area (the rail's 18 px padding, as the
   tree's rows), its count, badge or "Nothing" inside it 12 px from that edge, so the current place's pill spans the icon,
   the word, the chevron and the count (it used to stop before Library's count, which hung out by 20 px). */
@media (min-width: 861px) {
  [data-style] .rail .nav > li > :is(a, button.navlink), [data-style] .rail .nav .nav-sub a { width: calc(100% + 18px); margin-right: -18px; padding-right: 12px; box-sizing: border-box; }
}
/* The grip: three 3 px dots 6 px apart on the edge at the column's middle; on hover (after 120 ms), keyboard focus and
   while dragging a 20 × 44 pill with ↔, at the pointer's height on hover (--grip-y, archive-look.js), the middle on focus. */
[data-style] .col-grip { position: absolute; right: 0; top: var(--grip-y, 50%); z-index: 1; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 20px; height: 44px; transform: translate(50%, -50%); border: 1px solid transparent; border-radius: 999px; pointer-events: none; color: var(--ctl-icon);
  transition-property: background-color, border-color, box-shadow; transition-duration: 0s; }
[data-style] .col-grip::before { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 15px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--line-strong) 70%, transparent) 1.5px, transparent 1.6px) center top / 3px 6px repeat-y; }
[data-style] .col-grip .i { width: 7px; height: 14px; opacity: 0; }
[data-style] .col-grip::before, [data-style] .col-grip .i { transition: opacity 0s; }
[data-style] .col-handle:is(:hover, :focus-visible, .dragging) .col-grip { background-color: var(--surface); border-color: var(--ctl-edge); box-shadow: var(--shadow-1); transition-delay: .12s; }
[data-style] .col-handle:is(:hover, :focus-visible, .dragging) .col-grip::before { opacity: 0; transition-delay: .12s; }
[data-style] .col-handle:is(:hover, :focus-visible, .dragging) .col-grip .i { opacity: 1; transition-delay: .12s; }
[data-style] .col-handle:focus-visible:not(:hover) .col-grip { top: 50%; }
[data-style] .col-handle.dragging .col-grip { background: linear-gradient(var(--ctl-tint), var(--ctl-tint)) var(--surface); border-color: var(--ctl-ring); transition-delay: 0s; }
/* ---------- Round 4 #44 (spec §5.3b B): the Library head, the Filters panel and the scrolled bar ---------- */
/* One row: the title (and its count) on the left; Filters, Sort, Grid | List and Select on the right, under the title
   when the page is narrow. The head scrolls away with the page. */
[data-style] .lib-head { position: static; background: none; border-bottom: 0; animation: none; }
[data-style] .lib-head .pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
[data-style] .lib-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
[data-style] .lib-title h1 { margin: 0; }
[data-style] .lib-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
[data-style] .lib-tools .badge { margin-left: 2px; background: var(--primary-fill); color: var(--on-primary); border-radius: 999px; font-weight: 700; }
[data-style] .lib-tools .ctl.ghost { background: none; border-color: transparent; }
[data-style] .lib-tools .ctl.ghost:hover { background: var(--soft); }
/* The board's one row at 1440 (a 1,170 px page); under the title only where they no longer fit beside it. */
@container (max-width: 899px) { [data-style] .lib-head .lib-tools { margin-left: 0; flex-basis: 100%; } }
/* The filters that are on, under the title row, each with ×; "Clear all" at two or more. */
[data-style] .lib-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px var(--s5) 12px; }
[data-style] .lib-chips .chip .i { margin-left: 2px; }
[data-style] .lib-clear { min-height: calc(44px * var(--k)); }
/* Filters: a popover under its button from 1024 px (archive-look.js places it), a bottom sheet below. */
[data-style] .lib-filters { position: fixed; z-index: 70; display: grid; gap: 18px; width: calc(360px * var(--k)); max-width: calc(100vw - 32px); max-height: min(72vh, 680px); overflow: auto;
  padding: 14px 18px 20px; background: var(--surface); border: 1px solid var(--ctl-edge); border-radius: 16px; box-shadow: 0 14px 44px rgba(0, 0, 0, .18); }
[data-style] .lib-filters[hidden] { display: none; }
[data-style] .lf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
[data-style] .lf-head h2 { margin: 0; font: var(--title-w) calc(24px * var(--kt))/1.2 var(--display); }
[data-style] .lf-part { display: grid; gap: 10px; }
[data-style] .lf-part h3 { margin: 0; }
[data-style] .lf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
[data-style] .lf-year { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
[data-style] .lf-year label { font: 500 var(--fs-label)/1.2 var(--text); color: var(--ink-2); }
[data-style] .lf-year .input { width: calc(7.5em * var(--k)); min-height: calc(44px * var(--k)); }
[data-style] .lf-switch { display: flex; align-items: center; gap: 10px; min-height: calc(44px * var(--k)); color: var(--ink); text-decoration: none; font: 500 var(--fs-label)/1.2 var(--text); }
[data-style] .lf-switch .sw { position: relative; flex: none; margin-left: auto; width: calc(46px * var(--k)); height: calc(28px * var(--k)); border-radius: 999px; background: var(--ctl-track); border: 1px solid var(--ctl-edge); }
[data-style] .lf-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(22px * var(--k)); height: calc(22px * var(--k)); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
[data-style] .lf-switch[aria-checked="true"] .sw { background: var(--ctl-ring); border-color: var(--ctl-ring); }
[data-style] .lf-switch[aria-checked="true"] .sw::after { transform: translateX(calc(18px * var(--k))); }
@media (max-width: 1023px) {
  [data-style] .lib-filters { inset: auto 0 0 0 !important; width: auto; max-width: none; max-height: 85vh; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
/* Scrolled: a slim opaque bar at the very top of the scroll area once the head has gone; it takes no room in the page. */
[data-style] .lib-bar { position: sticky; top: calc(-1 * var(--main-pad, 0px)); z-index: 6; height: 0; }
[data-style] .lib-bar[hidden] { display: none; }
[data-style] .lib-bar-in { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: 12px; min-height: calc(56px * var(--k)); padding: 4px var(--s5);
  background: var(--bg); border-bottom: 1px solid var(--line); animation: lib-bar-in .18s ease-out; }
@keyframes lib-bar-in { from { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { [data-style] .lib-bar-in { animation: none; } }
[data-style] .lib-bar-t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); }
[data-style] .lib-bar .lib-chips { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; overflow: hidden; padding: 0; }
[data-style] .lib-bar .lib-chips[hidden], [data-style] .lib-bar .lib-chips-n[hidden] { display: none; }
[data-style] .lib-bar .lib-chips-n { flex: 1 1 auto; white-space: nowrap; }
[data-style] .lib-bar .lib-tools { flex: none; flex-wrap: nowrap; margin-left: auto; }
/* Choosing several: the bar of actions stays under the scrolled bar. */
[data-style] .lib-bar ~ .selbar { position: sticky; top: calc(56px * var(--k) - var(--main-pad, 0px) + 8px); z-index: 5; }
/* Phone: row 1 the title and Grid | List; row 2 Filters, then Sort and Select on the right; the chips under them. */
@media (max-width: 860px) {
  [data-style] .lib-head .pagehead { align-items: center; }
  [data-style] .lib-head .titles { order: 0; flex: 1 1 0; min-width: 0; }
  [data-style] .lib-head .lib-tools { display: contents; }
  [data-style] .lib-head .lib-tools .seg { order: 1; }
  [data-style] .lib-head .lib-tools .lib-filters-btn { order: 2; }
  [data-style] .lib-head .lib-tools [data-menu^="sort-menu"] { order: 3; margin-left: auto; }
  [data-style] .lib-head .lib-tools .lib-select { order: 4; }
  [data-style] .lib-head .pagehead::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
}
[data-style] .lib-tools .sort-short { display: none; }
/* web-design's review (V2): below 600 px row 2 is Filters · Sort's short word · Select as a 44 × k circle, the chips under it. */
@media (max-width: 599px) {
  [data-style] .lib-tools .sort-long, [data-style] .lib-tools .sel-word { display: none; }
  [data-style] .lib-tools .sort-short { display: inline; }
  [data-style] .lib-head .lib-tools [data-menu^="sort-menu"] { margin-left: 0; }
  [data-style] .lib-head .lib-tools .lib-select { width: calc(44px * var(--k)); padding: 0; justify-content: center; border-radius: 50%; border-color: var(--ctl-edge); }
  [data-style] .lib-bar-in { gap: 8px; padding-inline: 16px; }
}
/* At Larger under 600 px (and Large under 380), Filters is a 44 × k circle too, its word kept for screen readers and its count on
   the circle's edge, so Filters · Sort · Select stay on one row (web-design 05.11: Select wrapped to a row of its own). */
@media (max-width: 599px) {
  :root[data-style][data-text="larger"] .lib-head .lib-tools .lib-filters-btn { position: relative; width: calc(44px * var(--k)); padding: 0; justify-content: center; border-radius: 50%; }
  :root[data-style][data-text="larger"] .lib-head .lib-tools .lib-filters-btn > span:not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :root[data-style][data-text="larger"] .lib-head .lib-tools .lib-filters-btn > .badge { position: absolute; top: -4px; right: -4px; margin: 0; }
  :root[data-style][data-text="larger"] .lib-head .lib-tools [data-menu^="sort-menu"] > .i:last-child { display: none; } /* the chevron only decorates; the menu is still announced */
}
@media (max-width: 379px) {
  :root[data-style][data-text="large"] .lib-head .lib-tools .lib-filters-btn { position: relative; width: calc(44px * var(--k)); padding: 0; justify-content: center; border-radius: 50%; }
  :root[data-style][data-text="large"] .lib-head .lib-tools .lib-filters-btn > span:not(.badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :root[data-style][data-text="large"] .lib-head .lib-tools .lib-filters-btn > .badge { position: absolute; top: -4px; right: -4px; margin: 0; }
}
/* ---------- Round 4 #45 (spec §5.2b): one Timeline place ---------- */
/* The head: "Timeline" with at most one control on its line; the segment full width under it, never beside Filters. */
[data-style] .tl-head { padding-bottom: 8px; }
[data-style] .tl-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
[data-style] .tl-title-row h1 { margin: 0; }
/* #72 (§5.2d): one height for the title row on People, Family events and Family Timeline (the h1 or the 44 × k pill), the
   right slot always kept, so nothing above the content moves when the segment changes. */
[data-style] .tl-title-row { min-height: calc(44px * var(--k)); }
[data-style] .tl-title-row > .tl-slot { flex: none; width: 1px; height: calc(44px * var(--k)); }
[data-style] .tl-filters-btn { position: relative; }
[data-style] .tl-dot { position: absolute; top: 6px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px var(--bg); }
@container (max-width: 599px) { [data-style] .tl-filters-btn .w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } [data-style] .tl-filters-btn { padding: 0; width: calc(44px * var(--k)); justify-content: center; } }
[data-style] .tl-seg { display: flex; width: 100%; box-sizing: border-box; }
[data-style] .tl-seg { flex-wrap: nowrap; }
[data-style] .tl-seg > a { flex: 1 1 auto; justify-content: center; text-align: center; padding: 0 12px; min-height: calc(44px * var(--k)); white-space: nowrap; }
:root[data-style][data-text="larger"] .tl-seg { flex-wrap: wrap; }
:root[data-style][data-text="larger"] .tl-seg > a { white-space: normal; }
/* Stewart's redesign (spec §5.2d): at Larger under 768 px the three stack, each a full-width row (the app's segStacked). */
@media (max-width: 767px) {
  :root[data-style][data-text="larger"] .tl-seg { flex-direction: column; border-radius: 22px; }
  :root[data-style][data-text="larger"] .tl-seg > a { width: 100%; }
}
/* People: Find a person on the ctl pill, then the tree as card rows (a 52 × k ringed portrait, the name in display 22 × kt,
   a chevron), two columns from 900 px of content, the order across then down. */
[data-style] .tl-find { position: relative; margin: 0 0 16px; }
[data-style] .tl-find .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ctl-icon); pointer-events: none; }
[data-style] .tl-find input { width: 100%; box-sizing: border-box; min-height: calc(52px * var(--k)); padding: 0 18px 0 calc(26px + 22px * var(--k)); border: 1px solid var(--ctl-edge);
  border-radius: 999px; background: var(--ctl-fill); color: var(--ink); font: inherit; font-size: var(--fs-body); }
[data-style] .tl-find input::placeholder { color: var(--muted); }
[data-style] .tl-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* no blue native × (as F10) */
[data-style] .tl-find input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .tl-people-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
@container (min-width: 900px) { [data-style] .tl-people-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(380px * var(--k))), 1fr)); } }
[data-style] .tl-person { display: flex; align-items: center; gap: 14px; min-height: calc(76px * var(--k)); box-sizing: border-box; height: 100%; padding: 10px 16px 10px 12px;
  background: var(--card-fill); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
[data-style] .tl-person:hover { background: var(--soft); }
[data-style] .tl-person:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .tl-pface { flex: none; display: grid; place-items: center; width: calc(52px * var(--k)); height: calc(52px * var(--k)); border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--primary); background: var(--surface-2); }
[data-style] .tl-pface svg, [data-style] .tl-pface img { width: 100%; height: 100%; filter: var(--photo); }
[data-style] .tl-pmono { font: 600 calc(17px * var(--kt))/1.6 var(--display); color: var(--accent); letter-spacing: .02em; }
[data-style] .tl-pname { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
[data-style] .tl-pname b { font: 600 calc(22px * var(--kt))/1.25 var(--display); color: var(--ink); overflow-wrap: anywhere; }
[data-style] .tl-person .go { flex: none; color: var(--ctl-icon); }
[data-style] .tl-people-none { margin: 8px 4px; color: var(--ink-2); }
/* When a filter is on: the strip under the segment, the filters in words and one Clear. */
[data-style] .tl-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: calc(52px * var(--k)); margin: -8px 0 20px; padding: 6px 16px; border-radius: 18px; background: var(--soft); color: var(--ink); }
[data-style] .tl-strip > span { flex: 1 1 auto; min-width: 0; }
[data-style] .tl-strip .i { color: var(--ctl-icon); }
/* #29: a decade's knot (a filled diamond, the label, a hairline) and a gap row (hollow, dashed). */
[data-style] .tl-dia { display: block; width: 14px; height: 14px; margin-top: 10px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
[data-style] .tl-dia.hollow { background: var(--bg); border: 1.5px solid var(--accent); box-sizing: border-box; }
[data-style] .tl-knot .tl-yr { font-size: calc(25px * var(--kt)); padding-top: 0; }
[data-style] .tl-knot-t { display: flex; align-items: center; gap: 12px; min-height: 34px; }
[data-style] .tl-knot-label { display: none; font: var(--title-w) calc(25px * var(--kt))/1 var(--display); }
[data-style] .tl-hair { flex: 1; height: 1px; background: var(--line); }
[data-style] .tl-gap .tl-node::after { border-left-style: dashed; border-left-width: 1px; }
[data-style] .tl-gap > .meta { padding-top: 8px; color: var(--muted); }
[data-style] .tl-fact { padding-top: 10px; color: var(--ink-2); font-size: var(--fs-body); }
[data-style] .tl-yr span[aria-hidden], [data-style] .tl-yr { white-space: normal; }
/* Date not known: off the line, under its own header. */
[data-style] .tl-undated-h { margin: 32px 0 12px; font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); }
[data-style] .tl-undated { display: grid; gap: 12px; max-width: 760px; }
/* Day one, nothing matching, and A life without a person. */
[data-style] .tl-empty.soft { display: grid; gap: 14px; justify-items: start; padding: 20px; background: var(--soft); max-width: 640px; }
[data-style] .tl-empty.soft p { margin: 0; font-size: var(--fs-body); }
[data-style] .tl-nomatch .linkbtn { min-height: calc(44px * var(--k)); }
[data-style] .tl-prompt { display: grid; gap: 10px; justify-items: start; padding: 20px; max-width: 640px; }
[data-style] .tl-prompt h2 { margin: 0; font: var(--title-w) calc(24px * var(--kt))/1.2 var(--display); }
[data-style] .tl-prompt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 0; }
/* The Filters panel's rows: the kind's ring, the word, the count, the tick box. */
[data-style] .lf-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
[data-style] .lf-row { display: flex; align-items: center; gap: 10px; min-height: calc(48px * var(--k)); padding: 0 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
[data-style] .lf-row:hover { background: var(--soft); }
[data-style] .lf-row .grow { flex: 1; min-width: 0; }
[data-style] .lf-row .tick { display: grid; place-items: center; width: calc(22px * var(--k)); height: calc(22px * var(--k)); border-radius: 6px; border: 1.5px solid var(--ctl-edge); color: transparent; }
[data-style] .lf-row[aria-checked="true"] .tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
[data-style] .lf-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
[data-style] .tl-filters .input { width: 100%; box-sizing: border-box; min-height: calc(48px * var(--k)); }
[data-style] .tl-filters .seg > a { flex: 1 1 0; justify-content: center; }
/* The narrow layout (WS16's rule, now for all three segments): the decade label beside its knot. */
@container (max-width: 600px) { [data-style] .tl-knot .tl-knot-label { display: inline; } [data-style] .tl .tl-dia { margin-left: auto; margin-right: auto; } }
@container (max-width: 768px) { :root[data-style][data-text="large"] .tl-knot .tl-knot-label, :root[data-style][data-text="larger"] .tl-knot .tl-knot-label { display: inline; } }
/* ---- The event row on the Timeline (.tl-ev): its own block, for #46's album spread to replace. ---- */
[data-style] .tl-ev .tl-ev-over { margin: 0; }
/* A life (round 4 #45, Karol: A): "The life of" and the person chip (initials or portrait in sepia, the name at 700, ▾). */
[data-style] .tl-life-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -8px 0 24px; }
[data-style] .tl-life-of { color: var(--ink-2); font-size: var(--fs-body); }
[data-style] .tl-who { min-height: calc(48px * var(--k)); padding: 0 14px 0 6px; gap: 10px; }
[data-style] .tl-who b { font-weight: 700; }
[data-style] .tl-who-face, [data-style] .tl-mono { display: inline-grid; place-items: center; flex: none; width: calc(36px * var(--k)); height: calc(36px * var(--k)); border-radius: 50%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); font: 600 calc(13px * var(--k))/1 var(--text); letter-spacing: .04em; color: var(--ink-2); }
[data-style] .tl-who-face .gn-face { width: 100%; height: 100%; filter: sepia(.6); }
[data-style] .tl-picker .lf-row { min-height: calc(52px * var(--k)); }
[data-style] .tl-picker .lf-row[aria-current="true"] { background: var(--ctl-tint); }
[data-style] .tl-picker .lf-row .grow { display: flex; flex-direction: column; }
/* Tree facts on the line: a small dot and a quiet row about 36 x k high (web-design, #45 review). */
[data-style] .tl-fact-dot { display: block; width: 8px; height: 8px; margin-top: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
[data-style] .tl-row-fact .tl-yr { font-size: calc(18px * var(--kt)); padding-top: 4px; color: var(--ink-2); }
[data-style] .tl-row-fact .tl-fact { padding-top: 4px; min-height: calc(36px * var(--k)); box-sizing: border-box; }
[data-style] .tl-row-fact .tl-node::after { top: 22px; }
@container (max-width: 600px) { [data-style] .tl .tl-fact .tl-over { display: inline; } }
@container (max-width: 768px) { :root[data-style][data-text="large"] .tl .tl-fact .tl-over, :root[data-style][data-text="larger"] .tl .tl-fact .tl-over { display: inline; } }
/* ---------- Round 4 #46 (spec §5.2c, Karol: A): the album spread, prints that turn ---------- */
/* The print's paper, edge and shadow, as the board (timeline-fancy): Heritage and Classic, light and dark. */
:root[data-style="heritage"] { --print: #FFFCF6; --print-edge: rgba(60,40,20,.18); --shadow: 0 10px 22px -12px rgba(60,40,20,.55); --gold: #C9A063; }
:root[data-style="classic"] { --print: #FFFFFF; --print-edge: rgba(10,22,29,.16); --shadow: 0 10px 22px -12px rgba(10,22,29,.45); --gold: #C9A96E; }
:root[data-style="heritage"][data-theme="dark"] { --print: #EFE4D2; --print-edge: rgba(0,0,0,.4); --shadow: 0 12px 26px -12px rgba(0,0,0,.9); --gold: #D6B47C; }
:root[data-style="classic"][data-theme="dark"] { --print: #E9E5DB; --print-edge: rgba(0,0,0,.5); --shadow: 0 12px 26px -12px rgba(0,0,0,.9); }
@media (prefers-color-scheme: dark) {
  :root[data-style="heritage"]:not([data-theme="light"]) { --print: #EFE4D2; --print-edge: rgba(0,0,0,.4); --shadow: 0 12px 26px -12px rgba(0,0,0,.9); --gold: #D6B47C; }
  :root[data-style="classic"]:not([data-theme="light"]) { --print: #E9E5DB; --print-edge: rgba(0,0,0,.5); --shadow: 0 12px 26px -12px rgba(0,0,0,.9); }
}
/* The spread: [the pile][the card], one link; the stack of 3 above the card in the narrow layout. */
[data-style] .tl-spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 20px; color: inherit; text-decoration: none; }
[data-style] .tl-spread > .tl-card { min-width: 0; }
[data-style] a.tl-spread:hover > .tl-card { border-color: var(--line-strong); }
[data-style] .tl-spreads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 880px; }
/* A pile: prints in fixed slots (angle, x, y); a slot keeps its angle when its photo changes. */
/* A print is --pw wide; its slot's --f places it between the pile's left and right edges, so the pile never reaches past
   its column into the card (web-build, #46 shots). */
[data-style] .tl-pile { --pw: calc(120px * var(--k)); position: relative; display: block; min-height: calc(150px * var(--k)); }
[data-style] .tl-pile .print { position: absolute; top: var(--y); left: calc((100% - var(--pw)) * var(--f)); width: var(--pw); padding: calc(6px * var(--k)) calc(6px * var(--k)) calc(16px * var(--k)); box-sizing: border-box;
  background: var(--print); border: 1px solid var(--print-edge); box-shadow: var(--shadow); transform: rotate(var(--r)); }
/* The picture keeps 4:3 and the photo fills it (the img's own width/height attributes would otherwise set its height). */
[data-style] .tl-pile .print picture { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
[data-style] .tl-pile .print img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-style] .tl-pile .print img { filter: var(--photo); transition: filter .3s; }
[data-style] .tl-spread:hover .tl-pile .print img, [data-style] .tl-spread:focus-visible .tl-pile .print img { filter: none; }
[data-style] .tl-pile .print > picture + picture { position: absolute; inset: calc(6px * var(--k)) calc(6px * var(--k)) auto; width: auto; }
[data-style] .tl-pile .print > picture.turn-next { opacity: 0; transition: opacity .8s ease; }
[data-style] .tl-pile .print > picture.turn-next.on { opacity: 1; }
[data-style] .tl-pile .s1 { --r: -6deg; --f: 0; --y: 10px; z-index: 1; }
[data-style] .tl-pile .s2 { --r: 4deg; --f: .25; --y: 0px; z-index: 2; }
[data-style] .tl-pile .s3 { --r: -2deg; --f: .5; --y: 16px; z-index: 3; }
[data-style] .tl-pile .s4 { --r: 5deg; --f: .75; --y: 4px; z-index: 4; }
[data-style] .tl-pile .s5 { --r: -4deg; --f: 1; --y: 14px; z-index: 5; }
/* Two prints: side by side, slightly overlapping, whatever the pile's width (web-design). */
[data-style] .tl-pile.loose .s2 { left: calc(var(--pw) * .82); }
[data-style] .tl-pile .print-play { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(20, 14, 10, .7); color: #FBF4E8; font-size: 12px; }
[data-style] .tl-pile .pile-more { position: absolute; right: 0; bottom: 0; z-index: 6; padding: 4px 10px; border-radius: 999px; background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ink); font: 600 var(--fs-meta)/1.2 var(--text); }
[data-style] .tl-pile.none { display: grid; place-items: center; }
[data-style] .tl-pile .pile-none { display: grid; place-items: center; width: calc(76px * var(--k)); height: calc(76px * var(--k)); border-radius: 50%; border: 1.5px dashed var(--gold); background: var(--soft); color: var(--accent); }
[data-style] .tl-pile .pile-none .i { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { [data-style] .tl-pile .print > picture.turn-next { transition: none; } }
/* The narrow layout: the stack of 3 above the card, 96 × k prints. */
@container (max-width: 600px) {
  [data-style] .tl-spread { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  [data-style] .tl-pile { min-height: calc(120px * var(--k)); }
  [data-style] .tl-pile { --pw: calc(96px * var(--k)); }
  [data-style] .tl-pile .s4, [data-style] .tl-pile .s5 { display: none; }
  [data-style] .tl-pile .s2 { --f: .5; } [data-style] .tl-pile .s3 { --f: 1; }
}
@container (max-width: 768px) {
  :root[data-style][data-text="large"] .tl-spread, :root[data-style][data-text="larger"] .tl-spread { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
/* Large and Larger: 3 prints at every width (5 at 120 × k would be slivers under the fifth; web-design). */
:root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile :is(.s4, .s5) { display: none; }
:root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile .s2 { --f: .5; } :root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile .s3 { --f: 1; }
/* "+N" is all − the prints shown: the 5-print count, or the 3-print one where the pile shows 3. */
[data-style] .tl-pile .pm-narrow, [data-style] .tl-pile .pile-more.no-wide { display: none; }
:root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile .pile-more.no-wide { display: block; }
:root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile .pm-wide { display: none; }
:root[data-style]:is([data-text="large"], [data-text="larger"]) .tl-pile .pm-narrow { display: inline; }
@container (max-width: 600px) {
  [data-style] .tl-pile .pile-more.no-wide { display: block; }
  [data-style] .tl-pile .pm-wide { display: none; }
  [data-style] .tl-pile .pm-narrow { display: inline; }
}
/* ---------- Round 4 #48: clicking Library again folds its list (from 861 px; phones have no column) ---------- */
[data-style] .nav .lib-fold { width: 100%; text-align: left; cursor: pointer; }
[data-style] .nav .lib-fold:hover { background: var(--soft); color: var(--ink); }
[data-style] .nav .lib-chev { margin-left: auto; color: var(--ctl-icon); width: 12px; height: 12px; transition: transform .2s; }
[data-style] .nav .lib-chev + .count { margin-left: 8px; }
[data-style] .nav .lib-chev.folded, :root[data-style][data-lib-folded] .nav .lib-fold .lib-chev { transform: rotate(-90deg); }
@media (min-width: 861px) {
  [data-style] #lib-tree, [data-style] #lib-cats { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .2s ease, visibility 0s; }
  /* Clipped only while folded: open, the rows reach past the list's box on purpose (the chevron on the guide, the count 12 px in). */
  :root[data-style][data-lib-folded] #lib-tree, :root[data-style][data-lib-folded] #lib-cats { overflow: hidden; }
  [data-style] #lib-tree > *, [data-style] #lib-cats > * { min-height: 0; }
  :root[data-style][data-lib-folded] #lib-tree, :root[data-style][data-lib-folded] #lib-cats { grid-template-rows: 0fr; visibility: hidden; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-left-color: transparent;
    transition: grid-template-rows .2s ease, visibility 0s .2s; }
}
@media (prefers-reduced-motion: reduce) { [data-style] #lib-tree, [data-style] #lib-cats, [data-style] .nav .lib-chev { transition: none !important; } }
/* #56 (spec §4.5): each folding list has one inner box (.lib-fold-in), so the grid's single 0fr row takes all of it (the
   category list's label, filter, tree and results used to land in auto rows and keep their height); folded, the lists are
   also `hidden` after the .2 s fold (archive-look.js), so the places below move up and the column stops scrolling. */
[data-style] #lib-cats > .lib-fold-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
[data-style] #lib-cats > .lib-fold-in > * { min-width: 0; }
@media (min-width: 861px) {
  :root[data-style][data-lib-folded] .lib-fold-in { overflow: hidden; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-left-color: transparent; }
  [data-style] #lib-tree[hidden], [data-style] #lib-cats[hidden] { display: none; }
}
/* Round 4 #53: a hidden current subcategory lends its tint (not the ring) to its top-level row. */
[data-style] .tree-wrap .trow.ancestor-current { background: var(--ctl-tint); }
/* W8: the email's "Yes, it's me" page in the new look (archive/confirm-device-link.blade.php), in the sign-in card. */
[data-style] .cd-card-look .cd-card { background: none; border: 0; box-shadow: none; padding: 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
[data-style] .cd-card-look .cd-title { margin: 0; font: var(--title-w) calc(30px * var(--kt))/1.2 var(--display); color: var(--ink); }
[data-style] .cd-card-look .cd-lead, [data-style] .cd-card-look .cd-text { margin: 0; color: var(--ink-2); font-size: var(--fs-body); line-height: 1.5; }
[data-style] .cd-card-look .cd-device { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; border-radius: 14px; background: var(--soft); color: var(--ink); }
[data-style] .cd-card-look .cd-send { width: 100%; }
[data-style] .cd-card-look .cd-send .btn { width: 100%; min-height: calc(48px * var(--k)); justify-content: center; }
[data-style] .cd-card-look .cd-art { display: grid; place-items: center; width: calc(52px * var(--k)); height: calc(52px * var(--k)); border-radius: 50%; border: 1.5px solid var(--primary); color: var(--accent); }

/* ---------- Round 4 #49 (home-sync_spec.md §3): Arrange Home on the website (mobile-api) ---------- */
/* The head's pill on Home, then the board: dashed items in the Home grid's sizes, the selected one ringed with its
   tools, a placeholder while dragging, "Only in the app" as quiet chips, the send row. No board on a phone browser. */
[data-style] .home-head .ha-open { align-self: flex-start; margin-top: 12px; }
[data-style] .ha-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
[data-style] .ha-head h1 { margin: 0; }
[data-style] .ha-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
[data-style] .ha-hint { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--soft); color: var(--ink-2); font: 500 var(--fs-label)/1.3 var(--text); }
[data-style] .ha-saved { color: var(--ink); font-weight: 700; }
[data-style] .ha-conflict { align-items: center; width: 100%; max-width: none; box-sizing: border-box; margin: 0 0 16px; }
[data-style] .ha-conflict[hidden] { display: none; }
[data-style] .ha-conflict .ctl { margin-left: auto; }
/* The board's columns are Home's (.hl-grid, §5.1b) at the same width and text size: what you arrange is what you get (#49 review, 2). */
[data-style] .ha-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 20px; margin: 0; padding: 0; list-style: none; }
[data-style] .ha-tile { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 10px; min-height: calc(120px * var(--k)); padding: 14px 14px 14px 10px;
  border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--card-fill); color: var(--ink); cursor: grab; touch-action: none; user-select: none; }
[data-style] .ha-tile.ha-small { grid-column: span 1; }
[data-style] .ha-tile.ha-wide { grid-column: span 2; }
[data-style] .ha-tile.ha-large { grid-column: span 2; grid-row: span 2; min-height: calc(256px * var(--k)); }
@container (max-width: 1099px) {
  [data-style] .ha-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  [data-style] .ha-tile.ha-wide, [data-style] .ha-tile.ha-large { grid-column: 1 / -1; }
}
@container (max-width: 599px) { :root[data-style][data-text="larger"] .ha-tile { grid-column: 1 / -1; } }
/* Large and Larger text: a Small item is drawn as Home's door, the grip, ring and × in a row and the name below at the
   whole width, so a name breaks only between words (#49 review, 2). */
:root[data-style][data-text="large"] .ha-tile.ha-small .ha-x, :root[data-style][data-text="larger"] .ha-tile.ha-small .ha-x { order: 1; margin-left: auto; }
:root[data-style][data-text="large"] .ha-tile.ha-small .ha-tt, :root[data-style][data-text="larger"] .ha-tile.ha-small .ha-tt { order: 2; flex-basis: 100%; padding-left: calc(4px * var(--k)); }
[data-style] .ha-sel { order: 3; }
[data-style] .ha-tile:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 2px; }
[data-style] .ha-tile.on { border: 2px solid var(--ctl-ring); box-shadow: 0 0 0 4px var(--ctl-tint); cursor: default; }
[data-style] .ha-tile.dragging { opacity: .4; }
[data-style] .ha-tile.ha-place { border: 2px dashed var(--ctl-ring); background: var(--ctl-tint); min-height: calc(120px * var(--k)); }
[data-style] .ha-grip { display: inline-grid; place-items: center; width: calc(24px * var(--k)); min-height: calc(44px * var(--k)); color: var(--muted); }
[data-style] .ha-tt { display: grid; gap: 2px; flex: 1 1 0; min-width: 0; padding-top: 4px; }
[data-style] .ha-t { font: var(--title-w) calc(19px * var(--kt))/1.25 var(--display); overflow-wrap: break-word; }
[data-style] .ha-x { display: inline-grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k)); margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
[data-style] .ha-x:hover { background: var(--soft); color: var(--ink); }
[data-style] .ha-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--line); cursor: default; }
[data-style] .ha-sel[hidden], [data-style] .ha-sel .seg[hidden], [data-style] .ha-sel [hidden] { display: none; }
[data-style] .ha-sel .ctl[disabled] { opacity: .45; cursor: default; }
[data-style] .ha-up { transform: rotate(90deg); }
[data-style] .ha-hint .i { vertical-align: -.15em; }
[data-style] .ha-hidden .meta { font-style: italic; }
[data-style] .ha-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
[data-style] .ha-back { display: none; }
/* The Add popover: a soft fade at the bottom edge while there is more below (#49 review, 4). */
[data-style] .ha-pop.ha-more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); }
[data-style] .ha-down { transform: rotate(90deg); }
[data-style] .ha-empty { margin: 8px 0 0; color: var(--muted); }
[data-style] .ha-only { margin-top: 28px; display: grid; gap: 8px; }
[data-style] .ha-only[hidden] { display: none; }
[data-style] .ha-only h2 { margin: 0; }
[data-style] .ha-only .meta { margin: 0; }
[data-style] .ha-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
[data-style] .ha-chip { display: inline-flex; align-items: center; min-height: calc(36px * var(--k)); padding: 0 14px; border: 1.5px dashed var(--line-strong); border-radius: 999px; color: var(--ink-2); font: 500 var(--fs-label)/1.2 var(--text); }
[data-style] .ha-send { display: grid; gap: 8px; justify-items: start; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
[data-style] .ha-send[hidden], [data-style] .ha-sent[hidden] { display: none; }
[data-style] .ha-pop .lf-part { margin: 0; padding: 0; border: 0; }
[data-style] .ha-addlist, [data-style] .ha-found { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
[data-style] .ha-addrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: calc(52px * var(--k)); padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
[data-style] .ha-addrow:hover { background: var(--soft); }
[data-style] .ha-addrow b { display: block; font-weight: 600; }
[data-style] .ha-addrow .meta { display: block; }
/* #82 (§5.1e): the Library row's Change: radio rows, and the category picker filling the panel (rows 48 × k with a whole-row
   target, names on up to 2 lines and never cut, sub-categories indented, ticks dimmed at 6). */
[data-style] .ha-lib [role="radiogroup"] { display: grid; gap: 2px; }
[data-style] .ha-radio { display: flex; align-items: center; gap: 12px; width: 100%; min-height: calc(48px * var(--k)); padding: 6px 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 500 var(--fs-label)/1.3 var(--text); text-align: left; cursor: pointer; }
[data-style] .ha-radio:hover, [data-style] .ha-pick-row:hover { background: var(--soft); }
[data-style] :is(.ha-dot, .ha-mark) { flex: none; width: calc(20px * var(--k)); height: calc(20px * var(--k)); border-radius: 50%; border: 1.5px solid var(--line-strong); box-sizing: border-box; }
[data-style] .ha-radio[aria-checked="true"] .ha-dot, [data-style] .ha-pick-row:not(.multi)[aria-selected="true"] .ha-mark { border: calc(6px * var(--k)) solid var(--accent); }
[data-style] .ha-pick-row.multi .ha-mark { border-radius: 5px; }
[data-style] .ha-pick-row.multi[aria-selected="true"] .ha-mark { position: relative; background: var(--accent); border-color: var(--accent); }
[data-style] .ha-pick-row.multi[aria-selected="true"] .ha-mark::after { content: ""; position: absolute; left: 30%; top: 12%; width: 28%; height: 52%; border: solid var(--on-accent, #FFFCF6); border-width: 0 2.25px 2.25px 0; transform: rotate(45deg); } /* the ✓: state not by shape or colour alone */
[data-style] .lf-head .ctl.round { flex: none; width: calc(44px * var(--k)); height: calc(44px * var(--k)); padding: 0; } /* round, never squeezed */
[data-style] [data-ha-options-list] > .lf-part + .lf-part { margin-top: calc(16px * var(--k)); }
[data-style] .ha-pick-back { margin-bottom: 8px; align-self: flex-start; } /* not .ha-back: that is the phone's link */
[data-style] .ha-pop.picking { display: flex; flex-direction: column; overflow: hidden; }
[data-style] .ha-pop.picking [data-ha-options-list] { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
[data-style] .ha-pop.picking .ha-pick { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
[data-style] .ha-pop.picking .ha-pick-foot { position: static; background: none; }
[data-style] .ha-find { display: flex; align-items: center; gap: 8px; min-height: calc(44px * var(--k)); padding: 0 14px; margin-bottom: 8px; border-radius: 999px; border: 1px solid var(--ctl-edge); background: var(--ctl-fill); color: var(--muted); }
[data-style] .ha-find input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 400 var(--fs-label)/1.2 var(--text); outline: none; }
[data-style] .ha-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
[data-style] .ha-pick-row { display: flex; align-items: center; gap: 12px; min-height: calc(48px * var(--k)); padding: 6px 10px 6px calc(10px + var(--depth, 0) * 22px * var(--k)); border-radius: 12px; cursor: pointer; }
[data-style] .ha-pick-row[aria-disabled="true"] { opacity: .45; cursor: default; }
[data-style] .ha-pick-t { min-width: 0; }
[data-style] .ha-pick-t b { display: block; font-weight: 500; overflow-wrap: anywhere; }
[data-style] .ha-pick-t .meta { display: block; }
[data-style] .ha-pick-live { min-height: 1.2em; margin: 0 0 6px; }
[data-style] .ha-pick-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding-top: 10px; background: linear-gradient(transparent, var(--surface) 30%); }
[data-style] .ha-pin { display: flex; gap: 8px; }
[data-style] .ha-pin select { flex: 1 1 0; min-width: 0; min-height: calc(44px * var(--k)); }
[data-style] .ha-pop .chip[aria-pressed="true"] { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }
[data-style] .ha-confirm-btns { display: flex; flex-wrap: wrap; gap: 10px; }
[data-style] .ha-phone { display: none; }
/* A phone browser: no board (§3), the message only; Home keeps no Arrange pill there. */
@media (max-width: 700px) {
  [data-style] .ha-desk, [data-style] .ha-tools, [data-style] .home-head .ha-open { display: none; }
  [data-style] .ha-back { display: flex; }
  [data-style] .ha-phone { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 12px; background: var(--soft); color: var(--ink-2); }
}
@media (prefers-reduced-motion: reduce) { [data-style] .ha-tile { transition: none; } }
/* #50 follow-up: the parts "Find an object" changes in place are wrappers only (archive-look.js). */
[data-style] .ac-live { display: contents; }

/* ---------- web-design follow-ups F1–F5 (docs/feedback/2026-11-03_web-build-followups.md) ---------- */
/* F1: the new event's "Also add it to the family tree", its kind radios and Timeline settings' ticks drawn in the look
   (a native unticked box is grey on dark and an unticked radio can read as chosen): a 20 × k box on the control fill with
   the field line; ticked, the primary with an on-primary tick; a radio's dot. The system's own under forced colours. */
[data-style] :is(.ev-tree, .cat-check) input[type="checkbox"], [data-style] .ev-kinds input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-content: center; box-sizing: border-box; margin: 0; vertical-align: -.2em;
  width: calc(20px * var(--k)); height: calc(20px * var(--k)); border: 1.5px solid var(--field-line); background: var(--ctl-fill); cursor: pointer; }
[data-style] :is(.ev-tree, .cat-check) input[type="checkbox"] { border-radius: 6px; }
[data-style] :is(.ev-tree, .cat-check) input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
[data-style] :is(.ev-tree, .cat-check) input[type="checkbox"]:checked::after { content: ""; width: calc(9px * var(--k)); height: calc(5px * var(--k)); margin-top: -2px;
  border-left: 2px solid var(--on-primary); border-bottom: 2px solid var(--on-primary); transform: rotate(-45deg); }
[data-style] .ev-kinds input[type="radio"] { border-radius: 50%; }
[data-style] .ev-kinds input[type="radio"]:checked { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 calc(4px * var(--k)) var(--ctl-fill); }
[data-style] :is(.ev-tree, .cat-check) input[type="checkbox"]:focus-visible, [data-style] .ev-kinds input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .ev-tree { display: flex; align-items: flex-start; gap: 10px; }
[data-style] .ev-tree input[type="checkbox"] { margin-top: .15em; }
@media (forced-colors: active) {
  [data-style] :is(.ev-tree, .cat-check) input[type="checkbox"], [data-style] .ev-kinds input[type="radio"] { -webkit-appearance: auto; appearance: auto; }
}
/* F2 (Larger keeps the wrapping row: the toggle's 44 × k leaves too little room for a whole name beside it, release-lead's
   check): Categories on a phone, a parent's count line ("8 items · 2 subcategories") starts under its name, as a child row's
   does, not under the toggle: the name cell as [toggle][name over count]. */
@media (max-width: 1023px) {
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0; align-items: center; }
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm > .tog { grid-row: 1 / span 2; margin-right: 8px; }
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm > :not(.tog) { grid-column: 2; }
}
@container w7mgr (max-width: 36rem) {
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0; align-items: center; }
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm > .tog { grid-row: 1 / span 2; margin-right: 8px; }
  :root[data-style]:not([data-text="larger"]) .mgr-row .nm > :not(.tog) { grid-column: 2; }
}
/* F3 (WS41): a file without a picture in the viewer's strip is the empty mount, not a dark tile on the dark stage: the
   light card with its type's icon, at the strip's size, in every look (a preview still being made too). */
[data-style] .filmstrip .nofile { --nf-paper: var(--surface); --nf-window: var(--surface); --nf-edge: var(--line-strong); --nf-hatch: transparent; --nf-ink: var(--ctl-icon); border-radius: 4px; }
[data-style] .filmstrip a:has(.nofile) { opacity: .85; }
[data-style] .filmstrip a:has(.nofile):hover, [data-style] .filmstrip a[aria-current="true"]:has(.nofile) { opacity: 1; }
/* F5: the Timeline's sticky head (all three views) is opaque, as Library's: the page's ground, no see-through blur over
   the list, at the very top of the scroll area, its 1 px line once something has scrolled under it. */
[data-style] .pagehead.tl-head { top: calc(-1 * var(--main-pad, 0px)); background: var(--bg); backdrop-filter: none; border-bottom: 1px solid transparent; }
@supports (animation-timeline: scroll()) {
  [data-style] .pagehead.tl-head { animation: look-stuck linear both; animation-timeline: scroll(nearest block); animation-range: 0 1px; }
}
/* F4: the column's "Find a category" as wide as the rows, to the scroll area's edge (#52). */
@media (min-width: 861px) {
  [data-style] .nav-sub-tree .tree-filter { margin-right: -18px; }
}
/* web-design (F1 review, New family event dark): a page's sticky head is opaque everywhere in the look, as Library's (#44)
   and the Timeline's (F5): the page's ground across the whole frame, no see-through blur (which showed the form's cards
   through it as a lighter band); its 1 px line once something has scrolled under it. */
[data-style] .main > .pagehead { top: calc(-1 * var(--main-pad, 0px)); background: var(--bg); backdrop-filter: none; border-bottom: 1px solid transparent; }
@supports (animation-timeline: scroll()) {
  [data-style] .main > .pagehead { animation: look-stuck linear both; animation-timeline: scroll(nearest block); animation-range: 0 1px; }
}
/* ---------- F9 (spec §5.5b): a person's "In n photographs" as whole photos with a loupe, finding them on hover ---------- */
[data-style] .pn-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(190px * var(--k)), calc(260px * var(--k)))); gap: 16px; margin: 0; padding: 0; list-style: none; }
/* With 4 or more the row fills (web-design's update to §5.5b); 1–3 keep their size. */
[data-style] .pn-photos.many { grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(190px * var(--k))), 1fr)); }
[data-style] .pn-ph { display: grid; gap: 6px; align-content: start; min-width: 0; }
[data-style] .pn-ph-link { display: grid; gap: 8px; color: inherit; text-decoration: none; border-radius: 12px; }
[data-style] .pn-ph-link:focus-visible { outline: 2px solid var(--ctl-ring); outline-offset: 3px; }
[data-style] .pn-ph-pic { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
[data-style] .pn-ph-pic > picture, [data-style] .pn-ph-pic > picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-style] .pn-ph-pic img, [data-style] .pn-loupe .gn-face { filter: var(--photo); transition: filter .18s ease-out; }
[data-style] .pn-find { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .12s ease-in; pointer-events: none; }
[data-style] .pn-find .pn-dim { fill: rgba(0, 0, 0, .35); }
[data-style] .pn-find .pn-ring { fill: none; stroke: var(--ctl-ring); stroke-width: 2px; }
[data-style] .pn-ph-link:is(:hover, :focus-visible) .pn-ph-pic img, [data-style] .pn-ph-link:is(:hover, :focus-visible) .pn-loupe .gn-face { filter: none; }
[data-style] .pn-ph-link:is(:hover, :focus-visible) .pn-find { opacity: 1; transition: opacity .18s ease-out; }
[data-style] .pn-loupe { position: absolute; left: 8px; bottom: 8px; display: block; width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-radius: 50%; overflow: hidden;
  border: 2px solid var(--print, var(--surface)); box-shadow: 0 0 0 1.5px var(--ctl-ring), var(--shadow-1); background: var(--surface-2); transition: transform .18s ease-out; }
[data-style="classic"] .pn-loupe { border-color: var(--surface); }
[data-style] .pn-loupe .gn-face { display: block; width: 100%; height: 100%; }
[data-style] .pn-ph-link:hover .pn-loupe { transform: translateY(-2px); }
[data-style] .pn-portrait { position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink); font: 600 var(--fs-meta)/1.3 var(--text); }
[data-style] .pn-ph-cap { display: grid; gap: 2px; min-width: 0; }
[data-style] .pn-ph-cap b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--fs-label)/1.3 var(--text); color: var(--ink); }
[data-style] .pn-ph-cap .meta { display: flex; flex-wrap: wrap; column-gap: 0; color: var(--muted); font-size: var(--fs-meta); }
[data-style] .pn-ph-cap .catno { white-space: nowrap; }
[data-style] .pn-ph-pick { margin: 0; }
[data-style] .pn-ph-pick .linkbtn { min-height: calc(32px * var(--k)); padding: 0; border: 0; background: none; font: 400 var(--fs-meta)/1.3 var(--text); cursor: pointer; }
[data-style] .gn-seeall .ctl { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; }
@container (max-width: 600px) {
  [data-style] :is(.pn-photos, .pn-photos.many) { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  [data-style] .pn-loupe { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
}
@media (max-width: 600px) {
  [data-style] .pn-photos.pn-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-style][data-text="larger"] .pn-photos.pn-photos { grid-template-columns: minmax(0, 1fr); }
  [data-style] .pn-loupe { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
}
@media (prefers-reduced-motion: reduce) { [data-style] :is(.pn-find, .pn-loupe, .pn-ph-pic img, .pn-loupe .gn-face) { transition: none; } [data-style] .pn-ph-link:hover .pn-loupe { transform: none; } }
@media print {
  [data-style] .pn-photos.pn-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-style] .pn-ph-pic img, [data-style] .pn-loupe .gn-face { filter: none !important; }
  [data-style] .pn-find, [data-style] .pn-portrait, [data-style] .pn-ph-pick { display: none !important; }
}
/* web-design (F10 review): the search field's clear is ours, in the look's colours (the browser's own × was bright blue):
   a 44 × k target with --ctl-icon, --ink on hover, shown while the field has words (archive-look.js). */
[data-style] .search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
[data-style] .search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k));
  padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ctl-icon); cursor: pointer; }
[data-style] .search-clear[hidden] { display: none; }
[data-style] .search-clear:hover { color: var(--ink); background: var(--soft); }
[data-style] .search-clear:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
[data-style] .search-clear .i { width: 18px; height: 18px; }

/* ---------- #69 (spec §4.11): no top row; search and the initial as two circles over the page head ---------- */
/* From 861 px (where the column is): the panel starts at the top (the top row's grid row holds only the circles' cell, laid
   over .main, which spans both rows). The circles sit at the right end of the head's first line, 26 px down; a float at the
   start of the page sits under them; a head's first line (overline or Back) moves up beside them, keeping their room. archive-look.js moves them up as the page scrolls, and pins them into a slim
   sticky bar (Library's, the Timeline's head) while one shows. Search grows leftward into a pill (min(560px, 62%), 280 ms)
   on focus, the overline fading under it; Esc or leaving it empty closes it. The initial is a 44 × k ring. */
@media (min-width: 861px) {
  [data-style] .app > .main { --main-pad: calc(26px + 44px * var(--k) + 10px); grid-row: 1 / -1; grid-column: 2; padding-top: var(--main-pad); }
  [data-style] .app > .topbar { --c: calc(44px * var(--k)); grid-row: 1; grid-column: 2; z-index: 30; align-self: start; display: flex; justify-content: flex-end; align-items: center;
    gap: 10px; min-height: 0; height: auto; margin: 26px max(32px, env(safe-area-inset-right)) 0 32px; padding: 0; border: 0; background: none; pointer-events: none;
    position: relative; top: var(--head-y, 0px); } /* not a transform: that would make it the fixed account menu's containing block */
  [data-style] .app > .topbar > * { pointer-events: auto; }
  /* Every page starts under the circles' line; a head's first line (the overline, or the Back row) moves up into it, its
     right end kept for the circles. A head without one (Library, Timeline) has the circles' line alone above its title. */
  [data-style] .main :is(.home-head > .over, .phead-row) { display: flex; align-items: center; min-height: calc(44px * var(--k));
    margin-top: calc(-44px * var(--k) - 10px); padding-right: calc(88px * var(--k) + 10px + 16px); box-sizing: border-box; }
  [data-style] .main .phead-row { margin-bottom: 12px; }
  /* Where the circles pin while scrolling, the bar keeps their room: Library's slim bar, the Timeline's sticky head. */
  [data-style] .lib-bar-in, [data-style] .main > .pagehead.tl-head { padding-right: calc(88px * var(--k) + 10px + 48px); }
  /* #84b review (#69 rule): a page head with its own actions on the right (the Bin's Empty the Bin…, Members' Invite…) keeps
     the circles' width clear, scrolled or not. */
  [data-style] .main > .pagehead:has(> .viewtools) { padding-right: calc(88px * var(--k) + 10px + 32px); box-sizing: border-box; } /* the circles end 22 px before this head's edge, + 8 px clear */
  /* Search, closed: a 44 × k circle (the field itself, its icon in the middle); open: the pill. */
  [data-style] .app > .topbar .search { position: relative; flex: none; width: var(--c); max-width: none; margin: 0 0 0 auto; transition: width .28s ease-out; }
  [data-style] .app > .topbar .top-actions { margin-left: 0; }
  [data-style] .app > .topbar .search.open { width: min(560px, 62%); }
  [data-style] .app > .topbar { flex-wrap: nowrap; }
  [data-style] .app > .topbar .search input { width: 100%; height: var(--c); min-height: var(--c); padding: 0 0 0 var(--c); border-radius: 999px; background: transparent; border: 1.25px solid var(--ctl-edge); color: transparent; cursor: pointer; }
  [data-style] .app > .topbar .search input::placeholder { color: transparent; }
  [data-style] .app > .topbar .search > .i { position: absolute; left: calc(var(--c) / 2); top: 50%; transform: translate(-50%, -50%); color: var(--accent); pointer-events: none; }
  [data-style] .app > .topbar .search.open input { padding: 0 44px 0 calc(var(--c) - 2px); color: var(--ink); background: var(--surface); cursor: text; }
  [data-style] .app > .topbar .search.open input::placeholder { color: var(--muted); }
  [data-style] .app > .topbar .search:not(.open) :is(.search-clear, .search-hint) { display: none !important; }
  [data-style] .app > .topbar .search.open::after { content: "/"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); min-width: 20px; padding: 1px 6px; border: 1px solid var(--line-strong);
    border-radius: 6px; font: 600 12px/1.3 var(--text); color: var(--muted); text-align: center; pointer-events: none; }
  [data-style] .app > .topbar .search.open:has(input:not(:placeholder-shown))::after { display: none; }
  [data-style] .app > .topbar .search .search-hint { left: auto; right: 0; width: 100%; top: calc(100% + 8px); border-radius: 16px; }
  /* The overline under the open pill fades (it is not needed then). */
  [data-style] .main :is(.home-head, .pagehead .titles, .lib-head, .phead-row) > .over { transition: opacity .2s; }
  [data-style] .app:has(.topbar .search.open) .main :is(.home-head, .pagehead .titles, .lib-head, .phead-row) > .over { opacity: 0; }
  /* The initial: a 44 × k ring in the accent, the initials in display. */
  [data-style] .app > .topbar .top-actions { gap: 10px; }
  [data-style] .app > .topbar .avatarbtn .avatar { position: relative; width: var(--c); height: var(--c); border-radius: 50%; background: transparent; color: var(--accent);
    box-shadow: inset 0 0 0 1.5px var(--accent); font: var(--title-w) calc(19px * var(--kt))/1 var(--display); }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) { [data-style] .app > .topbar .search { transition: none; } }
/* Forced colours drop box-shadows: the initial keeps a ring as an outline; the search circle keeps its border. */
@media (forced-colors: active) { [data-style] .topbar .avatarbtn .avatar { outline: 1.5px solid CanvasText; outline-offset: -1.5px; } }
/* Heritage (dark, and light from glowLight, #74): the circle and the pill with the outline pill's edge and rim, a warm bloom
   while open; the initial lit as §4.10's quiet 36–55 tier (the ring and its main spot, no bloom). */
@media (min-width: 861px) {
  :root[data-style="heritage"]:is([data-theme], :not([data-theme])) .app > .topbar .search input { border-color: var(--g-pill-edge);
    background: linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--g-hot) 55%, transparent) 50%, transparent 80%) top / 100% 1px no-repeat, var(--g-pill-fill); }
  :root[data-style="heritage"]:is([data-theme], :not([data-theme])) .app > .topbar .search.open input { background: linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--g-hot) 55%, transparent) 50%, transparent 80%) top / 100% 1px no-repeat, var(--g-fill-e);
    box-shadow: 0 0 16px -2px var(--g-bloom); }
  :root[data-style="heritage"]:is([data-theme], :not([data-theme])) .app > .topbar .search-hint { background: var(--g-fill-e); border-color: var(--g-line-strong); box-shadow: 0 0 22px -6px var(--g-bloom), 0 18px 30px -16px var(--g-drop-soft); }
  :root[data-style="heritage"]:is([data-theme], :not([data-theme])) .app > .topbar .avatarbtn .avatar { box-shadow: none; }
  :root[data-style="heritage"]:is([data-theme], :not([data-theme])) .app > .topbar .avatarbtn .avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    background: conic-gradient(var(--g-portrait-ring) 0deg 300deg, color-mix(in srgb, var(--g-hot) 60%, var(--g-portrait-ring)) 330deg, var(--g-portrait-ring) 360deg);
    -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.25px)); mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.25px)); }
}
/* Phones (< 861 px): the app's header, 72 px, on the page ground, scrolling away: the initial, the family's name with its tag
   between gold rules, a round search. */
@media (max-width: 860px) {
  [data-style] .app > .topbar { min-height: 72px; background: none; border: 0; box-shadow: none; position: static; }
  [data-style] .brand-phone { display: grid; justify-items: center; gap: 2px; }
  [data-style] .brand-phone .tag { display: flex; align-items: center; gap: 8px; font: 600 calc(10.5px * var(--kt))/1 var(--text); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
  [data-style] .brand-phone .tag::before, [data-style] .brand-phone .tag::after { content: ""; width: 36px; height: 1px; }
  [data-style] .brand-phone .tag::before { background: linear-gradient(90deg, transparent, var(--primary)); }
  [data-style] .brand-phone .tag::after { background: linear-gradient(90deg, var(--primary), transparent); }
  [data-style] .topbar .avatarbtn .avatar { width: calc(44px * var(--k)); height: calc(44px * var(--k)); }
  /* §4.11 phone header at every text size (web-design 05.11: at Larger the search circle was squeezed to an oval and the name
     touched the initial): both circles 44 × k and never shrunk, the name block between them at least 8 px clear (the grid's gap),
     the name on at most two balanced lines (archive-look.js steps it ×0.9 down to 0.8 if two lines still overflow, then an
     ellipsis), FAMILY ARCHIVE on one line with its rules shortening first. */
  [data-style] .app > .topbar { grid-template-columns: calc(44px * var(--k)) minmax(0, 1fr) calc(44px * var(--k)); gap: 8px; }
  [data-style] .topbar :is(.ctl.round, .avatarbtn) { flex: none; width: calc(44px * var(--k)); height: calc(44px * var(--k)); min-width: 0; min-height: 0; padding: 0; }
  [data-style] .topbar .avatarbtn .avatar { flex: none; }
  [data-style] .brand-phone { min-width: 0; max-width: 100%; box-sizing: border-box; padding-inline: 0; }
  [data-style] .brand-phone .name { max-width: 100%; text-wrap: balance; overflow-wrap: normal; word-break: normal; }
  [data-style] .brand-phone .name.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
  [data-style] .brand-phone .tag { max-width: 100%; }
  [data-style] .brand-phone .tag::before, [data-style] .brand-phone .tag::after { flex: 0 1 36px; width: auto; min-width: 0; }
}

/* ---------- #76 (spec §4.12): Details sits with the page's name ---------- */
/* Right after the title's last word, 12 px after it, on its baseline, in one nowrap span with the word (it wraps with it);
   under 600 px of content, or at Larger under 768, at the end of the facts line instead, so the title keeps its width. */
[data-style] .h1-tail { white-space: nowrap; }
[data-style] .details-pill { display: inline-flex; vertical-align: baseline; min-height: calc(36px * var(--k)); margin-left: 12px; padding: 0 14px;
  font: 600 var(--fs-label)/1 var(--text); letter-spacing: 0; text-transform: none; position: relative; top: -.15em; }
[data-style] .facts-details { display: none; }
[data-style] .facts-details .details-pill { margin-left: 4px; top: 0; vertical-align: middle; }
@container (max-width: 599px) {
  [data-style] .h1-tail .details-pill { display: none; }
  [data-style] .facts-details { display: inline; }
}
@container (max-width: 767px) {
  :root[data-style][data-text="larger"] .h1-tail .details-pill { display: none; }
  :root[data-style][data-text="larger"] .facts-details { display: inline; }
}

/* ---------- #77 (spec §4.12b): Details opens as a popover by its pill ---------- */
/* ≥ 600 px of content: anchored to the pill (archive.js places it: below, left-aligned, inside the main column; above when
   there's no room), with a pointer to the pill; min(360 × min(k, 1.25), 100% − 32) wide, at most min(70vh, 520) tall, the head
   fixed and the body scrolling. Under 600 px: a bottom sheet (85 % at most) over a scrim, with a grip. Heritage draws #61's
   card (dark and #74 light from --g-*), Classic the surface with a hairline and --shadow-2. 160 ms fade and 4 px rise (the
   sheet slides up in 220 ms); none under reduced motion. */
[data-style] .app > .details.pop { position: fixed; z-index: 70; grid-column: auto; grid-row: auto; margin: 0; padding: 0; overflow: visible;
  width: min(calc(360px * min(var(--k), 1.25)), calc(100vw - 32px)); max-height: min(70vh, 520px); display: flex; flex-direction: column;
  border-radius: 16px; border: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-2); }
[data-style] .app:not(.details-open) > .details.pop { display: none; }
[data-style] .app.details-open > .details.pop:not(.sheet-mode) { animation: details-pop .16s ease-out; }
[data-style] .app.details-open > .details.pop.up:not(.sheet-mode) { animation-name: details-pop-up; }
@keyframes details-pop { from { opacity: 0; transform: translateY(4px); } }
@keyframes details-pop-up { from { opacity: 0; transform: translateY(-4px); } }
[data-style] .details.pop::before { content: ""; position: absolute; top: -7px; left: calc(var(--px, 28px) - 6px); width: 12px; height: 12px; transform: rotate(45deg);
  background: inherit; background-clip: padding-box; border-left: inherit; border-top: inherit; border-radius: 3px 0 0 0; }
[data-style] .details.pop.up::before { top: auto; bottom: -7px; border-left: 0; border-top: 0; border-right: inherit; border-bottom: inherit; border-radius: 0 0 3px 0; }
[data-style] .details.pop .details-head { position: static; flex: none; background: none; padding: 14px 10px 8px 20px; align-items: flex-start; }
[data-style] .details.pop .details-head h2 { font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); color: var(--ink); white-space: normal; overflow-wrap: anywhere; padding-top: calc(8px * var(--k)); }
[data-style] .details.pop [data-act="details-close"] { flex: none; display: inline-grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-radius: 50%;
  background: var(--ctl-fill); border: 1px solid var(--ctl-edge); color: var(--ctl-icon); }
[data-style] .details.pop .details-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; gap: 14px; }
[data-style] .details.pop dl.props { grid-template-columns: minmax(7em, max-content) minmax(0, 1fr); font-size: var(--fs-label); }
[data-style] .details.pop dl.props dt { color: var(--muted); }
[data-style] .details.pop dl.props dd { color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
[data-style] .details.pop .actions .btn { min-height: calc(44px * var(--k)); border-radius: 999px; padding: 0 18px 0 14px; background: transparent; border: 1.25px solid var(--pill-edge); color: var(--ink); box-shadow: none; }
[data-style] .details.pop .notice { margin: 0; padding: 0; background: none; border: 0; color: var(--muted); font: 400 var(--fs-meta)/1.4 var(--text); display: flex; gap: 8px; align-items: flex-start; }
[data-style] .details.pop .details-grip { display: none; }
[data-style] .details.pop .quiet-ring:focus-visible { outline: none; } /* opened by a pointer: focus without the ring; any key brings it back */
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop { --hs: var(--g-hot-len); --iw: var(--g-inner-w); --h1: 30%; --h2: 70%;
  border: var(--g-edge-w) solid var(--g-edge); box-shadow: var(--glow-outer), 0 0 var(--g-bloom-tile) calc(var(--g-bloom-tile) / -3) var(--g-bloom), var(--shadow-2);
  background:
    linear-gradient(90deg, transparent calc(var(--h1) - var(--hs)), var(--g-hot) var(--h1), transparent calc(var(--h1) + var(--hs))) top / 100% 1.5px no-repeat,
    linear-gradient(90deg, transparent calc(var(--h2) - var(--hs)), var(--g-hot) var(--h2), transparent calc(var(--h2) + var(--hs))) bottom / 100% 1.5px no-repeat,
    linear-gradient(180deg, var(--g-inner), transparent var(--iw)), linear-gradient(0deg, var(--g-inner), transparent var(--iw)),
    radial-gradient(var(--g-fill-size) at var(--g-fill-pos), var(--g-fill-c), var(--g-fill-e)); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop::before { background: var(--g-fill-c); border-color: var(--g-edge); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop.up::before { background: var(--g-fill-e); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop :is(.details-head h2, dl.props dd) { color: var(--g-ink); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop :is(dl.props dt, .notice) { color: var(--g-muted); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop dl.props dd a { color: var(--g-accent); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .details.pop .actions .btn { border-color: var(--g-pill-edge); color: var(--g-ink); }
/* The phone's sheet. */
[data-style] .details-scrim { position: fixed; inset: 0; z-index: 69; background: var(--scrim); }
[data-style] .details-scrim[hidden] { display: none; }
[data-style] .app > .details.pop.sheet-mode { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 85vh; border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom); animation: details-sheet .22s ease-out; transition: transform .12s; }
[data-style] .details.pop.sheet-mode::before { content: none; }
[data-style] .details.pop.sheet-mode .details-grip { display: block; flex: none; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line-strong); }
@keyframes details-sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { [data-style] .app > .details.pop { animation: none !important; transition: none; } }
@media print { [data-style] .app > .details.pop, [data-style] .details-scrim { display: none !important; } }

/* ---------- #84 (spec §5.3f): Show more, and the Small grid ---------- */
/* Show more: an outline pill under the grid, centred, the count under it; busy while the next batch loads. A later window's
   line sits over the grid. */
[data-style] .show-more { display: grid; justify-items: center; gap: 6px; margin: calc(24px * var(--k)) 0 calc(8px * var(--k)); }
[data-style] .show-more-btn { min-height: calc(44px * var(--k)); padding: 0 calc(22px * var(--k)); background: transparent; }
[data-style] .show-more-btn[aria-busy="true"] { pointer-events: none; opacity: .7; }
[data-style] .show-more-btn[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; margin-left: 4px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: show-spin .8s linear infinite; }
@keyframes show-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { [data-style] .show-more-btn[aria-busy="true"]::after { animation: none; } }
[data-style] .show-window { margin: 0 0 12px; }
/* Small: 124 × k columns (8 a row at 1440, 7 at 1280), gap 8 × k; the photo as today, radius 8 × k, no bloom; the title on one
   line (the whole of it in its title and the link's name); the number and year for screen readers only; a film as the ▶ glyph;
   the "…" menu on hover or focus. Phones: 3 a row. */
[data-style] .grid.small { grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(124px * var(--k))), 1fr)); gap: calc(8px * var(--k)); }
[data-style] .grid.small .card { box-shadow: none; }
[data-style] .grid.small .card .thumb { border-radius: calc(8px * var(--k)); }
[data-style] .grid.small .card .meta { padding: 5px 2px 0; gap: 0; }
[data-style] .grid.small .card .meta .cap { min-height: 0; }
[data-style] .grid.small .card .meta .cap wbr { display: none; } /* one line in Small: Chrome breaks at a <wbr> even under nowrap */ /* the row is the photo and one line: about 5 rows on the first screen */
[data-style] .grid.small .card .meta .cap { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: calc(13.5px * var(--k)); color: var(--ink-2); }
[data-style] .grid.small .card .meta .sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-style] .grid.small .card .typebadge { font-size: 0; gap: 0; padding: 4px; }
[data-style] .grid.small .card .typebadge .i { width: calc(16px * var(--k)); height: calc(16px * var(--k)); }
[data-style] .grid.small .card .more { width: calc(32px * var(--k)); height: calc(32px * var(--k)); opacity: 0; }
[data-style] .grid.small .card:is(:hover, :focus-within) .more { opacity: 1; }
@container (max-width: 600px) { [data-style] .grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { [data-style] .grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-style] .seg [data-grid-pick] { gap: 6px; }
/* #84b review: at Large and Larger the switch is icons only at every width (the words in its name and title), so Library's
   head keeps its height and the circles pin with the slim bar as before. */
:root[data-style]:is([data-text="large"], [data-text="larger"]) .seg [data-grid-pick] .seg-w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- #92 (spec §5.6b): the tree's "Who the tree is around" row and the Change person dialog ---------- */
/* The row: the head's own pills (k-sized). The dialog: #77's popover (Heritage #61's card from --g-*, dark and L1 light;
   Classic the surface with a hairline and --shadow-2), a sheet under 600 px of content. */
[data-style] .gn-who { gap: 8px; margin-top: calc(12px * var(--k)); }
[data-style] .gn-who .btn { min-height: calc(44px * var(--k)); height: auto; padding: 0 18px 0 14px; }
[data-style] .gn-who .btn .i { width: calc(18px * var(--k)); height: calc(18px * var(--k)); }
[data-style] .gn-pick { width: min(calc(360px * min(var(--k), 1.25)), calc(100vw - 32px)); animation: details-pop .16s ease-out; }
[data-style] .gn-pick.up:not(.sheet-mode) { animation-name: details-pop-up; }
[data-style] .gn-pick.sheet-mode { animation: details-sheet .22s ease-out; }
[data-style] .gn-pick-head h2 { font: var(--title-w) calc(22px * var(--kt))/1.2 var(--display); color: var(--ink); overflow-wrap: anywhere; padding-top: calc(8px * var(--k)); }
[data-style] .gn-pick-x { width: calc(44px * var(--k)); height: calc(44px * var(--k)); background: var(--ctl-fill); border-color: var(--ctl-edge); color: var(--ctl-icon); }
[data-style] .gn-pick-body .input { min-height: calc(48px * var(--k)); font-size: var(--fs-label); padding-right: calc(48px * var(--k)); }
[data-style] .gn-pick-body input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
/* web-design's #92 review (§5.6b 1b): the row is wayfinding, the head's actions secondary. ‹ {First} is the back pill (.ctl, as
   "‹ Library"), Start from an outline pill, Change person the row's main action with the lit tint (the selected look); the
   actions (Print, Still to check, Bring in a tree, Add a person) quiet text buttons: accent icon, ink-2 label, underline on
   hover, 44·k targets, 6·k more room above. */
[data-style] .gn-who .ctl.gn-who-back { min-height: calc(44px * var(--k)); font-weight: 600; }
[data-style] .gn-who .btn.gn-who-change { background: var(--ctl-tint); border: 1.5px solid var(--ctl-ring); font-weight: 700; }
[data-style] .gn-who .btn.gn-who-change:hover { background: var(--ctl-pressed); }
[data-style] .gn-who .btn.gn-who-change .i { color: var(--ctl-icon); }
[data-style] .gn-actions { margin-top: calc(6px * var(--k)); }
/* With the row, the title and the row take the full width and the quiet actions go under them (never squeezing the title). */
[data-style] .pagehead:has(.gn-who) > .titles { flex-basis: 100%; }
[data-style] .pagehead:has(.gn-who) > .gn-actions { margin-left: calc(-10px); }
[data-style] .gn-actions > .btn { border-color: transparent; background: none; padding: 0 10px; color: var(--ink-2); font-weight: 600; box-shadow: none; }
[data-style] .gn-actions > .btn .i { color: var(--accent); }
[data-style] .gn-actions > .btn:hover { background: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
[data-style] .gn-actions > .btn:active { transform: none; }
[data-style] .gn-pick-o { min-height: calc(52px * var(--k)); }
[data-style] .gn-pick-mt { width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-color: var(--tree-edge); }
[data-style] .gn-pick-mt > i { font: 600 calc(15px * var(--kt))/1 var(--display); font-variant-numeric: lining-nums; }
[data-style] .gn-pick-t b { font: 600 var(--fs-label)/1.3 var(--text); color: var(--ink); }
[data-style] .gn-pick-t small { font: 400 var(--fs-meta)/1.35 var(--text); color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
[data-style] .gn-pick-all { min-height: calc(44px * var(--k)); color: var(--accent); font: 600 var(--fs-label)/1.2 var(--text); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick { --hs: var(--g-hot-len); --iw: var(--g-inner-w); --h1: 30%; --h2: 70%;
  border: var(--g-edge-w) solid var(--g-edge); box-shadow: var(--glow-outer), 0 0 var(--g-bloom-tile) calc(var(--g-bloom-tile) / -3) var(--g-bloom), var(--shadow-2);
  background:
    linear-gradient(90deg, transparent calc(var(--h1) - var(--hs)), var(--g-hot) var(--h1), transparent calc(var(--h1) + var(--hs))) top / 100% 1.5px no-repeat,
    linear-gradient(90deg, transparent calc(var(--h2) - var(--hs)), var(--g-hot) var(--h2), transparent calc(var(--h2) + var(--hs))) bottom / 100% 1.5px no-repeat,
    linear-gradient(180deg, var(--g-inner), transparent var(--iw)), linear-gradient(0deg, var(--g-inner), transparent var(--iw)),
    radial-gradient(var(--g-fill-size) at var(--g-fill-pos), var(--g-fill-c), var(--g-fill-e)); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick::before { background: var(--g-fill-c); border-color: var(--g-edge); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick.up::before { background: var(--g-fill-e); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick :is(.gn-pick-head h2, .gn-pick-t b) { color: var(--g-ink); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick :is(.gn-pick-t small, .gn-pick-none) { color: var(--g-muted); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pick .gn-pick-all { color: var(--g-accent); }
@media (prefers-reduced-motion: reduce) { [data-style] .gn-pick { animation: none !important; transition: none; } }


/* ---------- #91 (spec §5.6c §2–3): Family as the app's rows, the framed side card ---------- */
/* The app's files as they are (#86 scenes, #89 card scenes, #87 oak), per Heritage scheme; Classic draws no scene and no oak
   (its icon tiles, flat). The fade's end and the edge shade are #86 §1's values; the card's gold line #89 §1's. */
:root[data-style="heritage"] { --ta-rings: url(/img/tree-art/rings-light.webp?v=d2a62264e6c3); --ta-photos: url(/img/tree-art/photos-light.webp?v=8629a8367e4a); --ta-siblings: url(/img/tree-art/siblings-light.webp?v=ff87c4970382); --ta-tree: url(/img/tree-art/tree-light.webp?v=c3acf7e75586); --ta-horse: url(/img/tree-art/horse-light.webp?v=695e10dc3509); --ta-seal: url(/img/tree-art/seal-light.webp?v=7935f678be7e); --ta-events: url(/img/tree-art/events-light.webp?v=4b2464450cb7); --ta-memories: url(/img/tree-art/memories-light.webp?v=f95171aa3506); --tb-head: url(/img/tree-bg/tree-head-light.webp?v=e559bdf3a37e); --tb-whole: url(/img/tree-bg/tree-whole-light.webp?v=fdc86fe3b05f); --ta-fade: rgba(248,238,222,0.95); --ta-shade: rgba(160,108,40,0.10); --sc-line: #C9954F; }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) { --ta-rings: url(/img/tree-art/rings-dark.webp?v=2ba5053d65eb); --ta-photos: url(/img/tree-art/photos-dark.webp?v=3857743c6ab8); --ta-siblings: url(/img/tree-art/siblings-dark.webp?v=e4711786d5d9); --ta-tree: url(/img/tree-art/tree-dark.webp?v=fe83e73a3ae0); --ta-horse: url(/img/tree-art/horse-dark.webp?v=4c7e763918e4); --ta-seal: url(/img/tree-art/seal-dark.webp?v=d056a9fd812a); --ta-events: url(/img/tree-art/events-dark.webp?v=379052aed6b6); --ta-memories: url(/img/tree-art/memories-dark.webp?v=b5775dfd2f14); --tb-head: url(/img/tree-bg/tree-head-dark.webp?v=913829fb73c9); --tb-whole: url(/img/tree-bg/tree-whole-dark.webp?v=7417af370910); --ta-fade: rgba(36,21,12,0.96); --ta-shade: rgba(20,10,4,0.35); --sc-line: #E6B976; } }
:root[data-style="heritage"][data-theme="dark"] { --ta-rings: url(/img/tree-art/rings-dark.webp?v=2ba5053d65eb); --ta-photos: url(/img/tree-art/photos-dark.webp?v=3857743c6ab8); --ta-siblings: url(/img/tree-art/siblings-dark.webp?v=e4711786d5d9); --ta-tree: url(/img/tree-art/tree-dark.webp?v=fe83e73a3ae0); --ta-horse: url(/img/tree-art/horse-dark.webp?v=4c7e763918e4); --ta-seal: url(/img/tree-art/seal-dark.webp?v=d056a9fd812a); --ta-events: url(/img/tree-art/events-dark.webp?v=379052aed6b6); --ta-memories: url(/img/tree-art/memories-dark.webp?v=b5775dfd2f14); --tb-head: url(/img/tree-bg/tree-head-dark.webp?v=913829fb73c9); --tb-whole: url(/img/tree-bg/tree-whole-dark.webp?v=7417af370910); --ta-fade: rgba(36,21,12,0.96); --ta-shade: rgba(20,10,4,0.35); --sc-line: #E6B976; }
[data-style] .gn-art[data-motif="rings"] { --ta: var(--ta-rings); }
[data-style] .gn-art[data-motif="photos"] { --ta: var(--ta-photos); }
[data-style] .gn-art[data-motif="siblings"] { --ta: var(--ta-siblings); }
[data-style] .gn-art[data-motif="tree"] { --ta: var(--ta-tree); }
[data-style] .gn-art[data-motif="horse"] { --ta: var(--ta-horse); }
[data-style] .gn-art[data-motif="seal"] { --ta: var(--ta-seal); }
[data-style] .gn-art[data-motif="events"] { --ta: var(--ta-events); }
[data-style] .gn-art[data-motif="memories"] { --ta: var(--ta-memories); }
[data-style] .gn-segrow { margin: 4px 0 calc(16px * var(--k)); }
[data-style] .gn-cols { display: grid; grid-template-columns: minmax(0, 1fr) calc(400px * min(var(--k), 1.2)); gap: 30px; align-items: start; }
[data-style] .gn-fcol { min-width: 0; max-width: 760px; }
@media (max-width: 1023px) { [data-style] .gn-cols { grid-template-columns: minmax(0, 1fr); } [data-style] .gn-fcol { max-width: none; } }

/* The focus block: the oak behind (its 45 % point on the portrait's centre), ‹ › beside the portrait, the name, the years. */
[data-style] .gn-focus { position: relative; isolation: isolate; text-align: center; padding: 18px 0 calc(14px * var(--k)); }
[data-style] .gn-oak { display: none; }
:root[data-style="heritage"] .gn-oak { display: block; position: absolute; z-index: -1; left: 50%; top: calc(18px + 62px * var(--k)); width: min(115%, 600px); aspect-ratio: 1500 / 610;
  transform: translate(-50%, -45%); background: var(--tb-head) center / contain no-repeat; opacity: var(--g-tree-head-opacity); pointer-events: none; }
[data-style] .gn-fline { display: flex; align-items: center; justify-content: center; gap: calc(22px * var(--k)); }
[data-style] .gn-fline .gn-mt { --mt: calc(124px * var(--k)) !important; }
[data-style] .gn-rbtn { flex: none; display: inline-grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-radius: 50%; padding: 0;
  border: 1.25px solid var(--ctl-edge); background: var(--ctl-fill); color: var(--ctl-icon); cursor: pointer; }
[data-style] .gn-rbtn[hidden] { display: inline-grid; visibility: hidden; } /* the portrait stays in the middle */
[data-style] .gn-rbtn .i { width: calc(20px * var(--k)); height: calc(20px * var(--k)); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-rbtn { border-color: var(--g-pill-edge); color: var(--g-accent); box-shadow: 0 0 8px -2px var(--g-bloom); }
[data-style] .gn-fname { margin: calc(12px * var(--k)) 0 2px; font: 600 calc(34px * var(--kt))/1.1 var(--display); color: var(--ink); overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-style] .gn-fyrs { margin: 0; font: italic 500 calc(20px * var(--kt))/1.3 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
[data-style] .gn-fhint { display: inline-flex; margin: calc(12px * var(--k)) auto 0; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 var(--fs-meta)/1.2 var(--text); color: var(--ink-2); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-fhint { border-color: var(--g-pill-edge); background: color-mix(in srgb, var(--g-fill-c) 50%, transparent); }
[data-style] .gn-fnone { margin-top: 14px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
[data-style] .gn-fnone p { margin: 0; }

/* The rows: the scene (96 × k, full height, fading into the row's fill from 58 %, shaded at the edges), the gold divider, the
   title and sub, up to three faces (42 × k, overlapping by 8; with more, two and "+N"; at Larger two, or one and "+N"), ›. The
   row is a button laid over the whole row; the faces are their own buttons above it. */
[data-style] .gn-rows { list-style: none; margin: calc(14px * var(--k)) 0 0; padding: 0; display: grid; gap: 10px; }
[data-style] .gn-grow { position: relative; display: grid; grid-template-columns: calc(96px * var(--k)) minmax(0, 1fr) auto 26px; align-items: center; min-height: calc(80px * var(--k));
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
[data-style] .gn-grow-btn { position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
[data-style] .gn-grow-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
[data-style] .gn-art { align-self: stretch; position: relative; display: grid; place-items: center; min-height: calc(80px * var(--k)); color: var(--accent);
  background: radial-gradient(circle at 40% 30%, var(--surface-2), var(--surface)); border-right: 1px solid var(--line); }
[data-style] .gn-art .i { width: calc(24px * var(--k)); height: calc(24px * var(--k)); }
:root[data-style="heritage"] .gn-art { border-right: 0; background: var(--ta) center / cover no-repeat; }
:root[data-style="heritage"] .gn-art .i { display: none; }
:root[data-style="heritage"] .gn-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 58%, var(--ta-fade) 100%),
  linear-gradient(180deg, var(--ta-shade), transparent 22%, transparent 78%, var(--ta-shade)); }
[data-style] .gn-tx { display: grid; min-width: 0; margin-left: 12px; padding: 4px 12px 4px 16px; border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
[data-style] .gn-tx b { font: 600 calc(21px * var(--kt))/1.15 var(--display); color: var(--ink); overflow-wrap: normal; word-break: keep-all; }
[data-style] .gn-tx small { font: 400 calc(14.5px * var(--kt))/1.3 var(--text); color: var(--muted); }
[data-style] .gn-faces { position: relative; z-index: 2; display: flex; align-items: center; padding: 0 10px 0 16px; }
[data-style] .gn-face { padding: 0; margin-left: -8px; border: 0; background: none; border-radius: 50%; cursor: pointer; }
[data-style] .gn-face:first-child { margin-left: 0; }
[data-style] .gn-face .gn-mt { --mt: calc(42px * var(--k)) !important; }
[data-style] .gn-face:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-face:focus-visible { outline-color: var(--g-hot); }
[data-style] .gn-plus { margin-left: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font: 600 var(--fs-meta)/1 var(--text); color: var(--ink-2); font-variant-numeric: lining-nums; }
[data-style] .gn-plus.lg { display: none; }
[data-style] .gn-grow.many3 .gn-face[data-i="3"] { display: none; }
:root[data-style][data-text="larger"] .gn-grow .gn-plus.std { display: none; }
:root[data-style][data-text="larger"] .gn-grow.many2 .gn-plus.lg { display: inline-block; }
:root[data-style][data-text="larger"] .gn-grow .gn-face[data-i="3"], :root[data-style][data-text="larger"] .gn-grow.many2 .gn-face[data-i="2"] { display: none; }
[data-style] .gn-chev { width: 20px; height: 20px; color: var(--accent); }
[data-style] .gn-grow:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-grow:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--g-hot) 60%, transparent), 0 0 22px -6px var(--g-bloom); }
@media (max-width: 600px) { [data-style] .gn-grow { grid-template-columns: calc(72px * var(--k)) minmax(0, 1fr) auto 20px; } [data-style] .gn-faces { padding: 0 6px 0 8px; } }
@media (max-width: 600px) { :root[data-style][data-text]:not([data-text="standard"]) .gn-grow { grid-template-columns: calc(64px * var(--k)) minmax(0, 1fr) 20px; }
  :root[data-style][data-text]:not([data-text="standard"]) .gn-faces { grid-column: 2; grid-row: 2; padding: 0 0 10px 28px; } }

/* A group's list (the #77 popover look, as Change person's). */
[data-style] .gn-gl-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
[data-style] .gn-gl-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; }
[data-style] .gn-gl-who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: calc(52px * var(--k)); padding: 4px 8px; border: 0; border-radius: 12px;
  background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
[data-style] .gn-gl-who:hover { background: var(--tree-selected); }
[data-style] .gn-gl-who .gn-mt { --mt: calc(44px * var(--k)) !important; }
[data-style] .gn-gl-focus { display: inline-grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-radius: 50%; color: var(--accent); }
[data-style] .gn-gl-focus:hover { background: var(--soft); }
[data-style] .gn-gl-focus .i { width: calc(20px * var(--k)); height: calc(20px * var(--k)); }

/* The side card (#89 §1, framed; Q1: a plain lit head, no oak), sticky beside the rows; under 1024 px it floats over a scrim. */
[data-style] .gn-side { position: sticky; top: calc(var(--gn-headh, 0px) + 8px); max-height: calc(100dvh - var(--gn-headh, 0px) - 24px); overflow: auto; overscroll-behavior: contain; padding: 8px; margin: -8px; scrollbar-width: thin; }
[data-style] .gn-side.float { display: none; position: fixed; z-index: 70; top: 84px; left: max(14px, calc(50% - 230px)); right: max(14px, calc(50% - 230px)); max-height: calc(100dvh - 98px); margin: 0; }
[data-style] .gn-side.float[data-open] { display: block; animation: details-pop .18s ease-out; }
[data-style] .gn-sc { position: relative; border-radius: 30px; padding: calc(26px * var(--k)) 18px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-sc { background: radial-gradient(420px 220px at 50% 0, var(--g-bg-top), var(--g-bg) 70%); border: 1.5px solid var(--sc-line);
  box-shadow: 0 0 0 4px rgba(255,240,210,.06), 0 0 26px -6px var(--g-bloom), inset 0 0 18px -6px rgba(230,185,118,.25); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-sc::before { content: ""; position: absolute; left: 25%; right: 25%; top: -1px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--g-hot), transparent); }
[data-style] .gn-sc-x { position: absolute; z-index: 3; right: 14px; top: 14px; display: inline-grid; place-items: center; width: calc(44px * var(--k)); height: calc(44px * var(--k)); padding: 0; border-radius: 50%;
  border: 1.25px solid var(--ctl-edge); background: var(--ctl-fill); color: var(--ctl-icon); cursor: pointer; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-sc-x { border-color: var(--g-pill-edge); color: var(--g-accent); }
[data-style] .gn-sc-head { position: relative; isolation: isolate; display: grid; justify-items: center; }
:root[data-style="heritage"] .gn-sc-head::before { content: ""; position: absolute; z-index: -1; left: 50%; top: calc(54px * var(--k)); width: calc(220px * var(--k)); height: calc(220px * var(--k)); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--g-bloom) 70%, transparent), transparent); pointer-events: none; }
[data-style] .gn-sc-head .gn-mt { --mt: calc(108px * var(--k)) !important; }
[data-style] .gn-sc-head h2 { margin: calc(14px * var(--k)) 0 4px; padding: 0 30px; font: 600 calc(30px * var(--kt))/1.1 var(--display); color: var(--ink); overflow-wrap: break-word; }
[data-style] .gn-sc-yrs { margin: 0; font: italic 500 calc(19px * var(--kt))/1.25 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
[data-style] .gn-sc-rel { margin: 4px 0 0; font: 500 var(--fs-meta)/1.3 var(--text); color: var(--muted); }
[data-style] .gn-sc-head hr { width: 84px; margin: 12px auto 14px; border: 0; border-top: 1px solid var(--accent); }
[data-style] .gn-sc-dates { margin: 0; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; }
[data-style] .gn-sc-dates > div { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; min-height: calc(50px * var(--k)); padding: 10px 14px; font: 400 var(--fs-label)/1.3 var(--text); }
[data-style] .gn-sc-dates > div + div { border-top: 1px solid var(--line); }
[data-style] .gn-sc-dates dt { color: var(--ink-2); }
[data-style] .gn-sc-dates dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: lining-nums; }
[data-style] .gn-crow { display: grid; grid-template-columns: calc(80px * var(--k)) minmax(0, 1fr) 20px; align-items: center; min-height: calc(64px * var(--k)); margin-top: 8px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; text-align: left; color: var(--ink); text-decoration: none; }
[data-style] .gn-crow .gn-art { min-height: calc(64px * var(--k)); }
[data-style] .gn-crow-l { margin-left: 10px; padding: 4px 0 4px 14px; border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font: 500 var(--fs-label)/1.25 var(--text); overflow-wrap: normal; }
[data-style] .gn-crow > .i { width: 18px; height: 18px; color: var(--accent); }
[data-style] a.gn-crow:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
[data-style] .gn-crow.none { grid-template-columns: calc(80px * var(--k)) minmax(0, 1fr); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) :is(.gn-sc-dates, .gn-crow) { border-color: var(--g-edge); background: radial-gradient(120% 140% at 30% 0%, var(--g-fill-c), var(--g-fill-e)); }
[data-style] .gn-sc-focus { display: flex; justify-content: center; width: 100%; min-height: calc(52px * var(--k)); margin-top: 14px; }
[data-style] .gn-sc-open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; color: var(--accent); font: 500 var(--fs-label)/1.2 var(--text); }
@media (prefers-reduced-motion: reduce) { [data-style] .gn-side.float[data-open] { animation: none; } }
@media print { [data-style] .gn-side, [data-style] .gn-oak { display: none !important; } }

/* ---------- #91 part 2 (spec §5.6c §4, the app's #85 §4, #87 §3, #90): the Whole tree ---------- */
/* Karol's oak fixed to the canvas (a 0-high anchor at the canvas's top; the map pans and zooms over it), lit cards, gold
   connectors, and the controls and collapse knobs in #90's dark fill with the lit edge, the glow and accent icons and words
   (Heritage dark; light keeps its controls). Values: #90's ctlDarkFill / ctlDarkEdge / ctlDarkGlow (to come from heritage.json). */
[data-style] .gn-w91 .gn-side { flex: 0 1 calc(400px * min(var(--k), 1.2)); }
[data-style] .gn-oakw { display: none; }
:root[data-style="heritage"] .gn-oakw { display: block; position: relative; z-index: 0; height: 0; pointer-events: none; }
:root[data-style="heritage"] .gn-oakw::before { content: ""; position: absolute; left: 50%; top: 8px; width: min(170%, 900px); aspect-ratio: 1672 / 941; transform: translateX(-50%);
  background: var(--tb-whole) center top / contain no-repeat; opacity: var(--g-tree-whole-opacity); }
[data-style] .gn-w91 .gn-mapwrap { z-index: 1; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-stage { background: radial-gradient(800px 400px at 50% 0, var(--g-bg-top), var(--g-bg)); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-p.gn-box { border-color: var(--g-edge); border-radius: 14px; background: radial-gradient(120% 140% at 30% 0%, var(--g-fill-c), var(--g-fill-e)); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-p.gn-box .gn-pn small { color: var(--g-accent); font-style: italic; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-p.gn-box.f { border-color: var(--g-accent); box-shadow: 0 0 16px var(--g-bloom); } /* #95: the 1.5 px accent edge and a 16 glow */
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-wires path:not(.dash) { stroke: var(--g-accent); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 :is(.gn-ctl .btn, .gn-more) { border: 1.25px solid var(--g-pill-edge); background: var(--g-pill-fill); color: var(--g-accent); box-shadow: none; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-w91 .gn-ctl .btn .i { color: var(--g-accent); }
:root[data-style="heritage"] { --ctl-dk-fill: #1E110A; --ctl-dk-edge: rgba(214,180,124,0.70); --ctl-dk-glow: rgba(214,150,80,0.30); }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) .gn-w91 :is(.gn-ctl .btn, .gn-more) { background: var(--ctl-dk-fill); border-color: var(--ctl-dk-edge); box-shadow: 0 0 6px var(--ctl-dk-glow); } }
:root[data-style="heritage"][data-theme="dark"] .gn-w91 :is(.gn-ctl .btn, .gn-more) { background: var(--ctl-dk-fill); border-color: var(--ctl-dk-edge); box-shadow: 0 0 6px var(--ctl-dk-glow); }
[data-style] .gn-w91 .gn-ctl .btn { gap: 8px; border-radius: 999px; font-weight: 600; }

/* ---------- #91 part 3 (spec §5.6c §6, the app's #88; Karol Q4: the rail always in view): Names ---------- */
/* "Find a name" (a pill, no label above) over the faint oak (dark .38 / light .32), the "You" card, then one card per surname
   section (3 columns of rows at ≥ 1180 px of content, 2 at ≥ 760, 1 below) under a sticky section line (small capitals in
   accent, "· N", a gold hairline). The A–Z rail: a 46 px pill at the list's right, sticky; empty letters at 28 %, the
   current letter gold; under 760 px it becomes #88's "A–Z" pill and sheet. Matched letters underlined in accent. */
[data-style] .gn-nhead { position: relative; isolation: isolate; padding-top: 6px; }
:root[data-style="heritage"] .gn-noak { top: 0; width: min(115%, 560px); transform: translateX(-50%); opacity: .32; }
/* The oak sits behind the field and "You" only: what follows paints over it (web-design's #91 review). */
[data-style] .gn-ncol [data-gn-names-res] > * { position: relative; z-index: 1; }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) .gn-noak { opacity: .38; } }
:root[data-style="heritage"][data-theme="dark"] .gn-noak { opacity: .38; }
[data-style] .gn-nfind { position: relative; display: flex; align-items: center; gap: 10px; max-width: 760px; min-height: calc(50px * var(--k)); padding: 0 6px 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--muted); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-nfind { border-color: var(--g-pill-edge); background: color-mix(in srgb, var(--g-fill-e) 80%, transparent); }
[data-style] .gn-nfind > .i { flex: none; width: calc(18px * var(--k)); height: calc(18px * var(--k)); color: var(--accent); }
[data-style] .gn-nfind input { flex: 1; min-width: 0; min-height: calc(46px * var(--k)); border: 0; background: none; color: var(--ink); font: 400 var(--fs-label)/1.2 var(--text); outline: none; }
[data-style] .gn-nfind input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
[data-style] .gn-nfind:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .gn-nfind .search-clear { position: static; transform: none; flex: none; }
[data-style] .gn-ncount { margin: 12px 0 0; font: 400 var(--fs-label)/1.3 var(--text); color: var(--ink-2); }
[data-style] .gn-ncount b { color: var(--ink); }
[data-style] .gn-hl { background: none; color: inherit; text-decoration: underline 2px var(--accent); text-underline-offset: 4px; }
[data-style] .gn-nyou { margin-top: 14px; max-width: 760px; }
[data-style] .gn-you { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; background: var(--primary-fill); color: var(--on-primary); font: 700 var(--fs-meta)/1.2 var(--text); }
[data-style] .gn-nbody { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 14px; align-items: start; margin-top: 18px; }
[data-style] .gn-nsec { scroll-margin-top: calc(var(--gn-headh, 0px) + 4px); }
[data-style] .gn-nsec + .gn-nsec { margin-top: 18px; }
[data-style] .gn-nline { position: sticky; top: var(--gn-headh, 0px); z-index: 3; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 0 8px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent); font: 600 var(--fs-meta)/1.3 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
[data-style] .gn-nline:focus { outline: none; }
[data-style] .gn-nline:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .gn-nline-t { font-variant: small-caps; text-transform: none; letter-spacing: .1em; font-size: calc(var(--fs-label) * 1.05); overflow-wrap: break-word; min-width: 0; }
[data-style] .gn-nline small { flex: none; color: var(--muted); letter-spacing: 0; font: 500 var(--fs-meta)/1 var(--text); text-transform: none; font-variant-numeric: lining-nums; }
[data-style] .gn-nline > i { flex: 1 1 24px; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, transparent), transparent); }
[data-style] .gn-az { display: none; flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--ctl-fill); color: var(--ink); font: 600 var(--fs-meta)/1 var(--text); letter-spacing: 0; cursor: pointer; }
[data-style] .gn-ncol { max-width: none; }
[data-style] .gn-nlist { min-width: 0; container-type: inline-size; }
[data-style] .gn-ncard { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 4px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
[data-style] .gn-nyou.gn-ncard { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 760px) { [data-style] .gn-nlist .gn-ncard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1180px) { [data-style] .gn-nlist .gn-ncard { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-ncard { border-color: var(--g-edge); background: radial-gradient(120% 140% at 30% 0%, var(--g-fill-c), var(--g-fill-e)); }
[data-style] .gn-nrow { display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; align-items: center; gap: 12px; width: 100%; min-height: calc(64px * var(--k)); padding: 8px 12px; border: 0;
  border-radius: 12px; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
[data-style] .gn-nrow:hover { background: var(--tree-selected); }
[data-style] .gn-nrow:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
[data-style] .gn-nrow .gn-mt { --mt: calc(44px * var(--k)) !important; }
[data-style] .gn-nrow-t { display: grid; min-width: 0; }
[data-style] .gn-nrow-t b { font: 600 calc(19px * var(--kt))/1.2 var(--display); color: var(--ink); overflow-wrap: normal; }
[data-style] .gn-nrow-t small { font: italic 500 calc(15px * var(--kt))/1.3 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
[data-style] .gn-nrow > .i { width: 16px; height: 16px; color: var(--accent); }
[data-style] .gn-rail { position: sticky; top: calc(var(--gn-headh, 0px) + 8px); display: flex; flex-direction: column; align-items: center; gap: 0; width: 46px; padding: 8px 0;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); max-height: calc(100dvh - var(--gn-headh, 0px) - 24px); overflow-y: auto; scrollbar-width: none; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-rail { border-color: var(--g-edge); background: radial-gradient(120% 60% at 50% 0%, var(--g-fill-c), var(--g-fill-e)); }
[data-style] .gn-rail-h { display: none; }
[data-style] .gn-rail > :is(a, span) { display: grid; place-items: center; width: 40px; height: clamp(16px, calc((100dvh - var(--gn-headh, 0px) - 44px) / var(--rail-n, 27)), 28px); /* every letter, "#" too, in the window */ border-radius: 999px; font: 600 var(--fs-meta)/1 var(--text); color: var(--ink-2); text-decoration: none; }
[data-style] .gn-rail > span[aria-disabled] { opacity: .28; cursor: default; }
[data-style] .gn-rail > a:hover { background: var(--soft); color: var(--ink); }
[data-style] .gn-rail > a[aria-current="true"] { color: var(--on-primary); background: var(--primary-fill); }
@media (max-width: 760px) {
  [data-style] .gn-nbody { grid-template-columns: minmax(0, 1fr); }
  [data-style] .gn-az { display: inline-flex; align-items: center; }
  [data-style] .gn-rail { display: none; }
  [data-style] .gn-rail.open { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 85vh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.35); }
  [data-style] .gn-rail.open .gn-rail-h { display: grid; grid-column: 1 / -1; margin: 0 0 4px; font: 600 calc(22px * var(--kt))/1.2 var(--display); color: var(--ink); }
  [data-style] .gn-rail.open .gn-rail-h small { font: 400 var(--fs-meta)/1.3 var(--text); color: var(--muted); }
  [data-style] .gn-rail.open > :is(a, span) { width: auto; height: auto; min-height: calc(50px * var(--k)); border-radius: 14px; border: 1px solid var(--line-strong); font-size: var(--fs-label); }
}
@media print { [data-style] .gn-rail, [data-style] .gn-nfind, [data-style] .gn-noak { display: none !important; } }

/* ---------- #91 part 4 (spec §5.6c §7, the app's #89 §4): the person page's head ---------- */
/* Karol's oak behind the portrait (its 45 % point on the portrait's centre, as the Family head), the portrait 144 × k with the
   focused ring, the years in gold italic, the gold rule. Everything below stays. Classic: no oak. */
[data-style] .pn-who { position: relative; isolation: isolate; }
/* The oak inside a box clipped at the column's left edge (the page's own padding), its crown fading into that edge over 72 px
   instead of being cut (web-design's review); where it doesn't reach the edge nothing changes. */
[data-style] .pn-oakclip { position: absolute; z-index: -1; top: -200px; bottom: -200px; left: calc(-1 * var(--pn-pad-l, 32px)); right: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px); mask-image: linear-gradient(90deg, transparent 0, #000 72px); }
:root[data-style="heritage"] .pn-oak { top: 50%; left: calc(var(--pn-pad-l, 32px) + 72px * var(--k) + 5px); } /* the portrait's centre: it is centred in the row's height */
[data-style] .pn-mount { width: calc(144px * var(--k)); height: calc(144px * var(--k)); }
[data-style] .pn-yrs { margin: 4px 0 0; font: italic 500 calc(22px * var(--kt))/1.25 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
[data-style] .pn-rule { width: 84px; margin: 12px 0 10px; border: 0; border-top: 1px solid var(--accent); }
@media (max-width: 860px) { [data-style] .pn-mount { width: calc(112px * var(--k)); height: calc(112px * var(--k)); } :root[data-style="heritage"] .pn-oak { top: calc(200px + 5px + 56px * var(--k)); left: calc(var(--pn-pad-l, 32px) + 56px * var(--k) + 5px); } /* ≤ 860: the portrait on top of its wrapped row */ }
/* #91 §5 "Which one is you?": a modal dialog (the native one: focus kept, Esc = Skip), the #77 card look; the quiet link under
   the focus block reopens it. */
[data-style] .gn-isyou { display: block; margin: 8px auto 0; padding: 6px 4px; min-height: 44px; border: 0; background: none; color: var(--accent); font: 500 var(--fs-meta)/1.3 var(--text);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
[data-style] .gn-which { width: min(calc(440px * min(var(--k), 1.25)), calc(100vw - 32px)); max-height: min(80vh, 640px); padding: 22px 22px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
[data-style] .gn-which::backdrop { background: var(--scrim); }
[data-style] .gn-which h2 { margin: 0 0 6px; font: var(--title-w) calc(26px * var(--kt))/1.15 var(--display); }
[data-style] .gn-which > p { margin: 0 0 14px; color: var(--ink-2); font: 400 var(--fs-label)/1.4 var(--text); }
[data-style] .gn-which .input { width: 100%; min-height: calc(48px * var(--k)); }
[data-style] .gn-which .gn-pick-list { margin-top: 10px; max-height: 40vh; overflow-y: auto; }
[data-style] .gn-which-msg { margin: 10px 0 0; min-height: 1em; color: var(--muted); font: 400 var(--fs-meta)/1.4 var(--text); }
[data-style] .gn-which-msg.err { color: var(--danger); }
[data-style] .gn-which-skip { display: flex; margin: 8px 0 0 auto; color: var(--ink-2); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-which { border: 1.5px solid var(--sc-line); background: radial-gradient(420px 220px at 50% 0, var(--g-bg-top), var(--g-bg) 70%);
  box-shadow: 0 0 0 4px rgba(255,240,210,.06), 0 0 26px -6px var(--g-bloom); }
@media (max-width: 600px) { [data-style] .gn-which { margin: auto 0 0; width: 100vw; max-width: none; border-radius: 20px 20px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); } }
/* #89 §1 "one oak at a time": while the card floats over the page, the page's own oak fades with the scrim. */
:root[data-style="heritage"] :is(.gn-oak, .gn-oakw) { transition: opacity .18s; }
:root[data-style="heritage"] .gn-screen:has(.gn-side.float[data-open]) :is(.gn-oak, .gn-oakw) { opacity: 0; }
:root[data-style="heritage"] .gn-screen:has(.gn-side.float[data-open]) .gn-oakw::before { opacity: 0; }
[data-style] .gn-which input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
/* web-design's #91 review: the Whole tree's card is never under the map. Beside it when the content is ≥ 1180 px; below that it
   floats framed over the scrim (archive-genealogy.js, as Family's under 1024 px). */
[data-style] .gn-w91 .gn-treebody { flex-wrap: nowrap; }
[data-style] .gn-w91 .gn-stage { flex: 1 1 auto; }


/* ---------- #93 (spec §5.6d, Karol 07.11): Names as an address book ---------- */
/* One frame (radius 18, 1 px edge) under the head: the list pane (400 × min(k, 1.2), its own scroll, a slightly different
   ground) and the person pane (the lit ground, the oak centred across it and dimmed behind the tiles: dark .40 / light .32,
   soft edges; Karol through PM), split by one line. The frame fills to the window's bottom (min 520 px). Under 1024 px the
   list alone; a click floats the framed card. Classic: no oak, no scenes, flat. */
:root[data-style] { --bk-ground: var(--surface); --pp-fade: rgba(0,0,0,.55); --pp-oak: 0; }
:root[data-style="heritage"] { --bk-ground: #FBF4E8; --pp-fade: rgba(251,244,232,.94); --pp-oak: .32; }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) { --bk-ground: #170D08; --pp-fade: rgba(14,7,4,.92); --pp-oak: .40; } }
:root[data-style="heritage"][data-theme="dark"] { --bk-ground: #170D08; --pp-fade: rgba(14,7,4,.92); --pp-oak: .40; }
[data-style] .gn-n93 .gn-side:not(.float) { display: none; }
[data-style] .gn-book { display: grid; grid-template-columns: calc(400px * min(var(--k), 1.2)) minmax(0, 1fr); height: max(520px, calc(100dvh - var(--bk-top, 320px) - 16px));
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-book { border-color: var(--g-edge); }
[data-style] .gn-bk-list { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 24px; background: var(--bk-ground); border-right: 1px solid var(--line); scrollbar-width: thin; }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-bk-list { border-right-color: var(--g-edge); }
[data-style] .gn-bk-list .gn-nfind { max-width: none; min-height: calc(46px * var(--k)); }
[data-style] .gn-bk-letters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 4px; }
[data-style] .gn-bk-letters a { display: grid; place-items: center; width: calc(34px * var(--k)); height: calc(34px * var(--k)); border-radius: 50%; border: 1px solid var(--line-strong);
  font: 600 var(--fs-meta)/1 var(--text); color: var(--ink-2); text-decoration: none; }
[data-style] .gn-bk-letters a:hover { background: var(--soft); color: var(--ink); }
[data-style] .gn-bk-letters a[aria-current="true"] { background: var(--primary-fill); border-color: transparent; color: var(--on-primary); }
[data-style] .gn-bk-n { margin-left: 4px; font: 400 var(--fs-meta)/1.2 var(--text); color: var(--muted); }
[data-style] .gn-you-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 10px 0 2px; padding: 3px 14px 3px 3px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: none; color: var(--ink); font: 400 var(--fs-label)/1.2 var(--text); cursor: pointer; }
[data-style] .gn-you-chip .gn-mt { --mt: calc(30px * var(--k)) !important; }
[data-style] .gn-you-chip b { color: var(--accent); font-weight: 600; }
[data-style] .gn-you-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-style] .gn-you-chip[aria-current="true"] { background: var(--tree-selected); }
[data-style] .gn-you-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .gn-bk-sections .gn-nsec { scroll-margin-top: 0; }
[data-style] .gn-bk-sh { position: sticky; top: calc(var(--bk-toph, 0px) - 14px); z-index: 2; margin: 14px 0 0; padding: 10px 4px 6px; background: var(--bk-ground); font: 600 calc(22px * var(--kt))/1.15 var(--display); color: var(--ink); }
[data-style] .gn-bk-sh small { font: 400 calc(14px * var(--kt))/1 var(--text); color: var(--muted); font-variant-numeric: lining-nums; }
[data-style] .gn-bk-sh:focus { outline: none; }
[data-style] .gn-bk-rows { list-style: none; margin: 0; padding: 0; }
[data-style] .gn-bk-rows li + li { border-top: 1px solid var(--line); }
[data-style] .gn-bk-list .gn-nrow { position: relative; min-height: calc(58px * var(--k)); padding: 9px 12px; border-radius: 12px; }
[data-style] .gn-bk-list .gn-nrow .gn-mt { --mt: calc(40px * var(--k)) !important; }
[data-style] .gn-bk-list .gn-nrow > .i { opacity: .7; }
[data-style] .gn-bk-list .gn-nrow[aria-current="true"] { background: var(--tree-selected); }
[data-style] .gn-bk-list .gn-nrow[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
[data-style] .gn-bk-pane { position: relative; isolation: isolate; min-height: 0; overflow: hidden; container-type: inline-size; /* the tiles in a row from 520 px of pane (web-design's review) */ background: radial-gradient(1000px 600px at 0 0, var(--surface-2), var(--bg) 70%); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-bk-pane { background: radial-gradient(1000px 600px at 0 0, var(--g-bg-top), var(--g-bg) 70%); }
[data-style] .gn-pp-oak { display: none; }
:root[data-style="heritage"] .gn-pp-oak { display: block; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: var(--pp-oak);
  background: var(--tb-whole) center / cover no-repeat; /* Karol: the whole tree across the whole section, crown to roots (web-design's correction) */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }
[data-style] .gn-bk-pane-body { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: calc(28px * var(--k)) 32px 32px; }
[data-style] .gn-pp-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
[data-style] .gn-pp-head .gn-mt { --mt: calc(120px * var(--k)) !important; }
[data-style] .gn-pp-t { min-width: 0; flex: 1 1 260px; }
[data-style] .gn-pp-t h2 { margin: 0; font: 600 calc(40px * var(--kt))/1.08 var(--display); color: var(--ink); overflow-wrap: break-word; }
[data-style] .gn-pp-yrs { margin: 4px 0 0; font: italic 500 calc(22px * var(--kt))/1.25 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
[data-style] .gn-pp-note { margin: 6px 0 0; font: 400 var(--fs-meta)/1.35 var(--text); color: var(--muted); }
[data-style] .gn-pp-dates { margin-top: 18px; }
[data-style] .gn-pp-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
@container (min-width: 520px) { [data-style] .gn-pp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 859px) { [data-style] .gn-pp-tile span { display: flex; flex-direction: column; } [data-style] .gn-pp-tile span .gn-pp-dot { display: none; } }
[data-style] .gn-pp-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: calc(120px * var(--k)); padding: 12px 14px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-decoration: none; overflow: hidden; }
[data-style] .gn-pp-tile .i { width: calc(22px * var(--k)); height: calc(22px * var(--k)); color: var(--accent); }
[data-style] .gn-pp-tile span { font: 400 var(--fs-label)/1.25 var(--text); color: var(--ink-2); }
[data-style] .gn-pp-tile b { font-weight: 600; color: var(--ink); }
[data-style] .gn-pp-tile.none span { color: var(--muted); }
[data-style] a.gn-pp-tile:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
:root[data-style="heritage"] .gn-pp-tile { justify-content: flex-end; border-color: var(--g-edge); background: linear-gradient(180deg, transparent 25%, var(--pp-fade) 92%), var(--ta) center / cover no-repeat; }
:root[data-style="heritage"] .gn-pp-tile .i { display: none; }
[data-style] .gn-pp-tile[data-motif="photos"] { --ta: var(--ta-photos); }
[data-style] .gn-pp-tile[data-motif="events"] { --ta: var(--ta-events); }
[data-style] .gn-pp-tile[data-motif="memories"] { --ta: var(--ta-memories); }
[data-style] .gn-pp-fam { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 16px; color: var(--accent); font: 600 var(--fs-label)/1.2 var(--text); text-decoration: none; }
[data-style] .gn-pp-fam:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-style] .gn-pp-fam .i { width: 16px; height: 16px; }
[data-style] .gn-pp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 10px; }
[data-style] .gn-pp-acts .btn { min-height: calc(48px * var(--k)); }
@media (max-width: 1023px) {
  [data-style] .gn-book { display: block; height: auto; overflow: visible; }
  [data-style] .gn-bk-list { overflow: visible; border-right: 0; border-radius: 18px; }
  [data-style] .gn-bk-sh { top: var(--gn-headh, 0px); }
  [data-style] .gn-bk-pane { display: none; }
}
/* #93 review: under 1024 px no row looks selected until one is clicked (there is no pane). */
@media (max-width: 1023px) { [data-style] .gn-n93:not(.picked) :is(.gn-nrow, .gn-you-chip)[aria-current="true"] { background: none; } [data-style] .gn-n93:not(.picked) .gn-nrow[aria-current="true"]::before { content: none; } }
/* #93 correction: the dates card and the Family line let the tree show through (the tiles stay opaque, 16 px apart). */
:root[data-style="heritage"] { --pp-glass: rgba(251,244,232,.74); }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) { --pp-glass: rgba(36,21,12,.72); } }
:root[data-style="heritage"][data-theme="dark"] { --pp-glass: rgba(36,21,12,.72); }
:root[data-style="heritage"]:is([data-theme], :not([data-theme])) .gn-pp .gn-pp-dates { background: var(--pp-glass); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
:root[data-style="heritage"] .gn-pp-fam { padding: 0 14px; border-radius: 999px; background: var(--pp-glass); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
[data-style] .gn-pp-tiles { gap: 16px; }
/* #93 re-shoot review: the list pane's top block (search, letters, You) sticks, with a hairline once the list scrolls; and a
   soft halo (not a box) under the words that sit right on the oak, so they keep 7:1 over the lit crown and trunk. */
[data-style] .gn-bk-top { position: sticky; top: -14px; z-index: 4; margin: -14px -12px 0; padding: 14px 12px 6px; background: var(--bk-ground); border-bottom: 1px solid transparent; }
[data-style] .gn-bk-top.scrolled { border-bottom-color: var(--line); }
@media (max-width: 1023px) { [data-style] .gn-bk-top { position: static; margin: 0; padding: 0 0 6px; background: none; border-bottom: 0; } [data-style] .gn-bk-sh { top: var(--gn-headh, 0px); } } /* not sticky there: nothing over the frame's rounded top (web-design, 390) */
:root[data-style="heritage"] { --pp-halo: rgba(251,244,232,.95); }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) { --pp-halo: rgba(18,10,6,.92); } }
:root[data-style="heritage"][data-theme="dark"] { --pp-halo: rgba(18,10,6,.92); }
:root[data-style="heritage"] .gn-pp :is(.gn-pp-t h2, .gn-pp-yrs, .gn-pp-note, .gn-sc-open) { text-shadow: 0 0 2px var(--pp-halo), 0 0 10px var(--pp-halo), 0 0 22px var(--pp-halo); }


/* #96 the Whole tree's wheel hint plaque in the new look (spec §5.6e). */
[data-style] .gn-maphint { bottom: calc(44px * var(--k) + 40px); font: italic 500 calc(17px * var(--kt))/1.3 var(--display); color: var(--ink-2); }
[data-style] .gn-maphint kbd { font: 600 calc(13px * var(--kt))/1.3 var(--text); font-style: normal; letter-spacing: .04em; }
:root[data-style="classic"] .gn-maphint { font: 400 var(--fs-label)/1.3 var(--text); }
:root[data-style="heritage"] .gn-maphint { background: rgba(251,244,232,.92); color: var(--ink); border-color: var(--g-edge); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-style="heritage"] .gn-maphint kbd { border-color: var(--g-edge); }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) .gn-maphint { background: rgba(23,13,8,.86); color: var(--ink-2); } }
:root[data-style="heritage"][data-theme="dark"] .gn-maphint { background: rgba(23,13,8,.86); color: var(--ink-2); }


/* ---------- #97 (spec §5.6g): × on the focused person's docked card folds the side column; "Show the card" brings it back ---------- */
[data-style] .gn-screen.side-closed .gn-side:not(.float) { display: none; }
[data-style] .gn-screen.side-closed .gn-cols { grid-template-columns: minmax(0, 1fr); }
[data-style] .gn-screen.side-closed .gn-fcol { max-width: none; }
[data-style] :is(.gn-fcol, .gn-stage) { position: relative; }
[data-style] .gn-side-show { position: absolute; z-index: 6; top: 10px; right: 10px; min-height: calc(40px * var(--k)); font-weight: 600; }

/* ---------- #101 (spec §5.6h, Karol's form 09.11: A): the family tree's head is one slim bar ---------- */
/* From 1024 px one sticky row at the page's top, sharing it with the search and account circles (38 × k here; archive-look.js
   centres them on the bar, which keeps their room at its right end behind a 1 px divider): ‹ {First} · the title as the person
   switch · Start from me · gap · the views · Tools ⋯. A glass ground, a line under it once the page scrolls under it. Narrower
   than ~1200 px: no "The tree around", ‹ without its name, Start from me inside Tools. Under 1024 px: two short rows that scroll
   away (‹ · name ▾ · ⋯, then the views at full width). The Whole tree's zoom and Show are glass pills on the canvas. */
[data-style] .gn-bar { --bar-c: calc(38px * var(--k)); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  min-height: calc(64px * var(--k) + 24px); margin: 0 0 8px; padding: 12px calc(var(--bar-c) * 2 + 10px + 32px) 12px var(--s5); box-sizing: border-box; } /* the page's own left inset */
[data-style] .gn-bar::after { content: ""; position: absolute; right: calc(var(--bar-c) * 2 + 10px + 16px); top: 50%; width: 1px; height: calc(28px * var(--k)); transform: translateY(-50%); background: var(--line); }
[data-style] .gn-bar::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(-1 * var(--page-x, 32px)); background: var(--surface); border-bottom: 1px solid transparent; transition: border-color .15s; }
:root[data-style="heritage"] .gn-bar::before { background: rgba(251,244,232,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (prefers-color-scheme: dark) { :root[data-style="heritage"]:not([data-theme="light"]) .gn-bar::before { background: rgba(23,13,8,.78); } }
:root[data-style="heritage"][data-theme="dark"] .gn-bar::before { background: rgba(23,13,8,.78); }
[data-style] .gn-bar.stuck::before { border-bottom-color: var(--line); }
[data-style] .gn-bar-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
[data-style] .gn-bar-gap { flex: 1 1 0; min-width: 8px; }
[data-style] .gn-bar .gn-bar-back { min-height: calc(40px * var(--k)); padding: 0 14px 0 8px; gap: 4px; font-weight: 600; }
[data-style] .gn-bar .gn-bar-back[hidden] { display: none; }
[data-style] .gn-bar-title { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 4px 6px; margin: 0; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
[data-style] .gn-bar-pre { font: italic 400 calc(16px * var(--kt))/1.2 var(--text); color: var(--muted); white-space: nowrap; }
:root[data-style="classic"] .gn-bar-pre { font-style: normal; }
[data-style] .gn-bar-title b { font: 600 calc(25px * var(--kt))/1.15 var(--display); color: var(--ink); text-decoration: underline 1px dashed var(--edge, var(--line-strong)); text-underline-offset: 5px; white-space: nowrap; }
[data-style] .gn-bar-title:hover b { text-decoration-style: solid; text-decoration-color: var(--accent); }
[data-style] .gn-bar-title .i { align-self: center; width: 16px; height: 16px; color: var(--accent); }
[data-style] .gn-bar-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-style] .gn-bar-start { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--accent); font: 600 var(--fs-label)/1.2 var(--text); white-space: nowrap; text-decoration: none; }
[data-style] .gn-bar-start:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-style] .gn-bar .gn-who-you { white-space: nowrap; }
[data-style] .gn-bar-names { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; } /* as tall as the person switch, so nothing jumps */
[data-style] .gn-bar-names b { font: 600 calc(25px * var(--kt))/1.15 var(--display); color: var(--ink); }
[data-style] .gn-bar-names span { color: var(--muted); font: 400 var(--fs-label)/1.2 var(--text); white-space: nowrap; }
[data-style] .gn-bar .gn-seg { flex: none; }
[data-style] .gn-bar .gn-seg > a { min-height: calc(40px * var(--k)); padding: 0 14px; font-size: calc(15px * var(--kt)); }
[data-style] .gn-bar-tools, [data-style] .gn-bar-print { flex: none; min-height: calc(40px * var(--k)); padding: 0 14px 0 10px; font-weight: 600; }
[data-style] .gn-bar-tools .badge { margin-left: 2px; }
[data-style] .gn-tools-menu { width: 270px; border-radius: 16px; }
[data-style] .gn-tools-menu a .badge { margin-left: auto; }
[data-style] .gn-tools-menu .gn-tools-add { color: var(--accent); font-weight: 600; }
[data-style] .gn-tools-menu .gn-tools-start { display: none; }
/* The page's top row is the bar's: no room above it for the circles' own line. */
@media (min-width: 1024px) {
  [data-style] .app:has(.gn-bar) > .main { --main-pad: 0px; }
  [data-style] .app:has(.gn-bar) > .topbar { --c: calc(38px * var(--k)); }
}
/* Narrower: the words go, Start from me moves into Tools. */
@media (max-width: 1199px) {
  [data-style] .gn-bar-pre, [data-style] .gn-bar-histname { display: none; }
  [data-style] .gn-bar .gn-bar-back { padding: 0; width: calc(40px * var(--k)); justify-content: center; }
  [data-style] .gn-bar:has(.gn-bar-tools) .gn-bar-start { display: none; }
  [data-style] .gn-tools-menu .gn-tools-start { display: flex; }
  [data-style] .gn-tools-menu div.gn-tools-start { display: block; }
}
/* Under 1024 px: two short rows that scroll away; the circles stay in the shell's own place. */
@media (max-width: 1023px) {
  [data-style] .gn-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 0; padding: 4px 16px 6px; }
  [data-style] .gn-bar::after, [data-style] .gn-bar::before { content: none; }
  [data-style] .gn-bar-gap { display: none; }
  [data-style] .gn-bar .gn-seg { grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; }
  [data-style] .gn-bar .gn-seg > a { flex: 1 1 0; justify-content: center; }
  [data-style] .gn-bar-title b { font-size: calc(22px * var(--kt)); white-space: normal; overflow-wrap: anywhere; }
  [data-style] .gn-bar-names b { font-size: calc(22px * var(--kt)); }
  [data-style] .gn-bar-tools-w { display: none; }
  [data-style] .gn-bar .gn-bar-start, [data-style] .gn-bar .gn-who-you { display: none; }
}
@media (min-width: 861px) and (max-width: 1023px) { [data-style] .gn-bar { padding: 4px calc(88px * var(--k) + 10px + 16px) 6px var(--s5); } }
/* The Whole tree's controls on the canvas: Show at the top left, the zoom at the bottom right, #96's hint above it. */
[data-style] .gn-w91 .gn-stage.map { position: relative; }
[data-style] .gn-w91 .gn-mapwrap { height: max(420px, calc(100dvh - var(--gn-headh, 88px) - 24px)); }
[data-style] :is(.gn-showpill, .gn-zoompill) { position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; border: 1px solid var(--ctl-edge);
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
:root[data-style="classic"] :is(.gn-showpill, .gn-zoompill) { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-style] .gn-showpill { top: 18px; left: 18px; padding: 4px 4px 4px 14px; }
[data-style] .gn-showpill label { color: var(--muted); font: 500 var(--fs-label)/1 var(--text); }
[data-style] .gn-showpill .select { min-height: calc(34px * var(--k)); height: calc(34px * var(--k)); width: auto; padding-top: 0; padding-bottom: 0; border-radius: 999px; }
[data-style] .gn-zoompill { right: 18px; bottom: 18px; }
[data-style] .gn-zoompill[hidden] { display: none; }
[data-style] .gn-zoompill .btn { display: grid; place-items: center; width: calc(34px * var(--k)); height: calc(34px * var(--k)); min-height: 0; padding: 0; border-radius: 50%; }
[data-style] .gn-zoompill .btn .i { width: 18px; height: 18px; color: var(--accent); }
[data-style] .gn-w91 .gn-maphint { position: absolute; right: 18px; bottom: calc(18px + 34px * var(--k) + 8px + 12px); left: auto; transform: none; }
@media (max-width: 1023px) {
  [data-style] .gn-showpill { top: 14px; left: 14px; }
  [data-style] .gn-zoompill { right: 14px; bottom: 14px; }
}
@media print { [data-style] .gn-bar, [data-style] .gn-showpill, [data-style] .gn-zoompill { display: none !important; }
  [data-style] .gn-bar-h1, [data-style] .gn-bar-lede { position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important; white-space: normal !important; margin: 0 0 6px !important; } }
