/* SimCleaner website. One stylesheet for every page; no build step. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  /* Apple devices get SF Pro, the font the app itself uses; everyone else gets Geist. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Geist", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Geist Mono", Menlo, monospace;

  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #3a3a3e;
  --muted: #6e6e73;
  --hairline: rgb(0 0 0 / 0.09);
  --hairline-strong: rgb(0 0 0 / 0.16);
  --link: #0066cc;
  --focus: #0071e3;

  /* The app icon's blueprint blues. */
  --blueprint-deep: #082468;
  --blueprint: #1450cf;
  --blueprint-light: #3f86f7;

  /* The storage bar's categories: macOS system colours, as in the app. */
  --c-simulators: #0088ff;
  --c-leftovers: #00c8b3;
  --c-runtimes: #cb30e0;
  --c-derived: #ff8d28;
  --c-support: #00c3d0;
  --c-agents: #ff2d55;
  --c-caches: #6155f5;
  --c-track: rgb(0 0 0 / 0.08);
  --freed: #248a3d;
  --freed-bright: #34c759;
  --freed-wash: rgb(52 199 89 / 0.14);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-glide: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow-float: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -12px rgb(0 0 0 / 0.14), 0 48px 96px -40px rgb(8 36 104 / 0.28);
  --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 30px -14px rgb(0 0 0 / 0.12);

  --page: min(1180px, 100% - 2 * var(--gutter));
  --gutter: clamp(16px, 4vw, 40px);
  --prose: 68ch;

  --z-menu: 20;
  --z-nav: 30;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #0e0e10;
    --surface: #161618;
    --ink: #f5f5f7;
    --ink-2: #d2d2d7;
    --muted: #a1a1a6;
    --hairline: rgb(255 255 255 / 0.1);
    --hairline-strong: rgb(255 255 255 / 0.18);
    --link: #2997ff;
    --focus: #2997ff;

    --c-simulators: #0091ff;
    --c-leftovers: #00dac3;
    --c-runtimes: #db34f2;
    --c-derived: #ff9230;
    --c-support: #00d2e0;
    --c-agents: #ff375f;
    --c-caches: #6d7cff;
    --c-track: rgb(255 255 255 / 0.12);
    --freed: #30d158;
    --freed-bright: #30d158;
    --freed-wash: rgb(48 209 88 / 0.16);

    --shadow-float: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 64px -24px rgb(0 0 0 / 0.8);
    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -16px rgb(0 0 0 / 0.6);
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  z-index: calc(var(--z-nav) + 1);
}

.skip-link:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  width: var(--page);
  margin-inline: auto;
}

.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-2);
  letter-spacing: -0.016em;
}

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

.fine {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Navigation: a floating island ---------- */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding: 14px var(--gutter) 0;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  width: min(1040px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px -18px rgb(0 0 0 / 0.25);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgb(22 22 24 / 0.72);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.94rem;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
}

.nav-cta {
  margin-left: 4px;
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.menu-button span {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 420ms var(--ease-glide), top 420ms var(--ease-glide);
}

.menu-button span:first-child {
  top: 17px;
}

.menu-button span:last-child {
  top: 24px;
}

.menu-button[aria-expanded="true"] span:first-child {
  top: 20.5px;
  transform: rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
  top: 20.5px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  padding: 96px var(--gutter) 40px;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms var(--ease-out), visibility 0s linear 360ms;
}

@media (prefers-color-scheme: dark) {
  .menu {
    background: rgb(0 0 0 / 0.86);
  }
}

.menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 360ms var(--ease-out), visibility 0s;
}

.menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 10px 0;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 640ms var(--ease-glide), opacity 640ms var(--ease-out);
}

.menu[data-open="true"] a {
  transform: none;
  opacity: 1;
}

.menu[data-open="true"] a:nth-child(2) {
  transition-delay: 50ms;
}

.menu[data-open="true"] a:nth-child(3) {
  transition-delay: 100ms;
}

.menu[data-open="true"] a:nth-child(4) {
  transition-delay: 150ms;
}

.menu[data-open="true"] a:nth-child(5) {
  transition-delay: 200ms;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav .nav-cta {
    margin-left: auto;
  }

  .nav .nav-cta + .menu-button {
    margin-left: 4px;
  }
}

@media (max-width: 400px) {
  .nav .nav-cta {
    display: none;
  }

  /* The hidden button is still its sibling, so match the selector above to push the menu button right. */
  .nav .menu-button,
  .nav .nav-cta + .menu-button {
    margin-left: auto;
  }
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 300ms var(--ease-out), background-color 300ms var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn .btn-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  transition: transform 420ms var(--ease-glide);
}

.btn:hover .btn-icon {
  transform: translate(2px, -1px) scale(1.05);
}

.btn-small {
  padding: 6px 6px 6px 14px;
  font-size: 0.9rem;
  gap: 8px;
}

.btn-small .btn-icon {
  width: 26px;
  height: 26px;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--hairline-strong);
}

.btn-ghost .btn-icon {
  background: var(--bg-soft);
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 12px;
  transition: transform 300ms var(--ease-out);
}

.store-badge:active {
  transform: scale(0.98);
}

.store-badge img {
  height: 54px;
  width: auto;
}

/* ---------- Bezel: screenshots sit in a machined tray ---------- */

.bezel {
  padding: 8px;
  border-radius: var(--radius-xl);
  background: rgb(0 0 0 / 0.035);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.bezel > .core {
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgb(255 255 255 / 0.4);
}

@media (prefers-color-scheme: dark) {
  .bezel {
    background: rgb(255 255 255 / 0.04);
  }
}

.bezel.on-blue {
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
}

/* ---------- Hero: the app icon's blueprint ---------- */

.hero {
  position: relative;
  margin-top: -70px;
  padding: calc(70px + clamp(72px, 11vw, 140px)) 0 0;
  color: #ffffff;
  background:
    radial-gradient(120% 70% at 50% 0%, rgb(255 255 255 / 0.14), transparent 60%),
    linear-gradient(180deg, var(--blueprint-deep) 0%, var(--blueprint) 62%, var(--blueprint-light) 100%);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.09) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask-image: radial-gradient(90% 75% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(90% 75% at 50% 30%, #000 30%, transparent 85%);
}

.hero-geometry {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 40px;
  width: min(1100px, 140vw);
  translate: -50% 0;
  opacity: 0.22;
  pointer-events: none;
}

.hero-copy {
  width: var(--page);
  margin-inline: auto;
  text-align: center;
}

.hero-icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 18px 30px rgb(4 20 70 / 0.45));
}

.hero h1 {
  color: #ffffff;
  max-width: 19ch;
  margin-inline: auto;
}

.hero .lede {
  color: rgb(255 255 255 / 0.84);
  max-width: 44ch;
  margin: 24px auto 0;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 22px;
}

.hero-actions .btn-ghost {
  --btn-fg: #ffffff;
  border-color: rgb(255 255 255 / 0.36);
}

.hero-actions .btn-ghost .btn-icon {
  background: rgb(255 255 255 / 0.14);
}

.hero-note {
  margin-top: 16px;
  font-size: 0.86rem;
  color: rgb(255 255 255 / 0.7);
}

.hero-shot {
  width: min(1180px, 100% - 2 * var(--gutter));
  margin: clamp(56px, 8vw, 88px) auto 0;
  translate: 0 1px;
}

.hero-shot .bezel {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 0;
}

.hero-shot .core {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero-shot img {
  width: 100%;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(84px, 12vw, 160px);
}

.section.soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 760px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head .lede {
  margin-top: 20px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blueprint);
}

@media (prefers-color-scheme: dark) {
  .kicker {
    color: var(--blueprint-light);
  }
}

/* ---------- The storage bar, as a working illustration ---------- */

.bar-demo {
  margin-top: clamp(48px, 7vw, 80px);
  padding: clamp(20px, 3.4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--hairline);
}

.bar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.bar-title {
  font-weight: 650;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.bar-total {
  font-weight: 650;
  font-size: 1.12rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar-spacer {
  flex: 1;
}

.bar-available {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.freed {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--freed-wash);
  font-size: 0.95rem;
  white-space: nowrap;
  opacity: 0;
  scale: 0.9;
  filter: blur(6px);
  transition: opacity 500ms var(--ease-out), scale 500ms var(--ease-glide), filter 500ms var(--ease-out);
}

.freed[data-visible="true"] {
  opacity: 1;
  scale: 1;
  filter: none;
}

.freed svg {
  width: 16px;
  height: 16px;
  color: var(--freed-bright);
}

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

.freed .total {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.freed .delta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.freed .rise {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--freed-bright);
  pointer-events: none;
  opacity: 0;
}

.freed .rise.go {
  animation: rise 1.6s var(--ease-out) forwards;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(8px) rotate(-4deg) scale(0.9);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-58px) rotate(3deg) scale(1.15);
  }
}

.freed.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.7) 50%, transparent 65%);
  background-size: 260% 100%;
  animation: shine 1.2s var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes shine {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -40% 0;
  }
}

.bar {
  display: flex;
  gap: 3px;
  height: 18px;
  margin-top: 18px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-track);
}

.bar span {
  display: block;
  flex: none;
  height: 100%;
  min-width: 4px;
  transition: width 1.1s var(--ease-glide);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.legend .size {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar-foot {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.replay {
  appearance: none;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.c-simulators { background: var(--c-simulators); }
.c-leftovers { background: var(--c-leftovers); }
.c-runtimes { background: var(--c-runtimes); }
.c-derived { background: var(--c-derived); }
.c-support { background: var(--c-support); }
.c-agents { background: var(--c-agents); }
.c-caches { background: var(--c-caches); }

/* ---------- Feature rows ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.split.flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.split.flip > .split-copy {
  order: 2;
}

.split-copy p + p {
  margin-top: 16px;
}

.split-copy .lede {
  margin-top: 20px;
}

.points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  color: var(--ink-2);
}

.points svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--blueprint);
}

@media (prefers-color-scheme: dark) {
  .points svg {
    color: var(--blueprint-light);
  }
}

@media (max-width: 900px) {
  .split,
  .split.flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.flip > .split-copy {
    order: 0;
  }
}

/* ---------- Bento ---------- */

.bento {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  grid-column: span 2;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile.span-2 { grid-column: span 2; }
.tile.span-4 { grid-column: span 4; }
.tile.span-6 { grid-column: span 6; }

.tile h3 {
  font-size: 1.22rem;
}

.tile p {
  color: var(--ink-2);
}

.tile code {
  font-size: 0.85rem;
}

.tile-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px;
  align-items: center;
}

.tile-split h3 + p {
  margin-top: 10px;
}

.term {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: #0f1115;
  color: #e6e8ee;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
}

.term .prompt {
  color: #7d8597;
  user-select: none;
}

.term .ok {
  color: #7ee2a8;
}

@media (max-width: 980px) {
  .tile.span-2,
  .tile.span-4 {
    grid-column: span 3;
  }

  .tile-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile.span-2,
  .tile.span-4,
  .tile.span-6 {
    grid-column: auto;
  }
}

/* ---------- Three short notes in a row ---------- */

.pair {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.pair h3 {
  font-size: 1.2rem;
}

.pair p {
  margin-top: 10px;
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Editions ---------- */

.editions {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.edition {
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.edition header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edition :is(h2, h3) {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.edition .state {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  white-space: nowrap;
}

.edition .state.live {
  background: var(--freed-wash);
  color: var(--freed);
}

.edition > p {
  margin-top: 12px;
  color: var(--ink-2);
}

.edition ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.edition li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  color: var(--ink-2);
}

.edition li svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--blueprint);
}

@media (prefers-color-scheme: dark) {
  .edition li svg {
    color: var(--blueprint-light);
  }
}

.edition .edition-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

@media (max-width: 760px) {
  .editions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.compare {
  width: 100%;
  margin-top: clamp(40px, 6vw, 64px);
  border-collapse: collapse;
  font-size: 0.98rem;
}

.compare caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.88rem;
  padding-bottom: 12px;
}

.compare th,
.compare td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  font-family: var(--font-display);
  font-size: 1.05rem;
  border-bottom-color: var(--hairline-strong);
}

.compare tbody th {
  font-weight: 500;
  color: var(--ink);
  width: 38%;
}

.compare td {
  color: var(--ink-2);
}

.compare .yes::before,
.compare .no::before {
  display: inline-block;
  width: 1.3em;
  font-weight: 700;
}

.compare .yes::before {
  content: "✓";
  color: var(--freed);
}

.compare .no::before {
  content: "–";
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

/* ---------- Guides list ---------- */

.guide-list {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.guide-list li {
  border-bottom: 1px solid var(--hairline);
}

.guide-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 24px;
  padding: 26px 4px;
  color: var(--ink);
  transition: padding-left 420ms var(--ease-glide), background-color 300ms var(--ease-out);
}

.guide-list a:hover {
  text-decoration: none;
  padding-left: 14px;
}

.guide-list .title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  letter-spacing: -0.02em;
}

.guide-list .summary {
  grid-column: 1;
  color: var(--muted);
  max-width: 70ch;
}

.guide-list .arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: transform 420ms var(--ease-glide);
}

.guide-list a:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Guides index ---------- */

.guide-feature {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  color: var(--ink);
}

.guide-feature:hover {
  text-decoration: none;
}

.guide-feature img,
.guide-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: transform 700ms var(--ease-glide);
}

.guide-feature:hover img,
.guide-grid a:hover img {
  transform: scale(1.015);
}

.guide-feature > span {
  display: grid;
  gap: 12px;
}

.guide-feature .kicker {
  margin: 0;
}

.guide-feature .title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.guide-feature .summary,
.guide-grid .summary {
  color: var(--muted);
}

.guide-grid {
  margin: clamp(48px, 7vw, 88px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 40px);
}

.guide-grid a {
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.guide-grid a:hover {
  text-decoration: none;
}

.guide-grid .title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* An odd last guide spans the row, laid out like the featured one. */
.guide-grid li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.guide-grid li:last-child:nth-child(odd) a {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.guide-grid li:last-child:nth-child(odd) img {
  grid-row: 1 / span 2;
}

.guide-grid li:last-child:nth-child(odd) .title,
.guide-grid li:last-child:nth-child(odd) .summary {
  grid-column: 2;
}

.guide-grid li:last-child:nth-child(odd) .title {
  align-self: end;
}

.guide-grid li:last-child:nth-child(odd) .summary {
  align-self: start;
}

@media (max-width: 820px) {
  .guide-feature,
  .guide-grid,
  .guide-grid li:last-child:nth-child(odd) a {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-grid li:last-child:nth-child(odd) img,
  .guide-grid li:last-child:nth-child(odd) .title,
  .guide-grid li:last-child:nth-child(odd) .summary {
    grid-column: auto;
    grid-row: auto;
  }
}

/* ---------- Closing band ---------- */

.band {
  border-radius: var(--radius-xl);
  padding: clamp(40px, 7vw, 88px);
  background:
    linear-gradient(180deg, var(--blueprint) 0%, var(--blueprint-deep) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
}

.band h2 {
  color: #ffffff;
  max-width: 18ch;
}

.band p {
  color: rgb(255 255 255 / 0.82);
  max-width: 54ch;
  margin-top: 18px;
}

.band .hero-actions {
  justify-content: flex-start;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: clamp(64px, 9vw, 120px);
  padding: 48px 0 56px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer h2 {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer a:hover {
  color: var(--ink);
}

.footer .brand {
  margin-bottom: 12px;
}

.footer-bottom {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Articles (guides, privacy) ---------- */

.article-hero {
  padding: clamp(56px, 8vw, 104px) 0 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--hairline-strong);
}

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

.article-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  max-width: 20ch;
}

.article-hero .lede {
  margin-top: 22px;
  max-width: 58ch;
}

.meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.article-art {
  margin-top: clamp(36px, 5vw, 56px);
}

.article-art {
  margin-inline: 0;
}

.article-art img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--prose)) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(40px, 6vw, 72px);
}

.toc {
  position: sticky;
  top: 104px;
  align-self: start;
  font-size: 0.9rem;
}

.toc h2 {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  border-left: 1px solid var(--hairline);
}

.toc a {
  display: block;
  padding-left: 14px;
  margin-left: -1px;
  color: var(--muted);
  border-left: 1px solid transparent;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: none;
}

.toc a[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--ink);
}

@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

.prose {
  max-width: var(--prose);
  font-size: 1.06rem;
  line-height: 1.68;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-top: 2.2em;
  scroll-margin-top: 104px;
}

.prose h3 {
  font-size: 1.25rem;
  margin-top: 1.8em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.45em;
}

/* Short inline commands stay on one line; long paths may wrap anywhere. */
.prose code.nw {
  white-space: nowrap;
}

.prose code {
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 0.86em;
  word-break: break-word;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent);
}

.prose a:hover {
  text-decoration-color: var(--link);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 600;
}

.answer {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
}

.answer .answer-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
}

.note {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--c-derived) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-derived) 30%, transparent);
  color: var(--ink);
}

.code {
  position: relative;
  margin-top: 1.2em;
}

.code pre {
  margin: 0;
  padding: 18px 56px 18px 20px;
  border-radius: var(--radius-md);
  background: #0f1115;
  color: #e6e8ee;
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-x: auto;
  box-shadow: none;
}

.code pre code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
  color: inherit;
  word-break: normal;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.08);
  color: #c9ccd6;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out);
}

.copy:hover {
  background: rgb(255 255 255 / 0.16);
}

.copy svg {
  width: 16px;
  height: 16px;
}

.figure {
  margin: 2em 0 0;
}

.figure figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.related {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--hairline);
}

.related h2 {
  margin-top: 0;
}

.prose .guide-list {
  padding-left: 0;
}

.prose .guide-list li + li {
  margin-top: 0;
}

.prose .guide-list a {
  text-decoration: none;
}

.app-callout {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--hairline);
}

.app-callout img {
  width: 64px;
  height: 64px;
}

.app-callout p {
  color: var(--ink-2);
}

.app-callout .btn {
  margin-top: 12px;
}

/* ---------- Motion: reveals enhance content that is already visible ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-glide), filter 900ms var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .js .reveal-delay-1 {
    transition-delay: 90ms;
  }

  .js .reveal-delay-2 {
    transition-delay: 180ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .freed .rise {
    display: none;
  }
}

@media print {
  .nav-wrap,
  .menu,
  .footer,
  .copy {
    display: none;
  }
}
