:root {
  /* Sightra logo palette: black, dark blue, medium blue, light blue */
  --brand-black: #0a0a0a;
  --brand-blue-dark: #0b3d91;
  --brand-blue: #2563eb;
  --brand-blue-light: #7cb9f1;
  --bg: #ffffff;
  --bg-muted: #f4f7fb;
  --surface: #ffffff;
  --text: #0a0a0a;
  --text-muted: #4b5563;
  --primary: var(--brand-blue-dark);
  --primary-soft: #e8f0fc;
  --primary-strong: #082f6e;
  --brand-cyan: var(--brand-blue);
  --brand-cyan-soft: #dbeafe;
  --brand-cyan-glow: rgba(37, 99, 235, 0.28);
  --brand-lime: var(--brand-blue-light);
  --shadow: 0 8px 30px rgba(11, 61, 145, 0.08);
  --radius: 1rem;
  --ring: rgba(37, 99, 235, 0.22);
}

html.dark {
  --bg: #0a0a0a;
  --bg-muted: #141414;
  --surface: #1a1a1a;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: var(--brand-blue-light);
  --primary-soft: rgba(124, 185, 241, 0.12);
  --primary-strong: #dbeafe;
  --brand-cyan: var(--brand-blue-light);
  --brand-cyan-soft: rgba(37, 99, 235, 0.18);
  --brand-cyan-glow: rgba(124, 185, 241, 0.35);
  --brand-lime: var(--brand-blue-light);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --ring: rgba(124, 185, 241, 0.35);
}

html[data-a11y-contrast="high"] {
  --text: #000000;
  --text-muted: #1f2937;
  --primary: #006d6c;
  --primary-strong: #004d4d;
}

html.dark[data-a11y-contrast="high"] {
  --text: #ffffff;
  --text-muted: #e5e7eb;
  --primary: #7fffd4;
  --primary-strong: #ffffff;
}

html[data-a11y-motion="reduce"] *,
html[data-a11y-motion="reduce"] *::before,
html[data-a11y-motion="reduce"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-headline {
  font-family: Lexend, Inter, system-ui, sans-serif;
}

.app-shell {
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-muted) 100%);
}

.card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.card-soft {
  background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft));
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px var(--ring);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.btn-google {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.brand-logo {
  color: var(--brand-blue-dark);
  letter-spacing: 0.02em;
}

.brand-logo-img {
  height: 2.25rem;
  width: auto;
  max-width: min(11rem, 42vw);
  object-fit: contain;
  object-position: left center;
}

html.dark .brand-logo-img {
  filter: brightness(1.05);
}

.bottom-nav a.is-active,
.sidebar-link.is-active {
  color: var(--brand-cyan);
  background: var(--brand-cyan-soft);
}

html.dark .bottom-nav a.is-active {
  color: #131313;
  background: var(--brand-cyan);
}

.vision-hud-card {
  background: rgba(32, 31, 31, 0.72);
  border-right: 3px solid var(--brand-lime);
  backdrop-filter: blur(12px);
}

.vision-scan-label-active {
  color: #ffb4ab;
  letter-spacing: 0.35em;
}

.btn-ghost {
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--bg-muted);
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  color: var(--text);
}

.app-header {
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

.bottom-nav {
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.04);
}

.bottom-nav a.is-active {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 1rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
  left: 1rem;
}

.a11y-panel {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  width: min(22rem, calc(100vw - 2rem));
  z-index: 60;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  background: var(--surface);
  padding: 1rem;
}

.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.vision-overlay-ui {
  pointer-events: none;
}

.vision-overlay-ui .interactive {
  pointer-events: auto;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.privacy-modal[hidden] {
  display: none;
}

.privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.privacy-modal-panel {
  position: relative;
  z-index: 1;
  max-height: min(90vh, 40rem);
  overflow-y: auto;
  width: 100%;
}

.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

@media (min-width: 640px) {
  .pwa-install-modal {
    align-items: center;
  }
}

.pwa-install-modal[hidden] {
  display: none !important;
}

.pwa-install-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.pwa-install-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(90vh, 36rem);
  overflow-y: auto;
}

#pwa-install[hidden] {
  display: none !important;
}

.legal-document .legal-prose ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  list-style: disc;
}

.legal-document .legal-prose a {
  color: var(--primary-strong);
  text-decoration: underline;
}

.legal-document .legal-prose p {
  margin-bottom: 0.75rem;
}

.legal-footer a {
  text-decoration: underline;
}

.legal-footer a:hover {
  color: var(--primary-strong);
}
