/* Room to Prove's website. The colours are the app's Paper theme, and its Night theme when the
 * reader's system is dark; the type is the system's own, as in the app, which ships no font. */

:root {
  --bg: #fbfaf7;
  --panel: #f3f1ea;
  --surface: #fffdf8;
  --fg: #1d1d1f;
  --muted: #6b6b70;
  --line: #dedbd2;
  --link: #2459b8;
  --accent: #2f6fde;
  --accent-ink: #ffffff;
  --logo-ink: #fffdf8;
  --logo-stone: #f2a66d;
  --secondary: #d9692b;
  --good: #1f7a3e;
  --env-definition: #21705f;
  --env-theorem: #2f4f9e;
  --env-proposition: #5d3f9c;
  --env-proof: #6b6b70;
  --dot: #e4e0d5;
  --shadow: 0 1px 2px rgb(30 25 10 / 6%), 0 12px 32px rgb(30 25 10 / 10%);
  --serif: Charter, 'Bitstream Charter', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --radius: 14px;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181a;
    --panel: #212124;
    --surface: #1e1f23;
    --fg: #ececee;
    --muted: #9a9aa2;
    --line: #34343a;
    --link: #8db4ff;
    --accent: #79a6ff;
    --accent-ink: #0f1420;
    --logo-ink: #131a21;
    --logo-stone: #131a21;
    --secondary: #ff9a5c;
    --good: #6fd08f;
    --env-definition: #6fd0b6;
    --env-theorem: #8ec4e8;
    --env-proposition: #c3a7f6;
    --env-proof: #9a9aa2;
    --dot: #2a2a2f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

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

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

:not(pre) > code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- header and footer */

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

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

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

/* The logo keeps its own colours: the theorem's indigo, ivory walls, one ember stone. */
.logo-tile {
  fill: var(--env-theorem);
}

.logo-mark {
  fill: none;
  stroke: var(--logo-ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.logo-stone {
  fill: var(--logo-stone);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a:not(.button) {
  color: var(--fg);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current='page'] {
  background: var(--panel);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  font: inherit;
  font-size: 15px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  font-size: 14.5px;
}

.footer-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: flex-end;
}

.footer-row nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-row nav a:hover {
  color: var(--fg);
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- buttons, chips, icons */

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .soft {
  fill: currentColor;
  fill-opacity: 0.16;
  stroke: none;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.small {
  padding: 7px 14px;
  font-size: 14.5px;
  margin-left: 8px;
}

.button.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.button.disabled {
  background: var(--panel);
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}

.button.disabled:hover {
  transform: none;
  box-shadow: none;
}

.chip {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid currentColor;
}

.badge.good {
  color: var(--good);
}

/* ---------------------------------------------------------------- the front page */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

/* The name with its mark, then what it is in one line. */
.hero h1.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.28em;
  margin-bottom: 16px;
  font-size: clamp(36px, 4.8vw, 56px);
  white-space: nowrap;
}

.hero-brand .logo {
  flex: none;
  width: 1.08em;
  height: 1.08em;
}

.hero-tagline {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 82%, var(--bg));
  margin: 0 0 26px;
  max-width: 38em;
}

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

.hero-points {
  list-style: none;
  margin: -10px 0 26px;
  padding: 0;
  font-size: 17px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--fg) 82%, var(--bg));
}

.hero-points li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
}

.hero-points li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.fine {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.window {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}

.window img {
  display: block;
  width: 100%;
}

/* Beside text, a tall screenshot (a panel) shows its top part, no taller than the text. */
.split .window img {
  max-height: 540px;
  object-fit: cover;
  object-position: top;
}

.shot-missing {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 80px 0;
}

.section.tight {
  padding: 40px 0 72px;
}

.section.alt {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-title.small {
  font-size: 23px;
  margin-top: 8px;
}

.section-lead {
  max-width: 44em;
  margin: 0 0 36px;
  font-size: 18px;
  color: color-mix(in srgb, var(--fg) 78%, var(--bg));
}

.section-more {
  margin: 28px 0 0;
  font-weight: 600;
}

.section-more a {
  text-decoration: none;
}

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

.feature {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature h3 {
  margin: 14px 0 6px;
  font-size: 17.5px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* The features in brief, after the showcases: an icon, a name, a few words. */
.features.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.features.compact .feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
}

.features.compact .feature h3 {
  margin: 1px 0 2px;
  font-size: 15.5px;
}

.features.compact .feature p {
  font-size: 14px;
}

.features.compact .feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.compare-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.lean-source {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #1d2028;
  color: #e6e8ee;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  height: calc(100% - 30px);
}

.reading {
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 4px solid var(--env-theorem);
  background: var(--surface);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  height: calc(100% - 30px);
}

.reading p {
  margin: 0 0 6px;
}

.reading ol {
  margin: 12px 0 0;
  padding-left: 22px;
  font-size: 15.5px;
}

.reading li {
  margin-bottom: 6px;
}

.reading a {
  color: var(--link);
  text-decoration: underline dotted;
}

.reading-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 15px;
}

.reading-head span:not(.badge) {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.reading-head .badge {
  margin-left: auto;
}

.reading .hyp {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.reading .lemma {
  padding: 0 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--link) 12%, var(--surface));
  color: var(--link);
  font-family: var(--sans);
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}

/* Figures from the library, two by two. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mosaic-item {
  margin: 0;
  padding: 8px 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.mosaic-item:hover {
  transform: translateY(-3px) rotate(-0.4deg);
}

/* Each figure whole, on the figures' own paper (the app's Paper theme), so none is cropped. */
.mosaic-item img {
  display: block;
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: contain;
  background: #f7f3ea;
  border-radius: 9px;
}

.mosaic-item figcaption {
  padding: 6px 4px 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* A section with its picture on the left. */
.split.reverse > div:first-child {
  order: 2;
}

@media (max-width: 900px) {
  .split.reverse > div:first-child {
    order: 0;
  }
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--good);
  border-bottom: 2.5px solid var(--good);
  transform: rotate(-45deg);
}

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

/* What the app checks: an icon, a name, one line, and what it looks like in the app. */
.trust-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--good);
  background: color-mix(in srgb, var(--good) 13%, var(--surface));
}

.trust-card h3 {
  margin: 12px 0 4px;
  font-size: 16.5px;
}

.trust-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.trust-chips {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip-pill {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.chip-pill.good {
  color: var(--good);
  border-color: currentColor;
  background: color-mix(in srgb, var(--good) 8%, var(--surface));
}

.chip-pill.warn {
  color: var(--secondary);
  border-color: currentColor;
  background: color-mix(in srgb, var(--secondary) 8%, var(--surface));
}

.chip-pill.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.chip-arrow {
  color: var(--muted);
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card strong {
  font-size: 16.5px;
}

.card span:last-child:not(.card-group) {
  color: var(--muted);
  font-size: 15px;
}

/* Six parts, three by two; two then one on narrower screens. */
.cards.api-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

/* A part an author or agent drives: its icon, its name, a line, and what is written. */
.api-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.api-card .api-line {
  color: var(--muted);
  font-size: 14.5px;
  margin: 4px 0 10px;
}

.api-code {
  margin-top: auto;
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  background: #1d2028;
  color: #e6e8ee;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-group {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta-box {
  text-align: center;
  padding: 56px 24px;
  border-radius: 22px;
  background:
    radial-gradient(var(--dot) 1.2px, transparent 1.3px) 0 0 / 22px 22px,
    var(--surface);
  border: 1px solid var(--line);
  max-width: 860px;
}

.cta-box h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 34px;
}

.cta-box p {
  max-width: 36em;
  margin: 0 auto 24px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- download */

.page-head {
  padding: 64px 0 24px;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
}

.page-head h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 50px);
  letter-spacing: -0.02em;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.download {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.download-head {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--accent);
}

.download-head h3 {
  margin: 0;
  color: var(--fg);
  font-size: 18px;
}

.download-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.download dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 14px;
}

.download dt {
  color: var(--muted);
}

.download dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.download .button {
  justify-content: center;
  margin-top: auto;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
}

.steps {
  padding-left: 22px;
}

.steps li {
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------- the docs */

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 40px;
  padding-top: 32px;
}

.docs-nav,
.docs-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 14.5px;
}

.docs-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.docs-group-name {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px 10px;
}

.docs-nav a,
.docs-toc a {
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.35;
}

.docs-toc a {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
}

.docs-nav a:hover,
.docs-toc a:hover {
  background: var(--panel);
}

.docs-nav a[aria-current='page'] {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--link);
  font-weight: 600;
}

.docs-article {
  min-width: 0;
  max-width: 780px;
}

.crumb {
  font-size: 14px;
  color: var(--muted);
}

.crumb a {
  color: var(--muted);
}

.docs-cards {
  margin-top: 8px;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 48px 0 24px;
}

.pager .card {
  min-width: 220px;
}

.pager .card.next {
  text-align: right;
}

/* The help's pages, as prose. */
.prose {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
}

.prose h1 {
  margin: 8px 0 18px;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  padding-top: 0.8em;
  border-top: 1px solid var(--line);
  font-size: 27px;
  line-height: 1.2;
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 21px;
}

.prose h4 {
  margin: 2em 0 0.4em;
  font-family: var(--sans);
  font-size: 16px;
}

.prose h4 code {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 15px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--link);
}

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

.prose li {
  margin-bottom: 0.3em;
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--env-theorem);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  font-size: 16.5px;
}

.prose blockquote p {
  margin: 0.4em 0;
}

.table {
  overflow-x: auto;
  margin: 1.2em 0 1.6em;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

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

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

.table th {
  background: var(--panel);
  font-weight: 600;
}

.code {
  margin: 1.2em 0 1.6em;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  font-family: var(--sans);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.copy {
  font: inherit;
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.copy:hover {
  border-color: var(--accent);
}

.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 13.5px;
}

.callout {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-size: 16.5px;
}

.callout-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--link);
  margin-bottom: 4px;
}

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

.callout-body > :last-child {
  margin-bottom: 0;
}

.env {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--env-theorem);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--env-theorem) 7%, var(--surface));
}

.env-definition {
  border-left-color: var(--env-definition);
  background: color-mix(in srgb, var(--env-definition) 7%, var(--surface));
}

.env-proposition {
  border-left-color: var(--env-proposition);
  background: color-mix(in srgb, var(--env-proposition) 7%, var(--surface));
}

.env-proof {
  border-left-color: var(--env-proof);
  background: transparent;
}

.env-title {
  font-family: var(--sans);
  font-size: 15px;
}

.env-title span {
  color: var(--muted);
}

.env-body > :last-child {
  margin-bottom: 0;
}

.app-link {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

.rtp-figure {
  margin: 1.4em 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.rtp-figure img {
  display: block;
  margin: 0 auto;
}

/* A screenshot from the app already has the figure's frame and caption. */
.rtp-figure.shot {
  padding: 0;
  border: none;
  background: none;
}

.rtp-figure pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
}

.figure-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: 4px 6px;
}

.rtp-figure figcaption {
  margin-top: 6px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.math svg {
  vertical-align: middle;
}

.math.display {
  margin: 1em 0;
  text-align: center;
  overflow-x: auto;
}

/* ---------------------------------------------------------------- narrow screens */

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

  .docs-toc {
    display: none;
  }
}

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

  .features,
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav .button.small {
    margin: 6px 0 0;
    justify-content: center;
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .docs-nav {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  .docs-group {
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }

  .features,
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }

  .features.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 44px 0 40px;
  }

  .section {
    padding: 56px 0;
  }

  .footer-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-row nav {
    justify-content: flex-start;
  }

  .pager {
    flex-direction: column;
  }

  .prose {
    font-size: 17px;
  }
}
