/* pages.css: the notebook, the work board, people, how it works, operator.
   Built on phil.css tokens only: paper, ink, graphite, hairlines, one red pencil. */

/* ---------- shared ---------- */

/* the head drawings are scenes, drawn at 480 x 300 in the same line as the house */
body[data-page='notebook'] .page-head .art, body[data-page='work'] .page-head .art,
body[data-page='people'] .page-head .art, body[data-page='about'] .page-head .art { width: clamp(300px, 37vw, 500px); margin-bottom: -6px; }
.page-head .art > svg { width: 100%; height: auto; overflow: visible; }
.pg-art-hand { font: 400 16px var(--hand); fill: var(--ink-2); }
.pg-art-hand.is-big { font-size: 22px; fill: var(--ink); }
.pg-art-hand.is-small { font-size: 13.5px; }

.pg-sec { padding-top: clamp(56px, 7vw, 96px); }
.pg-sec-first { padding-top: 8px; }
.pg-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: 28px; }
.pg-sec-head .section-title { margin-top: 10px; }
.pg-sec-lede { margin: 12px 0 0; font: 400 18px/1.45 var(--serif); color: var(--ink-2); max-width: 58ch; }
.pg-sec-aside { flex: none; }

.pg-empty { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px 48px; align-items: center; padding: 36px clamp(20px, 4vw, 48px); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule); }
.pg-empty-art { width: 100%; max-width: 300px; }
.pg-empty-art > svg { width: 100%; height: auto; max-height: 190px; }
.pg-empty-copy { max-width: 46ch; }
.pg-empty-copy .note-hand { font-size: 27px; line-height: 1.1; margin: 0 0 10px; color: var(--ink); }
.pg-empty-copy p:not(.note-hand) { margin: 0 0 16px; font: 400 18px/1.5 var(--serif); color: var(--ink-2); }
.pg-empty-copy .link, .pg-empty-copy .btn { font-size: 14.5px; }

.pg-help { display: block; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pg-warn { margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; background: #bf3b280d; box-shadow: inset 0 0 0 1px #bf3b2826; font-size: 14px; color: var(--ink-2); }
.pg-missing { margin: 0 0 10px; padding: 14px 18px; border-radius: 12px; background: var(--wash); font: 400 16px/1.45 var(--serif); color: var(--ink-2); }
.pg-missing + * { margin-top: 18px; }
.pg-foot-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.pg-result { margin: 0; font-size: 14px; color: var(--ink); min-height: 1.4em; }
.pg-result.bad, .pg-op .bad { color: var(--red); }

/* filter chips: tallies in a row */
.pg-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-filters button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--faint); font: 500 13.5px/1 var(--sans); color: var(--ink-2); transition: box-shadow .2s, background-color .2s, color .2s; }
.pg-filters button span { font-size: 12px; color: var(--muted); }
.pg-filters button:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.pg-filters button[aria-pressed='true'] { background: var(--ink); color: #fff; box-shadow: none; }
.pg-filters button[aria-pressed='true'] span { color: var(--faint); }

.pg-glyph { width: 22px; height: 22px; flex: none; }
.pg-step-n { font: 500 12px/1 var(--sans); color: var(--muted); letter-spacing: .04em; }

/* ---------- the notebook ---------- */

.pg-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 26px 0 0; }
.pg-meta div { display: grid; gap: 4px; }
.pg-meta dt { font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-meta dd { margin: 0; font: 500 17px/1.2 var(--sans); letter-spacing: -.01em; }
.pg-next { display: grid; gap: 3px; margin: 18px 0 0; padding: 12px 0 0 16px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.3; color: var(--muted); }
.pg-next b { font-weight: 600; font-size: 15px; color: var(--ink); }

.pg-spread { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; }
.pg-index { position: sticky; top: calc(var(--header) + 24px); }
.pg-index .kicker { margin-bottom: 12px; }
.pg-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.pg-pidx { position: relative; width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; padding: 10px 12px 10px 16px; border-radius: 0 10px 10px 0; transition: background-color .2s; }
.pg-pidx:hover { background: var(--wash); }
.pg-pidx b { font: 500 16px/1.2 var(--sans); letter-spacing: -.01em; }
.pg-pidx span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.pg-pidx small { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12px; color: var(--red); }
.pg-pidx[aria-current='true'] { background: var(--wash); }
.pg-pidx[aria-current='true']::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--ink); }

.pg-sheet { position: relative; padding: clamp(24px, 3.4vw, 44px); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule); background: #fff; }
.pg-stamp { position: absolute; right: clamp(20px, 3vw, 40px); top: -14px; transform: rotate(-4deg); background: #fff; font: 400 21px/1 var(--hand); color: var(--ink); padding: 5px 12px 3px; border-radius: 6px; border: 1.6px solid currentColor; }
.pg-stamp.is-specimen { color: var(--red); }
.pg-sheet-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 40px; flex-wrap: wrap; }
.pg-sheet-title { font: 500 clamp(40px, 5vw, 64px)/.95 var(--sans); letter-spacing: -.045em; margin: 10px 0 0; }
.pg-sheet-date { margin: 12px 0 0; font: italic 400 19px/1.4 var(--serif); color: var(--ink-2); max-width: 44ch; }
.pg-tally { text-align: right; }
.pg-tally-n { font: 500 clamp(40px, 5vw, 64px)/.95 var(--sans); letter-spacing: -.045em; }
.pg-tally-l { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.pg-tally-l svg { width: 42px; height: 17px; }
.pg-counts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 32px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pg-counts div { padding: 14px 0 14px 16px; display: grid; gap: 5px; border-left: 1px solid var(--rule); }
.pg-counts div:first-child { border-left: 0; padding-left: 0; }
.pg-counts dt { display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pg-counts dd { margin: 0; font: 500 24px/1.1 var(--sans); letter-spacing: -.025em; }
.pg-counts i, .pg-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pg-sentence { margin: 24px 0 0; font: 400 21px/1.45 var(--serif); color: var(--ink); max-width: 60ch; text-wrap: pretty; }

.pg-charts { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 30px; }
.pg-chart-h { font: 500 12.5px/1.2 var(--sans); color: var(--ink-2); margin-bottom: 8px; }
.pg-chart-plot { position: relative; min-height: 168px; }
.pg-chart-plot svg { overflow: visible; touch-action: pan-y; }
.pg-ax { font: 500 10.5px var(--sans); fill: var(--muted); font-variant-numeric: tabular-nums; }
.pg-charts.is-single { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.pg-chart-none { margin: 0; font: italic 400 16px/1.4 var(--serif); color: var(--muted); }
.pg-tip { position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 3px; min-width: 150px; background: var(--ink); color: #fff; font: 500 12px/1.25 var(--sans); padding: 9px 11px; border-radius: 8px; white-space: nowrap; }
.pg-tip b { font-weight: 600; margin-bottom: 2px; }
.pg-tip span { display: flex; align-items: center; gap: 6px; color: var(--faint); }
.pg-tip .k-ink { background: #fff; }
.pg-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.pg-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pg-legend .pg-legend-note { color: var(--muted); font: italic 400 14.5px/1.3 var(--serif); }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.sw-ink { background: var(--ink); }
.sw-left { background: var(--graphite); }
.sw-bin { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath d='M-1 1l2-2M0 4l4-4M3 5l2-2' stroke='%23bf3b28' stroke-width='1.2'/%3E%3C/svg%3E"); box-shadow: inset 0 0 0 1px var(--red); }

.pg-line { position: relative; margin: 34px 0 0; padding: 22px 0 0 0; border-top: 1px solid var(--rule); }
.pg-line-mark { position: absolute; top: -12px; left: 0; background: #fff; padding-right: 10px; font: 400 19px/1 var(--hand); color: var(--ink-2); }
.pg-line blockquote { margin: 0; font: italic 400 clamp(21px, 2.2vw, 26px)/1.36 var(--serif); color: var(--ink); max-width: 44ch; text-wrap: pretty; }
.pg-line figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.pg-table { margin-top: 30px; border-top: 1px solid var(--rule); }
.pg-table summary { cursor: pointer; padding: 14px 0; font: 500 13.5px/1.2 var(--sans); color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.pg-table summary::-webkit-details-marker { display: none; }
.pg-table summary::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin-right: 4px; }
.pg-table[open] summary::before { transform: rotate(45deg); }
.pg-table summary:hover { color: var(--ink); }
.pg-table .table-wrap { margin-top: 0; max-height: 420px; overflow: auto; }
.pg-table .register td { padding: 7px 12px; font-size: 13.5px; }
.pg-table .register th { position: sticky; top: 0; background: #fff; }

.pg-sheet-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--rule); }
.pg-sheet-foot dl { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.pg-sheet-foot dl div { display: grid; gap: 3px; }
.pg-sheet-foot dt { font: 500 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-sheet-foot dd { margin: 0; font-size: 13px; color: var(--ink-2); }
.pg-sheet-foot .link { font-size: 14px; }

/* the record, by day */
#record .pg-filters { margin-bottom: 26px; }
/* one notice above the diary, one ruled line per quiet or missing source */
.pg-notice { margin: 0 0 28px; padding: 2px 20px; border-radius: 12px; background: var(--wash); }
.pg-notice p { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: baseline; gap: 4px 20px; margin: 0; padding: 13px 0; font: 400 16px/1.45 var(--serif); color: var(--ink-2); }
.pg-notice p + p { border-top: 1px solid var(--rule); }
.pg-notice .note-hand { font-size: 21px; line-height: 1.15; color: var(--ink); }
.pg-day { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding: 26px 0 8px; border-top: 1px solid var(--rule); }
.pg-day-h { position: sticky; top: calc(var(--header) + 20px); align-self: start; display: grid; gap: 4px; font: 500 17px/1.25 var(--sans); letter-spacing: -.01em; }
.pg-day-h small { font: 400 13px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.pg-entries { list-style: none; margin: 0; padding: 0; }
.pg-entry { display: grid; grid-template-columns: 52px 22px minmax(0, 1fr); gap: 0 18px; padding: 0 0 26px; position: relative; }
.pg-entry::before { content: ''; position: absolute; left: 81px; top: 26px; bottom: 2px; width: 1px; background: var(--rule); }
.pg-entry:last-child::before { display: none; }
.pg-entry time { font: 500 13px/22px var(--sans); color: var(--muted); text-align: right; }
.pg-entry-body { min-width: 0; max-width: 68ch; }
.pg-entry-label { font: 500 11px/22px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-entry h4 { margin: 2px 0 0; font: 500 17px/1.3 var(--sans); letter-spacing: -.01em; }
.pg-entry p { margin: 5px 0 8px; font: 400 17px/1.5 var(--serif); color: var(--ink-2); overflow-wrap: anywhere; }
.pg-entry p.is-note { font: italic 400 20px/1.42 var(--serif); color: var(--ink); margin-top: 6px; }
.pg-entry .link { font-size: 13.5px; }
.pg-more { display: flex; align-items: center; gap: 16px; padding: 10px 0 0 262px; font-size: 13px; color: var(--muted); }

/* ---------- the work board ---------- */

.pg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.pg-briefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pg-brief { display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 22px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease); }
.pg-brief:hover { box-shadow: inset 0 0 0 1px var(--ink); transform: translateY(-2px); }
.pg-brief-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-cat { display: inline-flex; align-items: center; gap: 7px; font: 500 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.pg-cat .pg-glyph { width: 20px; height: 20px; }
.pg-brief-when { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.pg-brief-when b { font-weight: 500; color: var(--ink-2); }
.pg-brief h3 { font: 500 clamp(21px, 1.9vw, 25px)/1.18 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.pg-brief-text { margin: 0; font: 400 17px/1.5 var(--serif); color: var(--ink-2); overflow-wrap: break-word; }
.pg-brief-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.pg-reward { display: grid; gap: 4px; }
.pg-reward b { font: 500 28px/1 var(--sans); letter-spacing: -.035em; }
.pg-reward small { font-size: 12px; color: var(--muted); }

.pg-closed-wrap { margin-top: 44px; }
.pg-closed-wrap .kicker { margin-bottom: 8px; }
.pg-closed-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pg-closed { width: 100%; display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 90px; align-items: center; gap: 16px; padding: 12px 8px; border-bottom: 1px solid var(--rule); text-align: left; transition: background-color .2s; }
.pg-closed:hover { background: var(--wash); }
.pg-closed b { font-weight: 500; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-closed-r { text-align: right; font-size: 14px; color: var(--ink-2); }

.pg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.pg-steps li { display: grid; align-content: start; gap: 8px; padding: 22px 24px 6px 0; }
.pg-steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.pg-steps svg { width: 64px; height: 52px; margin-bottom: 8px; }
.pg-steps b { font: 500 18px/1.25 var(--sans); letter-spacing: -.015em; }
.pg-steps p { margin: 0; font: 400 16px/1.5 var(--serif); color: var(--ink-2); }
.pg-never { margin: 22px 0 0; font: italic 400 18px/1.45 var(--serif); color: var(--ink-2); max-width: 70ch; }

.pg-budget { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.pg-budget > div { padding: 22px 24px 4px 0; display: grid; gap: 10px; align-content: start; }
.pg-budget > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.pg-budget b { font: 500 clamp(34px, 4vw, 52px)/1 var(--sans); letter-spacing: -.045em; }
.pg-budget p { margin: 0; font: 400 16px/1.45 var(--serif); color: var(--ink-2); max-width: 30ch; }

/* the brief dialog */
.pg-dialog { padding-top: 34px; }
.pg-dialog-title { font: 500 29px/1.12 var(--sans); letter-spacing: -.03em; margin: 12px 0 0; padding-right: 30px; text-wrap: balance; }
.pg-dialog-reward { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pg-dialog-reward b { font: 500 34px/1 var(--sans); letter-spacing: -.04em; }
.pg-dialog-reward span { font-size: 13px; color: var(--muted); }
.pg-dialog-when { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.pg-dialog-brief { margin-top: 20px; font-size: 18px; }
.pg-form-h { font: 500 13px/1.2 var(--sans); letter-spacing: .02em; color: var(--ink); margin: 26px 0 10px; }
.pg-criteria { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 1px; background: var(--rule); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.pg-criteria li { counter-increment: c; background: #fff; padding: 12px 14px 12px 44px; position: relative; font: 400 16.5px/1.4 var(--serif); color: var(--ink); }
.pg-criteria li::before { content: counter(c); position: absolute; left: 16px; top: 13px; font: 500 12px/1.4 var(--sans); color: var(--muted); }
.pg-form { margin-top: 26px; padding-top: 4px; border-top: 1px solid var(--rule); display: grid; gap: 16px; }
.pg-form .pg-form-h { margin-bottom: 0; }
.pg-help.ok { color: var(--ink-2); }
.pg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.pg-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.pg-form .btn { justify-self: start; }
.pg-closed-note { margin: 22px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--wash); font-size: 14px; color: var(--ink-2); }
.pg-done { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--wash); }
.pg-done svg { width: 34px; height: 34px; flex: none; }
.pg-done b { font-size: 16px; font-weight: 600; }
.pg-done p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pg-mine { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.pg-mine li { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rule); }
.pg-mine-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pg-mine-top small { color: var(--muted); font-size: 12px; }
.pg-mine b { font-weight: 500; font-size: 15px; }
.pg-mine p { margin: 0; font: 400 15.5px/1.45 var(--serif); color: var(--ink-2); }
.pg-mine .link { font-size: 12.5px; overflow-wrap: anywhere; }
.pg-dialog .pg-empty { grid-template-columns: 1fr; padding: 24px; margin-top: 20px; }
.pg-dialog .pg-empty-art { max-width: 110px; }

/* ---------- people ---------- */

.pg-drawer-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "art title" "art lede"; column-gap: 40px; align-items: end; margin-bottom: 28px; }
.pg-drawer-head.is-empty { margin-bottom: 0; }
.pg-drawer-art { grid-area: art; align-self: end; }
.pg-drawer-art svg { width: 100%; height: auto; display: block; }
.pg-drawer-title { grid-area: title; }
.pg-drawer-title .section-title { margin-top: 10px; text-wrap: balance; }
.pg-drawer-lede { grid-area: lede; }
.pg-receipts { margin-top: 0; }
.pg-receipts .register td { padding: 11px 12px; font-size: 14px; }
.pg-receipts .pg-amt { font-weight: 500; }
.pg-receipts tr.pg-hit td { background: var(--wash); }
.pg-receipts tr.pg-hit td:first-child { box-shadow: inset 2px 0 0 var(--ink); }
.pg-slot { color: var(--muted); }
.pg-holders { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 36px; align-items: center; padding: 26px 30px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .2s, transform .2s var(--ease); }
.pg-holders:hover { box-shadow: inset 0 0 0 1px var(--ink); transform: translateY(-2px); }
.pg-holders-art { display: flex; align-items: flex-end; gap: 0; }
.pg-holders-art svg { width: 40px; height: auto; margin-left: -6px; }
.pg-holders-copy { display: grid; gap: 6px; }
.pg-holders-copy b { font: 500 24px/1.1 var(--sans); letter-spacing: -.025em; }
.pg-holders-copy > span:not(.kicker) { font: 400 17px/1.45 var(--serif); color: var(--ink-2); max-width: 60ch; }
.pg-holders-copy .pg-holders-n { font: 500 13px/1.3 var(--sans); color: var(--ink); }
.pg-holders-go { font-size: 24px; color: var(--ink-2); }

/* ---------- how it works ---------- */

.pg-about { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 56px; align-items: start; }
.pg-toc { position: sticky; top: calc(var(--header) + 28px); }
.pg-toc .kicker { margin-bottom: 12px; }
.pg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); display: grid; }
.pg-toc a { position: relative; display: block; padding: 7px 0 7px 16px; font-size: 14px; color: var(--muted); transition: color .2s; }
.pg-toc a:hover { color: var(--ink); }
.pg-toc a[aria-current='true'] { color: var(--ink); font-weight: 500; }
.pg-toc a[aria-current='true']::before { content: ''; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--ink); }
.pg-about-main { min-width: 0; max-width: 980px; }
.pg-asec { padding: 8px 0 72px; scroll-margin-top: calc(var(--header) + 20px); }
.pg-asec + .pg-asec { padding-top: 48px; border-top: 1px solid var(--rule); }
.pg-asec > .section-title { margin: 10px 0 26px; }
.pg-asec > .prose { margin-top: 22px; }

.pg-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pg-rules li { display: grid; gap: 14px; align-content: start; padding: 18px 22px 22px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule); }
.pg-rules canvas { width: 240px; height: 112px; max-width: 100%; }
.pg-rules li > div { display: grid; gap: 4px; }
.pg-rule-n { font: 500 11.5px/1 var(--sans); color: var(--muted); }
.pg-rules b { font: 500 19px/1.2 var(--sans); letter-spacing: -.015em; }
.pg-rules p { margin: 4px 0 0; font: 400 17px/1.5 var(--serif); color: var(--ink-2); }
.pg-rules-foot { margin: 24px 0 0; font: italic 400 20px/1.45 var(--serif); color: var(--ink); max-width: 56ch; }

.pg-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 76ch; }
.pg-lines li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--rule); font: 400 18px/1.5 var(--serif); color: var(--ink-2); }
.pg-lines li::before { content: ''; position: absolute; left: 4px; top: 25px; width: 12px; height: 1.6px; border-radius: 2px; background: var(--ink); }

.pg-flow { width: 100%; height: auto; margin: 4px 0 8px; }
.pg-flow-l { font: 500 15px var(--sans); fill: var(--ink); }
.pg-flow-n { font: 500 13px var(--sans); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.pg-flow-s { font: 400 13px var(--sans); fill: var(--muted); }
.pg-flow-h { font: 400 16px var(--hand); fill: var(--ink-2); }
.pg-flow-h.is-red { fill: var(--red); }
.pg-flow-h.is-s { font-size: 14.5px; }
.pg-flow-k { font: 500 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; fill: var(--muted); }
.pg-flow-l.is-off { fill: var(--ink-2); }
.pg-mech-k { margin: 30px 0 0; }
.pg-mech-k + .pg-mech { margin-top: 12px; }
/* The separators sit on the cells, over a white list: five steps rarely fill the last row, and a
   1px gap over a grey list would show the empty cells as a grey block. */
.pg-mech { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.pg-mech li { background: transparent; padding: 16px 16px 18px; display: grid; gap: 6px; align-content: start; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }
.pg-mech b { font: 500 15px/1.2 var(--sans); }
.pg-mech span { font: 400 15.5px/1.4 var(--serif); color: var(--ink-2); }
.pg-more-link { margin: 22px 0 0; font-size: 14px; color: var(--muted); }

.pg-model { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; align-items: start; }
.pg-model-art svg { width: 130px; }
.pg-model .prose { margin: 0; }
.pg-model-list { margin: 0 0 14px; padding-left: 22px; }
.pg-model-list li { margin-bottom: 8px; padding-left: 6px; }
.pg-model-list li::marker { font: 500 13px var(--sans); color: var(--muted); }

.pg-roomlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.pg-check-row { display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; margin-top: 26px; }
.pg-blanks { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.pg-blanks div { display: grid; gap: 3px; min-width: 0; }
.pg-blanks dt { font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-blanks dd { margin: 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }

.pg-motion { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 22px; }
.pg-motion-state { font-size: 13.5px; color: var(--muted); margin-left: 6px; }

/* ---------- operator ---------- */

.pg-op-card { max-width: 760px; padding: clamp(22px, 3.4vw, 40px); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 30px; }
.pg-op-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; border: 0; margin: 0; padding: 0; min-width: 0; }
.pg-op-step > .pg-step-n { padding-top: 2px; }
.pg-op-step > div { display: grid; gap: 10px; min-width: 0; }
.pg-op-step legend { padding: 0; margin-bottom: 4px; float: left; width: 100%; }
fieldset.pg-op-step:disabled .pg-op-grid, fieldset.pg-op-step:disabled .pg-op-bar { opacity: .45; }
.pg-op-unlock { display: flex; gap: 8px; }
.pg-op-unlock .input { flex: 1; min-width: 0; font-family: var(--mono); letter-spacing: .08em; }
.pg-op-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pg-op-field { display: grid; gap: 6px; align-content: start; }
.pg-op-field label { font: 500 13px/1.25 var(--sans); color: var(--ink); }
.pg-op-in { display: flex; align-items: center; gap: 10px; }
.pg-op-in .input { width: 100%; min-width: 0; font-size: 17px; }
.pg-op-in .input.bad { border-color: var(--red); }
.pg-op-in span { width: 64px; flex: none; text-align: right; font-size: 13px; color: var(--muted); }
.pg-op-field small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.pg-op-bar { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; background: var(--wash); margin-top: 6px; }
.pg-op-bar i { display: block; height: 100%; transition: width .3s var(--ease); }
.pg-op-bar .b0 { background: var(--ink); }
.pg-op-bar .b1 { background: var(--graphite); }
.pg-op-bar .b2 { background: var(--faint); }
.pg-op-total { margin: 0; font-size: 14px; color: var(--ink-2); }
.pg-op-total b { font-weight: 600; color: var(--ink); }
.pg-op-save { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding-left: 48px; }
.pg-op-note { margin: 0; padding: 14px 0 0 48px; border-top: 1px solid var(--rule); font: italic 400 16px/1.45 var(--serif); color: var(--ink-2); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .pg-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-counts div:nth-child(4) { border-left: 0; padding-left: 0; }
  .pg-counts div:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .pg-charts { grid-template-columns: 1fr; }
  .pg-mech { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-about { grid-template-columns: 160px minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 900px) {
  .pg-spread { grid-template-columns: 1fr; gap: 20px; }
  .pg-index { position: static; }
  .pg-index ol { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .pg-pidx { width: auto; display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--faint); }
  .pg-pidx span { display: none; }
  .pg-pidx[aria-current='true'] { background: var(--ink); color: #fff; box-shadow: none; }
  .pg-pidx[aria-current='true'] small { color: #fff; opacity: .7; }
  .pg-pidx[aria-current='true']::before { display: none; }
  .pg-day { grid-template-columns: 1fr; gap: 16px; }
  .pg-day-h { position: static; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 12px; }
  .pg-more { padding-left: 0; }
  .pg-about { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pg-toc { min-width: 0; }
  .pg-toc { position: static; margin-bottom: 28px; }
  .pg-toc ol { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .pg-toc a { padding: 7px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font-size: 13px; }
  .pg-toc a[aria-current='true']::before { display: none; }
  .pg-roomlist { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pg-sec-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pg-empty { grid-template-columns: 1fr; padding: 26px 20px 28px; gap: 10px; }
  .pg-empty-art { max-width: 220px; }
  .pg-empty-copy .note-hand { font-size: 24px; }
  .pg-empty-copy p:not(.note-hand) { font-size: 17px; }
  .pg-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .pg-meta dd { font-size: 15px; }
  .pg-sheet { padding: 26px 18px 20px; border-radius: 16px; }
  .pg-stamp { right: 16px; font-size: 18px; }
  .pg-sheet-top { flex-direction: column; align-items: flex-start; }
  .pg-tally { text-align: left; }
  .pg-tally-l { justify-content: flex-start; }
  .pg-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-counts div { padding: 12px 0 12px 14px; }
  .pg-counts div:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 14px; }
  .pg-counts div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pg-counts div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .pg-counts dd { font-size: 21px; }
  .pg-sentence { font-size: 19px; }
  .pg-legend .pg-legend-note { flex-basis: 100%; }
  .pg-entry { grid-template-columns: 44px minmax(0, 1fr); gap: 0 14px; }
  .pg-entry .pg-glyph { display: none; }
  .pg-entry::before { left: 51px; }
  .pg-entry p.is-note { font-size: 19px; }
  .pg-briefs { grid-template-columns: 1fr; }
  .pg-brief { padding: 22px 20px 18px; }
  .pg-brief-foot { flex-wrap: wrap; }
  .pg-closed { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .pg-closed .pg-cat { grid-column: 1; }
  .pg-closed b { grid-column: 1; white-space: normal; }
  .pg-closed .tag { grid-column: 2; grid-row: 1; justify-self: end; }
  .pg-closed-r { grid-column: 2; grid-row: 2; }
  .pg-budget { grid-template-columns: 1fr; }
  .pg-budget > div { padding: 18px 0; }
  .pg-budget > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .pg-drawer-head { grid-template-columns: minmax(0, 1fr) 84px; grid-template-areas: "title art" "lede lede"; column-gap: 16px; }
  .pg-drawer-art { align-self: end; margin-bottom: 2px; }
  .pg-receipts .register th:nth-child(3), .pg-receipts .register td:nth-child(3), .pg-slot { display: none; }
  .pg-holders { grid-template-columns: 1fr; padding: 22px 20px; gap: 14px; }
  .pg-holders-go { display: none; }
  .pg-rules { grid-template-columns: 1fr; }
  .pg-mech { grid-template-columns: 1fr 1fr; }
  .pg-model { grid-template-columns: 1fr; gap: 8px; }
  .pg-model-art svg { width: 96px; }
  .pg-op-grid { grid-template-columns: 1fr; }
  .pg-op-step { grid-template-columns: 1fr; gap: 8px; }
  .pg-op-save, .pg-op-note { padding-left: 0; }
}
@media (max-width: 420px) {
  .pg-filters button { height: 34px; padding: 0 11px; font-size: 13px; gap: 6px; }
  .pg-brief-when { margin-left: 0; flex-basis: 100%; }
  .pg-mech { grid-template-columns: 1fr; }
  .pg-sheet-foot dl { gap: 8px 18px; }
  .pg-op-unlock { flex-wrap: wrap; }
  .pg-op-unlock .btn { flex: 1; }
  .pg-motion .btn { flex: 1 1 100%; }
}

/* the four steps: one ruled row like the budget, stacked as ruled rows at 860 and below */
@media (max-width: 860px) {
  .pg-steps { grid-template-columns: minmax(0, 1fr); }
  .pg-steps li, .pg-steps li + li { grid-template-columns: 64px minmax(0, 1fr); column-gap: 20px; row-gap: 6px; padding: 20px 0; border-left: 0; }
  .pg-steps li + li { border-top: 1px solid var(--rule); }
  .pg-steps svg { grid-row: 1 / 4; width: 64px; height: 52px; margin: 0; }
  .pg-steps p { max-width: 60ch; }
}

/* a lone Phil in an empty state stays small; wider scenes fill the column */
.pg-empty-art > svg[viewBox='-6 -8 112 136'] { max-width: 132px; margin: 0 auto; }
@media (max-width: 760px) { .pg-empty-art > svg[viewBox='-6 -8 112 136'] { max-width: 96px; margin: 0; } }
.pg-sec-head .section-title, .pg-asec > .section-title { text-wrap: balance; }
.pg-toolbar .pg-filters[hidden] + .btn { margin-left: auto; }
.pg-tip[hidden], .pg-filters[hidden] { display: none; }
body[data-page='notebook'] .page-title, body[data-page='work'] .page-title, body[data-page='people'] .page-title, body[data-page='about'] .page-title, body[data-page='operator'] .page-title { text-wrap: balance; }
@media (max-width: 420px) {
  .pg-steps li, .pg-steps li + li { grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; }
  .pg-steps svg { width: 48px; height: 39px; }
}

/* ---------- how it works: the house rules ---------- */

.pg-asec-lede { margin: -10px 0 24px; font: 400 19px/1.5 var(--serif); color: var(--ink-2); max-width: 62ch; }
.pg-rule-art svg { width: 240px; height: 112px; max-width: 100%; overflow: visible; }
.pg-rh { font: 400 15px var(--hand); fill: var(--ink-2); }
.pg-rh.is-s { font-size: 13px; }
.pg-housenow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 36px; margin: 0 0 22px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pg-housenow div { display: grid; gap: 4px; }
.pg-housenow dt { font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-housenow dd { margin: 0; font: 500 22px/1.1 var(--sans); letter-spacing: -.02em; }
.pg-housenow .link { margin-left: auto; font-size: 14px; }
.pg-model-h { margin: 22px 0 6px; font: 500 15px/1.2 var(--sans); letter-spacing: -.005em; color: var(--ink); }
.pg-room { position: relative; display: grid; gap: 6px; padding: 20px 22px 22px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule); height: 100%; transition: box-shadow .2s; }
.pg-room:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pg-room-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pg-room-name::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.pg-room-name b { font: 500 19px/1.2 var(--sans); letter-spacing: -.015em; }
.pg-room-name i { font-style: normal; color: var(--muted); }
.pg-room > span { font: 400 16px/1.45 var(--serif); color: var(--ink-2); }
.pg-room > span .link { position: relative; z-index: 1; }
.pg-mart { display: none; }
@media (max-width: 860px) {
  .pg-mart { display: block; width: min(460px, 100%); margin: 26px 0 4px; }
  .pg-mart > svg { width: 100%; height: auto; }
}
@media (max-width: 760px) {
  .pg-housenow { gap: 12px 24px; }
  .pg-housenow dd { font-size: 19px; }
  .pg-housenow .link { margin-left: 0; flex-basis: 100%; }
  .pg-asec-lede { font-size: 17.5px; }
}
.pg-flow.is-tall { display: none; }
.pg-room { align-content: start; }
@media (max-width: 760px) {
  .pg-flow.is-wide { display: none; }
  .pg-flow.is-tall { display: block; width: 100%; max-width: 380px; margin: 0 0 8px; }
}
@media (max-width: 760px) {
  /* the rules become a ruled list rather than a stack of boxes */
  .pg-rules { gap: 0; border-top: 1px solid var(--rule); }
  .pg-rules li { padding: 20px 0 22px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--rule); gap: 10px; }
  .pg-rules li > div { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
  .pg-rules li > div p { grid-column: 1 / -1; }
  .pg-rules canvas, .pg-rule-art svg { width: 100%; max-width: 280px; height: auto; aspect-ratio: 240 / 112; }
  /* the contents list scrolls sideways in one line */
  .pg-toc { margin: 0 calc(var(--gutter) * -1) 28px; }
  .pg-toc .kicker { padding: 0 var(--gutter); }
  .pg-toc ol { flex-wrap: nowrap; overflow-x: auto; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .pg-toc ol::-webkit-scrollbar { display: none; }
  .pg-toc li { flex: none; }
}

/* ---------- people: the register ---------- */

.pg-pr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.pg-pr-sub { font: italic 400 15px/1.3 var(--serif); color: var(--muted); }
.pg-preg { list-style: none; margin: 0; padding: 0; }
.pg-pr { display: grid; grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 200px); align-items: center; gap: 6px 28px; padding: 8px 0 10px; border-bottom: 1px solid var(--rule); }
.pg-pr-fig { display: block; }
.pg-pr-fig svg { width: 46px; height: auto; }
.pg-pr-who, .pg-pr-amt { display: grid; gap: 3px; min-width: 0; }
.pg-pr-who b { font-size: 15.5px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.pg-pr-who small, .pg-pr-amt small { font: 400 15.5px/1.3 var(--serif); color: var(--ink-2); }
.pg-pr-amt b { font: 500 clamp(22px, 2.2vw, 28px)/1.05 var(--sans); letter-spacing: -.035em; }
.pg-pr-links { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 13.5px; justify-self: end; }
@media (max-width: 640px) {
  .pg-pr { grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px; padding: 10px 0 12px; }
  .pg-pr-fig svg { width: 40px; }
  .pg-pr-fig { grid-row: 1 / 3; align-self: start; }
  .pg-pr-amt { grid-column: 3; grid-row: 1; text-align: right; }
  .pg-pr-amt b { font-size: 21px; }
  .pg-pr-amt small { font-size: 13.5px; }
  .pg-pr-links { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
  .pg-pr-sub { display: none; }
  .pg-holders-art svg:nth-child(n+6) { display: none; }
}
.pg-holders { grid-template-columns: auto minmax(0, 1fr) auto; }
.pg-holders-art { padding-bottom: 2px; border-bottom: 1px solid var(--faint); }
.pg-holders-art svg { width: 50px; margin-left: -8px; }
.pg-holders-art svg > path:first-child { display: none; }
.pg-holders-big { display: grid; justify-items: end; gap: 2px; text-align: right; }
.pg-holders-big b { font: 500 clamp(34px, 4vw, 48px)/1 var(--sans); letter-spacing: -.045em; }
.pg-holders-big small { font-size: 12.5px; color: var(--muted); }
.pg-holders-big .pg-holders-go { margin-top: 10px; }
.pg-holders-copy .pg-holders-n { font: 400 15px/1.4 var(--serif); color: var(--muted); }
@media (max-width: 760px) {
  .pg-holders-big { justify-items: start; text-align: left; grid-auto-flow: column; align-items: baseline; justify-content: start; gap: 8px; }
  .pg-holders-big .pg-holders-go { display: none; }
}
@media (max-width: 760px) {
  .pg-holders { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  /* receipts become a list: amount first, then when, with the transaction beside */
  .pg-receipts .register thead { display: none; }
  .pg-receipts .register, .pg-receipts .register tbody { display: block; }
  .pg-receipts .register tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .pg-receipts .register td { border: 0; padding: 0; }
  .pg-receipts .register td:nth-child(1) { grid-row: 2; grid-column: 1; font-size: 13px; color: var(--muted); }
  .pg-receipts .register td:nth-child(2) { grid-row: 1; grid-column: 1; font-size: 18px; letter-spacing: -.01em; }
  .pg-receipts .register td:nth-child(4) { grid-row: 1 / 3; grid-column: 2; font-size: 13px; white-space: nowrap; }
  .pg-receipts tr.pg-hit td:first-child { box-shadow: none; }
  .pg-receipts tr.pg-hit { background: var(--wash); box-shadow: -8px 0 0 var(--wash), 8px 0 0 var(--wash); }
}
.pg-head-empty { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); max-width: 44ch; }
.pg-head-empty .note-hand { margin: 0 0 6px; font-size: 25px; line-height: 1.1; color: var(--ink); }
.pg-head-empty p:not(.note-hand) { margin: 0 0 12px; font: 400 17.5px/1.5 var(--serif); color: var(--ink-2); }
.pg-head-empty .link { font-size: 14.5px; }
.pg-op-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pg-op-lab span { font-size: 12.5px; color: var(--muted); }
.pg-op-field .input { font-size: 17px; }
.pg-op-field .input.bad { border-color: var(--red); }
@media (max-width: 420px) {
  .pg-op-unlock .input { flex: 1 1 100%; }
}

/* ---------- loading ---------- */

.pg-loading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-top: 12px; padding-bottom: 40vh; }
.pg-loading .note-hand { font-size: 24px; color: var(--ink); }
.pg-loading-sub { flex-basis: 100%; font: 400 16px/1.45 var(--serif); color: var(--muted); }
.pg-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--graphite); align-self: center; animation: pulse 1.4s var(--ease) infinite; }
.pg-head-empty p.pg-head-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; margin: 16px 0 0; font: 400 14.5px/1.2 var(--sans); }

/* ---------- round 14 fixes ---------- */

/* the work board: my submissions sits under the lede, not in the chip row */
.pg-acts { margin: 18px 0 0; font: 400 17px/1.45 var(--serif); color: var(--ink-2); }
.pg-acts .link { font: 500 14.5px/1.2 var(--sans); }
.pg-acts .link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.pg-acts span { font-size: 15px; color: var(--muted); }

/* the holders card with no record to read: an empty fence on the ground line */
.pg-holders-art.is-empty svg { width: 240px; margin-left: 0; }

@media (max-width: 900px) {
  .pg-next { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-top: 12px; padding: 0; border-top: 0; }
}
@media (max-width: 760px) {
  .pg-notice { padding: 2px 16px; }
  .pg-notice p { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pg-holders-art.is-empty svg { width: 200px; }
}
@media (max-width: 420px) {
  /* filter chips: one row that scrolls sideways, edge to edge */
  .pg-filters { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; scrollbar-width: none; }
  .pg-filters::-webkit-scrollbar { display: none; }
  .pg-filters button { flex: none; }
  .pg-toolbar .pg-filters { flex: 1 1 auto; min-width: 0; }
  #record .pg-filters { margin-bottom: 22px; }
}

/* ---------- how it works: the eighteen rules as a compact numbered list ---------- */
/* Each rule is a line of words with its drawing small beside it, two columns wide, instead of a
   300px card per rule. The drawings are the same ones, only smaller. */
.pg-rules { gap: 0 40px; border-top: 1px solid var(--rule); }
.pg-rules li { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0 18px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--rule); }
.pg-rules canvas, .pg-rule-art svg { display: block; width: 120px; height: 56px; max-width: none; }
.pg-rules li > div { display: block; }
.pg-rules .pg-rule-n { margin-right: 8px; }
.pg-rules b { font-size: 16.5px; }
.pg-rules p { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.pg-rules-foot { font-size: 18px; }
.pg-elsewhere { padding-bottom: 12px; }
.pg-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 0; font: 500 15px/1.3 var(--sans); }
.pg-links button.link { font: inherit; }
@media (max-width: 760px) {
  .pg-rules li { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 14px 0 16px; }
  .pg-rules canvas, .pg-rule-art svg { width: 88px; height: 41px; aspect-ratio: auto; }
  .pg-rules li > div { display: block; }
  .pg-rules p { font-size: 15.5px; }
  /* the contents list stays under the header while the page scrolls */
  .pg-toc { position: sticky; top: var(--header); z-index: 30; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 8px 0 2px; margin-bottom: 20px; }
  .pg-toc .kicker { display: none; }
  body.is-demo .pg-toc { top: calc(var(--header) + 30px); }
  .pg-asec { padding-bottom: 48px; scroll-margin-top: calc(var(--header) + 64px); }
  .pg-asec + .pg-asec { padding-top: 36px; }
}
/* The length has to be earned: prose that reads fine in two columns goes into two, the
   section gaps close up, and on a phone the second copy of the head drawing goes. */
.pg-about .pg-asec { padding: 4px 0 44px; }
.pg-about .pg-asec + .pg-asec { padding-top: 36px; }
.pg-about .pg-asec > .section-title { margin: 8px 0 20px; }
#honesty .pg-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; max-width: none; }
#honesty .pg-lines li { font-size: 16.5px; padding: 12px 0 12px 28px; }
#honesty .pg-lines li::before { top: 23px; }
#money > .prose, #model .pg-model .prose { columns: 2 300px; column-gap: 36px; max-width: none; }
#model .pg-model .prose > *, #money > .prose > p { break-inside: avoid; }
#model .pg-model-h:first-of-type { margin-top: 0; }
@media (max-width: 760px) {
  #honesty .pg-lines { grid-template-columns: 1fr; }
  #money > .prose, #model .pg-model .prose { columns: auto; }
  .pg-about .pg-asec { padding-bottom: 34px; }
  .pg-about .pg-asec + .pg-asec { padding-top: 26px; }
  .pg-about .prose, #honesty .pg-lines li { font-size: 16.5px; }
  .pg-about .pg-asec-lede { font-size: 16.5px; }
  .pg-rules p { font-size: 15px; line-height: 1.42; }
  .pg-rules li { padding: 12px 0 14px; }
  .pg-rules-foot { font-size: 17px; }
  .pg-model-art { display: none; }
  .pg-mech li { padding: 11px 14px 12px; gap: 3px; }
  .pg-mech span { font-size: 14.5px; }
}
@media (max-width: 560px) {
  /* the head's drawing is decoration; on a phone it was a second copy of the rules board */
  body[data-page='about'] .pg-mart { display: none; }
  .pg-mech { grid-template-columns: 1fr 1fr; }
}
.pg-about .pg-about-main { max-width: none; }
@media (min-width: 761px) { .pg-rules p { font-size: 15.5px; } .pg-rules li { padding: 14px 0 16px; } }
@media (min-width: 761px) {
  .pg-about .pg-asec { padding-bottom: 30px; }
  .pg-about .pg-asec + .pg-asec { padding-top: 28px; }
  .pg-about .pg-asec > .section-title { margin: 6px 0 16px; }
  .pg-about .pg-asec-lede { font-size: 17.5px; margin: -6px 0 18px; }
  .pg-about .pg-rules-foot { font-size: 17px; margin-top: 16px; }
  #honesty .pg-lines li { padding: 10px 0 10px 28px; }
  #honesty .pg-lines li::before { top: 21px; }
}
@media (min-width: 761px) {
  body[data-page='about'] .page-head { padding-bottom: 16px; }
  .pg-about .pg-housenow { padding: 12px 0; margin-bottom: 14px; }
}
@media (max-width: 360px) {
  /* the smallest phones: a narrower drawing leaves the words a wider column, so each rule is fewer lines */
  .pg-rules li { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .pg-rules canvas, .pg-rule-art svg { width: 64px; height: 30px; }
}

/* Figures: tabular digits wherever a number is read, so a rewritten figure keeps its width.
   The font: shorthands in the other sheets reset font-variant-numeric to normal. :is() takes the
   specificity of its most specific entry (.lh-figures dd, 0-1-1) and this sheet loads last, so it wins
   without !important. */
:is(.num, .lh-figures dd, .rc-counts dd, .rc-cap, .rc-clock, .stat-row b, .rank-eq, .rank-pnl, .rb-rent, .tm-cap, .feed-top time) { font-variant-numeric: tabular-nums; }

/* Recorded return visit and the six-rule introduction. */
.nb-return{display:grid;grid-template-columns:1.2fr 1fr;gap:28px;padding-bottom:36px}.about-six{padding-block:20px 48px}.about-flow{padding:24px;border-block:1px solid var(--rule);font-family:var(--hand);font-size:24px;display:flex;flex-wrap:wrap;gap:14px}.about-six ol{display:grid;grid-template-columns:repeat(3,1fr);gap:24px 40px;padding:24px 0 0 24px;line-height:1.6}.about-six li{padding-left:8px}@media(max-width:650px){.nb-return{display:block}.nb-return>div+div{margin-top:28px}.about-six ol{grid-template-columns:1fr;gap:16px}.about-flow{font-size:20px}}

/* Return records precede decorative space on small screens. */
body[data-page='notebook'] .head{padding-bottom:24px}@media(max-width:650px){body[data-page='notebook'] .pg-mart{display:none}body[data-page='notebook'] .head-art{display:none}body[data-page='notebook'] .pg-meta{margin-top:18px}body[data-page='notebook'] .nb-return{padding-top:12px}}
