*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100dvh; overflow-x: hidden; color: var(--ink-950); background: var(--canvas); font: 14px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
body.surface-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img, svg, iframe, canvas { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.025em; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; }
h3 { font-size: 15px; line-height: 1.35; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-600) 40%, transparent); outline-offset: 2px; }
::selection { background: var(--brand-100); }
.sr-only { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: var(--space-4); top: var(--space-4); z-index: 1000; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--ink-950); color: white; transform: translateY(-160%); transition: transform var(--motion-fast); }
.skip-link:focus { transform: none; }
.muted { color: var(--ink-600); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.eyebrow { margin-bottom: var(--space-1); color: var(--brand-700); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.auth-overlay[hidden] { display: none; }
.auth-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: calc(var(--space-5) + var(--safe-top)) calc(var(--space-5) + var(--safe-right)) calc(var(--space-5) + var(--safe-bottom)) calc(var(--space-5) + var(--safe-left)); background: rgba(23, 32, 51, .72); backdrop-filter: blur(10px); }
.auth-card { width: min(420px, 100%); padding: clamp(24px, 6vw, 40px); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-card > p:not(.eyebrow) { color: var(--ink-600); }
.auth-card label { display: block; margin-bottom: 6px; font-weight: 600; }
.auth-card input { width: 100%; min-height: 48px; margin-bottom: var(--space-3); padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: white; font-size: 16px; }
.auth-mark { margin-bottom: var(--space-5); }
.form-error { min-height: 20px; color: var(--danger-700); font-size: 13px; }
