/* FastAPKs public site. No web fonts, no framework: speed is the brand. */
:root {
  --bg: #f3f5f2;          /* cool stone */
  --card: #ffffff;
  --ink: #15201b;         /* deep green-black */
  --quiet: #5b6660;
  --line: #d8ded9;
  --cobalt: #2348e8;      /* download */
  --cobalt-ink: #ffffff;
  --verified: #0f7b5f;    /* official source, safety */
  --caution: #8a5a00;
  --caution-bg: #fff6e0;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --measure: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101512; --card: #18201b; --ink: #e7ece8; --quiet: #9aa59f; --line: #2a342e;
    --cobalt: #7d95ff; --cobalt-ink: #0b1340; --verified: #5fd0a8; --caution: #f0c060; --caution-bg: #2a2310;
  }
}
:root[data-theme="dark"] {
  --bg: #101512; --card: #18201b; --ink: #e7ece8; --quiet: #9aa59f; --line: #2a342e;
  --cobalt: #7d95ff; --cobalt-ink: #0b1340; --verified: #5fd0a8; --caution: #f0c060; --caution-bg: #2a2310;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--cobalt); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
@media (max-width: 520px) { .theme-toggle { margin-left: auto; } }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--cobalt); font-weight: 800; }
.site-search { flex: 1; display: flex; }
.site-search input {
  width: 100%; font: inherit; padding: 7px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.theme-toggle {
  flex: none; width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 50%; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--quiet); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .theme-toggle svg { transition: transform .25s ease; } .theme-toggle:active svg { transform: rotate(-30deg); } }

/* Breadcrumb */
.crumbs { font-size: 14px; color: var(--quiet); margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--quiet); }

/* App header */
.app-head { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; margin: 20px 0 16px; }
.app-head img { width: 72px; height: 72px; border-radius: 18px; background: var(--line); }
.app-head h1 { font-size: clamp(24px, 5vw, 32px); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.app-head p { margin: 4px 0 0; color: var(--quiet); font-size: 15px; }

/* The download bar: the one loud thing on the page */
.get { margin: 0 0 8px; }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--cobalt); color: var(--cobalt-ink); text-decoration: none;
  border-radius: var(--radius-lg); padding: 14px 20px; min-height: 64px;
}
.dl:hover { filter: brightness(1.06); }
.dl .what { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }
.dl .file { font-size: 14px; opacity: 0.9; text-align: right; line-height: 1.35; }
.dl .file span { display: block; }
.dl.play { background: var(--card); color: var(--ink); border: 2px solid var(--ink); }
.official { font-size: 14px; color: var(--quiet); margin: 8px 2px 0; }
.official a { color: var(--verified); font-weight: 600; }

/* Facts: a spec sheet */
.facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; margin: 24px 0;
}
.facts div { background: var(--card); padding: 10px 12px; }
.facts dt { font-size: 13px; color: var(--quiet); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Text */
.prose h2 { font-size: 21px; letter-spacing: -0.01em; margin: 32px 0 8px; line-height: 1.25; }
.prose h3 { font-size: 17px; margin: 24px 0 6px; }
.prose p, .prose li { max-width: 68ch; }
.lead { font-size: 18px; }
.notice {
  background: var(--caution-bg); color: var(--ink); border-left: 4px solid var(--caution);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 15px; margin: 16px 0;
}
.safety { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: 4px 16px 12px; margin: 24px 0; }
.safety h2 { margin-top: 12px; }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: 6px 0 0; }
.byline { font-size: 14px; color: var(--quiet); border-top: 1px solid var(--line); margin-top: 32px; padding-top: 12px; }

/* App lists */
.list { list-style: none; padding: 0; margin: 12px 0 24px; }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; text-decoration: none; color: var(--ink); }
.list img { width: 48px; height: 48px; border-radius: 12px; background: var(--line); }
.list .name { font-weight: 600; display: block; line-height: 1.3; }
.list .sub { font-size: 14px; color: var(--quiet); }
.list .tag { font-size: 13px; color: var(--quiet); white-space: nowrap; }
.icon-fallback {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--line); color: var(--quiet); font-weight: 700; border-radius: 26%;
}
.cats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.cats a { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 12px; color: var(--ink); text-decoration: none; font-size: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 32px; }
.section-head h2 { font-size: 20px; margin: 0; }
.pager { display: flex; justify-content: space-between; margin: 16px 0 32px; }

/* Download countdown */
.dlwait { max-width: 34rem; margin: 24px auto 0; }
.dlwait-app { display: flex; gap: 14px; align-items: center; }
.dlwait-app img, .dlwait-app .icon-fallback { width: 56px; height: 56px; border-radius: 14px; }
.dlwait-app h1 { font-size: clamp(20px, 4.5vw, 26px); letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
.dlwait-app p { margin: 2px 0 0; }
.dlwait-timer { position: relative; width: 132px; height: 132px; margin: 28px auto 10px; }
.dlwait-timer .ring-bg { fill: none; stroke: var(--line); stroke-width: 8; }
.dlwait-timer .ring { fill: none; stroke: var(--cobalt); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.dlwait-timer.done .ring { stroke: var(--verified); }
.dlwait-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dlwait-status { text-align: center; font-size: 17px; margin: 0 0 18px; }
.dlwait-go { margin-bottom: 8px; }
.dlwait .facts { margin: 18px 0; }
.small { font-size: 13px; }
.sha code { word-break: break-all; font-size: 12px; }
.muted { color: var(--quiet); }
@media (prefers-reduced-motion: reduce) { .dlwait-timer .ring { transition: none; } }

/* Forms */
form.stack label { display: block; font-weight: 600; margin: 12px 0 4px; }
form.stack input, form.stack textarea, form.stack select {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
}
form.stack textarea { min-height: 140px; }
form.stack button { margin-top: 16px; font: inherit; font-weight: 650; background: var(--cobalt); color: var(--cobalt-ink); border: 0; border-radius: var(--radius-sm); padding: 10px 18px; cursor: pointer; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; font-size: 14px; color: var(--quiet); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.site-foot a { color: var(--quiet); }

@media (max-width: 520px) {
  .site-search { display: none; }
  .dl { flex-direction: column; align-items: flex-start; }
  .dl .file { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
