/* The Install guide (site/install.js): a tab per device, the visitor's first, and for each browser
   its steps, with the buttons to tap drawn small in line with the words. Also the Install button
   beside Play, which jumps to the guide. Loads after style.css and page.css; Live Teal only marks
   the open tab, as it marks the chosen thumbnail. */
html { scroll-behavior: smooth; }
.install { scroll-margin-top: 20px; }
.install-guide { max-width: 760px; }
.install-lead { max-width: 66ch; }
.install-private {
  margin-top: 12px;
  padding: 10px 14px;
  max-width: 66ch;
  background: var(--raised);
  border-left: 3px solid var(--suit);
  border-radius: 4px 10px 10px 4px;
}

/* ── The tabs ──────────────────────────────────────────────────────────────── */
.install-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.install-tab {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.install-tab:hover { color: var(--ink); border-color: var(--line-hover); }
.install-tab[aria-selected='true'] { color: var(--ink); background: var(--raised); border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.install-panel { margin-top: 14px; }

/* ── A browser's steps ─────────────────────────────────────────────────────── */
.install-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.install-route {
  padding: 16px 16px 15px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.install-route.yours { border-color: var(--line-hover); }
.install-route h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.install-needs { font-family: var(--body); font-weight: 400; font-size: 13px; letter-spacing: 0; color: var(--faint); }
.install-route .label,
.install-other .label { color: var(--leaf); }

.install-steps { display: grid; gap: 10px; margin-top: 12px; counter-reset: step; }
.install-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 10px; counter-increment: step; }
.install-steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--muted);
}
.install-steps p { grid-column: 2; overflow-wrap: anywhere; }
.install-hint { color: var(--muted); font-size: 14px; }
.install-after { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.install-after + .install-after { margin-top: 6px; padding-top: 0; border-top: 0; }
.install-other { margin-top: 12px; color: var(--muted); font-size: 14px; max-width: 66ch; }
.install-other.yours { margin: 0 0 12px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line-hover); border-radius: 12px; color: var(--ink); font-size: 15px; }
.install-open {
  font-family: var(--mono);
  font-size: 0.9em;
  text-decoration: underline;
  text-decoration-color: var(--line-hover);
  text-underline-offset: 3px;
}
.install-open:hover { color: var(--teal-hover); }

/* A button as the browser draws it: a small key in line with the words. */
.key {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  margin: -4px 3px 0;
  vertical-align: middle;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.key svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.key circle { fill: currentColor; stroke: none; }

/* Without the script: a short paragraph per device. */
.install-device { margin-top: 10px; color: var(--muted); font-size: 14.5px; max-width: 66ch; }
.install-device strong { color: var(--ink); font-weight: 600; }

/* ── Install beside Play: the page's second action, quieter than Play ─────────── */
/* Play takes the room; when both don't fit on one line (Request access on a phone), Install goes
   under it, full width, rather than either label breaking. */
.play-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.play-row .play { flex: 999 1 auto; margin-top: 0; white-space: nowrap; }
.play-row .to-install { flex: 1 0 auto; }
.to-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}
.to-install svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.to-install:hover { background: var(--lift); border-color: var(--line-hover); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .install-tab,
  .to-install { transition: none; }
}

/* ── The guide's own page, /install/ ────────────────────────────────────────── */
.guide-page { max-width: 880px; }
.guide-page h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.guide-lede { color: var(--muted); margin-top: 12px; max-width: 62ch; }
.guide-page .install { margin-top: clamp(24px, 4vw, 36px); }
.guide-apps { margin-top: 44px; }
.guide-apps h2 {
  font-family: var(--label);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.guide-app-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.guide-app-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px 8px 8px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: border-color 160ms ease-out, background 160ms ease-out;
}
.guide-app-list a:hover { background: var(--lift); border-color: var(--line-hover); }
.guide-app-list img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-strong); }
.guide-fine { margin-top: 28px; color: var(--muted); font-size: 14px; max-width: 66ch; }
.guide-fine a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; }
.guide-fine a:hover { color: var(--teal-hover); }
