restockiq / app /static /style.css
RV302001's picture
UI v2 (self-explanatory) + API tests + caching + lifespan
0b9787b
Raw
History Blame Contribute Delete
9.72 kB
/* RestockIQ v2 — flat editorial ledger. No gradients, no grain, no gimmicks:
solid warm ink, hairline rules, Fraunces display, Plex Mono numerals. */
:root {
--bg: #121008;
--panel: #1a160c;
--panel-raise: #201a0e;
--line: #352c18;
--line-soft: rgba(53, 44, 24, 0.55);
--ink: #efe6d0;
--muted: #a3946f;
--amber: #f5a623;
--amber-deep: #b97c10;
--green: #8fd694;
--red: #ff7a5c;
--band: rgba(245, 166, 35, 0.16);
--serif: "Fraunces", Georgia, serif;
--sans: "IBM Plex Sans", sans-serif;
--mono: "IBM Plex Mono", monospace;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: var(--sans);
font-size: 15px;
line-height: 1.55;
}
a { color: var(--amber); }
/* ============ top bar ============ */
.topbar {
display: flex; justify-content: space-between; align-items: center;
max-width: 1200px; margin: 0 auto; padding: 1.6rem 2rem 0;
}
.wordmark { font-family: var(--serif); font-weight: 900; font-size: 1.5rem; letter-spacing: -0.02em; }
.wordmark span { color: var(--amber); }
.apilink { font-size: 0.8rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 0.3rem 0.7rem; border-radius: 6px; }
.apilink:hover { color: var(--amber); border-color: var(--amber-deep); }
/* ============ hero ============ */
.hero {
max-width: 1200px; margin: 0 auto; padding: 3rem 2rem 2.2rem;
border-bottom: 1px solid var(--line-soft);
}
.hero h1 {
font-family: var(--serif); font-weight: 900;
font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02;
letter-spacing: -0.02em; margin: 0 0 1.1rem;
}
.hero-sub { max-width: 62ch; color: var(--muted); font-size: 1.05rem; margin: 0 0 1.4rem; }
.hero-sub b { color: var(--ink); }
.hero-steps {
display: flex; gap: 2.2rem; flex-wrap: wrap;
list-style: none; counter-reset: step; margin: 0; padding: 0;
}
.hero-steps li {
counter-increment: step; color: var(--muted); font-size: 0.92rem;
display: flex; align-items: center; gap: 0.6rem;
}
.hero-steps li::before {
content: counter(step);
font-family: var(--mono); font-weight: 700; color: var(--amber);
border: 1px solid var(--amber-deep); border-radius: 50%;
width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: 0.85rem;
}
.hero-steps b { color: var(--ink); }
main { padding: 1.6rem 2rem 2rem; display: flex; flex-direction: column; gap: 1.1rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
padding: 1.3rem 1.5rem;
}
.eyebrow {
margin: 0 0 0.9rem;
font-family: var(--serif); font-weight: 600; font-size: 1.2rem;
color: var(--amber);
}
/* ============ controls ============ */
.controls { display: flex; gap: 1.8rem; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
font-size: 0.72rem; color: var(--muted);
text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600;
}
select, input[type="number"] {
background: var(--bg); color: var(--ink);
border: 1px solid var(--line); border-radius: 8px;
padding: 0.55rem 0.7rem; font: 500 0.95rem var(--sans);
min-width: 8rem;
}
select { -webkit-appearance: none; appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a3946f'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 0.7rem center; padding-right: 2rem; }
select:focus, input:focus { outline: 2px solid var(--amber-deep); outline-offset: 1px; }
select#item { min-width: 14rem; }
/* custom stepper: hide native spinners, themed +/- buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.stepper { display: flex; align-items: stretch; }
.stepper input { border-radius: 0; text-align: center; min-width: 4.5rem; width: 4.5rem; border-left: none; border-right: none; font-family: var(--mono); }
.stepper button {
width: 2.2rem; background: var(--panel-raise); color: var(--muted);
border: 1px solid var(--line); cursor: pointer; font: 700 1rem var(--mono);
transition: color 0.12s, background 0.12s;
}
.stepper button:hover { color: var(--amber); background: var(--panel); }
.stepper button:first-child { border-radius: 8px 0 0 8px; }
.stepper button:last-child { border-radius: 0 8px 8px 0; }
.whatis {
all: unset; cursor: help; display: inline-grid; place-items: center;
width: 1rem; height: 1rem; border-radius: 50%;
border: 1px solid var(--muted); color: var(--muted);
font-size: 0.65rem; margin-left: 0.25rem; position: relative; vertical-align: 1px;
}
.whatis:hover::after {
content: attr(data-tip);
position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
width: 250px; padding: 0.6rem 0.75rem;
background: #0b0904; border: 1px solid var(--line); border-radius: 8px;
color: var(--ink); font: 400 0.78rem/1.45 var(--sans); text-transform: none;
letter-spacing: normal; z-index: 50;
}
/* ============ answer + chart ============ */
.duo { display: grid; grid-template-columns: minmax(330px, 2fr) 3fr; gap: 1.1rem; }
@media (max-width: 980px) { .duo { grid-template-columns: 1fr; } }
.chip {
display: inline-block; padding: 0.32rem 0.9rem; border-radius: 999px;
font: 600 0.78rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
border: 1px solid transparent; margin-bottom: 0.7rem;
}
.chip.red { background: rgba(255,122,92,0.12); color: var(--red); border-color: rgba(255,122,92,0.45); }
.chip.amber { background: rgba(245,166,35,0.1); color: var(--amber); border-color: rgba(245,166,35,0.4); }
.chip.green { background: rgba(143,214,148,0.1); color: var(--green); border-color: rgba(143,214,148,0.4); }
.bignum {
font-family: var(--mono); font-weight: 700;
font-size: clamp(3.2rem, 6vw, 4.6rem); line-height: 1;
display: flex; align-items: baseline; gap: 0.7rem;
font-variant-numeric: tabular-nums;
}
.bignum .unit { font: 500 0.95rem var(--sans); color: var(--muted); }
.verdict { font-family: var(--serif); font-size: 1.1rem; margin: 0.8rem 0 1rem; }
.mathrow {
display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
border-top: 1px dashed var(--line); padding-top: 0.9rem;
}
.mathbit { display: flex; flex-direction: column; min-width: 5.2rem; }
.mval { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; }
.mlab { color: var(--muted); font-size: 0.72rem; line-height: 1.3; max-width: 9rem; }
.mathop { font-family: var(--mono); color: var(--amber); font-size: 1.2rem; }
.nerd { margin-top: 1.1rem; }
.nerd summary { cursor: pointer; color: var(--amber-deep); font-size: 0.85rem; }
.nerd p { color: var(--muted); font-size: 0.85rem; }
.nerd b { font-family: var(--mono); color: var(--ink); font-weight: 700; }
.chartcard { display: flex; flex-direction: column; }
.chartwrap { position: relative; flex: 1; min-height: 300px; }
.chart-read { color: var(--muted); font-size: 0.85rem; margin: 0.9rem 0 0; border-top: 1px dashed var(--line); padding-top: 0.8rem; }
.chart-read b { color: var(--ink); }
.c-amber { color: var(--amber); }
.c-band { background: var(--band); border: 1px solid rgba(245,166,35,0.35); border-radius: 3px; padding: 0 0.3rem; }
/* ============ action list ============ */
.lede { color: var(--muted); margin: 0 0 0.9rem; max-width: 75ch; }
.lede b { color: var(--ink); }
.assume { font-size: 0.82rem; }
.counts { display: flex; gap: 0.7rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.countpill { font: 600 0.8rem var(--sans); padding: 0.28rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.countpill b { font-family: var(--mono); }
.countpill.red b { color: var(--red); } .countpill.amber b { color: var(--amber); } .countpill.green b { color: var(--green); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); }
td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-weight: 500; }
tbody tr { transition: background 0.12s; cursor: pointer; }
tbody tr:hover { background: rgba(245,166,35,0.05); }
.dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.45rem; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.green { background: var(--green); }
/* ============ proof ============ */
.proofgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.prooftile { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; background: var(--panel-raise); }
.prooftile h3 { margin: 0 0 0.3rem; font: 600 0.75rem var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.prooftile .val { font-family: var(--mono); font-weight: 700; font-size: 1.9rem; }
.prooftile .val.good { color: var(--green); }
.prooftile .sub { color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; }
.prooftile.winner { border-color: rgba(143,214,148,0.45); }
.footnote { color: var(--muted); font-size: 0.8rem; margin: 0.9rem 0 0; }
footer { padding: 0 2rem 2.5rem; max-width: 1200px; margin: 0 auto; }
footer p { color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }