:root {
  color-scheme: dark;
  --bg: #060c14;
  --panel: #0b1624;
  --panel-2: #101d2d;
  --panel-3: #15263a;
  --text: #edf5fb;
  --muted: #a3b6c8;
  --quiet: #71869a;
  --line: #20374b;
  --cyan: #61dafb;
  --cyan-soft: #b3edfb;
  --amber: #ffb547;
  --pink: #ff69a5;
  --green: #55d69e;
  --purple: #b791ff;
  --red: #ff6b78;
  --content: 860px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 82% 8%, rgba(97, 218, 251, 0.08), transparent 27rem),
    linear-gradient(rgba(97, 218, 251, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 218, 251, 0.022) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}

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

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

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

kbd {
  padding: 2px 6px;
  color: var(--cyan-soft);
  background: #07111c;
  border: 1px solid #36536a;
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: 0.82em;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 9px 13px;
  color: #051019;
  background: var(--cyan);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 30px;
  background: rgba(6, 12, 20, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.header-links {
  display: flex;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.header-links a:hover,
.header-links a:focus-visible {
  color: var(--text);
}

.github-link {
  padding: 7px 12px;
  color: var(--cyan);
  border: 1px solid rgba(97, 218, 251, 0.32);
  border-radius: 5px;
}

.docs-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.docs-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  padding: 34px 26px;
  overflow-y: auto;
  background: rgba(7, 15, 25, 0.72);
  border-right: 1px solid var(--line);
}

.sidebar-label {
  margin: 0 0 10px 11px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-sidebar nav {
  display: grid;
  gap: 3px;
  margin-bottom: 28px;
}

.docs-sidebar a {
  padding: 7px 11px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.docs-sidebar a:hover,
.docs-sidebar a:focus-visible {
  color: var(--text);
  background: var(--panel);
}

.docs-sidebar a[aria-current="page"] {
  color: var(--cyan-soft);
  background: rgba(97, 218, 251, 0.1);
  box-shadow: inset 2px 0 var(--cyan);
}

.docs-main {
  min-width: 0;
}

.content {
  width: min(var(--content), calc(100vw - 330px));
  margin: 0 auto;
  padding: 78px 0 112px;
}

.content-wide {
  width: min(1080px, calc(100vw - 330px));
}

.page-kicker {
  margin: 0 0 16px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 730;
}

h2 {
  margin: 76px 0 20px;
  padding-top: 10px;
  font-size: clamp(29px, 3vw, 38px);
  font-weight: 700;
}

h3 {
  margin: 42px 0 14px;
  font-size: 22px;
  font-weight: 690;
}

p,
li {
  color: var(--muted);
}

p {
  margin: 0 0 18px;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: #c4d2dd;
  font-size: 19px;
  line-height: 1.65;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 720;
}

.button-primary {
  color: #06121b;
  background: var(--cyan);
  border-color: var(--cyan);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--cyan);
}

.section-intro {
  max-width: 700px;
  font-size: 17px;
}

.rule {
  height: 1px;
  margin: 72px 0;
  background: var(--line);
  border: 0;
}

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

.doc-card {
  position: relative;
  min-height: 190px;
  padding: 27px;
  background: linear-gradient(145deg, rgba(16, 29, 45, 0.95), rgba(9, 20, 32, 0.95));
  border: 1px solid var(--line);
  border-radius: 7px;
}

.doc-card:hover,
.doc-card:focus-visible {
  border-color: rgba(97, 218, 251, 0.55);
}

.doc-card-number {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
}

.doc-card h2,
.doc-card h3 {
  margin: 34px 0 9px;
  padding: 0;
  font-size: 23px;
}

.doc-card p {
  margin: 0;
  font-size: 14px;
}

.doc-card-arrow {
  position: absolute;
  top: 23px;
  right: 25px;
  color: var(--cyan);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 46px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.quick-facts div {
  padding: 22px;
  background: var(--panel);
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts strong {
  color: var(--text);
  font-size: 15px;
}

.quick-facts span {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 12px;
}

.steps {
  margin: 28px 0 0;
  padding: 0;
  counter-reset: step;
  list-style: none;
}

.steps > li {
  position: relative;
  min-height: 72px;
  padding: 2px 0 28px 52px;
  counter-increment: step;
}

.steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  color: var(--cyan-soft);
  content: counter(step);
  place-items: center;
  background: rgba(97, 218, 251, 0.09);
  border: 1px solid rgba(97, 218, 251, 0.28);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
}

.steps > li:not(:last-child)::after {
  position: absolute;
  top: 37px;
  bottom: 3px;
  left: 15px;
  width: 1px;
  content: "";
  background: var(--line);
}

.steps strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.steps p {
  margin: 0;
}

.callout {
  margin: 30px 0;
  padding: 19px 21px;
  background: rgba(97, 218, 251, 0.065);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-left: 3px solid var(--cyan);
  border-radius: 5px;
}

.callout-warning {
  background: rgba(255, 181, 71, 0.065);
  border-color: rgba(255, 181, 71, 0.22);
  border-left-color: var(--amber);
}

.callout strong {
  color: var(--text);
}

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

pre {
  margin: 24px 0 30px;
  padding: 22px 24px;
  overflow-x: auto;
  color: #c4d3df;
  background: #030910;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.75;
  tab-size: 2;
}

.code-key { color: var(--cyan); }
.code-value { color: var(--amber); }
.code-string { color: #d6ebf5; }
.code-comment { color: var(--quiet); }

.inline-code {
  padding: 2px 5px;
  color: var(--cyan-soft);
  background: rgba(97, 218, 251, 0.08);
  border-radius: 3px;
  font-size: 0.9em;
}

.shot {
  margin: 34px 0 42px;
}

.shot img {
  width: 100%;
  height: auto;
  background: #02070b;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.zoomable-image {
  cursor: zoom-in;
}

.zoomable-image:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: clamp(10px, 2vw, 28px);
  overflow: hidden;
  border: 0;
  background: rgba(2, 7, 11, 0.94);
}

.image-lightbox[open] {
  display: grid;
}

.image-lightbox::backdrop {
  background: rgba(2, 7, 11, 0.88);
  backdrop-filter: blur(8px);
}

.image-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - clamp(20px, 4vw, 56px));
  max-height: calc(100vh - clamp(20px, 4vw, 56px));
  object-fit: contain;
  border: 1px solid rgba(97, 218, 251, 0.32);
  border-radius: 8px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.58);
}

.image-lightbox-close {
  position: absolute;
  z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  color: var(--text);
  border: 1px solid rgba(97, 218, 251, 0.45);
  border-radius: 50%;
  background: rgba(6, 16, 27, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  outline: none;
}

.shot figcaption,
.diagram figcaption {
  margin-top: 12px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.5;
}

.shot figcaption strong,
.diagram figcaption strong {
  color: var(--muted);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 42px;
}

.shot-grid .shot {
  margin: 0;
}

.annotated-shot {
  position: relative;
}

.marker {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  color: #06121b;
  background: var(--amber);
  border: 2px solid white;
  border-radius: 50%;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.marker-one { top: 13%; left: 5%; }
.marker-two { top: 69%; left: 5%; }
.marker-three { top: 42%; left: 54%; }
.marker-four { top: 14%; right: 5%; }
.marker-five { bottom: 5%; left: 42%; }

.legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.legend b {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #07111f;
  background: var(--amber);
  border-radius: 50%;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
}

.table-wrap {
  margin: 26px 0 36px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

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

th {
  color: var(--cyan-soft);
  background: var(--panel);
  font-size: 12px;
  font-weight: 720;
}

td {
  color: var(--muted);
}

td:first-child {
  color: var(--text);
}

.diagram {
  margin: 32px 0 42px;
}

.diagram-frame {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.coordinate-frame {
  padding: 34px 42px 42px 54px;
}

.coordinate-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: visible;
  background:
    repeating-linear-gradient(90deg, rgba(97, 218, 251, 0.22) 0 1px, transparent 1px 5%) top / 100% 12px no-repeat,
    repeating-linear-gradient(0deg, rgba(97, 218, 251, 0.22) 0 1px, transparent 1px 8.33%) left / 12px 100% no-repeat,
    #07111f;
  border: 1px solid rgba(97, 218, 251, 0.42);
  border-radius: 4px;
  box-shadow: inset 0 0 0 12px rgba(3, 9, 15, 0.34);
}

.coordinate-mark {
  position: absolute;
  z-index: 4;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: clamp(8px, 1.2vw, 11px);
  line-height: 1;
}

.coordinate-mark-origin {
  top: -20px;
  left: -1px;
}

.coordinate-mark-x-mid {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.coordinate-mark-x-end {
  top: -20px;
  right: -1px;
}

.coordinate-mark-y-mid {
  top: 50%;
  left: -38px;
  transform: translateY(-50%);
}

.coordinate-mark-y-end {
  bottom: -4px;
  left: -45px;
}

.coordinate-safe {
  position: absolute;
  z-index: 1;
  border: 1px dashed rgba(97, 218, 251, 0.48);
}

.coordinate-safe span {
  position: absolute;
  top: 6px;
  right: 8px;
  color: rgba(171, 195, 216, 0.72);
  font-family: var(--mono);
  font-size: clamp(7px, 1vw, 10px);
}

.coordinate-safe-outer {
  inset: 6%;
}

.coordinate-safe-inner {
  inset: 11%;
  border-color: rgba(255, 181, 71, 0.48);
}

.coordinate-object {
  position: absolute;
  z-index: 3;
  display: flex;
  min-width: 0;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #eaf2fb;
  background: #143852;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 3px rgba(97, 218, 251, 0.09);
}

.coordinate-object strong {
  overflow: hidden;
  font-size: clamp(10px, 1.8vw, 20px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coordinate-object small {
  color: var(--cyan-soft);
  font-family: var(--mono);
  font-size: clamp(7px, 1vw, 10px);
  white-space: nowrap;
}

.coordinate-object-measured {
  top: 27.78%;
  left: 21.88%;
  width: 56.25%;
  height: 33.33%;
}

.coordinate-object-source {
  top: 14.81%;
  left: 6.25%;
  width: 87.5%;
  height: 12.96%;
}

.layout-controls {
  display: grid;
  gap: 12px;
}

.layout-button-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.layout-button-row-wide {
  grid-template-columns: repeat(2, 1fr);
}

.layout-button-row span,
.grid-option-row span {
  display: grid;
  min-height: 42px;
  color: var(--muted);
  background: #202630;
  border: 1px solid #3b4452;
  border-radius: 3px;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
}

.grid-options {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
}

.grid-options-panel {
  padding: 20px;
  background: #0a101d;
  border: 1px solid rgba(80, 215, 255, 0.7);
  border-radius: 5px;
}

.grid-options-panel > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}

.grid-option-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 20px;
}

.grid-option-row-short {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 0;
}

.grid-option-row span.active {
  color: #e7ebf2;
  background: #1b557a;
  border-color: #3ea6df;
}

.grid-contrast-label {
  display: flex;
  margin: 0 0 8px;
  justify-content: space-between;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.grid-contrast-track {
  height: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  background: #343d4e;
  border-radius: 999px;
}

.grid-contrast-track i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--cyan);
}

.grid-sample {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(97, 218, 251, 0.16) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(0deg, rgba(97, 218, 251, 0.16) 0 1px, transparent 1px 20px),
    #07111f;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.grid-sample::before {
  position: absolute;
  inset: 40px 54px 58px;
  content: "";
  background: #173a55;
  border: 2px solid var(--cyan);
}

.grid-sample span {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 20px;
  color: var(--cyan-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.grid-sample i {
  position: absolute;
  z-index: 2;
  right: 54px;
  bottom: 58px;
  width: 9px;
  height: 9px;
  background: var(--cyan);
  border: 1px solid white;
}

.motion-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.motion-type {
  min-height: 180px;
  padding: 20px;
  background: #08121e;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.motion-type strong {
  display: block;
  color: var(--text);
}

.motion-type span {
  display: block;
  margin-top: 8px;
  color: var(--quiet);
  font-size: 12px;
}

.motion-icon {
  position: relative;
  height: 70px;
  margin-bottom: 18px;
}

.bullet-dot {
  position: absolute;
  left: 8px;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
}

.bullet-dot::after {
  position: absolute;
  top: 2px;
  left: 15px;
  width: 82px;
  height: 3px;
  content: "";
  background: #577086;
}

.bullet-dot:nth-child(1) { top: 7px; }
.bullet-dot:nth-child(2) { top: 30px; opacity: 0.55; }
.bullet-dot:nth-child(3) { top: 53px; opacity: 0.2; }

.transition-icon::before,
.transition-icon::after {
  position: absolute;
  top: 10px;
  width: 74px;
  height: 48px;
  content: "";
  border: 1px solid;
  border-radius: 3px;
}

.transition-icon::before {
  left: 0;
  background: #102b3d;
  border-color: var(--cyan);
}

.transition-icon::after {
  right: 0;
  background: #30263e;
  border-color: var(--pink);
}

.transition-icon i {
  position: absolute;
  top: 29px;
  left: calc(50% - 14px);
  z-index: 2;
  width: 28px;
  height: 1px;
  background: var(--amber);
}

.transition-icon i::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 6px;
  height: 6px;
  content: "";
  border-top: 1px solid var(--amber);
  border-right: 1px solid var(--amber);
  transform: rotate(45deg);
}

.morph-icon span {
  position: absolute;
  border: 1px solid var(--cyan);
}

.morph-icon span:first-child {
  top: 18px;
  left: 7px;
  width: 52px;
  height: 38px;
  background: rgba(97, 218, 251, 0.12);
}

.morph-icon span:last-child {
  top: 4px;
  right: 8px;
  width: 92px;
  height: 60px;
  background: rgba(255, 181, 71, 0.1);
  border-color: var(--amber);
}

.state-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.state-box {
  min-height: 120px;
  padding: 18px;
  background: #07111c;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.state-box span,
.state-box strong {
  display: block;
}

.state-box span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
}

.state-box strong {
  margin-top: 24px;
  color: var(--text);
  font-size: 14px;
}

.state-arrow {
  color: var(--amber);
  font-size: 24px;
}

.reveal-sequence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-slide {
  min-height: 156px;
  padding: 17px;
  background: #07111f;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.mini-slide b {
  display: block;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 12px;
}

.mini-slide span {
  display: block;
  margin: 10px 0;
  color: var(--muted);
  font-size: 11px;
}

.mini-slide span::before {
  margin-right: 7px;
  color: var(--amber);
  content: "•";
}

.mini-slide .hidden-item {
  opacity: 0.15;
}

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

.phone-panel {
  min-height: 350px;
  padding: 18px;
  background: #050b12;
  border: 1px solid #365268;
  border-radius: 22px;
}

.phone-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel);
  border-radius: 8px;
}

.phone-tabs span {
  flex: 1;
  padding: 6px 2px;
  color: var(--quiet);
  border-radius: 5px;
  font-size: 9px;
  text-align: center;
}

.phone-tabs .active {
  color: #06121b;
  background: var(--cyan);
}

.phone-label {
  margin: 22px 0 7px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phone-copy {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.phone-next {
  margin-top: 18px;
  padding-top: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.phone-preview {
  display: grid;
  min-height: 165px;
  margin-top: 18px;
  color: var(--quiet);
  background: linear-gradient(140deg, #0b2134, #08111d);
  border: 1px solid var(--line);
  border-radius: 5px;
  place-items: center;
  font-size: 10px;
}

.phone-draw-line {
  width: 80px;
  height: 44px;
  border-top: 3px solid var(--amber);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.phone-controls {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.phone-controls span {
  flex: 1;
  padding: 7px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 9px;
  text-align: center;
}

.poll-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.poll-flow div {
  min-height: 110px;
  padding: 16px;
  background: #07111c;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.poll-flow b,
.poll-flow span {
  display: block;
}

.poll-flow b {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
}

.poll-flow span {
  margin-top: 17px;
  color: var(--muted);
  font-size: 12px;
}

.next-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 84px;
  padding: 25px 27px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.next-guide span,
.next-guide strong {
  display: block;
}

.next-guide span {
  color: var(--quiet);
  font-size: 11px;
}

.next-guide strong {
  margin-top: 3px;
  color: var(--text);
}

.next-guide b {
  color: var(--cyan);
  font-size: 21px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100vw - 330px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--quiet);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.site-footer nav {
  display: flex;
  gap: 17px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cyan);
}

.shot-toolbar {
  max-width: 690px;
}

.panel-guide {
  display: grid;
  grid-template-columns: minmax(270px, 370px) minmax(0, 1fr);
  gap: 34px;
  margin: 32px 0 46px;
  align-items: start;
}

.panel-capture {
  margin: 0;
}

.panel-capture img {
  width: min(100%, 360px);
}

.panel-capture-short img {
  width: min(100%, 380px);
}

.panel-copy {
  min-width: 0;
}

.control-list {
  margin: 0;
}

.control-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.control-list div:first-child {
  padding-top: 0;
}

.control-list dt {
  color: var(--cyan-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.control-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.selection-step {
  min-width: 0;
}

.selection-step > b {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
}

.selection-step > span {
  display: block;
  margin-top: 9px;
  color: var(--quiet);
  font-size: 11px;
}

.selection-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #07111f;
  border: 1px solid rgba(97, 218, 251, 0.22);
  border-radius: 4px;
}

.selection-canvas i {
  position: absolute;
  display: block;
  background: #173a55;
  border: 1px solid #35536e;
}

.selection-canvas i.selected {
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 2px rgba(97, 218, 251, 0.09);
}

.selection-canvas .object-a {
  top: 21%;
  left: 10%;
  width: 29%;
  height: 31%;
}

.selection-canvas .object-b {
  top: 47%;
  left: 38%;
  width: 27%;
  height: 28%;
}

.selection-canvas .object-c {
  top: 18%;
  right: 9%;
  width: 22%;
  height: 39%;
  background: #4f3920;
}

.selection-canvas em {
  position: absolute;
  inset: 12% 30% 15% 5%;
  border: 1px dashed var(--amber);
}

.selection-canvas.group-bounds::after {
  position: absolute;
  inset: 12% 5% 17% 6%;
  content: "selection bounds";
  padding: 5px;
  color: var(--cyan-soft);
  border: 1px dashed var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
}

.clipboard-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr) auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.clipboard-flow > div {
  display: flex;
  min-height: 150px;
  padding: 18px;
  flex-direction: column;
  justify-content: center;
  background: #091322;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.clipboard-flow > div strong {
  margin: 14px 0 5px;
  color: var(--text);
}

.clipboard-flow > div span {
  color: var(--quiet);
  font-size: 11px;
}

.clipboard-flow > div .clipboard-shortcut {
  color: var(--muted);
  white-space: nowrap;
}

.clipboard-flow > i {
  color: var(--amber);
  font-size: 20px;
  font-style: normal;
}

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

.workspace-mode > b,
.workspace-mode > span {
  display: block;
}

.workspace-mode > b {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
}

.workspace-mode > span {
  margin-top: 9px;
  color: var(--quiet);
  font-size: 11px;
}

.workspace-map {
  position: relative;
  display: grid;
  height: 145px;
  gap: 4px;
  padding: 5px;
  background: #050a12;
  border: 1px solid rgba(62, 166, 223, 0.32);
  border-radius: 4px;
}

.workspace-map > * {
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.wide-map {
  grid-template: "left canvas right" 1fr "timeline timeline timeline" 24px / 20% 1fr 20%;
}

.wide-map > i { grid-area: left; background: #14181f; }
.wide-map > .workspace-canvas { grid-area: canvas; background: #15334b; }
.wide-map > em { grid-area: right; background: #14181f; }
.wide-map > footer { grid-area: timeline; background: #1a1f28; }

.focus-map {
  padding: 12px;
}

.focus-map > .workspace-canvas {
  background: #15334b;
  border: 2px solid var(--cyan);
}

.narrow-map {
  grid-template: "top top" 22px "canvas panel" 1fr "timeline timeline" 22px / 1fr 28%;
}

.narrow-map > header {
  grid-area: top;
  padding: 3px 6px;
  color: var(--cyan-soft);
  background: #0d192a;
  font-family: var(--mono);
  font-size: 8px;
}

.narrow-map > .workspace-canvas { grid-area: canvas; background: #15334b; }
.narrow-map > em { grid-area: panel; background: #14181f; }
.narrow-map > footer { grid-area: timeline; background: #1a1f28; }

.shot-status img {
  border-radius: 4px;
}

.edit-scope-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.edit-scope-card {
  padding: 20px;
  background: #091322;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.edit-scope-card p {
  margin: 0 0 15px;
  color: var(--cyan-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.edit-scope-card strong,
.edit-scope-card > span {
  display: block;
}

.edit-scope-card strong {
  margin-top: 16px;
  color: var(--text);
}

.edit-scope-card > span {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 11px;
}

.scope-uses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.scope-uses i {
  display: block;
  aspect-ratio: 16 / 9;
  background: #173a55;
  border: 1px solid #35536e;
  border-radius: 2px;
}

.scope-uses i.changed {
  background: #4f3920;
  border-color: var(--amber);
}

.morph-edit-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.38fr);
  gap: 18px;
}

.morph-edit-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #07111f;
  border: 1px solid rgba(97, 218, 251, 0.26);
  border-radius: 4px;
}

.morph-edit-label {
  position: absolute;
  top: 14px;
  left: 16px;
  padding: 5px 8px;
  color: #06121b;
  background: var(--cyan);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.morph-edit-object {
  position: absolute;
  right: 10%;
  bottom: 19%;
  display: grid;
  width: 35%;
  height: 34%;
  color: var(--text);
  background: #193954;
  border: 2px solid var(--cyan);
  place-items: center;
  font-family: var(--mono);
  font-size: clamp(8px, 1.2vw, 11px);
  font-style: normal;
  box-shadow: 0 0 0 3px rgba(97, 218, 251, 0.1);
}

.morph-edit-object::after {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--cyan);
  border: 1px solid white;
}

.morph-edit-properties {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px;
  align-content: start;
  background: #0a101d;
  border: 1px solid rgba(97, 218, 251, 0.42);
  border-radius: 4px;
}

.morph-edit-properties b,
.morph-edit-properties small {
  grid-column: 1 / -1;
}

.morph-edit-properties b {
  padding: 8px;
  color: #e7ebf2;
  background: #1b557a;
  text-align: center;
  font-size: 11px;
}

.morph-edit-properties span {
  padding: 9px;
  color: var(--muted);
  background: #202630;
  border: 1px solid #3b4452;
  font-family: var(--mono);
  font-size: 10px;
}

.morph-edit-properties small {
  margin-top: 5px;
  color: var(--cyan-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.phone-mode-guide {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 36px;
  margin: 24px 0 52px;
  align-items: center;
}

.phone-capture {
  margin: 0;
}

.phone-capture img {
  width: min(100%, 380px);
}

.phone-mode-guide > div p:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    padding: 18px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
  }

  .docs-sidebar .sidebar-label,
  .docs-sidebar nav.secondary-nav {
    display: none;
  }

  .content,
  .content-wide,
  .site-footer {
    width: min(860px, calc(100vw - 44px));
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 0 18px;
  }

  .header-links a:not(.github-link) {
    display: none;
  }

  .content,
  .content-wide,
  .site-footer {
    width: calc(100vw - 32px);
  }

  .content {
    padding: 56px 0 84px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    margin-top: 60px;
  }

  .card-grid,
  .quick-facts,
  .shot-grid,
  .motion-types,
  .reveal-sequence,
  .phone-grid,
  .poll-flow,
  .legend,
  .panel-guide,
  .selection-sequence,
  .workspace-modes,
  .edit-scope-compare,
  .grid-options {
    grid-template-columns: 1fr;
  }

  .morph-edit-figure {
    grid-template-columns: 1fr;
  }

  .phone-mode-guide {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .panel-guide {
    gap: 24px;
  }

  .clipboard-flow {
    grid-template-columns: 1fr;
  }

  .clipboard-flow > i {
    transform: rotate(90deg);
    text-align: center;
  }

  .state-strip {
    grid-template-columns: 1fr;
  }

  .state-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .diagram-frame {
    padding: 18px;
  }

  .phone-panel {
    min-height: 310px;
  }

  .next-guide {
    margin-top: 64px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

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