/*
 * AI Repair website: creative, minimal and fun (the website-design skill,
 * .claude/skills/website-design/, holds the brief; frontend-design the process). Light by
 * default, dark by the system setting or data-theme="dark"; the two dark blocks list the same
 * tokens. System fonts only; nothing is loaded from anywhere else.
 */
:root {
  --stage: #f4f6f8;
  --win: #ffffff;
  --card: #ffffff;
  --sunk: #f4f7f6;
  --line: #e5e8eb;
  --line-2: #cbd1d7;
  --fg: #17191f;
  --fg-2: #4a505b;
  --fg-3: #8a909a;
  --accent: #0b7a5f;
  --accent-hover: #08664f;
  --on-accent: #ffffff;
  --accent-soft: #ddf5ea;
  --accent-on-soft: #08664f;
  --mint: #e2f8ee;
  --alert: #ffcc2e;
  --note-1: #fff1a6;
  --note-2: #ffd9e0;
  --note-3: #d6e8ff;
  --note-4: #d2f4e3;
  --note-5: #e7ddff;
  --note-ink: #1d1f24;
  --warn: #965800;
  --warn-soft: #faeed7;
  --header-bg: rgb(255 255 255 / 0.86);
  --shadow: 0 1px 2px rgb(23 25 31 / 0.06), 0 18px 48px rgb(23 25 31 / 0.12);
  --note-shadow: 0 1px 1px rgb(23 25 31 / 0.06), 0 12px 20px -10px rgb(23 25 31 / 0.3);
  --tl-r: #ff5f57;
  --tl-y: #febc2e;
  --tl-g: #28c840;
  --font-ui:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI",
    system-ui, sans-serif;
  --font-display:
    ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
    "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --fs-xs: 15px;
  --fs-sm: 16px;
  --fs-md: 19px;
  --fs-lg: 21px;
  --fs-xl: 24px;
  --fs-h1: clamp(44px, 7.4vw, 88px);
  --fs-h2: clamp(36px, 5vw, 56px);
  --r-win: 14px;
  --r-card: 16px;
  --r-panel: 28px;
  --r-pill: 999px;
  --gutter: 20px;
  --content: 1140px;
  --text: 720px;
  --header-h: 68px;
  --transition: 0.2s;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stage: #161a1f;
    --win: #0f1216;
    --card: #171b21;
    --sunk: #13171c;
    --line: #262c34;
    --line-2: #3a424b;
    --fg: #eef1f4;
    --fg-2: #b0b7c1;
    --fg-3: #6d7580;
    --accent: #43d1a2;
    --accent-hover: #66dcb5;
    --on-accent: #052219;
    --accent-soft: #143528;
    --accent-on-soft: #61dbb2;
    --mint: #143a2c;
    --alert: #ffcc2e;
    --note-1: #f3e39a;
    --note-2: #f2cbd3;
    --note-3: #c9dbf3;
    --note-4: #c6e9d8;
    --note-5: #dbd0f3;
    --note-ink: #1d1f24;
    --warn: #efb24a;
    --warn-soft: #382a11;
    --header-bg: rgb(15 18 22 / 0.84);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 54px rgb(0 0 0 / 0.55);
    --note-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 14px 24px -10px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stage: #161a1f;
  --win: #0f1216;
  --card: #171b21;
  --sunk: #13171c;
  --line: #262c34;
  --line-2: #3a424b;
  --fg: #eef1f4;
  --fg-2: #b0b7c1;
  --fg-3: #6d7580;
  --accent: #43d1a2;
  --accent-hover: #66dcb5;
  --on-accent: #052219;
  --accent-soft: #143528;
  --accent-on-soft: #61dbb2;
  --mint: #143a2c;
  --alert: #ffcc2e;
  --note-1: #f3e39a;
  --note-2: #f2cbd3;
  --note-3: #c9dbf3;
  --note-4: #c6e9d8;
  --note-5: #dbd0f3;
  --note-ink: #1d1f24;
  --warn: #efb24a;
  --warn-soft: #382a11;
  --header-bg: rgb(15 18 22 / 0.84);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 54px rgb(0 0 0 / 0.55);
  --note-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 14px 24px -10px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* The sticky header must never cover the heading a link jumps to. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
/* A column as tall as the window at least, so the footer sits at the bottom of a short page. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--win);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1 0 auto;
}
img,
svg {
  display: block;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-hover);
}
:where(a, button, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
p,
ul,
ol {
  margin: 0;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 40;
  padding: 12px 18px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}
/* The guides' and the privacy page's small word above the title: plain, not shouted. */
.eyebrow {
  color: var(--accent-on-soft);
  font-size: var(--fs-xs);
  font-weight: 650;
}
.nowrap {
  white-space: nowrap;
}

/* Buttons: pills, at least 48 px tall, the app's green. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 12px 24px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color var(--transition);
}
.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.button.large {
  min-height: 60px;
  padding: 16px 30px;
  font-size: var(--fs-md);
}
/* On the green panel. */
.button.light {
  background: var(--win);
  color: var(--fg);
}
.button.light:hover {
  background: var(--sunk);
  color: var(--fg);
}
.text-link {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--fg);
  text-decoration-color: var(--line-2);
}
.text-link:hover {
  color: var(--accent);
  text-decoration-color: currentcolor;
}

/* Header: stays at the top. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--win);
  border-bottom: 1px solid var(--line);
}
/* See-through only where the browser blurs what is behind it. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
  }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 750;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--fg);
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.site-nav a {
  color: var(--fg-2);
  font-size: var(--fs-sm);
  font-weight: 550;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--fg);
}
.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.site-header .button {
  min-height: 44px;
  padding: 10px 20px;
}
@media (max-width: 859px) {
  .site-nav {
    display: none;
  }
  .site-header .button {
    margin-left: auto;
  }
}

/* Hero: the words on the left, the error that gets fixed on the right. */
.hero {
  padding-block: 56px 88px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero h1 .line {
  display: block;
}
.hero .lede {
  margin-top: 28px;
  max-width: 30em;
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.5;
  color: var(--fg-2);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}
.cta .note {
  width: 100%;
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
@media (max-width: 559px) {
  .hero .cta .button {
    width: 100%;
  }
}
@media (min-width: 980px) {
  .hero {
    padding-block: 88px 120px;
  }
  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
  }
  /* Each question on one line beside the scene. */
  .hero h1 {
    font-size: clamp(48px, 4.5vw, 62px);
  }
}

/*
 * The scene: the person's words, the system's error dialog, then AI Repair's answer and the
 * dialog turned green. Drawn once on load; with reduced motion it simply shows the end.
 */
.scene {
  display: grid;
  gap: 18px;
  max-width: 460px;
  justify-self: center;
  width: 100%;
}
.bubble {
  max-width: 85%;
  padding: 14px 20px;
  border-radius: 24px;
  font-size: var(--fs-md);
  font-weight: 550;
  line-height: 1.35;
}
.bubble.you {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
}
.bubble.ai {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--sunk);
  border: 1px solid var(--line);
  color: var(--fg);
}
.dialogs {
  display: grid;
}
.dialog {
  grid-area: 1 / 1;
  display: grid;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-win);
  box-shadow: var(--shadow);
}
.dialog-bar {
  display: flex;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.tl {
  display: flex;
  gap: 7px;
}
.tl i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tl-r);
}
.tl i:nth-child(2) {
  background: var(--tl-y);
}
.tl i:nth-child(3) {
  background: var(--tl-g);
}
.dialog-body {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 24px 20px;
}
.dialog-icon {
  flex: none;
  width: 52px;
  height: 52px;
}
.broken .sign {
  fill: var(--alert);
  stroke: var(--note-ink);
}
.broken .mark {
  stroke: var(--note-ink);
}
.broken .dot {
  fill: var(--note-ink);
}
.fixed .sign {
  fill: var(--accent);
}
.fixed .mark {
  stroke: var(--on-accent);
}
.dialog-words {
  display: grid;
  gap: 2px;
}
.dialog-words b {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
}
.dialog-words span {
  color: var(--fg-2);
  font-size: var(--fs-sm);
}
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 22px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.broken .dialog-buttons span {
  padding: 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.broken .dialog-buttons .default {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--win);
}
.dialog.fixed {
  background: var(--mint);
  border-color: transparent;
}
.fixed .dialog-bar {
  border-bottom-color: transparent;
}
.fixed .dialog-buttons {
  justify-content: flex-start;
  gap: 18px;
  padding-left: 94px;
  color: var(--fg-2);
}
.fixed .undo {
  color: var(--accent-on-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* The end of the story is what shows without motion: the fixed dialog, no error. */
.dialog.broken {
  visibility: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .bubble.you {
    animation: arrive 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2) 0.3s both;
  }
  .dialog.broken {
    animation:
      shake 0.6s ease-in-out 1s,
      leave 0.3s ease 2.5s both;
  }
  .bubble.ai {
    animation: arrive 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2) 1.9s both;
  }
  .dialog.fixed {
    animation: arrive 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.3) 2.6s both;
  }
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shake {
  0%,
  100% {
    transform: none;
  }
  20%,
  60% {
    transform: translateX(-9px) rotate(-1deg);
  }
  40%,
  80% {
    transform: translateX(9px) rotate(1deg);
  }
}
@keyframes leave {
  from {
    visibility: visible;
    opacity: 1;
  }
  to {
    visibility: hidden;
    opacity: 0;
  }
}

/* Sections: a heading, at most a sentence, then the thing itself. */
.section {
  padding-block: 80px;
}
@media (min-width: 900px) {
  .section {
    padding-block: 112px;
  }
}
.section.band {
  background: var(--sunk);
}
.section h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.section .intro {
  margin-top: 14px;
  max-width: 60ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}

/*
 * What it fixes: sticky notes, an emoji and a few words, stuck on at small angles. Each is a link
 * to its guide. Rows wrap and a short last row sits in the middle.
 */
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 52px;
  padding: 0;
  list-style: none;
}
.tile {
  flex: 0 1 calc((100% - 4 * 22px) / 5);
  min-width: 150px;
  rotate: -1.5deg;
}
.tile:nth-child(5n + 2) {
  rotate: 1.2deg;
}
.tile:nth-child(5n + 3) {
  rotate: -0.6deg;
}
.tile:nth-child(5n + 4) {
  rotate: 1.8deg;
}
.tile:nth-child(5n) {
  rotate: -2deg;
}
.tile-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  aspect-ratio: 1 / 0.82;
  padding: 20px;
  background: var(--note-1);
  border-radius: 3px;
  box-shadow: var(--note-shadow);
  color: var(--note-ink);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}
.tile:nth-child(5n + 2) .tile-link {
  background: var(--note-2);
}
.tile:nth-child(5n + 3) .tile-link {
  background: var(--note-3);
}
.tile:nth-child(5n + 4) .tile-link {
  background: var(--note-4);
}
.tile:nth-child(5n) .tile-link {
  background: var(--note-5);
}
.tile-link:hover {
  color: var(--note-ink);
}
.tile-link:hover span:last-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.tile .emoji {
  font-size: 54px;
  line-height: 1;
}
@media (max-width: 1099px) {
  .tile {
    flex-basis: calc((100% - 3 * 22px) / 4);
  }
}
@media (max-width: 819px) {
  .tile {
    flex-basis: calc((100% - 2 * 22px) / 3);
  }
}
@media (max-width: 559px) {
  .tiles {
    gap: 16px;
  }
  .tile {
    flex-basis: calc((100% - 16px) / 2);
    min-width: 0;
  }
  .tile-link {
    padding: 16px;
    font-size: var(--fs-md);
  }
}
.extras {
  max-width: 62ch;
  margin: 48px auto 0;
  text-align: center;
  color: var(--fg-2);
}

/* How it works: three steps, numbered because they are a sequence. No cards. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-top: 56px;
  padding: 0;
  list-style: none;
}
.step .num {
  display: block;
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent);
}
.step h3 {
  margin-top: 14px;
  font-size: var(--fs-xl);
  font-weight: 750;
}
.step p {
  margin-top: 8px;
  color: var(--fg-2);
}
@media (max-width: 819px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

/* Safe by design: four short promises, a check each. */
.promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  margin-top: 52px;
  padding: 0;
  list-style: none;
}
.promises svg {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.promises h3 {
  margin-top: 16px;
  font-size: var(--fs-lg);
  font-weight: 750;
}
.promises p {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
@media (max-width: 999px) {
  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 559px) {
  .promises {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 52px;
  padding: 0;
  list-style: none;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
}
.plan.featured {
  border: 2px solid var(--accent);
}
.plan h3 {
  font-size: var(--fs-xl);
  font-weight: 750;
}
.plan .allowance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  color: var(--fg-2);
  font-size: var(--fs-sm);
}
.plan .allowance .num {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--fg);
}
.plan .tagline {
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.perks,
.includes ul {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}
.perks li,
.includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.perks svg,
.includes svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}
.plan .perks {
  margin-bottom: 26px;
}
.plan .price {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-md);
  font-weight: 650;
}
/* A paid plan is chosen in the app (the line under the cards says how). */
.plan .price.in-app {
  color: var(--fg);
}
/* Where to buy, right under the cards: how, and the download it starts with. */
.plans-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 18px;
  margin-top: 28px;
}
.plans-buy p {
  flex: 1 1 36ch;
  max-width: 70ch;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.plans-buy strong {
  color: var(--fg);
  font-weight: 650;
}
.includes {
  margin-top: 36px;
}
.includes h3 {
  font-size: var(--fs-md);
  font-weight: 700;
}
.includes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 14px;
}
@media (max-width: 899px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }
}

/* Questions: folded shut, a hairline between them. */
.faq {
  max-width: 820px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding-block: 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: transform var(--transition);
}
.faq details[open] summary svg {
  transform: rotate(45deg);
}
.faq .answer {
  display: grid;
  gap: 12px;
  max-width: 68ch;
  padding-bottom: 26px;
  color: var(--fg-2);
}
/* A long answer's list (Why does it need admin rights?): one item a line. :where() keeps it as
 * light as the answer's own text. */
:where(.faq) .answer ul {
  display: grid;
  gap: 6px;
  padding-left: 1.3em;
}
:where(.faq .answer) li::marker {
  color: var(--accent);
}

/* Download: one green block to end on. */
.download {
  padding-block: 0 112px;
}
.download .panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(56px, 8vw, 96px) 24px;
  background: var(--accent);
  border-radius: 32px;
  color: var(--on-accent);
  text-align: center;
}
.download h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.download .intro {
  font-size: var(--fs-lg);
}
.download .button {
  margin-top: 12px;
}
.download .note {
  max-width: 44ch;
  font-size: var(--fs-sm);
}
.download .downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}
.download .option {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  width: min(100%, 340px);
}

/* Footer */
.site-footer {
  padding-block: 48px 56px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}
.site-footer .brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer a {
  color: var(--fg-2);
}
.site-footer a:hover {
  color: var(--fg);
}
.site-footer nav a {
  text-decoration: none;
}
.site-footer nav a:hover {
  text-decoration: underline;
}
/* The company and the addresses wrap by item, never inside one. */
.site-footer .legal {
  display: grid;
  gap: 8px;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 0;
  list-style: none;
}
.legal li {
  white-space: nowrap;
}
/* Every guide, on every page: a row of its own under the brand and the links. */
.site-footer .footer-guides {
  width: 100%;
  gap: 6px 18px;
}
.footer-guides .label {
  color: var(--fg);
  font-weight: 600;
}

/* Guide cards, on the guides page. The whole card is the link. */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}
.guide-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
}
.guide-card:hover {
  border-color: var(--accent);
}
.guide-card:has(a:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.guide-card :is(h2, h3) {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
}
.guide-card :is(h2, h3) a {
  color: inherit;
  text-decoration: none;
}
.guide-card :is(h2, h3) a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.guide-card :is(h2, h3) a:focus-visible {
  outline: none;
}
.guide-card p:not(.eyebrow) {
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
@media (max-width: 899px) {
  .guide-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .guide-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

/* The breadcrumb above a guide's title. The separators are drawn, so nothing extra is read out. */
.crumbs {
  margin-bottom: 18px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--fg-2);
}
.crumbs li + li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 10px 1px 8px;
  border-top: 1.5px solid var(--fg-3);
  border-right: 1.5px solid var(--fg-3);
  transform: rotate(45deg);
}
.crumbs li a {
  color: var(--fg-2);
  text-decoration: none;
}
.crumbs li a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* The guides page */
.hub {
  padding-block: 24px 80px;
}
.hub h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
}
.hub .lead {
  margin-top: 16px;
  max-width: 60ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}
/* The compare page: sections under the title, each with its own heading. */
.hub-h2 {
  margin-top: 48px;
  font-size: var(--fs-xl);
  font-weight: 650;
}
.hub .guide-cards {
  margin-top: 20px;
}
.hub-text {
  margin-top: 14px;
  max-width: 70ch;
  color: var(--fg-2);
}
.hub .faq {
  margin-top: 18px;
}
@media (max-width: 599px) {
  /*
   * Five columns on a phone: fixed widths, smaller type and long words hyphenated (the app
   * names break only where the page allows, <wbr>), so every column fits the screen and none
   * hides off to the side.
   */
  .compare-wide {
    table-layout: fixed;
    font-size: 12px;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  .compare-wide thead th:first-child {
    width: 22%;
  }
  .compare-wide :is(th, td) {
    padding-right: 6px;
  }
}
.hub-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 36px;
  padding: clamp(22px, 4vw, 32px);
  background: var(--stage);
  border-radius: var(--r-panel);
}
.hub-note > svg:first-child {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--accent);
}
.hub-note h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
}
.hub-note p {
  margin-top: 8px;
  max-width: 64ch;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.hub-note .button {
  margin-top: 16px;
}

/*
 * A guide: one column of text. Its body is flat (headings, paragraphs and lists straight under
 * .wrap), so the spacing rules below reach only those and leave the boxes inside alone.
 */
.guide {
  padding-block: 24px 80px;
  line-height: 1.65;
}
.guide .wrap {
  max-width: var(--text);
}
.guide h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
}
.guide .byline {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.guide .lead {
  margin-top: 22px;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}
.guide h2 {
  margin-top: 52px;
  font-size: var(--fs-xl);
  font-weight: 650;
  scroll-margin-top: 20px;
}
.guide h3 {
  margin-top: 30px;
  font-size: var(--fs-lg);
  font-weight: 600;
  scroll-margin-top: 20px;
}
/* :where() keeps these light, so the boxes below and the shared rules after them still apply. */
:where(.guide .wrap) > :is(p, ul, ol) {
  margin-top: 14px;
}
:where(.guide .wrap) > :is(ul, ol),
:where(.guide li) > :is(ul, ol) {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}
:where(.guide li) > :is(ul, ol) {
  gap: 6px;
  margin-top: 8px;
}
:where(.guide) li::marker {
  color: var(--fg-3);
}
:where(.guide .wrap) > ol > li::marker {
  color: var(--accent-on-soft);
  font-weight: 650;
}
.guide :is(b, strong) {
  font-weight: 600;
}
.guide code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--sunk);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
/*
 * Steps to follow on a phone while the Mac is busy (the Recovery guide): one card a step, in
 * larger type, so a reader looking from one screen to the other finds their place again. The
 * list keeps its own numbers, which screen readers announce.
 */
:where(.guide .wrap) > ol.phone-steps {
  gap: 10px;
  margin-top: 16px;
  padding-left: 30px;
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.phone-steps > li {
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.phone-steps > li::marker {
  font-size: var(--fs-md);
}
/* The answer first, for a reader in a hurry (and the summary a search result can quote). */
.short-answer {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border-radius: var(--r-card);
}
.short-answer .label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-on-soft);
}
.short-answer p:not(.label) {
  margin-top: 8px;
}
.short-answer ol,
.short-answer ul {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-left: 22px;
}
.toc {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.toc h2 {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
}
.toc ul {
  margin-top: 10px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.toc li {
  margin-bottom: 7px;
  break-inside: avoid;
}
@media (min-width: 700px) {
  .toc ul {
    columns: 2;
    column-gap: 32px;
  }
}
.toc li a {
  color: var(--fg-2);
  text-decoration-color: var(--line-2);
}
.toc li a:hover {
  color: var(--accent);
  text-decoration-color: currentcolor;
}
.callout {
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  background: var(--sunk);
  font-size: var(--fs-sm);
}
.callout.warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}
/* What the app checks and fixes for the guide's problem. */
.app-box {
  margin-top: 52px;
  padding: clamp(22px, 4vw, 32px);
  background: var(--stage);
  border-radius: var(--r-panel);
}
.app-box h2 {
  margin-top: 0;
}
.app-box p {
  margin-top: 10px;
}
.app-box ul {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}
.app-box li {
  display: flex;
  gap: 10px;
}
.app-box li > svg:first-child {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  color: var(--accent);
}
.app-box .cta {
  margin-top: 22px;
}
.app-box .note {
  width: auto;
}
/*
 * A comparison table with short cells, so it fits a phone without scrolling; the box only
 * guards the page against a word too long to wrap.
 */
.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}
.compare caption {
  padding-bottom: 8px;
  font-weight: 600;
  text-align: left;
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
@media (max-width: 599px) {
  .compare {
    font-size: var(--fs-xs);
  }
}
.compare :is(th, td) {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.compare thead th {
  border-bottom-color: var(--line-2);
  font-weight: 600;
}
.compare tbody th {
  font-weight: 500;
}
.compare td {
  color: var(--fg-2);
}
.guide .faq {
  margin-top: 18px;
}
/* A small print line under the questions, such as a guide's trademark note. */
.aside-note {
  margin-top: 28px;
  font-size: var(--fs-xs);
  color: var(--fg-2);
}
.related {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.related h2 {
  margin-top: 0;
  font-size: var(--fs-lg);
}
.related-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-left: 22px;
}

/* Documents: the privacy policy and the 404 page */
.doc {
  padding-block: 24px 80px;
}
.doc .wrap {
  max-width: var(--text);
}
.doc h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
}
.doc .version {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.doc .intro {
  margin-top: 22px;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}
.doc h2 {
  margin-top: 40px;
  font-size: var(--fs-xl);
  font-weight: 600;
}
.doc ul {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-left: 22px;
}
.doc li::marker {
  color: var(--fg-3);
}
.doc .aside {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.doc.not-found {
  padding-block: 56px 96px;
}
.doc.not-found .lead {
  margin-top: 16px;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}
.doc.not-found .cta {
  margin-top: 28px;
}

/* Motion: none for people who asked for less (the hero's scene shows its end instead). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0s;
  }
  html {
    scroll-behavior: auto;
  }
}
