/* Refreshot site. System fonts, one accent (the app's StudioAccent), light and dark.
   Radius rule: 22px for the stage, 14px for surfaces, 10px for controls and pictures.
   Motion rule: the handle sweeps in once, the what-changed veil fades, the header gains its
   line on scroll, a chosen step's picture fades in, a chosen answer on the support page fades
   in, and an answer to a question slides open where a browser can do that. Nothing else
   moves. */

@property --pos {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 50%;
}

:root {
  color-scheme: light dark;
  --bg: #f6f6f8;
  --surface: #fdfdfe;
  --stage: #262a6b;
  --stage-ink: #f3f4f7;
  --stage-dim: rgb(243 244 247 / 0.6);
  --stage-line: rgb(243 244 247 / 0.16);
  --ink: #15161a;
  --ink-2: #454853;
  --ink-3: #646773;
  --line: rgb(21 22 26 / 0.12);
  --line-strong: rgb(21 22 26 / 0.3);
  --hatch: rgb(21 22 26 / 0.05);
  --accent: #4a4df0;
  --accent-hover: #3d40d6;
  --on-accent: #ffffff;
  --accent-soft: rgb(74 77 240 / 0.07);
  --code-bg: #15161a;
  --code-ink: #e9eaf0;
  --code-dim: #9a9eac;
  --window-shadow: 0 0 0 1px rgb(21 22 26 / 0.1), 0 2px 6px rgb(21 22 26 / 0.06), 0 30px 70px -18px rgb(21 22 40 / 0.3);
  --sheet-shadow: 0 0 0 1px rgb(21 22 26 / 0.1), 0 14px 30px -12px rgb(21 22 40 / 0.24);
  --radius-l: 22px;
  --radius: 14px;
  --radius-s: 10px;
  --gutter: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Dark follows the system's setting, unless the switch in the header chose light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013;
    --surface: #17181c;
    --stage: #17181d;
    --ink: #ecedf1;
    --ink-2: #b9bcc7;
    --ink-3: #9497a3;
    --line: rgb(236 237 241 / 0.13);
    --line-strong: rgb(236 237 241 / 0.34);
    --hatch: rgb(236 237 241 / 0.05);
    --accent: #a3a1ff;
    --accent-hover: #b8b6ff;
    --on-accent: #0f1013;
    --accent-soft: rgb(163 161 255 / 0.09);
    --code-bg: #08090b;
    --window-shadow: 0 0 0 1px rgb(236 237 241 / 0.14), 0 30px 70px -18px rgb(0 0 0 / 0.7);
    --sheet-shadow: 0 0 0 1px rgb(236 237 241 / 0.14), 0 14px 30px -12px rgb(0 0 0 / 0.6);
  }
}

/* A choice made with the switch stands over the system's setting. The dark values are the
   list above once more; the check fails if the two lists differ. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1013;
  --surface: #17181c;
  --stage: #17181d;
  --ink: #ecedf1;
  --ink-2: #b9bcc7;
  --ink-3: #9497a3;
  --line: rgb(236 237 241 / 0.13);
  --line-strong: rgb(236 237 241 / 0.34);
  --hatch: rgb(236 237 241 / 0.05);
  --accent: #a3a1ff;
  --accent-hover: #b8b6ff;
  --on-accent: #0f1013;
  --accent-soft: rgb(163 161 255 / 0.09);
  --code-bg: #08090b;
  --window-shadow: 0 0 0 1px rgb(236 237 241 / 0.14), 0 30px 70px -18px rgb(0 0 0 / 0.7);
  --sheet-shadow: 0 0 0 1px rgb(236 237 241 / 0.14), 0 14px 30px -12px rgb(0 0 0 / 0.6);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  touch-action: manipulation;
}

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

::selection {
  background: rgb(74 77 240 / 0.24);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

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

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Header: stays at the top, with the page showing through softly. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

/* The line under the header appears once the page has moved, where a browser can tie that to scrolling. */
@keyframes header-line {
  to {
    border-bottom-color: var(--line);
  }
}

@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-line linear both;
    animation-timeline: scroll();
    animation-range: 0 64px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 60px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.wordmark__mark {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: none;
  gap: 4px;
  font-size: 0.9375rem;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--ink-2);
  text-decoration: none;
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
    margin-right: -12px;
    margin-left: auto;
  }
}

/* The switch for light and dark, at the header's far end. It shows what a click gives: a moon
   while the page is light, a sun while it is dark. Both are drawn here, from one circle. Its
   script runs before the first paint and writes what is shown onto the root element. Only then
   is the switch there, so the header never moves, and with scripts off it is as it was. */

.theme-switch {
  display: none;
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  margin-right: -10px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
}

:root[data-shown] .theme-switch {
  display: block;
}

.theme-switch:focus-visible {
  border-radius: 50%;
  outline-offset: 0;
}

/* A finger gets 44 px to hit. */
.theme-switch::after {
  content: "";
  position: absolute;
  inset: -4px;
}

/* The moon: what is left of the circle's inside when a second circle is moved up and right. */
.theme-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  margin: auto;
  border-radius: 50%;
  box-shadow: inset 5px -4px 0 0 currentColor;
}

/* The sun: the circle filled and made smaller, with eight copies of it as rays. */
:root[data-shown="dark"] .theme-switch::before {
  width: 8px;
  height: 8px;
  background: currentColor;
  box-shadow:
    0 -8px 0 -2.5px,
    0 8px 0 -2.5px,
    8px 0 0 -2.5px,
    -8px 0 0 -2.5px,
    5.7px 5.7px 0 -2.5px,
    -5.7px 5.7px 0 -2.5px,
    5.7px -5.7px 0 -2.5px,
    -5.7px -5.7px 0 -2.5px;
}

@media (min-width: 860px) {
  .theme-switch {
    margin-left: -8px;
  }
}

/* Hero: the headline and its short text side by side, then the stage across the page. */

.hero {
  padding-top: clamp(28px, 4.4vw, 56px);
  padding-bottom: clamp(56px, 7vw, 104px);
  overflow-x: clip;
}

.hero__top {
  display: grid;
  gap: 22px;
}

h1 {
  font-size: clamp(2.25rem, 1.1rem + 4.9vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.036em;
}

.br-wide {
  display: none;
}

.lede {
  max-width: 40ch;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.1875rem);
  line-height: 1.45;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
}

.hero__status {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.button {
  display: inline-block;
  padding: 0.78em 1.25em;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.button:active {
  background: var(--accent-hover);
}

a:active {
  color: var(--accent-hover);
}

.faq summary:active h3 {
  color: var(--accent);
}

/* Two columns: the headline takes what the side text leaves, and its size follows that room so
   it always stands on two lines. */
@media (min-width: 1100px) {
  .hero__top {
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 44px;
  }

  /* The second line is about 11.7 times the font size wide in San Francisco. */
  h1 {
    font-size: min(4.25rem, calc((100cqi - 404px) / 12.2));
  }

  .br-wide {
    display: inline;
  }

  .hero__side {
    padding-bottom: 6px;
  }
}

/* The stage: one set of store images, and one handle that sweeps across all of them.
   The Before row lies in the page flow. The After row lies exactly over it and shows only
   to the right of the handle, so --pos is a share of the whole stage. The stage is dark in both colour
   schemes, so the pictures stand out the same way in each. */

.demo {
  margin-top: clamp(32px, 4vw, 48px);
}

.stage {
  --h: clamp(400px, 118vw, 480px);
  --pad: 16px;
  --gap: 12px;
  --band: 30px;
  /* Where the handle rests: through the middle of the leading image, 0.462 of --h wide. */
  --rest: calc(var(--pad) + var(--h) * 0.231);
  --pos: var(--rest);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  outline: 1px solid var(--line); /* the stage's edge in the dark scheme; it does not show on the light page */
  outline-offset: -1px;
  background: var(--stage);
  color: var(--stage-ink);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.set {
  display: flex;
  gap: var(--gap);
  padding: calc(var(--pad) + var(--band)) 0 var(--pad) var(--pad);
}

.set-after,
.set-changed {
  position: absolute;
  inset: 0;
}

.set-after {
  clip-path: inset(0 0 0 var(--pos));
}

.set-changed {
  opacity: 0;
  pointer-events: none;
}

.demo:has(#show-changed:checked) .set-changed {
  opacity: 1;
}

.slide {
  display: block;
  flex: none;
  height: var(--h);
  aspect-ratio: 924 / 2000;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: rgb(255 255 255 / 0.06);
}

.slide-wide {
  aspect-ratio: 1500 / 2000;
}

.slide img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-touch-callout: none;
}

/* A narrow screen has room for one image and the edge of the next. It leads with the second
   image, where the screen changes most, and leaves the last two out. */
@media (max-width: 719.98px) {
  .slide-lead {
    order: -1;
  }

  .slide-more {
    display: none;
  }
}

@media (min-width: 720px) {
  .stage {
    --h: clamp(440px, 44vw, 560px);
    --pad: clamp(24px, 3.2vw, 40px);
    --gap: clamp(16px, 2vw, 24px);
    --rest: calc(var(--pad) + var(--gap) + var(--h) * 0.693);
  }
}

.stage__handle {
  position: absolute;
  inset: 0;
  transform: translateX(var(--pos));
  pointer-events: none;
}

.stage__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgb(11 12 16 / 0.3);
}

.stage__tag {
  position: absolute;
  top: calc(var(--pad) / 2 + 5px);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.stage__tag-before {
  right: 100%;
  margin-right: 14px;
  color: var(--stage-dim);
}

.stage__tag-after {
  left: 14px;
}

.stage__knob {
  position: absolute;
  top: clamp(190px, 44%, 300px);
  left: -22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgb(11 12 16 / 0.18), 0 6px 18px rgb(0 0 0 / 0.42);
}

.stage__knob::before,
.stage__knob::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-top: 2px solid #15161a;
  border-left: 2px solid #15161a;
}

.stage__knob::before {
  left: 11px;
  transform: rotate(-45deg);
}

.stage__knob::after {
  right: 11px;
  transform: rotate(135deg);
}

.stage__range {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.stage:has(.stage__range:focus-visible) .stage__knob {
  outline: 3px solid #a3a1ff;
  outline-offset: 3px;
}

.demo__foot {
  display: grid;
  gap: 4px 40px;
  margin-top: 14px;
}

.demo__note {
  max-width: 62ch;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (min-width: 860px) {
  .demo__foot {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .demo__note {
    justify-self: end;
  }
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.switch__track {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--ink-3);
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
}

.switch input:checked + .switch__track {
  background: var(--accent);
}

.switch input:checked + .switch__track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The motions in the hero: the handle sweeps in once on load, and the what-changed veil fades. */

@keyframes stage-intro {
  from {
    --pos: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage:not(.is-live) {
    animation: stage-intro 1500ms var(--ease-in-out) 650ms backwards;
  }

  .set-changed {
    transition: opacity 320ms var(--ease-out);
  }

  .switch__track::after {
    transition: transform 160ms var(--ease-out);
  }
}

/* Sections */

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

h2 {
  max-width: 22ch;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.026em;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.section__intro {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.125rem;
}

/* The problem. The sum is written as a column, one factor to a row, and Refreshot's answer
   stands under the line that closes it. */

.problem {
  padding-top: 0;
}

.problem__in {
  display: grid;
  gap: 40px;
}

.sum {
  border-bottom: 2px solid var(--ink);
  font-size: clamp(2rem, 1.1rem + 3.9vw, 3.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.036em;
}

.sum__row {
  display: grid;
  grid-template-columns: 0.95em auto minmax(0, 1fr);
  align-items: baseline;
  padding-block: clamp(10px, 1.3vw, 16px);
  border-top: 1px solid var(--line);
}

.sum__x {
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 500;
}

.sum__n {
  white-space: nowrap;
}

.sum__w {
  color: var(--ink-3);
  font-weight: 500;
}

.sum__u {
  justify-self: end;
  color: var(--ink-3);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.problem__answer {
  max-width: 30ch;
  margin-top: 22px;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.016em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .problem__in {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(48px, 7vw, 104px);
  }
}

/* How it works. Three steps, each with its picture of the app. As written here, every step
   simply has its picture under it. On a wide screen, further down, the three pictures share
   one place under the steps and a step shows its own when it is chosen. */

.tour {
  margin-top: 40px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.tour__step {
  padding-block: 26px 36px;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

.tour__pick,
.tour__hint {
  display: none;
}

.tour__text::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font: 600 0.9375rem/1.5 var(--mono);
}

.tour__text h3 {
  font-size: 1.375rem;
}

.tour__text p {
  max-width: 60ch;
  margin-top: 10px;
  color: var(--ink-2);
}

.tour__shot {
  display: block;
  margin-top: 24px;
}

/* The radius is the window's own corner, 36 px of 2400 x 1658, so the line follows it. */
.tour__shot img {
  width: 100%;
  height: auto;
  border-radius: 1.5% / 2.171%;
  box-shadow: var(--sheet-shadow);
}

/* Narrow: a whole Mac window would be too small to read anything in. The first step shows the
   near corner of the window, at a size that reads, running off its frame. The other two show
   their sheet alone: the picture element names it for these widths, and the radius here is the
   sheet's own corner, 32 px of 2000 x 1480 and of 1960 x 1240. */
@media (max-width: 899.98px) {
  .tour__shot {
    max-width: 640px;
  }

  .tour__shot-lead {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    padding: 16px 0 0 16px;
    border-radius: var(--radius);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    background: var(--surface);
  }

  .tour__shot-lead img {
    width: 170%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }

  .tour__shot-update img {
    border-radius: 1.6% / 2.162%;
  }

  .tour__shot-check img {
    border-radius: 1.633% / 2.581%;
  }
}

/* Wide: the steps stand in a row, like tabs, over one window. Each step holds a radio button,
   so the choice needs no script: a click or the arrow keys choose a step, and :has() shows its
   picture. The pictures are placed over the row's last cell, which has the window's shape and
   carries its shadow, so the shadow stays still while the pictures change. Without :has() the
   plain list above stands. */
@media (min-width: 900px) {
  @supports selector(:has(*)) {
    .tour {
      position: relative;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      column-gap: clamp(24px, 3vw, 40px);
    }

    .tour::after {
      content: "";
      grid-column: 1 / -1;
      aspect-ratio: 2400 / 1658;
      margin-top: clamp(36px, 4.4vw, 56px);
      border-radius: 1.5% / 2.171%;
      box-shadow: var(--window-shadow);
    }

    .tour__step {
      padding-block: 0 22px;
      border-top: 0;
      border-bottom: 2px solid var(--line);
    }

    .tour__step:has(.tour__pick:checked) {
      border-bottom-color: var(--accent);
    }

    .tour__pick {
      position: absolute;
      display: block;
      width: 1px;
      height: 1px;
      margin: 0;
      opacity: 0;
      pointer-events: none;
    }

    .tour__hint {
      display: inline;
    }

    .tour__text {
      position: relative;
      height: 100%;
    }

    .tour__text::before {
      color: var(--ink-3);
    }

    .tour__step:has(.tour__pick:checked) .tour__text::before {
      color: var(--accent);
    }

    /* The whole step is the radio button's label. */
    .tour__text label::after {
      content: "";
      position: absolute;
      inset: -8px -8px -22px;
      cursor: pointer;
    }

    .tour__step:has(.tour__pick:focus-visible) .tour__text {
      border-radius: 4px;
      outline: 2px solid var(--accent);
      outline-offset: 8px;
    }

    .tour__shot {
      position: absolute;
      inset: auto 0 0;
      margin: 0;
      opacity: 0;
    }

    .tour__shot img {
      box-shadow: none;
    }

    .tour__step:has(.tour__pick:checked) .tour__shot {
      z-index: 1;
      opacity: 1;
    }

    @media (hover: hover) {
      .tour__step:hover:not(:has(.tour__pick:checked)) {
        border-bottom-color: var(--line-strong);
      }
    }

    /* The chosen picture fades in over the one before it, which stays until it is covered. */
    @media (prefers-reduced-motion: no-preference) {
      .tour__step {
        transition: border-color 160ms var(--ease-out);
      }

      .tour__shot {
        transition: opacity 0s 280ms;
      }

      .tour__step:has(.tour__pick:checked) .tour__shot {
        transition: opacity 280ms var(--ease-out);
      }
    }
  }
}

/* What it does. Seven claims in four bands, each with one real picture and no card around it.
   As written here the claims stand under each other. On a wide screen, further down, a band is
   a row of twelve columns, and the pictures in a band share one height so the texts under them
   start on one line. */

.does {
  --does-gap: clamp(24px, 3vw, 40px);
  display: grid;
  gap: clamp(56px, 7.4vw, 104px);
  margin-top: clamp(36px, 4.4vw, 56px);
}

.band {
  display: grid;
  gap: 56px;
}

.feat {
  min-width: 0;
}

.feat h3 {
  margin-top: 22px;
  font-size: 1.375rem;
}

.feat p {
  max-width: 46ch;
  margin-top: 10px;
  color: var(--ink-2);
}

.shot {
  display: block;
}

.shot img,
.pair img,
.trio img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-s);
}

/* Before and after, side by side: the hero's own fourth pair. */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.pair figcaption {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* A corner of the app at about its true size, on a tinted ground. The picture is as wide as its
   frame and stands a little in from the corner it shows (18 px on a wide screen), so it runs
   off the two far edges. The radius is the corner of the window or sheet itself (36 px of
   1300 x 812, 32 px of 1100 x 900), so the line around it follows that corner. */
.corner {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--bg);
}

.corner img {
  width: 100%;
  height: auto;
  box-shadow: var(--sheet-shadow);
}

.corner-window {
  aspect-ratio: 1300 / 812;
}

.corner-window img {
  border-bottom-left-radius: 2.77% 4.43%;
  transform: translate(3%, -4.8%);
}

.corner-sheet {
  aspect-ratio: 1100 / 900;
}

.corner-sheet img {
  border-top-left-radius: 2.91% 3.56%;
  transform: translate(3.8%, 4.6%);
}

/* Three languages: a strip that scrolls sideways, one image and the edge of the next, running
   off the right edge of the screen. Wide screens show all three. */
.trio {
  display: grid;
  grid-auto-columns: 62%;
  grid-auto-flow: column;
  gap: 12px;
  margin-right: calc(var(--gutter) * -1);
  padding-right: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.trio picture {
  scroll-snap-align: start;
}

/* The still under the video is an ordinary lazy picture, so nothing of the video is fetched
   before a visitor presses play. The video lies over it with a fully transparent poster
   (clear-portrait.png), so the still shows through until the video plays. Without a poster a
   browser draws its own dark one. */
.loop {
  position: relative;
  overflow: hidden;
  max-width: 260px;
  aspect-ratio: 616 / 1334;
  border-radius: var(--radius-s);
  background: var(--surface);
}

.loop__poster,
.loop__poster img {
  display: block;
  width: 100%;
  height: auto;
}

.loop video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.terminal {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sentences wrap as they would in a terminal window. The table rows keep their columns, and the
   block scrolls sideways when a row is wider than it is. */
.terminal pre {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  font: 0.78125rem/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-x: auto;
}

.terminal pre:focus-visible {
  border-radius: var(--radius);
}

.terminal__row {
  white-space: pre;
}

.terminal code {
  font-size: inherit;
}

.terminal__prompt {
  color: var(--code-dim);
  user-select: none;
  -webkit-user-select: none;
}

.terminal figcaption {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

@media (min-width: 900px) {
  .band {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 var(--does-gap);
  }

  /* Picture, heading and text of the claims in a band stand in the band's own three rows. */
  .feat {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
  }

  .feat > :first-child {
    align-self: start;
  }

  .feat-release,
  .feat-look {
    grid-column: span 6;
  }

  .feat-languages {
    grid-column: span 9;
  }

  .feat-video {
    grid-column: span 3;
  }

  .feat-check {
    grid-column: span 5;
  }

  .feat-cli {
    grid-column: span 7;
  }

  /* The first claim stands alone: its text beside its two pictures. */
  .feat-fit {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: none;
    column-gap: var(--does-gap);
  }

  .feat-fit .feat__text {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    padding-bottom: 30px;
  }

  .feat-fit .pair {
    grid-column: 2;
    grid-row: 1;
  }

  .feat-fit h3 {
    max-width: 16ch;
    margin-top: 0;
    font-size: clamp(1.625rem, 1.1rem + 1.3vw, 2rem);
    line-height: 1.12;
    letter-spacing: -0.022em;
  }

  .feat-fit p {
    margin-top: 14px;
  }

  .loop {
    max-width: none;
  }

  /* The terminal block is as tall as the picture beside it. */
  .feat-cli .terminal {
    align-self: stretch;
  }
}

/* From 560 px the three languages stand side by side. */
@media (min-width: 560px) {
  .trio {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--does-gap);
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
  }
}

/* From 560 to 1100 px the video has its text beside it, not under it. */
@media (min-width: 560px) and (max-width: 1099.98px) {
  .feat-video {
    display: grid;
    grid-template-columns: clamp(180px, 26%, 260px) minmax(0, 1fr);
    grid-template-rows: 1fr auto 1fr;
    column-gap: var(--does-gap);
  }

  .feat-video .loop {
    grid-row: 1 / -1;
  }

  .feat-video h3 {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }

  .feat-video p {
    grid-column: 2;
    grid-row: 3;
  }
}

/* Between 900 and 1100 px a quarter of the row is too narrow to read in. The three languages
   take the whole row there, and the video stands under them. */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .feat-languages,
  .feat-video {
    grid-column: 1 / -1;
  }

  .feat-video {
    grid-row: auto;
    margin-top: 56px;
  }
}

@supports (grid-template-columns: subgrid) {
  @media (min-width: 900px) {
    .feat-fit {
      grid-template-columns: subgrid;
    }

    .feat-fit .feat__text {
      grid-column: 1 / span 5;
    }

    .feat-fit .pair {
      grid-column: 6 / -1;
    }
  }
}

/* Privacy and security. One dark panel, the hero's stage again, dark in both colour schemes.
   Three tiers stand in it: the heading, the four things that do not happen in large type, and
   under one line the four that do. */

.privacy {
  padding: clamp(22px, 5.4vw, 72px);
  border-radius: var(--radius-l);
  outline: 1px solid var(--line); /* its edge in the dark scheme, as on the stage */
  outline-offset: -1px;
  background: var(--stage);
  color: var(--stage-ink);
}

.privacy .section__intro {
  color: var(--stage-dim);
}

.facts {
  display: grid;
  gap: 28px 40px;
  margin-top: clamp(40px, 6vw, 72px);
}

.fact dd {
  margin-top: 6px;
  color: var(--stage-dim);
  font-size: 1rem;
}

.facts-no {
  row-gap: clamp(28px, 4vw, 48px);
}

.facts-no dt {
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.125rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.facts-no dd {
  max-width: 38ch;
  margin-top: 10px;
}

.facts-yes {
  padding-top: clamp(28px, 3.4vw, 40px);
  border-top: 1px solid var(--stage-line);
}

.facts-yes dt {
  font-weight: 650;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .privacy__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
  }

  .facts-yes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Free and Pro. Three columns under three rules: what is free, what Pro adds, and what Pro
   never does. There are no prices: the App Store shows them. */

.plans {
  display: grid;
  gap: 48px;
  margin-top: clamp(36px, 4.4vw, 56px);
}

.plan {
  padding-top: 20px;
  border-top: 2px solid var(--line-strong);
}

.plan-pro {
  border-top-color: var(--accent);
}

.plan-never {
  border-top-color: var(--line);
}

.plan h3 {
  font-size: 1.625rem;
  letter-spacing: -0.02em;
}

.plan-pro h3 {
  color: var(--accent);
}

.plan__price {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 1rem;
}

.plan ul {
  display: grid;
  align-content: start;
  gap: 12px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 28px;
}

.plan li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 4px;
  width: 11px;
  height: 6px;
  border-bottom: 2px solid var(--ink-3);
  border-left: 2px solid var(--ink-3);
  transform: rotate(-45deg);
}

.plan-pro li::before {
  border-color: var(--accent);
}

.plan__body {
  display: grid;
  align-content: start;
  gap: 12px;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 1rem;
}

.plan__body p {
  max-width: 60ch;
}

/* Two columns, with what Pro never does across both: its heading under Free, its text under Pro.
   Headings, price lines and lists stand in the grid's own three rows, so the two lists start on
   one line however many lines a price line takes. Without subgrid, the price lines keep room for
   two lines each. */
@media (min-width: 700px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(32px, 4vw, 56px);
  }

  .plan {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
  }

  .plan__price {
    min-height: 3.1em;
  }

  .plan-never {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    column-gap: clamp(32px, 4vw, 56px);
    margin-top: 56px;
  }

  .plan-never .plan__body {
    margin-top: 0;
  }
}

/* Three columns. The third stands in the same three rows, so its text starts beside the price
   lines. */
@media (min-width: 1100px) {
  .plans {
    grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr);
  }

  .plan-never {
    grid-column: auto;
    grid-row: span 3;
    grid-template-columns: none;
    grid-template-rows: subgrid;
    margin-top: 0;
  }

  .plan-never .plan__body {
    grid-row: span 2;
    margin-top: 8px;
  }
}

/* Questions. A grouped list, as in a Mac's settings: one surface, its rows parted by a line that
   stops short of the edges. Each row is a details element, so it opens without a script. */

.asks {
  display: grid;
  gap: 28px;
}

.faq {
  border-radius: var(--radius);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  background: var(--surface);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details + details summary::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  border-top: 1px solid var(--line);
}

.faq summary:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius-s);
}

.faq summary h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg);
}

.faq details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.faq p {
  max-width: 68ch;
  padding: 0 20px 22px;
  color: var(--ink-2);
}

/* An answer slides open, where a browser can animate to a height it has not been told. */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    .faq details {
      interpolate-size: allow-keywords;
    }

    .faq details::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 220ms var(--ease-out), content-visibility 220ms allow-discrete;
    }

    .faq details[open]::details-content {
      block-size: auto;
    }

    .faq summary::after {
      transition: transform 220ms var(--ease-out);
    }
  }
}

@media (min-width: 900px) {
  .asks {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
    column-gap: clamp(24px, 3vw, 40px);
  }

  /* The heading stays in view while a long answer is read. */
  .asks h2 {
    position: sticky;
    top: 96px;
  }

  .faq summary {
    padding: 20px 24px;
  }

  .faq details + details summary::before {
    right: 24px;
    left: 24px;
  }

  .faq p {
    padding: 0 24px 24px;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.site-footer__in {
  display: grid;
  gap: 28px;
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
}

.site-footer__name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.site-footer__about p + p {
  max-width: 44ch;
  margin-top: 12px;
}

.site-footer__links {
  display: grid;
  justify-items: start;
}

.site-footer__links a,
.site-footer__links > span {
  display: inline-block;
  padding-block: 7px;
}

/* "Analytics settings": a button, because it opens the bar below and leads nowhere, drawn as
   the links beside it. It is there only once the script has written an answer, or that there
   is none yet, onto the root element. */
.site-footer__settings {
  display: none;
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
  touch-action: manipulation;
}

:root[data-analytics] .site-footer__settings {
  display: inline-block;
}

.site-footer__settings:active {
  color: var(--accent-hover);
}

/* The question about analytics: a sheet fixed to the foot of the window, over the page, so it
   moves nothing. It is there only while the root element says so: on a first visit until it is
   answered, and again from "Analytics settings". The script writes that before the first
   paint, so the sheet does not arrive late. The two answers look the same, so neither is the
   easier one to give. */

.consent {
  display: none;
  position: fixed;
  z-index: 20;
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  gap: 14px 28px;
  max-width: 780px;
  margin-inline: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--sheet-shadow);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

:root[data-bar] .consent {
  display: grid;
}

/* While the sheet is open the page has room under its footer, so the sheet never hides the
   footer's last lines for good. */
:root[data-bar] .site-footer__in {
  padding-bottom: 310px;
}

@media (min-width: 720px) {
  :root[data-bar] .site-footer__in {
    padding-bottom: 170px;
  }
}

.consent__title {
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 650;
}

.consent__title:focus-visible {
  outline-offset: 4px;
}

.consent__now {
  margin-top: 6px;
  color: var(--ink);
}

.consent__answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 10px;
}

.consent__answer {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.consent__answer:active {
  background: var(--accent-soft);
}

@media (min-width: 720px) {
  .consent {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px 20px 18px 22px;
  }

  .consent__answers {
    grid-template-columns: repeat(2, auto);
  }

  .consent__answer {
    padding: 0 16px;
  }
}

.site-footer__small {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

@media (min-width: 860px) {
  .site-footer__in {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 64px;
  }

  .site-footer__small {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
}

/* Text pages: press, privacy, terms, not found. One layout for the first three: a section's
   heading stands in the left column and its text in the right, on the start page's columns.
   As written here, for a narrow screen, the heading stands over its text. */

.page {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(64px, 9vw, 120px);
}

.page h1 {
  font-size: clamp(2.125rem, 1.6rem + 2vw, 2.75rem);
}

.row + .row {
  margin-top: clamp(40px, 5vw, 64px);
}

.row-head {
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line-strong);
}

.row h2 {
  max-width: none;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.row__body,
.row__after {
  margin-top: 14px;
}

.prose {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: 16px;
}

.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
}

.meta {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

/* Press: the one sentence, set to be quoted. */
.press-line {
  max-width: 34ch;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Press: the facts, a name and its value to a row. */
.specs {
  display: grid;
  gap: 14px;
}

.specs dt {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.specs dd {
  max-width: 56ch;
}

.prose .swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.swatch::before {
  content: "";
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.swatch-light::before {
  background: #4a4df0;
}

.swatch-dark::before {
  background: #a3a1ff;
}

.press-icon {
  width: 128px;
  height: 128px;
}

/* Press: the app's window at four moments of one release, numbered in that order. The radius
   is the window's own corner, 36 px of 3000 x 1798, so the line around it follows that corner. */
.press-shots {
  display: grid;
  gap: 32px clamp(24px, 3vw, 40px);
  margin-top: 28px;
  padding: 0;
  list-style: none;
  counter-reset: shot;
}

.press-shots li {
  counter-increment: shot;
}

.press-shots img {
  width: 100%;
  height: auto;
  border-radius: 1.2% / 2.002%;
  box-shadow: var(--sheet-shadow);
}

.press-shots figcaption {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.press-shots figcaption::before {
  content: counter(shot);
  margin-right: 10px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* Not found */
.page-lost {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  min-height: min(64svh, 600px);
}

.page-lost h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
}

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

.page-lost .page__code {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.9375rem;
}

@media (min-width: 560px) {
  .specs > div {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    align-items: baseline;
    column-gap: 16px;
  }
}

/* Two columns. A heading and the first line of its text stand on one line, and the heading
   stays in view while its section is read. */
@media (min-width: 900px) {
  .row {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: baseline;
    column-gap: clamp(24px, 3vw, 40px);
  }

  .row > h2 {
    position: sticky;
    top: 88px;
  }

  .row__body,
  .row__after {
    grid-column: 2;
    margin-top: 0;
  }

  /* The title stands on the last line of what is beside it, as the headline does on the start page. */
  .row-head {
    align-items: end;
    align-items: last baseline;
  }

  /* The pictures run across both columns, so this heading does not follow them down. */
  .row-wide > h2 {
    position: static;
  }

  .press-shots {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 36px;
  }

  .row__after {
    margin-top: 36px;
  }
}

/* Support. Five topics and their answers. As written here they stand under each other, each
   topic over its answer: that is what a browser without :has() shows. With :has(), further
   down, the topics become a list to choose from, like a sidebar on a Mac, and the chosen
   answer stands beside it, or under it on a narrow screen. Each topic holds a radio button,
   so a click or the arrow keys choose and no script is needed. On a wide screen all five
   answers lie in one cell of the grid, so the cell is as tall as the longest and nothing
   below it moves when the choice changes. The idea (choose a topic, get one written answer, with one place to
   write underneath) is from "Answer Router FAQ" on 21st.dev. None of its code is here. */

.help {
  margin-top: clamp(40px, 5vw, 64px);
}

.help > h2,
.reach h2 {
  max-width: none;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.help__hint,
.help__pick {
  display: none;
}

.help__list {
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.help__item {
  padding-block: 22px 30px;
  border-top: 1px solid var(--line);
}

.help__topic {
  font-size: 1.125rem;
  font-weight: 600;
}

.help__answer {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--ink-2);
}

.help__answer > * + * {
  margin-top: 14px;
}

.help__answer ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
  list-style: disc;
}

.help__lead {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.014em;
  text-wrap: balance;
}

@supports selector(:has(*)) {
  .help__hint {
    display: block;
    margin-top: 6px;
    color: var(--ink-3);
    font-size: 0.9375rem;
  }

  .help__list {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, auto) auto;
  }

  /* The surface behind the five topics. */
  .help__list::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 5;
    border-radius: var(--radius);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    background: var(--surface);
  }

  .help__item {
    display: contents;
  }

  .help__pick {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  .help__topic {
    position: relative;
    z-index: 0;
    grid-column: 1;
    padding: 13px 20px;
    font-size: 1.0625rem;
    user-select: none;
    -webkit-user-select: none;
  }

  .help__item:nth-child(1) .help__topic {
    grid-row: 1;
    margin-top: 6px;
  }

  .help__item:nth-child(2) .help__topic {
    grid-row: 2;
  }

  .help__item:nth-child(3) .help__topic {
    grid-row: 3;
  }

  .help__item:nth-child(4) .help__topic {
    grid-row: 4;
  }

  .help__item:nth-child(5) .help__topic {
    grid-row: 5;
    margin-bottom: 6px;
  }

  /* The chosen topic's highlight, as in a sidebar. Twice the soft accent, so it reads as chosen. */
  .help__topic::before {
    content: "";
    position: absolute;
    inset: 1px 6px;
    z-index: -1;
    border-radius: var(--radius-s);
  }

  .help__item:has(.help__pick:checked) .help__topic {
    color: var(--accent);
  }

  .help__item:has(.help__pick:checked) .help__topic::before {
    background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--accent-soft);
  }

  .help__item:has(.help__pick:focus-visible) .help__topic::before {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  /* The whole row is the radio button's label. */
  .help__topic label::after {
    content: "";
    position: absolute;
    inset: 0;
    cursor: pointer;
  }

  /* Narrow: only the chosen answer takes room, under the list. */
  .help__answer {
    display: none;
    grid-column: 1;
    grid-row: 6;
    margin-top: 28px;
  }

  .help__item:has(.help__pick:checked) .help__answer {
    display: block;
  }

  @media (min-width: 900px) {
    .help__list {
      grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
      grid-template-rows: repeat(5, auto) 1fr;
      column-gap: clamp(24px, 3vw, 40px);
    }

    /* Wide: all five lie in the one cell beside the list, and the chosen one fades in. */
    .help__answer {
      display: block;
      grid-column: 2;
      grid-row: 1 / -1;
      margin-top: 0;
      padding-top: 14px;
      visibility: hidden;
      opacity: 0;
    }

    .help__item:has(.help__pick:checked) .help__answer {
      visibility: visible;
      opacity: 1;
    }

    @media (prefers-reduced-motion: no-preference) {
      .help__item:has(.help__pick:checked) .help__answer {
        transition: opacity 220ms var(--ease-out);
      }
    }
  }
}

/* The place to write, on the tinted ground. On a wide screen its address starts on the same
   line as the answers above: the first column is the page's own, less the panel's padding. */
.reach {
  --reach-pad: clamp(24px, 4vw, 48px);
  --reach-gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 5vw, 64px);
  padding: var(--reach-pad);
  border-radius: var(--radius-l);
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--bg);
}

.reach__body {
  margin-top: 12px;
}

.reach__mail {
  font-size: clamp(1.375rem, 1.05rem + 1.6vw, 2.125rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.024em;
  overflow-wrap: anywhere;
}

.reach__mail a {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.reach__note {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .reach {
    display: grid;
    grid-template-columns: calc((100% + 2 * var(--reach-pad) - var(--reach-gap)) / 3 - var(--reach-pad)) minmax(0, 1fr);
    align-items: baseline;
    column-gap: var(--reach-gap);
  }

  .reach__body {
    margin-top: 0;
  }
}

/* Hover only where there is a pointer that can hover */

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--accent-hover);
  }

  .site-nav a:hover,
  .wordmark:hover,
  .theme-switch:hover {
    color: var(--accent);
  }

  a:hover,
  .site-footer__settings:hover {
    text-decoration-thickness: 2px;
  }

  .consent__answer:hover {
    border-color: var(--ink);
  }

  .faq summary:hover h3 {
    color: var(--accent);
  }

  .help__item:not(:has(.help__pick:checked)) .help__topic:hover::before {
    background: var(--line);
  }
}
