/* fichas mockups — PROPOSED app-owned CSS. * * Everything here is something rastrillo's ui partials do not provide. * It is prefixed fichas-, never rst-, so the line between the framework's * vocabulary and this app's additions is visible in the markup itself. * If a mockup is approved, these rules move into internal/fichas/static/ * theme.css and a test pins every fichas-* attribute a template uses to a * rule here — the check that would have caught rst-stack and rst-muted. * * Only tokens.css custom properties are used, so the Calma theme and the * light/dark switch apply unchanged. * * Calma's rules (estilo AGENTS.md, "Theme"), applied here: * - Inside an app, only the icons carry colour. Links are text-coloured, * underlined on hover only; the accent is for the one primary action, * the current selection's soft tint, and nothing else. * - White cards on a cool off-white page, 12px shapes, a long low shadow, * one grey text scale. * - A list item is a semibold title over a muted line. No bullets. */ /* ---- Mockup chrome: the banner saying this is a mockup ---- */ [fichas-mock-banner] { margin-block-end: var(--rst-sp-4); padding: var(--rst-sp-2) var(--rst-sp-3); border: 1px dashed var(--rst-line-strong); border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); font-size: var(--rst-fs-sm); } [fichas-mock-banner] a { color: inherit; } /* ---- Quiet secondary text. The thing rst-muted was pretending to be. */ [fichas-meta] { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); margin: 0; } /* ---- The table view: a record grid. rastrillo has lists, not grids. */ [fichas-grid-wrap] { overflow-x: auto; border: 1px solid var(--rst-line); border-radius: var(--rst-radius); background: var(--rst-surface); } [fichas-grid] { inline-size: 100%; border-collapse: collapse; font-size: var(--rst-fs-sm); } [fichas-grid] th, [fichas-grid] td { padding: var(--rst-sp-2) var(--rst-sp-3); text-align: start; border-block-end: 1px solid var(--rst-line); white-space: nowrap; vertical-align: middle; } [fichas-grid] thead th { position: sticky; inset-block-start: 0; background: var(--rst-surface-2); font-weight: 600; } [fichas-grid] th small { display: block; font-weight: 400; color: var(--rst-text-faint); font-size: var(--rst-fs-xs); } [fichas-grid] tbody tr:hover { background: var(--rst-surface-2); } [fichas-grid] tbody tr:last-child td { border-block-end: 0; } [fichas-grid] td:first-child a { font-weight: 600; color: var(--rst-text); text-decoration: none; } [fichas-grid] td:first-child a:hover { text-decoration: underline; } [fichas-grid] [fichas-add-col] a { color: var(--rst-text-muted); text-decoration: none; font-weight: 500; } [fichas-grid] [fichas-add-col] a:hover { color: var(--rst-text); } [fichas-grid] [fichas-empty-cell] { color: var(--rst-text-faint); } /* ---- The cards view: a responsive grid of card faces. */ [fichas-card-grid] { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--rst-sp-4); list-style: none; padding: 0; margin: 0; } [fichas-card-grid] > li { display: flex; } [fichas-card-grid] [rst-card] { /* rst-card is a bare container by design; rst-box's padding, so a card face and a box read as the same material. */ padding: 1.1rem 1.25rem; box-shadow: var(--rst-shadow-lift); border-radius: var(--rst-radius); display: flex; flex-direction: column; gap: var(--rst-sp-2); inline-size: 100%; } [fichas-card-title] { display: flex; align-items: baseline; justify-content: space-between; gap: var(--rst-sp-2); margin: 0; font-size: var(--rst-fs-base); } [fichas-card-title] a { color: var(--rst-text); text-decoration: none; } [fichas-card-title] a:hover { text-decoration: underline; } [fichas-card-quote] { margin: 0; padding-inline-start: var(--rst-sp-2); border-inline-start: 2px solid var(--rst-line-strong); color: var(--rst-text-muted); font-size: var(--rst-fs-sm); } /* ---- Toolbar row: the view switch on one side, actions on the other. */ [fichas-toolbar] { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rst-sp-3); margin-block-end: var(--rst-sp-4); } /* ---- Show view: the record's story beside its facts. */ [fichas-split] { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: var(--rst-sp-5); align-items: start; } @media (max-width: 52rem) { [fichas-split] { grid-template-columns: 1fr; } } /* rst-box brings its own vertical margin; a flex gap on top of it doubled every space on the show page. Let the boxes space themselves. */ [fichas-split] > * { min-inline-size: 0; } [fichas-split] > * > [rst-box]:first-child { margin-block-start: 0; } [rst-box] form + [fichas-timeline] { margin-block-start: var(--rst-sp-5); } [fichas-timeline] { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--rst-sp-3); } [fichas-timeline] > li { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--rst-sp-3); } [fichas-timeline] time { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); } [fichas-timeline] p { margin: 0; } [fichas-cite] { font-size: var(--rst-fs-xs); vertical-align: super; color: var(--rst-text-muted); text-decoration: none; } [fichas-cite]:hover { color: var(--rst-text); text-decoration: underline; } /* ---- Card layout editor: options beside a live preview. */ [fichas-layout-editor] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); gap: var(--rst-sp-5); align-items: start; } @media (max-width: 52rem) { [fichas-layout-editor] { grid-template-columns: 1fr; } } /* ---- A destructive action set apart at the foot of an edit page. */ [fichas-danger-zone] { margin-block-start: var(--rst-sp-6); padding-block-start: var(--rst-sp-4); border-block-start: 1px solid var(--rst-line); } /* ---- Calma's app bar: icon + app name + quiet context, one action. */ [fichas-appbar] { display: flex; align-items: center; justify-content: space-between; gap: var(--rst-sp-3); margin-block-end: var(--rst-sp-5); } [fichas-appbar-title] { display: flex; align-items: baseline; gap: var(--rst-sp-2); margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; } [fichas-appbar-title] span { font-size: var(--rst-fs-base); font-weight: 400; color: var(--rst-text-muted); letter-spacing: 0; } [fichas-appbar-actions] { display: flex; gap: var(--rst-sp-2); } /* ---- Links in running text: text-coloured, underline on hover. */ [fichas-link] { color: var(--rst-text); text-decoration: none; } [fichas-link]:hover { text-decoration: underline; } /* ---- The record bar sits under the view switch, full width, with room. */ [fichas-toolbar] + [rst-lbar] { margin-block-end: var(--rst-sp-4); } /* ---- Sidebar icons on the text's centre line, not above its baseline. */ [rst-shell-nav] a { display: flex; align-items: center; gap: var(--rst-sp-2); } [rst-shell-nav] a .icon { flex-shrink: 0; } /* ---- A many-of-many choice as a quiet checklist. The choice-card component tints every checked option with the accent, which is right for one-of-few and far too loud for five-of-eight under Calma. */ [fichas-checklist] { border: 0; padding: 0; margin: 0 0 var(--rst-sp-4); display: flex; flex-direction: column; gap: var(--rst-sp-2); } [fichas-checklist] legend { font-weight: 600; margin-block-end: var(--rst-sp-2); }