| 1 | /* fichas mockups — PROPOSED app-owned CSS. |
| 2 | * |
| 3 | * Everything here is something rastrillo's ui partials do not provide. |
| 4 | * It is prefixed fichas-, never rst-, so the line between the framework's |
| 5 | * vocabulary and this app's additions is visible in the markup itself. |
| 6 | * If a mockup is approved, these rules move into internal/fichas/static/ |
| 7 | * theme.css and a test pins every fichas-* attribute a template uses to a |
| 8 | * rule here — the check that would have caught rst-stack and rst-muted. |
| 9 | * |
| 10 | * Only tokens.css custom properties are used, so the Calma theme and the |
| 11 | * light/dark switch apply unchanged. |
| 12 | * |
| 13 | * Calma's rules (estilo AGENTS.md, "Theme"), applied here: |
| 14 | * - Inside an app, only the icons carry colour. Links are text-coloured, |
| 15 | * underlined on hover only; the accent is for the one primary action, |
| 16 | * the current selection's soft tint, and nothing else. |
| 17 | * - White cards on a cool off-white page, 12px shapes, a long low shadow, |
| 18 | * one grey text scale. |
| 19 | * - A list item is a semibold title over a muted line. No bullets. |
| 20 | */ |
| 21 | |
| 22 | /* ---- Mockup chrome: the banner saying this is a mockup ---- */ |
| 23 | [fichas-mock-banner] { |
| 24 | margin-block-end: var(--rst-sp-4); |
| 25 | padding: var(--rst-sp-2) var(--rst-sp-3); |
| 26 | border: 1px dashed var(--rst-line-strong); |
| 27 | border-radius: var(--rst-radius-sm); |
| 28 | color: var(--rst-text-muted); |
| 29 | font-size: var(--rst-fs-sm); |
| 30 | } |
| 31 | [fichas-mock-banner] a { color: inherit; } |
| 32 | |
| 33 | /* ---- Quiet secondary text. The thing rst-muted was pretending to be. */ |
| 34 | [fichas-meta] { |
| 35 | color: var(--rst-text-muted); |
| 36 | font-size: var(--rst-fs-sm); |
| 37 | margin: 0; |
| 38 | } |
| 39 | |
| 40 | /* ---- The table view: a record grid. rastrillo has lists, not grids. */ |
| 41 | [fichas-grid-wrap] { |
| 42 | overflow-x: auto; |
| 43 | border: 1px solid var(--rst-line); |
| 44 | border-radius: var(--rst-radius); |
| 45 | background: var(--rst-surface); |
| 46 | } |
| 47 | [fichas-grid] { |
| 48 | inline-size: 100%; |
| 49 | border-collapse: collapse; |
| 50 | font-size: var(--rst-fs-sm); |
| 51 | } |
| 52 | [fichas-grid] th, |
| 53 | [fichas-grid] td { |
| 54 | padding: var(--rst-sp-2) var(--rst-sp-3); |
| 55 | text-align: start; |
| 56 | border-block-end: 1px solid var(--rst-line); |
| 57 | white-space: nowrap; |
| 58 | vertical-align: middle; |
| 59 | } |
| 60 | [fichas-grid] thead th { |
| 61 | position: sticky; |
| 62 | inset-block-start: 0; |
| 63 | background: var(--rst-surface-2); |
| 64 | font-weight: 600; |
| 65 | } |
| 66 | [fichas-grid] th small { |
| 67 | display: block; |
| 68 | font-weight: 400; |
| 69 | color: var(--rst-text-faint); |
| 70 | font-size: var(--rst-fs-xs); |
| 71 | } |
| 72 | [fichas-grid] tbody tr:hover { background: var(--rst-surface-2); } |
| 73 | [fichas-grid] tbody tr:last-child td { border-block-end: 0; } |
| 74 | [fichas-grid] td:first-child a { font-weight: 600; color: var(--rst-text); text-decoration: none; } |
| 75 | [fichas-grid] td:first-child a:hover { text-decoration: underline; } |
| 76 | [fichas-grid] [fichas-add-col] a { color: var(--rst-text-muted); text-decoration: none; font-weight: 500; } |
| 77 | [fichas-grid] [fichas-add-col] a:hover { color: var(--rst-text); } |
| 78 | [fichas-grid] [fichas-empty-cell] { color: var(--rst-text-faint); } |
| 79 | |
| 80 | /* ---- The cards view: a responsive grid of card faces. */ |
| 81 | [fichas-card-grid] { |
| 82 | display: grid; |
| 83 | grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); |
| 84 | gap: var(--rst-sp-4); |
| 85 | list-style: none; |
| 86 | padding: 0; |
| 87 | margin: 0; |
| 88 | } |
| 89 | [fichas-card-grid] > li { display: flex; } |
| 90 | [fichas-card-grid] [rst-card] { |
| 91 | /* rst-card is a bare container by design; rst-box's padding, so a card |
| 92 | face and a box read as the same material. */ |
| 93 | padding: 1.1rem 1.25rem; |
| 94 | box-shadow: var(--rst-shadow-lift); |
| 95 | border-radius: var(--rst-radius); |
| 96 | display: flex; |
| 97 | flex-direction: column; |
| 98 | gap: var(--rst-sp-2); |
| 99 | inline-size: 100%; |
| 100 | } |
| 101 | [fichas-card-title] { |
| 102 | display: flex; |
| 103 | align-items: baseline; |
| 104 | justify-content: space-between; |
| 105 | gap: var(--rst-sp-2); |
| 106 | margin: 0; |
| 107 | font-size: var(--rst-fs-base); |
| 108 | } |
| 109 | [fichas-card-title] a { color: var(--rst-text); text-decoration: none; } |
| 110 | [fichas-card-title] a:hover { text-decoration: underline; } |
| 111 | [fichas-card-quote] { |
| 112 | margin: 0; |
| 113 | padding-inline-start: var(--rst-sp-2); |
| 114 | border-inline-start: 2px solid var(--rst-line-strong); |
| 115 | color: var(--rst-text-muted); |
| 116 | font-size: var(--rst-fs-sm); |
| 117 | } |
| 118 | |
| 119 | /* ---- Toolbar row: the view switch on one side, actions on the other. */ |
| 120 | [fichas-toolbar] { |
| 121 | display: flex; |
| 122 | flex-wrap: wrap; |
| 123 | align-items: center; |
| 124 | justify-content: space-between; |
| 125 | gap: var(--rst-sp-3); |
| 126 | margin-block-end: var(--rst-sp-4); |
| 127 | } |
| 128 | |
| 129 | /* ---- Show view: the record's story beside its facts. */ |
| 130 | [fichas-split] { |
| 131 | display: grid; |
| 132 | grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); |
| 133 | gap: var(--rst-sp-5); |
| 134 | align-items: start; |
| 135 | } |
| 136 | @media (max-width: 52rem) { [fichas-split] { grid-template-columns: 1fr; } } |
| 137 | /* rst-box brings its own vertical margin; a flex gap on top of it doubled |
| 138 | every space on the show page. Let the boxes space themselves. */ |
| 139 | [fichas-split] > * { min-inline-size: 0; } |
| 140 | [fichas-split] > * > [rst-box]:first-child { margin-block-start: 0; } |
| 141 | [rst-box] form + [fichas-timeline] { margin-block-start: var(--rst-sp-5); } |
| 142 | |
| 143 | [fichas-timeline] { |
| 144 | list-style: none; |
| 145 | padding: 0; |
| 146 | margin: 0; |
| 147 | display: flex; |
| 148 | flex-direction: column; |
| 149 | gap: var(--rst-sp-3); |
| 150 | } |
| 151 | [fichas-timeline] > li { |
| 152 | display: grid; |
| 153 | grid-template-columns: 7.5rem 1fr; |
| 154 | gap: var(--rst-sp-3); |
| 155 | } |
| 156 | [fichas-timeline] time { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); } |
| 157 | [fichas-timeline] p { margin: 0; } |
| 158 | |
| 159 | [fichas-cite] { |
| 160 | font-size: var(--rst-fs-xs); |
| 161 | vertical-align: super; |
| 162 | color: var(--rst-text-muted); |
| 163 | text-decoration: none; |
| 164 | } |
| 165 | [fichas-cite]:hover { color: var(--rst-text); text-decoration: underline; } |
| 166 | |
| 167 | /* ---- Card layout editor: options beside a live preview. */ |
| 168 | [fichas-layout-editor] { |
| 169 | display: grid; |
| 170 | grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); |
| 171 | gap: var(--rst-sp-5); |
| 172 | align-items: start; |
| 173 | } |
| 174 | @media (max-width: 52rem) { [fichas-layout-editor] { grid-template-columns: 1fr; } } |
| 175 | |
| 176 | /* ---- A destructive action set apart at the foot of an edit page. */ |
| 177 | [fichas-danger-zone] { |
| 178 | margin-block-start: var(--rst-sp-6); |
| 179 | padding-block-start: var(--rst-sp-4); |
| 180 | border-block-start: 1px solid var(--rst-line); |
| 181 | } |
| 182 | |
| 183 | /* ---- Calma's app bar: icon + app name + quiet context, one action. */ |
| 184 | [fichas-appbar] { |
| 185 | display: flex; |
| 186 | align-items: center; |
| 187 | justify-content: space-between; |
| 188 | gap: var(--rst-sp-3); |
| 189 | margin-block-end: var(--rst-sp-5); |
| 190 | } |
| 191 | [fichas-appbar-title] { |
| 192 | display: flex; |
| 193 | align-items: baseline; |
| 194 | gap: var(--rst-sp-2); |
| 195 | margin: 0; |
| 196 | font-size: 1.5rem; |
| 197 | font-weight: 700; |
| 198 | letter-spacing: -0.01em; |
| 199 | } |
| 200 | [fichas-appbar-title] span { |
| 201 | font-size: var(--rst-fs-base); |
| 202 | font-weight: 400; |
| 203 | color: var(--rst-text-muted); |
| 204 | letter-spacing: 0; |
| 205 | } |
| 206 | [fichas-appbar-actions] { display: flex; gap: var(--rst-sp-2); } |
| 207 | |
| 208 | /* ---- Links in running text: text-coloured, underline on hover. */ |
| 209 | [fichas-link] { color: var(--rst-text); text-decoration: none; } |
| 210 | [fichas-link]:hover { text-decoration: underline; } |
| 211 | |
| 212 | /* ---- The record bar sits under the view switch, full width, with room. */ |
| 213 | [fichas-toolbar] + [rst-lbar] { margin-block-end: var(--rst-sp-4); } |
| 214 | |
| 215 | /* ---- Sidebar icons on the text's centre line, not above its baseline. */ |
| 216 | [rst-shell-nav] a { display: flex; align-items: center; gap: var(--rst-sp-2); } |
| 217 | [rst-shell-nav] a .icon { flex-shrink: 0; } |
| 218 | |
| 219 | /* ---- A many-of-many choice as a quiet checklist. The choice-card |
| 220 | component tints every checked option with the accent, which is right |
| 221 | for one-of-few and far too loud for five-of-eight under Calma. */ |
| 222 | [fichas-checklist] { |
| 223 | border: 0; |
| 224 | padding: 0; |
| 225 | margin: 0 0 var(--rst-sp-4); |
| 226 | display: flex; |
| 227 | flex-direction: column; |
| 228 | gap: var(--rst-sp-2); |
| 229 | } |
| 230 | [fichas-checklist] legend { font-weight: 600; margin-block-end: var(--rst-sp-2); } |
| 231 | |