Files
hemx/examples/workout/templates/workout.css
T
slhx agent 189bdf5eea feat(examples): polish workout phone UI
Give the workout exemplar a durable gym-floor command-slate direction, serve focused CSS, keep the first viewport centered on one action, and extend the HTTP E2E to verify stylesheet delivery.

req: examples/001

req: local/001

req: local/003

req: host/002
2026-06-11 22:03:18 +02:00

218 lines
4.5 KiB
CSS

@layer tokens, base, composition, blocks;
@layer tokens {
:root {
color-scheme: dark;
--surface: #11130f;
--surface-2: #171a14;
--ink: #f7f3e8;
--muted: #aaa38f;
--line: #35392d;
--accent: #d7ff4f;
--accent-ink: #172100;
--warn: #ffba52;
--shadow: 0 18px 70px rgb(0 0 0 / 0.38);
--radius: 24px;
--space: clamp(1rem, 4vw, 1.6rem);
--tap: 3.35rem;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
}
@layer base {
* { box-sizing: border-box; }
html { background: var(--surface); }
body {
margin: 0;
min-height: 100svh;
color: var(--ink);
background:
linear-gradient(135deg, rgb(215 255 79 / 0.09), transparent 34rem),
radial-gradient(circle at 50% -14rem, rgb(255 186 82 / 0.18), transparent 28rem),
var(--surface);
}
button,
input {
font: inherit;
}
button {
min-height: var(--tap);
border: 1px solid var(--line);
border-radius: 999px;
padding: 0.85rem 1.1rem;
color: var(--ink);
background: var(--surface-2);
font-weight: 800;
letter-spacing: -0.01em;
}
button:focus-visible,
input:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 3px;
}
input {
min-width: 0;
width: 100%;
border: 1px solid var(--line);
border-radius: 16px;
padding: 0.8rem 0.9rem;
color: var(--ink);
background: #0c0e0b;
}
h1,
h2,
h3,
p {
margin-block: 0;
}
pre {
margin: 0;
overflow: auto;
white-space: pre-wrap;
font: 0.86rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
}
@layer composition {
.workout-app {
width: min(100%, 31rem);
margin-inline: auto;
padding: var(--space);
display: grid;
gap: 0.9rem;
}
.command-slate,
.action-rail,
.ledger,
.host-boundary {
border: 1px solid var(--line);
border-radius: var(--radius);
background: rgb(23 26 20 / 0.92);
box-shadow: var(--shadow);
}
}
@layer blocks {
.command-slate {
min-height: 42svh;
padding: clamp(1.2rem, 8vw, 2.3rem);
display: flex;
flex-direction: column;
justify-content: end;
gap: 1rem;
background:
linear-gradient(180deg, transparent, rgb(0 0 0 / 0.22)),
repeating-linear-gradient(90deg, rgb(215 255 79 / 0.08) 0 1px, transparent 1px 18px),
#181c12;
}
.eyebrow {
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.16em;
font-size: 0.78rem;
font-weight: 900;
}
.command-slate h1 {
max-width: 12ch;
font-size: clamp(2.3rem, 14vw, 4.4rem);
line-height: 0.92;
letter-spacing: -0.08em;
}
.proofline {
color: var(--muted);
font-weight: 750;
}
.action-rail {
position: sticky;
top: 0.6rem;
z-index: 1;
padding: 0.7rem;
display: grid;
gap: 0.6rem;
}
.primary-action {
color: var(--accent-ink);
background: var(--accent);
border-color: var(--accent);
font-size: 1.08rem;
}
.quiet-action {
color: var(--muted);
}
.micro-form,
.voice-strip {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.55rem;
align-items: end;
}
.micro-form label,
.voice-strip label {
display: grid;
gap: 0.35rem;
color: var(--muted);
font-size: 0.78rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.ledger,
.host-boundary {
padding: 1rem;
display: grid;
gap: 0.85rem;
}
.section-heading {
display: flex;
gap: 0.75rem;
align-items: center;
justify-content: space-between;
}
.ledger h2,
.host-boundary h2 {
font-size: 1rem;
letter-spacing: -0.03em;
}
.ledger h3 {
color: var(--muted);
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.1em;
}
.ledger pre {
border-left: 3px solid var(--accent);
padding: 0.75rem 0.9rem;
background: #0c0e0b;
}
.host-boundary {
border-style: dashed;
}
.host-boundary p {
color: var(--muted);
}
.host-actions {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.55rem;
}
@media (min-width: 46rem) {
.workout-app {
width: min(100%, 64rem);
grid-template-columns: minmax(20rem, 1.08fr) minmax(20rem, 0.92fr);
align-items: start;
}
.command-slate,
.action-rail {
grid-column: 1;
}
.ledger,
.host-boundary {
grid-column: 2;
}
.action-rail {
position: static;
}
}
}