:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --navy-0: #121a33;
  --navy-1: #21386b;
  --mint: #4dd99e;
  --mint-ink: #147a50;
  --ink: #141a2b;
  --muted: #52596b;
  --line: rgba(20, 26, 43, 0.12);
  --page: #f7f8fa;
  --surface: #ffffff;
  --code-bg: rgba(20, 26, 43, 0.06);
  color-scheme: light dark;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--navy-0);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 16px;
}
* {
  box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a {
  color: var(--mint-ink);
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 5px;
}
pre {
  margin: 0;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  background: rgba(18, 26, 51, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
}
.topbar nav a:hover {
  color: #fff;
}
.topbar .nav-cta {
  color: var(--navy-0);
  background: var(--mint);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.topbar .nav-cta:hover {
  color: var(--navy-0);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 32px 80px;
  color: #fff;
}
.hero-band {
  background: linear-gradient(160deg, var(--navy-0), var(--navy-1));
}
.hero-logo {
  display: block;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.lead {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--navy-0);
}
.hero-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 22px;
}

/* Gauge */
.gauge-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
}
.gauge-wrap {
  position: relative;
  width: min(280px, 100%);
  margin: 0 auto;
}
.gauge {
  display: block;
  width: 100%;
  height: auto;
}
.gauge path {
  fill: none;
  stroke-width: 20;
  stroke-linecap: round;
}
.gauge .track {
  stroke: var(--mint);
}
.gauge .used {
  stroke: rgba(255, 255, 255, 0.88);
  stroke-dasharray: 97 100;
  transition: stroke-dasharray 0.9s ease;
}
.gauge .threshold {
  stroke: #ffb547;
  stroke-width: 3;
  stroke-linecap: round;
}
.gauge-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6px;
}
.gauge-readout strong {
  font-size: 38px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gauge-readout span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.gauge-readout .state {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffb547;
}
.gauge-readout .state.ok {
  color: var(--mint);
}
.steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 13px;
  min-height: 196px;
}
.steps li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.steps li .freed {
  color: var(--mint);
}
.steps li.total {
  color: #fff;
  font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .steps li {
    animation: step-in 0.35s ease both;
  }
  @keyframes step-in {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
  }
}
.gauge-card figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

/* Sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 32px;
  scroll-margin-top: 76px;
}
.section h2 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.section-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 32px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}
.grid.three {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.card p {
  margin: 0 0 14px;
  color: var(--muted);
  flex: 1;
}
.card > code {
  align-self: flex-start;
  color: var(--mint-ink);
  background: rgba(77, 217, 158, 0.14);
}
.safety {
  margin-top: 28px;
  background: var(--navy-0);
  color: #fff;
  border-radius: 18px;
  padding: 24px 28px;
}
.safety h3 {
  margin: 0 0 4px;
  font-size: 19px;
}
.safety p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.82);
}
.safety ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 8px 24px;
}
.safety li {
  padding-left: 26px;
  position: relative;
}
.safety li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--mint);
}
.safety code {
  background: rgba(255, 255, 255, 0.1);
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.split p {
  color: var(--muted);
}
.split .section-lead {
  margin-bottom: 14px;
}
.config {
  background: var(--navy-0);
  color: #e8ebf3;
  border-radius: 16px;
  overflow: hidden;
}
.config-title {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.config pre {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  overflow-x: auto;
}
.config .c {
  color: rgba(255, 255, 255, 0.68);
}
.folders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.folders li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 15px;
}
.folders li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
}

pre.mini {
  background: var(--page);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-x: auto;
}
.install {
  text-align: left;
}
pre.code {
  background: var(--navy-0);
  color: #e8ebf3;
  border-radius: 14px;
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 14px;
  overflow-x: auto;
  margin-bottom: 18px;
}
.install p:last-child {
  color: var(--muted);
}
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 760px;
}
.checklist li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--mint);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 48px;
  }
  .topbar {
    padding: 10px 16px;
  }
  .topbar nav a:not(.nav-cta) {
    display: none;
  }
  .section {
    padding: 56px 20px;
  }
}

/* App downloads ("Get SpaceKeeper": Mac App Store badge + direct download + App Store badge) */
.app-downloads {
  max-width: 740px;
  margin: 0 0 24px;
  text-align: left;
  color: var(--ink);
}
.app-downloads h3 {
  margin: 0 0 14px;
  font-size: 20px;
}
.app-downloads ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-downloads li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 220px;
}
.app-downloads li p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}
.app-downloads li p b {
  color: var(--ink);
}
.app-downloads-badge {
  display: inline-block;
  padding: 10px 0;
  line-height: 0;
  border-radius: 10px;
}
.app-downloads .app-downloads-badge img {
  width: auto;
  height: 40px;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.app-downloads-direct {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 8px 0 0;
  padding: 8px 18px 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.app-downloads-direct:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.app-downloads-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.install .download-widget {
  margin: 16px 0 24px;
}
.download-widget > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
:is(.app-downloads-badge, .app-downloads-direct, a, button):focus-visible {
  outline: 3px solid var(--mint-ink);
  outline-offset: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mint-ink: #5ae2a8;
    --ink: #eef2fb;
    --muted: #a9b4cc;
    --line: rgba(238, 242, 251, 0.14);
    --page: #0c1224;
    --surface: #141e38;
    --code-bg: rgba(238, 242, 251, 0.09);
  }
  .safety,
  .config,
  pre.code {
    border: 1px solid var(--line);
  }
}
