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
27 lines
2.2 KiB
CSS
27 lines
2.2 KiB
CSS
/* Answers (v2) - see Answers.jsx */
|
|
.v2-ans { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
|
|
.v2-ans li { border-bottom: 1px solid var(--line); }
|
|
.v2-ans h3 { margin: 0; font: inherit; }
|
|
.v2-ans button { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 560 clamp(19px, 1.5vw, 22px)/1.3 var(--sans); letter-spacing: -.015em; }
|
|
.v2-ans button span { max-width: 52ch; transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
|
|
.v2-ans button:hover span { transform: translateX(4px); }
|
|
.v2-ans button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
|
|
.v2-ans i { position: relative; flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; border: 1px solid var(--line); transition: background .3s, border-color .3s; }
|
|
.v2-ans i::before, .v2-ans i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; border-radius: 2px; background: currentColor; transition: transform .36s cubic-bezier(.16, 1, .3, 1); }
|
|
.v2-ans i::after { transform: rotate(90deg); }
|
|
.v2-ans li.on i { background: var(--ink); border-color: var(--ink); color: var(--x-on-ink); }
|
|
.v2-ans li.on i::after { transform: rotate(0deg); }
|
|
.v2-ans-a { overflow: hidden; }
|
|
.v2-ans-a > div { padding: 0 56px 30px 0; max-width: 66ch; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: var(--soft); text-wrap: pretty; }
|
|
.v2-ans-a a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, .25); }
|
|
.v2-ans.dark { border-color: rgba(255, 255, 255, .12); }
|
|
.v2-ans.dark li { border-color: rgba(255, 255, 255, .12); }
|
|
.v2-ans.dark button { color: #f5f5f7; }
|
|
.v2-ans.dark i { border-color: rgba(255, 255, 255, .2); }
|
|
.v2-ans.dark li.on i { background: #f5f5f7; border-color: #f5f5f7; color: #000; }
|
|
.v2-ans.dark .v2-ans-a > div { color: #a1a1a6; }
|
|
@media (max-width: 900px) {
|
|
.v2-ans button { padding: 22px 0; min-height: 44px; font-size: 18px; }
|
|
.v2-ans-a > div { padding-right: 0; font-size: 16px; }
|
|
}
|