/* Roboto Flex Variable (local woff2, weight 100-1000, width 25%-151%) */
@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  src: url('../assets/fonts/roboto-flex-latin-ext-wdth-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto Flex';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  src: url('../assets/fonts/roboto-flex-latin-wdth-normal.woff2') format('woff2-variations');
  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;
}

:root {
  /* Font families */
  --md-sys-typescale-font: 'Roboto Flex', system-ui, -apple-system, sans-serif;
  --md-sys-typescale-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* M3E Corner Shape Scale (10 steps) */
  --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-large-increased: 20px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-extra-large-increased: 32px;
  --md-sys-shape-corner-extra-extra-large: 48px;
  --md-sys-shape-corner-full: 999px;

  /* M3E Shape Motion: strictly monotonic curve prevents 0px clamping */
  --md-sys-motion-curve-shape: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-curve-shape-dur: 280ms;

  /* M3E State Layer Opacities */
  --md-sys-state-hover: 0.08;
  --md-sys-state-focus: 0.10;
  --md-sys-state-pressed: 0.10;
  --md-sys-state-dragged: 0.16;

  /* M3E Spring Tokens (cubic-bezier fallbacks) */
  --md-sys-motion-spring-fast-spatial-damping: 0.6;
  --md-sys-motion-spring-fast-spatial-stiffness: 800;
  --md-sys-motion-spring-fast-spatial: cubic-bezier(0.42, 1.67, 0.21, 0.90);
  --md-sys-motion-spring-fast-spatial-dur: 350ms;

  --md-sys-motion-spring-default-spatial-damping: 0.8;
  --md-sys-motion-spring-default-spatial-stiffness: 380;
  --md-sys-motion-spring-default-spatial: cubic-bezier(0.38, 1.21, 0.22, 1.00);
  --md-sys-motion-spring-default-spatial-dur: 500ms;

  --md-sys-motion-spring-slow-spatial-damping: 0.8;
  --md-sys-motion-spring-slow-spatial-stiffness: 200;
  --md-sys-motion-spring-slow-spatial: cubic-bezier(0.39, 1.29, 0.35, 0.98);
  --md-sys-motion-spring-slow-spatial-dur: 650ms;

  /* Effects springs NEVER overshoot (damping 1.0) */
  --md-sys-motion-spring-fast-effects-damping: 1.0;
  --md-sys-motion-spring-fast-effects-stiffness: 3800;
  --md-sys-motion-spring-fast-effects: cubic-bezier(0.31, 0.94, 0.34, 1.00);
  --md-sys-motion-spring-fast-effects-dur: 150ms;

  --md-sys-motion-spring-default-effects-damping: 1.0;
  --md-sys-motion-spring-default-effects-stiffness: 1600;
  --md-sys-motion-spring-default-effects: cubic-bezier(0.34, 0.80, 0.34, 1.00);
  --md-sys-motion-spring-default-effects-dur: 200ms;

  --md-sys-motion-spring-slow-effects-damping: 1.0;
  --md-sys-motion-spring-slow-effects-stiffness: 800;
  --md-sys-motion-spring-slow-effects: cubic-bezier(0.34, 0.88, 0.34, 1.00);
  --md-sys-motion-spring-slow-effects-dur: 300ms;

  /* Layout tokens (Compact < 600px default) */
  --page-gutter: 16px;
  --page-max-width: 1200px;
  --section-gap: 64px;
}

/* Upgrade to exact M3E physics springs where CSS linear() is supported */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --md-sys-motion-spring-fast-spatial: linear(0, 0.0292, 0.1046, 0.2099, 0.3314, 0.458, 0.5814, 0.6955, 0.7966, 0.8823, 0.952, 1.006, 1.0455, 1.072, 1.0876, 1.0942, 1.0938, 1.0883, 1.0794, 1.0684, 1.0565, 1.0446, 1.0333, 1.0232, 1.0144, 1.0072, 1.0014, 0.9971, 0.9941, 0.9922, 0.9912, 0.991, 0.9914, 0.9921, 0.9931, 0.9942, 0.9953, 0.9964, 0.9974, 0.9983, 1);
    --md-sys-motion-spring-fast-spatial-dur: 360ms;

    --md-sys-motion-spring-default-spatial: linear(0, 0.0201, 0.0716, 0.1435, 0.2273, 0.3163, 0.4056, 0.4919, 0.5726, 0.6463, 0.7123, 0.7702, 0.8201, 0.8626, 0.898, 0.9271, 0.9506, 0.9693, 0.9837, 0.9946, 1.0026, 1.0081, 1.0118, 1.014, 1.015, 1.0151, 1.0147, 1.0138, 1.0126, 1.0113, 1.01, 1.0086, 1.0073, 1.0061, 1.005, 1.0041, 1.0032, 1.0025, 1.0019, 1.0014, 1);
    --md-sys-motion-spring-default-spatial-dur: 435ms;

    --md-sys-motion-spring-slow-spatial: linear(0, 0.0201, 0.0716, 0.1436, 0.2275, 0.3166, 0.406, 0.4923, 0.573, 0.6467, 0.7127, 0.7706, 0.8205, 0.8629, 0.8983, 0.9274, 0.9509, 0.9695, 0.9838, 0.9947, 1.0027, 1.0082, 1.0119, 1.014, 1.015, 1.0151, 1.0147, 1.0138, 1.0126, 1.0113, 1.0099, 1.0086, 1.0073, 1.0061, 1.005, 1.0041, 1.0032, 1.0025, 1.0019, 1.0014, 1);
    --md-sys-motion-spring-slow-spatial-dur: 600ms;

    --md-sys-motion-spring-fast-effects: linear(0, 0.0229, 0.079, 0.1535, 0.2366, 0.3214, 0.4037, 0.4809, 0.5517, 0.6153, 0.6718, 0.7214, 0.7645, 0.8016, 0.8335, 0.8606, 0.8837, 0.9031, 0.9195, 0.9333, 0.9448, 0.9544, 0.9624, 0.969, 0.9745, 0.979, 0.9828, 0.9859, 0.9885, 0.9906, 0.9923, 0.9937, 0.9949, 0.9958, 0.9966, 0.9972, 0.9977, 0.9982, 0.9985, 0.9988, 1);
    --md-sys-motion-spring-fast-effects-dur: 150ms;

    --md-sys-motion-spring-default-effects: linear(0, 0.0229, 0.0789, 0.1534, 0.2363, 0.3211, 0.4033, 0.4805, 0.5513, 0.615, 0.6714, 0.721, 0.7641, 0.8013, 0.8332, 0.8604, 0.8834, 0.9029, 0.9193, 0.9331, 0.9446, 0.9542, 0.9622, 0.9689, 0.9744, 0.979, 0.9827, 0.9858, 0.9884, 0.9905, 0.9922, 0.9937, 0.9948, 0.9958, 0.9966, 0.9972, 0.9977, 0.9981, 0.9985, 0.9988, 1);
    --md-sys-motion-spring-default-effects-dur: 231ms;

    --md-sys-motion-spring-slow-effects: linear(0, 0.0229, 0.079, 0.1536, 0.2366, 0.3215, 0.4038, 0.481, 0.5518, 0.6155, 0.672, 0.7215, 0.7646, 0.8017, 0.8336, 0.8607, 0.8838, 0.9032, 0.9196, 0.9333, 0.9448, 0.9544, 0.9624, 0.969, 0.9745, 0.9791, 0.9828, 0.9859, 0.9885, 0.9906, 0.9923, 0.9937, 0.9949, 0.9958, 0.9966, 0.9972, 0.9977, 0.9982, 0.9985, 0.9988, 1);
    --md-sys-motion-spring-slow-effects-dur: 327ms;
  }
}

@media (min-width: 600px) {
  :root {
    --page-gutter: 24px;
    --section-gap: 80px;
  }
}

@media (min-width: 840px) {
  :root {
    --page-gutter: 32px;
    --section-gap: 96px;
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

::selection {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none !important;
}

:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 3px;
}

html {
  /* clip (not hidden): hidden makes body a scroll container, which captures
     position: sticky and prevents the top bar from floating. */
  overflow-x: clip;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-sys-typescale-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  overflow-wrap: break-word;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition:
    background-color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

li {
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.35rem, 5.2vw, 3.5625rem);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.2px;
  font-variation-settings: 'wdth' 108;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0px;
  font-variation-settings: 'wdth' 100;
}

h3 {
  font-size: 1.375rem; /* 22px Title Large */
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: 0px;
  font-variation-settings: 'wdth' 102;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard accessibility (guaranteed off-screen unless focused) */
.skip-link {
  position: fixed;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 1000;
  padding: 14px 28px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-radius: var(--md-sys-shape-corner-full);
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial),
    opacity var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* M3E State Layer & Focus Ring (strict radius inheritance, no square corners) */
.m3-state {
  position: relative;
}

.m3-state::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.m3-state:hover::before {
  opacity: var(--md-sys-state-hover);
}

.m3-state:focus-visible::before {
  opacity: var(--md-sys-state-focus);
}

.m3-state:active::before {
  opacity: var(--md-sys-state-pressed);
}

/* Theme & palette switches apply token changes instantly. The View Transition
   cross-fade carries the visual animation; suppressed transitions prevent a
   window where text color and background resolve to opposite schemes, which
   live contrast scanners read as a failure. */
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: none !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none !important;
}

:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

html:focus,
html:focus-visible,
body:focus,
body:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Container & Unified Layout */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  box-sizing: border-box;
  padding-inline: var(--page-gutter);
}

.site-footer .container {
  padding-inline: 0;
}

/* Section Bands & Tonal Container Alternation */
.section-band {
  width: 100%;
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 84px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  scroll-margin-top: 80px;
  box-sizing: border-box;
  transition:
    background-color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

/* 1. Hero: primary-container */
.section-hero {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 56px 24px 80px;
  padding: clamp(32px, 5vw, 56px) var(--page-gutter) clamp(56px, 8vw, 104px);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  position: relative;
  overflow: visible;
}

/* 2. Safeguards: tertiary-container */
.section-safety {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 80px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

/* 3. Platforms: surface */
.section-platforms {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 84px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

/* 4. Quality: secondary-container */
.section-quality {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 84px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

/* 5. Features: surface */
.section-features {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 84px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

/* 6. Downloads: surface-container */
.section-downloads {
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  padding: 72px 24px;
  padding: clamp(56px, 8vw, 96px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

/* 7. FAQ: surface */
.section-faq {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: 64px 24px;
  padding: clamp(48px, 6vw, 84px) var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
}

.section {
  padding-block: clamp(48px, 6vw, 72px);
  scroll-margin-top: 80px;
}

.section-header {
  max-width: 860px;
  margin-bottom: 28px;
  margin-inline: 0;
  text-align: left;
}

.section-header p {
  max-width: 68ch;
}

@media (min-width: 600px) {
  .section-header {
    margin-bottom: 36px;
  }
}

/* M3E Typography classes (Much bigger, heavier display & headline sizes) */
h1, .type-display-l-emphasized {
  font-size: clamp(2.75rem, 5.5vw, 4.5rem); /* 44px -> 72px */
  line-height: 1.04;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variation-settings: 'wdth' 106, 'wght' 750;
  margin: 0;
}

h2, .type-headline-l-emphasized {
  font-size: clamp(2rem, 3.8vw, 3rem); /* 32px -> 48px */
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings: 'wdth' 102, 'wght' 700;
  margin: 0;
}

h3, .type-headline-s-emphasized {
  font-size: clamp(1.25rem, 2vw, 1.5rem); /* 20px -> 24px */
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variation-settings: 'wdth' 102, 'wght' 700;
  margin: 0;
}

.type-title-l-emphasized {
  font-size: 1.375rem; /* 22px */
  line-height: 28px;
  font-weight: 650;
  font-variation-settings: 'wdth' 102;
  letter-spacing: 0px;
  margin: 0;
}

.type-title-m-emphasized {
  font-size: 1.0625rem; /* 17px */
  line-height: 24px;
  font-weight: 700;
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0.1px;
  margin: 0;
}

.type-body-l {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}

.type-body-m {
  font-size: 0.9375rem; /* 15px */
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.15px;
}

.type-label-l-emphasized {
  font-size: 0.8125rem; /* 13px */
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   0. DESKTOP LAUNCH SPLASH & APERTURE LOADING SCREEN
   Derived from lumen-rs AppLaunchSplash.vue + LumenLogo.vue
   ========================================================================== */
.lumen-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  contain: strict;
  cursor: pointer;
}

.lumen-splash-backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-background, #121316);
  opacity: 1;
  pointer-events: none;
  transition: opacity 450ms cubic-bezier(0.2, 0, 0, 1);
}

.lumen-splash.is-hidden {
  display: none !important;
}

.lumen-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  position: relative;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  pointer-events: none;
}

.lumen-splash-logo {
  width: 160px;
  height: 160px;
  display: block;
  overflow: visible;
}

.splash-aperture-group {
  transform-box: view-box;
  transform-origin: 50% 50%;
}

/* Phase 1: Android cold-start swirl entrance (avd_splash_icon.xml + LumenLogo.vue) */
.splash-aperture-group.is-launching {
  animation:
    splash-entrance-rotate 550ms cubic-bezier(0.4, 0, 0.2, 1) forwards,
    splash-entrance-scale 550ms cubic-bezier(0.05, 0.7, 0.1, 1.0) forwards;
}

@keyframes splash-entrance-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes splash-entrance-scale {
  0% { transform: scale(0.7); }
  100% { transform: scale(1); }
}

/* Phase 2: Indeterminate kinetic loading loop */
.splash-aperture-group.is-loading {
  animation: splash-loading-spin 1.8s linear infinite;
}

@keyframes splash-loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.lumen-splash-inner.is-loading-pulse {
  animation: splash-subtle-breathe 2.4s ease-in-out infinite;
}

@keyframes splash-subtle-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.splash-core {
  transition: fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

/* Meta: Wavy loading indicator & label */
.lumen-splash-meta {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.2, 0, 0, 1);
}

.lumen-splash-meta.is-visible {
  opacity: 1;
}

.lumen-splash-wavy {
  width: 132px;
  height: 4px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-highest, #28354b);
  overflow: hidden;
  position: relative;
}

.lumen-splash-wavy-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 45%;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary, #a8c7fa);
  animation: splash-wavy-anim 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes splash-wavy-anim {
  0% {
    left: -45%;
    width: 45%;
  }
  50% {
    left: 25%;
    width: 60%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}

.lumen-splash-status {
  font-family: var(--md-sys-typescale-font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.25px;
  color: var(--md-sys-color-on-surface-variant);
}

.lumen-splash-skip {
  position: absolute;
  bottom: 28px;
  font-family: var(--md-sys-typescale-font);
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.25px;
  transition: color 200ms ease;
}

.lumen-splash-skip:hover {
  color: var(--md-sys-color-on-surface);
}

/* Phase 3: Desktop App Launch Settle (mirroring App.vue m3-launch-settle) */
.m3-launch-settle {
  animation: m3-settle-in 450ms var(--md-sys-motion-spring-default-spatial) backwards;
  animation-delay: 60ms;
}

@keyframes m3-settle-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .splash-aperture-group,
  .splash-aperture-group.is-launching,
  .splash-aperture-group.is-loading,
  .lumen-splash-inner.is-loading-pulse,
  .lumen-splash-wavy-indicator,
  .m3-launch-settle {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   1. FLOATING PILL TOP BAR
   ========================================================================== */
.topbar-wrap {
  position: sticky;
  top: max(12px, env(safe-area-inset-top, 0px));
  z-index: 100;
  padding-inline: var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  margin-top: 12px;
  pointer-events: none;
}

.topbar {
  pointer-events: auto;
  max-width: var(--page-max-width);
  margin-inline: auto;
  min-height: 64px;
  padding: 8px 12px 8px 16px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition:
    max-width var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    min-height var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    padding var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    box-shadow var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.topbar-wrap.is-scrolled .topbar {
  min-height: 52px;
  padding: 4px 10px 4px 14px;
  max-width: 1040px;
  background-color: var(--md-sys-color-surface-container-highest);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.22);
}

.topbar-wrap.is-scrolled .nav-pill {
  min-height: 40px;
  padding: 4px 12px;
}

.topbar-wrap.is-scrolled .icon-btn {
  width: 40px;
  height: 40px;
}

.topbar-wrap.is-scrolled .topbar-dl-btn {
  min-height: 40px;
  padding: 0 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  font-size: 1.125rem;
  min-height: 48px;
  padding-inline: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  /* Same spring as the logo rotation so rotate + slide move as one unit. */
  transition: transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.brand-link:hover {
  transform: translateX(3px);
}

.brand-link svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition:
    /* Same spring as the link slide so rotate + slide move as one unit. */
    transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    opacity var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.topbar-wrap.is-scrolled .brand-link svg {
  width: 28px;
  height: 28px;
}

.topbar-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 840px) {
  .topbar-nav {
    display: flex;
  }
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 24px;
  /* Opaque resting surface: matches the composited topbar tone, and gives
     contrast checkers a concrete background to evaluate against. */
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    min-height var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    padding var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.nav-pill:hover {
  border-radius: 16px;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-primary);
}

.nav-pill:active {
  border-radius: 14px;
}

.nav-pill[aria-current="true"] {
  border-radius: 24px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Icon button (M3E 48x48 target) */
.icon-btn {
  appearance: none;
  border: none;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition:
    width var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    height var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.icon-btn:hover {
  border-radius: 16px;
  transform: scale(1.05);
}

.icon-btn:active {
  border-radius: 14px;
  transform: scale(0.95);
}

.icon-btn[aria-expanded="true"] {
  border-radius: 16px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.topbar-dl-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    min-height var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    padding var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.topbar-dl-btn:hover {
  border-radius: var(--md-sys-shape-corner-medium);
  transform: translateY(-1px) scale(1.02);
  color: var(--md-sys-color-on-primary);
}

.topbar-dl-btn:active {
  border-radius: var(--md-sys-shape-corner-small);
  transform: scale(0.97);
}

@media (min-width: 600px) {
  .topbar-dl-btn {
    display: inline-flex;
  }
}

.mobile-menu-btn {
  display: inline-flex;
}

@media (min-width: 840px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Popover panels (Palette Picker & Mobile Menu) */
.popover-panel {
  position: absolute;
  top: calc(100% + 8px);
  pointer-events: auto;
  padding: 16px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  /* Elevation from tone + shadow only; no hairline border on floating layers. */
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.22);
  z-index: 200;
}

.popover-panel:not([hidden]) {
  animation: m3e-popover-enter var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial) both;
  transform-origin: top center;
}

@keyframes m3e-popover-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-panel[hidden] {
  display: none !important;
}

.palette-panel {
  max-width: 460px;
  width: calc(100% - (var(--page-gutter) * 2));
  right: max(var(--page-gutter), calc((100% - var(--page-max-width)) / 2 + var(--page-gutter)));
}
.topbar-wrap.is-scrolled .palette-panel {
  right: max(var(--page-gutter), calc((100% - 1040px) / 2 + var(--page-gutter)));
}

#mobile-menu-panel {
  left: var(--page-gutter);
  right: var(--page-gutter);
  width: auto;
  max-width: var(--page-max-width);
  margin-inline: auto;
}

.palette-panel-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch-btn {
  appearance: none;
  border: 2px solid transparent;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.swatch-btn:hover {
  border-radius: 22px;
}

.swatch-btn:active {
  transform: scale(0.95);
  border-radius: 14px;
}

.swatch-btn[aria-pressed="true"] {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: var(--md-sys-color-primary);
  border-radius: 24px;
  font-weight: 700;
}

.swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--md-sys-shape-corner-full);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

/* Mobile menu links */
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav-link:first-child {
  border-top-left-radius: var(--md-sys-shape-corner-extra-large);
  border-top-right-radius: var(--md-sys-shape-corner-extra-large);
}

.mobile-nav-link:last-child {
  border-bottom-left-radius: var(--md-sys-shape-corner-extra-large);
  border-bottom-right-radius: var(--md-sys-shape-corner-extra-large);
}

/* ==========================================================================
   2. HERO SECTION (Human-Crafted, Centered Minimalist Presentation)
   ========================================================================== */
.hero {
  padding-top: 32px;
  padding-bottom: 48px;
}

.hero-card {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--md-sys-color-primary-container) 40%, var(--md-sys-color-surface-container-low)),
    color-mix(in srgb, var(--md-sys-color-surface-container) 85%, var(--md-sys-color-secondary-container) 15%)
  );
  border-radius: var(--md-sys-shape-corner-extra-extra-large);
  padding: 48px 24px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.16);
  border: none;
  text-align: center;
  transition:
    background var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    border-color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

@media (min-width: 768px) {
  .hero-card {
    padding: 64px 48px 56px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  gap: 20px;
}

/* Hero Pinwheel Interactive Button */
.hero-pinwheel-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 4px 0;
  cursor: pointer;
  border-radius: var(--md-sys-shape-corner-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.hero-pinwheel-btn:hover {
  transform: scale(1.08) rotate(12deg);
}

.hero-pinwheel-btn:active {
  transform: scale(0.92) rotate(-12deg);
}

.hero-pinwheel-btn:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 4px;
}

.hero-pinwheel {
  width: 80px;
  height: 80px;
  display: block;
}

/* Kinetic Variable Headline */
.hero-headline {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-variation-settings: 'wght' var(--hero-title-weight, 650), 'wdth' var(--hero-title-width, 108);
  will-change: font-variation-settings;
  transition: font-variation-settings 600ms cubic-bezier(0.05, 0.7, 0.1, 1.0);
  max-width: 760px;
}

.hero-description {
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.m3-btn-medium {
  min-height: 48px;
  padding: 10px 24px;
  border-radius: var(--md-sys-shape-corner-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.1px;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition:
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    box-shadow var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.m3-btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.18);
}

.m3-btn-filled svg {
  fill: currentColor;
}

.m3-btn-filled:hover {
  transform: translateY(-2px);
  border-radius: 18px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.26);
}

.m3-btn-filled:active {
  transform: scale(0.96);
  border-radius: 12px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.2);
}

.m3-btn-outlined {
  background-color: transparent;
  color: var(--md-sys-color-on-surface);
  border: 1.5px solid var(--md-sys-color-outline);
}

.m3-btn-outlined:hover {
  transform: translateY(-2px);
  border-radius: 18px;
  background-color: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.m3-btn-outlined:active {
  transform: scale(0.96);
  border-radius: 12px;
}

.m3-btn-tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-btn-tonal:hover {
  transform: translateY(-2px);
  border-radius: 18px;
  background-color: color-mix(in srgb, var(--md-sys-color-secondary-container) 85%, var(--md-sys-color-on-secondary-container));
}

/* Hero Platform Quick-Selection Chips */
.hero-platform-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.hero-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--md-sys-color-outline-variant);
  transition:
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape);
}

.hero-platform-chip:hover {
  background-color: var(--md-sys-color-surface-container-highest);
  transform: translateY(-1px);
  border-radius: 16px;
}

.hero-platform-chip:active {
  transform: scale(0.97);
  border-radius: 12px;
}

.hero-platform-chip svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.disclaimer-note {
  margin: 8px auto 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.85;
  max-width: 52ch;
  text-wrap: balance;
}


/* ==========================================================================
   PINWHEEL LOGO DESIGN SYSTEM TOKENS & CHOREOGRAPHY
   ========================================================================== */
.pinwheel-rotor {
  will-change: transform;
}

/* Inner-SVG rotor (hero pinwheel button): a px origin here resolves against
   the 108-unit viewBox, i.e. the exact center. */
#hero-pinwheel-rotor {
  transform-box: view-box;
  transform-origin: 54px 54px;
}

/* Brand logos rotate as HTML boxes: a percentage origin against the border
   box has exactly one meaning in every browser. A px origin on these svgs is
   resolved against the CSS box by some engines, which put the pivot outside
   the corner and threw the petals over the wordmark on hover. */
#topbar-brand-logo,
.footer-brand-link svg {
  transform-box: border-box;
  transform-origin: 50% 50%;
}

/* Hover: the whole svg element (an HTML box) turns clockwise in place while
   the brand link slides 3px on the same spring — logo and wordmark move as
   one anchored unit. */
.brand-link:hover svg {
  transform: rotate(45deg);
}

.pinwheel-rotor.spin-once {
  animation: hero-pinwheel-spin 650ms cubic-bezier(0.2, 0, 0, 1) 1 forwards !important;
}

@keyframes hero-pinwheel-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pinwheel-blade-1 {
  fill: var(--md-sys-color-primary, #38BDF8);
  transition: fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}
.pinwheel-blade-2 {
  fill: var(--md-sys-color-secondary, #60A5FA);
  transition: fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}
.pinwheel-blade-3 {
  fill: var(--md-sys-color-tertiary, #818CF8);
  transition: fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}
.pinwheel-blade-4 {
  fill: color-mix(in srgb, var(--md-sys-color-tertiary) 55%, var(--md-sys-color-primary));
  transition: fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

.pinwheel-core {
  fill: #FFFFFF;
  stroke: rgba(0, 0, 0, 0.28);
  stroke-width: 1.5px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition:
    fill var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    stroke var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

:root[data-theme="dark"] .pinwheel-core {
  fill: #FFFFFF;
  stroke: rgba(255, 255, 255, 0.25);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

/* ==========================================================================
   3. SAFETY SECTION (Flattened hierarchy, zero nested cards)
   ========================================================================== */
.safety-section-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.safety-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 12px;
}

.safety-subtitle {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 85%, transparent);
  font-size: 1.0625rem;
  line-height: 1.5;
  max-width: 60ch;
  text-wrap: balance;
}

.section-safety .section-header h2 {
  color: var(--md-sys-color-on-tertiary-container);
}

.safety-icon-badge {
  width: 58px;
  height: 58px;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
}

.safety-icon-badge svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Tier 1: Two Prominent Protocol Cards */
.safety-rules-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .safety-rules-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.safety-action-card {
  background-color: var(--md-sys-color-surface);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.08);
}

@media (min-width: 600px) {
  .safety-action-card {
    padding: 32px 30px;
  }
}

.safety-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-card-pill {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--md-sys-color-on-tertiary-container);
  background-color: var(--md-sys-color-tertiary-container);
  padding: 4px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  display: inline-flex;
  width: fit-content;
}

.safety-action-card h3 {
  font-size: 1.375rem; /* 22px Title Large */
  line-height: 1.3;
  font-weight: 650;
  font-variation-settings: 'wdth' 102;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.safety-action-card p {
  margin: 0;
  font-size: 1rem; /* 16px Body Large */
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant);
}

/* Tier 2: Background Context & ToS Risks */
.safety-context-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding-top: 20px;
  margin-top: 8px;
}

@media (min-width: 600px) {
  .safety-context-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
  }
}

@media (min-width: 1024px) {
  .safety-context-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
  }
}

.safety-context-item {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safety-context-item h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.safety-context-item p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant);
}

/* Tier 2: Collapsible Risk & Protocol Details Drawer (M3E Expressive) */
.safety-risk-drawer {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  border-radius: var(--md-sys-shape-corner-extra-large);
  background-color: var(--md-sys-color-surface);
  overflow: hidden;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-radius var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial),
    box-shadow var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.safety-risk-drawer[open] {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large-increased);
  box-shadow: 0 4px 20px -6px rgba(0, 0, 0, 0.08);
}

.safety-drawer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.safety-drawer-toggle:hover {
  color: var(--md-sys-color-primary);
}

.safety-risk-drawer[open] .safety-drawer-toggle {
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.safety-drawer-toggle::-webkit-details-marker {
  display: none;
}

.safety-drawer-toggle .drawer-chevron {
  fill: currentColor;
  flex-shrink: 0;
  transition: transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.safety-risk-drawer[open] .safety-drawer-toggle .drawer-chevron {
  transform: rotate(180deg);
}

.safety-drawer-content {
  padding: 0 20px 20px;
}

.safety-risk-drawer[open] .safety-drawer-content {
  animation: m3e-drawer-spring var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial) both;
}

@keyframes m3e-drawer-spring {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .safety-risk-drawer[open] .safety-drawer-content {
    animation: none;
  }
}

/* ==========================================================================
   4. PLATFORM SWITCH (M3E Connected Button Group + Frames)
   ========================================================================== */
.connected-group-wrap {
  margin-bottom: 28px;
}

.connected-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background-color: transparent;
  padding: 0;
}

@media (min-width: 720px) {
  .connected-group {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 2px;
    background-color: var(--md-sys-color-surface-container-highest);
    padding: 4px;
    border-radius: var(--md-sys-shape-corner-full);
  }
}

.connected-btn {
  appearance: none;
  border: none;
  min-height: 48px;
  padding: 10px 18px;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  transition:
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    padding-inline var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

@media (min-width: 720px) {
  .connected-btn {
    background-color: var(--md-sys-color-surface-container-low);
    border-radius: 12px;
  }
  .connected-btn:first-child {
    border-top-left-radius: 26px;
    border-bottom-left-radius: 26px;
  }
  .connected-btn:last-child {
    border-top-right-radius: 26px;
    border-bottom-right-radius: 26px;
  }
}

.connected-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.connected-btn:hover {
  border-radius: 20px;
  color: var(--md-sys-color-on-surface);
}

.connected-btn:active {
  border-radius: 12px;
  transform: scale(0.97);
}

.connected-btn[aria-selected="true"] {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-radius: 26px;
  font-weight: 700;
  padding-inline: 26px;
}

/* Platform Showcase Layout */
.platform-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.platform-stage > *,
.downloads-grid > *,
.bento-grid > *,
.safety-grid > * {
  min-width: 0;
}

@media (min-width: 960px) {
  .platform-stage {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  }
}

.frame-stage-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-extra-extra-large);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (min-width: 600px) {
  .frame-stage-card {
    padding: 28px;
  }
}

/* Sub-switcher chips for screens within a platform */
.screen-subtabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.screen-chip {
  appearance: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.screen-chip:hover {
  border-radius: 20px;
}

.screen-chip[aria-pressed="true"] {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
  border-radius: 22px;
  font-weight: 700;
}

/* Phone Frame (Android) & Window Frame (Desktop/CLI) */
/* Outer frame: 32px radius, 12px padding -> Inner viewport: 20px radius */
.device-frame {
  width: 100%;
  background-color: var(--md-sys-color-surface-container-highest);
  border: 2px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large-increased);
  padding: 12px;
  transition: border-radius var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.device-frame.is-phone {
  max-width: 320px;
  margin-inline: auto;
  border-radius: 40px;
  padding: 12px;
}

.device-frame.is-phone:not(.is-wide-banner) .frame-dots {
  display: none;
}

.device-frame.is-phone:not(.is-wide-banner) .frame-chrome {
  justify-content: center;
}

.device-frame.is-phone.is-wide-banner {
  max-width: 100%;
  border-radius: var(--md-sys-shape-corner-extra-large-increased);
}

.frame-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 10px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.75rem;
  font-weight: 600;
}

.frame-dots {
  display: inline-flex;
  gap: 6px;
}

.frame-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-outline);
  opacity: 0.85;
  transition:
    opacity var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.frame-dots span:nth-child(1),
.frame-dots span.dot-close {
  background-color: #ff5f56;
}

.frame-dots span:nth-child(2),
.frame-dots span.dot-min {
  background-color: #ffbd2e;
}

.frame-dots span:nth-child(3),
.frame-dots span.dot-max {
  background-color: #27c93f;
}

.frame-chrome:hover .frame-dots span {
  opacity: 1;
}

.phone-speaker {
  width: 56px;
  height: 6px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-outline-variant);
  margin: 2px auto 10px;
}

.frame-viewport {
  border-radius: var(--md-sys-shape-corner-large-increased);
  overflow: hidden;
  background-color: var(--md-sys-color-surface-dim);
  position: relative;
}

.device-frame.is-phone:not(.is-wide-banner) .frame-viewport {
  border-radius: 28px;
}

.frame-viewport img {
  width: 100%;
  height: auto;
  display: block;
}

.frame-viewport img[data-broken="true"] {
  min-height: 240px;
  background-color: var(--md-sys-color-surface-container-high);
}

.frame-viewport img.img-fade-in {
  animation: frame-img-fade 240ms var(--md-sys-motion-spring-fast-effects) both;
}

@keyframes frame-img-fade {
  from {
    opacity: 0.3;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.frame-caption {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

/* Platform Install Steps Card */
.platform-info-card {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-extra-large-increased);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 600px) {
  .platform-info-card {
    padding: 32px;
  }
}

.platform-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-large);
  background-color: var(--md-sys-color-surface-container);
  min-width: 0;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--md-sys-color-on-surface);
  min-width: 0;
}

.cli-flags-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.cli-flags-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--md-sys-color-on-surface-variant);
}

.cli-flags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cli-flag-chip {
  appearance: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  font-family: var(--md-sys-typescale-mono);
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-sys-shape-corner-full);
  cursor: pointer;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.cli-flag-chip:hover {
  background-color: var(--md-sys-color-surface-container-high);
}

.cli-flag-chip.is-active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: transparent;
  font-weight: 700;
}

.code-block-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.code-block-wrap .code-block {
  width: 100%;
  padding-right: 16px;
}

.code-copy-btn {
  appearance: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-corner-full);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  align-self: flex-start;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.code-copy-btn:hover {
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 12px;
}

.code-copy-btn:active {
  border-radius: 10px;
  transform: scale(0.96);
}

.code-copy-btn.is-copied {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: transparent;
  animation: m3e-copy-pop 320ms var(--md-sys-motion-spring-fast-spatial);
}

@media (max-width: 599px) {
  .code-copy-btn {
    width: 100%;
    justify-content: center;
  }
}

.code-block {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-corner-large);
  font-family: var(--md-sys-typescale-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  white-space: inherit;
  word-break: inherit;
  display: inline-block;
  max-width: 100%;
}

/* ==========================================================================
   4. PHOTO QUALITY SHOWCASE (Original RAW vs Storage Saver)
   ========================================================================== */
#quality {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-quality .section-header h2 {
  color: var(--md-sys-color-on-secondary-container);
}

.quality-stage-controls {
  display: inline-flex;
  align-self: center;
  background-color: var(--md-sys-color-surface);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  border-radius: var(--md-sys-shape-corner-full);
  padding: 4px;
  gap: 4px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
}

.quality-toggle-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: var(--md-sys-shape-corner-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.quality-toggle-btn svg {
  fill: currentColor;
  flex-shrink: 0;
}

.quality-toggle-btn.is-active {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 700;
}

.quality-viewer-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--md-sys-shape-corner-extra-extra-large);
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-highest);
  aspect-ratio: 16 / 9;
  display: flex;
  user-select: none;
  touch-action: pan-y;
  --split-pos: 50%;
}

.quality-layer-original {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--split-pos, 50%)) 0 0);
  will-change: clip-path;
  pointer-events: none;
}

.quality-sample-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: 65% 35%;
  transition: transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.quality-viewer-wrap.is-loupe-active .quality-sample-img {
  transform: scale(2.2);
}

.quality-mode-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: rgba(18, 19, 22, 0.85);
  color: #FFFFFF;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 2;
  pointer-events: none;
}

.quality-mode-pill .pill-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
}

.quality-mode-pill.is-compressed .pill-status-dot {
  background-color: var(--md-sys-color-secondary);
}

.quality-split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split-pos, 50%);
  transform: translateX(-50%);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
  z-index: 4;
}

.quality-split-divider:focus,
.quality-split-divider:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 4px;
}

.quality-split-divider .divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background-color: #FFFFFF;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.quality-split-divider .divider-handle-pill {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: #FFFFFF;
  color: #1D1B20;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 2;
  transition: transform var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.quality-split-divider:hover .divider-handle-pill,
.quality-split-divider.is-dragging .divider-handle-pill {
  transform: scale(1.1);
}

.quality-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .quality-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .quality-specs-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.quality-spec-item {
  background-color: var(--md-sys-color-surface);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  border-radius: var(--md-sys-shape-corner-large-increased);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
}

.quality-spec-item .spec-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
}

.quality-spec-item .spec-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.quality-spec-item .spec-desc {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.4;
}

/* ==========================================================================
   5. FEATURES BENTO GRID (Expandable with M3E Spring Motion)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 16px;
}

@media (min-width: 600px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
  }
}

.bento-card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial),
    box-shadow var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12);
}

.bento-card:active {
  transform: scale(0.99);
}

.bento-card:focus,
.bento-card:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.bento-card.tone-high:hover {
  background-color: var(--md-sys-color-surface-container-highest);
}

.bento-card.tone-low:hover {
  background-color: var(--md-sys-color-surface-container);
}

.bento-card.tone-primary:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary-container) 92%, var(--md-sys-color-on-primary-container));
}

/* Expandable detail section */
.bento-expandable {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
  overflow: hidden;
}

.bento-detail-text {
  min-height: 0;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0;
  max-width: 60ch;
  text-wrap: balance;
  transition: opacity var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.bento-card[aria-expanded="true"] .bento-expandable {
  grid-template-rows: 1fr;
}

.bento-card[aria-expanded="true"] .bento-expandable .bento-detail-text {
  opacity: 0.95;
}

.bento-expand-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: 6px;
  color: inherit;
  opacity: 1;
}

.bento-card:hover .bento-expand-cue {
  opacity: 1;
}

.cue-chevron {
  fill: currentColor;
  transition: transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.bento-card[aria-expanded="true"] .cue-chevron {
  transform: rotate(180deg);
}

/* Bento Card Sizes and Visual Hierarchy */
.bento-card-large {
  padding: clamp(28px, 4vw, 42px);
  min-height: 280px;
}
.bento-card-large .bento-title {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.2;
  font-weight: 700;
}

.bento-card-medium {
  padding: 28px 24px;
  min-height: 220px;
}
.bento-card-medium .bento-title {
  font-size: 1.25rem;
  line-height: 1.28;
  font-weight: 650;
}

.bento-card-small {
  padding: 22px 20px;
  min-height: 180px;
}
.bento-card-small .bento-title {
  font-size: 1.0625rem;
  line-height: 1.3;
  font-weight: 650;
}

/* Varied sizes and corner radii (24px to 48px) */
.bento-card.r-48 {
  border-radius: var(--md-sys-shape-corner-extra-extra-large); /* 48px */
}
.bento-card.r-36-asym {
  border-radius: 44px 28px 44px 28px;
}
.bento-card.r-32 {
  border-radius: var(--md-sys-shape-corner-extra-large-increased); /* 32px */
}
.bento-card.r-28 {
  border-radius: var(--md-sys-shape-corner-extra-large); /* 28px */
}
.bento-card.r-24 {
  border-radius: 24px;
}

.bento-card.tone-primary {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-on-primary-container) 15%, transparent);
}
.bento-card.tone-secondary {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-on-secondary-container) 15%, transparent);
}
.bento-card.tone-tertiary {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 15%, transparent);
}
.bento-card.tone-high {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}
.bento-card.tone-low {
  background-color: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}
.bento-card.tone-surface-container {
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}
.bento-card.tone-surface-container:hover {
  background-color: var(--md-sys-color-surface-container-high);
}
.bento-card.tone-highest {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

@media (min-width: 600px) and (max-width: 959px) {
  .bento-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .bento-span-7 { grid-column: span 7; }
  .bento-span-5 { grid-column: span 5; }
  .bento-span-4 { grid-column: span 4; }
  .bento-span-8 { grid-column: span 8; }
  .bento-span-6 { grid-column: span 6; }
}

.bento-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bento-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

.bento-card.tone-primary .bento-icon {
  color: var(--md-sys-color-on-primary-container);
}
.bento-card.tone-secondary .bento-icon {
  color: var(--md-sys-color-on-secondary-container);
}

.bento-title {
  font-size: 1.375rem; /* 22px Title Large */
  line-height: 1.28;
  font-weight: 650;
  font-variation-settings: 'wdth' 104;
  margin: 0;
}

.bento-line {
  margin: 0;
  font-size: 1rem; /* 16px Body Large */
  line-height: 1.5;
  opacity: 0.92;
  max-width: 58ch;
  text-wrap: balance;
}

.bento-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.bento-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--md-sys-shape-corner-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.bento-card.tone-primary .bento-chip {
  background-color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 10%, transparent);
  color: var(--md-sys-color-on-primary-container);
  border-color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 20%, transparent);
}

/* ==========================================================================
   6. DOWNLOADS & APK SHA-256 VERIFICATION
   ========================================================================== */
#downloads {
  position: relative;
  z-index: 20;
}

#faq {
  position: relative;
  z-index: 10;
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 840px) {
  .downloads-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Outer radius 32px - 24px padding -> inner cards 16px radius */
.download-card {
  background-color: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large-increased);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
  scroll-margin-top: 96px;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    box-shadow var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

/* Filled-box emphasis applied when the visitor arrives via a download CTA. */
.download-card.is-highlighted {
  background-color: var(--md-sys-color-surface-container-highest);
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.22);
}

@media (min-width: 600px) {
  .download-card {
    padding: 32px;
  }
}

.dl-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dl-title-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.os-selector-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background-color: var(--md-sys-color-surface-container);
  padding: 4px;
  border-radius: var(--md-sys-shape-corner-full);
}

.os-chip {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--md-sys-shape-corner-full);
  cursor: pointer;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.os-chip:hover {
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface-container-high);
}

.os-chip.is-active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 700;
}

.dl-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

/* Single-button layout (macOS Universal, Linux x64, CLI): occupies full card whitespace like Android */
.dl-actions-group.is-single-action,
.dl-actions-group:has(#dl-wrap-secondary[hidden]) {
  width: 100%;
}

.dl-actions-group.is-single-action .dl-dropdown-wrapper,
.dl-actions-group:has(#dl-wrap-secondary[hidden]) .dl-dropdown-wrapper {
  width: 100%;
  flex: 1 1 100%;
}

.dl-actions-group.is-single-action .dl-dropdown-btn,
.dl-actions-group:has(#dl-wrap-secondary[hidden]) .dl-dropdown-btn,
.dl-release-btn {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.dl-actions-group.is-single-action .dl-menu-popover,
.dl-actions-group:has(#dl-wrap-secondary[hidden]) .dl-menu-popover {
  width: 100%;
  min-width: 100%;
}

.dl-actions-group.is-single-action .dl-browse-github-link,
.dl-actions-group:has(#dl-wrap-secondary[hidden]) .dl-browse-github-link {
  width: 100%;
  justify-content: center;
}

.dl-dropdown-wrapper {
  position: relative;
  display: inline-block;
  z-index: 5;
}

.dl-dropdown-wrapper:focus-within,
.dl-dropdown-wrapper:has([aria-expanded="true"]) {
  z-index: 40;
}

.dl-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.dl-btn-icon {
  fill: currentColor;
}

.dl-btn-chevron {
  fill: currentColor;
  margin-left: 2px;
  transition: transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.dl-dropdown-btn[aria-expanded="true"] .dl-btn-chevron {
  transform: rotate(180deg);
}

.dl-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.28);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: m3e-dropdown-in 180ms var(--md-sys-motion-spring-fast-spatial);
}

.dl-menu-popover[hidden] {
  display: none !important;
}

@keyframes m3e-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dl-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  background-color: transparent;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
}

.dl-menu-item:hover,
.dl-menu-item:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest);
  transform: translateX(2px);
  outline: none;
}

.dl-menu-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dl-menu-item-title {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--md-sys-color-on-surface);
}

.dl-menu-item-sub {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
}

.dl-menu-item-arrow {
  fill: none;
  stroke: var(--md-sys-color-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial), opacity 150ms ease;
}

.dl-menu-item:hover .dl-menu-item-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.dl-browse-github-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-corner-full);
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.dl-browse-github-link svg {
  fill: currentColor;
}

.dl-browse-github-link:hover {
  background-color: var(--md-sys-color-surface-container-high);
  text-decoration: underline;
}

@media (max-width: 599px) {
  .dl-actions-group {
    flex-direction: column;
    align-items: stretch;
  }
  .dl-dropdown-wrapper {
    width: 100%;
  }
  .dl-dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }
  .dl-menu-popover {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }
  .dl-browse-github-link {
    justify-content: center;
  }
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.8125rem;
  font-weight: 700;
}

.sha-box {
  background-color: transparent;
  border: none;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 0;
  padding: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sha-box p {
  max-width: 65ch;
  text-wrap: balance;
}

.sha-label {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.1px;
  color: var(--md-sys-color-on-surface);
}

.bento-arch-diagram {
  margin: 14px 0 8px;
  padding: 12px 0;
  background-color: transparent;
  border: none;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sha-value {
  margin: 0;
  padding: 10px 14px;
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  font-family: var(--md-sys-typescale-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface);
  word-break: break-all;
  user-select: all;
}

.sha-value code {
  font-family: inherit;
  color: inherit;
  letter-spacing: 0.03em;
}

.copy-btn {
  appearance: none;
  border: none;
  align-self: flex-start;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 24px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.copy-btn:hover {
  border-radius: 18px;
  transform: translateY(-1px);
}

.copy-btn:active {
  border-radius: 14px;
  transform: scale(0.96);
}

.copy-btn.is-copied {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-radius: 24px;
  animation: m3e-copy-pop 320ms var(--md-sys-motion-spring-fast-spatial);
}

@keyframes m3e-copy-pop {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.copy-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sha-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hash-check-toggle {
  appearance: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--md-sys-shape-corner-full);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape);
}

.hash-check-toggle svg {
  fill: currentColor;
  flex-shrink: 0;
}

.hash-check-toggle:hover {
  border-radius: 18px;
  background-color: var(--md-sys-color-surface-container-highest);
  border-color: var(--md-sys-color-outline);
  color: var(--md-sys-color-primary);
  transform: translateY(-1px);
}

.hash-check-toggle:active {
  border-radius: 14px;
  transform: scale(0.97);
}

.hash-check-toggle[aria-expanded="true"] {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: var(--md-sys-color-primary);
}

.hash-toggle-chevron {
  transition: transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial);
  margin-left: 2px;
}

.hash-check-toggle[aria-expanded="true"] .hash-toggle-chevron {
  transform: rotate(180deg);
}

.hash-check-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.hash-check-panel[hidden] {
  display: none !important;
}

.hash-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hash-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 48px 12px 14px;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-sys-typescale-mono);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.hash-input:focus,
.hash-input:focus-visible {
  transform: none !important;
  border-color: var(--md-sys-color-primary);
  outline: 2px solid var(--md-sys-color-primary);
}

.hash-clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--md-sys-shape-corner-full);
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.hash-clear-btn:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

/* The class's display would override the hidden attribute's UA style. */
.hash-clear-btn[hidden] {
  display: none !important;
}

.hash-result {
  font-size: 0.8125rem;
  line-height: 1.45;
  border-radius: var(--md-sys-shape-corner-small);
  padding: 10px 14px;
  display: none;
}

.hash-result.is-match {
  display: block;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  animation: m3e-copy-pop 320ms var(--md-sys-motion-spring-fast-spatial);
}

.hash-result.is-mismatch {
  display: block;
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.dl-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
}

.dl-steps li {
  text-wrap: pretty;
  line-height: 1.5;
}

.dl-steps strong {
  color: var(--md-sys-color-on-surface);
}

/* ==========================================================================
   7. FAQ (M3E Segmented Expandable List)
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
}

.faq-item {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
  transition:
    border-radius var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.faq-item:first-child {
  border-top-left-radius: var(--md-sys-shape-corner-extra-large);
  border-top-right-radius: var(--md-sys-shape-corner-extra-large);
}

.faq-item:last-child {
  border-bottom-left-radius: var(--md-sys-shape-corner-extra-large);
  border-bottom-right-radius: var(--md-sys-shape-corner-extra-large);
}

.faq-item[open] {
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-large-increased);
  margin-block: 4px;
}

.faq-summary {
  list-style: none;
  min-height: 60px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--md-sys-color-on-surface);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 40px;
  height: 40px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    transform var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-fast-spatial),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.faq-chevron svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.faq-body {
  padding: 0 20px 20px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-item[open] .faq-body {
  animation: m3e-faq-expand var(--md-sys-motion-spring-fast-spatial-dur) var(--md-sys-motion-spring-default-spatial) both;
}

@keyframes m3e-faq-expand {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-body p {
  margin: 0;
  max-width: 70ch;
  text-wrap: pretty;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 64px;
  padding: 56px var(--page-gutter) 48px;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
  background-color: var(--md-sys-color-surface-container);
  border-top-left-radius: var(--md-sys-shape-corner-extra-extra-large);
  border-top-right-radius: var(--md-sys-shape-corner-extra-extra-large);
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 28px;
}

@media (min-width: 680px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px 32px;
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 4px 12px 4px 0;
  /* Same spring as the logo rotation so rotate + slide move as one unit. */
  transition: transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.footer-brand-link:hover {
  transform: translateX(3px);
}

.footer-brand-link svg {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  transition: transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.footer-brand-link:hover svg {
  transform: rotate(90deg);
}

.footer-brand-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
}

.footer-brand-desc {
  margin: 0;
  max-width: 320px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  align-self: flex-start;
  margin-top: 4px;
  border: 1px solid var(--md-sys-color-outline-variant);
}

.footer-status-pill .live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-primary);
  display: inline-block;
  flex-shrink: 0;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.footer-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--md-sys-shape-corner-full);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 650;
  transition:
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    box-shadow var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects);
}

.footer-btn-primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.footer-btn-primary:hover {
  transform: translateY(-2px);
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.footer-btn-tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.footer-btn-tonal:hover {
  transform: translateY(-2px);
  border-radius: 16px;
  background-color: color-mix(in srgb, var(--md-sys-color-secondary-container) 85%, var(--md-sys-color-on-secondary-container));
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 14px 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  margin: 0 -12px;
  border-radius: var(--md-sys-shape-corner-full);
  /* Opaque resting surface matching the footer card; keeps link text
     evaluable against a concrete background by contrast checkers. */
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape);
}

.footer-links a:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-primary);
  transform: translateX(4px);
}

.footer-disclaimer-bar {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .footer-disclaimer-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-disclaimer-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 65ch;
  text-wrap: balance;
}

.footer-disclaimer-primary {
  margin: 0;
  font-weight: 650;
  color: var(--md-sys-color-on-surface);
}

.footer-disclaimer-secondary {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 650;
  border: 1px solid var(--md-sys-color-outline-variant);
  white-space: nowrap;
  transition:
    transform var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape),
    background-color var(--md-sys-motion-spring-fast-effects-dur) var(--md-sys-motion-spring-fast-effects),
    border-radius var(--md-sys-motion-curve-shape-dur) var(--md-sys-motion-curve-shape);
}

.footer-back-to-top:hover {
  transform: translateY(-2px);
  border-radius: 12px;
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-primary);
}


/* Platform Pane Shared Axis Spring Transition */
.platform-stage {
  transition: opacity var(--md-sys-motion-spring-default-effects-dur) var(--md-sys-motion-spring-default-effects),
              transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.platform-stage.platform-enter {
  animation: platform-shared-axis var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial) both;
}

@keyframes platform-shared-axis {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Scroll reveal (with CSS scroll-driven animations & fallback) */
.reveal-section {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  transition:
    opacity var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    transform var(--md-sys-motion-spring-default-spatial-dur) var(--md-sys-motion-spring-default-spatial);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@supports (animation-timeline: view()) {
  .hero-phone-preview {
    animation: hero-phone-parallax linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  .hero-window-preview {
    animation: hero-window-parallax linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}

@keyframes hero-phone-parallax {
  0% { transform: translateY(6px); }
  100% { transform: translateY(-8px); }
}

@keyframes hero-window-parallax {
  0% { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

/* Theme recolor smooth transitions */
html, body, .hero-card, .bento-card, .safety-action-card, .quality-showcase-card, .download-card, .popover-panel {
  transition:
    background-color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    border-color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects),
    color var(--md-sys-motion-spring-slow-effects-dur) var(--md-sys-motion-spring-slow-effects);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 350ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

/* Delight: Keyboard Shortcuts Toast */
.shortcuts-toast {
  position: fixed;
  bottom: 24px;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  pointer-events: none;
  animation: m3e-toast-enter 280ms var(--md-sys-motion-spring-default-spatial) both;
}

.shortcuts-toast[hidden] {
  display: none !important;
}

.shortcuts-content {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.2);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.shortcuts-title {
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.shortcut-key kbd {
  font-family: var(--md-sys-typescale-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
}

@keyframes m3e-toast-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Respect prefers-reduced-motion: turn all animations off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-play-state: paused !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-section {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero-blob {
    animation: none !important;
  }
  .hero-phone-preview, .hero-window-preview {
    animation: none !important;
    transform: none !important;
  }
  .bento-expandable {
    transition: none !important;
  }
  .popover-panel:not([hidden]) {
    animation: none !important;
  }
}
