catalog / style.css
bruAristimunha's picture
Lead with Sankey as navigation view; unify into Catalog views tabs
5009b4c
/* ================================================================
EEGDash Space — visual design system
-----------------------------------------------------------------
Scale: 1 2 3 4 5 6 7 8 9 10
4 8 12 16 20 24 32 40 56 72 (px)
Radii: 6 (sm) / 10 (md) / 14 (lg) / 20 (xl)
Motion: 150ms ease for hover, 220ms for layout
Palette (Okabe-Ito + slate neutrals):
brand #0072B2 (EEG waves; primary interaction)
accent #E69F00 (reserved for 🤗 flag, never decorative)
success #009E73
danger #D55E00
ink / text #0f172a / muted #64748b
surface #ffffff / subtle #f1f5f9 / outline #e2e8f0
================================================================ */
:root {
--brand: #0072B2;
--brand-strong: #005A8F;
--brand-soft: #e6f1fa;
--accent: #E69F00;
--accent-soft: #fdf2dd;
--ok: #009E73;
--ink: #0f172a;
--muted: #64748b;
--outline: #e2e8f0;
--surface: #ffffff;
--subtle: #f1f5f9;
--code-bg: #0f172a;
--code-ink: #e2e8f0;
--shadow-sm: 0 1px 2px rgba(15,23,42,.06);
--shadow-md: 0 4px 14px rgba(15,23,42,.08);
}
.dark, .dark :root, html.dark {
--ink: #e2e8f0;
--muted: #94a3b8;
--outline: #1f2937;
--surface: #111827;
--subtle: #0b1220;
--brand-soft: #102a42;
--accent-soft: #2a1d00;
--code-bg: #020617;
--shadow-sm: 0 1px 2px rgba(0,0,0,.4);
--shadow-md: 0 6px 20px rgba(0,0,0,.5);
}
.gradio-container {
max-width: 1320px !important;
padding: 24px 20px 40px !important;
}
/* Kill gradio's default form chrome around our HTML blocks. */
.eeg-hero-wrap, .eeg-modality-wrap, .eeg-foot-wrap {
background: transparent !important;
border: 0 !important;
padding: 0 !important;
box-shadow: none !important;
}
.eeg-hero-wrap > .prose, .eeg-modality-wrap > .prose, .eeg-foot-wrap > .prose { max-width: none; }
/* ---------- Hero ---------- */
.eeg-hero {
display: grid;
grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
gap: 32px;
align-items: center;
padding: 32px 28px;
border-radius: 20px;
background:
radial-gradient(1200px 320px at -10% -40%, rgba(0,114,178,.14), transparent 60%),
radial-gradient(900px 240px at 110% -30%, rgba(230,159,0,.10), transparent 60%),
linear-gradient(180deg, var(--surface), var(--subtle));
border: 1px solid var(--outline);
box-shadow: var(--shadow-sm);
margin-bottom: 16px;
}
.eeg-hero__logo {
display: block;
height: 52px;
width: auto;
margin: 0 0 14px;
/* The mark ships dark — invert on dark mode so it still reads. */
}
html.dark .eeg-hero__logo { filter: invert(1) hue-rotate(180deg) brightness(1.05); }
.eeg-hero__kicker {
font-size: 11.5px;
letter-spacing: .12em;
text-transform: uppercase;
color: var(--brand);
font-weight: 600;
margin-bottom: 10px;
}
.eeg-hero__title {
font-size: clamp(26px, 3.2vw, 40px);
line-height: 1.08;
letter-spacing: -0.02em;
font-weight: 700;
color: var(--ink);
margin: 0 0 14px;
}
.eeg-hero__lede {
color: var(--muted);
font-size: 15px;
line-height: 1.55;
margin: 0 0 18px;
max-width: 58ch;
}
.eeg-hero__lede a {
color: var(--brand);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color 150ms ease;
}
.eeg-hero__lede a:hover { border-bottom-color: var(--brand); }
.eeg-hero__cta { display: flex; gap: 8px; flex-wrap: wrap; }
.eeg-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border-radius: 10px;
border: 1px solid var(--outline);
background: var(--surface);
color: var(--ink);
font-size: 13.5px;
font-weight: 500;
text-decoration: none;
transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.eeg-btn:hover { transform: translateY(-1px); border-color: var(--brand); }
.eeg-btn--primary {
background: var(--brand);
border-color: var(--brand);
color: #fff;
}
.eeg-btn--primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.eeg-btn--icon svg {
width: 14px;
height: 14px;
color: currentColor;
flex-shrink: 0;
}
.eeg-btn--icon span { line-height: 1; }
.eeg-hero__stats {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.eeg-stat {
background: var(--surface);
border: 1px solid var(--outline);
border-radius: 14px;
padding: 16px 18px;
box-shadow: var(--shadow-sm);
}
.eeg-stat__n {
font-family: "Inter", ui-sans-serif, sans-serif;
font-size: 28px;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--ink);
line-height: 1;
}
.eeg-stat__l {
color: var(--muted);
font-size: 12.5px;
margin-top: 6px;
text-transform: lowercase;
}
.eeg-stat__meta { opacity: .7; margin-left: 4px; }
.eeg-stat--accent {
background: linear-gradient(135deg, var(--accent-soft), var(--surface));
border-color: color-mix(in srgb, var(--accent) 35%, var(--outline));
}
.eeg-stat--accent .eeg-stat__n { color: var(--accent); }
@media (max-width: 860px) {
.eeg-hero { grid-template-columns: 1fr; padding: 24px 18px; }
.eeg-hero__stats { grid-template-columns: repeat(2, 1fr); }
}
/* ---------- Modality strip ---------- */
.eeg-modality {
padding: 16px 18px;
border-radius: 14px;
background: var(--surface);
border: 1px solid var(--outline);
box-shadow: var(--shadow-sm);
margin-bottom: 16px;
}
.eeg-modality__head {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 10px;
}
.eeg-modality__title {
font-size: 12px;
letter-spacing: .1em;
text-transform: uppercase;
color: var(--muted);
font-weight: 600;
}
.eeg-modality__meta {
color: var(--muted);
font-size: 12.5px;
}
.eeg-bar {
display: flex;
width: 100%;
height: 10px;
border-radius: 999px;
overflow: hidden;
background: var(--subtle);
box-shadow: inset 0 0 0 1px var(--outline);
}
.eeg-bar__seg { display: block; height: 100%; transition: filter 150ms ease; }
.eeg-bar__seg:hover { filter: brightness(1.08); }
.eeg-legend {
display: flex;
flex-wrap: nowrap;
gap: 14px;
margin-top: 12px;
overflow-x: auto;
white-space: nowrap;
padding-bottom: 4px; /* space for the horizontal scrollbar */
scrollbar-width: thin;
scrollbar-color: var(--outline) transparent;
}
.eeg-legend::-webkit-scrollbar { height: 6px; }
.eeg-legend::-webkit-scrollbar-thumb { background: var(--outline); border-radius: 999px; }
.eeg-legend__item {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
color: var(--ink);
flex-shrink: 0;
}
.eeg-legend__swatch {
width: 10px; height: 10px;
border-radius: 3px;
display: inline-block;
}
.eeg-legend__n {
color: var(--muted);
font-variant-numeric: tabular-nums;
margin-left: 2px;
}
/* ---------- Toolbar & filters ---------- */
.eeg-toolbar {
gap: 12px;
margin-bottom: 8px !important;
}
.eeg-search textarea, .eeg-search input {
font-size: 15px !important;
padding: 12px 14px !important;
border-radius: 12px !important;
}
.eeg-toggle label {
font-weight: 500;
color: var(--ink);
}
.eeg-filters { margin-top: 4px; }
.eeg-filters label span { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
/* CheckboxGroup → chip style */
.eeg-filters .wrap.svelte-1j5x5b > label,
.eeg-filters fieldset label {
border-radius: 999px !important;
padding: 6px 12px !important;
border: 1px solid var(--outline) !important;
background: var(--surface) !important;
transition: all 150ms ease;
}
.eeg-filters input[type="checkbox"]:checked + span {
color: var(--brand);
}
/* ---------- Main table + detail ---------- */
.eeg-main { gap: 16px !important; align-items: stretch; }
.eeg-main__table, .eeg-main__detail {
min-width: 0;
}
.eeg-table {
border-radius: 14px !important;
overflow: hidden !important;
border: 1px solid var(--outline) !important;
background: var(--surface) !important;
box-shadow: var(--shadow-sm);
}
.eeg-table table {
font-size: 13px !important;
font-variant-numeric: tabular-nums;
}
.eeg-table thead th {
background: var(--subtle) !important;
color: var(--muted) !important;
font-weight: 600 !important;
font-size: 11.5px !important;
text-transform: uppercase;
letter-spacing: .04em;
border-bottom: 1px solid var(--outline) !important;
padding: 10px 12px !important;
}
.eeg-table tbody td {
padding: 9px 12px !important;
border-bottom: 1px solid var(--outline) !important;
color: var(--ink);
}
.eeg-table tbody tr { transition: background 150ms ease, transform 150ms ease; }
.eeg-table tbody tr:hover { background: var(--brand-soft) !important; cursor: pointer; }
.eeg-table tbody tr.selected { background: var(--brand-soft) !important; }
/* First column = slug, emphasized */
.eeg-table tbody td:first-child {
font-weight: 600;
color: var(--brand);
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 12px !important;
}
/* 🤗 column (last) */
.eeg-table tbody td:last-child {
text-align: center;
color: var(--accent);
font-weight: 700;
}
/* ---------- Detail card ---------- */
.eeg-detail { padding: 0 !important; background: transparent !important; border: 0 !important; }
.eeg-card {
background: var(--surface);
border: 1px solid var(--outline);
border-radius: 14px;
padding: 24px;
box-shadow: var(--shadow-md);
min-height: 520px;
display: flex;
flex-direction: column;
gap: 18px;
}
.eeg-card--empty {
background: linear-gradient(180deg, var(--subtle), var(--surface));
align-items: center;
justify-content: center;
text-align: center;
color: var(--muted);
}
.eeg-card__ghost-mark {
opacity: .22;
margin: 0 auto 14px;
width: 96px;
height: 96px;
display: flex;
align-items: center;
justify-content: center;
}
.eeg-card__ghost-mark svg { width: 100%; height: 100%; }
.eeg-card__ghost-title {
font-size: 17px;
font-weight: 600;
color: var(--ink);
margin-bottom: 6px;
}
.eeg-card--empty p { max-width: 36ch; font-size: 14px; line-height: 1.5; }
.eeg-card__id {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 6px;
flex-wrap: wrap;
}
.eeg-card__rec {
margin-left: auto;
width: 42px;
height: 42px;
border-radius: 10px;
background: var(--subtle);
border: 1px solid var(--outline);
padding: 4px;
object-fit: contain;
}
html.dark .eeg-card__rec { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.eeg-card__slug {
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 13px;
font-weight: 600;
color: var(--brand);
background: var(--brand-soft);
padding: 4px 10px;
border-radius: 8px;
}
.eeg-card__modality {
font-size: 11.5px;
font-weight: 600;
letter-spacing: .06em;
text-transform: uppercase;
color: var(--hue, var(--muted));
padding: 4px 10px;
border-radius: 8px;
background: color-mix(in srgb, var(--hue, var(--muted)) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--hue, var(--muted)) 30%, transparent);
}
.eeg-card__title {
margin: 0;
font-size: 20px;
line-height: 1.25;
letter-spacing: -0.01em;
color: var(--ink);
font-weight: 700;
}
.eeg-card__meta {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 12px;
}
.eeg-tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 999px;
background: var(--subtle);
border: 1px solid var(--outline);
color: var(--ink);
font-size: 11.5px;
font-weight: 500;
text-decoration: none;
transition: background 150ms ease, border-color 150ms ease;
}
.eeg-tag:hover { background: var(--brand-soft); border-color: var(--brand); }
.eeg-tag--accent {
background: var(--accent-soft);
border-color: color-mix(in srgb, var(--accent) 30%, var(--outline));
color: var(--accent);
}
.eeg-tag--accent:hover { border-color: var(--accent); }
.eeg-tag--muted { color: var(--muted); cursor: default; }
.eeg-tag--muted:hover { background: var(--subtle); border-color: var(--outline); }
.eeg-card__kvs {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 10px;
padding: 14px;
background: var(--subtle);
border-radius: 12px;
border: 1px solid var(--outline);
}
.eeg-kv { text-align: center; }
.eeg-kv__n {
font-family: "Inter", ui-sans-serif, sans-serif;
font-size: 18px;
font-weight: 700;
color: var(--ink);
font-variant-numeric: tabular-nums;
line-height: 1;
}
.eeg-kv__l {
color: var(--muted);
font-size: 11px;
margin-top: 5px;
text-transform: lowercase;
letter-spacing: .02em;
}
@media (max-width: 620px) {
.eeg-card__kvs { grid-template-columns: repeat(3, 1fr); }
}
.eeg-card__h3 {
font-size: 12px;
text-transform: uppercase;
letter-spacing: .08em;
color: var(--muted);
font-weight: 600;
margin: 4px 0 10px;
}
.eeg-snippet + .eeg-snippet { margin-top: 10px; }
.eeg-snippet {
border-radius: 10px;
overflow: hidden;
border: 1px solid var(--outline);
}
.eeg-snippet__hd {
background: var(--subtle);
padding: 6px 12px;
font-size: 11.5px;
color: var(--muted);
border-bottom: 1px solid var(--outline);
font-weight: 500;
}
.eeg-snippet__code {
margin: 0;
padding: 14px 16px;
background: var(--code-bg);
color: var(--code-ink);
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
font-size: 12.5px;
line-height: 1.55;
overflow-x: auto;
}
.eeg-note {
margin: 10px 0 8px;
color: var(--muted);
font-size: 13px;
line-height: 1.5;
}
.eeg-note a { color: var(--brand); }
/* ---------- Overview plots ---------- */
.eeg-overview {
margin: 8px 0 12px !important;
}
.eeg-overview .label-wrap {
font-weight: 600 !important;
color: var(--ink) !important;
font-size: 13.5px !important;
}
.eeg-overview__lede {
margin: 0 0 10px !important;
color: var(--muted);
font-size: 13px;
line-height: 1.55;
max-width: 78ch;
}
.eeg-overview__lede em {
font-style: normal;
color: var(--ink);
font-weight: 600;
background: var(--brand-soft);
padding: 1px 6px;
border-radius: 4px;
}
/* Tab strip inside Catalog views — make the tab buttons chip-like so the
"Flow / Bubbles / Treemap / …" row reads as a choice of lens, not a
throwaway. */
.eeg-tabs [role="tablist"] {
gap: 6px !important;
border-bottom: 1px solid var(--outline) !important;
padding: 0 0 0 2px !important;
margin-bottom: 14px !important;
}
.eeg-tabs [role="tab"] {
padding: 8px 14px !important;
border-radius: 10px 10px 0 0 !important;
font-weight: 500 !important;
font-size: 13.5px !important;
color: var(--muted) !important;
border: 1px solid transparent !important;
border-bottom: 0 !important;
background: transparent !important;
transition: color 150ms ease, background 150ms ease;
}
.eeg-tabs [role="tab"]:hover { color: var(--ink) !important; background: var(--subtle) !important; }
.eeg-tabs [role="tab"][aria-selected="true"] {
color: var(--brand) !important;
background: var(--surface) !important;
border-color: var(--outline) !important;
box-shadow: 0 1px 0 0 var(--surface);
}
/* Plotly fragments ship their own .eegdash-figure wrapper. Let it render as-is
but make sure it doesn't get boxed twice by gradio's surrounding block. */
.eeg-plot { padding: 0 !important; background: transparent !important; border: 0 !important; }
.eeg-plot .eegdash-figure {
margin: 0 !important;
width: 100% !important;
}
.eeg-plot .eegdash-branding { display: none; }
/* ---------- Footer ---------- */
.eeg-foot {
text-align: center;
color: var(--muted);
font-size: 12.5px;
padding: 24px 0 8px;
margin-top: 16px;
border-top: 1px solid var(--outline);
}
.eeg-foot a { color: var(--brand); text-decoration: none; margin: 0 4px; }
.eeg-foot a:hover { text-decoration: underline; }
/* ---------- Responsive ---------- */
@media (max-width: 960px) {
.eeg-main { flex-direction: column !important; }
}