/* Guides only (guide pages and the /guides/ hub), on top of style.css.
   Written for tools/guides.py; the version in the link is a hash, so no manual bump. */

/* Phones and tablets get App Store buttons, desktops with a mouse get a QR code to scan
   with the iPhone (the app does not run on a Mac). */
.qr-only { display: none; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .qr-only { display: flex; }
  .tap-only { display: none !important; }
}

.qr { flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.qr img { border-radius: 8px; background: #fff; }
.qr figcaption { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; text-align: center; }

/* Under the short answer: the strip on phones ... */
.get-app { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; max-width: 34em; }
.get-app-icon { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.get-app p { flex: 1; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.get-app p strong { color: var(--ink); font-weight: 650; }
.get-app .get-app-badge img { width: 120px; }
@media (max-width: 420px) {
  .get-app { flex-wrap: wrap; }
  .get-app p { flex-basis: calc(100% - 58px); }
  .get-app .get-app-badge { margin-left: 58px; }
}

/* ... and the scan card on desktops: a dark gradient card, the year of day tiles fading in
   behind it (assets/img/scan-tiles.svg, tools/make_qr.py), the QR code big on a white tile. */
.scan-card {
  position: relative; overflow: hidden; isolation: isolate;
  align-items: center; justify-content: space-between; gap: 36px;
  margin-top: 30px; padding: 32px 32px 32px 36px; border-radius: 28px; color: #fff;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 52%),
    radial-gradient(90% 120% at 0% 100%, rgba(120,120,140,.22) 0%, rgba(120,120,140,0) 60%),
    linear-gradient(135deg, #0b0b0c 0%, #19191c 55%, #2b2b30 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 24px 60px -18px rgba(0,0,0,.45), 0 8px 20px -10px rgba(0,0,0,.3);
}
.scan-card::before {
  content: ""; position: absolute; z-index: -1; inset: auto 262px -14px 18%; height: 128px;
  background: url(/assets/img/scan-tiles.svg) right bottom / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%, #000 88%, transparent 100%), linear-gradient(0deg, #000 30%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 60%, #000 88%, transparent 100%), linear-gradient(0deg, #000 30%, transparent 100%);
  mask-composite: intersect; opacity: .9;
}
.scan-text { flex: 1; min-width: 0; }
.scan-app { display: flex; align-items: center; gap: 12px; }
.scan-app img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.scan-app span { display: flex; flex-direction: column; font-size: 15px; font-weight: 650; line-height: 1.2; }
.scan-app small { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.6); }
.scan-title { margin-top: 20px; font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.scan-sub { margin-top: 10px; font-size: 15.5px; line-height: 1.45; color: rgba(255,255,255,.72); max-width: 25em; }
.scan-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; flex: none; }
.scan-qr img { width: 172px; height: 172px; padding: 12px; box-sizing: content-box; background: #fff; border-radius: 20px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 14px 34px -10px rgba(0,0,0,.6); }
.scan-qr figcaption { font-size: 12.5px; color: rgba(255,255,255,.62); }

/* The callout inside the article */
.app-bridge .qr-row { flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
.app-bridge .qr-row figcaption { font-size: 14.5px; max-width: 12em; text-align: left; color: var(--ink-2); }
.prose .app-bridge .qr img { width: 96px; height: 96px; margin: 0; border-radius: 8px; }

/* The download band at the end */
.band-get { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 28px; }
.band-get .store-badge { margin-top: 0; }

/* Tables scroll sideways on small phones instead of squeezing */
.table-wrap { overflow-x: auto; margin: 26px 0 30px; }
.prose .table-wrap table { margin: 0; min-width: 520px; }

/* The hub at /guides/ */
.hub { padding: 24px 0 88px; }
.hub h2 { font-size: clamp(25px, 3vw, 32px); letter-spacing: -.03em; margin: 52px 0 6px; line-height: 1.18; }
.hub-blurb { color: var(--ink-2); font-size: 17px; }
@media (min-width: 760px) { .hub .guide-grid { grid-template-columns: 1fr 1fr; } }
