/* Panel's blocks (`components/_blocks.ts`), in the lobes' layer with all of Panel: what the React library of
   pretorio-docs styled, ported declaration by declaration where base.css and parts.css do not stand already. A tree
   holds no `i`, `b`, `style` or `aria-pressed` (SCREEN-2), so: a light or a slat is a `span` of its class, a strong word
   a `strong`; the key chosen is `[aria-current]`; a share is a `progress` or a drawing; a place on the plan is a class
   of the grid, `p-gx-*`, `p-gy-*`, `p-gw-*`, `p-gh-*`. Every size of type is a token, which follows the person's text
   size (SCREEN-20). */

/* ---------- Type and layout ---------- */
.p-text { line-height: 1.5; text-wrap: pretty; }
.p-strong { font-weight: 600; }
.p-stack--close { gap: var(--s-2); }
.p-grid--narrow { --min: 150px; }
.p-grid--card { --min: 260px; }
.p-split { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
.p-choice { gap: var(--s-2); }
.p-link { color: var(--c-accent); text-decoration: none; border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; }
.p-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.p-mark--16 { width: 16px; height: 16px; }
.p-mark--40 { width: 40px; height: 40px; }
.p-mark--56 { width: 56px; height: 56px; }
.p-mark--64 { width: 64px; height: 64px; }
.p-rail-dot { position: absolute; top: 7px; left: calc(50% + 7px); width: 7px; height: 7px; border-radius: 50%; background: var(--c-alert-glow); box-shadow: 0 0 0 2px var(--c-module); }
.p-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--s-4); font-family: var(--font-mono); font-size: var(--t-sm); counter-reset: p-word; }
.p-words-one { display: flex; gap: 10px; counter-increment: p-word; }
.p-words-one::before { content: counter(p-word); min-width: 2ch; text-align: end; color: var(--c-faint); }

/* ---------- Actions ---------- */
.p-btn .p-icon { width: 18px; height: 18px; }
.p-hold { position: relative; overflow: hidden; width: 100%; min-height: var(--press); border: 0; border-radius: var(--r-inner); background: var(--c-alert); color: var(--c-on-alert); font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.p-hold--calm { background: var(--c-accent); color: var(--c-on-accent); }
.p-hold--big { min-height: 88px; font-size: var(--t-lg); font-weight: 600; letter-spacing: -.015em; border-radius: var(--r-module); }
.p-hold-fill { position: absolute; inset: 0; background: currentColor; opacity: .18; transform-origin: left; transform: scaleX(0); }
.p-hold:active .p-hold-fill { transform: scaleX(1); transition: transform 800ms linear; }
.p-hold-text { position: relative; }
.p-hold[disabled] { opacity: .5; cursor: default; }
.p-key { min-height: 104px; padding: var(--s-4); border: 0; border-radius: var(--r-module); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair), var(--c-lift); font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; text-align: left; display: flex; align-items: flex-end; color: var(--c-ink); text-decoration: none; transition: box-shadow .15s, background-color .15s; }
.p-key:hover { box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); }
.p-key--m { min-height: 64px; align-items: center; font-size: var(--t-sm); }
.p-key-words { display: flex; flex-direction: column; gap: 2px; }
.p-key-words small { font-weight: 450; }
.p-key--sig { background: var(--c-accent); color: var(--c-on-accent); box-shadow: none; }
.p-key[aria-current="true"] { background: var(--c-accent-soft); color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--c-accent); }
.p-key[aria-current="true"] .p-st { color: var(--c-muted); }
.p-key:active, .p-place:active, .p-card:active { transform: scale(.985); }
.p-keys { display: grid; gap: var(--s-2); }
.p-keys--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-keys--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-keys--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-seg { display: inline-flex; }
.p-stack > .p-seg, .p-content > .p-seg, .p-mod > .p-seg { display: flex; }
.p-seg-one { flex: 1; min-width: 0; min-height: 38px; padding: 0 var(--s-3); border: 0; border-radius: 8px; background: transparent; color: var(--c-muted); font-weight: 550; line-height: 1.2; text-wrap: balance; transition: color .15s, background-color .15s; }
.p-seg-one:hover { color: var(--c-ink); }
.p-seg-one[aria-current="true"] { background: var(--c-module); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-hair), 0 1px 2px rgba(14,20,36,.06); }
.p-chips { display: flex; gap: 6px; overflow-x: auto; padding: 1px; margin: -1px; }
.p-chip { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong); color: var(--c-muted); font-weight: 550; font-size: var(--t-xs); position: relative; }
.p-chip::after { content: ''; position: absolute; inset: -4px 0; }
.p-chip:hover { color: var(--c-ink); }
.p-chip[aria-current="true"] { background: var(--c-ink); color: var(--c-chassis); box-shadow: none; }

/* ---------- Inputs ---------- */
.p-field-label { display: block; }
.p-field-hint { font-size: var(--t-xs); font-weight: 450; color: var(--c-muted); }
.p-select { position: relative; }
.p-select-press { width: 100%; min-height: var(--press); padding: 0 var(--s-2) 0 var(--s-3); display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); border-radius: var(--r-inner); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); font-size: var(--t-sm); font-weight: 450; list-style: none; cursor: pointer; }
.p-select-press::-webkit-details-marker { display: none; }
.p-select-press .p-icon { color: var(--c-muted); }
.p-select[open] > .p-select-press { box-shadow: inset 0 0 0 1px var(--c-accent), 0 0 0 3px var(--c-accent-soft); }
.p-select-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; padding: 4px; border-radius: var(--r-module); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-float); max-height: 260px; overflow: auto; animation: p-pop .14s ease; }
.p-select-one { width: 100%; min-height: 40px; padding: 0 var(--s-3); display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: var(--r-nub); background: transparent; text-align: left; font-size: var(--t-sm); font-weight: 450; }
.p-select-one:hover { background: var(--c-sunk); }
.p-select-one[aria-current="true"] { color: var(--c-accent); font-weight: 550; }
.p-switch-hint { display: block; margin-top: 2px; font-size: var(--t-xs); font-weight: 450; color: var(--c-muted); line-height: 1.45; }
.p-check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--press); width: 100%; padding: 11px 0; line-height: 1.4; cursor: pointer; }
.p-check-box { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--c-hair-strong); background: var(--c-module); display: grid; place-items: center; transition: background-color .15s; cursor: pointer; }
.p-check-box:checked { background: var(--c-accent); box-shadow: none; }
.p-check-box:checked::after { content: ''; width: 10px; height: 5px; margin-top: -3px; border-left: 2.5px solid var(--c-on-accent); border-bottom: 2.5px solid var(--c-on-accent); transform: rotate(-45deg); }
.p-options { padding: var(--s-1) var(--s-4); gap: 0; }

/* ---------- Feedback ---------- */
.p-banner-title { font-weight: 600; }
.p-banner-body .p-btn { align-self: flex-start; margin-top: var(--s-2); }
.p-alerts { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-module); background: var(--c-module); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-alert-glow) 32%, var(--c-hair)), var(--c-lift); }
.p-alerts:empty { display: none; }
.p-alert { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); border: 0; background: transparent; font-weight: 550; text-align: left; text-decoration: none; transition: background-color .15s; }
.p-alert:hover { background: color-mix(in srgb, var(--c-alert-glow) 5%, var(--c-module)); }
.p-alert::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c-alert-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-alert-glow) 22%, transparent); animation: p-breathe 1.6s ease-in-out infinite; }
.p-alert + .p-alert { box-shadow: 0 -1px 0 var(--c-hair); }
.p-alert > .p-st { margin-left: auto; color: var(--c-alert); white-space: nowrap; font-weight: 500; }
.p-alert > .p-icon { color: var(--c-faint); width: 16px; height: 16px; }
.p-scrim { position: fixed; inset: 0; z-index: 30; background: var(--c-scrim); display: flex; align-items: flex-end; justify-content: center; animation: p-fade .2s ease; }
.p-sheet { width: 100%; max-width: 480px; padding: var(--s-5); background: var(--c-module); border-radius: 20px 20px 0 0; box-shadow: var(--c-float); display: flex; flex-direction: column; gap: var(--s-3); max-height: 90%; overflow: auto; animation: p-rise .25s cubic-bezier(.3,.7,.4,1); }
.p-sheet-close { width: var(--press); flex: none; }
.p-sheet-shut { display: none; }
.p-steps { display: flex; gap: 4px; }
.p-step { flex: 1; height: 3px; border-radius: var(--r-pill); background: var(--c-hair-strong); }
.p-step--on { background: var(--c-accent); }

/* ---------- A device ---------- */
.p-led.is-heat { background: var(--c-heat-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-heat-glow) 22%, transparent); animation: p-breathe 2.4s ease-in-out infinite; }
.p-led.is-cool { background: var(--c-cool-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-cool-glow) 22%, transparent); animation: p-breathe 2.4s ease-in-out infinite; }
.is-fine .p-st { color: var(--c-ok); }
.is-alert .p-st { color: var(--c-alert); }
.p-unit.is-alert { background: color-mix(in srgb, var(--c-alert-glow) 7%, var(--c-module)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-alert-glow) 32%, transparent), var(--c-lift); }
.p-unit.is-fine { background: color-mix(in srgb, var(--c-ok-glow) 5%, var(--c-module)); }
a.p-unit-name, button.p-unit-name { border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }
a.p-unit-name:hover, button.p-unit-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-hair-strong); }
.p-read-unit { font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; margin-left: 3px; color: var(--c-muted); }
.p-track { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: var(--r-pill); background: var(--c-hair-strong); overflow: hidden; color: var(--c-accent); }
.p-track::-webkit-progress-bar { background: var(--c-hair-strong); border-radius: var(--r-pill); }
.p-track::-webkit-progress-value { background: var(--c-accent); border-radius: var(--r-pill); transition: width .4s; }
.p-track::-moz-progress-bar { background: var(--c-accent); border-radius: var(--r-pill); }
.p-slats { display: flex; flex-direction: column; gap: 3px; height: 40px; }
.p-slat { flex: 1; border-radius: 2px; background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); }
.p-slat--shut { background: var(--c-accent); box-shadow: none; }
.p-spark { display: block; width: 100%; height: 48px; }
.p-spark-bar { fill: var(--c-ok-glow); opacity: .35; }
.p-spark-now { opacity: 1; }
.p-lcd { background: var(--c-lcd); color: var(--c-lcd-ink); border-radius: var(--r-module); padding: var(--s-5); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); min-height: 270px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 1px 0 rgba(255,255,255,.06); }
.p-lcd-top { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sm); }
.p-lcd-name { color: var(--c-lcd-title); font-weight: 550; }
.p-lcd-state { color: var(--c-lcd-dim); }
.p-lcd-dig { font-size: var(--t-display); font-weight: 400; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; text-shadow: 0 0 32px color-mix(in srgb, var(--c-lcd-ink) 35%, transparent); }
.p-lcd-dig--word { font-size: calc(56px * var(--access-text-size, 1)); font-weight: 500; letter-spacing: -.035em; }
.p-lcd-low { font-size: var(--t-xs); color: var(--c-lcd-dim); }
.p-ruler { display: block; width: 100%; height: 20px; overflow: visible; }
.p-ruler-ticks { stroke: color-mix(in srgb, var(--c-lcd-dim) 70%, transparent); stroke-width: .3; fill: none; }
.p-ruler-span { fill: var(--c-lcd-ink); opacity: .55; }
.p-ruler-now { fill: var(--c-lcd-ink); filter: drop-shadow(0 0 6px var(--c-lcd-ink)); }

/* ---------- Places ---------- */
.p-places { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.p-place { min-height: 168px; padding: var(--s-5); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4); border: 0; border-radius: var(--r-module); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair), var(--c-lift); color: var(--c-ink); text-align: left; text-decoration: none; transition: box-shadow .15s; }
.p-place:hover { box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); }
.p-place.p-hatched { background-color: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair-strong); }
.p-place-nm { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.025em; }
.p-leds { display: flex; flex-wrap: wrap; gap: 6px; }
.p-leds > .p-led { box-shadow: none; }
/* Arrange: a grid of 24 by 16, a tile placed by the classes of its cell. */
.p-arr { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); grid-template-rows: repeat(16, minmax(0, 1fr)); aspect-ratio: 3 / 2; border-radius: var(--r-module); background-color: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); overflow: hidden; }
.p-arr--edit { background-image: radial-gradient(circle, var(--c-hair-strong) 1px, transparent 1.5px); background-size: calc(100% / 24) calc(100% / 16); background-position: calc(-50% / 24) calc(-50% / 16); }
.p-tile { margin: 2px; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-inner); background-color: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); color: var(--c-ink); text-align: left; text-decoration: none; overflow: hidden; transition: background-color .4s; }
.p-tile-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-tile-state { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--c-muted); white-space: nowrap; overflow: hidden; }
.p-tile.is-heat { background-color: color-mix(in srgb, var(--c-heat-glow) 14%, var(--c-module)); }
.p-tile.is-cool { background-color: color-mix(in srgb, var(--c-cool-glow) 14%, var(--c-module)); }
.p-tile.is-fine { background-color: color-mix(in srgb, var(--c-ok-glow) 14%, var(--c-module)); }
.p-tile.is-alert { background-color: color-mix(in srgb, var(--c-alert-glow) 14%, var(--c-module)); }
.p-tile.p-hatched { background-color: var(--c-sunk); }
.p-tile[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--c-accent), var(--c-lift); }
.p-tile--edit { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c-accent) 40%, transparent), var(--c-lift); }
.p-tile-move { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.p-tile-move:focus-visible { position: static; width: auto; height: auto; opacity: 1; pointer-events: auto; }
.p-spot { margin: 2px; border-radius: var(--r-inner); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-accent) 35%, transparent); background: color-mix(in srgb, var(--c-accent) 6%, transparent); }
/* House: a building in section, storeys from the roof to the ground, the walls the gaps between rooms. */
.p-house { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4) var(--s-4) 0; border-radius: var(--r-module); background-color: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); overflow: hidden; }
.p-house::after { content: ''; height: var(--s-4); margin: 0 calc(var(--s-4) * -1); box-shadow: inset 0 2px 0 var(--c-hair-strong); }
.p-floor { display: flex; gap: var(--s-1); min-width: 0; }
.p-floor.is-roof { margin: 0 var(--s-5); }
.p-room { flex: 1 1 0; min-width: 0; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-nub); background-color: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong); color: var(--c-ink); text-align: left; text-decoration: none; transition: background-color .4s; }
.p-w-2 { flex-grow: 2; } .p-w-3 { flex-grow: 3; } .p-w-4 { flex-grow: 4; }
.p-floor.is-roof .p-room { min-height: 0; flex-direction: row; align-items: center; border-radius: var(--r-inner) var(--r-inner) var(--r-nub) var(--r-nub); }
.p-room-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-room-state, .p-room-shut { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--c-muted); min-width: 0; }
.p-room.is-heat { background-color: color-mix(in srgb, var(--c-heat-glow) 14%, var(--c-module)); }
.p-room.is-cool { background-color: color-mix(in srgb, var(--c-cool-glow) 14%, var(--c-module)); }
.p-room.is-fine { background-color: color-mix(in srgb, var(--c-ok-glow) 14%, var(--c-module)); }
.p-room.is-alert { background-color: color-mix(in srgb, var(--c-alert-glow) 14%, var(--c-module)); }
.p-room.p-hatched { background-color: var(--c-sunk); }
.p-room[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--c-accent); }

/* ---------- Showing data ---------- */
.p-lrow--quiet .p-lrow-title, .p-lrow--quiet .p-lrow-meta, .p-lrow--quiet .p-icon { color: var(--c-muted); }
.p-lrow--quiet .p-lrow-title { font-weight: 450; }
.p-lrow--open { background: var(--c-sunk); box-shadow: none; }
.p-lrow[aria-current] > .p-icon { width: 18px; height: 18px; color: var(--c-ink); }
.p-lrow-hold { padding: var(--s-2) var(--s-4); box-shadow: 0 1px 0 var(--c-hair); }
.p-lrow-hold:last-child { box-shadow: none; }
.p-stats { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.p-stat { flex: 1 1 140px; padding: var(--s-4); gap: 4px; }
.p-stat-value { display: block; font-size: var(--t-reading); font-weight: 550; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.p-uptime { display: flex; gap: 2px; height: 24px; }
.p-hour { flex: 1; border-radius: 2px; background: var(--c-ok-glow); opacity: .7; }
.p-hour--down { background: var(--c-alert-glow); opacity: 1; }
.p-hour--none { background: var(--c-idle); }
.p-qr { width: 168px; height: 168px; padding: var(--s-3); border-radius: var(--r-inner); background: #fff; box-shadow: inset 0 0 0 1px var(--c-hair); flex: none; }
.p-qr-code { display: block; width: 100%; height: 100%; }
.p-qr-dark { fill: #0e1424; }
.p-invite { gap: var(--s-3); }
.p-invite--center { align-items: center; text-align: center; }

/* ---------- A card: a way into something ---------- */
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: var(--s-3); }
.p-card { position: relative; display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); min-height: 168px; border: 0; border-radius: var(--r-module); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair), var(--c-lift); text-align: left; text-decoration: none; color: var(--c-ink) !important; transition: box-shadow .15s, transform .15s; }
.p-card:hover { box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-float); }
.p-card-icon { width: 36px; height: 36px; border-radius: var(--r-inner); display: grid; place-items: center; background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); color: var(--c-ink); margin-bottom: var(--s-3); }
.p-card-icon .p-icon { width: 18px; height: 18px; }
.p-card-title { font-size: var(--t-md); font-weight: 600; letter-spacing: -.015em; }
.p-card-text { color: var(--c-muted); line-height: 1.5; }
.p-card-go { position: absolute; top: var(--s-5); right: var(--s-5); color: var(--c-faint); transition: transform .15s, color .15s; }
.p-card:hover .p-card-go { transform: translateX(2px); color: var(--c-accent); }
.p-card--lead { background: var(--c-ink); color: var(--c-chassis) !important; box-shadow: none; }
.p-card--lead .p-card-text { color: color-mix(in srgb, var(--c-chassis) 72%, transparent); }
.p-card--lead .p-card-icon { background: color-mix(in srgb, var(--c-chassis) 12%, transparent); box-shadow: none; color: var(--c-chassis); }
.p-card--lead .p-card-go { color: color-mix(in srgb, var(--c-chassis) 60%, transparent); }

@keyframes p-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes p-fade { from { opacity: 0; } }
@keyframes p-rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- The app's screen sizes ---------- */
@container tablet (min-width: 720px) {
  .p-places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-scrim { align-items: center; }
  .p-sheet { border-radius: 20px; }
  .p-keys--lg .p-key { min-height: 152px; }
  .p-lcd { min-height: 400px; padding: var(--s-6); }
  .p-rail .p-rail-item[aria-current] { background: var(--c-accent-soft); }
}
@container desk (min-width: 1200px) {
  .p-rail-dot { position: static; margin-left: auto; box-shadow: none; }
  .p-split { grid-template-columns: minmax(0, 1fr) 380px; }
  .p-places { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .p-place { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .p-key:active, .p-place:active, .p-card:active { transform: none; } .p-hold:active .p-hold-fill { transition: none; } }

/* ---------- Arrange: the cell of a tile and of a spot, by classes of the grid of 24 by 16 ---------- */
.p-gx-1 { grid-column-start: 1; }
.p-gx-2 { grid-column-start: 2; }
.p-gx-3 { grid-column-start: 3; }
.p-gx-4 { grid-column-start: 4; }
.p-gx-5 { grid-column-start: 5; }
.p-gx-6 { grid-column-start: 6; }
.p-gx-7 { grid-column-start: 7; }
.p-gx-8 { grid-column-start: 8; }
.p-gx-9 { grid-column-start: 9; }
.p-gx-10 { grid-column-start: 10; }
.p-gx-11 { grid-column-start: 11; }
.p-gx-12 { grid-column-start: 12; }
.p-gx-13 { grid-column-start: 13; }
.p-gx-14 { grid-column-start: 14; }
.p-gx-15 { grid-column-start: 15; }
.p-gx-16 { grid-column-start: 16; }
.p-gx-17 { grid-column-start: 17; }
.p-gx-18 { grid-column-start: 18; }
.p-gx-19 { grid-column-start: 19; }
.p-gx-20 { grid-column-start: 20; }
.p-gx-21 { grid-column-start: 21; }
.p-gx-22 { grid-column-start: 22; }
.p-gx-23 { grid-column-start: 23; }
.p-gx-24 { grid-column-start: 24; }
.p-gw-1 { grid-column-end: span 1; }
.p-gw-2 { grid-column-end: span 2; }
.p-gw-3 { grid-column-end: span 3; }
.p-gw-4 { grid-column-end: span 4; }
.p-gw-5 { grid-column-end: span 5; }
.p-gw-6 { grid-column-end: span 6; }
.p-gw-7 { grid-column-end: span 7; }
.p-gw-8 { grid-column-end: span 8; }
.p-gw-9 { grid-column-end: span 9; }
.p-gw-10 { grid-column-end: span 10; }
.p-gw-11 { grid-column-end: span 11; }
.p-gw-12 { grid-column-end: span 12; }
.p-gw-13 { grid-column-end: span 13; }
.p-gw-14 { grid-column-end: span 14; }
.p-gw-15 { grid-column-end: span 15; }
.p-gw-16 { grid-column-end: span 16; }
.p-gw-17 { grid-column-end: span 17; }
.p-gw-18 { grid-column-end: span 18; }
.p-gw-19 { grid-column-end: span 19; }
.p-gw-20 { grid-column-end: span 20; }
.p-gw-21 { grid-column-end: span 21; }
.p-gw-22 { grid-column-end: span 22; }
.p-gw-23 { grid-column-end: span 23; }
.p-gw-24 { grid-column-end: span 24; }
.p-gy-1 { grid-row-start: 1; }
.p-gy-2 { grid-row-start: 2; }
.p-gy-3 { grid-row-start: 3; }
.p-gy-4 { grid-row-start: 4; }
.p-gy-5 { grid-row-start: 5; }
.p-gy-6 { grid-row-start: 6; }
.p-gy-7 { grid-row-start: 7; }
.p-gy-8 { grid-row-start: 8; }
.p-gy-9 { grid-row-start: 9; }
.p-gy-10 { grid-row-start: 10; }
.p-gy-11 { grid-row-start: 11; }
.p-gy-12 { grid-row-start: 12; }
.p-gy-13 { grid-row-start: 13; }
.p-gy-14 { grid-row-start: 14; }
.p-gy-15 { grid-row-start: 15; }
.p-gy-16 { grid-row-start: 16; }
.p-gh-1 { grid-row-end: span 1; }
.p-gh-2 { grid-row-end: span 2; }
.p-gh-3 { grid-row-end: span 3; }
.p-gh-4 { grid-row-end: span 4; }
.p-gh-5 { grid-row-end: span 5; }
.p-gh-6 { grid-row-end: span 6; }
.p-gh-7 { grid-row-end: span 7; }
.p-gh-8 { grid-row-end: span 8; }
.p-gh-9 { grid-row-end: span 9; }
.p-gh-10 { grid-row-end: span 10; }
.p-gh-11 { grid-row-end: span 11; }
.p-gh-12 { grid-row-end: span 12; }
.p-gh-13 { grid-row-end: span 13; }
.p-gh-14 { grid-row-end: span 14; }
.p-gh-15 { grid-row-end: span 15; }
.p-gh-16 { grid-row-end: span 16; }

/* ---------- A site's page: the bar's two switchers, and and its menu ---------- */
.p-switchers { display: flex; align-items: center; gap: var(--s-1); }
.p-fold { position: relative; }
.p-fold-press { min-width: var(--press); min-height: var(--press); padding: 0 var(--s-2); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1); border: 0; border-radius: var(--r-inner); background: transparent; color: var(--c-ink); font-style: normal; font-weight: 500; font-size: var(--t-xs); line-height: 1; font-family: var(--font-mono); letter-spacing: .04em; list-style: none; cursor: pointer; box-shadow: inset 0 0 0 1px var(--c-hair); }
.p-fold-press::-webkit-details-marker { display: none; }
.p-fold-press:hover, .p-fold[open] > .p-fold-press { background: var(--c-sunk); }
.p-fold-press:focus-visible, .p-fold-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.p-fold-panel { position: absolute; top: calc(100% + var(--s-2)); right: 0; z-index: 7; margin: 0; padding: var(--s-1); list-style: none; min-width: 180px; background: var(--c-module); border-radius: var(--r-module); box-shadow: inset 0 0 0 1px var(--c-hair), var(--c-float); }
.p-fold-link { min-height: var(--press); display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-3); border-radius: var(--r-inner); color: var(--c-ink); text-decoration: none; }
.p-fold-link:hover, .p-fold-link[aria-current] { background: var(--c-sunk); }
.p-fold-code { font-style: normal; font-weight: 500; font-size: var(--t-xs); line-height: 1; font-family: var(--font-mono); color: var(--c-muted); min-width: 2.5ch; }
.p-theme-day { display: var(--show-moon, inline-block); }
.p-theme-night { display: var(--show-sun, none); }

.p-bar > .p-row { flex-wrap: nowrap; }
.p-bar-links { display: none; }
/* The page a link stands on: its words in the ink, on the sunk ground, as the papers' bar drew it. Many links scroll
   across rather than push the switchers away. */
.p-bar-links > .p-btn[aria-current] { color: var(--c-ink) !important; background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); }
.p-bar > .p-logo { flex: none; }
.p-bar-links { overflow-x: auto; flex-wrap: nowrap; }
@container tablet (min-width: 720px) {
  .p-bar-links { display: flex; }
  .p-bar-menu { display: none; }
}

/* ---------- A site's foot ---------- */
/* Under the main column, on the chassis under one hairline: whose the site is beside the logo, then its links, which
   wrap. From a tablet up the two stand side by side. */
.p-foot { order: 2; padding: var(--s-5) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -1px 0 var(--c-hair); }
.p-foot-row { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-4); }
.p-foot-whose { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.p-foot-held { margin: 0; font-size: var(--t-xs); line-height: 1.5; color: var(--c-muted); max-width: 46ch; }
.p-foot-links { margin: 0 calc(-1 * var(--s-3)); padding: 0; list-style: none; display: flex; flex-wrap: wrap; }
.p-foot-link { min-height: var(--press); display: inline-flex; align-items: center; padding: 0 var(--s-3); border-radius: var(--r-inner); font-size: var(--t-sm); font-weight: 500; color: var(--c-muted); text-decoration: none; }
.p-foot-link:hover { color: var(--c-ink); background: var(--c-sunk); }
.p-foot-link[aria-current] { color: var(--c-ink); }
.p-foot-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@container tablet (min-width: 720px) {
  .p-foot { padding: var(--s-6) var(--s-6) var(--s-7); }
  .p-foot-row { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .p-foot-links { justify-content: flex-end; max-width: 60%; }
}
