/* Android download page (/android). Builds on base.css: the tokens, header,
   buttons, cards and footer of the earlier landing, in a narrower column. */

.android-page {
  --content: 760px;
}

/* The markup carries both languages; android.js sets data-lang before the
   body renders. Without the script, English shows. */
html:not([data-lang="ru"]) [data-l="ru"],
html[data-lang="ru"] [data-l="en"] {
  display: none !important;
}

.android-page [hidden] {
  display: none !important;
}

.download-main {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 28px;
}

.download-intro {
  margin-bottom: 26px;
}

.android-page h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1;
}

.android-page h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
}

.download-lede {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
}

.download-card,
.note-card {
  border: 1px solid var(--white-line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.48)),
    var(--surface-subtle);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.download-card {
  padding: 28px;
  box-shadow: var(--shadow);
}

.release-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.release-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(28, 27, 27, 0.12);
}

.android-page .release-title {
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1.2;
}

.release-requirement,
.platform-hint,
.release-status,
.release-fallback {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.platform-hint {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
}

.download-button {
  width: 100%;
  min-height: 60px;
  gap: 10px;
  font-size: 16px;
}

/* No release yet (latest.json is 404): the button rests, the status says why. */
.download-button[aria-disabled="true"] {
  color: var(--muted);
  background: rgba(28, 27, 27, 0.08);
  box-shadow: none;
  pointer-events: none;
}

.download-glyph {
  flex: none;
}

.release-status:not(:empty) {
  margin-top: 14px;
}

.release-status.is-error {
  color: var(--error);
}

.release-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.release-facts > div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--white-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
}

.release-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.release-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.release-facts .release-checksum {
  grid-column: 1 / -1;
}

.release-checksum dd {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.release-checksum code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.02em;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.copy-button {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.copy-button:focus-visible {
  outline: 2px solid rgba(28, 27, 27, 0.75);
  outline-offset: 3px;
}

.release-fallback {
  margin-top: 16px;
}

.release-fallback a,
.help-line a {
  font-weight: 650;
  text-underline-offset: 3px;
}

.install-section {
  padding: 46px 0 34px;
}

.install-section h2 {
  margin-bottom: 18px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps .step-card {
  min-height: 0;
  padding: 22px;
}

.install-steps .step-number {
  margin-bottom: 16px;
}

.note-card {
  margin-bottom: 14px;
  padding: 28px;
}

.note-card h2 {
  margin-bottom: 16px;
}

.note-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.note-card p + p {
  margin-top: 12px;
}

.note-card-quiet {
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.device-notes {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-notes li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.device-notes li:first-child {
  padding-top: 0;
  border-top: 0;
}

.device-notes li:last-child {
  padding-bottom: 0;
}

.device-notes h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.help-line {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.help-line a {
  color: var(--ink);
}

@media (max-width: 640px) {
  .download-main {
    width: min(100% - 28px, var(--content));
    padding-top: 22px;
  }

  .download-card,
  .note-card {
    padding: 20px;
    border-radius: 28px;
  }

  /* Phones: one list of label/value rows instead of three tiles. */
  .release-facts {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 18px;
  }

  .release-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 2px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
  }

  .release-facts dt {
    margin-bottom: 0;
  }

  .release-facts dd {
    text-align: right;
  }

  .release-facts .release-checksum {
    display: block;
    padding-bottom: 0;
  }

  .release-checksum dt {
    margin-bottom: 8px;
  }

  .release-checksum dd {
    flex-direction: column;
    gap: 10px;
    text-align: left;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }

  .install-steps .step-card {
    padding: 20px;
  }
}
