/* Zovy tokens: Carbon and Ember (SOCIAL_API 17, s3-look 6.1 and 7.1). The one source for names and values.
   Android's ThemeTokenParityTest reads every --z-* colour below; worker/src/theme.ts is a generated copy
   (scripts/gen_tokens.mjs) for the server-rendered pages. Dark is the default. Values are 6.1 as written:
   a colour with alpha is the alpha form, "opaque" forms are those composited on --z-page. */
:root {
	color-scheme: dark;
	--z-page: #0b0c0e;
	--z-ink: #f2efe9;
	--z-ink-muted: #a9abaa;
	--z-hairline: rgba(255, 255, 255, .10);
	--z-fill: rgba(255, 255, 255, .08);
	--z-fill-strong: rgba(255, 255, 255, .13);
	--z-raised: #17191d;
	--z-accent: #ff5a1f;
	--z-accent-fill: #ff5a1f;
	--z-on-accent: #160a04;
	--z-accent-text: #ff8a5c;
	--z-accent-soft: rgba(255, 90, 31, .14);
	--z-route-casing: rgba(0, 0, 0, .60);
	--z-route-past: rgba(255, 255, 255, .30);
	--z-pin: #efeae0;
	--z-pin-ink: #15171a;
	--z-glass-tint: rgba(20, 22, 25, .50);
	--z-glass-fallback: rgba(20, 22, 25, .86);
	--z-glass-edge: rgba(255, 255, 255, .12);
	--z-glass-highlight: rgba(255, 255, 255, .26);
	--z-glass-sheen: rgba(255, 255, 255, .10);
	--z-on-glass: #f2efe9;
	--z-on-glass-muted: #d6d4cf;
	--z-sos: #e5261a;
	--z-on-sos: #ffffff;
	--z-sos-ring: #ff4a4d;
	--z-sos-disc: #131518;
	--z-crash-bg: #2a0606;
	--z-on-crash: #ffffff;
	--z-crash-muted: #f0c9c6;
	--z-talking: #6cc39a;
	--z-on-talking: #0b2116;
	--z-nearby: #9fb2f2;
	--z-on-nearby: #0f1a3d;
	--z-lost: #5a605d;
	--z-on-lost: #ffffff;
	--z-online: #6cc3ac;
	--z-on-online: #0b201a;
	--z-warning: #edb45a;
	--z-on-warning: #2a1c05;
	--z-like: #ff3b4e;
	--z-you: #2b6cd4;
	--z-you-halo: rgba(43, 108, 212, .22);
	--z-avatar-bg: #23272b;
	--z-avatar-ink: #efeae0;
	--z-scrim: rgba(0, 0, 0, .60);
	--z-error: #f29a85;
	--z-error-soft: #3a1d17;
	--z-font-title: "Geist", system-ui, sans-serif;
	--z-font-body: "Anek Latin", system-ui, sans-serif;
	--z-font-num: "Saira", "Geist", sans-serif;
	--z-r-tag: 5px;
	--z-r-sm: 8px;
	--z-r-md: 12px;
	--z-r-button: 10px;
	--z-r-lg: 18px;
	--z-r-card: 14px;
	--z-r-sheet: 20px;
	--z-ease-out: cubic-bezier(.23, 1, .32, 1);
	--z-ease-io: cubic-bezier(.77, 0, .175, 1);
	--z-ease-drawer: cubic-bezier(.32, .72, 0, 1);
	--z-press-ms: 160ms;
}
:root[data-theme="light"], [data-sun="day"] {
	color-scheme: light;
	--z-page: #f1f0ec;
	--z-ink: #14161a;
	--z-ink-muted: #555a5e;
	--z-hairline: rgba(0, 0, 0, .10);
	--z-fill: rgba(0, 0, 0, .055);
	--z-fill-strong: rgba(0, 0, 0, .10);
	--z-raised: #ffffff;
	--z-accent: #d9420a;
	--z-accent-fill: #d03d07;
	--z-on-accent: #ffffff;
	--z-accent-text: #a93208;
	--z-accent-soft: #fbe7dd;
	--z-route-casing: rgba(255, 255, 255, .90);
	--z-route-past: rgba(0, 0, 0, .28);
	--z-pin: #ffffff;
	--z-pin-ink: #14161a;
	--z-glass-tint: rgba(250, 250, 247, .64);
	--z-glass-fallback: rgba(250, 250, 247, .92);
	--z-glass-edge: rgba(0, 0, 0, .07);
	--z-glass-highlight: rgba(255, 255, 255, .90);
	--z-glass-sheen: rgba(255, 255, 255, .45);
	--z-on-glass: #14161a;
	--z-on-glass-muted: #41464a;
	--z-sos: #c8170c;
	--z-on-sos: #ffffff;
	--z-sos-ring: #c81e21;
	--z-sos-disc: #ffffff;
	--z-crash-bg: #2a0606;
	--z-on-crash: #ffffff;
	--z-crash-muted: #f0c9c6;
	--z-talking: #1e6b47;
	--z-on-talking: #ffffff;
	--z-nearby: #3d55a3;
	--z-on-nearby: #ffffff;
	--z-lost: #5f6662;
	--z-on-lost: #ffffff;
	--z-online: #1f5c4e;
	--z-on-online: #ffffff;
	--z-warning: #855300;
	--z-on-warning: #ffffff;
	--z-like: #ff3b4e;
	--z-you: #2b6cd4;
	--z-you-halo: rgba(43, 108, 212, .22);
	--z-avatar-bg: #d9d8d4;
	--z-avatar-ink: #14161a;
	--z-scrim: rgba(0, 0, 0, .60);
	--z-error: #a8341f;
	--z-error-soft: #f8e7e1;
}
[data-sun="night"] {
	color-scheme: dark;
	--z-page: #0b0c0e;
	--z-ink: #f2efe9;
	--z-ink-muted: #a9abaa;
	--z-hairline: rgba(255, 255, 255, .10);
	--z-fill: rgba(255, 255, 255, .08);
	--z-fill-strong: rgba(255, 255, 255, .13);
	--z-raised: #17191d;
	--z-accent: #ff5a1f;
	--z-accent-fill: #ff5a1f;
	--z-on-accent: #160a04;
	--z-accent-text: #ff8a5c;
	--z-accent-soft: rgba(255, 90, 31, .14);
	--z-route-casing: rgba(0, 0, 0, .60);
	--z-route-past: rgba(255, 255, 255, .30);
	--z-pin: #efeae0;
	--z-pin-ink: #15171a;
	--z-glass-tint: rgba(20, 22, 25, .50);
	--z-glass-fallback: rgba(20, 22, 25, .86);
	--z-glass-edge: rgba(255, 255, 255, .12);
	--z-glass-highlight: rgba(255, 255, 255, .26);
	--z-glass-sheen: rgba(255, 255, 255, .10);
	--z-on-glass: #f2efe9;
	--z-on-glass-muted: #d6d4cf;
	--z-sos: #e5261a;
	--z-on-sos: #ffffff;
	--z-sos-ring: #ff4a4d;
	--z-sos-disc: #131518;
	--z-crash-bg: #2a0606;
	--z-on-crash: #ffffff;
	--z-crash-muted: #f0c9c6;
	--z-talking: #6cc39a;
	--z-on-talking: #0b2116;
	--z-nearby: #9fb2f2;
	--z-on-nearby: #0f1a3d;
	--z-lost: #5a605d;
	--z-on-lost: #ffffff;
	--z-online: #6cc3ac;
	--z-on-online: #0b201a;
	--z-warning: #edb45a;
	--z-on-warning: #2a1c05;
	--z-like: #ff3b4e;
	--z-you: #2b6cd4;
	--z-you-halo: rgba(43, 108, 212, .22);
	--z-avatar-bg: #23272b;
	--z-avatar-ink: #efeae0;
	--z-scrim: rgba(0, 0, 0, .60);
	--z-error: #f29a85;
	--z-error-soft: #3a1d17;
}
@media (prefers-color-scheme: light) {
	:root[data-theme="system"] {
		color-scheme: light;
		--z-page: #f1f0ec;
		--z-ink: #14161a;
		--z-ink-muted: #555a5e;
		--z-hairline: rgba(0, 0, 0, .10);
		--z-fill: rgba(0, 0, 0, .055);
		--z-fill-strong: rgba(0, 0, 0, .10);
		--z-raised: #ffffff;
		--z-accent: #d9420a;
		--z-accent-fill: #d03d07;
		--z-on-accent: #ffffff;
		--z-accent-text: #a93208;
		--z-accent-soft: #fbe7dd;
		--z-route-casing: rgba(255, 255, 255, .90);
		--z-route-past: rgba(0, 0, 0, .28);
		--z-pin: #ffffff;
		--z-pin-ink: #14161a;
		--z-glass-tint: rgba(250, 250, 247, .64);
		--z-glass-fallback: rgba(250, 250, 247, .92);
		--z-glass-edge: rgba(0, 0, 0, .07);
		--z-glass-highlight: rgba(255, 255, 255, .90);
		--z-glass-sheen: rgba(255, 255, 255, .45);
		--z-on-glass: #14161a;
		--z-on-glass-muted: #41464a;
		--z-sos: #c8170c;
		--z-on-sos: #ffffff;
		--z-sos-ring: #c81e21;
		--z-sos-disc: #ffffff;
		--z-crash-bg: #2a0606;
		--z-on-crash: #ffffff;
		--z-crash-muted: #f0c9c6;
		--z-talking: #1e6b47;
		--z-on-talking: #ffffff;
		--z-nearby: #3d55a3;
		--z-on-nearby: #ffffff;
		--z-lost: #5f6662;
		--z-on-lost: #ffffff;
		--z-online: #1f5c4e;
		--z-on-online: #ffffff;
		--z-warning: #855300;
		--z-on-warning: #ffffff;
		--z-like: #ff3b4e;
		--z-you: #2b6cd4;
		--z-you-halo: rgba(43, 108, 212, .22);
		--z-avatar-bg: #d9d8d4;
		--z-avatar-ink: #14161a;
		--z-scrim: rgba(0, 0, 0, .60);
		--z-error: #a8341f;
		--z-error-soft: #f8e7e1;
	}
}
/* Compat for the old names (step 0 of the migration). Declared on :root and on every data-sun element so a
   var() chain re-resolves under a day or night screen; deleted by the end of phase 13. */
:root, [data-sun] {
	--bg: var(--z-page); --ink: var(--z-ink); --muted: var(--z-ink-muted);
	--peacock: var(--z-accent-fill); --peacock-soft: var(--z-accent-soft);
	--brass: var(--z-accent-text); --brass-soft: var(--z-accent-soft);
	--line: var(--z-hairline); --talking: var(--z-talking);
	--bad: var(--z-error); --bad-soft: var(--z-error-soft);
}

/* Saira, self-hosted (SIL OFL 1.1, fonts/OFL-Saira.txt). Absolute path so the server-rendered pages load it too. */
@font-face { font-family: "Saira"; font-weight: 500; font-style: normal; font-display: swap; src: url("/app/fonts/saira-500.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 600; font-style: normal; font-display: swap; src: url("/app/fonts/saira-600.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 700; font-style: normal; font-display: swap; src: url("/app/fonts/saira-700.woff2") format("woff2"); }

/* The numbers rule (6.3): a number alone, or a numeric token in a data line. Never a sentence. */
.num { font-family: var(--z-font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; font-weight: 600; }
.num.in, .line .num { font-weight: 500; }

/* Glass: floating chrome only. SOS, alerts, dialogs and fields are always solid. The sheen is a static top-centre glow. */
.glass { background-color: var(--z-glass-tint); background-image: radial-gradient(ellipse 95px 65px at 50% 0, var(--z-glass-sheen), transparent); background-repeat: no-repeat; background-position: 50% 0; background-size: 190px 130px;
	backdrop-filter: blur(30px) saturate(185%) brightness(1.06); -webkit-backdrop-filter: blur(30px) saturate(185%) brightness(1.06);
	box-shadow: inset 0 .75px 0 var(--z-glass-highlight), inset 0 0 0 .75px var(--z-glass-edge), 0 14px 30px -14px rgba(0, 0, 0, .65); }
.glass.on-photo { background-color: var(--z-glass-fallback); }
.glass-solid, .sos-solid { background: var(--z-raised); backdrop-filter: none; -webkit-backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background-color: var(--z-glass-fallback); } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { .glass { background: var(--z-raised); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Motion */
.pr { transition: transform var(--z-press-ms) var(--z-ease-out); }
.pr:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.pr:active { transform: scale(.97); }
}
