mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
The app's operating-cost model with its defaults and formulas (the defaults total $613k, as its comments say; Calculator.test.mjs asserts it). The AI bill is read in the browser from /v1/pricing, /v1/pricing/summary and /v1/models, and the Team seat from the plan snapshot. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
81 lines
8.3 KiB
CSS
81 lines
8.3 KiB
CSS
/* /calculator (prefix xc-). Hanzo's own tokens only (--ink --soft --faint --line --card --bg --x-raised --x-e12 --x-e15
|
|
--x-on-ink), so light and dark both read. The model reads in three inks: a saving in the success green, a cost in the
|
|
error red, a caveat in the secondary ink; green and red are mixed toward --ink so they keep their contrast on a white
|
|
page and on Hanzo's dark one. Nothing has a palette of its own. */
|
|
.xc { --save: color-mix(in srgb, var(--state-success) 62%, var(--ink)); --cost: color-mix(in srgb, var(--state-error) 72%, var(--ink)); --tint: color-mix(in srgb, var(--state-success) 12%, var(--card)); overflow-x: clip; color: var(--ink); }
|
|
|
|
/* the first screen: the page's name, one line, and the token calculator under them */
|
|
.xc-hero { padding: clamp(88px, 10vw, 128px) 0 clamp(40px, 6vw, 72px); }
|
|
.xc-top { display: flex; justify-content: center; margin: 0; }
|
|
.xc-h1 { margin: 26px 0 0; text-align: center; font: 560 clamp(2.5rem, 6vw, 4rem)/1.05 var(--sans); letter-spacing: -.04em; color: var(--ink); text-wrap: balance; }
|
|
.xc-lede { margin: 20px auto clamp(32px, 4vw, 48px); max-width: 56ch; text-align: center; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.5; color: var(--soft); text-wrap: balance; }
|
|
|
|
/* the model */
|
|
.xc-body { width: min(100% - 40px, 72rem); margin: 0 auto; padding: 0 0 5rem; display: flex; flex-direction: column; gap: 2.25rem; }
|
|
.xc-body > section, .xc-card { min-width: 0; }
|
|
.xc-h2 { margin: 0 0 .6rem; font: 600 1.15rem/1.4 var(--sans); letter-spacing: -.01em; color: var(--ink); }
|
|
.xc-note { margin: 0; max-width: min(76ch, 100%); font-size: .9rem; line-height: 1.6; color: var(--soft); text-wrap: pretty; }
|
|
.xc-note + .xc-note { margin-top: .7rem; }
|
|
.xc-b { font-weight: 600; color: var(--ink); }
|
|
.xc-b.mono { font-family: var(--mono); font-feature-settings: 'tnum'; }
|
|
.xc-label { margin: .6rem 0 0; font: 500 .72rem/1.6 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--soft); }
|
|
.xc-lead { margin: .4rem 0 0; font-size: 1.15rem; line-height: 1.5; color: var(--save); }
|
|
.xc-warn { margin: .6rem 0 0; font-size: .9rem; line-height: 1.5; color: var(--soft); }
|
|
.xc-fine { margin: 1rem 0 0; max-width: min(80ch, 100%); padding-left: .9rem; border-left: 2px solid var(--line); font-size: .82rem; line-height: 1.6; color: var(--soft); }
|
|
|
|
.xc-card { display: flex; flex-direction: column; gap: .4rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
|
|
.xc-card.accent { border-left: 3px solid var(--save); border-radius: 4px 14px 14px 4px; padding: 1.1rem 1.25rem; }
|
|
.xc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; }
|
|
.xc-controls.tight { margin: 1.1rem 0; }
|
|
.xc-cap { display: flex; justify-content: space-between; gap: .5rem; font: 500 .7rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
|
|
.xc-cap output { font: 400 .8rem/1.5 var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink); font-feature-settings: 'tnum'; white-space: nowrap; }
|
|
.xc-range { width: 100%; margin: 0; accent-color: var(--save); }
|
|
.xc-field { display: block; width: 100%; height: 40px; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--x-e12); background: var(--bg); color: var(--ink); font: 400 .9rem/1.2 var(--mono); font-feature-settings: 'tnum'; }
|
|
.xc-field.narrow { display: inline-block; width: 5.5rem; height: 34px; padding: 0 .45rem; text-align: right; }
|
|
.xc-field::placeholder { color: var(--faint); }
|
|
.xc-field:focus-visible, .xc-range:focus-visible, .xc-toggle:focus-visible, .xc-chip:focus-visible, .xc-sub:focus-visible, .xc-check:focus-visible, .xc-table:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
|
|
|
|
/* results */
|
|
.xc-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .9rem; }
|
|
.xc-tier { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
|
|
.xc-tier.lead { background: var(--tint); border-color: var(--save); }
|
|
.xc-tier-k { font: 500 .7rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
|
|
.xc-tier small { font-size: .78rem; line-height: 1.5; color: var(--soft); }
|
|
.xc-big { display: block; font: 400 1.7rem/1.1 var(--mono); letter-spacing: -.06em; font-feature-settings: 'tnum'; color: var(--save); overflow-wrap: anywhere; }
|
|
@media (min-width: 768px) { .xc-big { font-size: 2.4rem; } }
|
|
.xc-need { display: block; padding: .5rem 0; font-size: 1rem; line-height: 1.3; color: var(--soft); }
|
|
.xc-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; margin-top: .9rem; }
|
|
.xc-part { padding: .7rem .9rem; border: 1px solid var(--line); border-top: 3px solid var(--save); border-radius: 4px 4px 14px 14px; background: var(--card); }
|
|
.xc-part.cost { border-top-color: var(--cost); }
|
|
.xc-part small { display: block; margin-bottom: .2rem; font-size: .74rem; line-height: 1.5; color: var(--soft); }
|
|
.xc-part span { font: 400 1.15rem/1.5 var(--mono); font-feature-settings: 'tnum'; color: var(--ink); overflow-wrap: anywhere; }
|
|
.xc-formula { display: flex; flex-wrap: wrap; gap: .3rem .4rem; margin: .9rem 0 0; font-size: .8rem; line-height: 1.6; color: var(--soft); }
|
|
.xc-formula code { font: 400 .72rem/1.6 var(--mono); color: var(--ink); }
|
|
|
|
/* a vendor, or a small action set the same way; pressed reads in the saving hue on its tint */
|
|
.xc-toggle { padding: .3rem .6rem; border: 1px solid var(--x-e12); border-radius: 8px; background: var(--x-raised); color: var(--ink); font: 400 .8rem/1.4 var(--sans); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
|
|
.xc-toggle[aria-pressed='true'] { border-color: var(--save); background: var(--tint); color: var(--save); }
|
|
@media (hover: hover) { .xc-toggle:hover { border-color: var(--ink); } .xc-toggle[aria-pressed='true']:hover { border-color: var(--save); } }
|
|
.xc-vendors { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
|
|
|
|
/* the table: a word in an outline for each grade; scrolls on its own below the width it needs */
|
|
.xc-table { margin-top: .9rem; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
|
|
.xc-table table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.4; color: var(--ink); font-feature-settings: 'tnum'; }
|
|
.xc-table th { padding: .6rem .6rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); font: 500 .66rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
|
|
.xc-table td { padding: .45rem .6rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); vertical-align: middle; transition: opacity .15s; }
|
|
.xc-table td.off > * { opacity: .42; }
|
|
.xc-table td.off { color: color-mix(in srgb, var(--ink) 42%, transparent); }
|
|
.xc-table .r { text-align: right; }
|
|
.xc-table td:nth-child(2) { white-space: normal; min-width: 13rem; }
|
|
.xc-table td.svc { font: 400 .76rem/1.5 var(--mono); color: var(--soft); white-space: normal; min-width: 11rem; }
|
|
.xc-table tbody tr:last-child td { border-bottom: 0; }
|
|
.xc-table .foot { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; color: var(--ink); }
|
|
.xc-check { width: 18px; height: 18px; margin: 0; accent-color: var(--save); cursor: pointer; vertical-align: middle; }
|
|
.xc-chip { display: inline-block; padding: .15rem .5rem; border: 1px solid currentColor; border-radius: 6px; background: none; font: 500 .66rem/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
|
|
button.xc-chip { cursor: pointer; }
|
|
.xc-chip.save { color: var(--save); } .xc-chip.cost { color: var(--cost); } .xc-chip.warn { color: var(--soft); border-color: var(--ink); } .xc-chip.grey { color: var(--faint); }
|
|
.xc-sub { padding: 0 .2rem; border: 0; background: none; font: 500 .68rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 2px; color: var(--save); cursor: pointer; }
|
|
.xc-weight { margin-left: .3rem; font: 400 .72rem/1 var(--mono); color: var(--soft); }
|
|
.xc-table td.xc-ai { padding: 1rem; white-space: normal; background: var(--bg); border-bottom: 0; }
|
|
.xc-ai h3 { margin: 0 0 .4rem; font: 600 .95rem/1.4 var(--sans); color: var(--ink); }
|