:root {
  color-scheme: dark;
  --bg: #111315;
  --surface: #171c20;
  --text: #f2eee8;
  --muted: #a0a4aa;
  --accent: #edb584;
  --line: #33383d;
  --focus: #ffc98e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
a:hover { color: var(--accent); }
button:disabled { cursor: wait; }
button[hidden], [hidden] { display: none !important; }
.shell { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 91px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; line-height: 1.25; }
.brand strong { display: flex; align-items: center; gap: 18px; font-size: 22px; font-weight: 720; letter-spacing: -.035em; }
.brand-edition { color: #d8d6d1; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .35em; }
.brand small { display: block; color: var(--muted); font: 10px/1.8 ui-monospace, monospace; letter-spacing: .035em; margin-top: 3px; }
.brand-icon { position: relative; width: 29px; height: 33px; border: 1.5px solid var(--accent); border-radius: 3px; }
.brand-icon i { position: absolute; top: 4px; left: 4px; width: 2px; height: 2px; background: var(--accent); }
.brand-icon i + i { left: 8px; }
.main-nav { display: flex; align-items: center; gap: 29px; font-size: 13px; }
.language { display: inline-flex; border: 1px solid #46494d; border-radius: 4px; overflow: hidden; }
.language a { padding: 5px 13px; color: var(--muted); font-size: 12px; }
.language a + a { border-left: 1px solid #46494d; }
.language a[aria-current] { color: var(--accent); background: #221e1a; box-shadow: inset 0 0 0 1px var(--accent); }
.language a:hover { color: var(--text); }
.github-nav { white-space: nowrap; }
.github-nav span { margin-left: 6px; color: var(--muted); }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 45px; padding: 65px 0 70px; }
.eyebrow { margin: 0 0 20px; font: 10px/1.5 ui-monospace, SFMono-Regular, monospace; letter-spacing: .3em; color: #d9d9d8; }
h1 { margin: 0; font-size: clamp(43px, 5.3vw, 74px); line-height: 1.16; font-weight: 710; letter-spacing: -.04em; }
h1 span { color: var(--accent); }
.lead { margin: 22px 0 0; max-width: 560px; font-size: 16px; line-height: 1.9; color: #bec0c5; }
.actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 46px; padding: 10px 24px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #181818; font-size: 14px; font-weight: 650; }
.button:hover { color: #111315; background: #ffd2a7; border-color: #ffd2a7; }
.outline { background: transparent; color: var(--text); }
.outline span { color: var(--accent); }
.outline:hover { color: var(--text); background: #29221c; border-color: var(--accent); }
.hero-art { position: relative; height: 270px; min-width: 0; }
.window { position: absolute; border: 1px solid #777974; border-radius: 3px; background: #111315; }
.window-back { width: 60%; height: 216px; left: 23%; top: 7px; }
.window-middle { width: 60%; height: 215px; left: 6%; top: 44px; border-color: #686c6e; }
.window > span { display: block; height: 27px; padding: 5px 10px; border-bottom: 1px solid var(--line); color: var(--accent); letter-spacing: 3px; font-size: 7px; }
.window-front { display: flex; flex-direction: column; justify-content: center; width: 78%; height: 158px; left: 0; top: 77px; border-color: #898d8b; background: #141719; }
.bridge-words { display: flex; justify-content: space-around; align-items: center; padding: 0 10px; }
.bridge-words b { font-size: clamp(17px, 1.9vw, 26px); font-weight: 500; letter-spacing: -.03em; }
.bridge-words em { font-size: 32px; color: var(--accent); font-style: normal; font-weight: 300; }
.window-front small { text-align: center; font: 10px/1.5 ui-monospace, monospace; letter-spacing: .25em; margin-top: 20px; }
.art-caption { position: absolute; top: 83px; right: -7px; color: #afb2b3; font-size: 10px; line-height: 2; }
.art-caption i { display: block; width: 20px; height: 1px; background: var(--accent); margin-top: 10px; }
.collection-head { display: flex; justify-content: space-between; align-items: end; border-top: 1px solid var(--line); padding-top: 28px; gap: 24px; }
.collection-head .eyebrow { margin-bottom: 8px; }
h2 { font-size: clamp(27px, 3vw, 40px); line-height: 1.3; letter-spacing: -.035em; font-weight: 650; margin: 0; }
.collection-head > p { margin: 0 0 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.collection-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 16px 0 18px; }
.media-note { margin: 0; font-size: 11px; color: var(--muted); }
.text-button { padding: 0; background: none; border: 0; font-size: 11px; color: var(--accent); }
.text-button:hover { text-decoration: underline; }
.project-index { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; font: 11px ui-monospace, monospace; }
.project-index a span { color: var(--accent); margin-left: 5px; }
.project { padding: 25px 0 29px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.project-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.project-heading h3 { font-size: 27px; letter-spacing: -.025em; font-weight: 680; margin: 0; line-height: 1.4; }
.project-number { color: var(--accent); margin-right: 13px; font-variant-numeric: tabular-nums; }
.kind { color: #c7c9ce; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.project-links { display: flex; flex-wrap: wrap; gap: 24px; margin-left: auto; color: var(--accent); font-size: 12px; }
.project-links a { white-space: nowrap; }
.project-links a:hover { text-decoration: underline; }
.project-description { color: #bfc3c9; font-size: 13px; max-width: 970px; line-height: 1.8; margin: 10px 0 12px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; padding: 0; }
.tags li { border: 1px solid #555c61; border-radius: 4px; padding: 1px 9px; font-size: 10px; line-height: 1.6; color: #e0e1e3; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo { min-width: 0; margin: 0; border: 1px solid #47515a; border-radius: 7px; overflow: hidden; background: #0b1118; }
.demo figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-height: 39px; padding: 8px 14px; background: #192126; border-bottom: 1px solid #47515a; font-size: 11px; line-height: 1.5; }
.media-title { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.media-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.image-icon { color: var(--accent); font-size: 15px; line-height: 1; }
.loop-label { color: #b7bbc0; font-size: 10px; }
.loop-label span { color: var(--accent); font-size: 13px; margin-right: 4px; }
.expand { margin-left: auto; color: #c7c9cd; font-size: 10px; white-space: nowrap; }
.demo-image { display: block; width: 100%; height: auto; aspect-ratio: 8/5; object-fit: contain; background: #0b1118; }
.still-link { display: block; }
.still-link:hover img { filter: brightness(1.05); }
.motion-controls { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 5px 12px; background: #10171c; border-top: 1px solid #303a42; font-size: 10px; color: var(--muted); }
.motion-toggle { display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 8px; border: 1px solid #6c5949; border-radius: 4px; background: transparent; color: var(--accent); font-size: 11px; }
.motion-toggle:hover { background: #30251b; }
.motion-symbol { min-width: 10px; }
.motion-state { margin-left: auto; }
.still-caption { color: #929aa1; font-size: 10px; min-height: 39px; padding: 10px 13px; border-top: 1px solid #303a42; }
.start { display: flex; align-items: center; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line); padding: 34px 0 25px; }
.start .eyebrow { margin-bottom: 12px; }
.start h2 { font-size: clamp(22px, 2.25vw, 31px); max-width: 660px; }
.start p:not(.eyebrow) { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.start-links { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex-shrink: 0; }
.start-links .button { font-size: 12px; min-height: 41px; padding-inline: 20px; }
.repo-link { color: var(--accent); font: 11px ui-monospace, monospace; text-decoration: underline; text-underline-offset: 3px; }
.quickstart { border-top: 1px solid #272d32; color: var(--muted); padding: 15px 0; font-size: 12px; }
.quickstart summary { width: fit-content; cursor: pointer; }
.quickstart summary:hover { color: var(--accent); }
.command { margin-top: 16px; border: 1px solid var(--line); padding: 20px; border-radius: 6px; }
pre { overflow-x: auto; font: 12px/1.9 ui-monospace, monospace; margin: 0 0 15px; }
.copy-command { color: var(--text); border: 1px solid #5c6065; border-radius: 3px; background: var(--surface); padding: 5px 10px; font-size: 12px; }
.copy-status { margin-left: 10px; }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 30px; min-height: 70px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.footer > a:first-child { font: 10px ui-monospace, monospace; color: var(--text); }
.footer > a:nth-of-type(2) { margin-left: auto; }
.footer-note { font-size: 10px; }
.skip { position: fixed; z-index: 100; top: -100px; left: 20px; padding: 10px 15px; background: var(--accent); color: #111315; }
.skip:focus { top: 15px; }
.lightbox { width: min(1500px, calc(100% - 40px)); max-height: calc(100dvh - 40px); max-height: calc(100vh - 40px); border: 1px solid #677079; border-radius: 8px; background: #10161c; color: var(--text); padding: 18px; overflow: auto; }
.lightbox::backdrop { background: rgb(0 0 0 / 85%); }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.lightbox-toolbar h2 { font-size: 18px; }
.lightbox-close { border: 1px solid #6a7279; background: transparent; color: var(--text); border-radius: 4px; padding: 6px 12px; white-space: nowrap; }
.lightbox-close span { font-size: 20px; margin-left: 8px; }
.lightbox-image { display: block; width: 100%; height: auto; }
.lightbox > p { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.original-image { color: var(--accent); margin-left: 15px; }
body:has(.lightbox[open]) { overflow: hidden; }
.license-main { padding-block: 60px; max-width: 950px; }
.license-main h1 { font-size: 44px; }
.license-main > p { color: #b7bdc4; max-width: 820px; }
.license-list { display: grid; gap: 20px; margin-top: 35px; }
.license-item { border-top: 1px solid var(--line); padding-top: 20px; }
.license-item h2 { font-size: 22px; margin-bottom: 10px; }
.license-item a { color: var(--accent); font-size: 14px; }
.license-item p { color: var(--muted); font-size: 13px; }
@media (min-width: 1450px) { .hero { gap: 75px; } }
@media (max-width: 1050px) {
  .shell { width: calc(100% - 64px); }
  .main-nav { gap: 20px; }
  .brand-edition { display: none; }
  .hero { gap: 25px; padding-top: 50px; }
  .hero-art { height: 240px; }
  .art-caption { display: none; }
  .window-back, .window-middle { height: 180px; }
  .window-front { top: 65px; height: 140px; }
  .collection-head { display: block; }
  .collection-head > p { margin-top: 12px; }
  .project-links { width: 100%; margin-left: 0; margin-top: 3px; }
  .kind { letter-spacing: .06em; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 40px); }
  .bar { min-height: 78px; gap: 15px; }
  .brand { gap: 9px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 8px; }
  .brand-icon { width: 23px; height: 27px; }
  .main-nav { gap: 12px; }
  .nav-link { display: none; }
  .github-nav { font-size: 11px; }
  .github-nav span { display: none; }
  .language a { padding: 5px 10px; font-size: 11px; }
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 42px 0 32px; }
  h1 { font-size: clamp(40px, 9.2vw, 61px); }
  .hero .eyebrow { margin-bottom: 17px; font-size: 9px; }
  .lead { font-size: 14px; max-width: 410px; line-height: 1.8; margin-top: 19px; }
  .actions { gap: 13px; margin-top: 22px; }
  .button { font-size: 12px; padding-inline: 18px; min-height: 43px; gap: 9px; }
  .hero-art { width: min(380px, 100%); margin: 0 auto; height: 200px; }
  .window-back { height: 155px; top: 9px; }
  .window-middle { height: 158px; top: 30px; }
  .window-front { height: 112px; top: 53px; }
  .bridge-words b { font-size: 22px; }
  .window-front small { font-size: 8px; margin-top: 10px; }
  .collection-head { padding-top: 23px; }
  h2 { font-size: 28px; }
  .collection-head > p { font-size: 11px; }
  .collection-tools { gap: 12px 18px; }
  .media-note { font-size: 10px; }
  .project-index { width: 100%; margin: 0; gap: 18px; font-size: 10px; }
  .project { padding: 23px 0 26px; }
  .project-heading { gap: 8px 14px; }
  .project-heading h3 { font-size: 25px; }
  .kind { font-size: 9px; }
  .project-description { font-size: 12px; }
  .project-links { gap: 23px; font-size: 11px; }
  .media-pair { grid-template-columns: 1fr; gap: 14px; }
  .demo figcaption { padding-inline: 11px; }
  .tags { margin-bottom: 14px; }
  .start { flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 27px; }
  .start h2 { font-size: 26px; }
  .start-links { align-items: flex-start; }
  .footer { gap: 12px 20px; padding-block: 22px; }
  .footer > a:nth-of-type(2) { margin-left: 0; }
  .footer-note { width: 100%; }
  .lightbox { width: calc(100% - 16px); padding: 10px; }
  .lightbox-toolbar h2 { font-size: 15px; }
  .lightbox-close { font-size: 11px; padding: 4px 8px; }
  .lightbox > p { font-size: 10px; }
  .license-main { padding-block: 35px; }
  .license-main h1 { font-size: 32px; }
}
@media (max-width: 370px) { .github-nav { display: none; } .language a { padding-inline: 8px; } .brand small { font-size: 7px; } .project-index { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Shared setup and reference components. */
.setup-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; padding-bottom: 24px; }
.setup-card, .html-example { padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: #151a1e; min-width: 0; }
.setup-card h3, .html-example h3 { font-size: 21px; margin: 12px 0; letter-spacing: -.025em; }
.setup-card p, .html-example p { font-size: 13px; color: #bfc3c9; }
.step { color: var(--accent); font: 10px/1.7 ui-monospace, monospace; letter-spacing: .14em; }
.muted { color: var(--muted); }
.html-example { margin-bottom: 45px; }
.html-example h3 { font: 15px ui-monospace, monospace; }
.code-block { background: #0f1316; border: 1px solid #333d45; border-radius: 5px; margin: 16px 0; position: relative; overflow: hidden; }
.code-caption { display: flex; align-items: center; justify-content: space-between; padding: 7px 13px; border-bottom: 1px solid #2c3339; color: var(--muted); font: 11px ui-monospace, monospace; }
.code-block pre { padding: 15px; margin: 0; font: 12px/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; color: #e1d6c6; }
.copy-result { display: block; font-size: 10px; color: var(--accent); padding-inline: 14px; }
.copy-result:not(:empty) { padding-bottom: 8px; }
.code-tabs { display: flex; gap: 6px; margin-top: 18px; }
.code-tabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 16px; border-radius: 4px; font-size: 12px; }
.code-tabs [aria-selected="true"] { color: var(--accent); border-color: var(--accent); background: #29221c; }
.code-tabs + [role="tabpanel"] .code-block, [role="tabpanel"] .code-block { margin-top: 10px; }
.api-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 50px; align-items: start; padding-block: 50px 65px; }
.api-sidebar { position: sticky; top: 24px; min-width: 0; }
.api-sidebar label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.api-search { position: relative; margin-bottom: 30px; }
.api-search input { font: inherit; font-size: 12px; color: var(--text); background: #171d21; border: 1px solid #50575d; padding: 11px 12px; border-radius: 5px; width: 100%; }
.api-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-results { position: absolute; top: 100%; left: 0; width: max(100%, 350px); max-height: 440px; overflow-y: auto; z-index: 10; margin-top: 9px; padding: 6px; background: #1b2227; border: 1px solid #646e75; border-radius: 6px; box-shadow: 0 15px 50px #0009; }
.search-results a { display: block; padding: 9px; border-radius: 4px; font: 12px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.search-results a:hover, .search-results a:focus { background: #2c343b; color: var(--accent); }
.search-results small { display: block; font-size: 10px; line-height: 1.6; font-family: inherit; color: var(--muted); }
.search-results p { font-size: 12px; padding: 6px; color: var(--muted); }
.api-menu summary { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; cursor: pointer; }
.api-menu nav { display: grid; gap: 4px; margin-top: 14px; }
.api-menu a { display: block; font: 12px/1.8 ui-monospace, monospace; color: #bcc1c5; padding: 9px 11px; border-left: 2px solid #363f45; overflow-wrap: anywhere; }
.api-menu a[aria-current] { background: #26221e; border-color: var(--accent); color: var(--accent); }
.api-content { min-width: 0; max-width: 930px; }
.api-content .eyebrow { margin-bottom: 13px; color: var(--accent); }
.api-content h1 { font-size: clamp(30px, 3.5vw, 48px); overflow-wrap: anywhere; }
.api-content h2 { font-size: 26px; margin: 35px 0 18px; }
.api-content h3 { font-size: 19px; margin: 0 0 16px; overflow-wrap: anywhere; }
.api-content .lead { font-size: 15px; max-width: none; margin-top: 15px; }
.api-content p, .api-content li { font-size: 14px; color: #bfc3c9; line-height: 1.85; }
.api-content code { font: .9em/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; color: #f1c397; overflow-wrap: anywhere; }
.api-content .code-block code { font-size: 12px; overflow-wrap: normal; }
.api-content a:hover { text-decoration: underline; text-underline-offset: 3px; }
.api-content ul { padding-left: 22px; }
.api-content li { margin: 6px 0; }
.api-note { font-size: 12px !important; color: var(--muted) !important; }
.api-class-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.api-class-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #171c20; transition: border-color .15s; }
.api-class-card:hover { border-color: var(--accent); text-decoration: none !important; }
.api-class-card h2 { font: 17px/1.7 ui-monospace, monospace; margin: 10px 0; overflow-wrap: anywhere; }
.api-class-card p { font-size: 13px; margin-bottom: 0; }
.api-guide { margin-top: 35px; border-top: 1px solid var(--line); }
.api-callout { border-left: 2px solid var(--accent); padding: 14px 18px; background: #211e1a; border-radius: 0 4px 4px 0; }
.inherits { color: var(--muted) !important; margin-top: 14px; }
.api-toc { display: flex; flex-wrap: wrap; gap: 20px; border-block: 1px solid var(--line); padding: 14px 0; margin: 27px 0; color: var(--accent); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #192126; font-weight: 500; color: var(--muted); font-size: 11px; }
tr:last-child td { border-bottom: 0; }
.method-summary { list-style: none; padding: 0 !important; border-block: 1px solid var(--line); }
.method-summary li { margin: 0; padding: 11px 0; border-bottom: 1px solid #2a3035; line-height: 1.65; }
.method-summary li:last-child { border-bottom: 0; }
.method-summary code { font-size: 12px; }
.api-member { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; scroll-margin-top: 24px; }
.api-member h3 a { font-family: ui-monospace, monospace; color: var(--text); }
.member-kind { font: 11px ui-monospace, monospace; color: var(--muted); margin-left: 15px; }
.accessors { color: var(--muted) !important; font-size: 11px !important; }
.signature { padding: 13px 16px; border: 1px solid #3a434a; border-radius: 5px; background: #11181d; font-size: 13px; line-height: 1.8; }
.qualifier { color: var(--muted); font-size: 11px; }
.api-internal { padding-top: 24px; border-top: 1px solid var(--line); margin-top: 35px; }
.api-internal summary { color: var(--muted); cursor: pointer; font-size: 13px; }
.api-source { margin-top: 40px; font-size: 12px !important; color: var(--accent) !important; }
@media (max-width: 1050px) {
  .main-nav { gap: 17px; }
  .brand strong { font-size: 20px; }
  .api-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 30px; }
  .api-class-grid { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; padding-block: 17px; }
  .main-nav { width: 100%; justify-content: space-between; font-size: 12px; gap: 10px; }
  .bar .nav-link { display: inline; }
  .main-nav .github-nav { display: none; }
  .api-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 30px; }
  .api-sidebar { position: static; }
  .api-menu nav { display: flex; flex-wrap: wrap; gap: 9px; }
  .api-menu a { font-size: 11px; padding: 5px 7px; }
  .api-search { margin-bottom: 18px; }
  .search-results { width: 100%; }
  .api-content h1 { font-size: clamp(28px, 7vw, 40px); }
  .api-content p, .api-content li { font-size: 13px; }
  .api-content h2 { font-size: 23px; }
  .api-content h3 { font-size: 17px; }
  .setup-card, .html-example { padding: 18px; }
}
