:root {
  --bg: #ffffff;
  --bg-alt: #f5f6fa;
  --text: #16181d;
  --muted: #5b6070;
  --line: #e3e5ec;
  --accent: #4553d9;
  --accent-text: #ffffff;
  --accent-soft: rgba(69, 83, 217, 0.18);
  --accent-strong: rgba(69, 83, 217, 0.55);
  --kbd-bg: #ffffff;
  --kbd-line: #cfd2dc;
  --shadow: 0 1px 2px rgba(20, 22, 40, 0.06), 0 12px 40px rgba(20, 22, 40, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101116;
    --bg-alt: #17181f;
    --text: #ececf1;
    --muted: #a0a4b2;
    --line: #2a2c36;
    --accent: #8796ff;
    --accent-text: #0d0f1a;
    --accent-soft: rgba(135, 150, 255, 0.2);
    --accent-strong: rgba(135, 150, 255, 0.6);
    --kbd-bg: #23252e;
    --kbd-line: #3a3d49;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101116;
  --bg-alt: #17181f;
  --text: #ececf1;
  --muted: #a0a4b2;
  --line: #2a2c36;
  --accent: #8796ff;
  --accent-text: #0d0f1a;
  --accent-soft: rgba(135, 150, 255, 0.2);
  --accent-strong: rgba(135, 150, 255, 0.6);
  --kbd-bg: #23252e;
  --kbd-line: #3a3d49;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }

.site-header nav { display: flex; gap: 24px; font-size: 15px; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */

.hero { text-align: center; padding: 72px 0 0; }
.hero .icon { width: 112px; height: 112px; margin: 0 auto 24px; }
.hero h1 { margin-bottom: 18px; }
.hero .lead {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 20px;
  color: var(--muted);
}

.download { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 17px;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button[aria-disabled="true"] {
  background: var(--bg-alt);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: default;
  filter: none;
}

.requirements { font-size: 14px; color: var(--muted); margin: 0; }

.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero .shot { margin-top: 56px; }

/* Sections */

section { padding: 96px 0; }
section.alt { background: var(--bg-alt); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px 56px;
  margin-bottom: 48px;
}
.section-head h2 { margin-top: -4px; }
.section-head p:last-child, .section-head ul:last-child { margin-bottom: 0; }

ul.plain { margin: 0; padding-left: 1.2em; }
ul.plain li { margin-bottom: 0.4em; }

.muted { color: var(--muted); }

/* Layout diagrams */

.layouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.layouts li { font-size: 15px; }

.diagram {
  display: flex;
  gap: 4px;
  aspect-ratio: 16 / 10;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.diagram .col { display: flex; flex-direction: column; gap: 4px; }
.diagram .cell { flex: 1; border-radius: 5px; background: var(--accent-soft); }
.diagram .w1 { flex: 1; }
.diagram .w2 { flex: 2; }

.layouts .split { color: var(--muted); display: block; font-size: 14px; }

/* Keyboard */

table.keys { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.keys th, table.keys td {
  text-align: left;
  vertical-align: top;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
/* Matches the left column of .section-head, so the descriptions line up with the text above. */
table.keys th { width: 47.5%; padding-right: 24px; font-weight: 400; white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 2px 7px;
  border: 1px solid var(--kbd-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--kbd-bg);
  font: 500 14px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  text-align: center;
}

.note {
  margin-top: 32px;
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }

/* Setup */

ol.steps { margin: 0; padding-left: 1.3em; }
ol.steps li { margin-bottom: 0.7em; }
ol.steps li:last-child { margin-bottom: 0; }

/* Questions */

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 56px; }
.faq h3 { margin-bottom: 8px; }
.faq p { color: var(--muted); margin: 0; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* Text pages */

.page { max-width: 720px; padding: 64px 24px 96px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.page h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.01em; }
.page .updated { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.4em; }

/* Narrow screens */

@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; }
  .layouts { grid-template-columns: repeat(2, 1fr); }
  .faq { grid-template-columns: 1fr; }
  table.keys { table-layout: auto; }
  table.keys th { width: auto; white-space: normal; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .page { padding: 48px 16px 72px; }
  .site-header nav { gap: 16px; font-size: 14px; }
  .site-header nav .optional { display: none; }
  .hero { padding-top: 48px; }
  .hero .lead { font-size: 18px; }
  .hero .shot { margin-top: 40px; }
  section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .shot { border-radius: 8px; }
  table.keys th, table.keys td { display: block; padding: 0; border: 0; }
  table.keys th { padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: 6px; }
  table.keys td { padding-bottom: 16px; }
}
