Files
Claude 36f6a01051 dark mode foundation: follow the device like live hanzo.ai (dark t_dark / light t_light), Hanzo's dark palette on every shared token, shared pieces dark-correct
- 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
2026-11-08 10:59:06 +00:00

54 lines
3.6 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* v2 system (docs/VISION.md "The v2 system"), owned by the Home chat. Import it once from any v2 page or piece:
import '../v2/system.css'; (from components/pages/*) import './v2/system.css'; (from components/*)
It only defines v2- classes and --v2- tokens, so v1 pages are untouched.
Type: .v2-display (128/96/80 → 56/48), .v2-headline (56 → 36), .v2-title (28), .v2-lede (24/21), .v2-body (19/17),
.v2-kicker (Zen Mono 13 caps). Numbers: .v2-figure (huge, tabular).
Space: .v2-wrap (12 columns, max 1440, 24px gutters), .v2-sec (200–260px of air on desktop, 120px on phone).
Material: .v2-object (28px radius, hairline, soft long shadow), .v2-card (16px radius).
Accent: set --v2-accent on the page root (one per page, taken from that page's own media). */
:root {
--v2-accent: #0a0a0a;
--v2-display: clamp(3.5rem, 8.9vw, 8rem);
--v2-display-m: clamp(3rem, 6.67vw, 6rem);
--v2-display-s: clamp(2.75rem, 5.56vw, 5rem);
--v2-headline: clamp(2.25rem, 3.9vw, 3.5rem);
--v2-title: clamp(1.375rem, 1.95vw, 1.75rem);
--v2-lede: clamp(1.1875rem, 1.67vw, 1.5rem);
--v2-body: clamp(1.0625rem, 1.32vw, 1.1875rem);
--v2-sec: clamp(120px, 16vw, 240px); /* the air between two sections */
--v2-gut: 24px;
--v2-max: 1440px;
--v2-ease: cubic-bezier(.16, 1, .3, 1);
--v2-shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 24px 48px -18px rgba(0, 0, 0, .16), 0 80px 120px -60px rgba(0, 0, 0, .22);
}
.v2-wrap { width: 100%; max-width: var(--v2-max); margin-inline: auto; padding-inline: var(--v2-gut); box-sizing: border-box; }
.v2-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--v2-gut); }
.v2-sec { padding-block: calc(var(--v2-sec) / 2); position: relative; }
.v2-display, .v2-display-m, .v2-display-s, .v2-headline { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
.v2-display { font-size: var(--v2-display); line-height: .92; letter-spacing: -.05em; }
.v2-display-m { font-size: var(--v2-display-m); line-height: .92; letter-spacing: -.05em; }
.v2-display-s { font-size: var(--v2-display-s); line-height: .94; letter-spacing: -.045em; }
.v2-headline { font-size: var(--v2-headline); line-height: 1; letter-spacing: -.04em; max-width: 18ch; }
.v2-title { margin: 0; font-size: var(--v2-title); line-height: 1.15; letter-spacing: -.025em; font-weight: 560; }
.v2-lede { margin: 0; font-size: var(--v2-lede); line-height: 1.4; letter-spacing: -.012em; color: var(--soft); max-width: 40ch; text-wrap: pretty; }
.v2-body { margin: 0; font-size: var(--v2-body); line-height: 1.55; color: var(--soft); max-width: 64ch; text-wrap: pretty; }
.v2-kicker { margin: 0; font: 500 13px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.v2-figure { display: block; font-weight: 600; font-size: clamp(5rem, 15vw, 13.5rem); line-height: .82; letter-spacing: -.06em; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
.v2-object { border-radius: 28px; border: 1px solid rgba(0, 0, 0, .08); background: var(--x-raised); box-shadow: var(--v2-shadow); overflow: hidden; }
.v2-card { border-radius: 16px; }
.v2-rule { height: 1px; border: 0; margin: 0; background: rgba(0, 0, 0, .08); }
/* line-masked headings (components/v2/Lines.jsx) */
.v2-lines { display: block; }
.v2-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.v2-line > span { display: block; }
@media (scripting: none) { .v2-line > span { transform: none !important; } } /* JS off: the lines stand, legible */
@media (max-width: 900px) {
:root { --v2-gut: 16px; }
.v2-headline { max-width: none; }
}