:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --text: #101013;
  --text-secondary: #6b6b76;
  --link: #0068d6;
  --button: #0068d6;
  --rule: rgba(0, 0, 0, .1);
  --code-bg: rgba(0, 0, 0, .05);
  --pill: rgba(0, 0, 0, .05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #18191c;
    --text: #f2f2f5;
    --text-secondary: #9a9aa6;
    --link: #5aaeff;
    --button: #0a74e6;
    --rule: rgba(255, 255, 255, .16);
    --code-bg: rgba(255, 255, 255, .08);
    --pill: rgba(255, 255, 255, .08);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 68px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body > main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.prose {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: calc(52px + clamp(40px, 8vh, 88px)) 24px 48px;
  font-size: 17px;
  line-height: 1.65;
}
.prose h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.prose h2 {
  margin: 40px 0 12px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--text-secondary); }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.35; }
.prose dl { margin: 0 0 16px; }
.prose dt { font-weight: 600; }
.prose dd { margin: 2px 0 14px; color: var(--text-secondary); }
.prose .updated { margin: 10px 0 36px; color: var(--text-secondary); font-size: 15px; }
.prose .changelog { color: var(--text-secondary); }
.prose .lede { margin: 14px 0 32px; color: var(--text-secondary); font-size: 19px; line-height: 1.55; }
.prose pre {
  margin: 0 0 16px;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--code-bg);
  font-size: 14px;
  line-height: 1.5;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }

/* Closing call-to-action on text pages. */
.cta {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--surface);
}
.cta-icon { flex: none; width: 72px; height: 72px; margin: -6px; }
.cta p { margin: 0; }
.cta-title { font-size: 19px; font-weight: 700; }
.cta-text { color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.cta .store { align-items: flex-start; margin-top: 16px; }
.cta .price { color: var(--text-secondary); }

/* Top bar, on every page */

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: #f5f5f7;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  height: 52px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; text-decoration: none; }
/* The macOS icon carries ~10% transparent padding. */
.brand img { width: 34px; height: 34px; margin: -4px 0 -4px -4px; }
.topbar nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.topbar nav a { color: rgba(245, 245, 247, .8); text-decoration: none; white-space: nowrap; transition: color .15s ease; }
.topbar nav a:hover { color: #fff; }
.topbar nav a.topbar-cta {
  padding: 6px 14px;
  border-radius: 999px;
  background: #0a74e6;
  color: #fff;
  font-weight: 600;
}
/* GitHub stays in the footer on phones, so the bar fits. */
@media (max-width: 480px) {
  .topbar nav { gap: 16px; }
  .topbar nav .topbar-secondary { display: none; }
}

/* Homepage */

/* The hero fills one screen: stacked on narrow windows, side by side on wide ones. */
.hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(52px + clamp(28px, 6vh, 64px)) 24px 24px;
  background: #000;
  color: #f5f5f7;
  text-align: center;
}
.hero h1 {
  max-width: 13em;
  margin: 0 auto;
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.hero .lead {
  max-width: 30em;
  margin: 16px auto 0;
  color: #a1a1aa;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  text-wrap: pretty;
}
.store { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; }
/* Apple asks for clear space of at least a quarter of the badge height around it. */
.badge { display: block; padding: 12px; margin: -12px; }
.badge img { width: auto; height: 44px; }
.price { margin: 0; color: #d1d1d6; font-size: 15px; }
.hero .meta { margin: 14px 0 0; color: #8e8e93; font-size: 14px; line-height: 1.6; }
.hero .meta a { color: #6cb6ff; text-underline-offset: 2px; }
.nowrap { white-space: nowrap; }
.hero-shot { position: relative; flex: 1 1 0; min-height: 260px; }
.hero-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 960px) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    padding: 52px max(24px, calc((100% - 1280px) / 2 + 24px)) 0;
    text-align: left;
  }
  .hero-copy { flex: 0 1 440px; }
  .hero h1, .hero .lead { margin-inline: 0; }
  .store { align-items: flex-start; }
  .hero-shot { align-self: stretch; margin: 24px 0; }
}

.section { max-width: 1128px; margin: 0 auto; padding: clamp(64px, 9vw, 104px) 24px 0; }
.section:last-child { padding-bottom: clamp(64px, 9vw, 104px); }
.section h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -.024em;
  line-height: 1.15;
  text-wrap: balance;
}
.section h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
:where(.section) p { margin: 0 0 14px; }
.section a:not(.button) { color: var(--link); text-underline-offset: 2px; }
.intro { max-width: 40em; margin: 0 0 32px; color: var(--text-secondary); font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.center { text-align: center; }
.center .intro { margin-inline: auto; }

.cards { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.card { padding: 24px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); }
.card p { margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.55; }

.split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split .copy { font-size: 17px; line-height: 1.65; }
.split .copy p { color: var(--text-secondary); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 2fr; }
}
.mac-shot img { width: 100%; }
/* Apple asks for product images at least 200px tall. */
@media (max-width: 420px) {
  .mac-shot { margin-inline: -24px; }
}

.steps {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
}
.steps li {
  position: relative;
  padding: 18px 20px 18px 64px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  font-size: 17px;
  line-height: 1.55;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--button);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.pills li { padding: 6px 14px; border-radius: 999px; background: var(--pill); font-size: 15px; }
.note { max-width: 680px; margin: 24px auto 0; color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

.story { display: grid; gap: 24px 56px; align-items: center; font-size: 17px; line-height: 1.65; }
.story img { width: min(300px, 70vw); margin: 0 auto; }
.story p { color: var(--text-secondary); }
@media (min-width: 820px) {
  .story { grid-template-columns: 300px 1fr; }
}

/* Three columns of short answers; the row labels take the remaining width. */
.compare {
  width: 100%;
  max-width: 880px;
  margin: 40px auto 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.4;
}
.compare th, .compare td { padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-size: 15px; font-weight: 600; text-align: center; }
.compare tbody th { font-weight: 500; text-align: left; }
.compare td { width: 22%; color: var(--text-secondary); text-align: center; }
.compare .ours { background: var(--surface); color: var(--text); }
.compare thead .ours { border-radius: 14px 14px 0 0; }
.compare tbody tr:last-child .ours { border-radius: 0 0 14px 14px; }
.compare .yes { color: #1f9d55; font-size: 19px; font-weight: 700; }
/* On phones each row label sits on its own line above the three answers. */
@media (max-width: 560px) {
  .compare, .compare thead, .compare tbody { display: block; }
  .compare tr { display: grid; grid-template-columns: repeat(3, 1fr); }
  .compare thead td { display: none; }
  .compare thead th { padding: 12px 4px; font-size: 14px; }
  .compare tbody th { grid-column: 1 / -1; padding: 16px 4px 6px; border-bottom: 0; }
  .compare td { width: auto; padding: 8px 4px; font-size: 14px; }
  .compare tbody tr:last-child td { border-bottom: 0; }
  .compare tbody .ours, .compare thead .ours { border-radius: 10px; }
}

.panel { padding: clamp(24px, 4vw, 44px); border: 1px solid var(--rule); border-radius: 22px; background: var(--surface); font-size: 17px; line-height: 1.65; }
.panel p { color: var(--text-secondary); }
.credits { margin: 22px 0 0; font-size: 15px; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 22px 0 6px; }
.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--button);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); opacity: .9; }

.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; text-align: left; }
.faq details { border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  border-radius: 14px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.faq .answer { padding: 0 20px 16px; color: var(--text-secondary); font-size: 16px; line-height: 1.6; }
.faq .answer p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .topbar nav a, .button, .faq summary::after { transition: none; }
}

.footer {
  flex: none;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; }
.footer a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.footer a:hover { color: var(--text); text-decoration-color: currentColor; }
.footer-separator { opacity: .55; }
.footer-meta { margin-top: 8px; }
.footer-mark {
  width: 30px;
  height: 30px;
  margin: 8px auto 12px;
  background: currentColor;
  opacity: .5;
  -webkit-mask: url(/images/rex-glyph.png) center / contain no-repeat;
  mask: url(/images/rex-glyph.png) center / contain no-repeat;
}
.legal { max-width: 46em; margin: 14px auto 0; font-size: 12px; line-height: 1.5; opacity: .8; }
@media (max-width: 480px) {
  .footer { font-size: 14px; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
}
