mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
- Theme before paint: app/layout.jsx runs live hanzo.ai's own pre-paint script (localStorage "hanzo.appearance.painted", else prefers-color-scheme) and sets light/dark + t_light/t_dark, color-scheme and data-scheme; it re-applies when the device setting changes. Measured: "dark t_dark" at first paint, after hydration and after client navigation; no flash; JS off stays bright. theme-color follows the scheme (#0A0A0A dark, as live). No appearance switch: no captured live menu shows one, so no new words. - Tokens: html.dark gives --ink/--soft/--faint/--line/--card/--bg and Hanzo's --foreground/ --background/--primary/--border/--hover/--muted Hanzo's own dark values (public/hanzo.css: page #0d0d0d, text #e5e5e5, muted #a3a3a3, borders white 10%, #171717 / #0f0f0f / #262626 surfaces); rooms (system.css) too. New --x-raised/--x-on-ink/--x-fill/--x-sunk/--x-knob/--x-e10..15 replace hard-coded whites in shared rules (Hanzo already defines --card/--raised on inner elements, so the new names are prefixed). One-off greys keep their exact light value via light-dark(); html.light/html.dark pin color-scheme. - Dark-correct: cookie banner and preferences, announcement strip, sign-in buttons, buttons, search palette and scrims, menus and the menu feature card, sheets, drawers, pause buttons, related cards, every components/v2/*.css; the hero dot field draws in the page ink at 17% and redraws on a theme change. Hanzo's header and footer go dark through hanzo.css. - docs/DARK-MODE.md: how a page chat converts its pages; scripts/darkcheck.mjs (what is still bright in dark) and scripts/lightcheck.mjs (bright mode unchanged vs an older server). Checks: bright mode 0 computed-colour diffs vs the base commit on / /pricing /chat (1470, 375) and /enso /kai /api /affiliate /beta /about /dev /security /payments /models (1470); page text identical (only the live tokens/s counters move); 0 console/page errors in both modes on / /pricing /chat at 1470x801 and 375x812 (home's media requests to hanzo.ai are blocked in this sandbox, same in light); taste, unique OK; build exits 0 with HZ_LIVE_OFFLINE=1 (live figure hosts are blocked here). Page-owned CSS left for the page chats: /pricing .xpr-*, /chat .cht-*, home .xs-*/.xh-pause. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdxPteCvBL7f74SauJt
44 lines
4.3 KiB
CSS
44 lines
4.3 KiB
CSS
/* OpenSheet (see OpenSheet.jsx) */
|
|
.w2-oc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 16px; }
|
|
.w2-oc > li { display: flex; }
|
|
.w2-oc-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; min-height: 300px; padding: 28px; border: 1px solid rgba(0, 0, 0, .05); border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
|
|
.w2-oc-card.dark { background: #111113; color: #f5f5f7; border-color: rgba(255, 255, 255, .08); }
|
|
.w2-oc-art { display: block; width: 100%; margin-bottom: auto; }
|
|
.w2-oc-k { font-size: 13px; color: var(--acc); letter-spacing: .04em; }
|
|
.w2-oc-t { font-size: clamp(22px, 1.95vw, 28px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
|
|
.w2-oc-d { font-size: 16px; line-height: 1.5; color: var(--soft); max-width: 36ch; }
|
|
.w2-oc-card.dark .w2-oc-d { color: #a1a1a6; }
|
|
.w2-oc-plus { position: absolute; right: 20px; top: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--x-raised); color: var(--ink); font-size: 22px; line-height: 1; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 6px 16px -8px rgba(0, 0, 0, .3); transition: transform .35s var(--ease), background .25s, color .25s; }
|
|
.w2-oc-card:hover .w2-oc-plus { transform: rotate(90deg); background: var(--acc); color: var(--acc-ink, #fff); }
|
|
|
|
.w2-sheet-host { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; }
|
|
.w2-sheet-back { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(10, 10, 12, .42); cursor: pointer; }
|
|
.w2-sheet { position: relative; width: min(880px, 100%); max-height: min(86svh, 920px); overflow: auto; overscroll-behavior: contain; border-radius: 28px; background: var(--x-raised); color: var(--ink); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .45); }
|
|
.w2-sheet.wide { width: min(1120px, 100%); }
|
|
.w2-sheet-in { position: relative; padding: clamp(28px, 4vw, 56px); }
|
|
.w2-sheet-x { position: sticky; top: 0; float: right; display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -12px 0 12px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
|
|
.w2-sheet-x:hover { background: #e8e8ed; }
|
|
.w2-sheet-art { margin: 0 0 28px; }
|
|
.w2-sheet .w2-kicker { margin-bottom: 14px; }
|
|
.w2-sheet-t { margin: 0 0 24px; font-size: clamp(32px, 3.6vw, 52px); font-weight: 600; line-height: 1.02; letter-spacing: -.042em; text-wrap: balance; max-width: 18ch; }
|
|
.w2-sheet-b { display: flex; flex-direction: column; gap: 16px; }
|
|
.w2-sheet-b p { margin: 0; font-size: clamp(17px, 1.32vw, 19px); line-height: 1.62; color: var(--soft); max-width: 64ch; }
|
|
.w2-sheet-b strong { color: var(--ink); font-weight: 560; }
|
|
.w2-sheet-b h4 { margin: 12px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
|
|
|
|
@media (max-width: 900px) {
|
|
.w2-oc { grid-template-columns: minmax(0, 1fr); gap: 12px; }
|
|
.w2-oc-card { min-height: 0; padding: 24px; }
|
|
.w2-sheet-host { padding: 0; place-items: end stretch; }
|
|
.w2-sheet { width: 100%; max-height: 90svh; border-radius: 28px 28px 0 0; }
|
|
}
|
|
.w2-detail { display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 8px 0 22px; border: 1px solid var(--x-e12); border-radius: 999px; background: var(--x-raised); color: var(--ink); font: 500 16px/1 var(--sans); cursor: pointer; align-self: flex-start; }
|
|
.w2-detail i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--acc); color: var(--acc-ink, #fff); font-style: normal; font-size: 20px; transition: transform .35s var(--ease); }
|
|
.w2-detail { transition: border-color .2s, background .2s, transform var(--dur-press, .1s); }
|
|
.w2-detail:active { transform: scale(.98); }
|
|
@media (hover: hover) { .w2-detail:hover { border-color: var(--ink); } .w2-detail:hover i { transform: rotate(90deg); } }
|
|
.w2-detail.solo { padding: 0; width: 48px; justify-content: center; border: 0; background: none; }
|
|
.w2-detail.solo i { width: 48px; height: 48px; font-size: 24px; }
|
|
.w2-dark .w2-detail { background: #111113; color: #f5f5f7; border-color: rgba(255, 255, 255, .16); }
|
|
.w2-sheet-k { margin: 10px 0 0; }
|