/* Revue's website (server/src/site): the home, features, integrations,
 * downloads, privacy and docs pages. Built on the app's design tokens
 * (docs/design/redesign, tokens.json), scaled up for the web, as drawn in
 * the "Revue Website" design. Light and dark follow the visitor's system.
 * The account pages (account.css) and the docs (docs.css) build on it. */

@font-face {
  font-family: "Noto Sans";
  src: url("fonts/NotoSans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Mono";
  src: url("fonts/NotoSansMono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Tokens: light, then dark. */
:root {
  color-scheme: light dark;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: #f1efea;
  --surface-hover: #efede8;
  --line: #e2dfd8;
  --line-strong: #8c8679;
  --ink: #1b1a17;
  --ink-muted: #5c574f;
  --ink-faint: #67625a;
  --accent: #a65303;
  --on-accent: #ffffff;
  --accent-soft: #fcecd2;
  --focus: #9a4a00;
  --add-bg: #e1f3ee;
  --add-mark: #0b6f62;
  --del-bg: #fde7df;
  --del-mark: #b93c09;
  --success: #0b6f62;
  --danger: #b93c09;
  --warning: #8a5a00;
  --info: #1f5bd1;
  --shot-shadow: 0 30px 70px -24px rgb(60 40 10 / 0.28), 0 0 0 1px rgb(0 0 0 / 0.04);
  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Noto Sans Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1e1d1a;
    --surface-raised: #282622;
    --surface-sunken: #121110;
    --surface-hover: #2a2824;
    --line: #33302b;
    --line-strong: #7a766c;
    --ink: #edebe6;
    --ink-muted: #aaa59b;
    --ink-faint: #9c978d;
    --accent: #f5a524;
    --on-accent: #1d1404;
    --accent-soft: #3b2c12;
    --focus: #ffc35c;
    --add-bg: #11302a;
    --add-mark: #4fd1b0;
    --del-bg: #3a1c13;
    --del-mark: #ff8f63;
    --success: #5ccaa9;
    --danger: #ff7d5c;
    --warning: #f2c94c;
    --info: #8ab8ff;
    --shot-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(0 0 0 / 0.12);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* The scrollbar's room stays when the viewer hides it, so the page under
   * it doesn't shift sideways. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
label:has(> input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

ul,
ol {
  padding: 0;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

time {
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

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

/* Icons (icons.rs) take the text's colour. */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  min-width: 0;
}

.wrap-narrow {
  max-width: 900px;
}

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

ul.row {
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.center {
  text-align: center;
  align-items: center;
  justify-content: center;
}

.gap-s {
  gap: 8px;
}

.gap {
  gap: 12px;
}

.gap-m {
  gap: 18px;
}

.gap-l {
  gap: 24px;
}

.section {
  padding-block: clamp(56px, 7vw, 96px);
}

.section-tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.flush-top {
  padding-top: 0;
}

.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.dots {
  background-image: radial-gradient(
    color-mix(in oklab, var(--line-strong) 45%, transparent) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.sec-head.center {
  margin-inline: auto;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.page-head > * {
  max-width: 900px;
}

.page-head.center {
  align-items: center;
  text-align: center;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 24px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split-top {
  align-items: start;
}

.split-wide {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

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

/* On wide screens, the text of every other feature row comes second. */
@media (min-width: 960px) {
  .split.flip > :first-child {
    order: 2;
  }
}

.sticky-side {
  position: sticky;
  top: 110px;
}

@media (max-width: 900px) {
  .sticky-side {
    position: static;
  }
}

.rows {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 7vw, 96px);
}

/* Type */
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.eyebrow .ps {
  color: var(--ink-faint);
}

.h-hero {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 980px;
}

.h-page {
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h-sec {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h-row {
  font-size: clamp(28px, 2.8vw, 38px);
}

.h-card {
  font-size: 19px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.h-small {
  font-size: 17px;
  line-height: 24px;
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-muted);
  text-wrap: pretty;
  max-width: 720px;
}

.hl {
  color: var(--accent);
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 14px;
  line-height: 21px;
}

.tiny {
  font-size: 13px;
  line-height: 18px;
}

.label-up {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

code {
  font-size: 0.88em;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  font: 600 16px/1.2 var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition:
    background 120ms ease-out,
    border-color 120ms ease-out,
    filter 120ms ease-out;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ink {
  background: var(--ink);
  color: var(--bg);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-quiet:hover,
.btn-ghost:hover {
  background: var(--surface-hover);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 6px;
}

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

.actions.center {
  justify-content: center;
}

/* Chips, pills, keys */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
}

.chip .icon {
  width: 14px;
  height: 14px;
}

a.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  text-decoration: none;
}

.chip-accent {
  border-color: color-mix(in oklab, var(--accent) 45%, transparent);
  color: var(--ink);
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.planned {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 0.1em;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--surface-sunken);
  color: var(--ink);
  font: 500 13px/1 var(--font-mono);
  vertical-align: 0.1em;
}

.kbd-big {
  min-width: 56px;
  height: 56px;
  font-size: 20px;
  border-radius: 8px;
  border-bottom-width: 3px;
  padding: 0 14px;
}

.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  margin-top: 8px;
  list-style: none;
}

.keys li {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}

.brand img {
  width: 28px;
  height: 28px;
}

.brand .sub {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 15px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.nav a {
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
}

.nav a:hover {
  color: var(--ink);
  background: var(--surface-hover);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

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

/* Phones: the brand and the buttons on the first line, the menu under
 * them, scrolling sideways if it must. */
@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .site-header .bar {
    justify-content: space-between;
    column-gap: 12px;
  }

  .nav {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -12px;
  }

  .nav a {
    white-space: nowrap;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: 64px 40px;
}

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

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

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.footer-about {
  gap: 16px;
  max-width: 340px;
}

.footer-col h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--ink-muted);
  font-size: 15px;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-col .btn {
  color: var(--ink);
}

.footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}

.footer-legal strong {
  color: var(--ink);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.card-sm {
  padding: 22px;
  gap: 8px;
}

.card p {
  color: var(--ink-muted);
  text-wrap: pretty;
}

.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.card .card-icon .icon {
  width: 20px;
  height: 20px;
}

.card-link {
  color: inherit;
  text-decoration: none !important;
  transition:
    border-color 120ms ease-out,
    background 120ms ease-out;
}

.card-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.card-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding: 24px 28px;
}

.card-row > .stack {
  gap: 4px;
  flex: 1 1 320px;
}

.card-planned {
  min-height: 240px;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-style: dashed;
}

.fcard h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.fcard p {
  font-size: 15px;
  line-height: 23px;
}

.ticks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  color: var(--ink-muted);
}

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

.ticks li::before {
  content: "+";
  content: "+" / "";
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--add-mark);
  text-align: center;
}

.ticks-big {
  font-size: 17px;
}

/* Provider logos */
.marks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  list-style: none;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mark .also {
  font-weight: 400;
  color: var(--ink-faint);
}

/* Hero */
.hero {
  padding-top: clamp(56px, 8vw, 104px);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.hero-inner .lead {
  max-width: 720px;
}

.hero-shot {
  width: 100%;
  max-width: 1060px;
  margin-top: 20px;
  margin-bottom: -1px;
  position: relative;
  isolation: isolate;
  text-align: left;
}

.hero-shot::before {
  content: "";
  position: absolute;
  inset: 8% 6% -6% 6%;
  z-index: -1;
  background: radial-gradient(
    60% 60% at 50% 40%,
    color-mix(in oklab, var(--accent) 22%, transparent),
    transparent 70%
  );
  filter: blur(30px);
}

.hero-shot .shot {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero-shot figcaption {
  display: none;
}

/* Screenshots */
.shot {
  position: relative;
  min-width: 0;
}

.shot picture,
.shot-missing {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shot-shadow);
}

.shot img {
  width: 100%;
  height: auto;
}

.shot figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-muted);
}

.shot-missing {
  display: grid;
  place-content: center;
  gap: 6px;
  aspect-ratio: 16 / 10;
  padding: 24px;
  text-align: center;
  color: var(--ink-muted);
  border-style: dashed;
}

.shot-missing .what {
  font-size: 14px;
}

.shot-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* A screenshot opens big in the viewer. */
.shot-open {
  display: block;
  position: relative;
  border-radius: 12px;
  cursor: zoom-in;
}

.shot-open::after {
  content: "⤢";
  content: "⤢" / "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(8 9 13 / 0.66);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}

.shot-open:hover::after,
.shot-open:focus-visible::after {
  opacity: 1;
}

/* The screenshot viewer (pages.rs, `viewers`): one dialog per screenshot,
 * shown while the address names it (:target), so it works without the
 * script. gallery.js adds keys, swipe, focus and the zoom from the
 * thumbnail. Dark over either theme, so its colours are its own. */
html:has(.viewer:target) {
  overflow: hidden;
}

.viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 60px 72px 24px;
  background: rgb(10 9 8 / 0.8);
  color: #edebe6;
  overscroll-behavior: contain;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .viewer {
    background: rgb(10 9 8 / 0.64);
    -webkit-backdrop-filter: blur(12px) saturate(0.8);
    backdrop-filter: blur(12px) saturate(0.8);
  }
}

.viewer:target {
  display: grid;
}

.viewer:focus {
  outline: none;
}

/* A click outside the image closes it. */
.viewer-backdrop {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.viewer-figure {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
}

.viewer-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1600px, 100vw - 144px);
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.7);
}

.viewer-figure figcaption {
  max-width: 48rem;
  text-align: center;
  font-size: 15px;
  color: #cfcbc2;
}

.viewer-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #9c978d;
  margin-right: 0.35em;
}

/* The visitor's theme first; the toggle shows the other one. */
.viewer .v-dark,
.viewer-theme .when-dark,
.viewer:has(.viewer-flip:checked) .v-light {
  display: none;
}

.viewer:has(.viewer-flip:checked) .v-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  .viewer .v-dark {
    display: block;
  }

  .viewer .v-light,
  .viewer-theme .when-light,
  .viewer:has(.viewer-flip:checked) .v-dark {
    display: none;
  }

  .viewer:has(.viewer-flip:checked) .v-light {
    display: block;
  }

  .viewer-theme .when-dark {
    display: inline;
  }
}

.viewer-close,
.viewer-prev,
.viewer-next,
.viewer-theme {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.16);
  text-decoration: none !important;
  transition: background 0.15s;
}

.viewer-close:hover,
.viewer-prev:hover,
.viewer-next:hover,
.viewer-theme:hover {
  background: rgb(255 255 255 / 0.2);
}

.viewer :focus-visible,
.viewer-theme:has(:focus-visible) {
  outline: 2px solid #ffc35c;
  outline-offset: 2px;
}

.viewer-close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.viewer-prev,
.viewer-next {
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.viewer-prev {
  left: 12px;
}

.viewer-next {
  right: 12px;
}

.viewer-theme {
  top: 12px;
  left: 12px;
  grid-auto-flow: column;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.viewer-flip {
  margin: 0;
  accent-color: #f5a524;
}

.viewer-theme :focus-visible {
  outline: none;
}

/* Phones: the arrows under the image, the image the screen's width. */
@media (max-width: 40rem) {
  .viewer {
    padding: 64px 8px 76px;
  }

  .viewer-prev,
  .viewer-next {
    top: auto;
    bottom: 14px;
    margin-top: 0;
  }

  .viewer-prev {
    left: calc(50% - 60px);
  }

  .viewer-next {
    right: calc(50% - 60px);
  }

  .viewer-figure img {
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    max-width: calc(100vw - 16px);
  }
}

/* It fades in, the image growing a little; with the script, view
 * transitions do it instead (the zoom from the thumbnail, a crossfade
 * between shots), and this would run again on each change. */
@media (prefers-reduced-motion: no-preference) {
  .viewer:target {
    animation: viewer-in 0.25s var(--ease);
  }

  .viewer:target .viewer-figure {
    animation: viewer-zoom 0.35s var(--ease);
  }

  .viewer-vt .viewer:target,
  .viewer-vt .viewer:target .viewer-figure {
    animation: none;
  }

  ::view-transition-group(viewer-shot) {
    animation-duration: 0.38s;
    animation-timing-function: var(--ease);
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.22s;
  }
}

@keyframes viewer-in {
  from {
    opacity: 0;
  }
}

@keyframes viewer-zoom {
  from {
    opacity: 0;
    scale: 0.92;
  }
}

/* The browser against Revue, told as a diff (home). */
.diff {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}

.diff-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.diff-head .file {
  color: var(--ink);
}

.diff-head .stat-add {
  color: var(--add-mark);
}

.diff-head .stat-del {
  color: var(--del-mark);
}

.diff-hunk {
  padding: 6px 18px;
  background: var(--surface-sunken);
  color: var(--ink-faint);
  font-size: 13px;
}

.dl {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 5px 18px 5px 0;
}

.dl .m {
  text-align: center;
  font-weight: 700;
}

.dl.del {
  background: var(--del-bg);
  box-shadow: inset 3px 0 0 var(--del-mark);
}

.dl.del .m {
  color: var(--del-mark);
}

.dl.del .t {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in oklab, var(--del-mark) 55%, transparent);
}

.dl.add {
  background: var(--add-bg);
  box-shadow: inset 3px 0 0 var(--add-mark);
}

.dl.add .m {
  color: var(--add-mark);
}

.dl.add .t {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
}

.dl .t {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Tabs picked with hidden radio buttons, no script: the editors
 * (integrations) and the systems and ways to install (downloads). */
.pick > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs {
  margin: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.tabs label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.tabs label .icon {
  width: 18px;
  height: 18px;
}

.tabs label:hover {
  color: var(--ink);
}

/* The editors (integrations, EDITOR_TABS then PLANNED_EDITORS). */
.editor-pick {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.editor-pick > .editor-radio:nth-of-type(1):checked ~ .tabs label:nth-child(1),
.editor-pick > .editor-radio:nth-of-type(2):checked ~ .tabs label:nth-child(2),
.editor-pick > .editor-radio:nth-of-type(3):checked ~ .tabs label:nth-child(3),
.editor-pick > .editor-radio:nth-of-type(4):checked ~ .tabs label:nth-child(4) {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.editor-pick > .editor-radio:nth-of-type(1):focus-visible ~ .tabs label:nth-child(1),
.editor-pick > .editor-radio:nth-of-type(2):focus-visible ~ .tabs label:nth-child(2),
.editor-pick > .editor-radio:nth-of-type(3):focus-visible ~ .tabs label:nth-child(3),
.editor-pick > .editor-radio:nth-of-type(4):focus-visible ~ .tabs label:nth-child(4) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.editor {
  display: none;
}

.editor-pick > .editor-radio:nth-of-type(1):checked ~ .editor:nth-of-type(1),
.editor-pick > .editor-radio:nth-of-type(2):checked ~ .editor:nth-of-type(2),
.editor-pick > .editor-radio:nth-of-type(3):checked ~ .editor:nth-of-type(3),
.editor-pick > .editor-radio:nth-of-type(4):checked ~ .editor:nth-of-type(4) {
  display: grid;
}

.editor-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.editor-text h3 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.editor-text .lead {
  font-size: 18px;
}

/* Terminal blocks */
.term {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 24px;
  padding: 14px 18px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}

.term code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.term .ps {
  color: var(--ink-faint);
  user-select: none;
}

/* Long commands wrap under themselves, past the prompt. */
.term .line {
  display: block;
  padding-left: 2ch;
  text-indent: -2ch;
}

.term .ps::after {
  content: " ";
}

/* A block of commands with its Copy button (downloads.js shows it). */
.copyable {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.copyable .term {
  flex: 1 1 auto;
}

.copyable:has(button.copy:not([hidden])) .term {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

button.copy {
  flex: none;
  min-width: 72px;
  border: 1px solid var(--line);
  border-left: 0;
  background: var(--surface);
  color: var(--ink-muted);
  border-radius: 0 10px 10px 0;
  padding: 0 14px;
  cursor: pointer;
  font: 500 13px var(--font-sans);
}

button.copy:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

button.copy.done {
  color: var(--success);
}

/* Phones: the button under the commands, so they keep the width. */
@media (max-width: 640px) {
  .copyable {
    flex-direction: column;
  }

  .copyable:has(button.copy:not([hidden])) .term {
    border-radius: 10px 10px 0 0;
  }

  button.copy {
    min-height: 40px;
    border-left: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }
}

/* Notices */
.notice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  font-size: 15px;
  line-height: 23px;
  color: var(--ink-muted);
}

.notice > .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--info);
}

.notice.warn > .icon {
  color: var(--warning);
}

.notice strong {
  color: var(--ink);
}

.notice > div > * + * {
  margin-top: 10px;
}

.notice .steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Downloads: the systems as cards picking the panel shown (pages.rs,
 * `downloads`), the visitor's own first. */
.get {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.os-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.os-tabs label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.os-tabs label:hover {
  border-color: var(--line-strong);
}

.os-tabs .n {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 17px;
}

.os-tabs .n .icon {
  width: 20px;
  height: 20px;
}

.os-tabs .d {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}

.yours {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.get > .os-pick:nth-of-type(1):checked ~ .os-tabs label:nth-child(1),
.get > .os-pick:nth-of-type(2):checked ~ .os-tabs label:nth-child(2),
.get > .os-pick:nth-of-type(3):checked ~ .os-tabs label:nth-child(3) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: color-mix(in oklab, var(--accent-soft) 55%, var(--surface));
}

.get > .os-pick:nth-of-type(1):focus-visible ~ .os-tabs label:nth-child(1),
.get > .os-pick:nth-of-type(2):focus-visible ~ .os-tabs label:nth-child(2),
.get > .os-pick:nth-of-type(3):focus-visible ~ .os-tabs label:nth-child(3) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.os {
  display: none;
  padding: clamp(24px, 4vw, 40px);
  gap: 20px;
}

.get > .os-pick:nth-of-type(1):checked ~ .os:nth-of-type(1),
.get > .os-pick:nth-of-type(2):checked ~ .os:nth-of-type(2),
.get > .os-pick:nth-of-type(3):checked ~ .os:nth-of-type(3) {
  display: flex;
}

.os-top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.os-top > .stack {
  gap: 6px;
  flex: 1 1 340px;
}

.os-top h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.get-button {
  gap: 12px;
  min-height: 58px;
  padding: 8px 22px;
}

.get-button .icon {
  width: 22px;
  height: 22px;
}

.get-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.get-meta {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

.os .req {
  font-size: 14px;
  line-height: 21px;
  color: var(--ink-muted);
}

.os-cli {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.os-cli > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
}

.os p {
  color: var(--ink-muted);
}

.os .note {
  font-size: 14px;
  line-height: 21px;
}

.os .also {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* A system's ways to install, as tabs (pages.rs, `methods`). Up to six. */
.methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-self: flex-start;
  max-width: 100%;
}

.method-tabs label {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
}

.method-tabs label:hover {
  color: var(--ink);
}

.methods > input:nth-of-type(1):checked ~ .method-tabs label:nth-child(1),
.methods > input:nth-of-type(2):checked ~ .method-tabs label:nth-child(2),
.methods > input:nth-of-type(3):checked ~ .method-tabs label:nth-child(3),
.methods > input:nth-of-type(4):checked ~ .method-tabs label:nth-child(4),
.methods > input:nth-of-type(5):checked ~ .method-tabs label:nth-child(5),
.methods > input:nth-of-type(6):checked ~ .method-tabs label:nth-child(6) {
  background: var(--surface-hover);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.methods > input:nth-of-type(1):focus-visible ~ .method-tabs label:nth-child(1),
.methods > input:nth-of-type(2):focus-visible ~ .method-tabs label:nth-child(2),
.methods > input:nth-of-type(3):focus-visible ~ .method-tabs label:nth-child(3),
.methods > input:nth-of-type(4):focus-visible ~ .method-tabs label:nth-child(4),
.methods > input:nth-of-type(5):focus-visible ~ .method-tabs label:nth-child(5),
.methods > input:nth-of-type(6):focus-visible ~ .method-tabs label:nth-child(6) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.method {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.methods > input:nth-of-type(1):checked ~ .method:nth-of-type(1),
.methods > input:nth-of-type(2):checked ~ .method:nth-of-type(2),
.methods > input:nth-of-type(3):checked ~ .method:nth-of-type(3),
.methods > input:nth-of-type(4):checked ~ .method:nth-of-type(4),
.methods > input:nth-of-type(5):checked ~ .method:nth-of-type(5),
.methods > input:nth-of-type(6):checked ~ .method:nth-of-type(6),
.method:only-of-type {
  display: flex;
}

/* Folded away: every file, checksums and the other ways. */
.more {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.more summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  width: fit-content;
  max-width: 100%;
}

.more-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
}

.file-list {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 16px;
  font-size: 14px;
}

.file-list li + li {
  border-top: 1px solid var(--line);
}

.file-name {
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.file-kind,
.file-size {
  color: var(--ink-muted);
  white-space: nowrap;
}

.file-sum {
  font-family: var(--font-mono);
  font-size: 12px;
}

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

  .file-name {
    grid-column: 1 / -1;
  }
}

/* Numbered steps */
.steps-list {
  list-style: none;
  counter-reset: s;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.steps-list li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.steps-list li::before {
  content: counter(s);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
  font: 600 14px/28px var(--font-sans);
  text-align: center;
}

.steps-list li strong {
  color: var(--ink);
}

/* Privacy: how the Revue account keeps sign-ins encrypted. */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  list-style: none;
}

.node {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.node .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.node p {
  color: var(--ink-muted);
}

.node.lock {
  border-style: dashed;
  background: var(--surface-sunken);
}

.node .term {
  font-size: 13px;
  padding: 10px 12px;
}

.cipher {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}

/* Long-form text: the privacy page's details. */
.prose {
  max-width: 820px;
  font-size: 17px;
  line-height: 1.7;
}

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

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 48px;
}

.prose h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  margin-top: 32px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-box {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 100%;
}

.table-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.table-box th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
}

.table-box td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-muted);
  min-width: 160px;
}

.table-box td:first-child {
  color: var(--ink);
  font-weight: 500;
}

.table-box tr:last-child td {
  border-bottom: 0;
}

/* Features: the groups' menu sticks under the header. */
.fnav {
  position: sticky;
  top: 69px;
  z-index: 5;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.fnav .wrap {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-block: 10px;
}

.fnav a {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
}

.fnav a:hover {
  background: var(--surface-hover);
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 760px) {
  .fnav {
    top: 0;
  }
}

[id] {
  scroll-margin-top: 90px;
}

.fgroup {
  scroll-margin-top: 140px;
}

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

/* The docs' search (search.rs): a field and its button, sent to
 * /docs/search. */
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  width: 260px;
  max-width: 100%;
  padding: 0 4px 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-sunken);
  min-width: 0;
}

.search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  color: var(--ink);
  font: 400 15px var(--font-sans);
  outline: none;
}

.search input::placeholder {
  color: var(--ink-faint);
}

.search-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-muted);
  font: 600 15px var(--font-sans);
  cursor: pointer;
}

.search-go:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.search-go .icon {
  width: 18px;
  height: 18px;
}

.search-lg {
  width: 100%;
  height: 58px;
  padding: 0 6px 0 18px;
  border-radius: 12px;
}

.search-lg input {
  font-size: 18px;
}

.search-lg .search-go {
  height: 44px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--on-accent);
}

.search-lg .search-go:hover {
  background: var(--accent);
  color: var(--on-accent);
  filter: brightness(1.06);
}

@media (max-width: 760px) {
  .site-header .search {
    order: 4;
    flex: 1 1 100%;
    width: auto;
  }
}
