/* RingMeFor site. One face, three grounds: quiet (#F2F2F7), ringing (indigo) and night (black).
   Weight is volume: nothing is heavier than 450 unless it rings (the wordmark is exempt).
   Dark mode follows the iPhone app's dark lists: a black ground with #1C1C1E slabs, so the whole
   page becomes night and the indigo still rings. The page follows the system setting unless the
   visitor picks Light or Dark (theme.js), which sets data-theme on <html>. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --indigo: #635bff;
  --ground: #f2f2f7;
  --slab: #ffffff;
  --ink: #000000;
  --muted: #636366;
  --slab-on-indigo: #4540b2;
  --on-indigo-quiet: rgba(255, 255, 255, 0.7);
  --night: #000000;
  --night-muted: #a1a1a6;
  --on-ink: #ffffff;
  --indigo-text: #635bff;
  --hairline: rgba(60, 60, 67, 0.14);
  --underline-muted: rgba(99, 99, 102, 0.45);
  --field-tint: rgba(99, 91, 255, 0.1);
  /* The drawn arrows in "How it works" are black SVGs; dark mode turns them white. */
  --arrow-filter: none;

  --face: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5.6vw, 80px);
  --measure: 1280px;

  --t-note: 15px;
  --t-ui: 16px;
  --t-body: 19px;
  --t-lead: 24px;
  --t-h2: 56px;
  --t-log-ring: 30px;
  --t-slab: 17px;
  --t-slab-ring: 21px;

  /* The first screen's sentence: 140 px at 1440, 60 px on a phone. */
  --s: clamp(60px, 9.72vw, 140px);
  --s-lh: 0.95;
  --s-lines: 2;

  color-scheme: light;
}

/* Dark: the system's setting, unless the visitor picked Light; or the visitor picked Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #000000;
    --slab: #1c1c1e;
    --ink: #ffffff;
    --muted: #98989f;
    --on-ink: #000000;
    --indigo-text: #8f8aff;
    --hairline: rgba(235, 235, 245, 0.16);
    --underline-muted: rgba(152, 152, 159, 0.5);
    --field-tint: rgba(143, 138, 255, 0.18);
    --arrow-filter: invert(1);
    color-scheme: dark;
}
}
:root[data-theme="dark"] {
  --ground: #000000;
  --slab: #1c1c1e;
  --ink: #ffffff;
  --muted: #98989f;
  --on-ink: #000000;
  --indigo-text: #8f8aff;
  --hairline: rgba(235, 235, 245, 0.16);
  --underline-muted: rgba(152, 152, 159, 0.5);
  --field-tint: rgba(143, 138, 255, 0.18);
  --arrow-filter: invert(1);
  color-scheme: dark;
}

@media (max-width: 720px) {
  :root {
    --t-note: 14px;
    --t-ui: 14px;
    --t-body: 17px;
    --t-lead: 20px;
    --t-h2: 36px;
    --t-log-ring: 22px;
    --t-slab: 16px;
    --t-slab-ring: 19px;
  }
}

@media (max-width: 600px) {
  :root { --s-lines: 3; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--face);
  font-size: var(--t-body);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.5;
  font-kerning: normal;
  overflow-x: clip;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

time, .tabular { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}

.wordmark {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  gap: 28px;
  font-size: var(--t-ui);
  font-weight: 450;
  white-space: nowrap;
}

.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.site-header nav { margin-left: auto; }

/* Light and dark (theme.js). Both controls need JavaScript, so they show only with it. The
   button shows the mode it switches to: a moon in light, a sun in dark. */
.theme-toggle,
.appearance { display: none; }
.js .theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 -11px 0 -6px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  color: inherit;
  cursor: pointer;
}
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .icon-sun,
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle:hover { background: var(--hairline); }

.js .appearance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-inline-size: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.appearance legend { float: left; padding: 0; margin-right: 14px; color: var(--muted); font-size: var(--t-ui); }
.appearance .segment {
  display: inline-flex;
  padding: 4px;
  border-radius: 22px;
  background: var(--slab);
  font-size: var(--t-ui);
  color: var(--ink);
}
.appearance label { position: relative; display: block; }
.appearance input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.appearance label span {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 18px;
}
.appearance input:checked + span { background: var(--ink); color: var(--on-ink); }
.appearance input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 2px; }

/* Phones: the links fold into Menu, which opens them as a list under the header, each a full
   44-point row. Without JavaScript they wrap onto a second line instead. */
.menu-toggle { display: none; }

@media (max-width: 600px) {
  .site-header { position: relative; height: 56px; gap: 12px; }
  .wordmark { font-size: 17px; }
  .site-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; font-stretch: 78%; }
  .js .theme-toggle { margin: 0 -12px 0 -4px; }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    height: 44px;
    margin-left: auto;
    padding: 0 12px;
    border: 0;
    border-radius: 22px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--t-ui);
    font-weight: 450;
    cursor: pointer;
  }
  .js .menu-toggle:hover { background: var(--hairline); }
  .js .menu-toggle[aria-expanded="true"] { background: var(--ink); color: var(--ground); }

  .js .site-header nav {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 6px var(--gutter) 18px;
    background: var(--ground);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.35);
    font-size: 28px;
    font-weight: 300;
    font-stretch: 100%;
    letter-spacing: -0.01em;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 220ms;
  }
  .js .site-header.is-open nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
  }
  .js .site-header nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0;
    background: none;
    border-bottom: 1px solid var(--hairline);
  }
  .js .site-header nav a:last-child { border-bottom: 0; }
  .js .site-header nav a[aria-current="page"] { font-weight: 600; }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .js .site-header nav, .js .site-header.is-open nav { transform: none; transition: none; }
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 22px;
  font: inherit;
  font-size: var(--t-ui);
  font-weight: 450;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  color: var(--on-ink);
}

.button.label { cursor: default; }

/* ---------- First screen ---------- */

.first {
  background: var(--ground);
  color: var(--ink);
  transition: background-color 120ms linear, color 120ms linear;
}

.first-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-top: clamp(16px, 2.8vw, 40px);
  padding-bottom: clamp(48px, 4.4vw, 64px);
}

.sentence-box {
  grid-column: 1 / -1;
  height: calc(var(--s) * var(--s-lh) * var(--s-lines));
  margin-bottom: clamp(28px, 3.4vw, 48px);
}

.sentence {
  font-size: var(--s);
  line-height: var(--s-lh);
  font-weight: 250;
  font-stretch: 100%;
  letter-spacing: -0.025em;
}

.sentence label { display: block; cursor: text; }

.word-field { white-space: nowrap; }
.field-wrap { position: relative; display: inline-block; }
.field-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.065em;
  bottom: -0.09em;
  height: 0.045em;
  background: currentColor;
}

.sentence input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  margin: -0.08em 0 -0.07em;
  padding: 0;
  height: 1.1em;
  line-height: 1;
  width: 2.86em; /* "outage" before the script measures it */
  caret-color: var(--indigo);
  vertical-align: baseline;
}

.sentence input:focus { outline: none; }
.sentence input:focus-visible { outline: 3px solid var(--indigo); outline-offset: 0.08em; }

.caret {
  display: inline-block;
  width: 0.035em;
  height: 0.8em;
  margin-left: 0.03em;
  background: currentColor;
  vertical-align: -0.02em;
}

.word-field:focus-within .caret { visibility: hidden; }

.word-ring { white-space: normal; }

.measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  left: -9999px;
  top: 0;
}

.demo { grid-column: 1 / span 6; position: relative; }

.pitch {
  grid-column: 8 / span 5;
  align-self: start;
  max-width: 30em;
}

.pitch p + p { margin-top: 24px; }
.pitch .small { margin-top: 14px; font-size: var(--t-note); }

@media (max-width: 900px) {
  .demo, .pitch { grid-column: 1 / -1; }
  .pitch { margin-top: 32px; }
}

/* The stack: room for three quiet slabs and one that rings, so nothing below moves. */

.stack {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: calc(3 * 70px + 112px + 3 * 8px);
  isolation: isolate;
}

@media (max-width: 600px) {
  .stack { min-height: calc(3 * 68px + 124px + 3 * 8px); }
}

.slab {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas: "tile app note" "tile msg msg";
  column-gap: 12px;
  row-gap: 2px;
  align-items: start;
  padding: 13px 16px 14px 14px;
  border-radius: 20px;
  background: var(--slab);
  color: var(--ink);
}

.slab .tile {
  grid-area: tile;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ground);
  font-size: 15px;
  font-weight: 450;
  line-height: 1;
}

.slab .app { grid-area: app; font-size: var(--t-note); line-height: 1.35; padding-top: 1px; }
.slab .note { grid-area: note; font-size: var(--t-note); line-height: 1.35; color: var(--muted); padding-top: 1px; white-space: nowrap; }
.slab .msg { grid-area: msg; font-size: var(--t-slab); line-height: 1.3; color: var(--muted); }

/* A slab that rings on the quiet ground (without the script, and in the Rulebook): indigo. */
.slab.ringing {
  background: var(--indigo);
  color: #fff;
}
.slab.ringing .tile { background: #000; color: #fff; }
.slab.ringing .msg {
  color: #fff;
  font-size: var(--t-slab-ring);
  line-height: 1.15;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  padding-top: 3px;
}
.slab.ringing::before {
  content: "";
  position: absolute;
  inset: -10px -6px;
  z-index: -1;
  border-radius: 30px;
  background: rgba(99, 91, 255, 0.55);
  filter: blur(22px);
}

/* Ringing: the whole first screen. */
.first[data-state="ringing"] {
  background: var(--indigo);
  color: #fff;
}
.first[data-state="ringing"] .sentence {
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}
.first[data-state="ringing"] .slab { background: var(--slab-on-indigo); color: var(--on-indigo-quiet); }
.first[data-state="ringing"] .slab .tile { background: rgba(0, 0, 0, 0.12); color: var(--on-indigo-quiet); }
.first[data-state="ringing"] .slab .note,
.first[data-state="ringing"] .slab .msg { color: var(--on-indigo-quiet); }
.first[data-state="ringing"] .slab.ringing { background: var(--slab); color: var(--ink); }
.first[data-state="ringing"] .slab.ringing .tile { background: #000; color: #fff; }
.first[data-state="ringing"] .slab.ringing .msg { color: var(--ink); }
.first[data-state="ringing"] .slab.ringing::before {
  background: rgba(214, 211, 255, 0.75);
  animation: halo 1.1s ease-in-out infinite alternate;
}
.first[data-state="ringing"] .button { background: #fff; color: #000; }
.first[data-state="ringing"] .button.secondary { background: var(--slab-on-indigo); color: #fff; }
.first[data-state="ringing"] :focus-visible { outline-color: #fff; }

@keyframes halo {
  from { opacity: 0.55; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1.03); }
}

/* Slabs arriving, with the script. */
.js .slab.static { display: none; }
.js .stack .slab { opacity: 0; transform: translateY(-10px); transition: opacity 220ms ease-out, transform 220ms ease-out; }
.js .stack .slab.in { opacity: 1; transform: none; }

/* The row under the stack: Stop, Snooze and Hear it while it rings; a line after Stop. */
.alarm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 16px;
}
.alarm-row[hidden] { display: flex; visibility: hidden; }
.alarm-row .button[hidden] { display: none; }
.invite { font-size: var(--t-note); max-width: 34em; }
.invite:focus { outline: none; }
.button.secondary { background: var(--ink); color: var(--on-ink); }
.button svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 600px) {
  .alarm-row { min-height: 48px; align-content: flex-start; }
}

/* ---------- Sections on the quiet ground ---------- */

.section { padding-top: clamp(96px, 11vw, 160px); }

.section h2 {
  font-size: var(--t-h2);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  margin-top: 20px;
  max-width: 42em;
  font-size: var(--t-lead);
  font-weight: 350;
  line-height: 1.35;
}

.mark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px 2px;
  border: 1px solid currentColor;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.3;
  vertical-align: 0.12em;
  white-space: nowrap;
}

/* ---------- Show me a day ---------- */

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

.log li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: baseline;
  max-width: 1000px;
}

.log .quiet,
.log .run {
  color: var(--muted);
  font-weight: 300;
  padding: 10px 0;
}
.log .quiet .what { font-size: var(--t-note); font-weight: 400; text-align: right; }
.log .run span { grid-column: 2; font-size: var(--t-note); font-weight: 400; }
.log .quiet .app { font-weight: 400; margin-right: 0.5em; }

.log .rang,
.night-log .ring {
  grid-template-areas: ". app" "time msg" ". rule";
  grid-template-columns: 7rem minmax(0, 1fr);
  padding: 28px 0 30px;
  color: var(--ink);
}
.log .rang time, .night-log .ring time { grid-area: time; }
.log .rang .app, .night-log .ring .app { grid-area: app; }
.log .rang .msg, .night-log .ring .msg { grid-area: msg; }
.log .rang .rule, .night-log .ring .rule { grid-area: rule; }
.log .rang time,
.log .rang .msg {
  color: var(--indigo-text);
  font-size: var(--t-log-ring);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.log .rang .app { font-size: var(--t-note); margin-bottom: 4px; }
.log .rang .rule { margin-top: 10px; max-width: 40em; }

/* The 03:40 ring: the page's only black panel, edge to edge, with the glow rising from the bottom. */
.log .night {
  display: block;
  max-width: none;
  margin: 40px calc(50% - 50vw) 0;
  padding: clamp(64px, 7vw, 96px) 0 0;
  background:
    radial-gradient(ellipse 70% 80% at 74% 118%, rgba(99, 91, 255, 1) 0%, rgba(99, 91, 255, 0.5) 36%, rgba(99, 91, 255, 0) 72%),
    var(--night);
  color: #fff;
  overflow: hidden;
}
.night-inner {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.night-log { grid-column: 1 / span 7; padding-bottom: clamp(48px, 6vw, 96px); }
.night-log > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  column-gap: 16px;
  align-items: baseline;
}
.night-log .ring { padding: 0; color: #fff; }
.night-log .ring time,
.night-log .ring .msg {
  color: #fff;
  font-size: var(--t-log-ring);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.night-log .app { color: var(--night-muted); font-size: var(--t-note); margin-bottom: 4px; }
.night-log .rule { margin-top: 10px; max-width: 30em; }
.night-log .again { margin-top: 26px; color: var(--night-muted); font-weight: 300; }

.capture {
  grid-column: 8 / span 5;
  position: relative;
  margin: 0;
  min-height: 600px;
}
.capture img {
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
}

.log .after { margin-top: 0; padding-top: 22px; }

@media (max-width: 900px) {
  .night-log { grid-column: 1 / -1; padding-bottom: 8px; }
  .capture { grid-column: 1 / -1; min-height: 72vw; max-width: 560px; }
}

@media (max-width: 600px) {
  .log li, .night-log > div { grid-template-columns: 4.4rem minmax(0, 1fr); column-gap: 12px; }
  .log .quiet .what { grid-column: 2; text-align: left; }
  .log .rang, .night-log .ring { grid-template-areas: "time app" "msg msg" "rule rule"; grid-template-columns: 4.4rem minmax(0, 1fr); }
  .log .rang .msg, .night-log .ring .msg { margin-top: 6px; }
}

/* ---------- Reduced motion: states switch without moving ---------- */

@media (prefers-reduced-motion: reduce) {
  .first, .sentence, .js .stack .slab { transition: none !important; }
  .js .stack .slab { transform: none; }
  .first[data-state="ringing"] .slab.ringing::before { animation: none; }
}

.lead .line { display: block; }
@media (max-width: 900px) { .lead .line { display: inline; } }
.nowrap { white-space: nowrap; }

@media (max-width: 900px) {
  .log .night {
    background:
      radial-gradient(ellipse 120% 55% at 50% 112%, rgba(99, 91, 255, 1) 0%, rgba(99, 91, 255, 0.5) 40%, rgba(99, 91, 255, 0) 75%),
      var(--night);
  }
}

/* ---------- The store badge: Apple's own artwork, unaltered ---------- */

.store a { display: inline-block; border-radius: 9px; }
.store img { display: block; height: 44px; width: auto; }

/* ---------- Shared pieces for the sections below ---------- */

.section h3 {
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 14px;
}

.more { margin-top: 40px; }

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  row-gap: 48px;
  margin-top: clamp(32px, 4vw, 56px);
  max-width: 1100px;
}
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

.plain li { padding: 10px 0; max-width: 34em; }
.lede { font-weight: 450; }

.prose { margin-top: 28px; max-width: 36em; }
.prose p + p { margin-top: 20px; }

/* ---------- Ring me for… ---------- */

.band-list { margin-top: 28px; }
.band-list li { padding: 10px 0; }
.band-list a {
  display: inline;
  text-decoration: none;
}
.band-rule {
  font-size: clamp(24px, 2.9vw, 40px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.band-list a:hover .band-rule { text-decoration-thickness: 2px; }
.band-job {
  display: inline-block;
  margin-left: 10px;
  font-size: var(--t-note);
  color: var(--muted);
  white-space: nowrap;
}
.band-rule .mark { font-size: 13px; vertical-align: 0.5em; }

/* ---------- How it works: the path and the steps ---------- */

.path {
  display: flex;
  align-items: center;
  margin: clamp(40px, 5vw, 64px) 0 clamp(56px, 6vw, 80px);
}
.path > li { display: flex; align-items: center; }
.path > li + li::before {
  filter: var(--arrow-filter);
  content: "";
  flex: none;
  width: 64px;
  height: 12px;
  margin: 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 12'%3E%3Cpath d='M0 6h61M56 1.5 62 6l-6 4.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.path-label { max-width: 11em; line-height: 1.3; }
.path > .path-start { flex-direction: column; align-items: flex-start; gap: 10px; }

/* The last step forks: it rings, or it stays quiet. */
.path > .path-end {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 32px 32px;
  align-items: center;
}
.path > .path-end::before {
  filter: var(--arrow-filter);
  grid-column: 1;
  grid-row: 1 / span 2;
  height: 64px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M0 32h24M24 32c10 0 14-16 37-16M24 32c10 0 14 16 37 16M56 11.5 62 16l-6 4.5M56 43.5 62 48l-6 4.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
}
.path-end .path-label { grid-column: 2; grid-row: 1; white-space: nowrap; }
.path-end .path-label.quietly { grid-row: 2; color: var(--muted); }

.slab.mini { width: 300px; padding: 10px 12px 11px 10px; column-gap: 10px; grid-template-columns: 30px minmax(0, 1fr) auto; }
.slab.mini .tile { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.slab.mini .app { font-size: 13px; }
.slab.mini .msg { font-size: 15px; color: var(--ink); }

@media (max-width: 1100px) {
  .path { flex-direction: column; align-items: flex-start; }
  .path > li { flex-direction: column; align-items: flex-start; }
  .path > li + li::before {
    width: 12px;
    height: 40px;
    margin: 12px 0 12px 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 40'%3E%3Cpath d='M6 0v37M1.5 32 6 38l4.5-6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .path > .path-end { grid-template-columns: 112px auto; grid-template-rows: auto auto; }
  .path > .path-end::before {
    grid-column: 1 / span 2;
    grid-row: 1;
    width: 160px;
    height: 48px;
    margin: 12px 0 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 48'%3E%3Cpath d='M30 0v14M30 14c0 12-6 16-6 31M30 14c0 14 100 6 100 31M19.5 40 24 46l4.5-6M125.5 40l4.5 6 4.5-6' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .path-end .path-label { grid-column: 1; grid-row: 2; }
  .path-end .path-label.quietly { grid-column: 2; grid-row: 2; }
  .slab.mini { width: min(300px, 100%); }
}

.steps { counter-reset: step; max-width: 44em; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  column-gap: 16px;
  padding: 10px 0;
}
.steps li::before {
  content: counter(step);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
@media (max-width: 600px) { .steps li { grid-template-columns: 2rem minmax(0, 1fr); column-gap: 8px; } }

/* ---------- Charge me once ---------- */

/* Price: Free as a quiet slab, Pro ringing, in indigo with its glow, the way the first
   screen's notification rings. */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin-top: clamp(32px, 4vw, 56px);
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 28px;
  background: var(--slab);
}
.plan h3 { margin: 0; font-size: var(--t-lead); font-weight: 450; }
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 10px 0 20px;
  font-size: clamp(48px, 5.4vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}
.plan > p:not(.plan-price) { max-width: 30em; color: var(--muted); }

.plan-pro { background: var(--indigo); color: #fff; }
.plan-pro::before {
  content: "";
  position: absolute;
  inset: -12px -8px;
  z-index: -1;
  border-radius: 36px;
  background: rgba(99, 91, 255, 0.5);
  filter: blur(26px);
}
.plan-pro h3 { font-weight: 900; font-stretch: 125%; letter-spacing: -0.01em; }
.plan-pro .plan-price { font-weight: 900; font-stretch: 112%; letter-spacing: -0.035em; }
.plan-once { font-size: var(--t-ui); font-weight: 450; font-stretch: 100%; letter-spacing: 0; color: #fff; }
.plan-pro > p:not(.plan-price) { color: #fff; }
.plan-get {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: auto;
  padding: 0 24px;
  border-radius: 24px;
  background: #fff;
  color: var(--indigo);
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}
.plan-pro > p:not(.plan-price) { margin-bottom: 28px; }
.plan-get:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.45); text-decoration: none; }
.plan-get:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@media (max-width: 760px) { .plans { grid-template-columns: 1fr; gap: 28px; } }
@media (prefers-reduced-motion: reduce) { .plan-get { transition: none; } .plan-get:hover { transform: none; } }

/* ---------- Questions ---------- */

.faq { margin-top: 32px; max-width: 860px; display: grid; gap: 8px; }
.faq details { background: var(--slab); border-radius: 20px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 300; font-size: 1.3em; line-height: 0.9; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 22px 20px; max-width: 40em; }
.faq summary:focus-visible { outline-offset: -3px; border-radius: 20px; }

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

.site-footer {
  margin-top: clamp(96px, 11vw, 160px);
  padding: 40px 0 56px;
  font-size: var(--t-note);
  color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; color: var(--ink); font-size: var(--t-ui); }
.site-footer p { max-width: 52em; }
.site-footer p + p { margin-top: 8px; }

/* ---------- Pages with one main line: press and 404 ---------- */

.page-main { padding-top: clamp(24px, 4vw, 64px); }
.page-line {
  font-size: clamp(56px, 8.4vw, 120px);
  font-weight: 250;
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.facts { margin-top: 40px; max-width: 760px; }
.facts div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 16px; padding: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 600px) { .facts div { grid-template-columns: 1fr; } }
.downloads { margin-top: 12px; }
.downloads li { padding: 6px 0; }
.lost-links { margin-top: 32px; display: flex; gap: 24px; flex-wrap: wrap; }

.section-tight { margin-top: 56px; }
.sub { font-size: var(--t-lead); font-weight: 400; line-height: 1.25; margin-bottom: 12px; }
.page-main .lead { margin-top: 28px; }

/* ---------- Help and privacy: quiet pages, nothing rings here ---------- */

.help strong, .policy strong { font-weight: 500; }
.help h2, .policy-text h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  scroll-margin-top: 24px;
}
.help-part { padding-top: clamp(56px, 6vw, 88px); max-width: 880px; }
.help-part[hidden] { display: none; }
.help-part > p { margin-top: 14px; max-width: 40em; }
.help-part > h2 + p { margin-top: 0; }
.help .note { color: var(--muted); font-size: var(--t-note); }
.checked { margin-top: 18px; color: var(--muted); font-size: var(--t-note); }
.checked:empty { display: none; }
.help-search { margin-top: 32px; max-width: 560px; }
.help-search input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--slab);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-body);
  -webkit-appearance: none;
  appearance: none;
}
.help-search input::placeholder { color: var(--muted); }
html:not(.js) .help-search { display: none; }
.search-empty { margin-top: 12px; color: var(--muted); font-size: var(--t-note); }
.search-empty:empty { display: none; }
.jump { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--t-ui); }
.help .group { font-size: var(--t-lead); font-weight: 400; line-height: 1.25; margin: 40px 0 14px; }
.help .group[hidden] { display: none; }
.help .faq { margin-top: 0; }
.help .causes { margin: 20px 0 6px; }
.faq details[hidden], .faq[hidden] { display: none; }
.faq .answer { padding: 0 22px 20px; }
.faq .answer p { padding: 0; max-width: 40em; }
.fix { display: grid; gap: 8px; max-width: 40em; }
ol.fix { counter-reset: fix; }
ol.fix li { counter-increment: fix; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); }
ol.fix li::before { content: counter(fix); color: var(--muted); font-variant-numeric: tabular-nums; }
.help .steps { margin-top: 8px; }
.help .steps li { grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 8px; padding: 9px 0; }
.plain-list { list-style: disc; padding-left: 1.2em; }
.plain-list li { padding: 6px 0; max-width: 40em; }
.updated { margin-top: 72px; color: var(--muted); font-size: var(--t-note); }

.policy-meta { margin-top: 18px; color: var(--muted); font-size: var(--t-note); }
.policy > .lead { max-width: 34em; }
.policy-table {
  margin-top: 48px;
  width: 100%;
  max-width: 1100px;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 16px;
  line-height: 1.4;
}
.policy-table thead th { text-align: left; font-weight: 400; color: var(--muted); font-size: 14px; padding: 0 16px 2px; }
.policy-table tbody th, .policy-table td { background: var(--slab); padding: 14px 16px; text-align: left; vertical-align: top; font-weight: 400; }
.policy-table tbody th { border-radius: 14px 0 0 14px; font-weight: 500; width: 24%; }
.policy-table td:last-child { border-radius: 0 14px 14px 0; width: 30%; }
@media (max-width: 760px) {
  .policy-table thead { display: none; }
  .policy-table, .policy-table tbody, .policy-table tr, .policy-table th, .policy-table td { display: block; width: auto !important; }
  .policy-table tr { background: var(--slab); border-radius: 18px; padding: 14px 16px; margin-bottom: 8px; }
  .policy-table tbody th, .policy-table td { background: none; padding: 3px 0; border-radius: 0 !important; }
  .policy-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; }
}
.policy-text { margin-top: 64px; max-width: 880px; }
.policy-text h2 { margin-top: 56px; }
.policy-text > .lead { font-size: var(--t-body); font-weight: 400; line-height: 1.5; max-width: 42em; }
.policy-text ul { list-style: disc; padding-left: 1.2em; }
.policy-text li { margin: 10px 0; max-width: 42em; }
.policy-text p { margin-top: 14px; max-width: 42em; }

@media print {
  .site-header nav, .site-footer nav, .jump, .help-search { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page-line { font-size: 30pt; }
  .policy-table { border-spacing: 0; }
  .policy-table tbody th, .policy-table td { background: none; border-top: 1px solid #bbb; border-radius: 0 !important; }
  .policy-table tr, .policy-text li, details { break-inside: avoid; }
  .policy-text a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  .site-footer { margin-top: 24pt; color: #444; }
}

.help-shot { margin: 16px 0 6px; max-width: 440px; }
.help-shot img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--hairline); }

/* ---------- Rulebook: rules to change, test and add ---------- */
/* Each rule is a slab on the quiet ground. It rings (indigo, with the glow rising behind it) only
   while the message in its test field would ring; the word that matched goes to 900 / 125. */

.rulebook .page-line { font-size: var(--s); line-height: var(--s-lh); }
.rulebook .lead { margin-top: 28px; max-width: 34em; }
.rulebook .jump { margin-top: 28px; }
.rulebook strong { font-weight: 450; }
.privacy-line { margin-top: 16px; font-size: var(--t-note); color: var(--muted); }

.rule-group { padding-top: clamp(64px, 7vw, 120px); scroll-margin-top: 12px; }
.rule-group h2 {
  margin-bottom: 20px;
  font-size: var(--t-h2);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.rule-list { display: grid; gap: 12px; isolation: isolate; }

/* Wide: the situation in the margin, like a book's, beside its rule. */
@media (min-width: 1000px) {
  .rule-group { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .rule-group h2 { margin-bottom: 0; padding-top: 20px; }
}

.rule-slab {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "sentence sentence" "details details" "test actions" "steps steps";
  column-gap: 40px;
  padding: 26px 30px 28px;
  border-radius: 20px;
  background: var(--slab);
  color: var(--ink);
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.rule-slab::before {
  content: "";
  position: absolute;
  inset: -12px -8px;
  z-index: -1;
  border-radius: 32px;
  background: rgba(99, 91, 255, 0.55);
  filter: blur(24px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 240ms ease-out, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.rule-slab.ringing { background: var(--indigo); color: #fff; }
.rule-slab.ringing::before { opacity: 1; transform: none; }

.rule-sentence {
  grid-area: sentence;
  max-width: 25em;
  font-size: clamp(24px, 2.36vw, 34px);
  font-weight: 350;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.rule-sentence .mark { margin-left: 4px; font-size: 13px; vertical-align: 0.6em; }
.rule-slab.ringing .term.hit { font-weight: 900; font-stretch: 125%; letter-spacing: -0.02em; }

/* The parts people change: underlined, and a field in their place while editing. */
.js .rule-sentence .part[data-part] {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  -webkit-tap-highlight-color: transparent;
}
.js .rule-sentence .part[data-part]:hover { text-decoration-thickness: 2px; }
.rule-sentence .part:focus-visible { outline-offset: 2px; border-radius: 4px; }
.rule-sentence .field {
  max-width: 100%;
  margin: 0;
  padding: 0 0.2em;
  border: 0;
  border-bottom: 2px solid var(--indigo);
  border-radius: 6px 6px 0 0;
  background: var(--field-tint);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  vertical-align: baseline;
}
.rule-sentence select.field { -webkit-appearance: none; appearance: none; padding-right: 0.3em; }
.rule-sentence .field:focus { outline: none; }
.rule-slab.ringing .rule-sentence .field { border-bottom-color: #fff; background: rgba(255, 255, 255, 0.16); }

/* The test field and its answer. */
.rule-test { grid-area: test; min-width: 0; padding-top: 22px; }
.rule-test:empty { display: none; }
.tester {
  display: block;
  width: 100%;
  max-width: 34rem;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--ground);
  color: inherit;
  font: inherit;
  font-size: var(--t-body);
  -webkit-appearance: none;
  appearance: none;
}
.tester::placeholder { color: var(--muted); opacity: 1; }
.try {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  margin-top: 12px;
  font-size: var(--t-note);
  line-height: 1.35;
  color: var(--muted);
}
.try > span { padding-top: 3px; }
.samples { display: grid; justify-items: start; gap: 2px; }
.sample {
  padding: 3px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--underline-muted);
}
.sample:hover { color: var(--ink); text-decoration-color: currentColor; }
.answer { margin-top: 14px; max-width: 34em; min-height: 1.35em; font-size: var(--t-body); line-height: 1.35; }
.test-send {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 22px;
  background: var(--ground);
  color: inherit;
  font: inherit;
  font-size: var(--t-ui);
  font-weight: 450;
  cursor: pointer;
}
.rule-slab.ringing .test-send { background: rgba(255, 255, 255, 0.16); }
.answer.live { margin-top: 0; }
.rule-slab.ringing .verdict { font-weight: 900; font-stretch: 125%; }

/* Add, by hand, and the QR code for a phone. */
.rule-actions { grid-area: actions; display: grid; justify-items: end; align-content: start; gap: 10px; padding-top: 22px; }
[data-add="off"] .rule-actions { display: none; }
html:not(.js) .rule-toggle { display: none; }
.rule-toggle {
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--t-ui);
  font-weight: 450;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.rule-fallback { max-width: 17em; font-size: var(--t-note); line-height: 1.35; text-align: right; color: var(--muted); }
.rule-qr { display: grid; grid-template-columns: 9.5em 148px; column-gap: 14px; align-items: center; margin: 4px 0; }
.rule-qr[hidden] { display: none; }
.rule-qr svg { grid-column: 2; grid-row: 1; display: block; width: 148px; height: 148px; border-radius: 8px; }
.rule-qr figcaption { grid-column: 1; grid-row: 1; font-size: 13px; line-height: 1.35; text-align: right; color: var(--muted); }

.rule-steps {
  grid-area: steps;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: var(--t-body);
  line-height: 1.4;
}
.rule-steps[hidden] { display: none; }
.rule-steps h3 { margin-bottom: 10px; font-size: var(--t-body); font-weight: 450; line-height: 1.3; }
.rule-steps .note { margin-top: 12px; max-width: 40em; font-size: var(--t-note); line-height: 1.4; color: var(--muted); }
.rule-steps .mark { margin-left: 2px; font-size: 12px; }

.rule-slab.ringing .tester { background: rgba(255, 255, 255, 0.16); }
.rule-slab.ringing .tester::placeholder,
.rule-slab.ringing .try,
.rule-slab.ringing .rule-steps .note,
.rule-slab.ringing .fix li::before,
.rule-slab.ringing .rule-qr figcaption,
.rule-slab.ringing .rule-fallback { color: var(--on-indigo-quiet); }
.rule-slab.ringing .sample { text-decoration-color: rgba(255, 255, 255, 0.45); }
.rule-slab.ringing .sample:hover { color: #fff; }
.rule-slab.ringing .button { background: #fff; color: #000; }
.rule-slab.ringing .rule-steps { border-top-color: rgba(255, 255, 255, 0.28); }
.rule-slab.ringing :focus-visible { outline-color: #fff; }

/* The page a shared rule's link opens: the same slab, read-only, with Add. */
.shared-name { font-size: var(--t-h2); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.shared-from { margin-top: 14px; max-width: 40em; color: var(--muted); }
.shared-rule .rule-list { margin-top: 32px; max-width: 920px; }
.shared-more { margin-top: 48px; max-width: 40em; }
.rule-details { grid-area: details; display: grid; gap: 6px; margin-top: 14px; max-width: 40em; font-size: var(--t-note); line-height: 1.4; color: var(--muted); }
.rule-details code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95em; overflow-wrap: anywhere; }
.rule-slab.ringing .rule-details { color: var(--on-indigo-quiet); }

.rulebook-end { margin-top: clamp(80px, 9vw, 128px); max-width: 34em; font-size: var(--t-lead); font-weight: 350; line-height: 1.35; }

@media (max-width: 720px) {
  .rule-slab { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sentence" "details" "test" "actions" "steps"; padding: 20px 20px 22px; }
  .rule-actions { justify-items: start; }
  .rule-fallback { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .rule-slab, .rule-slab::before { transition: none; }
  .rule-slab::before { transform: none; }
}

/* ---------- A drawn iPhone around the app's real screens ----------
   Sized by its width (container units): a titanium edge, the black glass, the screen with its
   corners, and the Dynamic Island, which screenshots never include. */

.phone { container-type: inline-size; margin: 0; }
.phone-edge {
  padding: 1.1cqw;
  border-radius: 17.4cqw;
  background: linear-gradient(140deg, #ececef 0%, #a2a2a7 20%, #dcdce0 46%, #8d8d92 72%, #cfcfd4 100%);
  box-shadow: 0 2.5cqw 7cqw -3cqw rgba(30, 26, 90, 0.38), 0 1cqw 2.4cqw -1cqw rgba(0, 0, 0, 0.3);
}
.phone-glass {
  position: relative;
  padding: 3.1cqw;
  border-radius: 16.3cqw;
  background: #000;
}
.phone-screen {
  position: relative;
  aspect-ratio: 660 / 1434;
  border-radius: 12.4cqw;
  overflow: hidden;
  background: #f2f2f7;
}
.phone-screen img,
.phone-screen video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone-island {
  position: absolute;
  top: 5.3cqw;
  left: 50%;
  width: 26.4cqw;
  height: 7.6cqw;
  transform: translateX(-50%);
  border-radius: 4cqw;
  background: #000;
}

/* ---------- Show me the app ----------
   Chapters on the left; the one on screen rings like the first screen's notification. */

.tour-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}
.tour-text { grid-column: 1 / span 7; }
.tour-list { max-width: 660px; }
.tour-list { margin: clamp(28px, 3.4vw, 44px) 0 0 -22px; }
.tour-list li + li { margin-top: 4px; }
.tour-phone { grid-column: 8 / span 5; width: min(330px, 100%); justify-self: center; }
.phone-island[hidden], .phone.no-island .phone-island { display: none; }
.tour-mini { display: none; }

.tour-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 16px 22px 20px;
  border: 0;
  border-radius: 20px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tour-ask {
  display: block;
  font-size: clamp(22px, 2.15vw, 30px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.tour-ask .mark { font-size: 13px; font-stretch: 100%; vertical-align: 0.4em; }
.tour-more {
  display: block;
  max-width: 32em;
  margin-top: 6px;
  font-size: var(--t-ui);
  line-height: 1.45;
  color: var(--muted);
}
.tour-item:hover .tour-ask { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }

/* On screen: it rings. */
.tour-item[aria-pressed="true"] { background: var(--indigo); color: #fff; }
.tour-item[aria-pressed="true"] .tour-ask { font-weight: 900; font-stretch: 112%; letter-spacing: -0.015em; text-decoration: none; }
.tour-item[aria-pressed="true"] .tour-more { color: rgba(255, 255, 255, 0.82); }
.tour-item[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  inset: -8px -4px;
  z-index: -1;
  border-radius: 28px;
  background: rgba(99, 91, 255, 0.45);
  filter: blur(20px);
}
.tour-item:focus-visible { outline-offset: 4px; }

/* How long this chapter stays on screen, while the tour plays by itself. */
.tour-time {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 9px;
  height: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.tour.is-playing .tour-item[aria-pressed="true"] .tour-time {
  opacity: 1;
  animation: tour-time var(--tour-step, 5s) linear forwards;
}
@keyframes tour-time { to { transform: scaleX(1); } }

.js .tour-phone .phone-screen img { opacity: 0; transition: opacity 280ms ease-out; }
.js .tour-phone .phone-screen img.is-on { opacity: 1; }
html:not(.js) .tour-phone .phone-screen img:not(:first-child) { display: none; }

/* Narrow: no chapters to follow; each screen with its words, side by side, to swipe through. */
@media (max-width: 900px) {
  .tour-body { display: block; }
  .tour-phone { display: none; }
  .tour-list {
    display: flex;
    margin-left: calc(-1 * var(--gutter));
    gap: 16px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .tour-list::-webkit-scrollbar { display: none; }
  .tour-list li { flex: 0 0 min(64vw, 280px); scroll-snap-align: start; display: flex; flex-direction: column; }
  .tour-list li + li { margin-top: 0; }
  .tour-mini { display: block; order: -1; width: 100%; margin-bottom: 18px; }
  .tour-item, .tour-item[aria-pressed="true"] { padding: 0; background: none; color: inherit; cursor: default; }
  .tour-item[aria-pressed="true"]::before, .tour-time { display: none; }
  .tour-item[aria-pressed="true"] .tour-ask { font-weight: 300; font-stretch: 100%; letter-spacing: -0.01em; }
  .tour-item[aria-pressed="true"] .tour-more { color: var(--muted); }
  .tour-item:hover .tour-ask { text-decoration: none; }
  .tour-ask { font-size: 22px; }
}

/* ---------- Set it up: the setup's own pages, in order ---------- */

.setup-shots {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px clamp(20px, 3vw, 44px);
  margin-top: 28px;
}
.setup-shots li { counter-increment: step; }
.setup-shots .phone { width: min(240px, 100%); }
.setup-shots p {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  margin-top: 20px;
  max-width: 17em;
  line-height: 1.4;
}
.setup-shots p::before { content: counter(step); color: var(--muted); font-variant-numeric: tabular-nums; }
.setup-last { margin-top: 32px; max-width: 40em; }

@media (max-width: 900px) {
  .setup-shots {
    display: flex;
    gap: 16px;
    margin: 20px calc(-1 * var(--gutter)) 0;
    padding: 8px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .setup-shots::-webkit-scrollbar { display: none; }
  .setup-shots li { flex: 0 0 min(50vw, 220px); scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .js .tour-phone .phone-screen img { transition: none; }
  .tour.is-playing .tour-item[aria-pressed="true"] .tour-time { animation: none; opacity: 0; }
}

/* ---------- Links within the page (scroll.js) ----------
   The header's links underline from the left on hover. A section reached by a link has its
   heading underlined in indigo, drawn left to right, held, then faded: the first screen's
   underline, in the ringing colour. */

.site-header nav a {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  padding-bottom: 2px;
  transition: background-size 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.site-header nav a:hover,
.site-header nav a:focus-visible { text-decoration: none; background-size: 100% 1px; }
/* The page you're on keeps its underline. */
.site-header nav a[aria-current="page"] { background-size: 100% 1px; }

.arrived { position: relative; width: fit-content; }
.arrived::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1em;
  height: max(3px, 0.08em);
  border-radius: 2px;
  background: var(--indigo);
  transform-origin: left;
  animation: arrived 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  pointer-events: none;
}
@keyframes arrived {
  0% { transform: scaleX(0); opacity: 1; }
  25% { transform: scaleX(1); opacity: 1; }
  70% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
[tabindex="-1"]:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .site-header nav a { transition: none; }
  .arrived::after { display: none; }
}
