content-explorer/ui/app/globals.css
tegwick a6e360aaa5 Port the explorer shell: tokens, header, hero, and a generic table.
CONTENT-WP-0002-T01 adapts the pinned OnCo visual system under ui/ without the corpus, mark, or kind routes.

Assistant: grok
Assistant-Session: 01a1346c-fdff-7741-b1af-b7283661554b
2026-10-13 22:51:00 +02:00

246 lines
7.2 KiB
CSS

/*
* Adapted from OnCo src/app/globals.css
* https://github.com/judegomila/OnCo @ b594d7433bf4e408b44215e25e5304696d6f840e
* Copyright (c) 2026 OnCo. MIT License. See ui/NOTICE.
*
* Kept: color tokens, type scale, card, chip, button, hero wash, skip link,
* and the sticky results-table rules. Dropped: garden art, graph explorer,
* oncology prose, and column-resize grips. The table class is `records`.
* Accent values are the upstream pink. Geist font files are not fetched;
* the sans stack is the system UI font.
*/
@import "tailwindcss";
:root {
--background: #f5f4ee;
--foreground: #1b1f1c;
--muted: #5b655e;
--border: #e0ded4;
--border-strong: #c9c6b9;
--card: #fcfbf8;
--surface: #eeece4;
--accent: #c2185b;
--accent-solid: #d6336c;
--accent-fg: #ffffff;
--accent-soft: #fce7f0;
--ring: #d6336c;
--garden-1: #9db59a;
--garden-3: #d9d2bf;
--shadow-1: 0 1px 2px rgb(31 40 33 / 0.04), 0 2px 6px -2px rgb(31 40 33 / 0.05);
--shadow-2: 0 10px 24px -12px rgb(31 40 33 / 0.16), 0 2px 6px -2px rgb(31 40 33 / 0.06);
--header-h: 3.5rem;
--sticky-top: var(--header-h);
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-muted: var(--muted);
--color-border: var(--border);
--color-border-strong: var(--border-strong);
--color-card: var(--card);
--color-surface: var(--surface);
--color-accent: var(--accent);
--color-accent-solid: var(--accent-solid);
--color-accent-fg: var(--accent-fg);
--color-accent-soft: var(--accent-soft);
--font-sans: ui-sans-serif, system-ui, sans-serif;
--font-mono: ui-monospace, monospace;
--text-small: 0.8125rem;
--text-small--line-height: 1.25rem;
--text-body: 0.9375rem;
--text-body--line-height: 1.55rem;
--shadow-card: var(--shadow-1);
--shadow-lift: var(--shadow-2);
}
@media (prefers-color-scheme: dark) {
:root {
--background: #121816;
--foreground: #e6e9e6;
--muted: #a6afa9;
--border: #2b3431;
--border-strong: #3c4642;
--card: #1a201e;
--surface: #212927;
--accent: #f9a8d4;
--accent-solid: #db2777;
--accent-fg: #ffffff;
--accent-soft: #3b1a2b;
--ring: #f87171;
--garden-1: #3d5a45;
--garden-3: #2a3330;
--shadow-1: 0 1px 2px rgb(0 0 0 / 0.35);
--shadow-2: 0 8px 20px -10px rgb(0 0 0 / 0.6);
}
}
@layer base {
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
background: var(--background);
color: var(--foreground);
font-family: var(--font-sans);
font-size: 1rem;
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; font-weight: 600; line-height: 1.15; }
p { text-wrap: pretty; }
table { font-variant-numeric: tabular-nums; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
}
@layer components {
.display {
font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);
line-height: 1.02;
letter-spacing: -0.032em;
font-weight: 600;
text-wrap: balance;
}
.kicker {
font-size: 0.6875rem;
line-height: 1.2;
text-transform: uppercase;
letter-spacing: 0.14em;
font-weight: 600;
color: var(--muted);
}
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 0.875rem;
box-shadow: var(--shadow-1);
}
.chip {
display: inline-block;
max-width: 100%;
overflow: clip;
text-overflow: ellipsis;
white-space: nowrap;
border-radius: 9999px;
padding: 0.125rem 0.6rem;
font-size: 0.72rem;
line-height: 1.35;
font-weight: 600;
letter-spacing: 0.01em;
background: var(--surface);
color: var(--foreground);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
height: 2.5rem;
padding: 0 1rem;
border-radius: 0.625rem;
font-size: 0.875rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
border: 1px solid var(--border);
background: var(--card);
color: var(--foreground);
}
.btn:hover { background: var(--surface); border-color: var(--border-strong); }
.btn-primary { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.hero {
background:
radial-gradient(52rem 24rem at 10% -8%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
radial-gradient(48rem 30rem at 94% -4%, color-mix(in srgb, var(--garden-1) 24%, transparent), transparent 70%),
radial-gradient(44rem 18rem at 42% 108%, color-mix(in srgb, var(--garden-3) 50%, transparent), transparent 70%),
linear-gradient(to bottom, color-mix(in srgb, var(--surface) 55%, transparent), var(--background));
}
.site-footer {
background: linear-gradient(to bottom, color-mix(in srgb, var(--garden-3) 34%, var(--background)), color-mix(in srgb, var(--surface) 40%, var(--background)) 45%);
}
table.records {
width: 100%;
border-collapse: separate;
border-spacing: 0;
font-size: 0.875rem;
line-height: 1.45;
}
table.records thead th {
position: sticky;
top: var(--sticky-top);
z-index: 2;
text-align: start;
vertical-align: bottom;
font-weight: 600;
color: var(--muted);
font-size: 0.6875rem;
line-height: 1.2;
text-transform: uppercase;
letter-spacing: 0.1em;
padding: 0.7rem 0.75rem 0.55rem;
background: var(--card);
border-bottom: 1px solid var(--border-strong);
white-space: nowrap;
}
table.records thead th:first-child { color: var(--foreground); }
table.records thead th button {
color: inherit;
font: inherit;
letter-spacing: inherit;
text-transform: inherit;
}
table.records thead th button:hover { color: var(--foreground); }
table.records td {
padding: 0.65rem 0.75rem;
border-bottom: 1px solid var(--border);
vertical-align: top;
overflow-wrap: break-word;
}
table.records td:first-child { font-weight: 500; }
table.records tbody tr:last-child td { border-bottom-color: transparent; }
table.records tbody tr:hover td { background: color-mix(in srgb, var(--foreground) 3.5%, transparent); }
table.records th:first-child,
table.records td:first-child { padding-left: 1rem; }
table.records th:last-child,
table.records td:last-child { padding-right: 1rem; }
.overflow-x-auto table.records thead th { top: 0; }
@media (width >= 64rem) {
.results-table table.records thead th { top: var(--sticky-top); }
}
}
.overflow-x-auto > table.records thead th { position: static; }
@media (min-width: 64rem) {
.lg\:overflow-x-visible > table.records thead th { position: sticky; }
}
.skip-link {
position: absolute;
left: 0.75rem;
top: -3rem;
z-index: 200;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
background: var(--accent-solid);
color: var(--accent-fg);
font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}