/* "Get the app" button, the signed-in card and the how-to dialog. Colours come from the site tokens, so light and dark both work. */

.hero-app { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 16px; }
.hero-app[hidden], .install-card[hidden] { display: none !important; }
.hero-app-note { font-size: 13.5px; color: var(--text-muted); }

.install-link {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--accent); border-radius: 999px; background: var(--bg-elevated); color: var(--accent-strong);
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.install-link:hover { background: color-mix(in srgb, var(--accent) 10%, var(--bg-elevated)); }
.install-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.install-link svg { flex: none; }

/* The header button, next to Sign in. A pill with the label on a desktop, a 44px icon on a phone so the header does not crowd. Hidden until an install is possible. */
.nav-install { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent-strong); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s; }
.nav-install[hidden] { display: none !important; }
.nav-install:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-install:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-install svg { flex: none; }
@media (max-width: 719px) { .nav-install { width: 44px; padding: 0; } .nav-install-text { display: none; } }

.nav-mobile-install { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; background: none; color: var(--accent-strong); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.nav-mobile-install[hidden] { display: none !important; }

/* Signed-in card */
.install-card { display: flex; align-items: center; gap: 14px; margin: 12px 0 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elevated); }
.install-card-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--bg-elevated)); color: var(--accent-strong); display: grid; place-items: center; }
.install-card-text { flex: 1; min-width: 0; }
.install-card-text strong { display: block; font-size: 15px; color: var(--text); }
.install-card-text span { display: block; font-size: 13.5px; color: var(--text-muted); line-height: 1.4; }
.install-card-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.install-card-actions .btn { padding: 10px 16px; font-size: 14px; white-space: nowrap; }
.install-card-no { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.install-card-no:hover { color: var(--text); }
@media (max-width: 560px) {
  .install-card { flex-wrap: wrap; }
  .install-card-text { flex-basis: calc(100% - 60px); }
  .install-card-actions { width: 100%; justify-content: flex-end; }
}

/* How-to dialog */
.install-dialog { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(10, 18, 15, .55); }
.install-dialog-card { width: 100%; max-width: 440px; max-height: 100%; overflow: auto; padding: 22px 20px 20px; border-radius: 18px; background: var(--bg-elevated); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.install-dialog-card h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; text-wrap: balance; }
.install-dialog-card ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 10px; font-size: 15.5px; line-height: 1.5; }
.install-dialog-card li svg { display: inline-block; vertical-align: -4px; margin: 0 2px; }
.install-dialog-card li b { white-space: normal; }
.install-dialog-note { margin: 0 0 16px; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
@media (min-width: 640px) { .install-dialog { align-items: center; } }
@media (prefers-reduced-motion: no-preference) {
  .install-dialog-card { animation: install-rise .22s ease-out; }
  @keyframes install-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---- the "start free" bar on content pages, phones only (assets/sticky-signup.js). Reuses .sticky-cta from style.css, so the cookie banner and the chat buttons already move out of its way. ---- */
@media (max-width: 720px) {
  .sticky-cta.sticky-cta-lite { gap: 8px; padding: 10px 8px 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg-elevated); background: color-mix(in srgb, var(--bg-elevated) 94%, transparent); backdrop-filter: blur(12px); }
  .sticky-cta-lite span { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .sticky-cta-lite .btn { flex: none; min-height: 44px; padding: 8px 16px; white-space: nowrap; }
  .sticky-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--text-muted); font-size: 24px; line-height: 1; cursor: pointer; }
  .sticky-x:hover { color: var(--text); }
  .sticky-x:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  .sticky-cta-lite { animation: sticky-rise .25s ease-out; }
  @keyframes sticky-rise { from { transform: translateY(100%); } to { transform: none; } }
}
