yoi/web/workspace/src/app.css

819 lines
16 KiB
CSS

@layer reset, tokens, base, layout, components;
@layer reset {
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
}
button,
input,
textarea,
select {
font: inherit;
}
}
@layer tokens {
:root {
color-scheme: light dark;
/* Palette rule: layout/background neutrals use zero chroma. */
--bg: oklch(98.5% 0 0);
--bg-raised: oklch(96% 0 0);
--bg-subtle: oklch(93% 0 0);
--line: oklch(82% 0 0);
--line-strong: oklch(70% 0 0);
/* Text is near-neutral warm: OKLCH C is kept around 0.01, roughly a 5% saturation intent. */
--text: oklch(30% 0.012 75);
--text-strong: oklch(22% 0.012 75);
--text-muted: oklch(50% 0.01 75);
--text-faint: oklch(62% 0.008 75);
--code: oklch(34% 0.012 75);
--accent: oklch(54% 0.13 230);
--accent-muted: oklch(54% 0.08 230);
--success: oklch(48% 0.11 145);
--warning: oklch(62% 0.12 85);
--danger: oklch(54% 0.14 25);
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 24px;
--space-6: 32px;
--radius-soft: 8px;
--radius-panel: 12px;
--interactive-hover: color-mix(in oklch, var(--bg-subtle) 88%, white 12%);
--interactive-selected: color-mix(in oklch, var(--bg-subtle) 88%, var(--accent) 12%);
--font-sans:
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
--font-mono:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: oklch(16% 0 0);
--bg-raised: oklch(21% 0 0);
--bg-subtle: oklch(26% 0 0);
--line: oklch(36% 0 0);
--line-strong: oklch(48% 0 0);
--text: oklch(87% 0.012 75);
--text-strong: oklch(95% 0.01 75);
--text-muted: oklch(70% 0.01 75);
--text-faint: oklch(58% 0.008 75);
--code: oklch(84% 0.012 75);
--accent: oklch(76% 0.12 230);
--accent-muted: oklch(71% 0.08 230);
--success: oklch(77% 0.12 145);
--warning: oklch(82% 0.13 85);
--danger: oklch(76% 0.14 25);
}
}
}
@layer base {
body {
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
}
a {
color: var(--accent);
}
h1,
h2,
h3,
p,
li,
dd {
overflow-wrap: anywhere;
}
h1,
h2,
h3 {
color: var(--text-strong);
margin-top: 0;
}
p {
line-height: 1.55;
}
code,
pre {
font-family: var(--font-mono);
}
code {
color: var(--code);
}
small {
color: var(--text-muted);
display: block;
margin-top: var(--space-1);
}
}
@layer layout {
.workspace-layout {
display: grid;
grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
width: 100vw;
height: 100dvh;
margin: 0;
padding: 0;
overflow: hidden;
min-width: 0;
}
.shell {
display: flex;
flex-direction: column;
gap: var(--space-6);
min-width: 0;
min-height: 0;
overflow-y: auto;
padding: var(--space-6);
}
.grid {
display: grid;
gap: var(--space-5);
grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
min-width: 0;
}
.runtime {
grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}
.stack {
display: grid;
gap: var(--space-4);
}
@media (max-width: 760px) {
.workspace-layout {
grid-template-columns: 1fr;
width: 100vw;
height: auto;
min-height: 100dvh;
overflow: visible;
}
.shell {
overflow: visible;
padding: var(--space-5) var(--space-4);
}
}
}
@layer components {
.workspace-sidebar {
align-self: stretch;
min-width: 0;
min-height: 0;
overflow-y: auto;
padding: var(--space-6) var(--space-5);
}
.sidebar-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--space-4);
margin-bottom: var(--space-6);
min-width: 0;
}
.workspace-label {
display: grid;
gap: var(--space-1);
min-width: 0;
}
.workspace-sidebar h1 {
margin: 0;
font-size: 1.05rem;
line-height: 1.25;
}
.workspace-status {
margin: 0;
color: var(--text-muted);
font-size: 0.78rem;
line-height: 1.35;
}
.workspace-status.error,
.section-state.error,
.error {
color: var(--danger);
}
.settings-button {
flex: 0 0 auto;
display: grid;
place-items: center;
width: 32px;
height: 32px;
border: 0;
border-radius: var(--radius-soft);
background: var(--bg-subtle);
color: var(--text-muted);
cursor: not-allowed;
}
.sidebar-sections {
display: grid;
gap: var(--space-5);
min-width: 0;
}
.nav-section {
display: grid;
gap: var(--space-2);
}
.section-heading-row,
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
}
.section-heading-row h2,
.section-header,
.eyebrow {
color: var(--text-faint);
font-size: 0.72rem;
font-weight: 750;
letter-spacing: 0.11em;
text-transform: uppercase;
}
.section-heading-row h2 {
margin: 0;
}
.eyebrow {
color: var(--accent-muted);
margin: 0;
}
.section-count {
color: var(--text-muted);
font-size: 0.72rem;
line-height: 1;
}
.nav-list {
display: grid;
gap: var(--space-1);
margin: 0;
padding: 0;
list-style: none;
}
.nav-item,
.objective-link {
display: grid;
gap: 3px;
min-width: 0;
margin-inline: calc(-1 * var(--space-2));
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-soft);
color: inherit;
text-align: left;
text-decoration: none;
transition:
background-color 140ms ease,
color 140ms ease;
}
a.nav-item:hover,
a.nav-item:focus-visible,
a.objective-link:hover,
a.objective-link:focus-visible {
background: var(--interactive-hover);
}
a.nav-item.active,
a.objective-link.active {
background: var(--interactive-selected);
}
a.nav-item.active .item-title,
a.objective-link.active .item-title {
color: var(--accent);
}
.item-title,
.item-meta {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-title {
color: var(--text-strong);
font-weight: 650;
}
.worker-nav-item {
gap: 2px;
}
.worker-title-row {
display: grid;
grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
align-items: baseline;
gap: var(--space-2);
min-width: 0;
}
.worker-task-title {
overflow: hidden;
color: var(--text-muted);
font-size: 0.82rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-meta,
.section-note,
.section-state,
.muted {
color: var(--text-muted);
font-size: 0.82rem;
}
.section-note,
.section-state {
margin: 0;
line-height: 1.45;
}
.card {
min-width: 0;
padding: 0;
}
.runtime-card {
padding: 0;
}
.objective-list {
display: flex;
flex-direction: column;
gap: var(--space-2);
margin-top: var(--space-4);
}
.objective-row {
display: grid;
grid-template-columns: minmax(0, 1fr) max-content;
align-items: start;
gap: var(--space-4);
padding: var(--space-3) var(--space-4);
border-radius: var(--radius-panel);
background: var(--bg-raised);
color: inherit;
text-decoration: none;
transition: background-color 140ms ease;
}
.objective-row:hover,
.objective-row:focus-visible {
background: var(--interactive-hover);
}
.objective-row.selected {
background: var(--interactive-selected);
}
.objective-row.selected .objective-title {
color: var(--accent);
}
.objective-main {
display: grid;
gap: var(--space-1);
min-width: 0;
}
.objective-title-row {
display: flex;
align-items: baseline;
gap: var(--space-2);
min-width: 0;
}
.objective-title {
min-width: 0;
overflow: hidden;
color: var(--text-strong);
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.state-pill {
flex: 0 0 auto;
color: var(--success);
font-size: 0.76rem;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.objective-summary {
margin: 0;
color: var(--text-muted);
font-size: 0.88rem;
line-height: 1.4;
}
.objective-meta {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: var(--space-2);
color: var(--text-faint);
font-size: 0.78rem;
line-height: 1.35;
text-align: right;
white-space: nowrap;
}
@media (max-width: 900px) {
.objective-row {
grid-template-columns: 1fr;
gap: var(--space-2);
}
.objective-meta {
justify-content: flex-start;
text-align: left;
white-space: normal;
}
}
.runtime-heading,
.detail-heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--space-3);
margin-bottom: var(--space-3);
}
.runtime-heading span {
color: var(--success);
}
.runtime-heading span.warn {
color: var(--warning);
}
.detail-heading h3 {
margin: 0;
}
.detail-heading span {
color: var(--text-muted);
font-size: 0.8rem;
}
dl {
display: grid;
gap: var(--space-1);
margin: 0;
}
dl > div {
display: grid;
grid-template-columns: minmax(6.5rem, 10rem) minmax(0, 1fr);
align-items: baseline;
gap: var(--space-3);
min-width: 0;
}
dt {
color: var(--text-faint);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
white-space: nowrap;
}
dd {
min-width: 0;
margin: 0;
}
dd small {
display: inline;
margin-top: 0;
margin-left: var(--space-2);
}
.table-wrap {
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border-bottom: 1px solid var(--line);
padding: 10px 8px;
text-align: left;
vertical-align: top;
}
th {
color: var(--text-faint);
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.diagnostics {
margin-top: var(--space-4);
}
.diagnostics li {
display: grid;
gap: var(--space-1);
margin-bottom: var(--space-3);
}
.record-body {
overflow-x: auto;
padding: var(--space-4) 0 0;
border-top: 1px solid var(--line);
color: var(--text);
white-space: pre-wrap;
}
}
.console-shell {
gap: 1rem;
}
.console-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
}
.console-status {
display: grid;
justify-items: end;
gap: 0.25rem;
min-width: 10rem;
padding: 0.75rem 0.9rem;
border-radius: 16px;
background: #ecfeff;
border: 1px solid #a5f3fc;
color: #0f766e;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
font-size: 0.78rem;
}
.console-status small {
text-transform: none;
letter-spacing: 0;
color: #475569;
font-weight: 600;
}
.console-status[data-state='busy'] {
background: #fff7ed;
border-color: #fed7aa;
color: #c2410c;
}
.console-status[data-state='error'],
.console-status[data-state='timeout'] {
background: #fef2f2;
border-color: #fecaca;
color: #b91c1c;
}
.console-status[data-state='cancelled'],
.console-status[data-state='rejected'] {
background: #f8fafc;
border-color: #cbd5e1;
color: #475569;
}
.console-transport {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
gap: 0.75rem;
}
.console-transport div {
display: grid;
gap: 0.15rem;
}
.console-transport dt {
margin: 0;
color: #64748b;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.console-transport dd {
margin: 0;
color: #0f172a;
font-weight: 700;
}
.console-transport p {
grid-column: 1 / -1;
margin: 0;
color: #475569;
line-height: 1.5;
}
.console-diagnostics {
display: grid;
gap: 0.4rem;
}
.diagnostic {
margin: 0;
padding: 0.55rem 0.7rem;
border-radius: 10px;
background: #eff6ff;
color: #1d4ed8;
font-size: 0.86rem;
}
.diagnostic.warning,
.diagnostic.warn {
background: #fff7ed;
color: #c2410c;
}
.diagnostic.error {
background: #fef2f2;
color: #b91c1c;
}
.transcript-card,
.composer-card {
display: grid;
gap: 1rem;
}
.transcript-list {
display: grid;
gap: 0.85rem;
list-style: none;
margin: 0;
padding: 0;
}
.transcript-item {
display: grid;
gap: 0.45rem;
padding: 0.85rem 1rem;
border-radius: 16px;
border: 1px solid #dbeafe;
background: #f8fafc;
}
.transcript-item.user {
margin-left: min(8vw, 4rem);
background: #eff6ff;
border-color: #bfdbfe;
}
.transcript-item.assistant {
margin-right: min(8vw, 4rem);
background: #f0fdf4;
border-color: #bbf7d0;
}
.message-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.55rem;
color: #64748b;
font-size: 0.78rem;
}
.message-meta strong {
color: #0f172a;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.message-meta time {
margin-left: auto;
}
.transcript-item p {
margin: 0;
white-space: pre-wrap;
line-height: 1.55;
color: #1f2937;
}
.empty-state {
margin: 0;
padding: 1rem;
border-radius: 14px;
background: #f8fafc;
color: #64748b;
}
.composer-card label {
font-weight: 800;
color: #0f172a;
}
.composer-card textarea {
width: 100%;
min-height: 8rem;
resize: vertical;
border: 1px solid #cbd5e1;
border-radius: 14px;
padding: 0.85rem 1rem;
font: inherit;
color: #0f172a;
background: #ffffff;
}
.composer-card textarea:disabled {
background: #f8fafc;
color: #64748b;
}
.composer-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 0.7rem;
}
.composer-actions span {
margin-right: auto;
color: #64748b;
font-size: 0.85rem;
}
.composer-actions button {
border: 0;
border-radius: 999px;
padding: 0.65rem 1rem;
background: #2563eb;
color: #ffffff;
font-weight: 800;
cursor: pointer;
}
.composer-actions button.secondary {
background: #e2e8f0;
color: #334155;
}
.composer-actions button:disabled {
cursor: not-allowed;
opacity: 0.55;
}