oficina / mapa Public

Clone
git clone https://amadan.net/oficina/mapa

Plain git — no account needed to clone.

Download

Download this file

1/* frame.css: the shell around every signed-in page (level-up spec §3).
2 *
3 * estilo draws the stacked bar; this is everything under it: the
4 * sidebar and its rail, the page column, the lead slot's pieces and the
5 * shortcuts dialog. Mapa's own attributes only (mapa-), tokens only, so
6 * Calma and light/dark apply. Calma: only icons carry colour.
7 *
8 * Breakpoints are estilo's (I2 revision 2, P1.3): 800px, where the bar
9 * stacks and the sidebar appears, and 64rem, where floating panels do.
10 */
11
12/* Any in-page target (#main, a heading) lands clear of the sticky bar;
13 a block (#b-…) lands lower still (prose.css). */
14html {
15 scrollbar-gutter: stable;
16 scroll-padding-block-start: calc(var(--estilo-bar-block-size, 56px) + 16px);
17}
18body {
19 --mapa-side-w: 224px;
20 --mapa-rail-w: 56px;
21 --mapa-measure: 42rem;
22 --mapa-bar-h: var(--estilo-bar-block-size, 56px);
23 margin: 0;
24 background: var(--rst-surface);
25}
26
27/* Pieces of the bar that mean nothing here. The places are the
28 sidebar's from 800px; estilo's Menu sheet carries them below it. */
29@media (min-width: 800px) {
30 [estilo-bar-nav] { display: none; }
31}
32
33[mapa-app] {
34 display: grid;
35 grid-template-columns: var(--mapa-side-w) minmax(0, 1fr);
36 min-block-size: calc(100dvh - var(--mapa-bar-h));
37}
38/* The rail: by cookie, or by width when there is none (§11 Q4,
39 proposed: open from 80rem, the rail below). */
40[mapa-app][data-side="rail"] { --mapa-side-w: var(--mapa-rail-w); }
41@media (max-width: 79.99rem) {
42 [mapa-app]:not([data-side]) { --mapa-side-w: var(--mapa-rail-w); }
43}
44
45[mapa-main] { min-inline-size: 0; }
46[mapa-doc] {
47 box-sizing: border-box;
48 max-inline-size: calc(var(--mapa-measure) + 96px);
49 margin-inline: auto;
50 /* spacing-allow: 48px each side is the measure's own (42rem + 96px, the arithmetic links.css's room and breakpoints are built on); 120px under the last line, so a page never ends at the window's foot */
51 padding: var(--rst-sp-6) 48px 120px;
52}
53@media (max-width: 799.98px) {
54 [mapa-doc] {
55 padding: var(--rst-sp-5) var(--rst-sp-4) 120px; /* spacing-allow: 120px under the last line, as above */
56 }
57}
58
59/* Every screen's blocks are Fiesta's stack (rst-stack on [mapa-doc]):
60 a flex column, so nothing collapses, spaced by one table (build note
61 89). A page the editor writes on (the island is there): its body
62 fills the column down to the page's foot, so a click anywhere below
63 the text lands in the editor itself (build note 84). The server draws
64 the same box, so mounting moves nothing (L5). */
65[mapa-doc]:has(> script#mapa-editor) { min-block-size: 100%; }
66[mapa-doc]:has(> script#mapa-editor) > article[mapa-body] { flex-grow: 1; }
67
68/* ── The sidebar: one grid per row, a 16px icon column and the label,
69 centred on one axis (rastrillo's nav row rode its icon 3px high). ── */
70[mapa-side] {
71 box-sizing: border-box;
72 position: sticky;
73 inset-block-start: var(--mapa-bar-h);
74 block-size: calc(100dvh - var(--mapa-bar-h));
75 display: flex;
76 flex-direction: column;
77 gap: 1px; /* spacing-allow: a hairline between rows, so two lit rows never merge into one */
78 overflow: auto;
79 padding: var(--rst-sp-3) var(--rst-sp-2);
80 background: light-dark(#f8f9fb, #191b21);
81 border-inline-end: 1px solid var(--rst-line);
82 font-size: 13px;
83}
84[mapa-side-item] {
85 box-sizing: border-box;
86 position: relative;
87 display: grid;
88 grid-template-columns: 16px minmax(0, 1fr) auto;
89 align-items: center;
90 column-gap: var(--rst-sp-2);
91 inline-size: 100%;
92 min-block-size: 30px;
93 padding: 0 var(--rst-sp-2);
94 border: 0;
95 border-radius: 8px;
96 background: none;
97 color: var(--rst-text-muted);
98 font: inherit;
99 line-height: 18px;
100 text-align: start;
101 text-decoration: none;
102 cursor: pointer;
103}
104[mapa-side-item] > svg { inline-size: 16px; block-size: 16px; }
105[mapa-side-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
106[mapa-side-item]:hover { background: var(--rst-surface-2); color: var(--rst-text); }
107[mapa-side-item]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
108[mapa-side-item][aria-current] { background: var(--rst-accent-soft); color: var(--rst-text); font-weight: 600; }
109[mapa-side-item][aria-current] > svg { color: var(--rst-accent); }
110/* One full highlight (build note 80): a place holding a page that has
111 its own row is drawn twice, and the open sidebar shows the unlit one;
112 the rail, which hides the page rows, shows the lit one. */
113[mapa-side-holds="rail"] { display: none; }
114/* The lit copy carries [hidden] for a page read with no CSS; the rail's
115 display: grid below outranks the browser's own [hidden] rule. */
116/* A pinned note of your own (build note 80): a lock, at the row's end. */
117[mapa-side-lock] { display: inline-flex; color: var(--rst-text-muted); }
118[mapa-side-lock] > svg { inline-size: 12px; block-size: 12px; }
119/* ── A page row's ⋯ (build note 88): a <details> laid over the row's
120 end, the link's sibling. Its room is kept at all times, so showing it
121 moves nothing: the title truncates before it whether it shows or not.
122 It shows while the pointer is on the row, while focus is in the row,
123 while it is open, and on a touch screen on the page on screen's row.
124 Hidden, it is see-through to the pointer, so a tap there opens the
125 page; the keyboard still reaches it, and then it shows. ── */
126[mapa-side-row] { --mapa-more: var(--rst-sp-5); position: relative; }
127[mapa-side-row] > [mapa-side-page] {
128 /* spacing-allow: the ⋯'s room and a step, so the title truncates before the ⋯ whether it shows or not */
129 padding-inline-end: calc(var(--mapa-more) + var(--rst-sp-2));
130}
131[mapa-row-menu] {
132 position: absolute;
133 inset-block: 0;
134 inset-inline-end: var(--rst-sp-1);
135 block-size: var(--mapa-more);
136 margin-block: auto;
137 opacity: 0;
138 pointer-events: none;
139}
140[mapa-row-more] {
141 display: grid;
142 place-items: center;
143 inline-size: var(--mapa-more);
144 block-size: var(--mapa-more);
145 border-radius: var(--rst-radius-sm);
146 color: var(--rst-text-muted);
147 list-style: none;
148 cursor: pointer;
149}
150[mapa-row-more]::-webkit-details-marker { display: none; }
151[mapa-row-more]::marker { content: ""; }
152[mapa-row-more] > svg { inline-size: 16px; block-size: 16px; }
153[mapa-row-more]:hover, [mapa-row-menu][open] > [mapa-row-more] { background: var(--rst-line); color: var(--rst-text); }
154[mapa-row-more]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
155[mapa-side-row]:focus-within > [mapa-row-menu],
156[mapa-row-menu][open] { opacity: 1; pointer-events: auto; }
157@media (hover: hover) {
158 [mapa-side-row]:hover > [mapa-row-menu] { opacity: 1; pointer-events: auto; }
159 /* The row keeps its hover tint while the pointer is on its ⋯. */
160 [mapa-side-row]:hover > [mapa-side-item]:not([aria-current]) { background: var(--rst-surface-2); color: var(--rst-text); }
161}
162/* A touch screen has no hover: the page on screen's row shows its ⋯,
163 and every row is a full tap target, the ⋯ too (Fiesta's --rst-tap). */
164@media (pointer: coarse) {
165 [mapa-side-row] { --mapa-more: var(--rst-tap); }
166 [mapa-side-item] { min-block-size: var(--rst-tap); }
167 [mapa-row-menu] { inset-inline-end: 0; }
168 [mapa-side-row]:has(> [aria-current]) > [mapa-row-menu] { opacity: 1; pointer-events: auto; }
169 [mapa-row-menu] [estilo-menu-item] { min-block-size: var(--rst-tap); }
170}
171/* The menu leaves the sidebar's scrolling box, as the rail's tooltips
172 do (build note 77): fixed, tied to its ⋯ where the engine anchors,
173 else at its static place, under the ⋯ (the <details> is a block, the
174 ⋯ its first line). The sticky sidebar is a stacking context, so while
175 a menu is open it is lifted over the page it hangs across. */
176[mapa-row-menu] > [estilo-menu] { position: fixed; margin-block-start: var(--rst-sp-1); }
177[mapa-side]:has([mapa-row-menu][open]) { z-index: 1; }
178@supports (anchor-name: --mapa-row-more) {
179 [mapa-row-menu] { anchor-scope: --mapa-row-more; }
180 [mapa-row-more] { anchor-name: --mapa-row-more; }
181 [mapa-row-menu] > [estilo-menu] {
182 position-anchor: --mapa-row-more;
183 inset-block-start: anchor(end);
184 inset-inline-start: anchor(start);
185 position-try-fallbacks: flip-block;
186 }
187}
188[mapa-side-head] {
189 margin: var(--rst-sp-3) 0 0;
190 padding: 0 var(--rst-sp-2);
191 color: var(--rst-text-faint, var(--rst-text-muted));
192 font-size: 11.5px;
193 font-weight: 600;
194 line-height: 22px;
195}
196[mapa-side-foot] {
197 margin-block-start: auto;
198 padding-block-start: var(--rst-sp-2);
199 display: grid;
200 gap: 1px; /* spacing-allow: the rows' hairline, as the sidebar's */
201}
202[mapa-side-foot] form { display: contents; }
203kbd[mapa-kbd] {
204 display: inline-flex;
205 align-items: center;
206 justify-content: center;
207 min-inline-size: 1.4em;
208 padding: 0 var(--rst-sp-1);
209 border: 1px solid var(--rst-line);
210 border-block-end-width: 2px;
211 border-radius: 5px;
212 background: var(--rst-surface);
213 color: var(--rst-text-muted);
214 font: 500 10.5px/14px var(--rst-font);
215}
216
217/* The fold: one button per state, shown by what is on screen. */
218[mapa-fold-to="open"] { display: none; }
219[mapa-app][data-side="rail"] [mapa-fold-to="rail"] { display: none; }
220[mapa-app][data-side="rail"] [mapa-fold-to="open"] { display: grid; }
221@media (max-width: 79.99rem) {
222 [mapa-app]:not([data-side]) [mapa-fold-to="rail"] { display: none; }
223 [mapa-app]:not([data-side]) [mapa-fold-to="open"] { display: grid; }
224}
225
226/* ── The rail (Página's): the same rows, icons only, on one axis. The
227 label stays in the accessibility tree and is the tooltip. The tooltip
228 is fixed where its row puts it (its static position, insets left
229 auto), then moved out beside the 40px row: a fixed box escapes the
230 sidebar's scrolling, which clipped an absolute one. ── */
231@media (min-width: 800px) {
232 [mapa-app][data-side="rail"] [mapa-side] { padding-inline: var(--rst-sp-2); align-items: center; }
233 [mapa-app][data-side="rail"] [mapa-side-item] {
234 grid-template-columns: 18px;
235 justify-content: center;
236 inline-size: 40px;
237 min-block-size: 38px;
238 padding: 0;
239 border-radius: 10px;
240 }
241 [mapa-app][data-side="rail"] [mapa-side-item] > svg { inline-size: 18px; block-size: 18px; }
242 [mapa-app][data-side="rail"] [mapa-side-item] > kbd,
243 [mapa-app][data-side="rail"] [mapa-side-head],
244 [mapa-app][data-side="rail"] [mapa-side-row],
245 [mapa-app][data-side="rail"] ul[mapa-side-inside] { display: none; }
246 [mapa-app][data-side="rail"] [mapa-side-item][aria-current] { background: none; }
247 [mapa-app][data-side="rail"] [mapa-side-holds="open"] { display: none; }
248 [mapa-app][data-side="rail"] [mapa-side-holds="rail"] { display: grid; }
249 [mapa-app][data-side="rail"] [mapa-side-item][aria-current]::before {
250 content: "";
251 position: absolute;
252 inset-inline-start: -8px;
253 inset-block-start: 10px;
254 inline-size: 3px;
255 block-size: 18px;
256 border-radius: 0 3px 3px 0;
257 background: var(--rst-accent);
258 }
259 [mapa-app][data-side="rail"] [mapa-side-label] {
260 position: fixed;
261 /* spacing-allow: the tooltip's place where the engine cannot anchor: beside the 40px row, 10px clear, on its centre line */
262 margin-inline-start: 50px;
263 margin-block-start: 19px; /* spacing-allow: the row's centre line, as above */
264 translate: 0 -50%;
265 z-index: 30;
266 padding: var(--rst-sp-1) var(--rst-sp-2);
267 border-radius: 6px;
268 background: var(--rst-text);
269 color: var(--rst-surface);
270 font-size: 12px;
271 font-weight: 500;
272 pointer-events: none;
273 opacity: 0;
274 clip-path: inset(50%);
275 }
276 [mapa-app][data-side="rail"] [mapa-side-item]:hover [mapa-side-label],
277 [mapa-app][data-side="rail"] [mapa-side-item]:focus-visible [mapa-side-label] {
278 opacity: 1;
279 clip-path: none;
280 }
281}
282@media (min-width: 800px) and (max-width: 79.99rem) {
283 [mapa-app]:not([data-side]) [mapa-side] { padding-inline: var(--rst-sp-2); align-items: center; }
284 [mapa-app]:not([data-side]) [mapa-side-item] {
285 grid-template-columns: 18px;
286 justify-content: center;
287 inline-size: 40px;
288 min-block-size: 38px;
289 padding: 0;
290 border-radius: 10px;
291 }
292 [mapa-app]:not([data-side]) [mapa-side-item] > svg { inline-size: 18px; block-size: 18px; }
293 [mapa-app]:not([data-side]) [mapa-side-item] > kbd,
294 [mapa-app]:not([data-side]) [mapa-side-head],
295 [mapa-app]:not([data-side]) [mapa-side-row],
296 [mapa-app]:not([data-side]) ul[mapa-side-inside] { display: none; }
297 [mapa-app]:not([data-side]) [mapa-side-item][aria-current] { background: none; }
298 [mapa-app]:not([data-side]) [mapa-side-holds="open"] { display: none; }
299 [mapa-app]:not([data-side]) [mapa-side-holds="rail"] { display: grid; }
300 [mapa-app]:not([data-side]) [mapa-side-item][aria-current]::before {
301 content: "";
302 position: absolute;
303 inset-inline-start: -8px;
304 inset-block-start: 10px;
305 inline-size: 3px;
306 block-size: 18px;
307 border-radius: 0 3px 3px 0;
308 background: var(--rst-accent);
309 }
310 [mapa-app]:not([data-side]) [mapa-side-label] {
311 position: fixed;
312 /* spacing-allow: the tooltip's place where the engine cannot anchor: beside the 40px row, 10px clear, on its centre line */
313 margin-inline-start: 50px;
314 margin-block-start: 19px; /* spacing-allow: the row's centre line, as above */
315 translate: 0 -50%;
316 z-index: 30;
317 padding: var(--rst-sp-1) var(--rst-sp-2);
318 border-radius: 6px;
319 background: var(--rst-text);
320 color: var(--rst-surface);
321 font-size: 12px;
322 font-weight: 500;
323 pointer-events: none;
324 opacity: 0;
325 clip-path: inset(50%);
326 }
327 [mapa-app]:not([data-side]) [mapa-side-item]:hover [mapa-side-label],
328 [mapa-app]:not([data-side]) [mapa-side-item]:focus-visible [mapa-side-label] {
329 opacity: 1;
330 clip-path: none;
331 }
332}
333
334/* ── The lead slot: presence, save status, the day pill. ── */
335[mapa-presence] { color: var(--rst-text-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
336[mapa-day] {
337 display: inline-flex;
338 align-items: center;
339 block-size: 28px;
340 border: 1px solid var(--rst-line);
341 border-radius: 999px;
342 background: var(--rst-surface);
343}
344[mapa-day] a {
345 display: inline-flex;
346 align-items: center;
347 gap: var(--rst-sp-1);
348 block-size: 100%;
349 padding-inline: var(--rst-sp-2);
350 border-radius: 999px;
351 color: var(--rst-text);
352 font-size: 13px;
353 font-weight: 600;
354 text-decoration: none;
355}
356[mapa-day] a:hover { background: var(--rst-surface-2); }
357[mapa-day] svg { inline-size: 15px; block-size: 15px; }
358[mapa-day-step] { color: var(--rst-text-muted); }
359@media (max-width: 799.98px) {
360 [estilo-bar-lead] [mapa-day], [estilo-bar-lead] [mapa-presence] { display: none; }
361}
362
363/* ── The shortcuts dialog. ── */
364dialog[mapa-dialog] {
365 inline-size: min(28rem, calc(100vw - 32px));
366 padding: var(--rst-sp-4) var(--rst-sp-5) var(--rst-sp-5);
367 border: 1px solid var(--rst-line);
368 border-radius: 14px;
369 background: var(--rst-surface);
370 color: var(--rst-text);
371 box-shadow: 0 28px 56px -20px rgb(23 32 60 / 0.35);
372}
373dialog[mapa-dialog]::backdrop { background: rgb(15 18 25 / 0.35); }
374[mapa-dialog-head] { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--rst-sp-2); }
375[mapa-dialog-head] h2 { margin: 0; font-size: 1rem; }
376dl[mapa-keys] { display: grid; grid-template-columns: max-content 1fr; gap: var(--rst-sp-3) var(--rst-sp-4); margin: 0; }
377dl[mapa-keys] dd { margin: 0; color: var(--rst-text-muted); }
378
379/* ── The page (§4.1): the window is the page. A quiet kicker, a large
380 title, then the writing; no card, no label. The head is the page's
381 header (rst-page-header, so the stack opens the page under it), drawn
382 as Mapa's: no rule, no row. This file loads after tokens.css, so these
383 rules and h1[mapa-title]'s, of the same weight as Fiesta's
384 [rst-page-header] and [rst-page-header] h1, win by order. ── */
385[mapa-page-head] { display: block; border-block-end: 0; padding-block-end: 0; }
386[mapa-doc-kicker] {
387 display: flex;
388 flex-wrap: wrap;
389 align-items: center;
390 gap: var(--rst-sp-1) var(--rst-sp-3);
391 margin: 0 0 var(--rst-sp-3);
392 color: var(--rst-text-muted);
393 font-size: 13px;
394}
395[mapa-doc-kicker] > span { display: inline-flex; align-items: center; gap: var(--rst-sp-1); }
396[mapa-doc-kicker] svg { inline-size: 14px; block-size: 14px; }
397[mapa-doc-edit] {
398 display: inline-flex;
399 align-items: center;
400 gap: var(--rst-sp-1);
401 color: var(--rst-text-muted);
402 font-weight: 600;
403 text-decoration: none;
404}
405[mapa-doc-edit]:hover { color: var(--rst-text); }
406[mapa-phone-only] { display: none !important; }
407@media (max-width: 799.98px) {
408 [mapa-phone-only] { display: inline-flex !important; }
409}
410h1[mapa-title] {
411 margin: 0;
412 font-size: 2.5rem;
413 line-height: 1.08;
414 font-weight: 720;
415 letter-spacing: -0.025em;
416 text-wrap: balance;
417 overflow-wrap: anywhere;
418}
419[mapa-title-faint] { color: var(--rst-text-faint, var(--rst-text-muted)); font-weight: 500; }
420@media (max-width: 799.98px) {
421 h1[mapa-title] { font-size: 1.875rem; }
422}
423/* Visually hidden. Pinned to its containing block's corner: at its
424 static place a live region appended to <body> sat 1px below the
425 page's end, and every page scrolled by that pixel. */
426[mapa-sr] {
427 position: absolute;
428 inset-block-start: 0;
429 inset-inline-start: 0;
430 clip-path: inset(50%);
431 inline-size: 1px;
432 block-size: 1px;
433 overflow: hidden;
434 white-space: nowrap;
435}
436[mapa-empty] { color: var(--rst-text-muted); }
437
438/* The Markdown editor (Phase 1's writing surface): the page's own
439 face and measure, borderless, no label. */
440textarea[mapa-editor] {
441 box-sizing: border-box;
442 inline-size: 100%;
443 min-block-size: 50vh;
444 padding: 0;
445 border: 0;
446 border-radius: 0;
447 background: transparent;
448 color: var(--rst-text);
449 font: 400 16px/1.7 var(--rst-font);
450 resize: none;
451 field-sizing: content;
452 caret-color: var(--rst-accent);
453 box-shadow: none;
454}
455textarea[mapa-editor]:focus { outline: none; box-shadow: none; }
456[mapa-edit-form] [rst-field-hint] { display: none; }
457
458/* What links here, at the page's foot whenever the panel is not there
459 (§3.3): after a quiet break, like a reference list. */
460[mapa-foot-refs] {
461 padding-block-start: var(--rst-sp-6);
462 border-block-start: 1px solid var(--rst-line);
463}
464[mapa-foot-refs] h2 {
465 color: var(--rst-text-muted);
466 font-size: 12px;
467 font-weight: 650;
468}
469
470/* The unsaved-changes offer, as a bar above the page. */
471[mapa-unsaved] {
472 display: flex;
473 flex-wrap: wrap;
474 align-items: center;
475 gap: var(--rst-sp-2) var(--rst-sp-3);
476 padding: var(--rst-sp-2) var(--rst-sp-3);
477 border: 1px solid var(--rst-line);
478 border-radius: 12px;
479 background: var(--rst-surface-2);
480 font-size: 14px;
481}
482[mapa-unsaved] p { margin: 0; flex: 1 1 16rem; }
483
484
485/* New team page (§4.7): a popover in the top layer, so the sidebar's
486 overflow never clips it, whatever its state. Anchored to its button
487 where the engine anchors: above it in the open sidebar, beside it on
488 the rail. Elsewhere it sits fixed beside the sidebar's foot. */
489[mapa-new-page-link] { display: none; }
490@supports not selector(:popover-open) {
491 [mapa-new-page-open], [mapa-new-page] { display: none; }
492 [mapa-new-page-link] { display: grid; }
493}
494[mapa-new-page-open] { anchor-name: --mapa-new-page; }
495[mapa-new-page] {
496 box-sizing: border-box;
497 inline-size: min(286px, calc(100vw - 16px));
498 margin: 0;
499 inset: auto;
500 inset-block-end: 12px;
501 inset-inline-start: calc(var(--mapa-side-w) + 10px);
502 padding: var(--rst-sp-3);
503 overflow: visible;
504 border: 1px solid var(--rst-line);
505 border-radius: 12px;
506 background: var(--rst-surface);
507 color: var(--rst-text);
508 box-shadow: 0 18px 40px -16px rgb(23 32 60 / 0.35);
509 font-size: 13px;
510}
511form[mapa-new-page-form] { display: grid; gap: var(--rst-sp-2); margin: 0; }
512form[mapa-new-page-form] label { font-size: 12px; font-weight: 650; color: var(--rst-text-muted); }
513form[mapa-new-page-form] p { margin: 0; font-size: 12px; }
514[mapa-new-page-error][hidden] { display: none; }
515[mapa-new-page-error] a { color: inherit; }
516@supports (anchor-name: --mapa-new-page) {
517 [mapa-new-page] {
518 position-anchor: --mapa-new-page;
519 inset-block-end: calc(anchor(start) + 6px);
520 inset-inline-start: anchor(start);
521 position-try-fallbacks: flip-block;
522 }
523 @media (min-width: 800px) {
524 [mapa-app][data-side="rail"] [mapa-new-page] {
525 inset-block-end: anchor(end);
526 inset-inline-start: calc(anchor(end) + 10px);
527 }
528 }
529 @media (min-width: 800px) and (max-width: 79.99rem) {
530 [mapa-app]:not([data-side]) [mapa-new-page] {
531 inset-block-end: anchor(end);
532 inset-inline-start: calc(anchor(end) + 10px);
533 }
534 }
535}
536
537/* Where the engine anchors, each tooltip is tied to its own row
538 (anchor-scope keeps the name to that row), so it follows the rail as
539 it scrolls; a static position is fixed where layout put it. */
540@supports (anchor-name: --mapa-side-item) {
541 @media (min-width: 800px) {
542 [mapa-side-item] { anchor-name: --mapa-side-item; anchor-scope: --mapa-side-item; }
543 [mapa-new-page-open] { anchor-name: --mapa-new-page, --mapa-side-item; }
544 [mapa-app][data-side="rail"] [mapa-side-label] {
545 position-anchor: --mapa-side-item;
546 inset-block-start: anchor(center);
547 inset-inline-start: calc(anchor(end) + 10px);
548 margin: 0;
549 }
550 }
551 @media (min-width: 800px) and (max-width: 79.99rem) {
552 [mapa-app]:not([data-side]) [mapa-side-label] {
553 position-anchor: --mapa-side-item;
554 inset-block-start: anchor(center);
555 inset-inline-start: calc(anchor(end) + 10px);
556 margin: 0;
557 }
558 }
559}
560
561/* Below 800px there is no sidebar: its places are rows in estilo's
562 Menu sheet. Last, so it wins over [mapa-side]'s own display. */
563@media (max-width: 799.98px) {
564 [mapa-app] { grid-template-columns: minmax(0, 1fr); }
565 [mapa-side] { display: none; }
566}
567
568/* Help → Markdown in Mapa. */
569table[mapa-help-table] { inline-size: 100%; border-collapse: collapse; font-size: 14.5px; }
570table[mapa-help-table] th { text-align: start; color: var(--rst-text-muted); font-size: 12px; font-weight: 650; padding: var(--rst-sp-2) var(--rst-sp-3) var(--rst-sp-2) 0; border-block-end: 1px solid var(--rst-line); }
571table[mapa-help-table] td { padding: var(--rst-sp-2) var(--rst-sp-3) var(--rst-sp-2) 0; border-block-end: 1px solid var(--rst-line); vertical-align: top; }
572table[mapa-help-table] td:first-child { white-space: nowrap; }
573
574/* estilo's stacked bar hides the app's name with display: none, which
575 * leaves the brand link with no name (axe's link-name, found by L10).
576 * The name stays in the accessibility tree, out of sight. To report
577 * upstream: Docs' bar has the same gap. Below 800px estilo hides it
578 * again with a weightier rule, (0,3,0), for a bar with a title; this
579 * one, (0,4,0), outweighs both (axe at 390px, search_entries). */
580[estilo-bar~="stacked"][estilo-bar] [estilo-bar-brand] [estilo-bar-name] {
581 display: block;
582 position: absolute;
583 inline-size: 1px;
584 block-size: 1px;
585 overflow: hidden;
586 clip-path: inset(50%);
587 white-space: nowrap;
588}
589
590/* ── A page's look (columns and icons spec §2–§3). ── */
591/* Icons in rows sit in the 16px glyph cell (18px in the rail). */
592[mapa-side-item] > [mapa-icon],
593[mapa-result-ic] > [mapa-icon] { inline-size: 16px; block-size: 16px; font-size: 14px; }
594[mapa-ref-src] > [mapa-icon],
595a[mapa-chip] > [mapa-icon] { inline-size: 14px; block-size: 14px; font-size: 12px; }
596[mapa-source] > [mapa-icon] { margin-inline-end: var(--rst-sp-1); vertical-align: -0.1em; }
597a[mapa-looked] { display: inline-flex; align-items: center; gap: var(--rst-sp-2); }
598a[mapa-looked] > svg, a[mapa-looked] > [mapa-icon] { inline-size: 16px; block-size: 16px; font-size: 14px; color: var(--rst-accent); }
599/* The title's icon is at the title's own size, before it. */
600h1[mapa-title] > [mapa-icon] { margin-inline-end: var(--rst-sp-3); vertical-align: -0.08em; }
601
602/* The banner: a fixed band across the main area, under the header. Its
603 height is CSS's, so it is reserved before a byte arrives (§3.5). */
604[mapa-banner] {
605 block-size: 10rem;
606 overflow: hidden;
607 background: var(--rst-surface-2);
608 position: relative;
609}
610@media (max-width: 799.98px) {
611 [mapa-banner] { block-size: 7.5rem; }
612}
613/* Under a banner the page starts one step below it, not a whole
614 page-top's padding below. */
615[mapa-banner] + [mapa-doc] { padding-block-start: var(--rst-sp-5); }
616[mapa-banner] > img {
617 display: block;
618 inline-size: 100%;
619 block-size: 100%;
620 object-fit: cover;
621 object-position: 50% 50%;
622}
623[mapa-banner][data-y="0"] > img { object-position: 50% 0%; }
624[mapa-banner][data-y="5"] > img { object-position: 50% 5%; }
625[mapa-banner][data-y="10"] > img { object-position: 50% 10%; }
626[mapa-banner][data-y="15"] > img { object-position: 50% 15%; }
627[mapa-banner][data-y="20"] > img { object-position: 50% 20%; }
628[mapa-banner][data-y="25"] > img { object-position: 50% 25%; }
629[mapa-banner][data-y="30"] > img { object-position: 50% 30%; }
630[mapa-banner][data-y="35"] > img { object-position: 50% 35%; }
631[mapa-banner][data-y="40"] > img { object-position: 50% 40%; }
632[mapa-banner][data-y="45"] > img { object-position: 50% 45%; }
633[mapa-banner][data-y="55"] > img { object-position: 50% 55%; }
634[mapa-banner][data-y="60"] > img { object-position: 50% 60%; }
635[mapa-banner][data-y="65"] > img { object-position: 50% 65%; }
636[mapa-banner][data-y="70"] > img { object-position: 50% 70%; }
637[mapa-banner][data-y="75"] > img { object-position: 50% 75%; }
638[mapa-banner][data-y="80"] > img { object-position: 50% 80%; }
639[mapa-banner][data-y="85"] > img { object-position: 50% 85%; }
640[mapa-banner][data-y="90"] > img { object-position: 50% 90%; }
641[mapa-banner][data-y="95"] > img { object-position: 50% 95%; }
642[mapa-banner][data-y="100"] > img { object-position: 50% 100%; }
643[mapa-banner][data-mapa-moving] > img { cursor: ns-resize; touch-action: none; user-select: none; }
644/* The banner's own controls, over its corner on hover or focus. */
645[mapa-banner-tools] {
646 position: absolute;
647 inset-block-end: var(--rst-sp-2);
648 inset-inline-end: var(--rst-sp-2);
649 display: flex;
650 gap: var(--rst-sp-1);
651 opacity: 0;
652}
653[mapa-banner]:hover [mapa-banner-tools],
654[mapa-banner]:focus-within [mapa-banner-tools] { opacity: 1; }
655@media (pointer: coarse) { [mapa-banner-tools] { opacity: 1; } }
656
657/* The look row: Add icon, Add banner. Its height is always reserved;
658 its controls show on hover or focus, and always on touch, so it
659 never moves anything (L5). */
660[mapa-look-row] {
661 display: flex;
662 gap: var(--rst-sp-2);
663 block-size: 1.5rem;
664 align-items: center;
665 margin-block-end: var(--rst-sp-2);
666}
667[mapa-look-act] {
668 color: var(--rst-text-muted);
669 font-size: 13px;
670 font-weight: 600;
671 text-decoration: none;
672 opacity: 0;
673}
674[mapa-page-head]:hover [mapa-look-act],
675[mapa-page-head]:focus-within [mapa-look-act],
676[mapa-look-act]:focus-visible { opacity: 1; }
677@media (pointer: coarse) { [mapa-look-act] { opacity: 1; } }
678[mapa-look-act]:hover { color: var(--rst-text); }
679
680/* The scriptless look page and the picker. */
681[mapa-look-section] > h2 { font-size: var(--rst-fs-lg, 1.125rem); }
682[mapa-look-form] fieldset { border: 0; padding: 0; margin: 0 0 var(--rst-sp-3); display: flex; gap: var(--rst-sp-3); flex-wrap: wrap; }
683[mapa-look-now] { display: flex; align-items: center; gap: var(--rst-sp-2); }
684[mapa-look-now] > [mapa-icon] { font-size: 1.75rem; inline-size: 1.75rem; block-size: 1.75rem; }
685@media (prefers-reduced-motion: no-preference) {
686 [mapa-look-act], [mapa-banner-tools] { transition: opacity 120ms ease; }
687}
688
689/* The icon picker (§2.5): a popover in the top layer, a search field,
690 then the emoji by group, eight to a row. */
691[mapa-picker] {
692 box-sizing: border-box;
693 inline-size: min(22rem, calc(100vw - 2 * var(--rst-sp-4)));
694 max-block-size: min(28rem, 80dvh);
695 padding: var(--rst-sp-3);
696 border: 1px solid var(--rst-line);
697 border-radius: 14px;
698 background: var(--rst-surface);
699 color: var(--rst-text);
700 box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
701 display: none;
702 flex-direction: column;
703 gap: var(--rst-sp-2);
704}
705[mapa-picker]:popover-open { display: flex; }
706[mapa-picker-list] { overflow-y: auto; min-block-size: 0; flex: 1 1 auto; }
707[mapa-picker-group], [mapa-picker-list] {
708 display: grid;
709 grid-template-columns: repeat(8, minmax(0, 1fr));
710 gap: var(--rst-sp-1);
711}
712[mapa-picker-list]:has([mapa-picker-group]) { display: block; }
713[mapa-picker-group] + [mapa-picker-group] { margin-block-start: var(--rst-sp-2); }
714[mapa-picker-head] {
715 grid-column: 1 / -1;
716 margin: 0;
717 color: var(--rst-text-muted);
718 font-size: 12px;
719 font-weight: 600;
720}
721[mapa-picker] [role="option"] {
722 display: grid;
723 place-items: center;
724 block-size: 2rem;
725 border-radius: 6px;
726 font-size: 1.25rem;
727 cursor: pointer;
728 font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
729}
730[mapa-picker] [role="option"]:hover,
731[mapa-picker] [role="option"][aria-selected="true"] { background: var(--rst-surface-2); outline: 2px solid var(--rst-accent); outline-offset: -2px; }
732[mapa-picker-foot] { display: flex; flex-wrap: wrap; gap: var(--rst-sp-2); }
733[mapa-picker][aria-busy="true"] { opacity: 0.7; pointer-events: none; }
734
735/* ── Pages inside (columns and icons spec §5.3): Pinned rows keep a 16px
736 cell for the arrow before the icon, so every icon in Pinned lines up;
737 opened rows indent one step per level, up to four. ── */
738[mapa-side-row][mapa-side-gutter] {
739 display: grid;
740 grid-template-columns: 16px minmax(0, 1fr) auto;
741 align-items: center;
742 padding-inline-start: calc(var(--rst-sp-4) * var(--mapa-depth, 0)); /* spacing-allow: one step per level of nesting, up to four */
743}
744[mapa-side-row][data-depth="1"] { --mapa-depth: 1; }
745[mapa-side-row][data-depth="2"] { --mapa-depth: 2; }
746[mapa-side-row][data-depth="3"] { --mapa-depth: 3; }
747[mapa-side-row][data-depth="4"] { --mapa-depth: 4; }
748[mapa-side-arrow-form] { display: contents; }
749[mapa-side-arrow] {
750 display: grid;
751 place-items: center;
752 inline-size: 16px;
753 block-size: 24px;
754 padding: 0;
755 border: 0;
756 background: none;
757 color: var(--rst-text-muted);
758 cursor: pointer;
759}
760[mapa-side-arrow] svg { inline-size: 12px; block-size: 12px; }
761[mapa-side-arrow][aria-expanded="true"] svg { transform: rotate(90deg); }
762[mapa-side-arrow]:hover { color: var(--rst-text); }
763@media (prefers-reduced-motion: no-preference) {
764 [mapa-side-arrow] svg { transition: transform 120ms ease; }
765}
766ul[mapa-side-inside] { list-style: none; margin: 0; padding: 0; }
767[mapa-side-all] {
768 display: block;
769 padding: var(--rst-sp-1) var(--rst-sp-2) var(--rst-sp-1) var(--rst-sp-6);
770 color: var(--rst-text-muted);
771 font-size: 13px;
772}
773
774/* Help → Colophon: estilo's credits section is a heading and its list,
775 not a stack, so the browser's own margins spaced them (18.8px under
776 the heading). The stack's step after a heading, until estilo's
777 template carries rst-stack itself. */
778[estilo-credits] > h1 { margin: 0 0 var(--rst-sp-2); }
779[estilo-credits] > ul { margin: 0; }
780