/* IRL Local design system: Material 3 from before the 2025 Expressive update, with IRL Local values. Tokens and
   color-scheme sit on :root, fonts in @font-face, and every other rule is under an l- class.
   The rules and class names are written up in coti-platform/docs/design-system.md. */

/* ---------- Fonts. Latin subsets from @fontsource-variable 5.3.0. Figtree sets every style. Bricolage is kept for the style guide. ---------- */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-5.3.0-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-5.3.0-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-5.3.0-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens that do not change with the theme ---------- */

:root {
  /* Brand. White and the yellow are used only over sun-c or sun-d. */
  --irl-sun-a: #f7a04b;
  --irl-sun-b: #e0576a;
  --irl-sun-c: #6a4596;
  --irl-sun-d: #0b2e4f;
  --irl-yellow: #ffd60a;
  --irl-on-sun: #ffffff;
  /* The header's dusk, from the sky down to the glow on the horizon, as the approved Home draws it. */
  --irl-dusk-1: #1c2c9c;
  --irl-dusk-2: #4b2089;
  --irl-dusk-3: #b01f6e;
  --irl-dusk-4: #e2301f;
  --irl-dusk-5: #f98a1c;
  /* The stroke under the wordmark, and a heart that is on. */
  --irl-orange: #f85207;
  /* The number that pairs a card with its pin. */
  --irl-rank: #e02424;
  --irl-on-rank: #ffffff;
  /* Some phones report a bottom inset far taller than the space they keep clear, so it is capped. */
  --irl-safe-bottom: min(env(safe-area-inset-bottom, 0px), 20px);
  --irl-nav-height: 56px;

  /* The map's tiles stay light in both themes, so its colors do too. */
  --irl-map-pin: #e02424;
  --irl-map-on-pin: #ffffff;
  --irl-map-pin-selected: #0a0f3c;
  --irl-map-on-pin-selected: #ffffff;
  --irl-map-here: #0b55f6;
  --irl-map-ring: #0b55f6;
  --irl-map-pin-edge: #ffffff;

  /* Typefaces */
  --md-ref-typeface-brand: "Figtree", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --md-ref-typeface-plain: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Type scale. Sizes, line heights and tracking are Material's. Weights are ours. */
  --md-sys-typescale-display-large-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-display-large-size: 3.5625rem;
  --md-sys-typescale-display-large-line-height: 4rem;
  --md-sys-typescale-display-large-weight: 800;
  --md-sys-typescale-display-large-tracking: -0.015625rem;
  --md-sys-typescale-display-medium-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-display-medium-size: 2.8125rem;
  --md-sys-typescale-display-medium-line-height: 3.25rem;
  --md-sys-typescale-display-medium-weight: 800;
  --md-sys-typescale-display-medium-tracking: 0rem;
  --md-sys-typescale-display-small-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-display-small-size: 2.25rem;
  --md-sys-typescale-display-small-line-height: 2.75rem;
  --md-sys-typescale-display-small-weight: 800;
  --md-sys-typescale-display-small-tracking: 0rem;
  --md-sys-typescale-headline-large-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-headline-large-size: 2rem;
  --md-sys-typescale-headline-large-line-height: 2.5rem;
  --md-sys-typescale-headline-large-weight: 800;
  --md-sys-typescale-headline-large-tracking: 0rem;
  --md-sys-typescale-headline-medium-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-headline-medium-size: 1.75rem;
  --md-sys-typescale-headline-medium-line-height: 2.25rem;
  --md-sys-typescale-headline-medium-weight: 800;
  --md-sys-typescale-headline-medium-tracking: 0rem;
  --md-sys-typescale-headline-small-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-headline-small-size: 1.5rem;
  --md-sys-typescale-headline-small-line-height: 2rem;
  --md-sys-typescale-headline-small-weight: 800;
  --md-sys-typescale-headline-small-tracking: -0.015rem;
  --md-sys-typescale-title-large-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-title-large-size: 1.375rem;
  --md-sys-typescale-title-large-line-height: 1.75rem;
  --md-sys-typescale-title-large-weight: 800;
  --md-sys-typescale-title-large-tracking: 0rem;
  --md-sys-typescale-title-medium-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-title-medium-size: 1rem;
  --md-sys-typescale-title-medium-line-height: 1.5rem;
  --md-sys-typescale-title-medium-weight: 700;
  --md-sys-typescale-title-medium-tracking: 0.009375rem;
  --md-sys-typescale-title-small-font: var(--md-ref-typeface-brand);
  --md-sys-typescale-title-small-size: 0.875rem;
  --md-sys-typescale-title-small-line-height: 1.25rem;
  --md-sys-typescale-title-small-weight: 700;
  --md-sys-typescale-title-small-tracking: 0.00625rem;
  --md-sys-typescale-body-large-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-body-large-size: 1rem;
  --md-sys-typescale-body-large-line-height: 1.5rem;
  --md-sys-typescale-body-large-weight: 400;
  --md-sys-typescale-body-large-tracking: 0.03125rem;
  --md-sys-typescale-body-medium-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-body-medium-size: 0.875rem;
  --md-sys-typescale-body-medium-line-height: 1.25rem;
  --md-sys-typescale-body-medium-weight: 400;
  --md-sys-typescale-body-medium-tracking: 0.015625rem;
  --md-sys-typescale-body-small-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-body-small-size: 0.75rem;
  --md-sys-typescale-body-small-line-height: 1rem;
  --md-sys-typescale-body-small-weight: 400;
  --md-sys-typescale-body-small-tracking: 0.025rem;
  --md-sys-typescale-label-large-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-label-large-size: 0.875rem;
  --md-sys-typescale-label-large-line-height: 1.25rem;
  --md-sys-typescale-label-large-weight: 600;
  --md-sys-typescale-label-large-tracking: 0.00625rem;
  --md-sys-typescale-label-medium-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-label-medium-size: 0.75rem;
  --md-sys-typescale-label-medium-line-height: 1rem;
  --md-sys-typescale-label-medium-weight: 600;
  --md-sys-typescale-label-medium-tracking: 0.03125rem;
  --md-sys-typescale-label-small-font: var(--md-ref-typeface-plain);
  --md-sys-typescale-label-small-size: 0.6875rem;
  --md-sys-typescale-label-small-line-height: 1rem;
  --md-sys-typescale-label-small-weight: 600;
  --md-sys-typescale-label-small-tracking: 0.03125rem;

  /* One font shorthand per style, so a rule can write font: var(--irl-font-body-large). */
  --irl-font-display-large: var(--md-sys-typescale-display-large-weight) var(--md-sys-typescale-display-large-size) / var(--md-sys-typescale-display-large-line-height) var(--md-sys-typescale-display-large-font);
  --irl-font-display-medium: var(--md-sys-typescale-display-medium-weight) var(--md-sys-typescale-display-medium-size) / var(--md-sys-typescale-display-medium-line-height) var(--md-sys-typescale-display-medium-font);
  --irl-font-display-small: var(--md-sys-typescale-display-small-weight) var(--md-sys-typescale-display-small-size) / var(--md-sys-typescale-display-small-line-height) var(--md-sys-typescale-display-small-font);
  --irl-font-headline-large: var(--md-sys-typescale-headline-large-weight) var(--md-sys-typescale-headline-large-size) / var(--md-sys-typescale-headline-large-line-height) var(--md-sys-typescale-headline-large-font);
  --irl-font-headline-medium: var(--md-sys-typescale-headline-medium-weight) var(--md-sys-typescale-headline-medium-size) / var(--md-sys-typescale-headline-medium-line-height) var(--md-sys-typescale-headline-medium-font);
  --irl-font-headline-small: var(--md-sys-typescale-headline-small-weight) var(--md-sys-typescale-headline-small-size) / var(--md-sys-typescale-headline-small-line-height) var(--md-sys-typescale-headline-small-font);
  --irl-font-title-large: var(--md-sys-typescale-title-large-weight) var(--md-sys-typescale-title-large-size) / var(--md-sys-typescale-title-large-line-height) var(--md-sys-typescale-title-large-font);
  --irl-font-title-medium: var(--md-sys-typescale-title-medium-weight) var(--md-sys-typescale-title-medium-size) / var(--md-sys-typescale-title-medium-line-height) var(--md-sys-typescale-title-medium-font);
  --irl-font-title-small: var(--md-sys-typescale-title-small-weight) var(--md-sys-typescale-title-small-size) / var(--md-sys-typescale-title-small-line-height) var(--md-sys-typescale-title-small-font);
  --irl-font-body-large: var(--md-sys-typescale-body-large-weight) var(--md-sys-typescale-body-large-size) / var(--md-sys-typescale-body-large-line-height) var(--md-sys-typescale-body-large-font);
  --irl-font-body-medium: var(--md-sys-typescale-body-medium-weight) var(--md-sys-typescale-body-medium-size) / var(--md-sys-typescale-body-medium-line-height) var(--md-sys-typescale-body-medium-font);
  --irl-font-body-small: var(--md-sys-typescale-body-small-weight) var(--md-sys-typescale-body-small-size) / var(--md-sys-typescale-body-small-line-height) var(--md-sys-typescale-body-small-font);
  --irl-font-label-large: var(--md-sys-typescale-label-large-weight) var(--md-sys-typescale-label-large-size) / var(--md-sys-typescale-label-large-line-height) var(--md-sys-typescale-label-large-font);
  --irl-font-label-medium: var(--md-sys-typescale-label-medium-weight) var(--md-sys-typescale-label-medium-size) / var(--md-sys-typescale-label-medium-line-height) var(--md-sys-typescale-label-medium-font);
  --irl-font-label-small: var(--md-sys-typescale-label-small-weight) var(--md-sys-typescale-label-small-size) / var(--md-sys-typescale-label-small-line-height) var(--md-sys-typescale-label-small-font);

  /* Shape */
  --md-sys-shape-corner-none: 0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;

  /* Elevation, as Material's two-part shadows */
  --md-sys-elevation-level0: none;
  --md-sys-elevation-level1: 0 1px 2px 0 rgb(10 15 60 / 0.1), 0 1px 3px 1px rgb(10 15 60 / 0.06);
  --md-sys-elevation-level2: 0 1px 2px 0 rgb(10 15 60 / 0.12), 0 2px 6px 2px rgb(10 15 60 / 0.08);
  --md-sys-elevation-level3: 0 1px 3px 0 rgb(10 15 60 / 0.14), 0 4px 8px 3px rgb(10 15 60 / 0.09);
  --md-sys-elevation-level4: 0 2px 3px 0 rgb(10 15 60 / 0.14), 0 6px 10px 4px rgb(10 15 60 / 0.1);
  --md-sys-elevation-level5: 0 4px 4px 0 rgb(10 15 60 / 0.14), 0 8px 12px 6px rgb(10 15 60 / 0.1);

  /* State layers */
  --md-sys-state-hover-state-layer-opacity: 0.08;
  --md-sys-state-focus-state-layer-opacity: 0.1;
  --md-sys-state-pressed-state-layer-opacity: 0.1;
  --md-sys-state-dragged-state-layer-opacity: 0.16;

  /* Motion */
  --md-sys-motion-duration-short1: 50ms;
  --md-sys-motion-duration-short2: 100ms;
  --md-sys-motion-duration-short3: 150ms;
  --md-sys-motion-duration-short4: 200ms;
  --md-sys-motion-duration-medium1: 250ms;
  --md-sys-motion-duration-medium2: 300ms;
  --md-sys-motion-duration-medium3: 350ms;
  --md-sys-motion-duration-medium4: 400ms;
  --md-sys-motion-duration-long1: 450ms;
  --md-sys-motion-duration-long2: 500ms;
  --md-sys-motion-duration-long3: 550ms;
  --md-sys-motion-duration-long4: 600ms;
  --md-sys-motion-duration-extra-long1: 700ms;
  --md-sys-motion-duration-extra-long2: 800ms;
  --md-sys-motion-duration-extra-long3: 900ms;
  --md-sys-motion-duration-extra-long4: 1000ms;
  --md-sys-motion-easing-linear: cubic-bezier(0, 0, 1, 1);
  --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
  --md-sys-motion-easing-standard-decelerate: cubic-bezier(0, 0, 0, 1);
  --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
  --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-sys-motion-easing-legacy: cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing on a 4 px grid */
  --irl-space-1: 4px;
  --irl-space-2: 8px;
  --irl-space-3: 12px;
  --irl-space-4: 16px;
  --irl-space-5: 20px;
  --irl-space-6: 24px;
  --irl-space-7: 28px;
  --irl-space-8: 32px;
  --irl-space-9: 36px;
  --irl-space-10: 40px;
  --irl-space-11: 44px;
  --irl-space-12: 48px;

  /* Material's width breakpoints, for scripts. Media queries write the numbers. */
  --irl-breakpoint-medium: 600px;
  --irl-breakpoint-expanded: 840px;
  --irl-breakpoint-large: 1200px;
}

/* ---------- Color roles. Light everywhere, as the approved screens are. Dark only where data-theme asks. ---------- */

:root,
[data-theme="light"] {
  color-scheme: light;
  --md-sys-color-primary: #0b55f6;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #dbe7ff;
  --md-sys-color-on-primary-container: #0a2a8c;
  --md-sys-color-primary-fixed: #dbe7ff;
  --md-sys-color-primary-fixed-dim: #b4c5ff;
  --md-sys-color-on-primary-fixed: #00174b;
  --md-sys-color-on-primary-fixed-variant: #0a2a8c;
  --md-sys-color-secondary: #2b3a67;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e1e8f9;
  --md-sys-color-on-secondary-container: #131c44;
  --md-sys-color-secondary-fixed: #e1e8f9;
  --md-sys-color-secondary-fixed-dim: #c0c6dd;
  --md-sys-color-on-secondary-fixed: #0f1630;
  --md-sys-color-on-secondary-fixed-variant: #2b3a67;
  --md-sys-color-tertiary: #c2410c;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #ffe2d1;
  --md-sys-color-on-tertiary-container: #7a2500;
  --md-sys-color-tertiary-fixed: #ffe2d1;
  --md-sys-color-tertiary-fixed-dim: #ffb59a;
  --md-sys-color-on-tertiary-fixed: #390c00;
  --md-sys-color-on-tertiary-fixed-variant: #7a2500;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #93000a;
  --md-sys-color-background: #ffffff;
  --md-sys-color-on-background: #0a0f3c;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #0a0f3c;
  --md-sys-color-surface-variant: #e6eaf5;
  --md-sys-color-on-surface-variant: #464c6a;
  --md-sys-color-surface-dim: #dfe3ee;
  --md-sys-color-surface-bright: #ffffff;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f6f8fd;
  --md-sys-color-surface-container: #f0f3fa;
  --md-sys-color-surface-container-high: #eaeef7;
  --md-sys-color-surface-container-highest: #e2e7f3;
  --md-sys-color-outline: #747a96;
  --md-sys-color-outline-variant: #cfd6e6;
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;
  --md-sys-color-surface-tint: #0b55f6;
  --md-sys-color-inverse-surface: #1b2147;
  --md-sys-color-inverse-on-surface: #eef1ff;
  --md-sys-color-inverse-primary: #b4c5ff;
  --irl-ok-container: #c8f7bb;
  --irl-on-ok-container: #0e4a14;
  --irl-warn-container: #ffe7b8;
  --irl-on-warn-container: #6b4700;
  --irl-no-container: #ffdad6;
  --irl-on-no-container: #93000a;
}

[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #b4c5ff;
  --md-sys-color-on-primary: #002a78;
  --md-sys-color-primary-container: #0040b8;
  --md-sys-color-on-primary-container: #dbe1ff;
  --md-sys-color-primary-fixed: #dbe7ff;
  --md-sys-color-primary-fixed-dim: #b4c5ff;
  --md-sys-color-on-primary-fixed: #00174b;
  --md-sys-color-on-primary-fixed-variant: #0a2a8c;
  --md-sys-color-secondary: #c0c6dd;
  --md-sys-color-on-secondary: #2a3042;
  --md-sys-color-secondary-container: #404659;
  --md-sys-color-on-secondary-container: #dce2f9;
  --md-sys-color-secondary-fixed: #e1e8f9;
  --md-sys-color-secondary-fixed-dim: #c0c6dd;
  --md-sys-color-on-secondary-fixed: #0f1630;
  --md-sys-color-on-secondary-fixed-variant: #2b3a67;
  --md-sys-color-tertiary: #ffb59a;
  --md-sys-color-on-tertiary: #5a1c00;
  --md-sys-color-tertiary-container: #7f2b00;
  --md-sys-color-on-tertiary-container: #ffdbcf;
  --md-sys-color-tertiary-fixed: #ffe2d1;
  --md-sys-color-tertiary-fixed-dim: #ffb59a;
  --md-sys-color-on-tertiary-fixed: #390c00;
  --md-sys-color-on-tertiary-fixed-variant: #7a2500;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-background: #11131a;
  --md-sys-color-on-background: #e2e2ec;
  --md-sys-color-surface: #11131a;
  --md-sys-color-on-surface: #e2e2ec;
  --md-sys-color-surface-variant: #44464f;
  --md-sys-color-on-surface-variant: #c5c6d0;
  --md-sys-color-surface-dim: #11131a;
  --md-sys-color-surface-bright: #373942;
  --md-sys-color-surface-container-lowest: #0c0e14;
  --md-sys-color-surface-container-low: #191b23;
  --md-sys-color-surface-container: #1d1f27;
  --md-sys-color-surface-container-high: #282a32;
  --md-sys-color-surface-container-highest: #33353d;
  --md-sys-color-outline: #8f909a;
  --md-sys-color-outline-variant: #44464f;
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;
  --md-sys-color-surface-tint: #b4c5ff;
  --md-sys-color-inverse-surface: #e2e2ec;
  --md-sys-color-inverse-on-surface: #2e3038;
  --md-sys-color-inverse-primary: #0b55f6;
  --irl-ok-container: #12412a;
  --irl-on-ok-container: #a9e5bb;
  --irl-warn-container: #4d3600;
  --irl-on-warn-container: #ffd98a;
  --irl-no-container: #5c1a14;
  --irl-on-no-container: #ffb4ab;
}

/* ==================== Everything below is a component. No literal colors from here on. ==================== */

[class^="l-"],
[class*=" l-"],
[class^="l-"]::before,
[class*=" l-"]::before,
[class^="l-"]::after,
[class*=" l-"]::after {
  box-sizing: border-box;
}

/* ---------- Base ---------- */

.l-surface {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.l-icon {
  display: inline-block;
  flex: none;
  width: var(--l-icon-size, 24px);
  height: var(--l-icon-size, 24px);
  vertical-align: middle;
}
/* Doubled so it beats the font shorthand of any one-class rule it is combined with. */
.l-nums.l-nums { font-variant-numeric: tabular-nums; }
.l-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.l-link { color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 0.15em; border-radius: var(--md-sys-shape-corner-extra-small); }

.l-display-large { font: var(--irl-font-display-large); letter-spacing: var(--md-sys-typescale-display-large-tracking); }
.l-display-medium { font: var(--irl-font-display-medium); letter-spacing: var(--md-sys-typescale-display-medium-tracking); }
.l-display-small { font: var(--irl-font-display-small); letter-spacing: var(--md-sys-typescale-display-small-tracking); }
.l-headline-large { font: var(--irl-font-headline-large); letter-spacing: var(--md-sys-typescale-headline-large-tracking); }
.l-headline-medium { font: var(--irl-font-headline-medium); letter-spacing: var(--md-sys-typescale-headline-medium-tracking); }
.l-headline-small { font: var(--irl-font-headline-small); letter-spacing: var(--md-sys-typescale-headline-small-tracking); }
.l-title-large { font: var(--irl-font-title-large); letter-spacing: var(--md-sys-typescale-title-large-tracking); }
.l-title-medium { font: var(--irl-font-title-medium); letter-spacing: var(--md-sys-typescale-title-medium-tracking); }
.l-title-small { font: var(--irl-font-title-small); letter-spacing: var(--md-sys-typescale-title-small-tracking); }
.l-body-large { font: var(--irl-font-body-large); letter-spacing: var(--md-sys-typescale-body-large-tracking); }
.l-body-medium { font: var(--irl-font-body-medium); letter-spacing: var(--md-sys-typescale-body-medium-tracking); }
.l-body-small { font: var(--irl-font-body-small); letter-spacing: var(--md-sys-typescale-body-small-tracking); }
.l-label-large { font: var(--irl-font-label-large); letter-spacing: var(--md-sys-typescale-label-large-tracking); }
.l-label-medium { font: var(--irl-font-label-medium); letter-spacing: var(--md-sys-typescale-label-medium-tracking); }
.l-label-small { font: var(--irl-font-label-small); letter-spacing: var(--md-sys-typescale-label-small-tracking); }

/* ---------- Shared interaction: state layer, touch target, focus ring ---------- */

.l-btn, .l-icon-btn, .l-fab, .l-chip, .l-seg-btn, .l-tab, .l-menu-item, .l-nav-item,
.l-card--action, a.l-card, button.l-card, a.l-list-item, button.l-list-item, .l-list-item--action {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* The state layer paints the content color at Material's opacity. */
.l-btn::before, .l-icon-btn::before, .l-fab::before, .l-chip::before, .l-seg-btn::before, .l-tab::before,
.l-menu-item::before, .l-nav-ind::before, .l-card--action::before, a.l-card::before, button.l-card::before,
a.l-list-item::before, button.l-list-item::before, .l-list-item--action::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .l-btn:hover::before, .l-icon-btn:hover::before, .l-fab:hover::before, .l-chip:hover::before, .l-seg-btn:hover::before,
  .l-tab:hover::before, .l-menu-item:hover::before, .l-nav-item:hover .l-nav-ind::before, .l-card--action:hover::before,
  a.l-card:hover::before, button.l-card:hover::before, a.l-list-item:hover::before, button.l-list-item:hover::before,
  .l-list-item--action:hover::before {
    opacity: var(--md-sys-state-hover-state-layer-opacity);
  }
}
.l-btn:focus-visible::before, .l-icon-btn:focus-visible::before, .l-fab:focus-visible::before, .l-chip:focus-visible::before,
.l-seg-btn:focus-visible::before, .l-tab:focus-visible::before, .l-menu-item:focus-visible::before,
.l-nav-item:focus-visible .l-nav-ind::before, .l-card--action:focus-visible::before, a.l-card:focus-visible::before,
button.l-card:focus-visible::before, a.l-list-item:focus-visible::before, button.l-list-item:focus-visible::before,
.l-list-item--action:focus-visible::before {
  opacity: var(--md-sys-state-focus-state-layer-opacity);
}
.l-btn:active::before, .l-icon-btn:active::before, .l-fab:active::before, .l-chip:active::before, .l-seg-btn:active::before,
.l-tab:active::before, .l-menu-item:active::before, .l-nav-item:active .l-nav-ind::before, .l-card--action:active::before,
a.l-card:active::before, button.l-card:active::before, a.l-list-item:active::before, button.l-list-item:active::before,
.l-list-item--action:active::before {
  opacity: var(--md-sys-state-pressed-state-layer-opacity);
}
.l-dragging::before { opacity: var(--md-sys-state-dragged-state-layer-opacity); }

/* Controls drawn smaller than 48 px still take a 48 px tap. */
.l-btn::after, .l-icon-btn::after, .l-chip::after, .l-seg-btn::after, .l-sunband-wordmark::after, .l-topbar-wordmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 48px);
  height: max(100%, 48px);
  transform: translate(-50%, -50%);
}

.l-btn:focus-visible, .l-icon-btn:focus-visible, .l-fab:focus-visible, .l-chip:focus-visible, .l-seg-btn:focus-visible,
.l-tab:focus-visible, .l-menu-item:focus-visible, .l-nav-item:focus-visible, .l-card--action:focus-visible,
a.l-card:focus-visible, button.l-card:focus-visible, a.l-list-item:focus-visible, button.l-list-item:focus-visible,
.l-list-item--action:focus-visible, .l-link:focus-visible, .l-sunband-wordmark:focus-visible, .l-topbar-wordmark:focus-visible {
  outline: 3px solid var(--md-sys-color-secondary);
  outline-offset: 2px;
}
.l-tab:focus-visible, .l-menu-item:focus-visible, a.l-list-item:focus-visible, button.l-list-item:focus-visible,
.l-list-item--action:focus-visible { outline-offset: -3px; }
.l-sunband :focus-visible, .l-sunband-wordmark:focus-visible { outline-color: var(--irl-yellow); }
/* The inverse surface needs the inverse primary for its ring to show. */
.l-snackbar .l-btn:focus-visible, .l-snackbar .l-icon-btn:focus-visible { outline-color: var(--md-sys-color-inverse-primary); }

/* ---------- l-btn: common buttons, 40 high, full pill ---------- */

.l-btn {
  --l-icon-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  height: 40px;
  min-width: 48px;
  margin: 0;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: var(--irl-font-label-large);
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
}
.l-btn > .l-icon:not(.l-btn-end) { margin-inline-start: -8px; }
.l-btn > .l-icon.l-btn-end { margin-inline-end: -8px; }
@media (hover: hover) {
  .l-btn:not(.l-btn--outlined):not(.l-btn--text):not(.l-btn--quiet):hover { box-shadow: var(--md-sys-elevation-level1); }
}
.l-btn--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.l-btn--outlined { background: transparent; color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
.l-btn--text { background: transparent; color: var(--md-sys-color-primary); padding: 0 11px; }
/* The one secondary look: a hairline outline with 12 px corners, ink words and icon, 44 high. The filled primary stays a pill. */
.l-btn--quiet { height: 44px; border-color: var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); background: transparent; color: var(--md-sys-color-on-surface); }
.l-btn--text > .l-icon:not(.l-btn-end) { margin-inline-start: 0; }
.l-btn--text > .l-icon.l-btn-end { margin-inline-end: 0; }
.l-btn--text:has(> .l-icon:not(.l-btn-end)) { padding-inline-end: 15px; }
.l-btn--text:has(> .l-icon.l-btn-end) { padding-inline-start: 15px; }
.l-btn:disabled, .l-btn[aria-disabled="true"] {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.l-btn--outlined:disabled, .l-btn--outlined[aria-disabled="true"], .l-btn--quiet:disabled, .l-btn--quiet[aria-disabled="true"] {
  background: transparent;
  border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
}
.l-btn--text:disabled, .l-btn--text[aria-disabled="true"] { background: transparent; }

/* ---------- l-icon-btn: 40 visible, 48 to tap ---------- */

.l-icon-btn {
  --l-icon-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
}
.l-icon-btn[aria-pressed="true"] { color: var(--md-sys-color-primary); }
.l-icon-btn--filled { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.l-icon-btn--filled[aria-pressed="false"] { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-primary); }
.l-icon-btn--filled[aria-pressed="true"] { color: var(--md-sys-color-on-primary); }
.l-icon-btn--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.l-icon-btn--tonal[aria-pressed="false"] { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.l-icon-btn--tonal[aria-pressed="true"] { color: var(--md-sys-color-on-secondary-container); }
.l-icon-btn--outlined { border-color: var(--md-sys-color-outline); }
.l-icon-btn--outlined[aria-pressed="true"] { background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); border-color: transparent; }
.l-icon-btn:disabled, .l-icon-btn[aria-disabled="true"] {
  background: transparent;
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: default;
  pointer-events: none;
}
.l-icon-btn--filled:disabled, .l-icon-btn--tonal:disabled { background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }
.l-icon-btn--outlined:disabled { border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }

/* ---------- l-fab: 56, 16 px corners. Mic: a primary circle. Extended: icon and label. ---------- */

.l-fab {
  --l-icon-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: none;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-level3);
  font: var(--irl-font-label-large);
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
  text-decoration: none;
  white-space: nowrap;
}
@media (hover: hover) {
  .l-fab:hover { box-shadow: var(--md-sys-elevation-level4); }
}
.l-fab--mic {
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.l-fab--mic[aria-pressed="true"] {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent), var(--md-sys-elevation-level3);
}
.l-fab--extended { width: auto; min-width: 80px; padding: 0 20px 0 16px; }
.l-fab:disabled {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  box-shadow: none;
  cursor: default;
}

/* ---------- l-chip: assist and filter, 32 high, a full pill, filled when chosen ---------- */

.l-chip {
  --l-icon-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  height: 32px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-label-large);
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.l-chip--assist { color: var(--md-sys-color-on-surface); }
.l-chip > .l-icon { margin-inline-start: -4px; color: var(--md-sys-color-primary); }
.l-chip > .l-icon.l-chip-end { margin-inline: 0 -6px; color: var(--md-sys-color-on-surface-variant); }
/* A chosen chip is filled, so it needs no check. */
.l-chip > .l-chip-check { display: none; }
.l-chip[aria-pressed="true"], .l-chip[aria-checked="true"], .l-chip[aria-selected="true"] {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}
.l-chip[aria-pressed="true"] > .l-icon, .l-chip[aria-checked="true"] > .l-icon, .l-chip[aria-selected="true"] > .l-icon { color: inherit; }
.l-chip:disabled, .l-chip[aria-disabled="true"] {
  border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: default;
  pointer-events: none;
}
.l-chip:disabled > .l-icon { color: inherit; }

/* One row of chips that scrolls sideways. The padding keeps each 48 px tap and each focus ring inside the scroller.
   To line the chips up with a gutter the parent already has, add margin-inline: -6px there. */
.l-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 6px;
  overflow-x: auto;
  /* Sideways only, so a swipe up that starts on the row still moves the page. */
  overflow-y: hidden;
  scrollbar-width: none;
}
.l-chips::-webkit-scrollbar { display: none; }
.l-chips--wrap { flex-wrap: wrap; overflow: visible; }

/* ---------- l-seg: a pair of pills, 36 high, the chosen one filled ---------- */

.l-seg { display: inline-flex; gap: 8px; max-width: 100%; }
.l-seg-btn {
  --l-icon-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 48px;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-label-large);
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
  white-space: nowrap;
}
.l-seg-btn:focus-visible { z-index: 1; }
.l-seg-btn > .l-seg-check { display: none; }
.l-seg-btn > .l-icon { color: var(--md-sys-color-primary); }
.l-seg-btn[aria-pressed="true"], .l-seg-btn[aria-checked="true"], .l-seg-btn[aria-selected="true"] {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}
.l-seg-btn[aria-pressed="true"] > .l-icon, .l-seg-btn[aria-checked="true"] > .l-icon, .l-seg-btn[aria-selected="true"] > .l-icon { color: inherit; }
.l-seg-btn:disabled {
  border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: default;
}

/* ---------- l-card: elevated, filled, outlined, 12 px corners ---------- */

.l-card {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-level1);
  font: inherit;
  text-align: start;
  text-decoration: none;
  --l-field-bg: var(--md-sys-color-surface);
}
button.l-card { width: 100%; }
.l-card--filled { background: var(--md-sys-color-surface-container-highest); box-shadow: none; --l-field-bg: var(--md-sys-color-surface-container-highest); }
.l-card--outlined { background: var(--md-sys-color-surface); border-color: var(--md-sys-color-outline-variant); box-shadow: none; --l-field-bg: var(--md-sys-color-surface); }
.l-card--flush { padding: 0; overflow: hidden; }
@media (hover: hover) {
  .l-card--action:hover, a.l-card:hover, button.l-card:hover { box-shadow: var(--md-sys-elevation-level2); }
  .l-card--filled.l-card--action:hover, a.l-card--filled:hover, button.l-card--filled:hover,
  .l-card--outlined.l-card--action:hover, a.l-card--outlined:hover, button.l-card--outlined:hover { box-shadow: var(--md-sys-elevation-level1); }
}

/* One row of whole tags. A tag that does not fit wraps to a second row, which is clipped away. */
.l-tags { display: flex; flex-wrap: wrap; gap: 8px 4px; min-width: 0; height: 24px; overflow: hidden; }
.l-tags > .l-pill { flex: none; }

/* An event or listing card: the picture or lettered tile the server gives, the words, and actions at the end. */
.l-card--event {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 10px;
}
.l-card-media {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-highest);
  object-fit: cover;
}
.l-card-media--wide { width: 100%; height: auto; aspect-ratio: 5 / 3; }
.l-card--flush > .l-card-media--wide { border-radius: 0; }
.l-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.l-card--flush > .l-card-body { padding: 16px; }
.l-card-title {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font: 700 0.9375rem / 1.25rem var(--md-ref-typeface-plain);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.l-card-meta {
  --l-icon-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font: 400 0.8125rem / 1.125rem var(--md-ref-typeface-plain);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.l-card-body > .l-tags { margin-top: 6px; }
.l-card-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: -4px -4px 0 0; }
/* The number that pairs a card with its pin on the map, on the picture's corner. */
.l-card-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--irl-rank);
  color: var(--irl-on-rank);
  box-shadow: 0 0 0 2px var(--md-sys-color-surface);
  font: var(--irl-font-label-small);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
/* A list of cards: one column, and two from 600 px with l-cards--two. */
.l-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 600px) {
  .l-cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- l-list and l-list-item ---------- */

.l-list { margin: 0; padding: 8px 0; list-style: none; }
.l-list-header {
  margin: 0;
  padding: 16px 16px 8px;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-label-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.l-list-item {
  --l-icon-size: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 8px 24px 8px 16px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  text-align: start;
  text-decoration: none;
}
.l-list-item--two-line { min-height: 72px; }
.l-list-item--three-line { min-height: 88px; align-items: flex-start; padding-block: 12px; }
.l-list-item-lead { display: inline-flex; flex: none; align-items: center; color: var(--md-sys-color-on-surface-variant); }
.l-list-item-body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.l-list-item-title { color: var(--md-sys-color-on-surface); font: var(--irl-font-body-large); letter-spacing: var(--md-sys-typescale-body-large-tracking); overflow-wrap: anywhere; }
.l-list-item-support { color: var(--md-sys-color-on-surface-variant); font: var(--irl-font-body-medium); letter-spacing: var(--md-sys-typescale-body-medium-tracking); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.l-list-item-trail {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-label-small);
  letter-spacing: var(--md-sys-typescale-label-small-tracking);
}
.l-list-item--off .l-list-item-title { color: var(--md-sys-color-on-surface-variant); text-decoration: line-through; }
/* As in Material, the title keeps to one line, and the support text to one line in a two-line item and two in a three-line item. */
.l-list-item-title, .l-list-item--two-line .l-list-item-support { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-list-item--three-line .l-list-item-support { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* ---------- l-topbar: top app bar, 52 high on a phone ---------- */

.l-topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(4px, env(safe-area-inset-right, 0px)) 0 max(4px, env(safe-area-inset-left, 0px));
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}
.l-topbar > .l-icon-btn, .l-topbar > .l-avatar { margin: 2px; }
/* The brand bar: back at the start, the wordmark in the middle, share and the heart at the end. */
.l-topbar--brand { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; }
.l-topbar-start { display: flex; align-items: center; justify-self: start; }
.l-topbar-end { display: flex; align-items: center; justify-self: end; }
.l-topbar-start > .l-icon-btn, .l-topbar-end > .l-icon-btn { margin: 2px; color: var(--md-sys-color-on-surface); }
.l-topbar--sticky { position: sticky; top: 0; z-index: 10; }
.l-topbar--scrolled { background: var(--md-sys-color-surface-container); }
.l-topbar-text { display: flex; flex: 1; flex-direction: column; justify-content: center; min-width: 0; padding-inline: 4px; }
.l-topbar-text:first-child { padding-inline-start: 12px; }
.l-topbar-title {
  margin: 0;
  overflow: hidden;
  color: var(--md-sys-color-on-surface);
  font: 800 1.125rem / 1.5rem var(--md-ref-typeface-brand);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.l-topbar-sub {
  overflow: hidden;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-body-medium);
  letter-spacing: var(--md-sys-typescale-body-medium-tracking);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.l-topbar--center .l-topbar-text { align-items: center; text-align: center; }
.l-topbar-spacer { flex: none; width: 48px; height: 48px; }
/* The wordmark on the surface, in ink, with the orange stroke under it. */
.l-topbar-wordmark {
  position: relative;
  margin-inline: auto;
  padding: 2px 6px 9px;
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-surface);
  font: 800 1.3125rem / 1 var(--md-ref-typeface-brand);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.l-topbar-live { font-style: italic; font-weight: 900; }
/* Drawn from the wordmark's mark but placed against the whole wordmark, whose own ::after is its tap target. */
.l-topbar-live::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 2px;
  left: 4px;
  height: 6px;
  background: var(--irl-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M0 5.4C27 .9 66 .1 100 2.4 67 2.3 30 3.5 0 5.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M0 5.4C27 .9 66 .1 100 2.4 67 2.3 30 3.5 0 5.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ---------- l-sunband: the brand header, a dusk sky. Words sit over its upper, darker part. ---------- */

.l-sunband {
  --l-sun-warm: calc(24px + env(safe-area-inset-top, 0px));
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: var(--l-sun-warm) max(8px, env(safe-area-inset-right, 0px)) 12px max(8px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, var(--irl-dusk-1) 0, var(--irl-dusk-2) 30%, var(--irl-dusk-3) 58%, var(--irl-dusk-4) 84%, var(--irl-dusk-5) 100%);
  color: var(--irl-on-sun);
}
.l-sunband-start { grid-column: 1; justify-self: start; }
.l-sunband-end { grid-column: 3; justify-self: end; }
.l-sunband .l-icon-btn { color: var(--irl-on-sun); }
.l-sunband .l-icon-btn--outlined { border-color: var(--irl-on-sun); }
.l-sunband-wordmark {
  position: relative;
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 2px 8px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-small);
  background: none;
  color: inherit;
  font-family: var(--md-ref-typeface-brand);
  font-size: var(--md-sys-typescale-headline-small-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.l-sunband-live { position: relative; color: var(--irl-yellow); font-style: italic; font-weight: 900; }
/* The hand-drawn stroke under the wordmark's mark, rising to the right. */
.l-sunband-live::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -5px;
  left: -2px;
  height: 5px;
  background: var(--irl-yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M0 5.4C27 .9 66 .1 100 2.4 67 2.3 30 3.5 0 5.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M0 5.4C27 .9 66 .1 100 2.4 67 2.3 30 3.5 0 5.4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.l-sunband-tagline {
  margin-top: 8px;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--md-sys-color-scrim) 35%, transparent);
  font: var(--irl-font-label-medium);
  letter-spacing: 0.02em;
}
.l-sunband--compact { --l-sun-warm: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; background: linear-gradient(180deg, var(--irl-dusk-1) 0, var(--irl-dusk-2) 55%, var(--irl-dusk-3) 100%); }
.l-sunband--compact .l-sunband-live::after { display: none; }
.l-sunband--compact .l-sunband-wordmark { font-size: var(--md-sys-typescale-title-large-size); }
.l-sunband--compact .l-sunband-tagline { display: none; }
.l-sunband--overlap { padding-bottom: 40px; }
.l-sunband--sticky { position: sticky; top: 0; z-index: 10; }

/* ---------- l-search: search bar, 48 high ---------- */

.l-search {
  --l-icon-size: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 48px;
  padding: 0 6px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
}
.l-search--overlap { position: relative; margin-top: -24px; border-color: transparent; box-shadow: var(--md-sys-elevation-level3); }
.l-search > .l-icon { margin-inline: 8px 4px; color: var(--md-sys-color-primary); }
.l-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  outline: none;
  appearance: none;
}
.l-search-input::placeholder { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
.l-search:has(> .l-search-input:focus-visible) { outline: 3px solid var(--md-sys-color-secondary); outline-offset: 2px; }

/* ---------- l-nav: navigation bar, 56 high. l-rail: the same places down the side. ---------- */

.l-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  justify-items: center;
  height: calc(var(--irl-nav-height) + var(--irl-safe-bottom));
  padding: 0 env(safe-area-inset-right, 0px) var(--irl-safe-bottom) env(safe-area-inset-left, 0px);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}
.l-nav-item {
  --l-icon-size: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  height: var(--irl-nav-height);
  margin: 0;
  padding: 3px 0 5px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-medium);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: 600 0.6875rem / 1rem var(--md-ref-typeface-plain);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.l-nav-ind {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: var(--md-sys-shape-corner-full);
}
.l-nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-nav-item[aria-current="page"] { color: var(--md-sys-color-primary); font-weight: 700; }
/* The microphone rises 6 px above the bar's top edge, as the approved screens draw it. */
.l-nav > .l-fab--mic { align-self: start; width: 52px; height: 52px; margin-top: -6px; box-shadow: var(--md-sys-elevation-level2); }

.l-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 80px;
  padding: 12px 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
}
.l-rail > .l-fab { margin-bottom: 16px; }
.l-rail .l-nav-item { width: 80px; height: auto; min-height: 56px; padding: 0; }
.l-rail .l-nav-ind { width: 56px; }

/* The app's own bar and rail: the bar below 600 px, the rail from 600 px. */
.l-nav--app { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; }
.l-rail--app {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: none;
  width: calc(80px + env(safe-area-inset-left, 0px));
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px env(safe-area-inset-left, 0px);
}
.l-page { --l-snackbar-offset: var(--irl-nav-height); min-height: 100dvh; padding-bottom: calc(var(--irl-nav-height) + var(--irl-safe-bottom)); }
@media (min-width: 600px) {
  .l-nav--app { display: none; }
  .l-rail--app { display: flex; }
  .l-page { --l-snackbar-offset: 0px; padding-bottom: 0; padding-left: calc(80px + env(safe-area-inset-left, 0px)); }
}

/* Content width: 16 px margins on a phone and 24 from 600 px, and no wider than the large breakpoint. Two panes from 840 px. */
.l-page-body {
  width: 100%;
  max-width: var(--irl-breakpoint-large);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.l-panes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 600px) {
  .l-page-body { padding-inline: 24px max(24px, env(safe-area-inset-right, 0px)); }
}
@media (min-width: 840px) {
  .l-panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- l-tabs: primary tabs, 44 high ---------- */

.l-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  scrollbar-width: none;
}
.l-tabs::-webkit-scrollbar { display: none; }
.l-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: 500 0.9375rem / 1.25rem var(--md-ref-typeface-plain);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.l-tabs--scroll .l-tab { flex: none; }
.l-tab-label { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 100%; }
.l-tab[aria-selected="true"] { font-weight: 800; }
.l-tab[aria-selected="true"] .l-tab-label::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 0;
  left: -10px;
  height: 3px;
  border-radius: 3px;
  background: var(--md-sys-color-primary);
}

/* ---------- l-field: outlined text field with a floating label and support text ---------- */

.l-field { display: flex; flex-direction: column; min-width: 0; }
.l-field-box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: transparent;
  color: var(--md-sys-color-on-surface);
}
@media (hover: hover) {
  .l-field-box:hover { border-color: var(--md-sys-color-on-surface); }
}
.l-field-box:has(> .l-field-input:focus) { border-color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); }
.l-field-input {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  caret-color: var(--md-sys-color-primary);
  outline: none;
  appearance: none;
}
textarea.l-field-input { min-height: 104px; padding-block: 16px; resize: vertical; }
select.l-field-input { padding-inline-end: 48px; cursor: pointer; }
.l-field-input::placeholder { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
.l-field-box:has(> .l-field-label) > .l-field-input:not(:focus)::placeholder { color: transparent; }
.l-field-label {
  position: absolute;
  top: 28px;
  inset-inline-start: 12px;
  max-width: calc(100% - 24px);
  padding: 0 4px;
  overflow: hidden;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}
.l-field-start ~ .l-field-label { inset-inline-start: 48px; }
.l-field-input:focus ~ .l-field-label,
.l-field-input:not(:placeholder-shown) ~ .l-field-label {
  top: 0;
  inset-inline-start: 12px;
  background: var(--l-field-bg, var(--md-sys-color-surface));
  font: var(--irl-font-body-small);
  letter-spacing: var(--md-sys-typescale-body-small-tracking);
}
.l-field-input:focus ~ .l-field-label { color: var(--md-sys-color-primary); }
.l-field-start { display: inline-flex; flex: none; margin-inline-start: 12px; color: var(--md-sys-color-on-surface-variant); }
.l-field-end { display: inline-flex; flex: none; align-items: center; margin-inline-end: 4px; color: var(--md-sys-color-on-surface-variant); }
.l-field-end > .l-icon { margin-inline: 8px; pointer-events: none; }
.l-field-support {
  margin: 4px 0 0;
  padding: 0 16px;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-body-small);
  letter-spacing: var(--md-sys-typescale-body-small-tracking);
}
.l-field--error .l-field-box, .l-field-box:has(> [aria-invalid="true"]) { border-color: var(--md-sys-color-error); }
.l-field--error .l-field-box:has(> .l-field-input:focus), .l-field-box:has(> [aria-invalid="true"]:focus) {
  border-color: var(--md-sys-color-error);
  box-shadow: inset 0 0 0 1px var(--md-sys-color-error);
}
.l-field--error .l-field-label, .l-field--error .l-field-input:focus ~ .l-field-label, .l-field--error .l-field-support,
.l-field-input[aria-invalid="true"] ~ .l-field-label, .l-field:has(.l-field-input[aria-invalid="true"]) > .l-field-support { color: var(--md-sys-color-error); }
.l-field--error .l-field-input, .l-field-input[aria-invalid="true"] { caret-color: var(--md-sys-color-error); }
.l-field-box:has(> .l-field-input:disabled) {
  border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
}
.l-field-input:disabled, .l-field-input:disabled ~ .l-field-label { color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); }
.l-field--pill .l-field-box { border-radius: var(--md-sys-shape-corner-full); }
.l-field--pill .l-field-input { padding-inline: 20px 12px; }

/* ---------- l-menu: a list on a popover, and a sheet below 600 px ---------- */

.l-menu {
  display: flex;
  flex-direction: column;
  min-width: 112px;
  max-width: 280px;
  margin: 0;
  padding: 8px 0;
  overflow: auto;
  border: 0;
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-level2);
  --l-field-bg: var(--md-sys-color-surface-container);
}
/* Set --l-menu-top and --l-menu-left from the anchor when it opens. */
.l-menu[popover] { position: fixed; inset: auto; top: var(--l-menu-top, 50%); left: var(--l-menu-left, 50%); max-height: calc(100dvh - 32px); }
.l-menu[popover]:not(:popover-open) { display: none; }
@media (max-width: 599.98px) {
  .l-menu[popover] {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    padding: 8px 0 calc(8px + var(--irl-safe-bottom));
    border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
    background: var(--md-sys-color-surface-container-low);
    box-shadow: var(--md-sys-elevation-level1);
    --l-field-bg: var(--md-sys-color-surface-container-low);
  }
  .l-menu[popover]::backdrop { background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent); }
}
.l-menu-item {
  --l-icon-size: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-label-large);
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
  text-align: start;
  text-decoration: none;
}
.l-menu-item > .l-icon { color: var(--md-sys-color-on-surface-variant); }
.l-menu-item[aria-checked="true"], .l-menu-item[aria-selected="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.l-menu-item[aria-checked="true"] > .l-icon, .l-menu-item[aria-selected="true"] > .l-icon { color: inherit; }
.l-menu-item-trail { margin-inline-start: auto; color: var(--md-sys-color-on-surface-variant); }
.l-menu-item:disabled { color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); cursor: default; }
.l-menu > .l-divider { margin-block: 8px; }

/* ---------- l-switch, l-check, l-radio: a native input over a drawn control ---------- */

.l-switch, .l-check, .l-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.l-switch { gap: 16px; }
.l-switch-input, .l-check-input, .l-radio-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.l-switch-track {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
  box-shadow: inset 0 0 0 2px var(--md-sys-color-outline);
}
.l-switch-track::before, .l-switch-track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.l-switch-track::before { width: 40px; height: 40px; background: var(--md-sys-color-on-surface); opacity: 0; }
.l-switch-track::after { width: 16px; height: 16px; background: var(--md-sys-color-outline); }
.l-switch-input:checked + .l-switch-track { background: var(--md-sys-color-primary); box-shadow: none; }
.l-switch-input:checked + .l-switch-track::before { left: 36px; background: var(--md-sys-color-primary); }
.l-switch-input:checked + .l-switch-track::after { left: 36px; width: 24px; height: 24px; background: var(--md-sys-color-on-primary); }
.l-switch-input:active + .l-switch-track::after { width: 28px; height: 28px; }
.l-switch-input:not(:checked):active + .l-switch-track::after { background: var(--md-sys-color-on-surface-variant); }

.l-check-box {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 15px;
  border: 2px solid var(--md-sys-color-on-surface-variant);
  border-radius: 2px;
}
.l-check-box::before, .l-radio-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--md-sys-color-on-surface);
  opacity: 0;
  transform: translate(-50%, -50%);
}
.l-check-box::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4.5px;
  width: 5px;
  height: 10px;
  border: solid var(--md-sys-color-on-primary);
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg);
}
.l-check-input:checked + .l-check-box, .l-check-input:indeterminate + .l-check-box { border-color: var(--md-sys-color-primary); background: var(--md-sys-color-primary); }
.l-check-input:checked + .l-check-box::after { opacity: 1; }
.l-check-input:indeterminate + .l-check-box::after { top: 6px; left: 3px; width: 8px; height: 2px; border: 0; background: var(--md-sys-color-on-primary); opacity: 1; transform: none; }
.l-check-input:checked + .l-check-box::before, .l-check-input:indeterminate + .l-check-box::before { background: var(--md-sys-color-primary); }
.l-check-input[aria-invalid="true"] + .l-check-box { border-color: var(--md-sys-color-error); }

.l-radio-dot {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 14px;
  border: 2px solid var(--md-sys-color-on-surface-variant);
  border-radius: 50%;
}
.l-radio-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  transform: translate(-50%, -50%) scale(0);
}
.l-radio-input:checked + .l-radio-dot { border-color: var(--md-sys-color-primary); }
.l-radio-input:checked + .l-radio-dot::after { transform: translate(-50%, -50%) scale(1); }
.l-radio-input:checked + .l-radio-dot::before { background: var(--md-sys-color-primary); }

@media (hover: hover) {
  .l-switch:hover .l-switch-track::before, .l-check:hover .l-check-box::before, .l-radio:hover .l-radio-dot::before { opacity: var(--md-sys-state-hover-state-layer-opacity); }
}
.l-switch-input:focus-visible + .l-switch-track::before, .l-check-input:focus-visible + .l-check-box::before,
.l-radio-input:focus-visible + .l-radio-dot::before { opacity: var(--md-sys-state-focus-state-layer-opacity); }
.l-switch-input:active + .l-switch-track::before, .l-check-input:active + .l-check-box::before,
.l-radio-input:active + .l-radio-dot::before { opacity: var(--md-sys-state-pressed-state-layer-opacity); }
.l-switch-input:focus-visible + .l-switch-track, .l-check-input:focus-visible + .l-check-box, .l-radio-input:focus-visible + .l-radio-dot {
  outline: 3px solid var(--md-sys-color-secondary);
  outline-offset: 4px;
}
.l-switch:has(> :disabled), .l-check:has(> :disabled), .l-radio:has(> :disabled) {
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  cursor: default;
}
.l-switch-input:disabled + .l-switch-track, .l-check-input:disabled + .l-check-box, .l-radio-input:disabled + .l-radio-dot { opacity: 0.38; }

/* ---------- l-sheet: bottom sheet on a native dialog, modal and non-modal ---------- */

.l-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 0 0 calc(16px + var(--irl-safe-bottom));
  border: 0;
  border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-level1);
  --l-field-bg: var(--md-sys-color-surface-container-low);
}
.l-sheet-handle {
  flex: none;
  align-self: center;
  width: 32px;
  height: 4px;
  margin: 22px 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 40%, transparent);
}
/* The top padding holds a first field's floated label, and the bottom one a last button's tap target. */
.l-sheet-body { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 8px 16px 4px; overflow: auto; }
dialog.l-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  max-width: min(640px, 100%);
  max-height: calc(100dvh - 72px);
  margin: 0 auto;
  overflow: auto;
}
dialog.l-sheet:not([open]) { display: none; }
dialog.l-sheet::backdrop, dialog.l-dialog::backdrop { background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent); }

/* ---------- l-dialog: basic dialog ---------- */

.l-dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 280px;
  max-width: min(560px, calc(100vw - 48px));
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-level3);
  --l-field-bg: var(--md-sys-color-surface-container-high);
}
dialog.l-dialog { position: fixed; inset: 0; z-index: 40; max-height: calc(100dvh - 48px); margin: auto; overflow: auto; }
dialog.l-dialog:not([open]) { display: none; }
.l-dialog-icon { --l-icon-size: 24px; align-self: center; color: var(--md-sys-color-secondary); }
.l-dialog-headline { margin: 0; color: var(--md-sys-color-on-surface); font: var(--irl-font-headline-small); letter-spacing: var(--md-sys-typescale-headline-small-tracking); }
.l-dialog-icon ~ .l-dialog-headline { text-align: center; }
.l-dialog-body { margin: 0; color: var(--md-sys-color-on-surface-variant); font: var(--irl-font-body-medium); letter-spacing: var(--md-sys-typescale-body-medium-tracking); }
.l-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- l-snackbar ---------- */

.l-snackbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  max-width: 560px;
  margin: 0;
  padding: 0 8px 0 16px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  box-shadow: var(--md-sys-elevation-level3);
  font: var(--irl-font-body-medium);
  letter-spacing: var(--md-sys-typescale-body-medium-tracking);
}
.l-snackbar-text { flex: 1; min-width: 0; padding-block: 14px; }
.l-snackbar .l-btn--text { color: var(--md-sys-color-inverse-primary); }
.l-snackbar .l-icon-btn { color: var(--md-sys-color-inverse-on-surface); }
/* Screens with the bottom bar lift it with --l-snackbar-offset. */
.l-snackbar[popover] {
  position: fixed;
  inset: auto 16px calc(16px + var(--l-snackbar-offset, 0px) + var(--irl-safe-bottom)) 16px;
  width: auto;
  margin: 0 auto;
  overflow: visible;
}
.l-snackbar[popover]:not(:popover-open) { display: none; }

/* ---------- l-pill: status tag. l-badge: count or dot. ---------- */

.l-pill {
  --l-icon-size: 16px;
  display: inline-block;
  max-width: 100%;
  height: 24px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-label-medium);
  font-weight: 700;
  line-height: 24px;
  letter-spacing: var(--md-sys-typescale-label-medium-tracking);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.l-pill--ok { background: var(--irl-ok-container); color: var(--irl-on-ok-container); }
.l-pill--warn { background: var(--irl-warn-container); color: var(--irl-on-warn-container); }
.l-pill--no { background: var(--irl-no-container); color: var(--irl-on-no-container); }
.l-pill--soft { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }

.l-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
  font: var(--irl-font-label-small);
  letter-spacing: var(--md-sys-typescale-label-small-tracking);
  font-variant-numeric: tabular-nums;
}
.l-badge--dot { width: 6px; min-width: 6px; height: 6px; padding: 0; }
.l-nav-ind > .l-badge, .l-icon-btn > .l-badge { position: absolute; top: 2px; left: calc(50% + 4px); }
.l-nav-ind > .l-badge--dot, .l-icon-btn > .l-badge--dot { top: 4px; left: calc(50% + 6px); }

/* ---------- l-daytile: month over day, and the weekday under it when given ---------- */

.l-daytile {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 56px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.l-daytile-month {
  color: var(--md-sys-color-on-surface);
  font: var(--irl-font-label-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}
.l-daytile-day {
  margin-top: 2px;
  font-family: var(--md-ref-typeface-brand);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: 800;
  line-height: 1;
}
.l-daytile-dow { margin-top: 2px; color: var(--md-sys-color-on-surface-variant); font: 500 0.6875rem / 1 var(--md-ref-typeface-plain); }
.l-daytile:has(.l-daytile-dow) { height: 64px; }
.l-daytile--off { color: var(--md-sys-color-on-surface-variant); }
.l-daytile--off .l-daytile-month { color: var(--md-sys-color-on-surface-variant); }

/* ---------- l-msg: conversation bubbles, the channel marker and notes ---------- */

.l-thread { display: flex; flex-direction: column; gap: 8px; }
.l-msg {
  max-width: min(80%, 34rem);
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-corner-large);
  font: var(--irl-font-body-large);
  letter-spacing: var(--md-sys-typescale-body-large-tracking);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
/* The person's own words are filled blue, so a thread reads as a text thread at a glance. */
.l-msg--mine { align-self: flex-end; border-end-end-radius: var(--md-sys-shape-corner-extra-small); background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.l-msg--theirs { align-self: flex-start; border-end-start-radius: var(--md-sys-shape-corner-extra-small); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); }
.l-msg-marker {
  --l-icon-size: 16px;
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-label-medium);
  letter-spacing: var(--md-sys-typescale-label-medium-tracking);
  font-variant-numeric: tabular-nums;
}
.l-msg-note {
  align-self: center;
  max-width: 80%;
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--irl-font-body-small);
  letter-spacing: var(--md-sys-typescale-body-small-tracking);
  text-align: center;
}

/* ---------- l-avatar ---------- */

.l-avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-family: var(--md-ref-typeface-brand);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.l-avatar img { width: 100%; height: 100%; object-fit: cover; }
.l-avatar--sm { width: 32px; height: 32px; font-size: 0.875rem; }
.l-avatar--lg { width: 56px; height: 56px; font-size: 1.375rem; }
.l-avatar--dubi { border-radius: var(--md-sys-shape-corner-medium); background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-size: 1.25rem; text-transform: none; }

/* ---------- l-progress, l-skeleton, l-divider ---------- */

.l-progress {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
}
.l-progress-bar { position: absolute; top: 0; bottom: 0; left: 0; width: var(--l-progress, 0%); border-radius: inherit; background: var(--md-sys-color-primary); }
.l-progress:not([aria-valuenow]) .l-progress-bar { width: 40%; }

.l-skeleton { display: block; border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-highest); }
.l-skeleton--text { height: 1em; border-radius: var(--md-sys-shape-corner-extra-small); }
.l-skeleton--circle { border-radius: 50%; }

.l-divider { display: block; flex: none; height: 0; margin: 0; border: 0; border-top: 1px solid var(--md-sys-color-outline-variant); }
.l-divider--inset { margin-inline-start: 16px; }
.l-divider--vertical { align-self: stretch; width: 0; height: auto; border-top: 0; border-inline-start: 1px solid var(--md-sys-color-outline-variant); }

/* ---------- Motion. Everything moves only when the person has not asked for less. ---------- */

@media (prefers-reduced-motion: no-preference) {
  .l-btn, .l-icon-btn, .l-fab, .l-chip, .l-seg-btn, .l-card, .l-nav-ind, .l-tab, .l-field-box, .l-menu-item {
    transition-property: background-color, border-color, box-shadow, color;
    transition-duration: var(--md-sys-motion-duration-short4);
    transition-timing-function: var(--md-sys-motion-easing-standard);
  }
  .l-btn::before, .l-icon-btn::before, .l-fab::before, .l-chip::before, .l-seg-btn::before, .l-tab::before,
  .l-menu-item::before, .l-nav-ind::before, .l-card::before, .l-list-item::before,
  .l-switch-track::before, .l-check-box::before, .l-radio-dot::before {
    transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-linear);
  }
  .l-switch-track::after {
    transition-property: left, width, height, background-color;
    transition-duration: var(--md-sys-motion-duration-medium1);
    transition-timing-function: var(--md-sys-motion-easing-emphasized);
  }
  .l-switch-track { transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
  .l-switch-track::before { transition: left var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized), opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-linear); }
  .l-check-box::after { transition: opacity var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard); }
  .l-radio-dot::after { transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized-decelerate); }
  .l-field-label {
    transition-property: top, inset-inline-start, font-size, line-height, color;
    transition-duration: var(--md-sys-motion-duration-short4);
    transition-timing-function: var(--md-sys-motion-easing-standard);
  }
  .l-sunband { transition: padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard); }
  .l-sunband-wordmark { transition: font-size var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard); }
  dialog.l-sheet[open] { animation: l-rise var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-emphasized-decelerate); }
  dialog.l-dialog[open] { animation: l-appear var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate); }
  .l-menu[popover]:popover-open { animation: l-appear var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized-decelerate); }
  .l-snackbar[popover]:popover-open { animation: l-rise var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized-decelerate); }
  .l-progress:not([aria-valuenow]) .l-progress-bar { animation: l-slide 1.6s var(--md-sys-motion-easing-standard) infinite; }
  .l-skeleton { animation: l-pulse 1.6s var(--md-sys-motion-easing-standard) infinite alternate; }
  .l-fab--mic[aria-pressed="true"] { animation: l-listen 1.4s var(--md-sys-motion-easing-standard) infinite; }
  @media (max-width: 599.98px) {
    .l-menu[popover]:popover-open { animation-name: l-rise; animation-duration: var(--md-sys-motion-duration-medium4); }
  }
}
/* With less motion an indeterminate bar fades in place, so it still shows work going on. */
@media (prefers-reduced-motion: reduce) {
  .l-progress:not([aria-valuenow]) .l-progress-bar { width: 100%; animation: l-pulse 1.2s var(--md-sys-motion-easing-linear) infinite alternate; }
}
@keyframes l-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes l-appear { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes l-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes l-pulse { from { opacity: 1; } to { opacity: 0.45; } }
@keyframes l-listen {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--irl-sun-b) 45%, transparent), var(--md-sys-elevation-level3); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--irl-sun-b) 15%, transparent), var(--md-sys-elevation-level3); }
}

/* Forced colors drop shadows and fills, and paint transparent outlines, so edges stay visible. */
@media (forced-colors: active) {
  .l-search, .l-snackbar, .l-menu, .l-sheet, .l-dialog, .l-fab, .l-pill, .l-msg { outline: 1px solid transparent; }
  .l-nav-item[aria-current="page"] .l-nav-ind, .l-tab[aria-selected="true"] .l-tab-label { outline: 2px solid transparent; }
}
