#app-download, #android-download { scroll-margin-top: 100px; }
.hero .visual { padding: 46px 40px; }
.hero .visual .window { position: relative; inset: auto; }
.app-download-dialog:not([open]), .app-download-dialog [hidden] { display: none; }
.app-download-dialog { position: fixed; inset: auto; top: 50vh; top: 50dvh; left: 50vw; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: 0; padding: 56px 32px 32px; border: 1px solid var(--line); border-radius: 24px; background: #fff; color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; text-align: center; transform: translate(-50%, -50%); }
.app-download-dialog::backdrop { background: rgba(23, 26, 36, .55); }
.app-download-dialog h2 { font-size: 25px; line-height: 1.35; }
.app-download-dialog > p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.app-download-close { position: absolute; top: 10px; right: 10px; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.app-download-scan { margin-top: 22px; }
.app-download-scan img { display: block; width: min(200px, 100%); height: auto; margin: 0 auto; }
.app-download-direct { width: 100%; margin-top: 24px; }
a:focus-visible, button:focus-visible, summary:focus-visible, .terminal-code:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
/* Keep the summary focus ring inside its clipped details container. */
.independent-download > summary:focus-visible { outline-offset: -4px; }

/* Keep control surfaces stable on mouse hover and touch activation. */
a, button, summary, .button { -webkit-tap-highlight-color: transparent; }
.button, .gw-chip, .gw-cli-block .terminal-tab, .gw-cli-block .terminal-copy-btn, .site-navigation-toggle, .site-navigation-header .shortcut-link, .footer-grid a { transition: none; }
.button:is(:hover, :active) { background: var(--brand); color: #fff; box-shadow: none; transform: none; }
.button.secondary:is(:hover, :active) { background: #fff; color: var(--ink); }
.cta .button:is(:hover, :active) { background: #fff; color: var(--brand); }
.cta .button.secondary:is(:hover, :active) { background: transparent; color: #fff; }
.gw-chip:is(:hover, :active) { border-color: #dce3ef; background: #f8fafc; color: #334155; box-shadow: none; transform: none; }
.gw-chip.is-current:is(:hover, :active) { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(21,93,252,.22); }
.gw-chip:is(:hover, :active) .gw-chip-icon { opacity: .78; }
.gw-chip:is(:hover, :active) .chip-tag { color: #64748b; opacity: 1; }
.gw-chip.is-current:is(:hover, :active) .chip-tag { color: #fff; opacity: .82; }
.gw-cli-block .terminal-tab:is(:hover, :active) { color: #a1a1aa; }
.gw-cli-block .terminal-tab.active { background: transparent; }
.gw-cli-block .terminal-tab.active:is(:hover, :active) { color: #3f3f46; }
.gw-cli-block .terminal-copy-btn:is(:hover, :active), .gw-cli-block .terminal-copy-btn.copied { background: transparent; border-color: transparent; color: #a1a1aa; }
.site-navigation > a:is(:hover, :active), .site-navigation-trigger:is(:hover, :active) { background: transparent; color: #596075; }
.site-navigation > a[aria-current="page"]:is(:hover, :active) { background: #e8eeff; color: var(--brand); }
.site-navigation-menu a:is(:hover, :active) { background: transparent; color: var(--ink); }
.site-navigation-header .shortcut-link:is(:hover, :active) { background: transparent; color: #596075; }
.site-navigation-header .shortcut-link.primary:is(:hover, :active) { background: var(--brand); color: #fff; }
.footer-grid a:is(:hover, :active) { color: #71717a; }
.independent-download[open] summary { border-bottom: 0; }

@media (max-width: 860px) {
  .site-navigation-toggle:is(:hover, :active, [aria-expanded="true"]) { border-color: var(--line); background: #fff; }
  .site-navigation-toggle[aria-expanded="true"] .site-navigation-toggle-bars i { background: var(--ink); }
  .site-navigation-header .shortcut-link:is(:hover, :active) { background: #f2f4f9; }
  html:not(.site-navigation-enhanced) .site-header { position: static; }
  .hero .visual { min-height: 0; padding: 28px; }
  main .button, .product-intro-action .button { min-height: 44px; }
  .site-header .brand, .site-footer .brand { min-height: 44px; }
  .terminal-header { flex-wrap: wrap; padding: 8px; }
  .terminal-tabs { display: grid; flex: 1 1 210px; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .terminal-tab { min-width: 0; min-height: 44px; padding: 6px 4px; font-size: 12px; white-space: normal; }
  .terminal-copy-btn { min-width: 76px; min-height: 44px; justify-content: center; padding: 6px 10px; font-size: 12px; }
  .install, .terminal-footer { overflow-wrap: anywhere; }
  .footer-grid a:not(.brand) { display: flex; min-height: 44px; align-items: center; margin-bottom: 0; padding: 6px 0; }
}

@media (max-width: 560px) {
  .hero { padding: 40px 0 44px; }
  .hero .shell { gap: 28px; }
  .hero .visual { padding: 16px; border-radius: 22px; }
  .hero .window { padding: 16px; }
  .hero .window-top { padding-bottom: 12px; }
  .hero .window h3 { margin-top: 18px; font-size: 18px; line-height: 1.4; }
  .hero .metric-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
  .hero .metric { padding: 10px 6px; text-align: center; }
  .hero-actions { flex-direction: column; gap: 10px; margin-top: 24px; }
  main .button { width: 100%; }
  .page-section { padding: 44px 0; }
  .download-list { gap: 16px; }
  .download-card, .download-family { padding: 24px 20px; border-radius: 20px; }
  .download-card { gap: 28px; }
  .download-card h2, .download-family h2 { font-size: 26px; line-height: 1.3; }
  .install { padding: 18px 16px; }
  .app-option { padding: 16px; }
  .independent-download { border-radius: 20px; }
  .independent-download summary { gap: 12px; padding: 20px; }
  .independent-download summary > span { min-width: 0; }
  .cta { padding: 28px 20px; border-radius: 22px; }
  .cta h2 { font-size: clamp(22px, 6.2vw, 30px); letter-spacing: -.02em; }
  .cta p { font-size: 15px; }
  .cta .hero-actions { margin-top: 24px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .footer-grid > :first-child, .footer-products { grid-column: 1 / -1; }
  .footer-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .footer-products h4 { grid-column: 1 / -1; }
  .footer-grid a, .footer-grid p { font-size: 13px; }
  .app-download-dialog { padding: 56px 24px 28px; }
  .gw-chips { grid-template-columns: 1fr; }
  .gw-chip .chip-tag { min-width: 0; white-space: normal; }
}
