/* The download page (/download) — installs the site as an app
   (public/js/pwa.js). */

.dl-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 16px;
}

.dl-card {
  width: 100%;
  max-width: 480px;
  padding: 26px 24px 30px;
  text-align: center;
  background: #e0fbf8;
  border: 3px solid var(--ink, #000);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink, #000);
}

/* The hopping fox from the app's loading screen. */
.dl-fox {
  width: 112px;
  margin: 0 auto 8px;
}

.dl-title {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  font-weight: 900;
  line-height: 1.3;
  color: #000;
}

/* The lesson slides' teal marker (.lp-key). */
.dl-key {
  padding: 0 0.18em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--memteal, #00e5cc) 45%, #fff);
  color: #000;
  font-weight: 900;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Straight on the teal page the teal marker fades into it, so it turns light. */
.dl-student .dl-key {
  background: #eaf5ff;
}

.dl-points {
  display: grid;
  gap: 10px;
  margin: 0 auto 24px;
  padding: 0;
  width: fit-content;
  list-style: none;
  text-align: right;
}

.dl-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #000;
}

/* A check mark in a teal circle. */
.dl-points li::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink, #000);
  border-radius: 50%;
  background: var(--memteal, #00e5cc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 12px 30px;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  color: #000;
  background: #00c9b7;
  border: 3px solid var(--ink, #000);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink, #000);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.dl-btn svg {
  width: 26px;
  height: 26px;
}

.dl-btn:hover {
  background: var(--memteal, #00e5cc);
}

.dl-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink, #000);
}

.dl-btn:focus-visible {
  outline: 3px solid var(--ink, #000);
  outline-offset: 4px;
}

/* The steps where the browser has no install window (pwa.js). */
.dl-help {
  margin-top: 20px;
  padding: 14px 18px;
  text-align: right;
  background: #fff6cc;
  border: 2px solid var(--ink, #000);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink, #000);
}

.dl-help .pwa-steps {
  margin: 0;
  padding-inline-start: 22px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.7;
  color: #000;
}

.dl-help .pwa-share-icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
}

.dl-help .pwa-note {
  margin: 8px 0 0;
  font-size: 0.98rem;
  color: #000;
}

.dl-done,
.dl-inapp {
  display: none;
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
}

.dl-done span {
  display: block;
}

.pwa-installed .dl-done,
.pwa-app .dl-inapp {
  display: block;
}

.pwa-installed .dl-btn,
.pwa-installed .dl-help,
.pwa-app .dl-btn,
.pwa-app .dl-help,
.pwa-app .dl-student {
  display: none;
}

.dl-student {
  max-width: 480px;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #000;
}

.dl-student > span {
  display: block;
}

/* The bottom bar is yellow like the footer on the rest of the site
   (the "pro" look keeps its own plain footer). */
html:not([data-site-style="pro"]) .page-download .site-footer-mini {
  background: var(--memyellow);
  border-top: 8px solid var(--ink);
}

html:not([data-site-style="pro"]) .page-download .site-footer-mini .site-legal-nav a {
  color: var(--ink);
  font-weight: 800;
  opacity: 1;
}

@media (max-width: 600px) {
  .dl-page {
    padding-top: 20px;
  }

  .dl-card {
    padding: 22px 18px 26px;
  }
}
