@font-face {
  font-family: Geist;
  src: url("/assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: GeistMono;
  src: url("/assets/mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #131315;
  --tile: #18181a;
  --ink: #f3f3f3;
  --dim: #b3b3b8;
  --line: #39393d;
  --blue: #126aff;
  --blue-ink: #79aaff;
  --mono: GeistMono, Consolas, monospace;
  font:
    16px/1.5 Geist,
    Inter,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid #80adff;
  outline-offset: 3px;
}
input,
select {
  color: var(--ink);
  background: var(--panel);
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(100% - clamp(32px, 6vw, 112px), 1552px);
  margin: auto;
}
.bar,
.bar nav,
.right,
.brand,
.foot,
.foot > div,
.actions,
.filters,
.sect-head,
.card-foot,
.demo-head,
.meta,
.line-actions {
  display: flex;
  align-items: center;
}
.bar {
  height: 70px;
  gap: 40px;
  border-bottom: 1px solid #555559;
}
.bar nav,
.right {
  gap: 22px;
}
.bar nav a,
.searchlink,
.quick,
.foot {
  font-size: 0.875rem;
}
.bar nav a,
.foot {
  color: var(--dim);
}
.bar nav a[aria-current="page"] {
  color: white;
}
.brand {
  gap: 6px;
  white-space: nowrap;
  letter-spacing: -0.065em;
  font-weight: 650;
  font-size: 1.55rem;
}
.brand:hover {
  text-decoration: none;
}
.brand b {
  font:
    650 0.65em/1 Geist,
    Arial,
    sans-serif;
  letter-spacing: -0.06em;
  border: 1.7px solid;
  border-radius: 20px;
  padding: 1px 5px;
}
.mark {
  display: inline-block;
  width: 25px;
  height: 24px;
  transform: skewX(-18deg);
  background: linear-gradient(
    90deg,
    transparent 4%,
    currentColor 4% 33%,
    transparent 33% 48%,
    currentColor 48% 77%,
    transparent 77%
  );
}
.slash {
  font:
    300 20px/1 Geist,
    sans-serif;
  color: #666;
  margin: 0 6px;
}
.right {
  margin-left: auto;
  gap: 10px;
}
.quick,
.searchlink,
.btn,
.seg button,
.source-file,
.copy {
  border: 1px solid var(--line);
  padding: 7px 12px;
}
.quick,
.btn.light {
  background: #eee;
  color: #101011;
  font-weight: 550;
}
.quick:hover,
.btn.light:hover {
  color: black;
}
.searchlink {
  color: var(--dim);
  min-width: 132px;
  display: flex;
  justify-content: space-between;
}
.searchlink kbd {
  font-family: var(--mono);
  color: #909094;
}
.skip {
  position: fixed;
  left: -600px;
  top: 8px;
  z-index: 10;
  background: #111;
  padding: 8px;
}
.skip:focus {
  left: 10px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 460;
  letter-spacing: -0.053em;
  line-height: 1.065;
}
.hero {
  padding: clamp(35px, 4.2vw, 70px) 0 clamp(28px, 3vw, 48px);
}
h1 {
  font-size: clamp(3.1rem, 6.65vw, 6.95rem);
  max-width: 16em;
}
.hero h1 {
  max-width: 14em;
}
.hero h1 span {
  display: block;
  color: #a6a6ae;
}
.spread {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: 14px;
}
.intro-card,
.drawing,
.card,
.box,
.codebox,
.demo-box,
.toc,
.chapter {
  border: 1px solid var(--line);
}
.intro-card {
  padding: clamp(19px, 2.6vw, 42px);
  background: #151516;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}
.intro-card h2 {
  font-size: clamp(2.4rem, 4.4vw, 5rem);
}
.intro-card p {
  color: #c4c4c9;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  max-width: 39ch;
}
.mini-meta,
.mono,
.kicker,
code,
pre,
.tag,
.measure,
.card-foot,
.diagram-note {
  font-family: var(--mono);
}
.mini-meta,
.kicker,
.measure,
.diagram-note {
  font-size: 0.79rem;
  letter-spacing: 0.025em;
}
.mini-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--dim);
}
.showcase {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1c;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
}
.actions .btn {
  min-height: 62px;
  padding: 14px 20px;
  font-size: clamp(1rem, 1.55vw, 1.45rem);
  letter-spacing: -0.035em;
}
.btn.blue {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn:hover,
.btn:focus-visible {
  filter: brightness(1.13);
  text-decoration: none;
}
.drawing,
.preview {
  background-color: #101114;
  background-image:
    linear-gradient(#696e8021 1px, transparent 1px),
    linear-gradient(90deg, #696e8021 1px, transparent 1px),
    linear-gradient(#696e800c 1px, transparent 1px),
    linear-gradient(90deg, #696e800c 1px, transparent 1px);
  background-size:
    80px 80px,
    80px 80px,
    16px 16px,
    16px 16px;
}
.drawing {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 24px;
}
.diagram {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 7px 12px;
}
.measure {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a1a1ab;
  white-space: nowrap;
  letter-spacing: 0.09em;
  font-size: 0.67rem;
}
.measure::before,
.measure::after {
  content: "";
  flex: 1;
  height: 6px;
  border: 1px solid #73737d;
  border-bottom: 0;
}
.diagram select {
  grid-column: 1;
  border: 1px solid #b6b6c0;
  background: #17171b;
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
}
.diagram-note {
  color: var(--blue-ink);
  align-self: center;
  line-height: 1.2;
  font-size: 0.68rem;
  position: relative;
}
.diagram-note:before {
  content: "";
  display: inline-block;
  width: 10px;
  border-top: 1px solid;
  margin-right: 4px;
  vertical-align: middle;
}
.diagram-result {
  grid-column: 1;
  padding: 12px;
  border: 1px solid #448cff;
  background: #141a28;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.diagram-result small {
  color: #b4c7e9;
}
.diagram-result strong {
  font-weight: 550;
}
.section {
  margin-top: clamp(46px, 6vw, 90px);
}
.rule {
  height: 9px;
  border-block: 1px solid var(--line);
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 4px,
    #53535a66 4px 5px
  );
}
.sect-head {
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
}
.sect-head h2,
.page-title {
  font-size: clamp(2.45rem, 4.5vw, 4.9rem);
}
.count,
.muted,
.sub {
  color: var(--dim);
}
.sub {
  font-size: 1.09rem;
  max-width: 76ch;
  margin-top: 12px;
}
.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.filters input,
.filters select,
.source-file {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
  width: 100%;
  border-radius: 0;
}
.filters label,
.file-select {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  color: var(--dim);
  font-size: 0.81rem;
}
.filters input,
.filters select {
  font-size: 1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  background: #141416;
  min-width: 0;
}
.card:hover {
  border-color: #74747b;
  color: inherit;
  text-decoration: none;
}
.preview {
  min-height: 145px;
  height: clamp(145px, 13vw, 205px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.preview img {
  width: calc(100% - 24px);
  height: calc(100% - 20px);
  object-fit: contain;
  display: block;
}
.preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.card-text {
  padding: 17px 18px;
  flex: 1;
}
.kicker,
.card-foot {
  color: var(--dim);
}
.card h3 {
  font-size: clamp(1.36rem, 2.1vw, 2.1rem);
  margin: 7px 0 8px;
}
.card p {
  color: #b7b7bf;
  font-size: 0.96rem;
  line-height: 1.4;
}
.card-foot {
  border-top: 1px solid #333337;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.74rem;
}
.foot {
  justify-content: space-between;
  gap: 16px;
  margin-top: 72px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.foot > div {
  gap: 17px;
}
.brand.small {
  font-size: 1.1rem;
}
.small .mark {
  width: 17px;
  height: 16px;
}
.breadcrumbs {
  font-family: var(--mono);
  font-size: 0.81rem;
  color: var(--dim);
  margin: 28px 0 17px;
}
.meta {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tag {
  font-size: 0.77rem;
  border: 1px solid var(--line);
  padding: 2px 7px;
  color: #c5c6cf;
}
.detail {
  display: grid;
  grid-template-columns: minmax(175px, 225px) minmax(0, 1fr);
  gap: clamp(15px, 3vw, 45px);
  align-items: start;
  margin-top: 32px;
}
.toc {
  position: sticky;
  top: 16px;
  padding: 15px;
  display: grid;
  gap: 0;
  background: #121214;
}
.toc h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.toc a {
  color: var(--dim);
  padding: 5px 0;
}
.chapters {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.chapter,
.box {
  padding: clamp(16px, 2.2vw, 32px);
  background: var(--panel);
  scroll-margin-top: 12px;
}
.chapter h2,
.box h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.7rem);
  margin-bottom: 13px;
}
.chapter p,
.box p {
  color: #cdccd2;
  max-width: 80ch;
}
.source-links,
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 10px;
}
.source-links a,
.topics a,
.textlink {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.demo-box {
  background: #101012;
}
.demo-head {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  padding: 8px 12px;
  gap: 10px;
  font-size: 0.85rem;
}
.demo-box iframe {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
  background: #121214;
}
.codebox {
  background: #101012;
  margin-top: 12px;
  min-width: 0;
}
.codebox .demo-head {
  color: var(--dim);
}
pre {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #d0dcf5;
  overflow: auto;
  white-space: pre;
  tab-size: 2;
  margin: 0;
  padding: 14px 16px;
  max-height: 430px;
}
.source-file,
.copy {
  width: auto;
  color: var(--ink);
  background: #1b1b1d;
  font-size: 0.82rem;
  padding: 4px 8px;
}
.code-name {
  overflow-wrap: anywhere;
}
.guide {
  max-width: 1050px;
  margin-top: 25px;
  display: grid;
  gap: 14px;
}
.guide code {
  font-size: 0.92em;
}
.guide p + p,
.chapter p + p {
  margin-top: 9px;
}
.line-actions {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.line-actions .btn {
  padding: 9px 13px;
}
.empty,
.loading {
  padding: 28px 0;
  color: var(--dim);
}
#toast:not(:empty) {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #ededed;
  color: #111;
  padding: 8px 13px;
  z-index: 5;
}
.foot a {
  white-space: nowrap;
}
.chapter[id] {
  overflow: hidden;
}
@media (min-width: 1600px) {
  .hero h1 {
    max-width: 15em;
  }
}
@media (max-width: 950px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bar {
    gap: 22px;
  }
  .bar nav {
    gap: 14px;
  }
}
@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .bar {
    height: 58px;
    gap: 15px;
  }
  .brand {
    font-size: 1.18rem;
  }
  .brand .slash {
    margin: 0;
  }
  .bar nav,
  .right {
    gap: 10px;
  }
  .searchlink {
    min-width: 0;
  }
  .searchlink kbd {
    display: none;
  }
  .quick {
    display: none;
  }
  .spread,
  .detail {
    grid-template-columns: 1fr;
  }
  .drawer {
    min-height: 180px;
  }
  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 13px;
  }
  .toc h2 {
    width: 100%;
  }
  .toc a {
    font-size: 0.87rem;
  }
  .detail {
    margin-top: 16px;
  }
  .hero h1 {
    font-size: clamp(2.75rem, 8.5vw, 3.8rem);
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:first-child {
    grid-column: 1/-1;
  }
  .sect-head {
    margin: 16px 0;
  }
  .drawing {
    min-height: 195px;
  }
  .foot {
    flex-wrap: wrap;
  }
  .diagram {
    grid-template-columns: minmax(0, 1fr) 60px;
  }
  .card-foot {
    flex-wrap: wrap;
  }
}
@media (max-width: 485px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .bar .brand {
    gap: 3px;
  }
  .bar .brand .slash {
    display: none;
  }
  .bar nav,
  .right {
    gap: 9px;
  }
  .bar {
    gap: 12px;
  }
  .searchlink {
    padding: 4px 6px;
  }
  .actions .btn {
    padding: 14px;
    min-height: 50px;
  }
  .intro-card {
    gap: 14px;
  }
  .preview {
    height: 165px;
  }
  .card-text {
    padding: 13px 15px;
  }
  .foot > div {
    gap: 12px;
  }
  .filters {
    gap: 7px;
  }
  .count {
    font-size: 0.85rem;
  }
  .bar .mark {
    width: 18px;
    height: 16px;
  }
  .hero {
    padding: 29px 0 24px;
  }
}
.topic-index {
  margin-top: 16px;
  border-block: 1px solid var(--line);
  padding: 10px 0;
}
.topic-index summary {
  cursor: pointer;
}
.topic-index label {
  display: grid;
  gap: 4px;
  width: min(360px, 100%);
  font-size: 0.875rem;
  color: var(--dim);
  margin-top: 10px;
}
.topic-index input {
  border: 1px solid var(--line);
  padding: 8px 10px;
}
.topic-index .topics {
  max-height: 300px;
  overflow: auto;
  padding: 5px 3px 12px;
}
.topic-index .topics a {
  font-size: 0.91rem;
}

.guide {
  grid-template-columns: minmax(0, 1fr);
}
.guide .box {
  min-width: 0;
}
.guide p {
  overflow-wrap: anywhere;
}
