switchboard / style.css
switchboardllm's picture
Add savings calculator; run the router on CPU when WebGPU is missing
0f07434 verified
Raw History Blame Contribute Delete
20.3 kB
:root {
--bg: #faf9f5;
--cream: #faf7f0;
--white: #ffffff;
--ink: #1a1915;
--ink-strong: #030712;
--body: #374151;
--muted: #6b7280;
--line: #ece7da;
--amber: #f59e0b;
--orange: #ea580c;
--orange-deep: #c2410c;
--green: #2f6b4f;
--green-deep: #24543e;
--hero-top: #fbe7d6;
--code-bg: #1c1b17;
--code-ink: #f3efe4;
--focus: #ea580c;
--serif: "Fraunces", Georgia, serif;
--sans: "Inter", system-ui, -apple-system, sans-serif;
--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: var(--sans);
font-size: 16px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
/* Header */
.top {
position: sticky; top: 0; z-index: 10;
background: color-mix(in srgb, var(--bg) 82%, transparent);
backdrop-filter: blur(10px);
border-bottom: 1px solid transparent;
}
.top-inner {
max-width: 1120px; margin: 0 auto; padding: 12px 20px;
display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; font-size: 15px; }
.brand-mark { width: 22px; height: 22px; fill: var(--orange); stroke: var(--orange); stroke-width: 1.6; }
.brand-mark path { fill: none; }
.nav { display: flex; gap: 22px; margin: 0 auto; font-size: 14px; }
.nav a { text-decoration: none; color: var(--body); }
.nav a:hover { color: var(--ink-strong); }
/* Buttons */
.btn {
display: inline-flex; align-items: center; gap: 10px;
font: 600 15px/1 var(--sans);
padding: 13px 22px; border-radius: 999px; border: 0;
text-decoration: none; cursor: pointer;
transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -8px #ea580c99; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px #d8cfba; }
.tag {
font: 500 12px/1 var(--mono);
background: #ffffff22; padding: 5px 8px; border-radius: 999px;
}
/* Hero */
.hero {
background: linear-gradient(var(--hero-top), var(--cream) 62%, var(--cream));
padding: 72px 0 64px;
}
.badge {
display: inline-flex; align-items: center; gap: 8px;
margin: 0 0 22px; padding: 6px 14px;
font-size: 13px; color: var(--body);
background: #fff7e6; border: 1px solid #f6dcae; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
h1 {
margin: 0 auto;
max-width: 22ch;
text-wrap: balance;
font-family: var(--serif);
font-weight: 600;
font-size: clamp(38px, 6vw, 64px);
line-height: 1.04;
letter-spacing: -0.025em;
color: var(--ink-strong);
}
.accent {
background: linear-gradient(90deg, var(--amber), var(--orange), #d97706);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
max-width: 58ch; margin: 24px auto 0;
font-size: 19px; line-height: 1.55; color: var(--body);
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.spec { margin: 18px 0 0; font: 13px/1.4 var(--mono); color: var(--muted); }
/* Live board */
.board-card {
margin: 44px auto 0; max-width: 1040px; padding: 18px 18px 14px;
background: #fffdf8; border: 1px solid var(--line); border-radius: 20px;
box-shadow: 0 30px 60px -44px #3b2f1680;
}
.board-canvas { display: block; width: 100%; height: 300px; }
.board-note { margin: 10px 4px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
/* Headline word reveal, once on load */
.word { display: inline-block; opacity: 0; transform: translateY(0.35em); animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
/* background-clip:text doesn't reach inline-block children, so each accent word carries the gradient */
.accent .word {
background: linear-gradient(90deg, var(--amber), var(--orange), #d97706);
background-size: 400% 100%;
-webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Tier strip */
.tiers-strip { background: var(--white); padding: 34px 0 40px; border-bottom: 1px solid var(--line); }
.strip-title { margin: 0 0 16px; text-align: center; font-size: 13px; font-weight: 600; color: var(--orange-deep); }
.tier-cards {
list-style: none; margin: 0 auto; padding: 0; max-width: 860px;
display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.tier-card {
display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
padding: 16px 18px; border-radius: 14px;
background: #fffdf7; border: 1px solid var(--line);
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tier-card b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.tier-model { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; color: var(--muted); }
.lamp { width: 9px; height: 9px; border-radius: 50%; background: #e5dfcf; }
.tier-card.on { border-color: var(--orange); box-shadow: 0 8px 22px -14px #ea580caa; }
.tier-card.on .lamp { background: var(--orange); box-shadow: 0 0 0 4px #ea580c22; }
/* Bands */
.band { padding: 84px 0; }
.band.white { background: var(--white); }
.band.cream { background: var(--cream); }
h2 {
margin: 0 0 14px;
font-family: var(--serif); font-weight: 600;
font-size: clamp(28px, 3.6vw, 36px); line-height: 1.12;
color: var(--ink-strong); letter-spacing: -0.01em;
}
h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.3; color: #111827; }
.section-lede { max-width: 60ch; margin: 0 auto 40px; font-size: 17px; color: var(--body); }
/* Demo */
.demo {
max-width: 820px; margin: 0 auto;
padding: 26px; border-radius: 18px;
background: #fffdf8; border: 1px solid var(--line);
box-shadow: 0 24px 50px -36px #3b2f1666;
}
.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
textarea {
display: block; width: 100%; min-height: 112px; resize: vertical;
padding: 14px 16px; border-radius: 12px;
border: 1px solid #e3dccb; background: var(--white);
font: 16px/1.5 var(--sans); color: var(--ink);
}
textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px #ea580c22; }
.samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
font: 500 13px/1 var(--sans); color: var(--body);
background: var(--white); border: 1px solid #e3dccb; border-radius: 999px;
padding: 8px 12px; cursor: pointer;
}
.chip:hover { border-color: #f1b47f; color: var(--ink); }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.status { margin: 0; font-size: 14px; color: var(--muted); }
.meter { margin-top: 16px; height: 6px; border-radius: 999px; background: #f1ebdc; overflow: hidden; }
.meter span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--amber), var(--orange)); transition: width 0.2s linear; }
.readout { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.readout-tiers { display: flex; gap: 8px; margin-bottom: 14px; }
.readout-tiers span {
font: 600 13px/1 var(--sans); padding: 8px 14px; border-radius: 999px;
background: #f3eee2; color: var(--muted);
}
.readout-tiers span.on { background: var(--orange); color: #fff; }
.readout pre {
margin: 0; padding: 14px 16px; border-radius: 12px;
background: var(--code-bg); color: #fbbf24;
font: 600 15px/1.4 var(--mono); white-space: pre-wrap;
}
.readout p { margin: 12px 0 0; color: var(--body); }
/* Grid and steps */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 36px; }
.grid3 p, .steps p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.6; }
.steps {
list-style: none; margin: 36px 0 0; padding: 0;
display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.steps li { padding: 24px; border-radius: 16px; background: #fffdf7; border: 1px solid var(--line); }
.step-n {
display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px;
border-radius: 50%; background: #fff1e4; color: var(--orange-deep);
font: 600 15px/1 var(--sans);
}
code { font-family: var(--mono); font-size: 0.86em; }
/* Results */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 22px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.stat b {
display: block; font-family: var(--serif); font-weight: 600;
font-size: 40px; line-height: 1; color: var(--ink-strong);
font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 10px; font-weight: 500; }
.stat small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fineprint { max-width: 70ch; margin: 26px auto 0; font-size: 13px; color: var(--muted); }
.code {
margin: 0; padding: 22px 24px; border-radius: 16px;
background: var(--code-bg); color: var(--code-ink);
font: 14px/1.65 var(--mono); overflow-x: auto;
}
/* Closing */
.closing { position: relative; overflow: hidden; background: linear-gradient(var(--cream), var(--hero-top)); padding: 90px 0; }
.closing-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.3; }
.closing-inner { position: relative; }
.closing .section-lede { margin-bottom: 0; }
@media (max-width: 860px) {
.nav { display: none; }
.top-inner { justify-content: space-between; }
.tier-cards, .grid3, .steps { grid-template-columns: 1fr; }
.stats { grid-template-columns: 1fr 1fr; }
.band { padding: 64px 0; }
.hero { padding: 52px 0 48px; }
.demo { padding: 18px; }
.board-canvas { height: 250px; }
.board-card { padding: 10px 8px; }
}
@media (max-width: 480px) {
.stats { grid-template-columns: 1fr; }
.cta-row .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.word { animation: none; opacity: 1; transform: none; }
* { transition: none !important; }
}
/* ---------- Evaluation page ---------- */
.nav a[aria-current="page"] { color: var(--ink-strong); font-weight: 600; }
.hero-sm { padding: 64px 0 52px; }
.hero-sm h1 { max-width: 20ch; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.metric { padding: 22px; border-radius: 16px; background: #fffdf7; border: 1px solid var(--line); }
.metric header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.metric h3 { margin: 0; }
.better { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.plain { margin: 6px 0 16px; font-size: 14.5px; color: var(--body); }
.ebars { display: grid; gap: 10px; }
.ebar { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; font-size: 14px; }
.ebar-label { color: var(--body); }
.ebar-track { height: 12px; border-radius: 999px; background: #f1ebdc; overflow: hidden; }
.ebar-fill { display: block; height: 100%; border-radius: 999px; background: #cfc5ad; }
.ebar.ours .ebar-fill { background: linear-gradient(90deg, var(--amber), var(--orange)); }
.ebar.ours .ebar-label, .ebar.ours .ebar-value { color: var(--ink-strong); font-weight: 600; }
.ebar-value { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.etable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.etable th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.etable td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.etable tr:last-child td { border-bottom: 0; }
.etable td small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.etable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-yes, .tag-no { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-yes { background: #e6f2ea; color: var(--green-deep); }
.tag-no { background: #f3eee2; color: var(--muted); }
.downloads { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; gap: 10px; }
.downloads li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.downloads a { font-weight: 600; color: var(--orange-deep); }
.downloads small { color: var(--muted); }
.method { margin: 0; display: grid; grid-template-columns: 190px 1fr; gap: 0 28px; }
.method dt { padding: 16px 0; border-top: 1px solid var(--line); font-family: var(--serif); font-weight: 600; font-size: 17px; }
.method dd { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); color: var(--body); font-size: 15px; line-height: 1.6; }
.method a { color: var(--orange-deep); }
/* ---------- Plain-language explainer ---------- */
.explainer { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; margin-top: 36px; }
.story { display: grid; gap: 16px; }
.story-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.story-step .step-n { margin: 0; }
.story-step h3 { margin: 4px 0 4px; }
.story-step p { margin: 0; color: var(--body); line-height: 1.6; }
.bill { padding: 24px; border-radius: 18px; background: #fffdf8; border: 1px solid var(--line); box-shadow: 0 24px 50px -38px #3b2f1666; }
.bill h3 { margin: 0 0 4px; }
.bill > p { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.bill-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.bill-row span { color: var(--body); }
.bill-row b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.bill-row.ours b { color: var(--orange-deep); }
.bill-bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: #f1ebdc; overflow: hidden; }
.bill-bar i { display: block; height: 100%; background: #cfc5ad; border-radius: 999px; }
.bill-row.ours .bill-bar i { background: linear-gradient(90deg, var(--amber), var(--orange)); }
.bill .fineprint { margin: 14px 0 0; text-align: left; }
.analogy { max-width: 64ch; margin: 0 auto; font-size: 17px; color: var(--body); line-height: 1.65; text-align: center; }
/* ---------- Facts and FAQ ---------- */
.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts th { text-align: left; width: 34%; padding: 13px 18px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); vertical-align: top; }
.facts td { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.faq-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 32px; }
.faq-group h3 { margin: 0 0 10px; font-size: 15px; font-family: var(--sans); font-weight: 600; color: var(--orange-deep); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { display: grid; grid-template-columns: 34px 1fr 20px; gap: 6px; align-items: baseline; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; justify-self: end; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-n { font: 500 13px var(--mono); color: var(--muted); }
.faq-item p { margin: 0 0 16px 40px; color: var(--body); line-height: 1.6; font-size: 15px; }
.faq-item a { color: var(--orange-deep); }
@media (max-width: 860px) {
.metrics, .explainer, .faq-groups { grid-template-columns: 1fr; }
.ebar { grid-template-columns: 120px 1fr 56px; }
.method { grid-template-columns: 1fr; }
.method dd { border-top: 0; padding-top: 0; }
}
.facts-title { margin: 44px 0 14px; text-align: center; }
.run-code { margin-top: 18px; }
.run-code .prompt { color: #8fa39a; }
.run-code .answer { color: #fbbf24; }
.etable td.build { width: 56%; }
.etable td.build small.note { color: var(--body); margin-top: 6px; }
/* ---------- Savings calculator ---------- */
.sv-hero { padding: 72px 0 40px; }
.sv-title { margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink-strong); }
.sv-hero .section-lede { margin-bottom: 0; }
.sv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.sv-file { display: inline-flex; align-items: center; }
.sv-count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-opts { margin-top: 18px; }
.sv-inline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--body); }
.sv-inline input { width: 110px; padding: 10px 12px; border-radius: 10px; border: 1px solid #e3dccb; font: 16px var(--sans); }
.sv-inline input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px #ea580c22; }
.sv-results { max-width: 1000px; margin: 40px auto 0; }
.sv-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.sv-saved { padding: 8px 4px; }
.sv-big { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -0.02em; color: var(--orange-deep); }
.sv-sub { margin: 10px 0 22px; color: var(--body); }
.sv-mix { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #f1ebdc; }
.sv-mix i { display: block; height: 100%; }
.t-small { background: #3d8b63; }
.t-mid { background: #d97706; }
.t-frontier { background: #ea580c; }
.sv-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--body); }
.sv-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.sv-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 12px; }
.sv-table-head h3 { margin: 0; }
.sv-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.sv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sv-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--cream); }
.sv-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.sv-table td:nth-child(1) { color: var(--muted); font-variant-numeric: tabular-nums; width: 3em; }
.sv-table td:nth-child(2) { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.sv-table td:nth-child(4) { white-space: nowrap; }
.sv-table tr:last-child td { border-bottom: 0; }
.sv-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sv-results .fineprint { margin-top: 16px; }
@media (max-width: 760px) {
.sv-summary { grid-template-columns: 1fr; }
.sv-count { margin-left: 0; width: 100%; }
.sv-table td:nth-child(2) { max-width: 180px; }
}