:root {
  color-scheme: dark;

  /* Mirrors the app's mono Material 3 theme. */
  --color-bg: #0e0f12;
  --color-surface: #15171c;
  --color-surface-high: #1d1f25;
  --color-surface-highest: #25272e;
  --color-surface-hover: #2b2e35;
  --color-border: rgb(237 237 237 / 0.12);
  --color-text: #ededed;
  --color-text-muted: rgb(237 237 237 / 0.6);
  --color-text-subtle: rgb(237 237 237 / 0.4);
  --color-brand: #ff7652;
  --color-accent: var(--color-brand);
  --color-accent-dim: #b9573b;
  --color-on-primary: #0e0f12;

  --radius-xs: 0.3125rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2.25rem;
  --radius-full: 999px;
  --radius-pill: 1.5rem;
  --group-gap: 0.1875rem;

  --space: 0.75rem;
  --page-width: 76rem;
  --page-gutter: clamp(1rem, 4vw, 2rem);

  --motion-fast: 120ms;
  --motion-normal: 200ms;
  --motion-slow: 300ms;
  --motion-expressive: 350ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --font-display: "Avenir Next", "Segoe UI Variable Display", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI Variable Text", "SF Pro Text", ui-sans-serif, system-ui, sans-serif;
  --font-utility: ui-monospace, "SFMono-Regular", "Cascadia Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  line-height: 1.5;
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--color-on-primary);
  background: var(--color-text);
}

a {
  color: inherit;
  text-decoration: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

img,
svg,
picture,
video,
canvas {
  display: block;
}

img,
picture,
video,
canvas {
  max-width: 100%;
}

img,
video {
  height: auto;
}

ul {
  padding: 0;
  list-style: none;
}

.flat-card {
  background: var(--color-surface);
}

/* Standalone page holding a single centered card (/scan, +error). */
.centered-page {
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: var(--page-gutter);
}

.centered-card {
  display: flex;
  width: min(100%, 32rem);
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 8vw, 4rem);
  background: var(--color-surface);
  text-align: center;
}

.card-logo {
  display: flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface-highest);
}

.card-logo img {
  width: 2.5rem;
  height: 2.5rem;
}

/* Filled pill action; add .btn-pill--icon when it leads with an icon. */
.btn-pill {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  border-radius: var(--radius-pill);
  padding-inline: 1.25rem;
  color: var(--color-on-primary);
  background: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 700;
  transition:
    border-radius var(--motion-expressive) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.btn-pill:hover,
.btn-pill:focus-visible {
  border-radius: var(--radius-md);
  background: #fff;
}

.btn-pill--icon {
  gap: 0.625rem;
}

.btn-pill--icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Landing section that stays inside the page grid. */
.page-section {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) var(--page-gutter);
}

/* Landing section whose content bleeds past the page grid. */
.bleed-section {
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 8rem);
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
