ready-to-submit / frontend /styles.css
marinarosa's picture
Render markdown tables and stop truncating reviews
242a770
Raw
History Blame Contribute Delete
12.6 kB
/* ============================================================
Submit Eval — pastel-pink re-skin of the Build Small
woodblock-press design language: paper grain, mono eyebrows,
stamp badges, soft press shadows. Calm, friendly, legible.
============================================================ */
@font-face {
font-family: "Archivo";
src: url("/static/fonts/archivo-var.woff2") format("woff2");
font-weight: 100 900;
font-display: swap;
}
@font-face {
font-family: "Spline Sans Mono";
src: url("/static/fonts/spline-sans-mono-var.woff2") format("woff2");
font-weight: 300 700;
font-display: swap;
}
:root {
/* pink paper */
--paper: #fdf4f7;
--paper-2: #fbeaf0;
--blush: #f6d9e4;
--blush-deep: #eec3d4;
--line: #e9c8d5;
/* warm soft ink */
--ink: #4a3a42;
--ink-2: #6b5560;
--ink-soft: rgba(74, 58, 66, 0.62);
--ink-faint: rgba(74, 58, 66, 0.38);
/* pastel accents — matched chroma, varied hue */
--rose: #d97aa6;
--rose-deep:#c25e8c;
--mint: #7fbf9e;
--mint-deep:#5fa583;
--butter: #e6b566;
--butter-deep:#d09c47;
--lilac: #a48ed1;
--lilac-deep:#8a71bd;
--font-display: "Archivo", system-ui, sans-serif;
--font-body: "Archivo", system-ui, sans-serif;
--font-mono: "Spline Sans Mono", ui-monospace, monospace;
--radius: 14px;
--radius-sm: 9px;
--press: 4px 4px 0 rgba(74, 58, 66, 0.16);
--press-sm: 2px 2px 0 rgba(74, 58, 66, 0.16);
--maxw: 880px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: var(--font-body);
font-size: 16.5px;
background: var(--paper);
color: var(--ink);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* soft paper grain, straight from the field guide */
body::before {
content: "";
position: fixed; inset: 0;
pointer-events: none; z-index: 0;
opacity: 0.5;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
::selection { background: var(--rose); color: #fff; }
a { color: var(--rose-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
code {
font-family: var(--font-mono);
font-size: 0.86em;
background: var(--paper-2);
border: 1px solid var(--line);
border-radius: 5px;
padding: 0.08em 0.38em;
white-space: nowrap;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.06; }
.display {
font-weight: 800;
font-stretch: 115%;
letter-spacing: -0.015em;
}
.eyebrow {
display: block;
font-family: var(--font-mono);
font-size: 12px;
font-weight: 500;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--rose-deep);
margin-bottom: 10px;
}
.mono { font-family: var(--font-mono); font-size: 0.85em; color: var(--ink-soft); }
/* ---------- layout ---------- */
.page {
position: relative; z-index: 1;
max-width: var(--maxw);
margin: 0 auto;
padding: 56px 24px 40px;
display: flex; flex-direction: column; gap: 26px;
}
/* ---------- hero ---------- */
.hero { display: flex; gap: 26px; align-items: center; }
.hero h1 { font-size: clamp(40px, 7vw, 58px); }
.hero__lede { margin: 10px 0 0; max-width: 56ch; color: var(--ink-2); }
.hero__stamp { flex: none; animation: drift 9s ease-in-out infinite; }
.hero__disc { fill: var(--rose); }
.hero__ring { stroke: var(--ink); opacity: 0.55; }
.hero__inner { stroke: var(--paper); opacity: 0.85; }
@keyframes drift { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
/* ---------- cards ---------- */
.card {
background: #fff;
border: 2px solid var(--ink);
border-radius: var(--radius);
box-shadow: var(--press);
padding: 26px 28px 28px;
}
.card__head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.card__head h2 { font-size: 26px; font-weight: 750; }
.card__lede { margin: 6px 0 0; color: var(--ink-2); }
.card__sub { margin: 4px 0 0; }
/* ---------- form ---------- */
.card--form { background: var(--paper-2); }
.form__row { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.field--grow { flex: 1; }
.field__label {
font-family: var(--font-mono);
font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
color: var(--ink-soft);
}
select, input[type="text"] {
font: inherit; color: var(--ink);
background: #fff;
border: 2px solid var(--ink);
border-radius: var(--radius-sm);
padding: 10px 12px;
box-shadow: var(--press-sm);
}
select:focus-visible, input:focus-visible, button:focus-visible {
outline: 3px solid var(--rose);
outline-offset: 2px;
}
.form__hint {
margin: 14px 0 0; font-size: 14px; color: var(--ink-soft);
display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.form__hint input { flex: 1; min-width: 180px; box-shadow: none; border-width: 1.5px; padding: 7px 10px; }
.btn {
font: inherit; font-weight: 700;
color: #fff; background: var(--rose);
border: 2px solid var(--ink);
border-radius: var(--radius-sm);
padding: 11px 22px;
cursor: pointer;
box-shadow: var(--press);
transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--rose-deep); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 rgba(0,0,0,0); }
/* ---------- loading indicator ---------- */
.loading {
display: none;
align-items: center; gap: 14px;
padding: 6px 4px;
color: var(--ink-soft);
font-family: var(--font-mono); font-size: 14px;
}
.loading.htmx-request { display: flex; }
.loading__stamp {
width: 30px; height: 30px; flex: none;
border-radius: 50%;
background: var(--rose);
border: 2px dashed var(--paper);
outline: 2px solid var(--ink);
animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* hide the steps while a new check request is in flight */
#results { display: flex; flex-direction: column; gap: 26px; }
.htmx-request + #results { opacity: 0.35; }
/* ---------- stamp badges ---------- */
.stamp { position: relative; display: inline-grid; place-items: center; flex: none;
width: var(--stamp-size); height: var(--stamp-size); }
.stamp svg, .stamp__face { grid-area: 1 / 1; }
.stamp__face { display: grid; place-items: center; color: var(--paper); }
.stamp__ring { stroke: var(--ink); opacity: 0.5; }
.stamp__inner { stroke: var(--paper); opacity: 0.85; }
.stamp--rose .stamp__disc { fill: var(--rose); }
.stamp--mint .stamp__disc { fill: var(--mint); }
.stamp--butter .stamp__disc { fill: var(--butter); }
.stamp--lilac .stamp__disc { fill: var(--lilac); }
.stamp--spin { animation: drift 7s ease-in-out infinite; }
/* ---------- checklist ---------- */
.checks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check {
display: flex; gap: 12px; align-items: flex-start;
background: var(--paper);
border: 1.5px solid var(--line);
border-radius: var(--radius-sm);
padding: 12px 14px;
}
.check__mark {
flex: none; display: grid; place-items: center;
width: 26px; height: 26px; margin-top: 2px;
border-radius: 50%;
border: 2px solid var(--ink);
color: #fff;
}
.check--ok .check__mark { background: var(--mint); }
.check--warn .check__mark { background: var(--butter); }
.check--fix .check__mark { background: var(--rose); }
.check__body { min-width: 0; }
.check__top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.check__label {
font-family: var(--font-mono); font-size: 11px;
letter-spacing: 0.1em; text-transform: uppercase;
padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--ink);
color: var(--ink);
}
.check--ok .check__label { background: color-mix(in srgb, var(--mint) 35%, white); }
.check--warn .check__label { background: color-mix(in srgb, var(--butter) 40%, white); }
.check--fix .check__label { background: color-mix(in srgb, var(--rose) 30%, white); }
.check__evidence { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }
/* ---------- tag chips ---------- */
.chips { margin-top: 24px; }
.chips__row { display: flex; gap: 12px; flex-wrap: wrap; }
.chips__none { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.chip {
display: inline-flex; gap: 10px; align-items: center;
background: var(--paper);
border: 1.5px solid var(--line);
border-radius: 999px;
padding: 6px 16px 6px 8px;
}
.chip__text { display: flex; flex-direction: column; line-height: 1.25; }
.chip__text strong { font-size: 14px; }
.chip__text code { border: 0; background: none; padding: 0; font-size: 11.5px; color: var(--ink-soft); }
/* ---------- opportunities ---------- */
.opps { margin-top: 24px; background: color-mix(in srgb, var(--lilac) 12%, white);
border: 1.5px dashed var(--lilac-deep); border-radius: var(--radius-sm); padding: 16px 18px; }
.opps__lede { margin: 0 0 8px; font-size: 14.5px; color: var(--ink-2); }
.opps__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.opps__list li { display: flex; gap: 9px; align-items: baseline; font-size: 14.5px; }
.opps__list .ic { flex: none; color: var(--lilac-deep); transform: translateY(2px); }
/* ---------- review block ---------- */
.card--review { background: #fff; }
.review__body { margin-top: 6px; font-size: 15.5px; }
.review__body h2, .review__body h3 { font-size: 19px; margin: 22px 0 8px; }
.review__body h2:first-child, .review__body h3:first-child { margin-top: 4px; }
.review__body ul { padding-left: 22px; margin: 8px 0; }
.review__body li { margin: 4px 0; }
.review__body[data-state="streaming"] { border-left: 3px solid var(--lilac); padding-left: 16px; }
.review__body table {
width: 100%;
border-collapse: collapse;
margin: 12px 0;
font-size: 14px;
}
.review__body th, .review__body td {
border: 1.5px solid var(--line);
padding: 8px 10px;
text-align: left;
vertical-align: top;
}
.review__body th {
background: var(--blush);
font-family: var(--font-mono);
font-size: 11.5px;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.review__body tr:nth-child(even) td { background: var(--paper); }
.review__body table code { white-space: normal; overflow-wrap: anywhere; }
#step-review[data-state="done"] .stamp--spin { animation: none; }
.shimmer {
height: 15px; border-radius: 999px; margin: 12px 0;
background: linear-gradient(90deg, var(--blush) 25%, var(--paper-2) 50%, var(--blush) 75%);
background-size: 200% 100%;
animation: shimmer 1.6s ease-in-out infinite;
}
.shimmer--short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.disclaimer {
margin: 22px 0 0;
font-size: 13.5px; color: var(--ink-soft);
border-top: 1.5px dashed var(--line);
padding-top: 14px;
display: flex; gap: 8px; align-items: baseline;
}
.disclaimer .ic { flex: none; color: var(--butter-deep); transform: translateY(2px); }
/* ---------- floating next-step cue ---------- */
.next-cue {
position: fixed;
left: 50%; bottom: 26px;
transform: translateX(-50%);
z-index: 10;
display: grid; place-items: center;
width: 46px; height: 46px;
color: #fff; background: var(--rose);
border: 2px solid var(--ink);
border-radius: 50%;
outline: 2px dashed var(--paper);
outline-offset: -6px;
box-shadow: var(--press);
cursor: pointer;
animation: bounce 1.5s ease-in-out infinite;
}
.next-cue:hover { background: var(--rose-deep); }
@keyframes bounce {
0%, 100% { transform: translateX(-50%) translateY(0); }
50% { transform: translateX(-50%) translateY(7px); }
}
/* ---------- error card tone ---------- */
.card--fix { border-color: var(--rose-deep); }
/* ---------- footer ---------- */
.footer { text-align: center; font-size: 13px; color: var(--ink-soft); padding-bottom: 18px; }
/* ---------- small screens ---------- */
@media (max-width: 640px) {
.hero { flex-direction: column; align-items: flex-start; gap: 14px; }
.form__row { flex-direction: column; align-items: stretch; }
.card { padding: 20px 18px 22px; }
}
@media (prefers-reduced-motion: reduce) {
.hero__stamp, .stamp--spin, .loading__stamp, .shimmer { animation: none; }
}