/* ==========================================================================
   Step-by-step setup guide (setup.html). Built for first-time users:
   large type, one action per step, a pulsing ring on the exact spot to tap.
   Every step is on one long page; setup-guide.js adds a progress rail down the
   right edge. If the page is printed anyway, every step shows.
   ========================================================================== */

.guide { max-width: 760px; margin: 0 auto; }
.guide-intro { text-align: center; }
.guide-intro .lede { font-size: 1.2rem; }

/* --- Progress rail: fixed down the right edge ----------------------------
   The fill grows downwards as the reader scrolls; the label rides along at
   the end of the fill. Only shown once setup-guide.js is running. */
.guide-rail {
  position: fixed; z-index: 20; right: 10px; top: 96px; bottom: 28px; width: 10px;
  border-radius: 99px; background: rgba(255,255,255,.12); display: none;
}
.guide.js .guide-rail { display: block; }
.guide-rail-fill {
  position: absolute; left: 0; right: 0; top: 0; height: 0; border-radius: 99px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  box-shadow: 0 0 12px rgba(47,208,138,.5); transition: height .15s linear;
}
.guide-rail-label {
  position: absolute; right: 18px; top: 0; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  padding: 8px 12px; border-radius: 12px; white-space: nowrap; text-align: right;
  background: rgba(12,17,16,.94); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: .95rem; line-height: 1.3; color: var(--muted); transition: top .15s linear;
}
.guide-rail-label strong { color: var(--ink); font-size: 1.05rem; }
/* Only wide screens have room beside the guide for the chapter name. */
.guide-rail-chapter { display: none; color: var(--gold); font-weight: 650; }
@media (min-width: 1180px) { .guide-rail-chapter { display: block; } }
/* Phones have no margin beside the text, so the label shows only while the
   reader is scrolling and fades out when they stop; the rail stays. */
@media (max-width: 700px) {
  .guide-rail { right: 4px; width: 8px; top: 80px; }
  .guide-rail-label { right: 12px; padding: 5px 8px; font-size: .8rem;
    opacity: 0; transition: top .15s linear, opacity .4s; }
  .guide-rail.active .guide-rail-label { opacity: 1; }
  .guide-rail-label strong { font-size: .9rem; }
}

/* --- One step ------------------------------------------------------------ */
.step {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px 28px; margin: 0 0 22px; scroll-margin-top: 90px;
}
.step-chapter {
  display: block; color: var(--gold); font-weight: 750; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px;
}
.step h2 { font-size: clamp(1.55rem, 4.6vw, 2rem); line-height: 1.25; margin: 0 0 18px; font-weight: 800; }
.step p, .step li { font-size: 1.2rem; line-height: 1.6; }
.step p { margin: 14px 0 0; }
.step ul, .step ol { padding-left: 1.3em; margin: 10px 0 0; }
.step li { margin: 8px 0; }
.step strong { color: var(--ink); }
.step a { color: var(--green); text-decoration: underline; }
.step .do { font-size: 1.3rem; font-weight: 650; }
.step .see { color: var(--muted); }
.step .see::before { content: "You'll see: "; color: var(--green); font-weight: 750; }
.step .calm {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px;
  background: rgba(47,208,138,.1); border: 1px solid rgba(47,208,138,.35);
}
.step details.stuck {
  margin-top: 16px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255,206,74,.08); border: 1px solid rgba(255,206,74,.35);
}
.step details.stuck summary { cursor: pointer; font-size: 1.15rem; font-weight: 700; color: var(--gold); }
.step details.stuck p, .step details.stuck li { font-size: 1.1rem; color: var(--ink); }

/* --- Pictures: watch + iPhone frames with a tap ring --------------------- */
.shot { display: flex; justify-content: center; margin: 4px 0 8px; }
.device { position: relative; line-height: 0; }
.device img { display: block; width: 100%; height: auto; }
.device.watch {
  width: min(300px, 78vw); padding: 14px; border-radius: 64px;
  background: #1b1f1e; border: 3px solid #3a403e; box-shadow: var(--shadow);
}
.device.watch img, .device.watch .mock { border-radius: 48px; overflow: hidden; }
.device.iphone {
  width: min(300px, 78vw); padding: 10px; border-radius: 46px;
  background: #1b1f1e; border: 3px solid #3a403e; box-shadow: var(--shadow);
}
.device.iphone img, .device.iphone .mock { border-radius: 36px; overflow: hidden; }
.screen { position: relative; }

/* A pulsing ring centred on --x/--y (percent of the screen). */
.tap {
  position: absolute; left: var(--x); top: var(--y);
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  border: 5px solid #ff3b30; box-shadow: 0 0 0 4px rgba(255,255,255,.85);
  animation: tap-pulse 1.4s ease-out infinite; pointer-events: none;
}
.tap.small { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
/* Nested in a drawn button: a pill outlining the whole button, not a dot. */
.tap.around { left: -7px; right: -7px; top: -7px; bottom: -7px; width: auto; height: auto; margin: 0;
  border-radius: 99px; border-width: 4px; animation-name: tap-glow; }
@keyframes tap-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 0 0 rgba(255,59,48,.6); }
  50%      { box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 0 10px rgba(255,59,48,0); }
}
@keyframes tap-pulse {
  0%   { transform: scale(.75); opacity: 1; }
  70%  { transform: scale(1.15); opacity: .85; }
  100% { transform: scale(.75); opacity: 1; }
}

/* A swipe: a finger dot sliding along an arrow. */
.swipe {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.swipe .arrow {
  font-size: 88px; line-height: 1; font-weight: 900; color: #fff;
  text-shadow: 0 0 6px #000, 0 0 18px #000, 0 0 2px #000;
}
.swipe .finger {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,59,48,.85); border: 4px solid #fff;
}
.swipe.up .finger   { animation: swipe-up 1.6s ease-in-out infinite; }
.swipe.down .finger { animation: swipe-down 1.6s ease-in-out infinite; }
.swipe.left .finger { animation: swipe-left 1.6s ease-in-out infinite; }
@keyframes swipe-up   { 0% { transform: translateY(70px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-70px); opacity: 0; } }
@keyframes swipe-down { 0% { transform: translateY(-70px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
@keyframes swipe-left { 0% { transform: translateX(70px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(-70px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tap, .swipe .finger { animation: none; }
  .swipe .finger { display: none; }
}

.caption { text-align: center; color: var(--muted); font-size: 1rem; margin-top: 10px; line-height: 1.4; }

/* --- Drawn stand-ins for Apple's own screens ----------------------------- */
.mock {
  position: relative; background: #f2f2f7; color: #111; font-size: 15px; line-height: 1.3;
  aspect-ratio: 9 / 19.5; display: flex; flex-direction: column; font-weight: 500;
}
.mock.dark { background: #000; color: #fff; }
.mock.watchface { aspect-ratio: 416 / 496; }
.mock .m-title { font-size: 26px; font-weight: 800; padding: 46px 18px 10px; }
.mock .m-search {
  margin: 0 16px 14px; padding: 10px 12px; border-radius: 12px; background: #e3e3e8; color: #333;
}
.mock .m-row {
  margin: 0 12px; padding: 10px; border-radius: 16px; background: #fff;
  display: flex; align-items: center; gap: 8px;
}
.device .mock .m-row img { width: 46px; height: 46px; flex-shrink: 0; border-radius: 11px; }
.device .mock .m-sheet img { width: 54px; height: 54px; margin: 0 auto; border-radius: 12px; }
.mock .m-row .m-name { flex: 1; font-weight: 700; font-size: 15px; }
.mock .m-row .m-name small { display: block; color: #777; font-weight: 500; font-size: 13px; }
.mock .m-get {
  background: #e3e3e8; color: #0a66ff; font-weight: 800; border-radius: 99px; padding: 6px 16px;
}
.mock .m-tabbar {
  margin-top: auto; display: flex; justify-content: space-around; padding: 10px 0 22px;
  background: #fafafa; border-top: 1px solid #ddd; font-size: 11px; color: #888;
}
.mock .m-tabbar .on { color: #0a66ff; font-weight: 800; }
.mock .m-sheet {
  margin-top: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 18px 30px;
  box-shadow: 0 -8px 30px rgba(0,0,0,.25); text-align: center;
}
.mock .m-sheet .m-dbl { font-size: 18px; font-weight: 800; margin-top: 10px; }
.mock .m-side {
  position: absolute; right: -14px; top: 22%; width: 6px; height: 64px; border-radius: 4px; background: #ff3b30;
}
.mock .m-section { padding: 18px 16px 6px; color: #777; font-size: 13px; text-transform: uppercase; }
.mock .m-install { color: #0a66ff; font-weight: 800; }
/* A tap ring nested in a drawn button centres on that button. */
.mock .m-get, .mock .m-install { position: relative; }
.mock .m-install { padding: 4px 4px; font-size: 13px; }
/* The button keeps its size and stays clear of the row's edge (room for the
   ring); a long name gives way instead. */
.mock .m-get, .mock .m-install { flex-shrink: 0; margin-right: 6px; }
.mock .m-row .m-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mock .m-grid {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; place-items: center; padding: 34px 26px;
}
.mock .m-grid span { width: 58px; height: 58px; border-radius: 50%; background: #333; }
.device .mock .m-grid img { width: 70px; height: 70px; border-radius: 50%; }
.mock-note { text-align: center; font-size: .95rem; color: var(--muted-2); margin-top: 8px; }

/* --- Practice watch -------------------------------------------------------- */
.practice { margin-top: 18px; }
.practice .pt-btn { font-size: 1.15rem; }

@media (max-width: 520px) {
  .step { padding: 22px 16px 24px; }
}

/* --- Print: every step, light background, two per page ------------------- */
@media print {
  body { background: #fff !important; color: #000 !important; font-size: 13pt; }
  body::before, body::after, .mesh-grid, .nav, .footer, .guide-rail,
  .practice, .no-print { display: none !important; }
  .step { display: block !important; break-inside: avoid; page-break-inside: avoid;
    background: #fff; border: 1px solid #999; color: #000; }
  .step h2, .step p, .step li, .step strong, .caption, .step .see { color: #000 !important; }
  .step details.stuck { display: block; }
  .step details.stuck > *:not(summary) { display: block; }
  .device.watch, .device.iphone { width: 45mm; box-shadow: none; }
  .tap { animation: none; }
  .swipe .finger { display: none; }
}
