/* The download page (APE-71): option C, "The Setup Sheet", frozen in docs/ux/ape-71-download/.
   A sheet lying on navy, with a second sheet behind it, and a checklist with a margin for ink.
   Loaded after site.css, which gives the header, footer, buttons and colours. */
.dl-desk { background:var(--primary); padding:clamp(36px,5vw,72px) 0 0; }
.dl-kick { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 24px; margin:0 0 clamp(22px,3vw,34px); font-size:16px; color:var(--ice); }
.dl-kick p { margin:0; font-size:15px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--sky); }
.dl-kick a { color:#fff; }
.dl-kick a:hover { color:var(--ice); }
.dl-stack { position:relative; margin-bottom:clamp(-170px,-12vw,-110px); }
.dl-behind { position:absolute; inset:24px -6px -10px 18px; border-radius:3px; background:var(--tint); transform:rotate(-2.2deg); box-shadow:0 20px 50px rgba(0,0,0,.24); }
.dl-paper { position:relative; padding:clamp(28px,4.4vw,64px) clamp(22px,5vw,72px) clamp(30px,4vw,56px); background:#fff; border-radius:3px; box-shadow:0 3px 8px rgba(0,0,0,.18),0 28px 70px rgba(0,0,0,.30); }
.dl-print { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 20px; padding-bottom:12px; border-bottom:1px solid var(--line); font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--quiet); }
.dl-plat { display:inline-flex; align-items:center; gap:7px; }
.dl-plat svg { flex:none; width:15px; height:15px; color:var(--text); }
.dl-plat svg + span { margin-right:6px; }
.dl-paper h1 { margin:clamp(22px,3vw,36px) 0 0; font:500 clamp(48px,6.4vw,92px)/.98 var(--display); letter-spacing:-.024em; color:var(--text); }
.dl-paper h1 span { color:var(--select); }
.dl-intro { margin:14px 0 0; max-width:32em; font-size:clamp(18px,1.5vw,20px); color:var(--quiet); }
.dl-phone { display:none; margin:18px 0 0; padding:14px 16px; border-radius:8px; background:var(--tint); font-size:16px; }
.dl-phone p { margin:0; }
.dl-copy { display:none; margin-top:10px; }
.js .dl-copy { display:inline-flex; }

/* the checklist */
.dl-check { list-style:none; margin:clamp(26px,3.6vw,44px) 0 0; padding:0; }
.dl-row { display:grid; grid-template-columns:44px minmax(0,1fr) 220px; gap:0 clamp(16px,2.4vw,30px); padding:clamp(22px,2.6vw,32px) 0; border-top:1px solid var(--line); scroll-margin-top:96px; }
.dl-box { position:relative; width:44px; height:44px; }
.dl-box svg { position:absolute; inset:0; overflow:visible; }
.dl-box .b { fill:none; stroke:var(--ink); stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; }
.dl-box .t { fill:none; stroke:var(--select); stroke-width:3.2; stroke-linecap:round; stroke-linejoin:round; }
.dl-box span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font:500 20px/1 var(--display); color:var(--quiet); }
.dl-body { min-width:0; }
.dl-body h2 { margin:4px 0 6px; font:500 clamp(28px,2.6vw,36px)/1.08 var(--display); letter-spacing:-.012em; }
.dl-body p { margin:0; font-size:17px; }
.dl-body p + p { margin-top:8px; }
.dl-sm { font-size:16px; color:var(--quiet); }
.dl-body .dl-sm { margin-top:10px; font-size:16px; }
.dl-sm s { text-decoration-thickness:2px; }
.dl-margin { align-self:start; display:flex; align-items:flex-start; gap:4px; margin:2px 0 0; padding-left:18px; border-left:1px dashed var(--line); font:400 clamp(28px,2.3vw,34px)/.95 var(--hand); color:var(--ink); transform:rotate(-3deg); transform-origin:left top; filter:url(#wob); }
.dl-margin svg { flex:none; margin-top:8px; }
.dl-you { visibility:hidden; }
.dl-you.on { visibility:visible; }

/* the three downloads; the visitor's own is navy and circled in ink */
.dl-tiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 0; }
.dl-tile { position:relative; display:flex; flex-direction:column; gap:2px; min-height:96px; padding:14px 16px; border:1.5px solid var(--line); border-radius:8px; background:#fff; color:var(--text); text-decoration:none; transition:border-color .12s var(--ease),background .12s var(--ease); }
.dl-tile:hover { border-color:var(--select); background:var(--tint); color:var(--text); }
.dl-os { display:flex; align-items:center; gap:10px; margin-bottom:6px; font-size:13px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--select); }
.dl-os svg { flex:none; width:28px; height:28px; color:var(--text); }
.dl-tile b { font-size:19px; font-weight:600; line-height:1.2; }
.dl-tile small { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:14px; color:var(--quiet); }
.dl-tile.on { background:var(--primary); border-color:var(--primary); color:#fff; }
.dl-tile.on:hover { background:var(--deep); border-color:var(--deep); color:#fff; }
.dl-tile.on .dl-os { color:var(--sky); }
.dl-tile.on .dl-os svg { color:#fff; }
.dl-tile.on small { color:var(--ice); }
.dl-ring { display:none; position:absolute; left:-14px; top:-12px; width:calc(100% + 28px); height:calc(100% + 24px); overflow:visible; pointer-events:none; }
.dl-tile.on .dl-ring { display:block; }
.dl-ring path { fill:none; stroke:var(--ink); stroke-width:2.4; stroke-linecap:round; stroke-dasharray:1; animation:dl-draw .9s var(--ease) .6s both; }
.dl-which { margin:12px 0 0; }
.dl-which summary { display:inline-flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; list-style:none; font-size:16px; font-weight:600; color:var(--select); }
.dl-which summary::-webkit-details-marker { display:none; }
.dl-which summary svg { transition:transform .2s var(--ease); }
.dl-which[open] summary svg { transform:rotate(45deg); }
.dl-which p { font-size:16px; }

/* a picture of the app's key box, in the app's own words */
.dl-kb { max-width:460px; margin:16px 0 0; padding:16px; border-radius:8px; background:#fff; box-shadow:0 0 0 1px var(--line),var(--sheet); font-size:15px; line-height:1.3; }
.dl-kb .lbl { margin:0 0 7px; font-size:15px; font-weight:600; }
.dl-kb .rw { display:flex; gap:8px; }
.dl-kb .fld { flex:1; min-width:0; height:40px; padding:0 12px; border:1.5px solid var(--select); border-radius:6px; font:500 14px/37px Consolas,ui-monospace,monospace; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.dl-kb .use { flex:none; display:flex; align-items:center; height:40px; padding:0 14px; border-radius:6px; background:var(--primary); color:#fff; font-weight:600; }
.dl-kb .ok { display:flex; align-items:center; gap:8px; margin:10px 0 0; padding:8px 10px; border-radius:6px; background:var(--donetint); color:var(--done); font-size:15px; font-weight:600; }
.dl-before { margin:clamp(8px,1vw,12px) 0 0; padding:clamp(20px,2.4vw,28px) 0 0; border-top:2px solid var(--text); font-size:17px; }
.dl-mark { padding:0 3px; background:linear-gradient(transparent 52%,var(--marker) 52%,var(--marker) 90%,transparent 90%); }

/* ink draws itself once; with reduced motion it is simply there */
.dl-draw { stroke-dasharray:1; animation:dl-draw .9s var(--ease) var(--d,.3s) both; }
@keyframes dl-draw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }

/* under the sheet */
.dl-after { padding:clamp(170px,15vw,230px) 0 clamp(64px,8vw,104px); }
.dl-after .wrap { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(20px,3vw,44px); }
.dl-after h2 { margin:0 0 6px; font:500 24px/1.15 var(--display); }
.dl-after p { margin:0; font-size:16px; }
.dl-more { display:inline-block; margin-top:8px; font-size:16px; font-weight:600; text-decoration:none; }

@media (max-width:999px) {
  .dl-row { grid-template-columns:44px minmax(0,1fr); }
  .dl-margin { grid-column:2; margin-top:14px; padding-left:0; border-left:0; font-size:28px; }
  .dl-margin svg { display:none; }
  .dl-you:not(.on) { display:none; }
  .dl-tiles { grid-template-columns:minmax(0,1fr); gap:16px; }
  .dl-tile { min-height:84px; }
  .dl-after .wrap { grid-template-columns:minmax(0,1fr); }
  .dl-behind { inset:16px -4px -8px 10px; }
}
@media (max-width:620px) {
  .dl-phone { display:block; }
  .dl-row { grid-template-columns:36px minmax(0,1fr); gap:0 14px; }
  .dl-box { width:36px; height:36px; }
  .dl-kb .rw { flex-direction:column; }
}
/* a phone or tablet seen by the script, whatever its width */
.mobile .dl-phone { display:block; }
@media (prefers-reduced-motion:reduce) {
  .dl-draw, .dl-ring path { animation:none; }
  .dl-tile, .dl-which summary svg { transition:none; }
}
