Spaces:
Running
Running
Download frontend/src/styles.css from philippyt/ablation-lab: direct link, hf CLI and curl.
- Browser
- Download file 38 kB
-
https://huggingface.co/spaces/philippyt/ablation-lab/resolve/main/frontend/src/styles.css
- Command line
-
hf download hf://spaces/philippyt/ablation-lab/frontend/src/styles.css
-
curl -L -o styles.css https://huggingface.co/spaces/philippyt/ablation-lab/resolve/main/frontend/src/styles.css
38 kB
:root {
--bg: #f7f5ef;
--panel: #ffffff;
--panel-alt: #efece4;
--canvas: #f7f5ef;
--border: #d8d4c8;
--border-strong: #1a1a1a;
--fg: #14140f;
--fg-soft: #3a3a32;
--muted: #6a6a60;
--accent: #1e40af;
--accent-soft: #e0e7ff;
--highlight: #fde68a;
--info: #1d4ed8;
--good: #047857;
--warn: #b45309;
--bad: #991b1b;
--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
--display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
--pad: clamp(0.8rem, 1.3vw, 1.4rem);
--dia-fixed: #ffffff;
--dia-swap: #e0e7ff;
--dia-swap-dim: #f7f5ef;
--dia-stroke: #14140f;
--dia-text: #14140f;
--dia-text-sub: #3a3a32;
--dia-residual: #14140f;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family: var(--display);
font-size: clamp(14px, 0.95vw, 16px);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow: hidden;
}
.app {
height: 100vh;
display: grid;
grid-template-columns: 1fr clamp(300px, 22vw, 400px);
grid-template-rows: auto minmax(0, 1fr);
overflow: hidden;
--bottom-h: 30em;
}
@media (max-width: 1599px) {
.app { grid-template-columns: 1fr clamp(290px, 22vw, 380px); --bottom-h: 28em; }
}
@media (max-width: 1279px) {
.app { grid-template-columns: 1fr clamp(270px, 24vw, 340px); --bottom-h: 24em; }
}
@media (min-width: 1024px) and (orientation: portrait) {
.workspace { grid-template-rows: auto minmax(0, 1fr); }
.canvas-panel { flex: 0 0 auto; }
.canvas-panel .diagram-wrap { aspect-ratio: 5 / 1; max-height: 22em; }
.bottom-row {
height: auto;
--bottom-h: auto;
grid-template-columns: 1fr;
grid-auto-rows: 1fr;
}
.bottom-row > .panel,
.bottom-row > .diagnostics-col { height: 100%; min-height: 0; }
}
@media (max-width: 1023px) {
html, body { overflow: auto; }
.app { height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; --bottom-h: auto; }
.sidebar { grid-column: 1 !important; grid-row: 2 !important; border-left: 0 !important; border-bottom: 1px solid var(--border-strong); height: auto !important; overflow: visible !important; }
.sidebar .panel.collapsible.is-open,
.diagnostics-col .panel.collapsible.is-open { flex: 0 0 auto; min-height: 0; }
.sidebar .panel.collapsible > .panel-body,
.diagnostics-col .panel.collapsible > .panel-body { overflow: visible; }
.diagnostics-col { overflow: visible; height: auto; }
.workspace { grid-row: 3 !important; height: auto !important; overflow: visible !important; }
.canvas-panel .diagram-wrap {
overflow-x: auto;
overflow-y: hidden;
justify-content: flex-start;
min-height: 0;
}
.canvas-panel svg.diagram {
width: 720px;
min-width: 720px;
height: 9rem;
max-width: none;
max-height: none;
flex-shrink: 0;
}
}
header {
grid-column: 1 / -1;
grid-row: 1;
display: flex;
align-items: center;
gap: 1rem;
padding: 0.9rem var(--pad);
border-bottom: 1px solid var(--border-strong);
background: var(--panel);
min-width: 0;
flex-wrap: wrap;
row-gap: 0.5rem;
}
.header-right { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; flex-shrink: 0; min-width: 0; }
.header-right .hash { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) {
header { padding: 0.7rem var(--pad); gap: 0.55rem; }
.header-right { width: 100%; margin-left: 0; justify-content: flex-end; }
.wit-button { padding: 0.28rem 0.65rem; font-size: 0.78rem; }
.row { grid-template-columns: 1fr; gap: 0.3rem 0.6rem; }
.row label { margin-bottom: -0.15rem; }
}
header h1 {
margin: 0;
font-family: var(--display);
font-size: 1.2rem;
letter-spacing: -0.005em;
font-weight: 600;
color: var(--fg);
white-space: nowrap;
flex-shrink: 0;
}
.gh-link {
display: inline-flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
color: var(--fg);
border: 1px solid var(--border-strong);
background: var(--panel);
margin-left: 0.2rem;
text-decoration: none;
transition: background-color 80ms ease, color 80ms ease;
}
.gh-link:hover {
background: var(--panel-alt);
border-color: var(--fg);
}
.gh-link svg { display: block; }
.wit-button {
font-family: var(--display);
font-size: 0.85rem;
font-weight: 500;
background: var(--panel);
color: var(--fg);
border: 1px solid var(--border-strong);
padding: 0.3rem 0.85rem;
cursor: pointer;
margin-left: 0.10rem;
text-transform: none;
letter-spacing: 0;
transition: background-color 80ms ease, color 80ms ease;
}
.wit-button:hover {
background: var(--fg);
color: var(--bg);
border-color: var(--fg);
}
.wit-backdrop {
background: rgba(0, 0, 0, 0.5);
z-index: 50;
}
.wit-modal {
position: relative;
max-width: 720px;
width: 92vw;
max-height: 88vh;
margin: 6vh auto;
background: var(--panel);
border: 1px solid var(--border-strong);
padding: 2rem 2.4rem 2.2rem 2.4rem;
overflow-y: auto;
font-family: var(--display);
color: var(--fg);
}
.wit-close {
position: absolute;
top: 0.9rem;
right: 1rem;
background: var(--panel);
color: var(--fg);
font-family: var(--mono);
font-size: 1.4rem;
font-weight: 700;
line-height: 1;
padding: 0.2rem 0.55rem;
border: 1px solid var(--border);
text-transform: none;
letter-spacing: 0;
cursor: pointer;
}
.wit-close:hover { background: var(--fg); color: var(--bg); }
.wit-modal h2 {
font-family: var(--display);
font-size: 1.4rem;
font-weight: 700;
margin: 0 0 0.7rem 0;
letter-spacing: -0.005em;
text-transform: none;
}
.wit-modal h3 {
font-family: var(--mono);
font-size: 0.78rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--fg);
margin: 1.5rem 0 0.55rem 0;
}
.wit-lead {
font-size: 1.02rem;
line-height: 1.55;
color: var(--fg);
margin: 0 0 0.4rem 0;
}
.wit-list {
margin: 0;
padding-left: 1.2rem;
font-size: 0.92rem;
line-height: 1.55;
color: var(--fg);
}
.wit-list li { margin-bottom: 0.4rem; }
.wit-list strong { font-weight: 700; }
.badge {
background: var(--accent-soft);
color: var(--accent);
padding: 0.22rem 0.65rem;
font-family: var(--mono);
font-size: 0.76rem;
font-weight: 600;
letter-spacing: 0.02em;
border: 1px solid var(--accent);
}
.hash {
color: var(--muted);
font-family: var(--mono);
font-size: 0.78rem;
font-weight: 500;
}
.workspace {
grid-column: 1;
grid-row: 2;
padding: var(--pad);
display: grid;
grid-template-rows: minmax(0, 1fr) auto;
gap: 1rem;
min-height: 0;
overflow: hidden;
}
.sidebar {
grid-column: 2;
grid-row: 2;
border-left: 1px solid var(--border-strong);
background: var(--bg);
padding: 0.9rem 1rem;
overflow: hidden;
display: flex;
flex-direction: column;
gap: 0.7rem;
min-height: 0;
height: 100%;
}
.panel.collapsible {
padding: 0;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.panel.collapsible.is-closed { flex: 0 0 auto; }
.panel.collapsible.is-open { flex: 1 1 0; min-height: 0; }
.panel.collapsible > .panel-summary {
padding: 0.6rem 0.85rem 0.6rem 1rem;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
background: var(--panel);
user-select: none;
cursor: pointer;
flex-shrink: 0;
}
.panel.collapsible.is-closed > .panel-summary { border-bottom: 0; }
.panel.collapsible > .panel-summary h2 { margin: 0; }
.panel.collapsible > .panel-summary .panel-summary-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
.panel.collapsible > .panel-summary .panel-chev {
font-family: var(--mono);
font-size: 1rem;
color: var(--muted);
width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid var(--border);
cursor: pointer;
}
.panel.collapsible > .panel-summary .panel-chev:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.panel.collapsible > .panel-body {
padding: 0.8rem 1rem 0.9rem 1rem;
background: var(--panel);
flex: 1 1 auto;
overflow-y: auto;
min-height: 0;
}
.bottom-row {
display: grid;
grid-template-columns: 1.5fr 1fr 1.1fr;
gap: 1rem;
min-height: 0;
height: var(--bottom-h, 30em);
}
.bottom-row > .panel {
height: 100%;
min-height: 0;
overflow: hidden;
}
.bottom-row > .diagnostics-col {
height: 100%;
min-height: 0;
overflow: hidden;
}
@media (max-width: 1599px) {
.bottom-row { grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (max-width: 1279px) {
.bottom-row { grid-template-columns: 1.2fr 1fr 1fr; }
}
@media (max-width: 1023px) {
.bottom-row { grid-template-columns: 1fr; height: auto; }
.bottom-row > .panel,
.bottom-row > .diagnostics-col { height: auto; }
}
.diagnostics-col {
display: flex;
flex-direction: column;
gap: 0.55rem;
min-height: 0;
height: 100%;
overflow: hidden;
}
.diagnostics-col > .panel { border: 1px solid var(--border); }
.instr-empty {
margin: 0;
font-family: var(--display);
font-size: 0.8rem;
color: var(--muted);
line-height: 1.5;
padding: 0.2rem 0;
}
.instr-meta {
margin: 0 0 0.5rem 0;
font-family: var(--mono);
font-size: 0.7rem;
color: var(--muted);
line-height: 1.5;
}
.instr-warn {
display: inline-block;
margin-left: 0.4rem;
padding: 0.05rem 0.4rem;
background: #fde7d6;
color: #c2410c;
border: 1px solid #c2410c;
font-family: var(--mono);
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 700;
}
.instr-layer-tag {
display: inline-block;
font-family: var(--mono);
font-size: 0.7rem;
color: var(--muted);
font-weight: 600;
min-width: 1.7rem;
}
.instr-num {
font-family: var(--mono);
font-size: 0.75rem;
text-align: right;
font-variant-numeric: tabular-nums;
padding-left: 0.4rem;
min-width: 3.5rem;
}
.instr-table {
width: 100%;
border-collapse: collapse;
}
.instr-table td { padding: 0.16rem 0; vertical-align: middle; }
.instr-meter {
height: 9px;
background: var(--panel-alt);
border: 1px solid var(--border);
position: relative;
}
.instr-meter-fill {
position: absolute;
left: 0; top: 0; bottom: 0;
background: var(--accent);
}
.instr-plot-wrap {
margin: 0.3rem 0 0.45rem 0;
position: relative;
}
.instr-plot {
display: block;
background: transparent;
}
.instr-plot-axis {
stroke: var(--fg);
stroke-width: 0.8;
vector-effect: non-scaling-stroke;
fill: none;
}
.instr-plot-tick-mark {
stroke: var(--fg);
stroke-width: 0.7;
vector-effect: non-scaling-stroke;
}
.instr-plot-tick-label {
font-family: var(--mono);
font-size: 9px;
fill: var(--fg);
}
.instr-plot-xlabel {
font-family: var(--mono);
font-size: 10px;
fill: var(--fg);
}
.instr-plot-line {
stroke: var(--fg);
stroke-width: 1.1;
vector-effect: non-scaling-stroke;
fill: none;
}
.instr-plot-marker {
fill: var(--fg);
stroke: var(--panel);
stroke-width: 0.6;
vector-effect: non-scaling-stroke;
}
.instr-plot-ref {
stroke: var(--muted);
stroke-width: 0.7;
vector-effect: non-scaling-stroke;
fill: none;
}
.instr-plot-ref-text {
font-family: var(--mono);
font-size: 8.5px;
fill: var(--muted);
font-style: italic;
}
.instr-plot-ref-off {
font-family: var(--mono);
font-size: 0.65rem;
color: var(--muted);
font-style: italic;
text-align: right;
margin-top: 0.15rem;
}
.instr-spark-values {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
gap: 0.2rem 0.45rem;
font-family: var(--mono);
font-size: 0.7rem;
}
.instr-spark-cell {
display: inline-flex;
align-items: baseline;
gap: 0.3rem;
}
.instr-num-inline {
font-weight: 700;
color: var(--fg);
font-variant-numeric: tabular-nums;
}
.instr-routing-layer {
margin-bottom: 0.65rem;
padding-bottom: 0.45rem;
border-bottom: 1px dashed var(--border);
}
.instr-routing-layer:last-child { border-bottom: 0; margin-bottom: 0; }
.instr-routing-head {
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.3rem;
}
.instr-routing-bars {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
gap: 0.25rem;
}
.instr-routing-bar {
position: relative;
height: 16px;
background: var(--panel-alt);
border: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 0.3rem;
font-family: var(--mono);
font-size: 0.66rem;
overflow: hidden;
}
.instr-routing-bar-fill {
position: absolute;
left: 0; top: 0; bottom: 0;
background: var(--accent-soft);
}
.instr-routing-bar-label {
position: relative;
z-index: 1;
color: var(--muted);
font-weight: 500;
}
.instr-routing-bar-pct {
position: relative;
z-index: 1;
margin-left: auto;
font-weight: 700;
color: var(--fg);
}
.instr-surprise-stream {
font-family: var(--mono);
font-size: 0.82rem;
line-height: 1.6;
letter-spacing: 0;
word-break: break-all;
padding: 0.45rem 0.55rem;
background: var(--bg);
border: 1px solid var(--border);
}
.instr-surprise-char {
display: inline-block;
padding: 0 1px;
}
.panel {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 0;
padding: 1.1rem 1.3rem 1.2rem 1.3rem;
position: relative;
display: flex;
flex-direction: column;
min-height: 0;
}
.panel h2 {
font-family: var(--mono);
font-size: 0.82rem;
text-transform: uppercase;
letter-spacing: 0.09em;
margin: 0 0 0.9rem 0;
color: var(--fg);
font-weight: 700;
}
.panel-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.9rem;
flex-shrink: 0;
}
.panel-head h2 { margin: 0; }
.panel-actions { display: flex; gap: 0.5rem; }
.canvas-panel {
background: var(--panel);
overflow: hidden;
}
.canvas-panel .diagram-outer {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: 0.55rem;
}
.canvas-panel .diagram-wrap {
flex: 1;
min-height: 0;
}
.diagram-legend {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 1.1rem;
padding: 0 0.25rem;
font-family: var(--display);
font-size: 0.7rem;
font-weight: 400;
color: var(--muted);
font-style: italic;
}
.diagram-legend-item {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.diagram-legend-sw {
display: inline-block;
width: 14px;
height: 10px;
border: 1px solid var(--dia-stroke);
border-radius: 1.5px;
}
.diagram-legend-sw.dia-fixed { background: var(--dia-fixed); }
.diagram-legend-sw.dia-swap { background: var(--dia-swap); }
.diagram-legend-sw.dia-swap-dim { background: var(--dia-swap-dim); }
.diagram-legend-sw.dia-disabled {
background: repeating-linear-gradient(
-45deg,
var(--panel-alt) 0,
var(--panel-alt) 3px,
transparent 3px,
transparent 5px
);
border-color: var(--muted);
border-style: solid;
opacity: 0.85;
}
.row {
display: grid;
grid-template-columns: 9rem 1fr;
gap: 0.7rem 0.85rem;
align-items: center;
}
@media (max-width: 1599px) {
.row { grid-template-columns: 8rem 1fr; }
}
@media (max-width: 1279px) {
.row { grid-template-columns: 7rem 1fr; gap: 0.55rem 0.6rem; }
}
.row label {
font-family: var(--mono);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--fg);
font-weight: 600;
display: flex;
align-items: center;
}
select, input[type="text"], input[type="number"], textarea {
font: inherit;
font-family: var(--mono);
font-size: 0.86rem;
font-weight: 500;
padding: 0.45rem 0.6rem;
border: 1px solid var(--border);
border-radius: 0;
background: var(--panel);
color: var(--fg);
width: 100%;
line-height: 1.4;
}
select:focus, input:focus, textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent);
}
select {
appearance: none;
-webkit-appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%),
linear-gradient(135deg, var(--fg) 50%, transparent 50%);
background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
padding-right: 1.75rem;
}
textarea {
min-height: 3.5em;
max-height: 3.5em;
resize: none;
overflow: auto;
}
button {
font: inherit;
font-family: var(--mono);
font-size: 0.82rem;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.55rem 1.1rem;
border: 1px solid var(--accent);
border-radius: 0;
background: var(--accent);
color: white;
cursor: pointer;
font-weight: 600;
}
button:hover { background: var(--fg); border-color: var(--fg); color: white; }
button:disabled { background: var(--panel-alt); color: var(--muted); cursor: not-allowed; border-color: var(--border); }
button:disabled:hover { background: var(--panel-alt); color: var(--muted); }
button.ghost {
background: var(--panel);
color: var(--fg);
border: 1px solid var(--border);
padding: 0.45rem 0.75rem;
font-size: 0.74rem;
}
button.ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.ghost-sm {
padding: 0.32rem 0.65rem;
font-size: 0.7rem;
}
.diagram-wrap {
display: flex;
justify-content: center;
align-items: stretch;
background: var(--canvas);
border: 1px solid var(--border);
padding: 1.2rem 0.9rem;
overflow: visible;
}
svg.diagram {
display: block;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
}
.dia-fixed { fill: var(--dia-fixed); stroke: var(--dia-stroke); transition: fill 120ms; }
.dia-swap { fill: var(--dia-swap); stroke: var(--dia-stroke); transition: fill 120ms; }
.dia-swap-dim { fill: var(--dia-swap-dim); stroke: var(--dia-stroke); transition: fill 120ms; }
.dia-disabled { fill: url(#dia-hatch); stroke: var(--muted); opacity: 0.78; }
.dia-hatch-bg { fill: var(--panel-alt); }
.dia-hatch-line { stroke: var(--muted); opacity: 0.5; }
.dia-block-frame { fill: none; stroke: var(--dia-stroke); opacity: 0.55; }
.dia-block-tag rect { fill: var(--canvas); stroke: var(--dia-stroke); stroke-width: 1; }
.dia-block-tag text { fill: var(--dia-text); }
.dia-residual { stroke: var(--dia-residual); stroke-linejoin: miter; stroke-linecap: square; }
.dia-residual-tap { fill: var(--dia-residual); }
.dia-residual-arrow { fill: var(--dia-residual); }
.dia-residual-label { fill: var(--muted); letter-spacing: 0.02em; }
.dia-line { stroke: var(--dia-stroke); }
.dia-arrow { fill: var(--dia-stroke); }
.dia-plus-bg { fill: var(--canvas); }
.dia-plus { fill: var(--panel); stroke: var(--dia-stroke); }
.dia-plus-text { fill: var(--dia-text); }
.dia-text { fill: var(--dia-text); }
.dia-text-sub { fill: var(--dia-text-sub); }
.dia-legend-text { fill: var(--muted); }
.cost-table, .kv-state-table {
width: 100%;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
.cost-table td, .kv-state-table td {
padding: 0.5rem 0.55rem;
border-bottom: 1px solid var(--border);
font-family: var(--mono);
font-size: 0.88rem;
font-weight: 500;
color: var(--fg);
}
.cost-table tr:last-child td, .kv-state-table tr:last-child td { border-bottom: 0; }
.cost-table td:first-child, .kv-state-table td:first-child {
color: var(--muted);
font-size: 0.76rem;
text-transform: uppercase;
letter-spacing: 0.04em;
font-weight: 600;
width: 50%;
}
.cost-table td.delta { color: var(--accent); font-size: 0.74rem; padding-left: 0.4rem; font-weight: 600; }
.cost-table td.delta.up { color: var(--warn); }
.cost-table td.delta.down { color: var(--good); }
.cost-table td.sep {
padding-top: 0.65rem;
padding-bottom: 0.3rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.06em;
font-size: 0.66rem;
border-bottom: 0;
font-weight: 700;
}
.cost-table .muted { color: var(--muted); font-size: 0.74rem; margin-left: 0.3rem; }
.presets-list {
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.preset {
font-family: var(--mono);
background: var(--panel);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 0;
padding: 0.45rem 0.65rem;
text-align: left;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 0.5rem;
text-transform: none;
letter-spacing: 0;
line-height: 1.3;
width: 100%;
min-width: 0;
}
.preset:hover { border-color: var(--fg); background: var(--panel); color: var(--fg); }
.preset.preset-active { border-color: var(--accent); background: var(--accent-soft); }
.preset-name {
font-size: 0.82rem;
font-weight: 600;
color: var(--fg);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 1;
}
.preset-family {
font-size: 0.7rem;
color: var(--muted);
font-weight: 500;
white-space: nowrap;
flex-shrink: 0;
}
.presets-body { max-height: 32vh; overflow-y: auto; }
.status {
margin-top: 0.6rem;
font-family: var(--mono);
font-size: 0.8rem;
color: var(--fg);
font-weight: 500;
}
.status.err { color: var(--bad); }
.output {
margin-top: 0.7rem;
padding: 0.75rem 0.9rem;
background: var(--bg);
border: 1px solid var(--border);
white-space: pre-wrap;
font-family: var(--mono);
font-size: 0.85rem;
font-weight: 500;
color: var(--fg);
line-height: 1.55;
flex: 1 1 0;
min-height: 0;
overflow: auto;
}
.banner {
margin-top: 0.4rem;
padding: 0.55rem 0.75rem;
background: var(--panel-alt);
border: 1px solid var(--border);
color: var(--fg);
font-family: var(--mono);
font-size: 0.78rem;
font-weight: 500;
}
.banner.ok {
background: var(--accent-soft);
border-color: var(--accent);
color: var(--fg);
}
.run-state {
flex: 1 1 auto;
min-width: 0;
text-align: right;
margin-left: 0.6rem;
}
.preset-caption {
font-size: 0.72rem;
color: var(--muted);
margin: 0 0 0.6rem 0;
line-height: 1.45;
}
.run-trigger {
font-family: var(--mono);
font-size: 0.82rem;
text-transform: uppercase;
letter-spacing: 0.09em;
font-weight: 700;
color: var(--fg);
background: var(--accent-soft);
border: 1px solid var(--accent);
padding: 0.32rem 0.85rem;
cursor: pointer;
transition: background-color 80ms ease;
}
.run-trigger:hover:not(:disabled) {
background: var(--accent);
color: var(--bg);
}
.run-trigger:disabled {
background: var(--panel-alt);
border-color: var(--border);
color: var(--muted);
cursor: not-allowed;
}
.run-trigger.is-stoppable {
background: #fde7e7;
border-color: #c44;
color: #7a1f1f;
}
.run-trigger.is-stoppable:hover:not(:disabled) {
background: #c44;
border-color: #c44;
color: white;
}
.roofline {
margin-top: 0.6rem;
padding: 0.7rem 0.8rem;
background: var(--panel-alt);
border: 1px solid var(--border);
}
.roofline-head {
display: flex;
align-items: center;
gap: 0.45rem;
font-family: var(--mono);
font-size: 0.74rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--fg);
margin-bottom: 0.45rem;
}
.roofline-gpu {
margin-left: auto;
font-family: var(--mono);
font-size: 0.7rem;
background: var(--bg);
color: var(--fg);
border: 1px solid var(--border);
padding: 0.12rem 0.3rem;
text-transform: none;
letter-spacing: 0;
font-weight: 500;
}
.roofline-prose {
margin: 0;
font-size: 0.78rem;
line-height: 1.5;
color: var(--fg);
}
.roofline-prose strong {
font-weight: 700;
}
.roofline-prefill {
margin: 0.45rem 0 0 0;
padding-top: 0.45rem;
border-top: 1px dashed var(--border);
font-family: var(--mono);
font-size: 0.72rem;
line-height: 1.5;
color: var(--muted);
}
.roofline-prefill strong {
font-weight: 700;
color: var(--fg);
}
.state-pill {
display: inline-block;
max-width: 100%;
padding: 0.22rem 0.55rem;
font-family: var(--mono);
font-size: 0.72rem;
font-weight: 600;
border: 1px solid var(--border);
background: var(--panel-alt);
color: var(--fg);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
.state-pill.ok {
background: var(--accent-soft);
border-color: var(--accent);
}
.state-pill.warn {
background: #fff5d6;
border-color: #d4a526;
color: #5a4400;
}
.state-pill.err {
background: #fde7e7;
border-color: #c44;
color: #7a1f1f;
}
.banner.warn {
background: #fff5d6;
border-color: #d4a526;
color: #5a4400;
}
.banner.err {
background: #fde7e7;
border-color: #c44;
color: #7a1f1f;
}
.kv {
font-family: var(--mono);
font-size: 0.76rem;
color: var(--muted);
font-weight: 500;
}
.hint-line { margin: 0.55rem 0 0 0; color: var(--muted); font-size: 0.78rem; }
.full-width { grid-column: 1 / -1; }
.kv-state h2 { display: flex; align-items: center; gap: 0.55rem; }
.kv-state-status {
text-transform: uppercase;
letter-spacing: 0.07em;
font-family: var(--mono);
font-size: 0.68rem;
font-weight: 600;
padding: 0.16rem 0.45rem;
background: var(--panel-alt);
border: 1px solid var(--border);
color: var(--muted);
}
.kv-state-status[data-status="streaming"] {
background: var(--accent-soft);
border-color: var(--accent);
color: var(--accent);
}
.kv-state-status[data-status="done"] {
background: #d1fae5;
border-color: var(--good);
color: var(--good);
}
.kv-bar {
position: relative;
height: 26px;
background: var(--bg);
border: 1px solid var(--border);
overflow: hidden;
margin-bottom: 0.75rem;
}
.kv-bar-prompt {
position: absolute;
inset: 0 auto 0 0;
background: var(--accent-soft);
transition: width 80ms linear;
}
.kv-bar-fill {
position: absolute;
inset: 0 auto 0 0;
background: var(--accent);
transition: width 80ms linear;
}
.kv-bar-pct {
position: absolute;
right: 0.65rem;
top: 50%;
transform: translateY(-50%);
font-family: var(--mono);
font-size: 0.78rem;
font-weight: 600;
color: var(--fg);
mix-blend-mode: difference;
filter: invert(1);
}
.kv-state-table .kv { font-size: 0.72rem; padding-left: 0.4rem; color: var(--muted); }
.kv-breakdown {
margin-top: 0.55rem;
padding: 0.7rem 0.85rem;
background: var(--panel-alt);
border: 1px solid var(--border);
}
.kv-eq-result {
font-family: var(--mono);
font-size: 0.78rem;
color: var(--muted);
margin-bottom: 0.5rem;
}
.kv-eq-result strong {
color: var(--fg);
font-weight: 700;
font-size: 0.95rem;
}
.kv-eq {
border-collapse: collapse;
font-family: var(--mono);
margin-bottom: 0.55rem;
}
.kv-eq td {
padding: 0.1rem 0.45rem;
text-align: center;
}
.kv-eq tr.kv-eq-nums td {
font-size: 0.92rem;
font-weight: 700;
color: var(--fg);
}
.kv-eq tr.kv-eq-nums td.dot {
font-weight: 400;
color: var(--muted);
padding: 0.1rem 0.15rem;
}
.kv-eq tr.kv-eq-labels td {
font-size: 0.68rem;
color: var(--muted);
padding-top: 0;
}
.kv-breakdown-current {
margin-top: 0.6rem;
font-family: var(--mono);
font-size: 0.72rem;
color: var(--muted);
}
.kv-breakdown-current strong { color: var(--fg); font-weight: 700; }
.kv-counterfactual {
margin-top: 0.55rem;
width: 100%;
border-collapse: collapse;
font-family: var(--mono);
font-size: 0.74rem;
}
.kv-counterfactual td {
padding: 0.22rem 0;
border-bottom: 1px dashed var(--border);
}
.kv-counterfactual tr:last-child td { border-bottom: 0; }
.kv-counterfactual td:first-child { color: var(--muted); }
.kv-counterfactual td:nth-child(2) { font-weight: 600; text-align: right; padding-right: 0.85rem; }
.kv-counterfactual td:last-child { color: var(--muted); text-align: right; }
.kv-evicted {
color: #c2410c;
font-weight: 600;
}
.kv-bar-fill.sliding {
background-image: repeating-linear-gradient(
-45deg,
var(--accent) 0,
var(--accent) 6px,
color-mix(in srgb, var(--accent) 70%, transparent) 6px,
color-mix(in srgb, var(--accent) 70%, transparent) 12px
);
}
.kv-state-hint {
margin: 0.75rem 0 0 0;
font-family: var(--mono);
font-size: 0.78rem;
color: var(--muted);
display: flex;
align-items: center;
gap: 0.55rem;
flex-wrap: wrap;
font-weight: 500;
}
.kv-state-hint .link {
color: var(--accent);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 3px;
font-weight: 600;
}
.kv-state-hint .link:hover { color: var(--fg); }
.help-hint {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
border: 1px solid var(--border);
background: var(--panel);
color: var(--muted);
font-family: var(--mono);
font-size: 10px;
font-weight: 700;
margin-left: 0.4rem;
cursor: help;
user-select: none;
outline: none;
}
.help-hint:hover { background: var(--accent); color: white; border-color: var(--accent); }
.help-hint-tooltip-fixed {
position: fixed;
transform: translate(-100%, -50%);
background: var(--fg);
color: var(--bg);
padding: 0.6rem 0.75rem;
font-family: var(--display);
font-size: 0.82rem;
font-weight: 400;
line-height: 1.5;
width: 17rem;
text-transform: none;
letter-spacing: 0;
box-shadow: 4px 4px 0 var(--border-strong);
pointer-events: none;
z-index: 70;
}
.tooltip {
position: fixed;
background: var(--fg);
color: var(--bg);
padding: 0.6rem 0.8rem;
font-family: var(--display);
font-size: 0.84rem;
font-weight: 400;
max-width: 19rem;
z-index: 60;
pointer-events: none;
box-shadow: 4px 4px 0 var(--border-strong);
}
.tooltip strong { display: block; margin-bottom: 0.25rem; color: white; font-family: var(--mono); font-size: 0.78rem; }
.tooltip .kv { margin-top: 0.35rem; font-size: 0.72rem; color: rgba(255,255,255,0.6); }
.sidepanel {
position: fixed;
top: 0;
right: 0;
height: 100vh;
width: min(480px, 100vw);
background: var(--panel);
border-left: 1px solid var(--border-strong);
padding: 1.5rem 1.7rem 2rem 1.7rem;
overflow-y: auto;
z-index: 40;
font-family: var(--display);
font-size: 1rem;
line-height: 1.65;
color: var(--fg);
font-weight: 400;
}
.sidepanel .close {
position: absolute;
top: 0.9rem;
right: 0.9rem;
background: var(--panel);
color: var(--fg);
font-size: 1.4rem;
line-height: 1;
padding: 0.2rem 0.55rem;
border: 1px solid var(--border);
cursor: pointer;
font-weight: 700;
font-family: var(--mono);
}
.sidepanel .close:hover { background: var(--fg); color: var(--bg); }
.sidepanel .meta {
text-transform: uppercase;
letter-spacing: 0.11em;
font-family: var(--mono);
font-size: 0.74rem;
color: var(--accent);
font-weight: 700;
margin-bottom: 0.45rem;
}
.sidepanel h3 { margin: 0.5rem 0 0.45rem 0; font-size: 1.3rem; color: var(--fg); font-weight: 700; line-height: 1.25; }
.sidepanel .short { color: var(--muted); margin: 0 0 1.1rem 0; font-size: 0.98rem; font-style: italic; }
.sidepanel .body p { margin: 0 0 0.95rem 0; color: var(--fg); font-size: 0.96rem; }
.sidepanel .body strong { color: var(--fg); font-weight: 700; }
.sidepanel .body em { color: var(--fg-soft); }
.sidepanel .body code {
background: var(--panel-alt);
border: 1px solid var(--border);
padding: 0.05rem 0.35rem;
font-size: 0.9em;
font-family: var(--mono);
color: var(--fg);
}
.sidepanel .related, .sidepanel .sources { margin-top: 1.2rem; }
.sidepanel .related {
display: flex;
align-items: center;
gap: 0.45rem;
flex-wrap: wrap;
}
.sidepanel .related .kv,
.sidepanel .sources .kv {
font-family: var(--mono);
font-size: 0.76rem;
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 700;
color: var(--muted);
}
.sidepanel .sources ul {
margin: 0.45rem 0 0 0;
padding-left: 1.2rem;
color: var(--fg);
font-size: 0.9rem;
}
.sidepanel .sources li { margin: 0.22rem 0; }
.sidepanel .body a.explainer-link {
color: var(--accent);
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
font-weight: 500;
}
.sidepanel .body a.explainer-link:hover { background: var(--accent-soft); }
.consequence-list {
margin-top: 0.8rem;
padding-top: 0.7rem;
border-top: 1px dashed var(--border);
}
.consequence-head {
text-transform: uppercase;
letter-spacing: 0.07em;
font-size: 0.68rem;
font-weight: 700;
color: var(--muted);
margin-bottom: 0.4rem;
}
.consequence-line {
font-family: var(--mono);
font-size: 0.78rem;
color: var(--fg);
line-height: 1.45;
margin: 0.35rem 0;
padding: 0.45rem 0.6rem;
background: var(--accent-soft);
border-left: 2px solid var(--accent);
}
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(20, 20, 15, 0.4);
z-index: 50;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.modal {
background: var(--panel);
border: 1px solid var(--border-strong);
max-width: 960px;
width: 100%;
max-height: 88vh;
overflow: auto;
box-shadow: 8px 8px 0 var(--border-strong);
padding: 1.4rem 1.6rem 1.7rem 1.6rem;
}
.modal-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1.2rem;
}
.modal-head .meta {
text-transform: uppercase;
letter-spacing: 0.11em;
font-family: var(--mono);
font-size: 0.74rem;
color: var(--accent);
font-weight: 700;
margin-bottom: 0.3rem;
}
.modal-head h3 { margin: 0.25rem 0 0.35rem 0; font-size: 1.22rem; color: var(--fg); font-weight: 700; font-family: var(--display); line-height: 1.25; }
.modal-head .short { color: var(--muted); margin: 0; font-size: 0.92rem; }
.modal-actions { display: flex; align-items: center; gap: 0.5rem; }
.modal .close {
background: var(--panel);
color: var(--fg);
font-size: 1.4rem;
line-height: 1;
padding: 0.2rem 0.55rem;
border: 1px solid var(--border);
cursor: pointer;
font-weight: 700;
font-family: var(--mono);
}
.modal .close:hover { background: var(--fg); color: var(--bg); }
.pytorch-modal pre.code {
margin: 0;
background: var(--bg);
color: var(--fg);
padding: 1.1rem 1.2rem;
border: 1px solid var(--border);
font-family: var(--mono);
font-size: 0.84rem;
font-weight: 500;
line-height: 1.6;
overflow-x: auto;
max-height: 70vh;
}
.pytorch-modal .py-kw { color: var(--accent); font-weight: 700; }
.pytorch-modal .py-str { color: var(--good); }
.pytorch-modal .py-num { color: var(--warn); }
.pytorch-modal .py-comment { color: var(--muted); font-style: italic; }
.attn-modal { max-width: 1100px; }
.attn-formula {
background: var(--panel-alt);
border: 1px solid var(--border);
padding: 0.65rem 0.85rem;
margin: 0 0 1rem 0;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.attn-formula code {
font-family: var(--mono);
font-size: 0.92rem;
font-weight: 600;
color: var(--fg);
background: transparent;
border: 0;
padding: 0;
}
.attn-formula span {
font-family: var(--display);
font-size: 0.86rem;
color: var(--muted);
}
.attn-grid-wrap { overflow: auto; max-width: 100%; padding: 0.3rem 0; margin-bottom: 0.85rem; }
.attn-modal .empty { color: var(--fg); font-size: 0.92rem; font-family: var(--mono); }
.attn-modal text.attn-axis-l {
font-family: "JetBrains Mono", monospace;
font-size: 10px;
fill: var(--muted);
font-weight: 600;
letter-spacing: 0.04em;
}
.attn-modal text.attn-tick {
font-family: "JetBrains Mono", monospace;
font-size: 10px;
fill: var(--muted);
font-weight: 500;
}
.attn-modal text.attn-rowlabel {
font-family: "JetBrains Mono", monospace;
font-size: 11px;
fill: var(--fg);
font-weight: 500;
}
.attn-modal text.attn-rowlabel.sel { fill: var(--accent); font-weight: 700; }
.attn-modal text.attn-rowlabel.live { fill: #c2410c; font-weight: 700; }
.attn-modal text.attn-rowidx { fill: var(--muted); font-size: 10px; }
.attn-modal text.attn-tick-focus { fill: var(--accent); font-weight: 700; }
.attn-live-tag {
display: inline-block;
margin-left: 0.55rem;
padding: 0.06rem 0.4rem;
background: #fde7d6;
border: 1px solid #c2410c;
color: #c2410c;
font-family: var(--mono);
font-size: 0.65rem;
letter-spacing: 0.05em;
text-transform: uppercase;
font-weight: 700;
}
.attn-modal rect.attn-cell {
shape-rendering: crispEdges;
}
.attn-modal rect.attn-cell.allowed { fill: #e0e7ff; stroke: #c7d2fe; stroke-width: 1; }
.attn-modal rect.attn-cell.masked { fill: #f7f5ef; stroke: #d8d4c8; stroke-width: 1; }
.attn-modal rect.attn-cell.diag { fill: #1e40af; stroke: #1e40af; }
.attn-modal rect.attn-cell.in-focus { fill: #1e40af; stroke: #1e40af; }
.attn-modal rect.attn-cell.dim { opacity: 0.28; }
.attn-modal rect.attn-cell.live-diag { fill: #c2410c; stroke: #c2410c; }
.attn-modal rect.attn-rowband {
fill: transparent;
stroke: transparent;
pointer-events: all;
transition: fill 120ms ease;
}
.attn-modal rect.attn-rowband-focus { fill: rgba(30, 64, 175, 0.06); }
.attn-modal rect.attn-rowband-active { fill: rgba(194, 65, 12, 0.08); }
.attn-modal rect.attn-rowband-dim { fill: transparent; }
.attn-legend .sw-live { background: #fb923c; border-color: #c2410c; }
.attn-legend {
display: flex;
flex-wrap: wrap;
gap: 1rem;
font-family: var(--mono);
font-size: 0.78rem;
color: var(--muted);
margin-bottom: 0.7rem;
}
.attn-legend .sw { display: inline-block; width: 12px; height: 12px; vertical-align: middle; margin-right: 0.3rem; border: 1px solid; }
.attn-legend .sw-self { background: var(--accent); border-color: var(--accent); }
.attn-legend .sw-allowed { background: var(--accent-soft); border-color: #c7d2fe; }
.attn-legend .sw-masked { background: var(--bg); border-color: var(--border); }
.attn-readout {
margin-top: 0.5rem;
padding: 0.7rem 0.85rem;
background: var(--panel-alt);
border: 1px solid var(--border);
font-family: var(--mono);
font-size: 0.86rem;
color: var(--fg);
word-break: break-all;
font-weight: 500;
}
.attn-readout code {
background: var(--accent-soft);
border: 1px solid var(--accent);
padding: 0.05rem 0.35rem;
font-size: 0.86rem;
color: var(--fg);
font-weight: 600;
}
.attn-readout .attn-hint { color: var(--muted); font-style: italic; }
.attn-readout .muted { color: var(--muted); }
.attn-truncate {
margin: 0.5rem 0 0 0;
font-family: var(--mono);
font-size: 0.78rem;
color: var(--muted);
}
:root {
--bg: #f7f5ef;
--panel: #ffffff;
--panel-alt: #efece4;
--canvas: #f7f5ef;
--border: #d8d4c8;
--border-strong: #1a1a1a;
--fg: #14140f;
--fg-soft: #3a3a32;
--muted: #6a6a60;
--accent: #1e40af;
--accent-soft: #e0e7ff;
--highlight: #fde68a;
--info: #1d4ed8;
--good: #047857;
--warn: #b45309;
--bad: #991b1b;
--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
--display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
--pad: clamp(0.8rem, 1.3vw, 1.4rem);
--dia-fixed: #ffffff;
--dia-swap: #e0e7ff;
--dia-swap-dim: #f7f5ef;
--dia-stroke: #14140f;
--dia-text: #14140f;
--dia-text-sub: #3a3a32;
--dia-residual: #14140f;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family: var(--display);
font-size: clamp(14px, 0.95vw, 16px);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow: hidden;
}
.app {
height: 100vh;
display: grid;
grid-template-columns: 1fr clamp(300px, 22vw, 400px);
grid-template-rows: auto minmax(0, 1fr);
overflow: hidden;
--bottom-h: 30em;
}
@media (max-width: 1599px) {
.app { grid-template-columns: 1fr clamp(290px, 22vw, 380px); --bottom-h: 28em; }
}
@media (max-width: 1279px) {
.app { grid-template-columns: 1fr clamp(270px, 24vw, 340px); --bottom-h: 24em; }
}
@media (min-width: 1024px) and (orientation: portrait) {
.workspace { grid-template-rows: auto minmax(0, 1fr); }
.canvas-panel { flex: 0 0 auto; }
.canvas-panel .diagram-wrap { aspect-ratio: 5 / 1; max-height: 22em; }
.bottom-row {
height: auto;
--bottom-h: auto;
grid-template-columns: 1fr;
grid-auto-rows: 1fr;
}
.bottom-row > .panel,
.bottom-row > .diagnostics-col { height: 100%; min-height: 0; }
}
@media (max-width: 1023px) {
html, body { overflow: auto; }
.app { height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; --bottom-h: auto; }
.sidebar { grid-column: 1 ; grid-row: 2 ; border-left: 0 ; border-bottom: 1px solid var(--border-strong); height: auto ; overflow: visible ; }
.sidebar .panel.collapsible.is-open,
.diagnostics-col .panel.collapsible.is-open { flex: 0 0 auto; min-height: 0; }
.sidebar .panel.collapsible > .panel-body,
.diagnostics-col .panel.collapsible > .panel-body { overflow: visible; }
.diagnostics-col { overflow: visible; height: auto; }
.workspace { grid-row: 3 ; height: auto ; overflow: visible ; }
.canvas-panel .diagram-wrap {
overflow-x: auto;
overflow-y: hidden;
justify-content: flex-start;
min-height: 0;
}
.canvas-panel svg.diagram {
width: 720px;
min-width: 720px;
height: 9rem;
max-width: none;
max-height: none;
flex-shrink: 0;
}