/* The download page. It borrows the product's own palette, so the page and the
   popup in it look like one thing. System fonts only: nothing is fetched. */

:root {
  color-scheme: dark;
  --bg: #0e1015;
  --panel: #181b22;
  --lift: #21252e;
  --line: #252832;
  --text: #e9ebf1;
  --muted: #9aa1ae;
  --dim: #7f8796;
  --accent: #7958f5;
  --accent-hover: #6a47ff;
  --accent-text: #b8a6ff;
  --font: system-ui, -apple-system, 'Segoe UI Variable', 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --gutter: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

code { font-family: var(--mono); font-size: 0.9em; color: var(--text); background: var(--panel); padding: 0.1em 0.35em; border-radius: 4px; white-space: nowrap; }
.code code { white-space: pre; }

.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: var(--gutter); top: -48px; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }

/* ── Top bar ── */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.top nav { display: flex; gap: 22px; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

/* ── Hero ── */
.hero { display: grid; gap: 40px; padding-block: 56px 72px; align-items: start; }

h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 14em;
  text-wrap: balance;
}

.lead { margin-top: 22px; font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 31em; }

.actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.button {
  display: inline-block;
  padding: 14px 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 1.02rem;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.15s;
}
.button:hover { background: var(--accent-hover); color: #fff; }
.plain { color: var(--text); font-weight: 500; }

.note { margin-top: 18px; font-size: 0.93rem; color: var(--dim); max-width: 38em; line-height: 1.55; }
.note a { color: var(--muted); }
.note a:hover { color: var(--text); }

/* The live popup is the one thing on the page that is allowed to be loud. */
.demo { display: grid; gap: 14px; justify-items: start; }
.demo-frame {
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}
.demo-frame iframe { display: block; border: 0; width: 500px; height: 580px; transform-origin: top left; }
.demo figcaption { font-size: 0.9rem; color: var(--dim); max-width: 500px; line-height: 1.5; }

/* ── Sections ── */
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.2; font-weight: 700; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }

.facts { padding-block: 56px; border-top: 1px solid var(--line); display: grid; gap: 32px; }
.facts dl { display: grid; gap: 28px 56px; }
.facts dt { font-weight: 650; }
.facts dd { color: var(--muted); margin-top: 4px; max-width: 34em; }

.install { padding-block: 56px 64px; border-top: 1px solid var(--line); }
.intro { margin-top: 12px; color: var(--muted); max-width: 40em; }

.steps { list-style: none; counter-reset: step; margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; position: relative; padding-left: 52px; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  background: rgba(121, 88, 245, 0.14);
  border-radius: 50%;
}
.steps p { color: var(--muted); max-width: 42em; }
.sub { padding-left: 1.2em; color: var(--muted); display: grid; gap: 6px; max-width: 42em; }

.tabs [role="tablist"] { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  margin-bottom: -1px;
  cursor: pointer;
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs [role="tabpanel"] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* `display: grid` above would otherwise win over the hidden attribute. */
.tabs [role="tabpanel"][hidden] { display: none; }

.code { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; max-width: 42em; }
.code pre { padding: 16px 84px 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 0.92rem; line-height: 1.65; }
.code code { background: none; padding: 0; font-size: inherit; }
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--muted);
  background: var(--lift);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 11px;
  cursor: pointer;
}
.copy:hover { color: var(--text); }

.faq { padding-block: 56px 72px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.faq h2 { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font-size: 1.4rem; font-weight: 400; color: var(--dim); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 42em; }

/* ── Footer ── */
.foot { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--dim); font-size: 0.92rem; }
.foot-inner { display: grid; gap: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); }

/* ── Narrow screens: the nav keeps the two links that matter ── */
@media (max-width: 520px) {
  .top nav { gap: 18px; }
  .top nav a:nth-child(2) { display: none; }
  .brand img { width: 24px; height: 24px; }
}

/* ── Wider screens ── */
@media (max-width: 520px) { .steps > li { padding-left: 0; padding-top: 44px; } }

@media (min-width: 640px) { :root { --gutter: 32px; } }

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) 500px; gap: 64px; padding-block: 72px 88px; }
  .facts { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 72px; }
  .facts dl { grid-template-columns: 1fr 1fr; }
  .install { padding-block: 72px 80px; }
  .faq { padding-block: 72px 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
