/*
 * LinePilot website.
 * Colours, controls and the pointer mirror the extension's own design system
 * (line-pilot/src/shared/ui.css) so the site and the product feel like one thing.
 */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-italic.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}

/* Layout: a 1120px canvas, copy set to a ~68ch reading measure and left-aligned;
   the home page opens with a live reading sheet beside the headline. */
:root {
  color-scheme: light;

  --paper: #f7f6f3;
  --sheet: #ffffff;
  --well: #efeee9;
  --track: #e4e2dc;
  --ink: #1b1a18;
  --ink-2: #5f5d58;
  --ink-3: #6c6963; /* 5:1 on paper, WCAG AA */
  --faded: color-mix(in srgb, var(--ink) 36%, transparent);
  --hairline: rgba(27, 26, 24, 0.09);
  --hairline-strong: rgba(27, 26, 24, 0.16);
  --violet: #5b45d6;
  --violet-ink: #ffffff;
  --violet-soft: rgba(91, 69, 214, 0.12);
  --hold: #b47a00;
  --pc: #6e56cf; /* pointer colour (demo) */
  --blend: multiply;
  --tint: 32%;
  --mark-tint: 22%;

  --shadow-sheet: 0 0 0 1px var(--hairline), 0 1px 2px rgba(27, 26, 24, 0.04), 0 24px 48px -28px rgba(27, 26, 24, 0.28);
  --shadow-raised: 0 0 0 0.5px rgba(27, 26, 24, 0.08), 0 1px 3px rgba(27, 26, 24, 0.12);

  --font-read: "Newsreader", "Iowan Old Style", "Palatino Linotype", Charter, Georgia, serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.4375rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --glide-ease: cubic-bezier(0.3, 0.7, 0.4, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #141413;
    --sheet: #1c1c1a;
    --well: #262624;
    --track: #363531;
    --ink: #ecebe7;
    --ink-2: #a8a6a0;
    --ink-3: #908f8a;
    --hairline: rgba(236, 235, 231, 0.09);
    --hairline-strong: rgba(236, 235, 231, 0.16);
    --violet: #a796ff;
    --violet-ink: #17132b;
    --violet-soft: rgba(167, 150, 255, 0.16);
    --hold: #f0b429;
    --blend: screen;
    --tint: 50%;
    --mark-tint: 38%;
    --shadow-sheet: 0 0 0 1px var(--hairline), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
    --shadow-raised: 0 0 0 0.5px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

/* Base */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 var(--step-0) / 1.6 var(--font-ui);
  letter-spacing: -0.006em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

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

button {
  font: inherit;
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Type */

.display,
.title,
.prose h2,
.prose h3 {
  font-family: var(--font-read);
  font-weight: 500;
  text-wrap: balance;
}

.display {
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.title {
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}

.lede {
  max-width: 34em;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.fine {
  font-size: var(--step--1);
  color: var(--ink-3);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.4em;
  border-radius: 6px;
  font: 500 0.8125em/1 var(--font-ui);
  color: var(--ink);
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--hairline-strong), 0 1px 0 1px var(--hairline);
  white-space: nowrap;
  vertical-align: 0.06em;
}

.keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

code {
  font: 0.875em var(--font-mono);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--well);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 22px;
  color: var(--violet);
}

.nav {
  display: flex;
  gap: 2px;
  margin-right: 8px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a:hover {
  background: var(--well);
}

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

  .nav a {
    padding: 8px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn-primary {
  color: var(--violet-ink);
  background: var(--violet);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 24px -10px color-mix(in srgb, var(--violet) 70%, transparent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 14px 28px -10px color-mix(in srgb, var(--violet) 75%, transparent);
}

.btn-quiet {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.btn-quiet:hover {
  background: var(--well);
}

.btn-small {
  height: 36px;
  padding: 0 15px;
  font-size: 0.875rem;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--violet);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Sections */

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

.section + .section {
  border-top: 1px solid var(--hairline);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 40rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* Hero */

.hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(64px, 9vw, 112px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.mark {
  background: linear-gradient(to top, color-mix(in srgb, var(--violet) var(--mark-tint), transparent) 0.34em, transparent 0.34em);
  padding-inline: 0.04em;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-facts svg {
  width: 14px;
  height: 14px;
  color: var(--violet);
}

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

/* Live demo: a page of text with the real pointer and floating bar */

.demo {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.sheet {
  position: relative;
  padding: clamp(26px, 4vw, 40px) clamp(22px, 4vw, 44px) 52px;
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  cursor: text;
}

.sheet:focus-visible {
  outline-offset: 5px;
  border-radius: 18px;
}

.sheet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: var(--step--1);
  color: var(--ink-3);
}

.sheet-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
}

.reading {
  font-family: var(--font-read);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--ink);
}

.reading p + p {
  margin-top: 0.85em;
}

.reading .w {
  transition: color 0.45s ease;
  cursor: pointer;
}

.sheet[data-fade="on"] .reading .w.read {
  color: var(--faded);
}

.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: 4px;
  transition: transform var(--glide, 140ms) var(--glide-ease), width var(--glide, 140ms) var(--glide-ease),
    height var(--glide, 140ms) var(--glide-ease), opacity 0.25s ease;
  will-change: transform, width;
}

.pointer.on {
  opacity: 1;
}

.pointer.jump {
  transition: opacity 0.25s ease;
}

.sheet[data-style="highlight"] .pointer {
  background: color-mix(in srgb, var(--pc) var(--tint), transparent);
  mix-blend-mode: var(--blend);
}

.sheet[data-style="underline"] .pointer {
  background: var(--pc);
  border-radius: 2px;
}

/* The floating bar, as the extension draws it on a page */
.hud {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  display: flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 6px;
  border-radius: 22px;
  font: 500 13px/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: #f4f4f3;
  background: rgba(26, 26, 28, 0.9);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 12px 32px -10px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  cursor: default;
}

.hud button {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.64);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.hud button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hud button:active {
  transform: scale(0.92);
}

.hud button svg {
  width: 16px;
  height: 16px;
}

.hud .hud-play {
  width: 32px;
  height: 32px;
  margin-right: 4px;
  color: #18181b;
  background: #f4f4f3;
}

.hud .hud-play:hover {
  color: #18181b;
  background: #fff;
}

.hud .hud-play svg {
  width: 14px;
  height: 14px;
}

.hud .i-play,
.hud.is-playing .i-pause {
  display: block;
}

.hud .i-pause,
.hud.is-playing .i-play {
  display: none;
}

.hud-wpm {
  min-width: 66px;
  text-align: center;
}

.hud-wpm b {
  font-weight: 600;
}

.hud-wpm span {
  margin-left: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.hud-divider {
  width: 1px;
  height: 18px;
  margin: 0 8px;
  background: rgba(255, 255, 255, 0.14);
}

.hud-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.hud-track {
  width: 56px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.hud-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--pc);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.hud-left {
  min-width: 4.5em;
}

@media (max-width: 440px) {
  .hud-divider,
  .hud-progress {
    display: none;
  }
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 26px; /* room for the bar that overhangs the page */
}

.control {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.demo-hint {
  font-size: var(--step--1);
  color: var(--ink-3);
}

.demo-hint .for-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .demo-hint .for-keyboard {
    display: none;
  }

  .demo-hint .for-touch {
    display: inline;
  }
}

/* Segmented control and swatches (as in the extension popup) */

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--well);
}

.segmented button {
  padding: 4px 11px;
  border: 0;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented button[aria-checked="true"] {
  color: var(--ink);
  background: var(--sheet);
  box-shadow: var(--shadow-raised);
}

.swatches {
  display: flex;
  gap: 9px;
}

.swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s ease;
}

button.swatch:hover {
  transform: scale(1.12);
}

.swatch[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--c);
}

.swatch.iris { --c: #6e56cf; }
.swatch.ocean { --c: #2f7cf6; }
.swatch.jade { --c: #12a594; }
.swatch.sun { --c: #f5b000; }
.swatch.rose { --c: #e5486b; }
.swatch.graphite { --c: #6b7280; }

/* Rhythm */

.rhythm-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.rhythm-layout .section-head {
  margin-bottom: 0;
}

.rhythm {
  padding: clamp(20px, 3vw, 28px);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}

.rhythm-rows {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
  --metronome: 59.8%;
}

.rhythm-rows li {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) 3.6em;
  align-items: center;
  gap: 12px;
  font-size: var(--step--1);
}

.rhythm-word {
  font-family: var(--font-read);
  font-size: 1.0625rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rhythm-bar {
  position: relative;
  height: 14px;
}

.rhythm-bar::before {
  /* the metronome: every word the same 240 ms */
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--metronome);
  border-left: 1px dashed var(--hairline-strong);
}

.rhythm-bar i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: 3px;
  background: color-mix(in srgb, var(--violet) 70%, transparent);
}

.rhythm-bar i.long {
  background: var(--violet);
}

.rhythm-ms {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
}

.rhythm figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--ink-3);
}

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

@media (max-width: 440px) {
  .rhythm-rows li {
    grid-template-columns: 6.2em minmax(0, 1fr) 3.4em;
    gap: 8px;
  }
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
}

.feature {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 28px 32px 34px 0;
  border-bottom: 1px solid var(--hairline);
}

.feature + .feature {
  padding-left: 32px;
  border-left: 1px solid var(--hairline);
}

.feature:nth-child(3n + 1) {
  padding-left: 0;
  border-left: 0;
}

.feature h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.feature p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.feature .swatches,
.feature .keys {
  margin-top: 6px;
}

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

  .feature:nth-child(n) {
    padding-left: 28px;
    border-left: 1px solid var(--hairline);
  }

  .feature:nth-child(2n + 1) {
    padding-left: 0;
    border-left: 0;
  }
}

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

  .feature:nth-child(n) {
    padding: 24px 0 26px;
    border-left: 0;
  }
}

/* Steps (a real sequence) */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  align-content: start;
  gap: 8px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  margin-bottom: 6px;
  font: italic 500 2.75rem/1 var(--font-read);
  color: var(--violet);
}

.steps h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

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

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

/* Key reference */

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

.keymap h3 {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.keymap dl {
  display: contents;
}

.keymap .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.keymap dt {
  color: var(--ink-2);
}

.keymap dd {
  color: var(--ink);
}

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

/* Privacy band and closing call to action */

.band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}

.band .section-head {
  margin-bottom: 0;
}

.band ul {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.band li {
  display: flex;
  gap: 10px;
  color: var(--ink-2);
}

.band li svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--violet);
}

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

.closing {
  display: grid;
  justify-items: start;
  gap: 20px;
}

/* Inner pages */

.page-head {
  padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px);
}

.page-head .wrap {
  display: grid;
  gap: 16px;
}

.page-head .display {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
}

.page-body {
  padding-bottom: clamp(64px, 9vw, 112px);
}

.prose {
  max-width: 68ch;
}

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

.prose h2 {
  margin-top: 2.2em;
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

.prose p,
.prose li {
  color: var(--ink-2);
  text-wrap: pretty;
}

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

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

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

.prose a:not(.btn) {
  color: var(--violet);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: var(--step--1);
  color: var(--ink-3);
}

.callout {
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}

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

.callout p + p {
  margin-top: 0.5em;
}

.callout.warn {
  box-shadow: inset 3px 0 0 var(--hold), var(--shadow-sheet);
}

/* Tables used in support and privacy */

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

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

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

.table th {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

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

.table td:first-child {
  color: var(--ink);
  white-space: nowrap;
}

/* FAQ */

.faq {
  display: grid;
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

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

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

.faq .answer {
  display: grid;
  gap: 0.75em;
  padding-bottom: 22px;
  color: var(--ink-2);
}

.faq .answer ul,
.faq .answer ol {
  display: grid;
  gap: 0.4em;
  padding-left: 1.3em;
}

.faq .answer a:not(.btn) {
  color: var(--violet);
}

/* Blog */

.post-list {
  display: grid;
  gap: 0;
  max-width: 48rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

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

.post-list a {
  display: grid;
  gap: 8px;
  padding: 28px 0 30px;
  text-decoration: none;
}

.post-list h2 {
  font: 500 var(--step-2) / 1.2 var(--font-read);
  letter-spacing: -0.012em;
  text-wrap: balance;
  transition: color 0.15s ease;
}

.post-list a:hover h2 {
  color: var(--violet);
}

.post-list p {
  max-width: 40em;
  color: var(--ink-2);
}

.article {
  max-width: 66ch;
  font-family: var(--font-read);
  font-size: 1.1875rem;
  line-height: 1.7;
}

.article > * + * {
  margin-top: 1.05em;
}

.article h2 {
  margin-top: 2em;
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.article h2 + .aside {
  margin-top: 0.2em;
}

.article .aside {
  font-style: italic;
  color: var(--ink-3);
}

.article h2 + p,
.article h2 + .aside + p {
  margin-top: 0.7em;
}

.article ul,
.article ol {
  padding-left: 1.2em;
}

.article li + li {
  margin-top: 0.3em;
}

.article a:not(.btn) {
  color: var(--violet);
}

.article strong {
  font-weight: 600;
}

.article-end {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-top: 3em;
  padding: 28px;
  border-radius: 16px;
  font-family: var(--font-ui);
  font-size: 1rem;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

/* Forms (uninstall feedback) */

.form {
  display: grid;
  gap: 24px;
  max-width: 36rem;
}

.field {
  display: grid;
  gap: 8px;
}

.field > label,
.field legend {
  font-weight: 600;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.choice:has(input:checked) {
  box-shadow: inset 0 0 0 1.5px var(--violet);
}

.choice input {
  accent-color: var(--violet);
}

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

.input,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.textarea {
  min-height: 7.5em;
  resize: vertical;
}

.input:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}

.hint {
  font-size: var(--step--1);
  color: var(--ink-3);
}

.form-status {
  min-height: 1.6em;
  font-weight: 500;
}

.form-status.ok {
  color: var(--violet);
}

.form-status.error {
  color: #c2410c;
}

/* Footer */

.site-footer {
  margin-top: auto;
  padding-block: 48px 40px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
}

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

.footer-grid .brand {
  margin-bottom: 10px;
}

.footer-grid p {
  max-width: 22em;
  color: var(--ink-2);
}

.footer-grid h2 {
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

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

.footer-grid a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  font-size: var(--step--1);
  color: var(--ink-3);
}

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

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

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

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