/* @core/theme: the custom properties every kit part and app screen draws with, and the base look on them. The values
   below are the no-script ones (light from the home design tokens, tokens.css, with plain fallbacks; dark the kit's
   own): applyTheme() replaces them with the device's chosen palette (palette-css.js) before the first paint. The theme
   follows the device (Auto) unless one was chosen on this device (data-theme on <html>); the density is Regular (50 px
   rows) unless Comfortable (60) or Compact (44; taps stay 44 px high) was (data-density). The look's tokens (looks.js)
   default here to plain ones, for a browser without constructed stylesheets. */
:root {
  color-scheme: light dark;
  --font: var(--home-font, system-ui, sans-serif);
  --font-head: inherit;
  --leading: 1.5;
  --bg: light-dark(var(--home-bg, #f5f5f7), #1c1c1e);
  --surface: light-dark(var(--home-surface, #ffffff), #2c2c2e);
  --text: light-dark(var(--home-ink, #1d1d1f), #f2f2f7);
  --muted: light-dark(var(--home-muted, #636368), #aeaeb2);
  --line: light-dark(var(--home-control, #8a8a91), #8e8e93);
  --accent: light-dark(var(--home-accent, #3a6390), #8fb4e0);
  --on-accent: light-dark(#ffffff, #111113);
  --band: light-dark(var(--accent), #3878c0);   /* a band of colour behind a title (look B): deep in dark, white text */
  --on-band: #ffffff;
  --danger: light-dark(var(--home-bad, #b3261e), #ff8a80);
  --ok: light-dark(#197934, #74dd90);
  --warn: light-dark(#8a5a00, #f3c46e);
  --fill: var(--accent);
  --on-fill: var(--on-accent);
  --link: var(--accent);
  --focus: var(--accent);
  --selection: light-dark(#d8e0e9, #4a5a6e);
  --backdrop: rgb(0 0 0 / .4);
  /* glass (glass.css): the card colour, see-through; the palette sets how much from its contrast floor */
  --glass: color-mix(in srgb, var(--surface) 92%, transparent);
  --glass-thick: color-mix(in srgb, var(--surface) 94%, transparent);
  --glass-clear: color-mix(in srgb, var(--surface) 92%, transparent);
  --glass-blur: blur(24px) saturate(1.8);
  --glass-blur-thick: blur(28px) saturate(1.4);
  --glass-rim: inset 0 1px 0 light-dark(rgb(255 255 255 / .8), rgb(255 255 255 / .14)),
    inset 0 0 0 .5px light-dark(rgb(255 255 255 / .5), rgb(255 255 255 / .1));
  --glass-shadow: 0 0 0 .5px rgb(0 0 0 / .08), 0 6px 20px light-dark(rgb(0 0 0 / .12), rgb(0 0 0 / .4)), 0 1px 3px rgb(0 0 0 / .08);
  /* springs: CSS linear() samples of a damped spring (smooth none past the end, snappy a little, bouncy more) */
  --spring: linear(0, .075, .228, .391, .537, .657, .751, .822, .874, .912, .939, .958, .971, .98, .987, .991, .994, .996, .997, .998, 1);
  --spring-snappy: linear(0, .166, .462, .72, .891, .983, 1.021, 1.028, 1.023, 1.015, 1.007, 1.003, 1, .999, .999, .999, 1);
  --spring-bouncy: linear(0, .208, .589, .906, 1.079, 1.126, 1.101, 1.053, 1.012, .99, .984, .987, .993, .998, 1.001, 1.002, 1);
  --d-spring: 480ms;   /* sheets and dialogs */
  --d-quick: 340ms;    /* everything else that moves: menus, bars, fades, toasts (pushed screens use the same 340) */
  /* a pressed control: a wash of the text colour over its fill, on at once (no transition in) */
  --press: color-mix(in srgb, var(--text) 12%, transparent);
  --radius-s: .25rem;
  --radius: .4rem;
  --radius-l: .75rem;
  --border: 1px;
  --shadow: 0 1px 3px rgb(0 0 0 / .14);
  --gap: .5rem;
  --pad: 1rem;
  --tap: 44px;
  --row: 50px;
  /* the look's tokens (palette-css.js puts the picked look's over these) */
  --look-font-head: inherit;
  --title-size: 2rem; --title-weight: 700; --title-track: 0; --bar-line: transparent;
  --card-r: 0; --list-inset: 0; --list-edge: var(--line); --list-sep: color-mix(in srgb, var(--line) 40%, transparent); --list-shadow: none;
  --row-weight: 400; --control-r: var(--radius); --pill-r: calc(var(--radius-l) * 2); --menu-r: var(--radius-l);
  --sheet-r: var(--radius-l); --tick-size: 22px; --tab-active: var(--selection); --glass-tint: 0%;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-reduced-motion: reduce) { :root { --d-spring: 1ms; --d-quick: 1ms; } }
:root[data-motion="still"] { --d-spring: 1ms; --d-quick: 1ms; }
:root[data-density="comfortable"] { --row: 60px; --tap: 48px; --gap: .625rem; --pad: 1.125rem; font-size: 106.25%; }
:root[data-density="compact"] { --row: 44px; --gap: .25rem; --pad: .75rem; font-size: 93.75%; }

body { font-family: var(--font); line-height: var(--leading); background: var(--bg); color: var(--text); }
h1, h2, h3 { line-height: 1.2; }
/* the look's heading face (a serif in look A) for page titles only: sheet, section and bar titles stay in the text face */
h1 { font-family: var(--font-head); }
button, input, select { font: inherit; color: inherit; }
button { min-height: var(--tap); padding: 0 var(--pad); cursor: pointer; border-radius: var(--control-r); }
button, select { background: var(--surface); border: var(--border) solid var(--line); }
/* form controls a finger can hit, in the theme's colours (zero specificity: a page's own rules win). A select draws
   its own chevron (two gradients, no image) with room so the words never run under it. */
select { min-height: var(--tap); padding: 0 2rem 0 var(--gap); border-radius: var(--control-r); -webkit-appearance: none;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
  linear-gradient(135deg, currentColor 50%, transparent 50%); background-repeat: no-repeat;
  background-position: calc(100% - 1rem) 50%, calc(100% - .7rem) 50%; background-size: .3rem .3rem; cursor: pointer; }
:where(input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], textarea) {
  min-height: var(--tap); padding: 0 var(--gap); box-sizing: border-box; background: var(--surface);
  border: var(--border) solid var(--line); border-radius: var(--radius); }
:where(textarea) { padding: var(--gap); }
:where(input[type="checkbox"], input[type="radio"]) { width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--accent); }
input[type="color"] { min-height: var(--tap); min-width: var(--tap); padding: 2px; border: var(--border) solid var(--line);
  border-radius: var(--radius); background: var(--surface); }
button:not(:disabled):active { box-shadow: inset 0 0 0 100vmax var(--press); }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--selection); color: var(--text); }
