oficina / fichas Public

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

Plain git — no account needed to clone.

Download

Download this file

1/* chrome/chrome.css: the suite's top bar, account menu, app switcher and
2 sign-in pages. Link it after menu.css (its panels are [estilo-menu]).
3 Two custom properties are PUBLIC contract, read by apps and never
4 copied as numbers: the bar's block size and its stacking level. */
5:root {
6 --estilo-bar-block-size: 3.25rem; /* 52px. PUBLIC */
7 --estilo-z-bar: 45; /* PUBLIC: the bar's stacking level, and the ceiling for in-page layers */
8 --estilo-trigger-size: 2rem; /* 32px targets, above the 24px floor */
9}
10[estilo-bar] {
11 position: relative;
12 z-index: var(--estilo-z-bar);
13 box-sizing: border-box;
14 display: flex;
15 flex-wrap: nowrap;
16 align-items: center;
17 gap: var(--rst-sp-3);
18 block-size: var(--estilo-bar-block-size); /* fixed, not min: nothing may grow it */
19 padding-inline: var(--rst-sp-4);
20 background: var(--rst-surface);
21 color: var(--rst-text);
22 border-block-end: 1px solid var(--rst-line);
23}
24[estilo-bar~="sticky"] { position: sticky; inset-block-start: 0; }
25[estilo-bar-brand] {
26 display: inline-flex;
27 align-items: center;
28 gap: var(--rst-sp-2);
29 flex: none;
30 color: var(--rst-text);
31 font-weight: 650;
32 text-decoration: none;
33 white-space: nowrap;
34}
35[estilo-bar-brand] img { flex: none; inline-size: 1.75rem; block-size: 1.75rem; border-radius: 21%; }
36[estilo-bar-context] {
37 flex: 0 1 auto;
38 min-inline-size: 0;
39 overflow: hidden;
40 text-overflow: ellipsis;
41 white-space: nowrap;
42 padding-inline-start: var(--rst-sp-3);
43 border-inline-start: 1px solid var(--rst-line);
44 color: var(--rst-text);
45 font-weight: 550;
46}
47[estilo-bar-nav] { display: flex; align-self: stretch; gap: var(--rst-sp-4); }
48[estilo-bar-nav] a {
49 display: flex;
50 align-items: center;
51 border-block: 2px solid transparent; /* square current marker, in-flow */
52 color: var(--rst-text-muted);
53 font-size: var(--rst-fs-sm);
54 text-decoration: none;
55 white-space: nowrap;
56}
57[estilo-bar-nav] a:hover { color: var(--rst-text); }
58[estilo-bar-nav] a[aria-current] { border-block-end-color: var(--rst-accent); color: var(--rst-text); font-weight: 550; }
59[estilo-bar-end] { display: flex; align-items: center; gap: var(--rst-sp-2); flex: none; margin-inline-start: auto; }
60[estilo-bar-actions] { display: flex; align-items: center; gap: var(--rst-sp-2); }
61[estilo-bar-actions] form { display: contents; } /* a POST action lays out as its button */
62[estilo-bar-trigger] {
63 display: inline-flex;
64 align-items: center;
65 justify-content: center;
66 gap: var(--rst-sp-1);
67 box-sizing: border-box;
68 min-inline-size: var(--estilo-trigger-size);
69 block-size: var(--estilo-trigger-size);
70 padding-inline: var(--rst-sp-2);
71 border-radius: 0; /* in-flow: square */
72 color: var(--rst-text-muted);
73 font-size: var(--rst-fs-sm);
74 cursor: pointer;
75 list-style: none;
76 user-select: none;
77}
78[estilo-bar-trigger]::-webkit-details-marker { display: none; }
79[estilo-bar-trigger]::marker { content: ""; }
80[estilo-bar-trigger] svg { flex: none; inline-size: 1.125rem; block-size: 1.125rem; }
81[estilo-bar-trigger]:hover,
82[open] > [estilo-bar-trigger] { color: var(--rst-text); background: var(--rst-surface-2); }
83[estilo-bar-trigger]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
84[estilo-bar-more] { display: none; }
85@media (max-width: 799.98px) { /* rastrillo's shell breakpoint */
86 [estilo-bar-nav], [estilo-bar-actions] { display: none; }
87 [estilo-bar-more] { display: block; }
88 [estilo-bar]:has([estilo-bar-context], [estilo-bar-title]) [estilo-bar-name] { display: none; } /* the icon stays; the title gets the room */
89}
90
91/* The shell. <div estilo-shell> wraps the skip link, the bar and <main>
92 on every page and has no styling of its own. estilo-shell="fill" is the
93 full-height layout for the one kind of page that must fill the viewport
94 (Sheets' grid): the shell is exactly the viewport, the bar keeps its
95 52px, and <main> takes the rest, so the working area is the viewport
96 less the bar without any app re-deriving that sum. The document never
97 scrolls there, so the root drops its reserved scrollbar gutter, which
98 would otherwise leave a dead strip down the inline end. <main> must be
99 the shell's direct child. */
100[estilo-shell~="fill"] {
101 display: flex;
102 flex-direction: column;
103 block-size: 100dvh;
104}
105[estilo-shell~="fill"] > [estilo-bar] { flex: none; }
106[estilo-shell~="fill"] > main { flex: 1 1 auto; min-block-size: 0; }
107:root:has([estilo-shell~="fill"]) { scrollbar-gutter: auto; }
108
109/* The editable title slot: the open object's title, renamed in place. The
110 input is a bordered control, so it keeps the theme's radius; its block size is
111 fixed so an input in the bar can never grow the bar. */
112[estilo-bar-title] {
113 display: flex;
114 align-items: center;
115 gap: var(--rst-sp-2);
116 flex: 0 1 22rem;
117 min-inline-size: 0;
118 margin: 0;
119 padding-inline-start: var(--rst-sp-3);
120 border-inline-start: 1px solid var(--rst-line);
121}
122[estilo-bar-title-input] {
123 box-sizing: border-box;
124 block-size: 2rem;
125 inline-size: 100%;
126 min-inline-size: 6rem;
127 padding-inline: var(--rst-sp-2);
128 border: 1px solid transparent;
129 border-radius: var(--rst-radius-sm);
130 background: transparent;
131 color: var(--rst-text);
132 font: inherit;
133 font-weight: 550;
134 text-overflow: ellipsis;
135}
136[estilo-bar-title-input]:hover { border-color: var(--rst-line); }
137[estilo-bar-title-input]:focus { border-color: var(--rst-accent); outline: none; background: var(--rst-surface); }
138/* iOS zooms the page into a text field under 16px. tokens.css lifts fields
139 to 16px on a coarse pointer, but with a bare `input` selector, which
140 font: inherit above outweighs. Same rule, restated at this weight. */
141@media (pointer: coarse) {
142 [estilo-bar-title-input] {
143 font-size: max(1rem, 1em);
144 }
145}
146[estilo-bar-title-submit] { position: absolute; clip-path: inset(50%); inline-size: 1px; block-size: 1px; overflow: hidden; white-space: nowrap; }
147[estilo-bar-title]:focus-within [estilo-bar-title-submit] { position: static; clip-path: none; inline-size: auto; block-size: 2rem; overflow: visible; flex: none; }
148/* Below the shell breakpoint the row has no room for the button beside the
149 field: it would sit under Menu or the switcher, and a click at its centre
150 would open them instead (found in the first review, at 390px and 320px).
151 So the field takes whatever width is left, down to nothing but its own
152 padding, and on focus the button floats just under it, over the page,
153 where nothing in the bar competes for it. Enter renames at every width. */
154@media (max-width: 799.98px) {
155 [estilo-bar-title] { position: relative; }
156 [estilo-bar-title-input] { min-inline-size: 0; }
157 [estilo-bar-title]:focus-within [estilo-bar-title-submit] {
158 position: absolute;
159 inset-block-start: calc(100% + 0.5rem);
160 inset-inline-start: var(--rst-sp-3);
161 border: 1px solid var(--rst-line);
162 border-radius: var(--estilo-float-radius, 9px); /* a float */
163 background: var(--rst-surface);
164 box-shadow: var(--rst-shadow-pop);
165 }
166}
167
168/* The app switcher: a float, so its tiles may be rounded. */
169[estilo-switcher] { position: relative; }
170[estilo-switcher-panel] { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 4px); }
171[estilo-switcher-grid] { display: grid; grid-template-columns: repeat(3, 5.5rem); gap: var(--rst-sp-1); }
172[estilo-switcher-app] {
173 display: flex;
174 flex-direction: column;
175 align-items: center;
176 gap: var(--rst-sp-1);
177 padding: var(--rst-sp-2) var(--rst-sp-1);
178 border-radius: var(--rst-radius-sm); /* inside a float: rounded is allowed */
179 color: var(--rst-text);
180 font-size: var(--rst-fs-xs);
181 text-decoration: none;
182}
183[estilo-switcher-app]:hover,
184[estilo-switcher-app]:focus-visible { background: var(--rst-accent-soft); }
185[estilo-switcher-app][aria-current] { background: var(--rst-accent-soft); font-weight: 600; }
186[estilo-switcher-app] img { border-radius: 21%; }
187/* Three 5.5rem tiles hung from the trigger overflow a phone's inline start
188 (at 320px, and sooner when the corner is the wider "Sign in" link), so
189 below 30rem the panel spans the bar instead, as menubar panels do, and
190 the three columns share its width. */
191@media (max-width: 30rem) {
192 [estilo-switcher] { position: static; }
193 [estilo-switcher-panel] { inset-inline: 0.5rem; inline-size: auto; min-inline-size: 0; max-inline-size: none; }
194 [estilo-switcher-grid] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
195}
196
197/* The account menu. The account is always the last thing at the inline
198 end of the bar: the "same corner" rule. */
199[estilo-account] { position: relative; }
200[estilo-account-panel] { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 4px); min-inline-size: 15rem; }
201[estilo-avatar] {
202 display: inline-flex;
203 align-items: center;
204 justify-content: center;
205 inline-size: 1.75rem;
206 block-size: 1.75rem;
207 border-radius: 50%; /* an identity mark, not a highlight */
208 background: var(--rst-accent-soft);
209 color: var(--rst-accent);
210 font-size: var(--rst-fs-xs);
211 font-weight: 650;
212}
213[estilo-menu-identity] { display: grid; gap: 0; padding: var(--rst-sp-2) var(--estilo-item-padding-inline, var(--rst-sp-3)); }
214[estilo-menu-identity-label] { color: var(--rst-text-muted); font-size: var(--rst-fs-xs); }
215[estilo-menu-identity-name] { font-weight: 600; overflow-wrap: anywhere; }
216[estilo-menu-identity-address] { color: var(--rst-text-muted); overflow-wrap: anywhere; }
217[estilo-menu-identity-name] + [estilo-menu-identity-address] { font-size: var(--rst-fs-xs); }
218[estilo-bar-signin] { flex: none; }
219
220/* The account at a sidebar rail's foot (Account.Rail), for an app whose
221 chrome is a rail rather than the bar. The trigger is a row the rail's
222 width: the avatar, then who is signed in, cut short with an ellipsis.
223 It stays in the page flow, so its highlight stays square. The panel is
224 the foot's own width, edge to edge with the trigger: hung from the
225 inline end of a foot narrower than the bar's 15rem panel it ran off
226 the window's start edge, and from the inline start it ran past the
227 rail, whose overflow-y: auto clips it (Fichas' first screenshot). */
228[estilo-account~="rail"] > [estilo-bar-trigger] {
229 justify-content: flex-start;
230 gap: var(--rst-sp-2);
231 inline-size: 100%;
232 block-size: auto;
233 min-block-size: 2.5rem;
234 color: var(--rst-text);
235}
236[estilo-account-who] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
237[estilo-account~="rail"] > [estilo-account-panel] { inset-inline: 0; inline-size: auto; min-inline-size: 0; max-inline-size: none; }
238/* A drop-up where the rail is the viewport's height (rastrillo's shell
239 breakpoint): below the foot there is only the window's edge. Below
240 800px the rail is a disclosure at the top of the page, with the page
241 under it and too little above, so the panel opens downward there. */
242@media (min-width: 800px) {
243 [estilo-account~="rail"] > [estilo-account-panel] {
244 inset-block-start: auto;
245 inset-block-end: calc(100% + 4px);
246 max-block-size: max(calc(100dvh - 5rem), 8rem);
247 }
248}
249
250/* Visually hidden, still announced. */
251[estilo-visually-hidden] { position: absolute; clip-path: inset(50%); inline-size: 1px; block-size: 1px; overflow: hidden; white-space: nowrap; }
252
253/* Sign-in, check-your-email and signed-out pages: the Oficina door. The
254 suite's sky behind (estilo sky.css places and animates it), one card on
255 it with the app's mark and name at its head — the same door Home draws
256 at id.oficina.works, in the app's own colour. The door spans the page
257 whatever the app's layout gives it, so the sky is never boxed in. */
258:root:has([estilo-door]) { overflow-x: clip; --rst-scrollbar-gutter: auto; scrollbar-gutter: auto; }
259[estilo-door] {
260 box-sizing: border-box;
261 margin-inline: calc(50% - 50vw); /* spacing-allow: full-bleed, the door spans the viewport whatever column it sits in */
262 padding: max(var(--rst-sp-6), 9vh) var(--rst-sp-4) var(--rst-sp-6); /* spacing-allow: the card sits lower on a taller window, 9vh down */
263 min-block-size: 680px;
264 /* The whole sky lies inside the door, fading in and out, so the door's
265 edges never cut it: under an app's bar there is no page top to hide
266 an edge behind, as there is on Home. A sky's layers overhang its box
267 by 12% above and below (sky.css), and fade in over their first 22%
268 and out from 58% to 92% — so a 560px sky placed 67px down starts
269 transparent at the door's top and has faded out by 640px. */
270 --estilo-sky-top: 67px;
271 --estilo-sky-height: 560px;
272}
273/* The card is a stack: its children's own block margins go, and the
274 space above each comes from the table Fiesta's rst-stack uses
275 (DESIGN.md, "The stack"), written here in estilo's own names because
276 an app's tokens.css may predate it:
277
278 after a heading (h1 to h6) --rst-sp-2
279 an actions row: a button, the card's
280 action or a paragraph holding it,
281 Forget (under another action:
282 --rst-sp-2) --rst-sp-4
283 an input after its label or its hint
284 ([estilo-signin-hint]), a hint after
285 its input --rst-sp-2
286 an h1 or h2, a section
287 ([estilo-signin-section]), or anything
288 after the brand, which heads the card
289 as a page header heads a page --rst-sp-5
290 an h3 to h6 --rst-sp-4
291 anything else --rst-sp-3
292
293 Higher in the table wins: each relation sets its own property on the
294 child, and the one margin rule reads them in the table's order, so
295 specificity never decides it; every child resets them first, so
296 content nested in the card never inherits an answer. A column, so
297 nothing collapses; a button or a picture keeps its own width.
298
299 As in Fiesta's stack, the column's gap is the table's smallest step
300 and a child's margin is the rest of its answer: a hidden child (or a
301 hidden input) is no flex item and takes no gap, so the block after
302 one keeps --rst-sp-2 and never touches what is above it. */
303[estilo-signin] {
304 box-sizing: border-box;
305 display: flex;
306 flex-direction: column;
307 max-inline-size: 460px;
308 margin: 0 auto;
309 padding: var(--rst-sp-6);
310 gap: var(--rst-sp-2);
311 background: var(--rst-surface);
312 border-radius: 20px;
313 box-shadow: 0 0 0 1px light-dark(transparent, var(--rst-line)), var(--rst-shadow-lift);
314}
315[estilo-signin] > * {
316 --estilo-stack-heading: initial;
317 --estilo-stack-actions: initial;
318 --estilo-stack-control: initial;
319 --estilo-stack-section: initial;
320 --estilo-stack-sub: initial;
321 margin-block: 0;
322}
323[estilo-signin] > :not([hidden], [type="hidden"]) + :not([hidden]) {
324 /* spacing-allow: the table's step less the column's --rst-sp-2 gap; margin and gap together are the step */
325 margin-block-start: calc(var(--estilo-stack-heading, var(--estilo-stack-actions, var(--estilo-stack-control, var(--estilo-stack-section, var(--estilo-stack-sub, var(--rst-sp-3)))))) - var(--rst-sp-2));
326}
327[estilo-signin] > :is(img, button, a[estilo-signin-action]) { align-self: flex-start; }
328[estilo-signin] > :not([hidden], [type="hidden"]) + :is(h3, h4, h5, h6) { --estilo-stack-sub: var(--rst-sp-4); }
329[estilo-signin] > :not([hidden], [type="hidden"]) + :is(h1, h2),
330[estilo-signin] > :not([hidden], [type="hidden"]) + [estilo-signin-section],
331[estilo-signin] > [estilo-brand] + * { --estilo-stack-section: var(--rst-sp-5); }
332[estilo-signin] > :is(label, [estilo-signin-hint]) + :is(input, select, textarea),
333[estilo-signin] > :is(input, select, textarea) + [estilo-signin-hint] { --estilo-stack-control: var(--rst-sp-2); }
334[estilo-signin] > :not([hidden], [type="hidden"]) + :is(button, [estilo-signin-action], [estilo-signin-forget], p:has(> [estilo-signin-action]), p:has(> button)) { --estilo-stack-actions: var(--rst-sp-4); }
335[estilo-signin] > :is(button, [estilo-signin-action], [estilo-signin-forget], p:has(> [estilo-signin-action]), p:has(> button)) + :is(button, [estilo-signin-action], [estilo-signin-forget], p:has(> [estilo-signin-action]), p:has(> button)) { --estilo-stack-actions: var(--rst-sp-2); }
336[estilo-signin] > :is(h1, h2, h3, h4, h5, h6) + * { --estilo-stack-heading: var(--rst-sp-2); }
337[estilo-signin] > [estilo-brand] { display: flex; align-items: center; gap: var(--rst-sp-2); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
338[estilo-signin] > [estilo-brand] [estilo-brand-icon] { inline-size: 36px; block-size: 36px; }
339[estilo-signin] h1 { font-size: 1.75rem; font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; }
340/* A heading the card holds directly is spaced by the stack above; one
341 nested deeper brings no margin of its own. */
342[estilo-signin] * h1 { margin: 0; }
343[estilo-signin-lede] { color: var(--rst-text-muted); }
344[estilo-signin-form] { max-inline-size: none; }
345@media (max-width: 520px) {
346 [estilo-door] { padding-inline: var(--rst-sp-4); padding-block-start: var(--rst-sp-5); }
347 [estilo-signin] { padding: var(--rst-sp-5); }
348}
349/* The door's links are drawn here, not left to the app: an app that does
350 not link base.css (Calendar, Memoria, Calls, Fichas) showed the browser's
351 blue on the card. As base.css does, a link in the card is the app's
352 colour at the lowest specificity, so a link drawn as a button keeps the
353 button's. The card has no footer links (Paul, 2026-11-19). */
354:where([estilo-signin]) a { color: var(--rst-accent); text-underline-offset: 0.15em; }
355/* The smart door (estilo-signin-screen): rastrillo's sign-in partial in
356 the card, inside [estilo-signin-screen]. The partial is a card of its
357 own, made for the stage shell, with its brand in a column beside the
358 way in; here the door is the card and its head is the brand, so the
359 partial's surface, edge, padding and columns go, and so does its brand
360 (the one brand on the card is the door's). Its buttons, rows and quiet
361 controls are rastrillo's own. The partial is reached by structure, not
362 by its rst- names, which are rastrillo's to style (AGENTS.md,
363 Vocabulary): its card is a <section> of two children, the brand column
364 then the door. The brand is hidden only while there are two, and never
365 a child holding the heading, so a partial that draws no brand
366 (HideBrand) keeps its door. Delete the hiding rule in the rastrillo
367 bump that adopts HideBrand. The heading restates the door's own size
368 one step more specific than rastrillo's door heading, so the order the
369 stylesheets are linked in never decides it. */
370[estilo-signin-screen] > section { display: block; inline-size: auto; max-inline-size: none; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
371[estilo-signin-screen] > section > :first-child:not(:only-child):not(:has(h1)) { display: none; }
372[estilo-signin] [estilo-signin-screen] h1 { margin: 0; font-size: 1.75rem; font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; }
373/* The door's buttons are the smart door's (Paul, 2026-11-21, "yes to pill
374 buttons"), on every card the door draws. The card's main action is a
375 full-width pill, 44px tall, lit from above, its shadow tinted by its
376 fill: the accent's, or red for a danger button. Its secondary controls
377 are quiet text buttons, centred under it: medium weight, the muted ink
378 that darkens over a soft pill on hover and focus, a touch smaller than
379 body text. rastrillo's one-way door already draws its own buttons this
380 way; nothing here reaches it.
381
382 Keyed on estilo's hooks, never on rastrillo's button attributes, which
383 are rastrillo's to style (AGENTS.md, Vocabulary; internal/lint):
384 - a door sign-in form's submit ([estilo-signin-form]) is its main
385 action, so the classic form and every app's confirm step are pills;
386 - [estilo-signin-action] marks any other main action on the card, and
387 [estilo-signin-action~="danger"] a destructive one;
388 - [estilo-signin-action~="quiet"] marks a secondary control, as the
389 signed-out page's Forget ([estilo-signin-forget]) is.
390 The button keeps its rastrillo variant for its fill and states; these
391 rules give it the door's shape. A hidden button stays hidden. */
392[estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]) {
393 display: flex; inline-size: 100%; box-sizing: border-box; justify-content: center; align-items: center;
394 min-block-size: 44px; padding-inline: var(--rst-sp-4); border-radius: 999px; font-weight: 600; text-decoration: none;
395}
396/* The glow lifts the pill only at rest: pressed, rastrillo's own pressed
397 shadow draws it sinking. */
398[estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]):not(:active) {
399 box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 1px rgb(23 32 60 / 0.10),
400 0 8px 18px -8px var(--estilo-signin-glow, light-dark(color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 80%, transparent), color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 30%, transparent)));
401}
402[estilo-signin] [estilo-signin-action~="danger"] {
403 --estilo-signin-glow: light-dark(color-mix(in srgb, var(--rst-danger-fill, var(--rst-tone-negative-fg)) 60%, transparent), color-mix(in srgb, var(--rst-danger-fill, var(--rst-tone-negative-fg)) 30%, transparent));
404}
405[estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):not([hidden]) {
406 display: flex; inline-size: fit-content; margin-inline: auto; justify-content: center; align-items: center;
407 min-block-size: 2.5rem; padding: 0 var(--rst-sp-3); border-color: transparent; border-radius: 999px; background: transparent; box-shadow: none;
408 color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; text-decoration: none;
409}
410/* On touch, and on a narrow screen, a quiet control is a full tap target,
411 as rastrillo's door draws its ghost (max(2.5rem, --rst-target), which is
412 2.75rem there). Restated rather than read: estilo's pinned rastrillo
413 does not declare --rst-target, and every token chrome.css reads must be
414 declared by the pin (TestChromeUsesDefinedTokens). */
415@media (pointer: coarse), (max-width: 40rem) {
416 [estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):not([hidden]) { min-block-size: 2.75rem; }
417}
418[estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):is(:hover, :focus-visible) { background: var(--rst-ghost-face-hover, var(--rst-surface-2)); color: var(--rst-text); }
419
420/* ── Bar stack (Docs' I2 editor header, spec 2026-11-11) ────────────────
421 Everything below is opt-in. Each rule is keyed on a hook only a bar
422 with a slot, a WideOnly or IconOnly action or the Appearance form
423 renders, so a bar with none of them looks exactly as it did
424 (TestEverythingAfterTheMarkerIsOptIn holds this, and that main's rules
425 above are unchanged).
426
427 The hooks: [estilo-bar~="stacked"] (Bar.Menubar), [estilo-bar-stack]
428 and [estilo-bar-menubar] inside it, [estilo-bar-lead] (Bar.Lead),
429 [estilo-bar-control] (each action in a bar with a slot),
430 [estilo-bar-wide] (Action.WideOnly), [estilo-bar-icon]
431 (Action.IconOnly) and [estilo-appearance].
432
433 Breakpoints: 800px is rastrillo's shell breakpoint, the rule above
434 this section and every app's, so it stays in px: restated in rem it
435 would move apart from them whenever the reader's default font size is
436 not 16px. 64rem is where a WideOnly action appears, the same 64rem
437 Docs' inspector uses. */
438
439/* A WideOnly action exists only from 64rem (Docs' Format: the inspector
440 it toggles exists only there). It is also left out of the Menu sheet
441 (the template). (0,2,0), so it outweighs a POST action's display:
442 contents form. */
443@media (max-width: 63.99rem) {
444 [estilo-bar-actions] [estilo-bar-wide],
445 [estilo-bar-actions] [estilo-bar-control~="wide"] { display: none; }
446}
447
448/* Each action in a bar with a slot sits in its own wrapper, which lays
449 out as its control. */
450[estilo-bar-control] { display: contents; }
451[estilo-bar-lead] { display: flex; align-items: center; gap: var(--rst-sp-2); }
452
453/* The stacked bar's title is as wide as its title, never the bar's
454 room: its size attribute is the first paint's guess, chrome.js
455 measures the field and corrects it, and it is capped at the space it
456 has, where a longer title scrolls inside the field as it always has.
457 No ellipsis: the field is as wide as its title, so one would only ever
458 mark a guess that came out short, not a title cut off. */
459[estilo-bar~="stacked"] [estilo-bar-title] { flex: none; max-inline-size: 100%; }
460[estilo-bar~="stacked"] [estilo-bar-title-input] { flex: 0 1 auto; inline-size: auto; min-inline-size: 0; max-inline-size: 100%; text-overflow: clip; }
461[estilo-bar~="stacked"] [estilo-bar-context] { max-inline-size: 100%; }
462[estilo-bar~="stacked"] [estilo-menubar-title] { cursor: pointer; }
463
464/* Below 800px the stacked header does not fit a phone (spec C6: File to
465 Help needs 261px, and at 320px the title fell to "U…"). So the bar
466 stays today's one row, and the app's menus are a full-width second
467 row under it: the stack dissolves and the same markup lays out on a
468 grid. The header grows by that row, and the published block size
469 with it. A menubar that wraps (English at 320px; a long locale
470 sooner) grows it further: chrome.js then publishes the header's real
471 height, and 85px is what a page without script gets. */
472@media (max-width: 799.98px) {
473 :root:has([estilo-bar~="stacked"]) { --estilo-bar-block-size: calc(3.25rem + 2rem + 1px); } /* 85px: the bar's row, one menubar row and the bottom border. PUBLIC */
474 [estilo-bar~="stacked"] {
475 display: grid;
476 grid-template-columns: auto minmax(0, 1fr) auto;
477 grid-template-rows: 3.25rem auto;
478 grid-template-areas: "brand title end" "menus menus menus";
479 column-gap: var(--rst-sp-3);
480 row-gap: 0;
481 align-items: center;
482 block-size: auto;
483 }
484 [estilo-bar~="stacked"] > [estilo-bar-brand] { grid-area: brand; }
485 [estilo-bar~="stacked"] > [estilo-bar-end] { grid-area: end; }
486 [estilo-bar~="stacked"] [estilo-bar-stack] { display: contents; }
487 [estilo-bar~="stacked"] [estilo-bar-title],
488 [estilo-bar~="stacked"] [estilo-bar-context] { grid-area: title; justify-self: start; }
489 [estilo-bar~="stacked"] [estilo-bar-menubar] {
490 grid-area: menus;
491 align-self: stretch;
492 min-inline-size: 0;
493 margin-inline: calc(-1 * var(--rst-sp-1)); /* the menus' edge 12px in (the bar's 16px less 4px), as Docs' own row had it */
494 }
495}
496
497/* From 800px, the 56px stacked header: a 32px icon 12px in, and beside
498 it a 44px stack, the 24px title row (16px, 600) over the 20px menu row
499 (13px, muted), both starting at 56px (12 + 32 + 12). The app's name
500 goes: the icon is the brand. Optical balance, measured at 2x in WebKit
501 on the mock-up: the title's capitals start at the icon's top, so its
502 row sits 2.5px low; the menu row sits 1px low, its 24px highlight
503 stops 3px above the header's bottom edge, and an open panel hangs from
504 1px above that edge. */
505@media (min-width: 800px) {
506 :root:has([estilo-bar~="stacked"]) { --estilo-bar-block-size: 56px; } /* PUBLIC */
507 [estilo-bar~="stacked"] { gap: var(--rst-sp-3); padding-inline: var(--rst-sp-3); }
508 [estilo-bar~="stacked"] [estilo-bar-brand] img { inline-size: 32px; block-size: 32px; }
509 [estilo-bar~="stacked"] [estilo-bar-name] { display: none; }
510 [estilo-bar-stack] {
511 display: flex;
512 flex-direction: column;
513 justify-content: center;
514 align-items: flex-start;
515 flex: 1 1 auto;
516 min-inline-size: 0;
517 block-size: 44px;
518 }
519 [estilo-bar~="stacked"] [estilo-bar-title] {
520 position: relative;
521 inset-block-start: 2.5px;
522 block-size: 24px;
523 margin: 0;
524 padding: 0;
525 border: 0;
526 }
527 [estilo-bar~="stacked"] [estilo-bar-title-input] {
528 block-size: 24px;
529 padding-block: 0;
530 margin-inline-start: calc(-1 * var(--rst-sp-2) - 1px); /* spacing-allow: the field's padding and 1px border pulled back, so its text sits on the edge */
531 max-inline-size: calc(100% + var(--rst-sp-2) + 1px); /* the form is that much narrower than the field: the cap gives it back */
532 font-size: 16px;
533 line-height: 24px;
534 font-weight: 600;
535 letter-spacing: -0.01em;
536 }
537 [estilo-bar~="stacked"] [estilo-bar-context] {
538 position: relative;
539 inset-block-start: 2.5px;
540 padding: 0;
541 border: 0;
542 font-size: 16px;
543 line-height: 24px;
544 font-weight: 600;
545 letter-spacing: -0.01em;
546 }
547 /* Rename, while the title is being edited: a 22px pill in the
548 accent's tint inside the 24px title row, not the 2rem button. The
549 box is the row's 24px, the 24px target floor (AGENTS.md); a
550 transparent 1px border with the fill clipped inside it paints the
551 22px pill. */
552 [estilo-bar~="stacked"] [estilo-bar-title]:focus-within [estilo-bar-title-submit] {
553 align-self: center;
554 box-sizing: border-box;
555 block-size: 24px;
556 min-block-size: 0;
557 min-inline-size: 0;
558 margin: 0;
559 padding: 0 var(--rst-sp-2);
560 border: 1px solid transparent;
561 border-radius: 999px;
562 background-color: var(--rst-accent-soft);
563 background-image: none;
564 background-clip: padding-box;
565 box-shadow: none;
566 color: var(--rst-accent);
567 font: 600 12px/22px var(--rst-font);
568 }
569 [estilo-bar~="stacked"] [estilo-bar-title]:focus-within [estilo-bar-title-submit]:hover {
570 border-color: transparent;
571 background-color: var(--rst-accent);
572 color: var(--rst-on-accent);
573 }
574
575 /* The menu row. estilo's 32px menubar floor goes here, and only here:
576 the row is 20px, and each title's highlight is a 24px pill with a 6px
577 radius, 2px over each edge by negative margins, so it takes no room. */
578 [estilo-bar-menubar] {
579 position: relative;
580 inset-block-start: 1px;
581 block-size: 20px;
582 max-inline-size: calc(100% + var(--rst-sp-2));
583 margin-inline-start: calc(-1 * var(--rst-sp-2)); /* the titles' padding pulled back: the first title's text sits on the edge */
584 }
585 [estilo-bar~="stacked"] [estilo-menubar] { block-size: 20px; min-block-size: 0; align-items: center; flex-wrap: nowrap; }
586 [estilo-bar~="stacked"] [estilo-menubar-menu] { block-size: 20px; }
587 [estilo-bar~="stacked"] [estilo-menubar-title] {
588 block-size: 24px;
589 min-block-size: 0;
590 margin-block: -2px; /* spacing-allow: the 24px highlight overhangs the 20px row by 2px each way and takes no room */
591 padding-inline: var(--rst-sp-2);
592 border-radius: 6px;
593 color: var(--rst-text-muted);
594 font-size: 13px;
595 line-height: 24px;
596 }
597 [estilo-bar~="stacked"] [estilo-menubar-title]:hover,
598 [estilo-bar~="stacked"] [open] > [estilo-menubar-title] { color: var(--rst-text); }
599 [estilo-bar~="stacked"] [estilo-menubar-menu] > [estilo-menu] { inset-block-start: calc(100% + 4.5px); } /* the row ends at 50.5 (the stack is centred in 55px inside the border): 55, 1px above the 56px edge */
600
601 /* Every panel in the stacked header matches it: 28px rows, 13px type,
602 shortcuts muted, 4px padding and a 10px radius. */
603 [estilo-bar~="stacked"] [estilo-menu] {
604 --estilo-float-padding: var(--rst-sp-1);
605 --estilo-item-padding-block: var(--rst-sp-1);
606 --estilo-item-padding-inline: var(--rst-sp-3);
607 border-radius: 10px;
608 font-size: 13px;
609 }
610 [estilo-bar~="stacked"] [estilo-menu-item] { min-block-size: 28px; border-radius: 6px; }
611 [estilo-bar~="stacked"] [estilo-menu] hr { margin-block: var(--rst-sp-1); }
612 [estilo-bar~="stacked"] [estilo-menu-key] { color: var(--rst-text-muted); font-size: 12px; }
613
614 /* The controls set, in a bar with a slot: every action a 28px pill,
615 13px semibold, 8px apart; the primary the one filled pill; the
616 account its circle; and a divider between the page's controls and
617 the person's. Lit from above as the index's New document is, and far
618 fainter in dark. */
619 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end],
620 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-actions] { gap: var(--rst-sp-2); }
621 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) {
622 display: inline-flex;
623 align-items: center;
624 gap: var(--rst-sp-2);
625 box-sizing: border-box;
626 block-size: 28px;
627 min-block-size: 28px;
628 min-inline-size: 28px;
629 padding: 0 var(--rst-sp-3);
630 border: 0;
631 border-radius: 999px;
632 background-color: transparent;
633 box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.06));
634 color: var(--rst-text-muted);
635 font: 600 13px/1 var(--rst-font);
636 text-decoration: none;
637 white-space: nowrap;
638 }
639 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) svg { flex: none; inline-size: 15px; block-size: 15px; }
640 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button):hover:not(:disabled) {
641 background-color: var(--rst-surface-2);
642 color: var(--rst-text);
643 box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.08)), 0 1px 2px rgb(23 32 60 / 0.08);
644 }
645 /* A toggle whose region is shown takes the accent's tint. */
646 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button)[aria-expanded="true"] {
647 background-color: var(--rst-accent-soft);
648 color: var(--rst-accent);
649 box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.08)), 0 1px 2px rgb(23 32 60 / 0.08);
650 }
651 /* The primary: the one filled pill, a fine highlight on its top edge
652 and a shadow tinted with its own accent, 0 5px 12px -5px. */
653 :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button),
654 :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button):hover:not(:disabled) {
655 padding-inline: var(--rst-sp-4);
656 background-color: var(--rst-accent);
657 color: var(--rst-on-accent);
658 box-shadow:
659 inset 0 1px 0 rgb(255 255 255 / 0.22),
660 0 1px 1px rgb(23 32 60 / 0.10),
661 0 5px 12px -5px light-dark(color-mix(in srgb, var(--rst-accent) 75%, transparent), color-mix(in srgb, var(--rst-accent) 25%, transparent));
662 }
663 :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button):hover:not(:disabled) {
664 background-color: var(--rst-accent-strong);
665 }
666
667 /* The account is its circle: no square box behind it on hover or
668 open. The avatar darkens on hover and takes a 2px ring while its menu
669 is open; with no initials the glyph's own circle does the same. */
670 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger] {
671 inline-size: 28px;
672 min-inline-size: 0;
673 block-size: 28px;
674 padding: 0;
675 border-radius: 50%;
676 background: none;
677 }
678 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:focus-visible { outline-offset: 2px; }
679 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] {
680 inline-size: 28px;
681 block-size: 28px;
682 font-size: 12px;
683 box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.06)), 0 1px 2px rgb(23 32 60 / 0.08);
684 transition: background-color 120ms ease, box-shadow 120ms ease;
685 }
686 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:hover [estilo-avatar] {
687 background: color-mix(in srgb, var(--rst-accent) 18%, var(--rst-surface));
688 }
689 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account][open] [estilo-avatar],
690 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account][open] > [estilo-bar-trigger]:not(:has([estilo-avatar])) {
691 box-shadow: 0 0 0 2px var(--rst-surface), 0 0 0 4px color-mix(in srgb, var(--rst-accent) 45%, transparent);
692 }
693 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:not(:has([estilo-avatar])):hover {
694 background: var(--rst-surface-2);
695 }
696
697 /* The divider: a 20px hairline before the account, 12px either side
698 (the set's 8px gap and 4px more, then 12px of padding), drawn as the
699 account's own background so it takes no element. Only when something
700 of the page's precedes it: never on a bar with no actions and no
701 lead. Below 64rem a WideOnly action is hidden, so it does not count
702 there. */
703 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-lead], > [estilo-bar-actions] > :not([estilo-bar-control~="wide"])) > [estilo-account] {
704 margin-inline-start: var(--rst-sp-1);
705 padding-inline-start: var(--rst-sp-3);
706 background: linear-gradient(var(--rst-line), var(--rst-line)) left center / 1px 20px no-repeat;
707 }
708 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-lead], > [estilo-bar-actions] > :not([estilo-bar-control~="wide"])) > [estilo-account]:dir(rtl) {
709 background-position: right center;
710 }
711
712 /* An icon-only action (Action.IconOnly: Search in Mapa and Fichas):
713 a square as tall as the set's controls, the glyph centred. Its
714 label is its accessible name and, with its shortcut, the tooltip
715 the template asks rastrillo's rst-tip for, which hangs from this
716 box, so the box is positioned. (0,2,0) outweighs the set's pill. */
717 [estilo-bar-actions] [estilo-bar-icon] {
718 position: relative;
719 justify-content: center;
720 inline-size: 28px;
721 min-inline-size: 28px;
722 padding-inline: 0;
723 }
724
725 /* Coarse pointers: the header's controls rise to 32px, and the menubar
726 titles keep their 24px look in the 20px row but take 32px of hit
727 area, 4px over each edge, drawn by nothing and taking no room. Where
728 that reaches up under the title field, the field stays on top
729 (z-index): it keeps all of its own 24px, and a menu under it keeps
730 24px from the field's foot to the header's edge. */
731 @media (pointer: coarse) {
732 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) { block-size: 32px; min-block-size: 32px; }
733 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger],
734 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] { inline-size: 32px; block-size: 32px; }
735 [estilo-bar~="stacked"] [estilo-menubar-title] { position: relative; }
736 [estilo-bar~="stacked"] [estilo-menubar-title]::before { content: ""; position: absolute; inset-inline: 0; inset-block: -4px; }
737 [estilo-bar~="stacked"] [estilo-bar-title] { z-index: 1; }
738 /* The icon-only action is drawn 32px like the rest, and takes 44px
739 to a tap: 6px over each edge, drawn by nothing, inside the 56px
740 header and short of the 8px to its neighbours. ::before, since
741 ::after is the tooltip. */
742 [estilo-bar-actions] [estilo-bar-icon] { inline-size: 32px; min-inline-size: 32px; }
743 [estilo-bar-actions] [estilo-bar-icon]::before { content: ""; position: absolute; inset: -6px; }
744 }
745 /* Where nothing hovers (a tablet), a tap leaves :hover on the control,
746 and the tooltip would stay up until the next tap elsewhere. There it
747 shows for keyboard focus only. */
748 @media (hover: none) {
749 [estilo-bar-actions] [estilo-bar-icon]:not(:focus-visible)::after { display: none; }
750 }
751}
752@media (min-width: 64rem) {
753 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-actions]) > [estilo-account] {
754 margin-inline-start: var(--rst-sp-1);
755 padding-inline-start: var(--rst-sp-3);
756 background: linear-gradient(var(--rst-line), var(--rst-line)) left center / 1px 20px no-repeat;
757 }
758 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-actions]) > [estilo-account]:dir(rtl) {
759 background-position: right center;
760 }
761}
762/* Forced colours drop the controls' fills and shadows, leaving their
763 border to draw them, and the set's border: 0 above outweighs
764 rastrillo's own forced-colors border on its buttons: Share and Format
765 would lose every edge. So the set gives it back, at its own weight and
766 after it. An expanded toggle's tint is gone too, so it is drawn in Highlight,
767 two pixels deep with the outline (left to the focus ring while that
768 shows). At every width: below 800px the same border is rastrillo's. */
769@media (forced-colors: active) {
770 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) { border: 1px solid ButtonBorder; }
771 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button)[aria-expanded="true"] { border-color: Highlight; }
772 :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button)[aria-expanded="true"]:not(:focus-visible) { outline: 1px solid Highlight; }
773}
774@media (prefers-reduced-motion: reduce) {
775 :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] { transition: none; }
776}
777
778/* Appearance, in every app's account menu: Light, Dark and System as
779 three equal segments in one well, an icon over each word. The one in
780 force is raised (the surface, a step lighter in dark, where the
781 surface is barely off the well), bold, with its icon in the accent:
782 raised and bold, so more than colour says which. aria-pressed is the
783 state. chrome.js switches it in place. */
784[estilo-appearance] {
785 display: grid;
786 grid-template-columns: repeat(3, minmax(0, 1fr));
787 gap: var(--rst-sp-1);
788 margin: var(--rst-sp-1) var(--rst-sp-2) var(--rst-sp-2);
789 padding: var(--rst-sp-1);
790 border-radius: 10px;
791 background: var(--rst-surface-2);
792 box-shadow: inset 0 1px 2px light-dark(rgb(23 32 60 / 0.06), rgb(0 0 0 / 0.25));
793}
794[estilo-appearance] [estilo-menu-item] {
795 flex-direction: column;
796 justify-content: center;
797 gap: var(--rst-sp-1);
798 min-block-size: 46px;
799 padding: var(--rst-sp-2) var(--rst-sp-1);
800 border-radius: 8px;
801 background: none;
802 color: var(--rst-text-muted);
803 font-size: 12px;
804 text-align: center;
805}
806[estilo-appearance] [estilo-menu-label] { flex: none; max-inline-size: 100%; overflow-wrap: anywhere; }
807[estilo-appearance-icon] { display: inline-flex; flex: none; inline-size: 16px; block-size: 16px; }
808[estilo-appearance-icon] svg { inline-size: 100%; block-size: 100%; }
809[estilo-appearance] [estilo-menu-item]:hover:not([aria-pressed="true"]) {
810 background: light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.04));
811 color: var(--rst-text);
812}
813[estilo-appearance] [estilo-menu-item][aria-pressed="true"] {
814 background: light-dark(var(--rst-surface), #2f333d);
815 color: var(--rst-text);
816 font-weight: 600;
817 box-shadow:
818 inset 0 1px 0 light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.06)),
819 0 1px 2px rgb(23 32 60 / 0.12),
820 0 0 0 1px light-dark(rgb(23 32 60 / 0.06), rgb(255 255 255 / 0.06));
821}
822[estilo-appearance] [estilo-menu-item][aria-pressed="true"] [estilo-appearance-icon] { color: var(--rst-accent); }
823