:root {
  --indigo-900: #1e1b4b;
  --indigo-700: #4338ca;
  --indigo-500: #6366f1;
  --android-green: #3ddc84;
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #d8e0ea;
  --muted: #475569;
  --fg: #0f172a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.14);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --indigo-900: #c7d2fe;
    --indigo-700: #a5b4fc;
    --indigo-500: #818cf8;
    --android-green: #55e696;
    --bg: #0f172a;
    --surface: #162033;
    --border: #334155;
    --muted: #cbd5e1;
    --fg: #f8fafc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  font-size: clamp(16px, 1rem + 0.15vw, 18px);
  line-height: 1.55;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body,
button,
input {
  font: inherit;
}

a {
  color: var(--indigo-700);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

button,
a {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--android-green);
  outline-offset: 4px;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

pre {
  margin: 1rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 85%, var(--fg) 6%);
}

pre code {
  white-space: pre;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--android-green);
  color: #062417;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}

.header-inner,
.hero-inner,
.section,
.footer-inner {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 0.7rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
  color: var(--fg);
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  overflow-wrap: anywhere;
}

.brand-mark {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
}

.brand-mark rect {
  fill: var(--indigo-900);
}

.brand-mark text {
  fill: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: system-ui, sans-serif;
}

.apk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 1.9rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--android-green) 28%, transparent);
  color: #0d3d29;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (prefers-color-scheme: dark) {
  .apk-chip {
    color: #d9ffeb;
  }
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--fg);
}

.hero {
  background:
    radial-gradient(circle at 10% 10%, rgba(61, 220, 132, 0.28), transparent 25rem),
    linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  color: #ffffff;
}

.hero-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 4.4rem);
  padding: 3rem 0;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: color-mix(in srgb, var(--android-green) 86%, var(--fg) 14%);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--android-green);
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.35rem, 2rem + 2.2vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: #e0e7ff;
  font-size: 1.12rem;
}

.hero-actions {
  display: grid;
  gap: 0.8rem;
  align-items: start;
  margin-top: 1.7rem;
}

.cta,
.small-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: var(--android-green);
  color: #062417;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.cta {
  padding: 0.9rem 1.25rem;
  font-size: 1.02rem;
}

.small-cta {
  min-height: 2.45rem;
  padding: 0.65rem 1rem;
  background: var(--indigo-700);
  color: #ffffff;
}

.cta:hover,
.small-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.version-line {
  margin: 0;
  color: #dbeafe;
  font-size: 0.95rem;
}

.phone-shell {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(19rem, 82vw);
  aspect-ratio: 9 / 19;
  padding: 1.25rem;
  border: 0.58rem solid #10162a;
  border-radius: 42px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.16), transparent 42%),
    #f8fafc;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
  color: #0f172a;
}

.phone-notch {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  width: 5rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #10162a;
  transform: translateX(-50%);
}

.phone-status {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 1rem;
  margin-top: 0.3rem;
}

.signal {
  width: 1rem;
  height: 0.8rem;
  border-bottom: 0.18rem solid #0f172a;
  border-left: 0.18rem solid #0f172a;
  transform: skew(-18deg);
}

.battery {
  position: relative;
  width: 1.25rem;
  height: 0.7rem;
  border: 0.12rem solid #0f172a;
  border-radius: 0.12rem;
}

.battery::after {
  position: absolute;
  top: 0.16rem;
  right: -0.28rem;
  width: 0.16rem;
  height: 0.24rem;
  border-radius: 0.1rem;
  background: #0f172a;
  content: "";
}

.quiz-card {
  display: grid;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #d8e0ea;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.quiz-kicker {
  margin: 0;
  color: #4338ca;
  font-size: 0.78rem;
  font-weight: 800;
}

.quiz-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.answers {
  display: grid;
  gap: 0.55rem;
}

.answer {
  display: grid;
  grid-template-columns: 1.55rem 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.3;
}

.answer span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 850;
}

.answer.selected {
  position: relative;
  border-color: #22c55e;
  background: #ecfdf5;
  color: #0f172a;
}

.answer.selected::after {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  color: #15803d;
  font-weight: 900;
  content: "✓";
}

.answer.selected span {
  background: var(--android-green);
  color: #062417;
}

.mock-progress {
  overflow: hidden;
  height: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.mock-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--android-green);
}

.section {
  padding: 4rem 0 0;
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 1.25rem;
}

.section h2 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(1.7rem, 1.45rem + 1vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.download-card,
.security-card,
.notes [data-slot="releaseNotes"] {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.download-card {
  display: grid;
  gap: 1.3rem;
  padding: 1.25rem;
}

.download-title-row {
  display: grid;
  gap: 1rem;
}

.file-label {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.download-card h3 {
  margin: 0;
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.status-line {
  align-self: start;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--android-green) 55%, var(--border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--android-green) 14%, var(--surface));
  color: var(--fg);
  font-weight: 750;
}

.status-line.error,
.error {
  color: #b91c1c;
}

.status-line.error {
  border-color: #ef4444;
  background: color-mix(in srgb, #fee2e2 70%, var(--surface));
}

.metadata-grid {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.metadata-grid > div {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.metadata-grid dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metadata-grid dd {
  margin: 0.25rem 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.metadata-grid small {
  color: var(--muted);
  font-weight: 600;
}

.download-cta {
  width: 100%;
}

.security-card {
  padding: 1.25rem;
}

.security-card p {
  margin: 0.8rem 0;
}

.checksum-box {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}

.checksum-box label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sha256 {
  display: block;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  user-select: all;
  word-break: break-all;
}

.checksum-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.copy-status {
  min-height: 1.5rem;
  color: var(--muted);
  font-weight: 750;
}

.sidecar a,
.noscript-fallback a {
  overflow-wrap: anywhere;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  min-height: 12rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card svg {
  width: 2rem;
  height: 2rem;
  color: var(--indigo-700);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.install-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  counter-reset: install-step;
  list-style: none;
}

.install-steps li {
  position: relative;
  min-height: 4rem;
  padding: 1rem 1rem 1rem 4.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  counter-increment: install-step;
}

.install-steps li::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--indigo-700);
  color: #ffffff;
  font-weight: 900;
  content: counter(install-step);
}

.install-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 750;
}

.notes [data-slot="releaseNotes"] {
  padding: 1.25rem;
}

.notes [data-slot="releaseNotes"] h1,
.notes [data-slot="releaseNotes"] h2,
.notes [data-slot="releaseNotes"] h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.1rem;
}

.notes [data-slot="releaseNotes"] p {
  margin: 0.45rem 0;
}

.notes [data-slot="releaseNotes"] ul {
  margin: 0.45rem 0;
  padding-left: 1.25rem;
}

.faq-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-list details + details {
  border-top: 1px solid var(--border);
}

.faq-list summary {
  position: relative;
  min-height: 3.4rem;
  padding: 1rem 3rem 1rem 1.1rem;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

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

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.faq-list details[open] summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.faq-list p {
  margin: 0;
  padding: 0 1.1rem 1rem;
  color: var(--muted);
}

.noscript-fallback {
  width: min(100% - 2rem, var(--max-width));
  margin: 2rem auto 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--android-green) 45%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--android-green) 12%, var(--surface));
}

.site-footer {
  margin-top: 4rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  gap: 1.1rem;
  padding: 2rem 0;
  text-align: center;
}

.footer-inner div {
  display: grid;
  gap: 0.25rem;
}

.footer-inner span,
.footer-inner a {
  color: var(--muted);
}

@media (min-width: 600px) {
  .metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metadata-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  }

  .download-title-row {
    grid-template-columns: 1fr minmax(16rem, auto);
    align-items: start;
  }

  .download-cta {
    width: fit-content;
  }

  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: left;
  }
}

@media (max-width: 767px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: auto;
    gap: 0.7rem;
    padding: 0.85rem 0;
  }

  .brand {
    gap: 0.55rem;
    font-size: 1rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .apk-chip {
    min-height: 1.7rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.74rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
  }

  .site-nav a {
    display: grid;
    place-items: center;
    min-height: 2.2rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .hero-inner {
    min-height: auto;
    padding: 2.15rem 0 2.35rem;
  }

  .cta {
    width: 100%;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 1.95rem + 1vw, 2.35rem);
    line-height: 1.08;
  }

  .hero-subtitle {
    margin-top: 1rem;
    font-size: 1rem;
  }

  .phone-shell {
    display: none;
  }

  .section {
    padding-top: 3rem;
  }
}

@media (max-width: 375px) {
  .header-inner,
  .hero-inner,
  .section,
  .footer-inner,
  .noscript-fallback {
    width: min(100% - 1rem, var(--max-width));
  }

  .site-nav {
    gap: 0.2rem;
  }

  .site-nav a {
    padding-inline: 0.35rem;
    font-size: 0.82rem;
  }

  .phone {
    width: min(17rem, 92vw);
    padding: 1rem;
  }

  .answer {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .cta:hover,
  .small-cta:hover,
  .feature-card:hover {
    transform: none;
  }
}
