/* The same tokens as the app (src/renderer/styles.css in the app repo), so site and app look alike. */
:root,
[data-theme='dark'] {
  --bg: #0b1017;
  --bg-2: #0f151e;
  --panel: #131a24;
  --card: #161e2a;
  --card-hover: #1c2535;
  --input: #0d131c;
  --border: #232d3c;
  --border-strong: #324055;
  --text: #e6ebf2;
  --muted: #8d99aa;
  --accent: #02affe;
  --accent-2: #0477ff;
  --on-accent: #00142b;
  --accent-soft: #02affe1f;
  --ok: #4cc38a;
  --warn: #e9a23b;
  --logo-top: #ffffff;
  --logo-bottom: #d9e3f0;
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #eaeef3;
  --bg-2: #f5f7fa;
  --panel: #ffffff;
  --card: #ffffff;
  --card-hover: #eef2f7;
  --input: #ffffff;
  --border: #dbe1ea;
  --border-strong: #c3ccd9;
  --text: #0f1724;
  --muted: #5b6676;
  --accent: #0477ff;
  --accent-2: #0361d1;
  --on-accent: #ffffff;
  --accent-soft: #0477ff1a;
  --ok: #1f9d63;
  --warn: #b0700b;
  --logo-top: #0b1b33;
  --logo-bottom: #0b1b33;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code {
  font: 0.9em 'Cascadia Mono', Consolas, 'Courier New', monospace;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow {
  max-width: 780px;
}

/* Top bar, like the app's title bar. */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover {
  text-decoration: none;
}
.mark {
  height: 22px;
  width: auto;
  flex: none;
}
.mark-w {
  fill: var(--logo-top);
}
.mark-b {
  fill: var(--accent-2);
}
[data-theme='dark'] .mark-b {
  fill: #0a8fff;
}
.word {
  display: inline-block;
  height: 15px;
  width: 61px;
  background: var(--text);
  -webkit-mask: url('../img/wordmark.png') center / contain no-repeat;
  mask: url('../img/wordmark.png') center / contain no-repeat;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 14px;
}
.nav a:hover {
  color: var(--text);
  background: var(--card);
  text-decoration: none;
}
.bar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--card);
  color: var(--text);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn.small {
  height: 32px;
  padding: 0 14px;
  font-size: 13.5px;
}
.btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero */
.hero {
  padding: 72px 0 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 420px);
  border-bottom: 1px solid var(--border);
}
.hero-text {
  max-width: 720px;
}
h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.lead {
  margin: 18px 0 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 620px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Total downloads and updates next to the hero text, as a ring split by system. Hidden until the API answers. */
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}
.tally {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 360px;
}
.tally[hidden] {
  display: none;
}
.ring {
  position: relative;
  display: grid;
  place-items: center;
}
.ring svg {
  width: 220px;
  height: 220px;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 3;
}
.ring-bg {
  stroke: var(--border);
}
.ring-part {
  stroke-dasharray: 0 107;
  transition: stroke-dasharray 0.6s ease-out;
}
.ring-text {
  position: absolute;
  margin: 0;
  display: grid;
  text-align: center;
}
.ring-text strong {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ring-text span {
  color: var(--muted);
  font-size: 13.5px;
}
.ring-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}
.ring-key li {
  white-space: nowrap;
}
.ring-key i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
}
.ring-key span {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
circle.ring-windows {
  stroke: #0477ff;
}
circle.ring-mac {
  stroke: #02affe;
}
circle.ring-linux {
  stroke: var(--muted);
}
i.ring-windows {
  background: #0477ff;
}
i.ring-mac {
  background: #02affe;
}
i.ring-linux {
  background: var(--muted);
}

/* A screenshot in a Windows style frame. */
.window {
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #0b1017;
}
.window img {
  display: block;
  width: 100%;
  height: auto;
}
.shot-hero {
  margin-top: 52px;
  margin-bottom: -1px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
}

/* Sections */
.section {
  padding: 88px 0;
}
.section.alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.head {
  max-width: 640px;
  margin-bottom: 36px;
}
.head h2 {
  font-size: 30px;
  font-weight: 700;
}
.head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* Tour tabs, styled like the app's tabs. */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tabs button {
  position: relative;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: -1px;
}
.tabs button:hover {
  color: var(--text);
  background: var(--card);
}
.tabs button[aria-selected='true'] {
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
}
.tabs button[aria-selected='true']::before {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 2px;
  border-radius: 8px 8px 0 0;
  background: var(--accent);
}
.caption {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Feature columns */
.cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.col {
  padding: 26px 24px 28px;
  border-right: 1px solid var(--border);
}
.col:last-child {
  border-right: 0;
}
.col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.col ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.col li {
  position: relative;
  padding: 7px 0 7px 16px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}
.col li:first-child {
  border-top: 0;
}
.col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--border-strong);
}

/* Security */
.sb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
}
.sb-ico {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.sb-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sb h3 {
  margin: 14px 0 0;
  font-size: 16px;
}
.sb p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* Download */
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dl-wide {
  grid-column: 1 / -1;
}
.dl-later .btn {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.dl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.dl:first-child {
  border-color: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent);
}
.dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dl h3 {
  font-size: 19px;
}
.dl p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.dl .btn {
  margin-top: auto;
  align-self: flex-start;
}
.os-line {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.dl-info {
  border-style: dashed;
  background: transparent;
}
.dl-info h3 {
  font-size: 16px;
}
.pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.meta {
  margin: 0;
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}
.meta div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 8px 12px;
  background: var(--input);
  font-size: 13px;
}
.meta dt {
  color: var(--muted);
}
.meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hash {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hash code {
  background: none;
  padding: 0;
  font-size: 12px;
  flex: 1;
}
.copy {
  flex: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  padding: 1px 8px;
  cursor: pointer;
}
.copy:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* FAQ */
details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  font: 400 20px/1 'Cascadia Mono', Consolas, monospace;
  color: var(--muted);
}
details[open] summary::after {
  content: '\2212';
}
details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

/* Footer */
.foot {
  padding: 36px 0 44px;
  border-top: 1px solid var(--border);
}
.foot-in {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 28px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.foot-brand .mark {
  height: 18px;
}
.foot-nav {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}
.foot-nav a {
  color: var(--muted);
  font-size: 14px;
}
.foot .fine {
  grid-column: 1 / -1;
  margin: 0;
}

/* Simple text pages, like privacy.html */
.changes {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.changes:empty {
  display: none;
}
.changes > li {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}
.changes > li:first-child {
  border-top: 0;
}
.changes h3 {
  margin: 0;
  font-size: 16px;
}
.changes time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.changes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.changes ul li {
  margin-top: 4px;
}
.page {
  padding: 64px 0 88px;
}
.page h1 {
  font-size: 36px;
}
.page h2 {
  font-size: 20px;
  margin-top: 36px;
}
.page p,
.page li {
  color: var(--muted);
}
.page .updated {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .cols {
    grid-template-columns: 1fr 1fr;
  }
  .col:nth-child(2) {
    border-right: 0;
  }
  .col:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .sb {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .tally {
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
  .nav a:not(.nav-docs) {
    display: none;
  }
  .hero {
    padding-top: 44px;
  }
  .lead {
    font-size: 16px;
  }
  .section {
    padding: 64px 0;
  }
  .cols,
  .dl-grid {
    grid-template-columns: 1fr;
  }
  .col {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .col:last-child {
    border-bottom: 0;
  }
  .sb {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .foot-in {
    grid-template-columns: 1fr;
  }
  .foot-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Docs: a list of pages on the left, like Settings in the app, and the text on the right. */
.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding-top: 40px;
  padding-bottom: 88px;
}
.side {
  position: sticky;
  top: 80px;
  align-self: start;
}
.side-title {
  margin: 0 0 8px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.side nav a,
.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-bottom: 2px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
}
.side nav a:hover,
.side-list a:hover {
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.side a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--text);
}
.side svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side a[aria-current='page'] svg {
  color: var(--accent);
}
.side-menu {
  display: none;
}
.doc {
  max-width: 780px;
  min-width: 0;
}
.crumb {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.doc h1 {
  font-size: 34px;
}
.doc .intro {
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--muted);
}
.doc h2 {
  font-size: 22px;
  margin: 56px 0 14px;
  scroll-margin-top: 80px;
}
.doc h2 a {
  color: inherit;
}
.doc h3 {
  font-size: 16px;
  margin: 26px 0 6px;
}
.doc p,
.doc li {
  line-height: 1.7;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin: 4px 0;
}
.doc pre {
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.doc pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}
.toc {
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.toc p {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}
.toc li {
  margin: 0;
  break-inside: avoid;
  font-size: 14px;
}
ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
ol.steps li {
  position: relative;
  padding-left: 38px;
  margin: 12px 0;
  counter-increment: step;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}
.shot {
  margin: 22px 0;
}
.shot.narrow {
  max-width: 480px;
}
.shot .frame {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #0b1017;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
kbd {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--card);
  font: 12px/20px 'Cascadia Mono', Consolas, 'Courier New', monospace;
  white-space: nowrap;
}
.ref {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 14px;
}
.ref th {
  text-align: left;
  padding: 8px 12px 8px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-strong);
}
.ref td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ref td:first-child {
  white-space: nowrap;
  padding-right: 20px;
}
.pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 64px;
}
.pn a {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.pn a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.pn small {
  color: var(--muted);
  font-size: 12px;
}
.pn-next {
  grid-column: 2;
  text-align: right;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 20px;
  }
  .side {
    position: static;
  }
  .side-list {
    display: none;
  }
  .side-menu {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    padding: 0 8px;
    margin: 0;
  }
  .side-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    font-size: 14px;
  }
  .side-menu summary span {
    flex: 1;
  }
  .side-menu nav {
    padding-bottom: 8px;
  }
  .toc ol {
    columns: 1;
  }
}
@media (max-width: 560px) {
  .doc h1 {
    font-size: 28px;
  }
  .ref td:first-child {
    white-space: normal;
  }
  .pn {
    grid-template-columns: 1fr;
  }
  .pn-next {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
