/*
 * ApexCut — the website.
 *
 * Same idea as the app's own design language ("slab", see docs/design.md): one dark ground,
 * hairline separations, colour used only where it means something. The page adds a single warm
 * accent, taken from the app icon, for the things you can press.
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #0b0c0e;
  --bg-raised: #121316;
  --bg-sunken: #08090a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #f3f4f6;
  --fg-2: #a2a8b2;
  --fg-3: #878e98;
  --accent: #ff6a3d;
  --accent-2: #ff3d7f;
  --accent-soft: rgba(255, 106, 61, 0.14);
  --corner: #d9a04a;
  --brake: #4fb3ad;
  --mark: #ff5fae;
  --picture: #6f9ee8;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --max: 1180px;
  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 11vw, 148px);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, monospace;
  color-scheme: dark;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* body links: the underline grows from the left on hover */
main p a:not(.btn),
.docs-body li a,
.site-footer a,
.faq a {
  color: var(--fg);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition:
    background-size 0.22s ease,
    color 0.18s ease;
}

main p a:not(.btn):hover,
.docs-body li a:hover,
.site-footer a:hover,
.faq a:hover {
  color: #fff;
  background-size: 100% 2px;
}

.site-footer a {
  color: var(--fg-3);
  background-size: 0% 1px;
}

.site-footer a:hover {
  color: var(--fg);
  background-size: 100% 1px;
}

p {
  margin: 0 0 1em;
  color: var(--fg-2);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  color: var(--fg);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  letter-spacing: -0.018em;
}

strong {
  color: var(--fg);
  font-weight: 600;
}

/* the header floats over the page, so anything a link jumps to stops below it */
:where(section, article, h2, h3)[id] {
  scroll-margin-top: 90px;
}

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

::selection {
  background: var(--accent);
  color: #1b0d06;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 0 0 10px 0;
}

.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section {
  padding-block: var(--section);
}

/* a section that carries on from the one above it, without the gap counted twice */
section.is-tight {
  padding-top: 0;
}

/* the band the cameras sit in */
section.is-sunken {
  background: var(--bg-sunken);
  border-block: 1px solid var(--line);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 62ch;
  color: var(--fg-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section-head {
  max-width: 70ch;
  margin-bottom: clamp(32px, 5vw, 60px);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header[data-scrolled='true'] {
  border-bottom-color: var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 0.94rem;
  color: var(--fg-2);
}

.site-nav a {
  position: relative;
  padding-block: 4px;
  transition: color 0.18s ease;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

.site-nav a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 860px) {
  .site-nav a[data-optional] {
    display: none;
  }
}

/* on a phone the header keeps only what you would tap */
@media (max-width: 620px) {
  .site-header .wrap {
    gap: 14px;
  }

  .site-nav {
    gap: 16px;
    font-size: 0.9rem;
  }

  .site-nav a[data-small-hide] {
    display: none;
  }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: var(--fg);
  background: var(--fg);
  color: #0c0d10;
  font-weight: 640;
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #0c0d10;
}

.btn-primary:active {
  background: var(--fg);
}

.btn-small {
  padding: 9px 16px;
  font-size: 0.9rem;
}

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

.note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--fg-3);
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px) 0;
  isolation: isolate;
  overflow: clip;
}

.hero-bg {
  position: absolute;
  inset: -10% 0 auto;
  height: min(86vh, 900px);
  z-index: -2;
  object-fit: cover;
  width: 100%;
  opacity: 0.9;
  object-position: 60% 42%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 40%, transparent 86%);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 4%, rgba(11, 12, 14, 0.86) 34%, rgba(11, 12, 14, 0.18) 72%),
    linear-gradient(180deg, rgba(11, 12, 14, 0.6) 0%, transparent 26%, var(--bg) 88%);
  pointer-events: none;
}

/* narrower than this the words run the full width, so the picture has to give way under them */
@media (max-width: 1100px) {
  .hero::after {
    background:
      linear-gradient(90deg, var(--bg) 8%, rgba(11, 12, 14, 0.88) 58%, rgba(11, 12, 14, 0.6) 100%),
      linear-gradient(180deg, rgba(11, 12, 14, 0.66) 0%, rgba(11, 12, 14, 0.22) 30%, var(--bg) 88%);
  }
}

.hero-copy {
  max-width: 21ch;
}

.hero p.lede {
  max-width: 54ch;
  margin-top: 22px;
}

.hero .btn-group {
  margin-top: 34px;
}

.hero-shot {
  margin: clamp(44px, 7vw, 84px) auto 0;
  max-width: 1320px;
  width: min(100%, calc(100vw - 2 * var(--pad)));
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--bg-raised);
}

.hero-shot img {
  width: 100%;
}

/* the claims under the hero */
.facts {
  border-block: 1px solid var(--line);
  padding-block: 30px;
  background: var(--bg-sunken);
}

.facts ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--fg-2);
  text-wrap: pretty;
}

.facts li b {
  display: block;
}

.facts b {
  color: var(--fg);
  font-weight: 600;
}

/* ---------------------------------------------------------------- features */
.feature {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1.15fr;
  }

  .feature[data-flip='true'] .feature-media {
    order: -1;
  }
}

.feature + .feature {
  margin-top: clamp(64px, 9vw, 130px);
}

.feature-media {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: 0 20px 60px -34px rgba(0, 0, 0, 0.9);
}

/* a picture that is already a screenshot of a panel needs no frame around it */
.feature-media.is-bare {
  border: none;
  background: none;
}

.feature-media img {
  width: 100%;
}

.feature h3 {
  margin-bottom: 10px;
}

.feature p:last-child {
  margin-bottom: 0;
}

.feature-note {
  margin-top: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
  font-size: 0.92rem;
  color: var(--fg-3);
}

/* -------------------------------------------------------------- step cards */
.steps {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  counter-reset: step;
}

.step {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  font-size: 0.85rem;
  font-weight: 600;
}

.step h3 {
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------- cards, grid */
.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.cards.is-spaced {
  margin-top: clamp(64px, 9vw, 130px);
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition:
    border-color 0.24s ease,
    transform 0.24s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}

.card h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  font-size: 0.94rem;
}

.card-media {
  padding: 0;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}

.card-media img[data-fit='contain'] {
  object-fit: contain;
  padding: 14px 14px 0;
}

.card-media div {
  padding: 20px 24px 24px;
}

/* --------------------------------------------------- the picky demo (real) */
.demo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: clamp(20px, 3vw, 30px);
}

.demo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.demo-head h3 {
  margin: 0;
  font-size: 1rem;
}

.demo-readout {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--fg-2);
}

.demo-readout b {
  color: var(--fg);
}

.demo-canvas {
  width: 100%;
  height: 168px;
  border-radius: 8px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--fg-3);
}

.demo-controls label,
.demo-controls span {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .demo-controls {
    gap: 10px;
    font-size: 0.8rem;
  }
}

input[type='range'] {
  flex: 1;
  accent-color: var(--fg-2);
  height: 22px;
  cursor: grab;
}

input[type='range']:active {
  cursor: grabbing;
  accent-color: var(--fg);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--fg-3);
}

.legend span::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 2px;
  background: currentColor;
  vertical-align: -1px;
}

.legend .is-corner {
  color: var(--corner);
}

.legend .is-brake {
  color: var(--brake);
}

.legend .is-line {
  color: var(--fg-3);
}

/* ------------------------------------------------------- before/after slide */
.compare {
  position: relative;
  cursor: ew-resize;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  touch-action: pan-y;
  user-select: none;
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.compare .after {
  clip-path: inset(0 0 0 var(--split, 50%));
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 2px;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-1px);
  pointer-events: none;
}

.compare:hover .compare-handle::after,
.compare:focus-within .compare-handle::after {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.compare-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.compare-tag {
  position: absolute;
  bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  font-size: 0.78rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: #fff;
}

.compare-tag.is-left {
  left: 12px;
}

.compare-tag.is-right {
  right: 12px;
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

/* the keyboard still gets a visible handle */
.compare:focus-within .compare-handle {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------- format switcher */
.formats {
  display: grid;
  gap: 20px;
}

.format-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1;
  background: var(--bg-sunken);
}

.format-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.format-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 8, 0.66);
  --w: 100%;
  --h: 56.25%;
  -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-size:
    100% 100%,
    var(--w) var(--h);
  mask-size:
    100% 100%,
    var(--w) var(--h);
  -webkit-mask-position:
    0 0,
    center;
  mask-position:
    0 0,
    center;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition:
    -webkit-mask-size 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    mask-size 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.format-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: var(--w, 100%);
  height: var(--h, 56.25%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  transition:
    width 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.format-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.chip:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.chip:active {
  transform: translateY(1px);
}

.chip[aria-pressed='true'] {
  background: var(--fg);
  border-color: var(--fg);
  color: #101114;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .format-mask,
  .format-frame {
    transition: none;
  }
}

/* ----------------------------------------------------------- figure labels */
.fig {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--fg-3);
}

.fig-centre {
  justify-content: center;
}

.fig > span:first-child {
  flex: none;
  white-space: nowrap;
}

.fig b {
  color: var(--fg-2);
  font-weight: 500;
}

figure {
  margin: 0;
}

/* ------------------------------------------------------------------ tables */
.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

.specs th {
  width: 34%;
  font-weight: 560;
  color: var(--fg);
}

.specs td {
  color: var(--fg-2);
}

/* --------------------------------------------------------------------- faq */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 560;
  color: var(--fg);
  list-style: none;
}

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

.faq summary:hover {
  color: #fff;
}

.faq summary:hover::after {
  color: var(--fg);
}

.faq summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--fg-3);
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq p {
  margin: 0 0 18px;
  max-width: 74ch;
  font-size: 0.97rem;
}

/* ------------------------------------------------------------ closing call */
.cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: clamp(38px, 6vw, 72px);
  text-align: center;
}

.cta h2 {
  margin-bottom: 14px;
}

.cta .lede {
  margin-inline: auto;
}

.cta .btn-group {
  justify-content: center;
  margin-top: 28px;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 44px;
  font-size: 0.9rem;
  color: var(--fg-3);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}

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

/* -------------------------------------------------------- reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }

    @keyframes reveal-in {
      from {
        opacity: 0;
        transform: translateY(22px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}

/* ------------------------------------------------------------- docs layout */
.docs {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
  align-items: start;
}

@media (min-width: 960px) {
  .docs {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .docs-nav {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

/* on a phone the contents fold away; on a desktop they are simply a list */
.docs-toc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 560;
  cursor: pointer;
  list-style: none;
}

.docs-toc > summary::-webkit-details-marker {
  display: none;
}

.docs-toc > summary::after {
  content: '+';
  color: var(--fg-3);
  font-size: 1.2rem;
  line-height: 1;
}

.docs-toc[open] > summary::after {
  content: '–';
}

.docs-toc[open] > summary {
  margin-bottom: 10px;
}

@media (min-width: 960px) {
  .docs-toc > summary {
    display: none;
  }
}

.docs-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
}

.docs-nav li + li {
  margin-top: 2px;
}

.docs-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--fg-3);
}

.docs-nav a {
  transition:
    color 0.16s ease,
    background-color 0.16s ease;
}

.docs-nav a:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav a[aria-current='true'] {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.docs-nav .group {
  margin: 22px 0 6px;
  padding-left: 12px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* the documentation opens quieter than the landing page does */
.docs-body h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.docs-intro {
  margin-bottom: 40px;
}

.docs-body h2 {
  margin-top: 0;
  scroll-margin-top: 90px;
}

.docs-body section {
  padding-block: 0 clamp(44px, 6vw, 72px);
}

.docs-body h3 {
  margin-top: 30px;
  scroll-margin-top: 90px;
}

.docs-body ul,
.docs-body ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
  color: var(--fg-2);
}

.docs-body li {
  margin-bottom: 0.45em;
}

.docs-body img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 22px 0;
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-raised);
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--fg);
  text-align: center;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--fg);
}

.callout {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-raised);
  font-size: 0.95rem;
}

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