/* First-launch Guide and Support: standalone help pages the Store app opens.
   Same paper, ink and Avenir as the rest of the site. */

:root {
  --paper: #f8f9fc;
  --ink: #242d3c;
  --muted: #5d6778;
  --blue: #4670e9;
  --blue-hover: #3760d6;
  --line: #e3e7ef;
  --card: #ffffff;
  --soft: #eef2f7;
  --site: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
  --native: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --page-w: 880px;
  --radius: 12px;
  --key-cap: #e9edf3;
  --key-ink: #243040;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #141b24;
  --ink: #eef3fa;
  --muted: #b5c2d3;
  --blue: #7b9bff;
  --blue-hover: #9bb4ff;
  --line: #43536a;
  --card: #253246;
  --soft: #2e3e54;
  --key-cap: #3a4453;
  --key-ink: #e6edf7;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--site);
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] body {
  background: radial-gradient(ellipse at 50% 12%, #21334a66, transparent 55%), var(--paper);
}
a { color: var(--blue); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #648df5; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 8px 12px; border-radius: 8px; background: var(--card); color: var(--ink);
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--page-w), calc(100% - 48px)); margin: 0 auto; }
.wrap > *, .topbar, .foot { min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font: 700 17px/1 var(--site); letter-spacing: -.4px;
  text-decoration: none; flex: none;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top-nav {
  display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.top-nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 12px; border-radius: 8px;
  color: var(--muted); font: 600 14px/1.2 var(--site); text-decoration: none; white-space: nowrap;
}
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: auto; flex: none;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
}
.theme-toggle svg { display: block; width: 18px; height: 18px; }
.theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.hero { padding: 48px 0 8px; }
.eyebrow {
  margin: 0 0 10px; font: 650 12px/1.3 var(--site);
  letter-spacing: .4px; text-transform: uppercase; color: var(--muted);
}
.hero h1 {
  margin: 0 0 12px; font: 700 40px/1.12 var(--site);
  letter-spacing: -.6px; color: var(--ink); text-wrap: balance;
}
.hero .lead {
  margin: 0; max-width: 62ch; font-size: 18px; line-height: 1.5; color: var(--ink);
}
.hero .fine { margin-top: 12px; max-width: 62ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.button-primary, .button-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 9px;
  font: 650 14px/1 var(--site); text-decoration: none;
}
.button-primary {
  border: 1px solid #3a62d3; background: #4670e9; color: #fff;
  box-shadow: inset 0 1px #ffffff29, 0 3px 6px #254abd15;
}
html[data-theme="dark"] .button-primary { border-color: #5b7de8; background: #3d63d4; }
.button-primary:hover { background: var(--blue-hover); color: #fff; text-decoration: none; transform: translateY(-1px); }
.button-secondary {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.button-secondary:hover { border-color: var(--muted); text-decoration: none; }

.jump {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 28px 0 8px; padding: 0; list-style: none;
}
.jump a {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font: 600 13px/1 var(--site);
  text-decoration: none;
}
.jump a:hover { border-color: #8fb0e0; color: var(--blue); }

.section { margin: 40px 0 0; scroll-margin-top: 88px; }
.section > h2 {
  margin: 0 0 8px; font: 650 22px/1.25 var(--site); letter-spacing: -.2px; color: var(--ink);
}
.section > .lede {
  margin: 0 0 18px; max-width: 64ch; font-size: 16px; line-height: 1.55; color: var(--ink);
}

.steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch;
}
.step {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0; padding: 20px 22px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  min-width: 0; height: 100%;
}
.step-kicker {
  display: flex; align-items: center; gap: 10px; margin: 0;
}
.step-kicker h3 { flex: 1; min-width: 0; }
.step-num {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--blue);
  font: 700 13px/1 var(--site);
}
.step h3 { margin: 0; font: 650 17px/1.3 var(--site); color: var(--ink); }
.step p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.step p + p { margin-top: 8px; }
.step .where { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--muted); }

.open-pair {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr);
  gap: 16px; align-items: stretch;
}
.open-card {
  display: flex; flex-direction: column; min-width: 0;
  padding: 18px 20px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card);
}
.open-card h3 { margin: 0 0 6px; font: 650 16px/1.3 var(--site); }
.open-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.open-card .mouse-caption { margin: auto 0 0; padding-top: 8px; }
.guide-keyboard { max-width: 640px; }
[data-keyboard] svg { display: block; width: 100%; height: auto; }

.mouse-stage {
  display: grid; place-items: center; flex: 1; min-height: 188px; padding: 8px 0 4px;
}
.desk-mouse {
  position: relative; width: 84px; height: 129px;
  border: 1px solid #ffffffd9; border-radius: 43px 43px 36px 36px;
  background: radial-gradient(ellipse at 34% 18%, #fff 8%, #f5f7fa 43%, #d6dfe9 91%);
  box-shadow: inset 2px 1px 3px #fff, inset -3px -4px 8px #a6b3c66b, 0 13px 16px -6px #17314b77;
  transform: rotate(-10deg);
}
html[data-theme="dark"] .desk-mouse {
  border-color: #5a6a80; background: radial-gradient(ellipse at 34% 18%, #4a5a70 8%, #2c394b 91%);
}
.desk-mouse .seam,
.desk-mouse .wheel { display: block; }
.desk-mouse .seam {
  position: absolute; left: 50%; top: 0; width: 1px; height: 54px; background: #c1ccd87a;
}
.desk-mouse .wheel {
  position: absolute; left: calc(50% - 7px); top: 18px; width: 14px; height: 29px;
  border: 1px solid #cc4444; border-radius: 8px;
  background: repeating-linear-gradient(0deg, #f76f68 0 2px, #df4847 2px 4px);
  box-shadow: 0 0 0 5px #f66b6342, 0 0 15px #ff696977;
}
.mouse-caption {
  margin: 14px 0 0; text-align: center; font: 600 13px/1.3 var(--site); color: #e0413a;
}

.tools {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.tool {
  margin: 0; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); min-width: 0;
}
.tool h3 { margin: 0 0 6px; font: 650 16px/1.3 var(--site); }
.tool p { margin: 0; font-size: 15px; line-height: 1.5; }

.note {
  margin: 18px 0 0; padding: 14px 18px;
  border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--radius); background: var(--soft);
}
.note p { margin: 0; font-size: 15px; line-height: 1.55; }

.faq-search { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
#faqSearch {
  flex: 1 1 260px; min-width: 0; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink); font: 15px var(--site);
}
#faqSearch:focus { outline: 2px solid #648df5; outline-offset: 1px; border-color: #648df5; }
#faqCount { margin: 0; flex: none; font-size: 13px; color: var(--muted); }
#faqEmpty { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.faq-list {
  columns: 2;
  column-gap: 16px;
  margin-top: 18px;
}
.faq-group {
  break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 10px 20px 8px; min-width: 0;
}
.faq-group h2 {
  display: flex; align-items: center; gap: 9px;
  margin: 6px 0 2px; font: 650 13px/1.3 var(--site);
  letter-spacing: .3px; text-transform: uppercase; color: var(--muted);
}
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-group details:last-of-type { border-bottom: 0; }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 13px 28px 13px 0;
  position: relative; font: 600 16px/1.4 var(--site); color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--blue); }
.faq-list summary:after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  rotate: 45deg; transition: rotate .15s;
}
.faq-list details[open] summary:after { rotate: -135deg; margin-top: -2px; }
.faq-list details > div { padding: 0 28px 15px 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.faq-list details > div a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

.form-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin: 22px 0 14px;
}
.form-card-head { padding: 20px 22px 0; }
.form-card-head h2 { margin: 0; font: 650 18px/1.3 var(--site); }
.form-card-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.site-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px 20px; margin: 0; padding: 22px;
}
.site-form .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.site-form .field-wide { grid-column: 1 / -1; }
.site-form label { font: 600 14px/1.3 var(--site); color: var(--ink); }
.site-form .optional { font-weight: 400; color: var(--muted); }
.site-form input, .site-form select, .site-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 15px/1.45 var(--site);
}
.site-form textarea { resize: vertical; min-height: 96px; }
.site-form :is(input, select, textarea):focus { outline: 2px solid #648df5; outline-offset: 1px; border-color: #648df5; }
.site-form .is-missing { border-color: #c8503f; background: #fff5f3; }
html[data-theme="dark"] .site-form .is-missing { background: #3a2320; }
.site-form .form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.site-form .form-actions .button-primary { margin: 0; }
.site-form .form-actions .fine { margin: 0; flex: 1 1 260px; font-size: 13px; color: var(--muted); }
.site-form .form-status { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.site-form .form-status:empty { display: none; }

.fine { font-size: 13px; color: var(--muted); }
.foot {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 56px 0 36px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.foot a { color: var(--muted); padding: 4px 0; }
.foot a:hover { color: var(--blue); }

@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 48px 40px;
    align-items: center;
    gap: 2px 8px;
    min-height: 0;
    padding: 8px 0 10px;
  }
  .brand { grid-row: 1; grid-column: 1; font-size: 15px; }
  .theme-toggle { grid-row: 1; grid-column: 2; margin-left: 0; }
  .top-nav { grid-row: 2; grid-column: 1 / -1; width: 100%; }
  .hero { padding: 28px 0 4px; }
  .hero h1 { font-size: 30px; letter-spacing: -.4px; }
  .hero .lead { font-size: 16px; }
  .steps, .open-pair, .tools { grid-template-columns: 1fr; }
  .faq-list { columns: 1; }
  .mouse-stage { min-height: 148px; }
  .jump { gap: 6px; }
  .section { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
