/* =========================================================
   Pure Mail — mobile app download page
   Settings → Pure Mail app (route #/settings/mailapps)
========================================================= */
#setBody.appdl-body {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.appdl {
  --ap-navy: #0a326c;
  --ap-navy-2: #071f45;
  --ap-cream: #f7f4ed;
  --ap-lime: #c8f56a;
  --ap-ink: #101a2c;
  --ap-muted: #5b6b84;
  --ap-line: rgba(16, 26, 44, .10);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- hero ---------- */
.appdl-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 348px;
  display: flex;
  align-items: center;
  background: var(--ap-navy);
  isolation: isolate;
}
.appdl-hero-media {
  position: absolute;
  inset: 0;
  background-image: url("../assets/img/app-hero.webp");
  background-size: cover;
  background-position: 78% 34%;
  z-index: 0;
}
.appdl-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #0a326c 0%, rgba(10, 50, 108, .97) 30%, rgba(10, 50, 108, .78) 48%, rgba(10, 50, 108, .22) 70%, rgba(10, 50, 108, 0) 100%),
    linear-gradient(0deg, rgba(7, 31, 69, .6), rgba(7, 31, 69, 0) 58%);
}
.appdl-hero-copy {
  position: relative;
  z-index: 2;
  padding: 34px 34px;
  max-width: 560px;
  color: #fff;
}
.appdl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ap-lime);
  margin-bottom: 13px;
}
.appdl-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ap-lime);
}
.appdl-hero h1 {
  margin: 0 0 11px;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
  color: #fff;
}
.appdl-hero p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.62;
  color: rgba(255, 255, 255, .82);
  max-width: 420px;
}
.appdl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.appdl-hero-note {
  margin: 14px 0 0 !important;
  font-size: 10.5px !important;
  color: rgba(255, 255, 255, .55) !important;
  letter-spacing: .01em;
}

/* ---------- buttons ---------- */
.appdl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  font-family: inherit;
  white-space: nowrap;
}
.appdl-btn svg { width: 16px; height: 16px; flex: none; }
.appdl-btn.primary {
  background: var(--ap-lime);
  color: #1c2b07;
  box-shadow: 0 10px 24px rgba(200, 245, 106, .22);
}
.appdl-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(200, 245, 106, .3); }
.appdl-btn.ghost {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
  backdrop-filter: blur(8px);
}
.appdl-btn.ghost:hover { background: rgba(255, 255, 255, .22); }
.appdl-btn.dark {
  background: var(--ap-navy);
  color: #fff;
}
.appdl-btn.dark:hover { background: #0d3d82; }
.appdl-btn.small { height: 36px; padding: 0 13px; font-size: 11px; }

/* ---------- duo panel ---------- */
.appdl-duo {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 16px;
}
.appdl-panel {
  background: #fff;
  border: 1px solid var(--ap-line);
  border-radius: 18px;
  padding: 22px;
}
.appdl-panel h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--ap-ink);
  letter-spacing: -.01em;
}
.appdl-panel .lead {
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ap-muted);
}

.appdl-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  text-align: center;
}
.appdl-qr-code {
  width: 172px;
  height: 172px;
  flex: none;
  padding: 9px;
  border: 1px solid var(--ap-line);
  border-radius: 14px;
  background: #fff;
}
.appdl-qr-code svg { width: 100%; height: 100%; display: block; }
.appdl-qr-code .fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 9px;
  color: var(--ap-muted);
  word-break: break-all;
  padding: 4px;
}
.appdl-qr-meta { min-width: 0; width: 100%; }
.appdl-qr-meta .url {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ap-navy);
  margin-bottom: 10px;
  word-break: break-word;
  line-height: 1.45;
}
.appdl-qr-actions { display: flex; flex-direction: row; gap: 7px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- features ---------- */
.appdl-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}
.appdl-feats li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.appdl-feats .ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(10, 50, 108, .07);
  color: var(--ap-navy);
}
.appdl-feats .ic svg { width: 15px; height: 15px; }
.appdl-feats b {
  display: block;
  font-size: 12px;
  color: var(--ap-ink);
  margin-bottom: 2px;
}
.appdl-feats span {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ap-muted);
}

/* ---------- shots ---------- */
.appdl-shots-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px 0;
}
.appdl-shots-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -.025em;
  color: var(--ap-ink);
}
.appdl-shots-head p {
  margin: 0;
  font-size: 11.5px;
  color: var(--ap-muted);
}
.appdl-shots {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 6px 0 4px;
}
.appdl-shot { width: 226px; flex: none; }
.appdl-shot figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ap-muted);
  letter-spacing: .01em;
}
.appdl-phone-shell {
  background: #0a1220;
  border-radius: 34px;
  padding: 7px;
  box-shadow:
    0 26px 54px rgba(9, 24, 48, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.appdl-screen {
  position: relative;
  height: 458px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--ap-cream);
  display: flex;
  flex-direction: column;
  font-size: 9px;
  color: var(--ap-ink);
}
.appdl-screen::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 14px;
  border-radius: 9px;
  background: #0a1220;
  z-index: 6;
}

.s-status {
  height: 25px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 7.5px;
  font-weight: 800;
  color: var(--ap-navy);
  letter-spacing: .02em;
}
.s-status .right { display: flex; align-items: center; gap: 3px; }
.s-status .bars { display: inline-flex; align-items: flex-end; gap: 1px; }
.s-status .bars i { width: 2px; background: currentColor; border-radius: 1px; }
.s-status .bars i:nth-child(1) { height: 3px; }
.s-status .bars i:nth-child(2) { height: 5px; }
.s-status .bars i:nth-child(3) { height: 7px; }
.s-status .bat {
  width: 13px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  position: relative;
}
.s-status .bat::before {
  content: "";
  position: absolute;
  inset: 1px;
  right: 4px;
  background: currentColor;
  border-radius: 1px;
}

.s-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 12px 9px;
  flex: none;
}
.s-head .grow { min-width: 0; flex: 1; }
.s-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ap-navy);
  line-height: 1.1;
}
.s-sub { font-size: 7.5px; color: #7b8798; font-weight: 600; }
.s-icon-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(10, 50, 108, .07);
  display: grid;
  place-items: center;
  color: var(--ap-navy);
  flex: none;
}
.s-icon-btn svg { width: 10px; height: 10px; }

.s-search {
  margin: 0 12px 8px;
  height: 22px;
  border-radius: 11px;
  background: rgba(10, 50, 108, .06);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  font-size: 7.5px;
  color: #8a94a6;
  flex: none;
}
.s-search svg { width: 8px; height: 8px; }

.s-list { flex: 1; overflow: hidden; }
.s-row {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(10, 50, 108, .06);
  align-items: flex-start;
}
.s-av {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 6.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
}
.s-av.a { background: #2f6fd0; }
.s-av.b { background: #b06a3b; }
.s-av.c { background: #3f8f6b; }
.s-av.d { background: #8a5bbf; }
.s-av.e { background: #c04f63; }
.s-av.f { background: #3b7f8f; }
.s-row .body { min-width: 0; flex: 1; }
.s-from {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 7.8px;
  font-weight: 800;
  color: #16233a;
  margin-bottom: 1px;
}
.s-from .time { font-size: 6.5px; font-weight: 700; color: #98a2b3; flex: none; }
.s-subj {
  font-size: 7.8px;
  font-weight: 700;
  color: #2a3a52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-snip {
  font-size: 6.9px;
  color: #8590a3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.s-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ap-lime);
  box-shadow: 0 0 0 2px rgba(200, 245, 106, .35);
  flex: none;
  margin-top: 6px;
}

.s-fab {
  position: absolute;
  right: 12px;
  bottom: 52px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ap-lime);
  color: #1c2b07;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(10, 50, 108, .25);
  z-index: 4;
}
.s-fab svg { width: 14px; height: 14px; }

.s-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(10, 50, 108, .08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 3px;
  z-index: 5;
}
.s-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 5.8px;
  font-weight: 800;
  color: #96a0b1;
  letter-spacing: .01em;
}
.s-tab.on { color: var(--ap-navy); }
.s-tab svg { width: 13px; height: 13px; }

/* chat screen */
.s-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  overflow: hidden;
}
.s-day {
  align-self: center;
  font-size: 6px;
  font-weight: 800;
  color: #8a94a6;
  background: rgba(10, 50, 108, .06);
  padding: 2px 7px;
  border-radius: 7px;
  margin-bottom: 2px;
}
.s-bubble {
  max-width: 80%;
  padding: 5px 7px;
  border-radius: 10px;
  font-size: 7.4px;
  line-height: 1.45;
  position: relative;
  box-shadow: 0 1px 2px rgba(10, 50, 108, .07);
}
.s-bubble.in {
  background: #fff;
  color: #1c2b3a;
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}
.s-bubble.out {
  background: var(--ap-navy);
  color: #fff;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}
.s-bubble .t {
  display: block;
  font-size: 5.2px;
  opacity: .62;
  margin-top: 2px;
  text-align: right;
}
.s-bubble .who {
  display: block;
  font-size: 5.8px;
  font-weight: 800;
  color: #2f6fd0;
  margin-bottom: 1px;
}
.s-composer {
  margin: 6px 10px 50px;
  height: 26px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(10, 50, 108, .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 10px;
  font-size: 7.4px;
  color: #98a2b3;
  flex: none;
}
.s-send {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ap-navy);
  display: grid;
  place-items: center;
  color: #fff;
}
.s-send svg { width: 9px; height: 9px; }

/* drive screen */
.s-seg {
  display: flex;
  gap: 3px;
  margin: 0 12px 8px;
  background: rgba(10, 50, 108, .06);
  border-radius: 9px;
  padding: 3px;
  flex: none;
}
.s-seg span {
  flex: 1;
  text-align: center;
  font-size: 6.8px;
  font-weight: 800;
  padding: 3px 0;
  border-radius: 6px;
  color: #8a94a6;
}
.s-seg span.on { background: #fff; color: var(--ap-navy); box-shadow: 0 1px 3px rgba(10, 50, 108, .12); }
.s-folders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 12px 9px;
  flex: none;
}
.s-folder {
  background: #fff;
  border: 1px solid rgba(10, 50, 108, .08);
  border-radius: 10px;
  padding: 7px;
}
.s-folder .ic {
  width: 24px;
  height: 18px;
  border-radius: 4px 4px 5px 5px;
  margin-bottom: 6px;
  position: relative;
}
.s-folder .ic::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 2px;
  width: 10px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: inherit;
}
.s-folder b { display: block; font-size: 7.2px; color: #16233a; }
.s-folder span { display: block; font-size: 5.8px; color: #8a94a6; margin-top: 1px; }
.s-file {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
}
.s-file .fi {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 5.5px;
  font-weight: 800;
  color: #fff;
  flex: none;
}
.s-file b { font-size: 7.2px; color: #16233a; font-weight: 700; }
.s-file span { font-size: 5.8px; color: #8a94a6; }

/* ---------- stores ---------- */
.appdl-stores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--ap-line);
  border-radius: 18px;
  padding: 20px 22px;
}
.appdl-stores h3 { margin: 0 0 4px; font-size: 14px; color: var(--ap-ink); }
.appdl-stores p { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--ap-muted); max-width: 380px; }
.appdl-store-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.appdl-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  cursor: pointer;
  font-family: inherit;
  transition: transform .16s ease, background .16s ease;
  text-align: left;
}
.appdl-store:hover { transform: translateY(-1px); background: #111b2e; }
.appdl-store svg { width: 22px; height: 22px; flex: none; }
.appdl-store small {
  display: block;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  font-weight: 700;
}
.appdl-store b { display: block; font-size: 13px; font-weight: 800; letter-spacing: -.01em; }

.appdl-fineprint {
  margin: 2px 4px 0;
  font-size: 10px;
  color: var(--ap-muted);
  line-height: 1.6;
}

/* ---------- coming soon dialog ---------- */
.appdl-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 18, 36, .55);
  backdrop-filter: blur(6px);
  animation: appdl-fade 160ms ease both;
}
.appdl-modal[hidden] { display: none; }
.appdl-modal-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(6, 18, 38, .35);
  animation: appdl-pop 200ms cubic-bezier(.2, .9, .2, 1) both;
}
.appdl-modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: rgba(10, 50, 108, .07);
  color: var(--ap-navy);
}
.appdl-modal-icon svg { width: 26px; height: 26px; }
.appdl-modal-card h3 { margin: 0 0 7px; font-size: 17px; letter-spacing: -.02em; color: var(--ap-ink); }
.appdl-modal-card p { margin: 0 0 18px; font-size: 12px; line-height: 1.6; color: var(--ap-muted); }
.appdl-modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@keyframes appdl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes appdl-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .appdl-duo { grid-template-columns: 1fr; }
  .appdl-hero { min-height: 320px; }
  .appdl-hero-media { background-position: 68% 34%; }
  .appdl-hero::after {
    background:
      linear-gradient(90deg, #0a326c 0%, rgba(10, 50, 108, .96) 42%, rgba(10, 50, 108, .62) 72%, rgba(10, 50, 108, .3) 100%),
      linear-gradient(0deg, rgba(7, 31, 69, .55), rgba(7, 31, 69, 0) 60%);
  }
}
@media (max-width: 700px) {
  .appdl-hero-copy { padding: 26px 22px; }
  .appdl-hero { min-height: 300px; }
  .appdl-hero p { font-size: 12px; }
  .appdl-shots {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 6px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .appdl-shot { scroll-snap-align: center; }
  .appdl-stores { flex-direction: column; align-items: flex-start; }
  .appdl-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .appdl-btn, .appdl-store { transition: none; }
  .appdl-modal, .appdl-modal-card { animation: none; }
}
