oficina / fichas Public

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

Plain git — no account needed to clone.

Download

Download this file

1/* estilo — the Oficina suite's theme: Calma.
2
3 Calma replaced rastrillo's day on 2026-09-29, by Paul's decision after
4 six rounds of design directions (AGENTS.md, decisions table, row 8).
5 Until then estilo WAS day, byte for byte; it is now its own theme, and
6 theme_test.go gates it on its own terms: the same token set day
7 declares (so rastrillo's tokens.css finds every name it uses), every
8 contrast pair rastrillo gates, in both schemes — for this file AND for
9 every app's accent block (apps.go) — and a golden per app so no value
10 moves without the diff saying so.
11
12 The look: quiet, even and exact. A cool off-white page with white
13 cards, one grey text scale, soft 12px shapes with a long low shadow.
14 Colour belongs to the apps: every app's hue sits on one ring of equal
15 OKLCH lightness, so no app shouts over another, and the interface
16 tints to the app you are in (apps.go — --rst-accent and friends are
17 re-declared per app). This file's own accent is Oficina's, the suite's,
18 used where no app is in charge (sign-in, the team's home).
19
20 Status tones are day's, unchanged: they are functional, not brand, and
21 a pill must never be mistaken for a link.
22
23 ── One block, both schemes ───────────────────────────────────────────
24 As day: every colour is light-dark(<light>, <dark>) under one :root
25 with color-scheme: light dark, and the two [data-theme] rules at the
26 bottom are the whole toggle.
27
28 ── WCAG 2.2 AA ───────────────────────────────────────────────────────
29 Every pair rastrillo's own gate checks is checked by
30 TestContrastMeetsWCAG, for this file and each app's accent, light and
31 dark, through rastrillo's ui.ContrastRatio. The tightest, at the time
32 of writing: faint text on an accent-tinted surface, 4.63:1 (Files,
33 dark); a control border on the sunk surface, 3.2:1 (light).
34 ──────────────────────────────────────────────────────────────────── */
35
36:root {
37 color-scheme: light dark;
38
39 /* Type: the family only. Sizes and spacing stay in tokens.css. The
40 system UI face, nothing downloaded: Paul, 2026-10-25 (AGENTS.md row
41 9). A webfont cannot render in WebKit without a frame of invisible
42 text, and the chrome never flashes. TestChromeFontIsSystemUI. */
43 --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
44
45 /* Shape: soft and exact. */
46 --rst-radius: 12px;
47 --rst-radius-sm: 8px;
48 --rst-radius-pill: 999px;
49
50 /* Surfaces and lines: a cool off-white page, white cards, a sunk grey. */
51 --rst-bg: light-dark(#f5f6f8, #15171c);
52 --rst-surface: light-dark(#ffffff, #1c1f26);
53 --rst-surface-2: light-dark(#eceef2, #23262e);
54 --rst-line: light-dark(#e3e6eb, #2d313a);
55 --rst-line-strong: light-dark(#7f8591, #7a818e);
56
57 /* The page header's rule: the accent folded into the line, as day. */
58 --rst-header-rule: color-mix(in oklab, var(--rst-accent) 18%, var(--rst-line));
59
60 /* Text */
61 --rst-text: light-dark(#262a33, #eceef2);
62 --rst-text-muted: light-dark(#565c69, #b4bac6);
63 --rst-text-faint: light-dark(#626875, #8f96a3);
64
65 /* Accent: Oficina's, hue 262 on the ring (apps.go). Each app
66 re-declares these four. */
67 --rst-accent: light-dark(#2e5bb4, #87b1fd);
68 --rst-accent-strong: light-dark(#214a9b, #afcbfe);
69 --rst-accent-soft: light-dark(#e9f1ff, #1f2b42);
70 --rst-on-accent: light-dark(#ffffff, #111418);
71
72 /* Status tones: day's, unchanged. */
73 --rst-tone-neutral-fg: light-dark(#374151, #c3c9d1);
74 --rst-tone-neutral-bg: light-dark(#eef0f2, #262c34);
75 --rst-tone-positive-fg: light-dark(#166534, #6ee7a8);
76 --rst-tone-positive-bg: light-dark(#dcfce7, #10281c);
77 --rst-tone-warning-fg: light-dark(#854d0e, #f0c46a);
78 --rst-tone-warning-bg: light-dark(#fef3c7, #2c2110);
79 --rst-tone-negative-fg: light-dark(#b91c1c, #f79aa0);
80 --rst-tone-negative-bg: light-dark(#fee2e2, #331819);
81
82 /* Depth: a long, low, cool shadow; paper lifted, not stacked. */
83 --rst-shadow-pop: 0 18px 44px -14px light-dark(rgba(20, 24, 33, 0.28), rgba(0, 0, 0, 0.6));
84 --rst-shadow-knob: 0 1px 2px rgba(20, 24, 33, 0.3);
85 --rst-shadow-lift: 0 1px 1px rgba(20, 24, 33, 0.04), 0 14px 36px -14px light-dark(rgba(20, 24, 33, 0.22), rgba(0, 0, 0, 0.55));
86 --rst-overlay: light-dark(rgba(20, 24, 33, 0.45), rgba(0, 0, 0, 0.6));
87
88 /* ── Tokens rastrillo added after v0.23.0 ──────────────────────────
89 rastrillo v0.37.0 (its look from Fiesta 1.3.0) has day declare these
90 69 tokens beyond the set Calma was built on; v0.38.0 (Fiesta 1.5.0)
91 declares the same 69. Each is set to the fallback rastrillo v0.38.0's
92 tokens.css uses where it reads it, so rastrillo's own stylesheet draws
93 exactly what it would with none declared, and the gate
94 (TestDeclaresRastrilloTokens) stays strict. Two moved at v0.38.0:
95 --rst-focus-edge (below) and --rst-ghost-face-hover (after this
96 block). An app's CSS that reads one of these with a different
97 fallback of its own does change (Fichas' rail; AGENTS.md, Theme).
98 Adopting Fiesta's depth, light and sheen, or any value here other
99 than its fallback, is a separate design decision for Paul (AGENTS.md,
100 Theme), not a pin bump. */
101
102 /* Filled buttons: the accent and danger fills, their edges and labels. */
103 --rst-accent-fill: var(--rst-accent);
104 --rst-accent-fill-hover: var(--rst-accent-strong);
105 --rst-accent-fill-edge: var(--rst-accent);
106 --rst-accent-fill-edge-hover: var(--rst-accent-strong);
107 --rst-on-accent-fill: var(--rst-on-accent);
108 --rst-danger-fill: var(--rst-tone-negative-fg);
109 --rst-danger-fill-hover: var(--rst-tone-negative-fg);
110 --rst-danger-fill-edge: var(--rst-tone-negative-fg);
111 --rst-danger-fill-edge-hover: var(--rst-tone-negative-fg);
112 --rst-on-danger-fill: var(--rst-on-accent);
113 --rst-on-danger-fill-hover: var(--rst-on-accent);
114 --rst-danger-hover-filter: brightness(0.9);
115
116 /* Controls, ghost buttons and disclosure summaries. */
117 --rst-control-face: var(--rst-surface);
118 --rst-control-face-hover: var(--rst-surface);
119 --rst-control-face-press: transparent;
120 --rst-control-border: var(--rst-line-strong);
121 --rst-control-border-hover: var(--rst-accent);
122 --rst-control-text-hover: var(--rst-accent);
123 --rst-ghost-edge: var(--rst-line-strong);
124 --rst-ghost-edge-hover: var(--rst-line-strong);
125 --rst-ghost-face-hover: transparent;
126 --rst-summary-face: transparent;
127 --rst-summary-face-hover: transparent;
128 --rst-summary-edge: transparent;
129 --rst-summary-edge-hover: transparent;
130 --rst-summary-radius: 0;
131
132 /* Focus, hover and press tints. */
133 /* The field's edge on focus. Fiesta 1.5.0 draws one focus ring: the
134 edge turns to this, and the 2px accent outline sits flush on it. Its
135 fallback moved from --rst-line-strong to the accent at v0.38.0, and
136 the one ring depends on it (a grey edge under an accent outline reads
137 as two). */
138 --rst-focus-edge: var(--rst-accent);
139 --rst-focus-halo: transparent;
140 --rst-tint-hover: var(--rst-accent-soft);
141 --rst-tint-press: var(--rst-accent-soft);
142 --rst-tint-tap: transparent;
143 --rst-tint-card-hover: transparent;
144 --rst-tint-group-hover: transparent;
145 --rst-tint-tile-hover: var(--rst-surface);
146 --rst-tint-tile-press: var(--rst-surface);
147 --rst-row-tint-hover: var(--rst-surface-2);
148 --rst-row-tint-press: var(--rst-surface-2);
149
150 /* Fiesta's depth, light and sheen: all off, as the fallbacks have them. */
151 --rst-depth-face: 0;
152 --rst-depth-hl: transparent;
153 --rst-depth-contact: transparent;
154 --rst-depth-ambient: transparent;
155 --rst-light-rim: var(--rst-line);
156 --rst-light-wash: transparent;
157 --rst-sheen-fill: transparent;
158 --rst-sheen-plain: transparent;
159 --rst-press-drop: 0px;
160 --rst-press-wash: 0;
161 --rst-press-spot: 0;
162 --rst-press-wash-plain: 0;
163 --rst-press-spot-plain: 0;
164
165 /* Switches. */
166 --rst-knob: var(--rst-surface);
167 --rst-knob-shade: var(--rst-surface);
168 --rst-shadow-knob-hover: var(--rst-shadow-knob);
169 --rst-track-off: var(--rst-line-strong);
170 --rst-switch-w: 34px;
171 --rst-switch-h: 19px;
172 --rst-switch-knob: 15px;
173 --rst-switch-touch-w: 34px;
174 --rst-switch-touch-h: 19px;
175 --rst-switch-touch-knob: 15px;
176
177 /* Type and navigation. */
178 --rst-title-size: 1.375rem;
179 --rst-title-weight: 600;
180 --rst-title-track: -0.015em;
181 --rst-heading-size: var(--rst-fs-base);
182 --rst-label-case: uppercase;
183 --rst-label-track: 0.06em;
184 --rst-rail-bg: var(--rst-surface);
185 --rst-nav-current-bg: var(--rst-accent-soft);
186 --rst-nav-current-fg: var(--rst-accent);
187}
188
189/* --rst-ghost-face-hover has two fallbacks in rastrillo v0.38.0's
190 tokens.css: a ghost button's hover reads it with `transparent`, and the
191 one-way sign-in door's quiet controls (Other ways to sign in, Back, Use
192 a different email) with --rst-surface-2, the soft pill under them on
193 hover and focus. One value at :root cannot be both, so the smart door
194 (chrome's estilo-signin-screen) gets its own. Every ghost button inside
195 that screen gets the pill, and the door drawn outside it gets none
196 (AGENTS.md, Theme). Keyed on estilo's hook, not the partial's rst-
197 names, which are rastrillo's (AGENTS.md, Vocabulary). Not in print,
198 where Fiesta clears hover faces. */
199@media not print {
200 [estilo-signin-screen] {
201 --rst-ghost-face-hover: var(--rst-surface-2);
202 }
203}
204
205/* The whole toggle. Setting color-scheme re-resolves every light-dark()
206 above, so an explicit choice beats the OS in both directions without
207 restating a colour. */
208:root[data-theme="light"] { color-scheme: light; }
209:root[data-theme="dark"] { color-scheme: dark; }
210
211/* The accent for Fichas: hue 90 on Calma's ring (estilo theme/apps.go). */
212:root {
213 --rst-accent: light-dark(#765d00, #cfad4e);
214 --rst-accent-strong: light-dark(#634d00, #e1c885);
215 --rst-accent-soft: light-dark(#f7f0de, #342a0e);
216 --rst-on-accent: light-dark(#ffffff, #111418);
217}
218