/*
  The public site in dark mode (html[data-theme="dark"], set before paint by the root layout's head script from
  the visitor's choice or the system). Every brand token gets a dark value: a deep navy ground, light ink, the
  logo blue lifted so links and focus rings pass 4.5:1 and buttons 3:1. Parktelligence's own screens stay as
  the app draws them (light windows), so they keep their real look on the dark page.
*/
html[data-theme="dark"] {
  --p-bg: #0b1220; --p-surface: #121c31; --p-ink: #e8eefb; --p-muted: #a3b0c7;
  --p-accent: #6ea8ff; --p-accent-ink: #0b1220; --p-action: #4d8dff; --p-action-ink: #0b1220;
  --p-inv-bg: #0b2350; --p-inv-surface: #1a315c; --p-inv-ink: #ffffff; --p-inv-muted: #b4bfd2;
  --p-inv-accent: #ffffff; --p-inv-accent-ink: #0b2350; --p-inv-action: #ffffff; --p-inv-action-ink: #0b2350;
  /* the logo's counter takes the ground, the car and the third speed line lift for contrast */
  --logo-counter: #0b1220; --logo-car: #8ec0ff; --logo-line3: #3d6fd9;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--p-bg); color: var(--p-ink); }
html[data-theme="dark"] .ground-surface { --logo-counter: #121c31; }

/* Parktelligence's screens: light windows, navy ink, as in the app */
html[data-theme="dark"] .stage { --frag: #ffffff; }
html[data-theme="dark"] :is(.ui, .pt-app) { --fx-bg: #ffffff; --fx-surface: #f2f5fb; --fx-ink: #0b2350; --fx-muted: #5a6680; --fx-accent: #1c6bff; --fx-accent-ink: #ffffff; }
html[data-theme="dark"] .pt-app.ui { border-color: rgb(255 255 255 / 0.14); }

/* cards and panels: the card one step off the ground, hairlines from the light ink */
html[data-theme="dark"] .card:not(.card--open) { --card: #121c31; }
html[data-theme="dark"] .panel { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); }

/* the nav's open panel and the phone sheet sit on the dark ground with a light hairline */
html[data-theme="dark"] .nav { border-bottom-color: rgb(255 255 255 / 0.1); }
html[data-theme="dark"] .nav__menu { border-color: rgb(255 255 255 / 0.1); }

/* reading pages: code blocks and tables keep their contrast */
html[data-theme="dark"] .pt-prose pre { background: #060b16; color: #e8eefb; }
html[data-theme="dark"] .pt-prose code { background: #1a2540; }

/* the cookie banner and its dialog: the ink-filled buttons turn light with dark labels */
html[data-theme="dark"] .pt-consent, html[data-theme="dark"] .pt-consent-dialog { background: #121c31; border-color: rgb(255 255 255 / 0.12); box-shadow: 0 24px 56px -20px rgb(0 0 0 / 0.7); }
html[data-theme="dark"] .pt-consent__btn { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-bg); }
html[data-theme="dark"] .pt-consent__btn:hover { background: color-mix(in oklab, var(--p-ink) 86%, #000000); }
html[data-theme="dark"] .pt-consent-dialog__close { background: #121c31; }
html[data-theme="dark"] .pt-consent-cat__always { background: #1a2540; }
html[data-theme="dark"] .pt-switch { background: color-mix(in oklab, var(--p-ink) 30%, #0b1220); }
html[data-theme="dark"] .pt-consent-dialog::backdrop { background: rgb(0 0 0 / 0.6); }

/* the header menus' panels */
html[data-theme="dark"] .pt-ctl__menu { box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.7); }
