:root {
  --page: #f5f2ea;
  --card: #ffffff;
  --text: #1d2a27;
  --muted: #56645f;
  --line: #ddd6c8;
  --bar: #1c3a35;
  --bar-text: #f3efe4;
  --accent: #1f6b4f;
  --accent-hover: #185740;
  --accent-text: #ffffff;
  --earth: #a4472b;
  --code: #efeadf;
  --frame: #1b1d1d;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141c1a;
    --card: #1c2725;
    --text: #e9e5da;
    --muted: #a5b0aa;
    --line: #2e3c38;
    --bar: #0f2420;
    --bar-text: #f3efe4;
    --accent: #3b9a74;
    --accent-hover: #47ad85;
    --accent-text: #0d1a16;
    --earth: #e08a6b;
    --code: #24312e;
    --frame: #0b0c0c;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.bar { background: var(--bar); color: var(--bar-text); }
.bar-inner { display: flex; align-items: center; gap: 12px; height: 56px; }
.brand { font-weight: 700; letter-spacing: 0.02em; font-size: 18px; }
.badge {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; opacity: 0.85;
}

/* Screenshot carousel. Every frame has the same shape. Each image keeps its own shape inside it
   (object-fit: contain), on a neutral background: never stretched, squashed or cropped. */
.gallery { margin-top: 24px; outline: none; }
.gallery:focus-visible .gallery-viewport { outline: 3px solid var(--earth); outline-offset: 3px; }
.gallery-viewport { position: relative; overflow: hidden; touch-action: pan-y; container-type: inline-size; }
.gallery-track { display: flex; transition: transform 0.35s ease; }
.gallery-track.dragging { transition: none; }
@media (prefers-reduced-motion: reduce) { .gallery-track { transition: none; } }
.slide { flex: 0 0 100%; margin: 0; min-width: 0; }
.frame {
  aspect-ratio: 16 / 9; background: var(--frame);
  border-radius: var(--radius); overflow: hidden;
}
.frame img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.slide figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; padding: 0 2px; }
.arrow {
  /* Centered on the 16:9 frame, not on the frame plus its caption. */
  position: absolute; top: 40%; top: calc(100cqw * 9 / 32); transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.88); color: #1d2a27; font-size: 30px; line-height: 40px; padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.arrow:hover { background: #ffffff; }
.arrow:focus-visible, .dots button:focus-visible { outline: 3px solid var(--earth); outline-offset: 2px; }
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }
@media (max-width: 520px) { .arrow { width: 36px; height: 36px; font-size: 24px; line-height: 32px; } .arrow.prev { left: 6px; } .arrow.next { right: 6px; } }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.dots button {
  width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots button[aria-current="true"]::before { background: var(--accent); }

/* The device boxes under the screenshots (index.html, page.js). Two boxes per row; a phone stacks them. */
.get { display: grid; gap: 16px; margin-top: 24px; }
.row { display: grid; gap: 16px; }
@media (min-width: 640px) { .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.box {
  display: flex; flex-direction: column;
  background: var(--card); border: 2px solid var(--line); border-top-width: 6px; border-radius: var(--radius); padding: 18px 20px 20px;
}
.box h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.box.mobile > p { margin: 0; }
.box.mobile h2 { font-size: 18px; margin-bottom: 8px; }
/* The visitor's own box (kit-platform.js kitDevice). */
.box.mine { border-color: var(--accent); }
.mine-tag {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 2px 10px;
}
.needs { padding-left: 20px; margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.needs li { margin-bottom: 4px; }
/* The sign-in and download part sits at the bottom, so the Mac and Windows buttons line up. */
.action { margin-top: auto; }
.action > p:first-child, .action > div:first-child p:first-child { margin-top: 0; }
.signed-out p { margin: 0 0 10px; }

.intro { margin-top: 40px; }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 20px 0 6px; }
.lede { font-size: 18px; margin: 0 0 12px; }
.intro p { max-width: 70ch; }
.version { color: var(--muted); font-size: 15px; }
.version b { color: var(--text); font-weight: 600; }
/* The staging name in the Mac and Windows boxes, for example "Staging version 4" (page.js, kit-label.js). */
.kit-label { margin: 0 0 14px; font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--text); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
/* Mac or Windows steps: the visitor's system is chosen first (kit-platform.js); the other is one click away. */
.howto { margin-top: 40px; }
.howto-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.howto-head h2 { font-size: 26px; margin: 0; }
.platforms { display: flex; gap: 4px; padding: 4px; margin: 0; background: var(--code); border-radius: 10px; min-width: 240px; }
.platform {
  flex: 1; border: 0; border-radius: 7px; padding: 8px 12px; font: inherit; font-weight: 600;
  background: none; color: var(--muted); cursor: pointer;
}
.platform[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.15); }
.platform:focus-visible { outline: 3px solid var(--earth); outline-offset: 2px; }
.small:empty { display: none; }
.button {
  display: block; text-align: center; text-decoration: none;
  background: var(--accent); color: var(--accent-text);
  font-size: 18px; font-weight: 700; padding: 14px 20px; border-radius: 10px;
}
.button:hover { background: var(--accent-hover); }
.steps { color: var(--accent); }
.button:focus-visible, .link:focus-visible, .copy:focus-visible, .steps:focus-visible { outline: 3px solid var(--earth); outline-offset: 2px; }
.small { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.status { font-size: 14px; color: var(--earth); margin: 10px 0 0; }
.status:empty { display: none; }
.google-button { min-height: 44px; }
.link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; cursor: pointer;
}

.details { display: grid; gap: 16px; }
@media (min-width: 860px) { .details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.details ul, .details ol, .trouble ul, .trouble ol { padding-left: 22px; margin: 0 0 12px; }
.details li, .trouble li { margin-bottom: 6px; }
.trouble { margin-top: 16px; }
.trouble ol { margin-top: 6px; }
.trouble .card { max-width: 820px; }

code {
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere;
}
.command { display: flex; gap: 8px; align-items: stretch; margin: 8px 0; }
.command code { flex: 1; display: block; padding: 8px 10px; min-width: 0; }
.copy {
  flex: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px;
}

.readme { margin-top: 24px; }
.readme summary { cursor: pointer; font-weight: 600; }
.readme pre {
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.foot { margin-top: 40px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
