@php // The theme the person chose (HandleAppearance's cookie, read here too for an address no route matched, where // the middleware never ran): light or dark is written now; system is resolved by the browser before the first // paint, below, so no page flashes the wrong ground. $appearance = in_array($choice = $appearance ?? request()->cookie('appearance'), ['light', 'dark'], true) ? $choice : 'system'; $theme = $appearance === 'system' ? null : $appearance; $ground = fn (string $mode) => \App\Support\Brand\Palette::tokens($mode)['bg']; @endphp {{-- The response's nonce (plan SEC, SEC-1): the inline code below carries it, and Inertia's own styles read it from here (app.ts). --}} @fonts @vite(['resources/css/app.css', 'resources/js/app.ts', "resources/js/pages/{$page['component']}.vue"]) {{ \App\Support\Brand\Identity::appName() }}