@font-face {
    font-family: Lato;
    src: url('../fonts/Lato-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Lato;
    src: url('../fonts/Lato-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Monocraft;
    src: url('../fonts/Monocraft-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg: #262830;
    --panel: #c6c6c6;
    --surface: #b5b4bc;
    --raised: #d5d4db;
    --recessed: #b4b2bf;
    --text: #34333b;
    --muted: #4e4a58;
    --quiet: #55505e;
    --line: #8d8997;
    --line-soft: #aaa6b2;
    --edge-light: #fafafd;
    --edge-dark: #777680;
    --slot-light: #eeeaf3;
    --slot-dark: #686470;
    --accent: #604479;
    --accent-fill: #d9cce7;
    --button: #756183;
    --button-hover: #675174;
    --button-ink: #fff;
    --code-keyword: #55356f;
    --code-string: #1f4a3e;
    /* Darker text for the surface and recessed areas, which are below panel brightness. */
    --muted-inset: #3f3b4a;
    --quiet-inset: #46424f;
    --accent-inset: #4f3566;
    --inset-hover: #cfcdd8;
    --frame: url('../images/window-light.svg');
    /* The attachment frame's fill must match --surface. */
    --details-frame: url('../images/details-light.svg');

    --radius: 0;
    --control-radius: 0;
    --sans: Lato, 'Segoe UI', system-ui, sans-serif;
    --display: Monocraft, 'Cascadia Code', Consolas, monospace;
    --mono: 'Cascadia Code', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-appearance='light']) {
        color-scheme: dark;
        --bg: #262830;
        --panel: #45434e;
        --surface: #514e5b;
        --raised: #625d6e;
        --recessed: #34323d;
        --text: #eeeaf4;
        --muted: #d1cbdc;
        --quiet: #c0bacd;
        --line: #756e82;
        --line-soft: #645d70;
        --edge-light: #766e83;
        --edge-dark: #26232e;
        --slot-light: #625d6e;
        --slot-dark: #25232b;
        --accent: #d2b7f2;
        --accent-fill: #5f4c77;
        --button: #645171;
        --button-hover: #756080;
        --button-ink: #fff;
        --code-keyword: #ddbcfa;
        --code-string: #acd9bf;
        --muted-inset: var(--muted);
        --quiet-inset: var(--quiet);
        --accent-inset: var(--accent);
        --inset-hover: var(--surface);
        --frame: url('../images/window-dark.svg');
        --details-frame: url('../images/details-dark.svg');
    }
}

:root[data-appearance='dark'] {
    color-scheme: dark;
    --bg: #262830;
    --panel: #45434e;
    --surface: #514e5b;
    --raised: #625d6e;
    --recessed: #34323d;
    --text: #eeeaf4;
    --muted: #d1cbdc;
    --quiet: #c0bacd;
    --line: #756e82;
    --line-soft: #645d70;
    --edge-light: #766e83;
    --edge-dark: #26232e;
    --slot-light: #625d6e;
    --slot-dark: #25232b;
    --accent: #d2b7f2;
    --accent-fill: #5f4c77;
    --button: #645171;
    --button-hover: #756080;
    --button-ink: #fff;
    --code-keyword: #ddbcfa;
    --code-string: #acd9bf;
    --muted-inset: var(--muted);
    --quiet-inset: var(--quiet);
    --accent-inset: var(--accent);
    --inset-hover: var(--surface);
    --frame: url('../images/window-dark.svg');
    --details-frame: url('../images/details-dark.svg');
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image: repeating-linear-gradient(135deg, #ffffff03 0 2px, transparent 2px 8px);
    color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}
::selection {
    background: var(--button);
    color: var(--button-ink);
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}
button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
h1,
h2,
h3,
h4,
p,
figure {
    margin: 0;
}
h1,
h2,
h3,
h4 {
    font-family: var(--display);
    font-weight: 400;
    font-variant-ligatures: none;
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.wrap {
    width: min(1280px, calc(100% - 64px));
    margin-inline: auto;
}
/* Pixel corners retain the terminal's original 2px steps. */
.window {
    min-width: 0;
    background: var(--panel);
    background-clip: padding-box;
    border: 12px solid transparent;
    border-image: var(--frame) 6 / 12px stretch;
    filter: drop-shadow(0 4px 2px rgb(8 7 13 / 28%));
}
main > .window,
main > .section > .window {
    margin-bottom: 28px;
}
.section {
    padding: 36px;
}
/* These areas sit below panel brightness, so their secondary text and links use the darker inset tokens. */
.code-panel,
.feature-tabs,
.page-attachment,
.faq-list,
.community-chart,
.platform {
    --muted: var(--muted-inset);
    --quiet: var(--quiet-inset);
    --accent: var(--accent-inset);
}
.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: none;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 20;
    padding: 10px 18px;
    background: var(--button);
    color: var(--button-ink);
    transform: translateY(-180%);
    border-radius: var(--control-radius);
}
.skip-link:focus {
    transform: translateY(0);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 16px;
    background: var(--surface);
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    box-shadow: 0 0 0 1px #24212c;
    font: 12px/1.6 var(--display);
    white-space: nowrap;
    transition:
        background-color 120ms ease-out,
        color 120ms ease-out,
        transform 80ms ease-out;
}
.button.primary {
    background: var(--button);
    color: var(--button-ink);
}
.button.primary:hover {
    background: var(--button-hover);
}
.button.secondary {
    background: var(--surface);
}
.button.secondary:hover {
    background: var(--raised);
}
.button.small {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.75rem;
}
.button:active,
.icon-button:active {
    transform: translateY(1px);
}
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--surface);
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    transition:
        background-color 120ms ease-out,
        color 120ms ease-out,
        transform 80ms ease-out;
}
.icon-button:hover {
    background: var(--raised);
}
.icon-button[data-tooltip] {
    position: relative;
}
.icon-button[data-tooltip]::after {
    content: attr(aria-label);
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--recessed);
    color: var(--text);
    font: 12px/1.5 var(--sans);
    white-space: nowrap;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 120ms;
}
.icon-button[data-tooltip]:focus-visible::after {
    visibility: visible;
    opacity: 1;
}
@media (hover: hover) {
    .icon-button[data-tooltip]:hover::after {
        visibility: visible;
        opacity: 1;
    }
}
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 700;
}
.text-link,
.nav-links > a,
.footer-links a,
.page-attachment a,
summary {
    transition: color 120ms ease-out;
}
.text-link:hover {
    color: var(--accent);
}
.text-link .icon {
    width: 14px;
    height: 14px;
}

/*
 * The sticky header uses layer 15: above the API reference's own sticky sidebar (layer 10), so the header's shadow
 * falls over it, and below the skip link (20). The native dialog owns the modal top layer.
 */
/*
 * The header rests below the page top. Scrolling pulls it up until the top of its frame leaves the viewport, so it
 * hangs from the edge; the 12px is the frame's border.
 */
.nav {
    --nav-gap: 16px;
    position: sticky;
    top: calc(-1 * (var(--nav-gap) + 12px));
    z-index: 15;
    padding-top: var(--nav-gap);
}
.nav-inner {
    transition: filter 150ms ease-out;
}
.nav[data-docked] .nav-inner {
    filter: drop-shadow(0 2px 2px rgb(8 7 13 / 45%)) drop-shadow(0 12px 14px rgb(8 7 13 / 55%));
}
.nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 82px;
    padding: 5px 20px;
    container-type: inline-size;
}
/* A header narrowed to its window's width drops the long brand name before the links crowd. */
@container (min-width: 768px) and (max-width: 880px) {
    .brand-name-full {
        display: none;
    }
    .brand-name-short {
        display: inline;
    }
    .nav-links {
        gap: 16px;
    }
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: none;
    order: 1;
    min-height: 44px;
    font: 13px/1.6 var(--display);
    white-space: nowrap;
}
.brand img {
    width: 38px;
    height: 38px;
    image-rendering: pixelated;
}
.brand-secondary {
    color: var(--accent);
}
.brand-name-short {
    display: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    order: 2;
    margin-left: auto;
}
.nav-links > a:not(.button) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}
.nav-links > a:not(.button):hover {
    color: var(--text);
}
.nav-links > a[aria-current='page'],
.footer-links a[aria-current='page'] {
    text-decoration: underline 2px var(--accent);
    text-underline-offset: 8px;
}
.nav-links > a[aria-current='page'] {
    color: var(--text);
}
.footer-links a[aria-current='page'] {
    color: var(--accent);
}
.nav-links .github-link {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}
.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 3;
    min-width: 44px;
    min-height: 44px;
}
.menu-toggle {
    display: none;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.16fr);
    align-items: center;
    gap: 40px;
    margin-top: 24px;
    padding: 48px 32px;
}
.eyebrow {
    color: var(--muted);
    font: 0.75rem/1.8 var(--display);
    letter-spacing: 0.3px;
}
.hero h1 {
    margin-top: 20px;
    font-size: clamp(27px, 2.65vw, 38px);
    line-height: 1.45;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0 #16121d18;
}
.hero h1 span {
    color: var(--accent);
}
.hero-description {
    max-width: 380px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}
.hero-media {
    min-width: 0;
}
.screenshot-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 3px;
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
    background: #262830;
    cursor: zoom-in;
}
.screenshot-link:focus-visible {
    outline-offset: 5px;
}
.screenshot-link img,
.screenshot-link video {
    width: 100%;
    aspect-ratio: 16 / 9;
}
.screenshot-link video {
    display: block;
    height: auto;
    object-fit: contain;
}
.video-frame {
    position: relative;
}
.video-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    color: var(--text);
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    background: var(--surface);
    font: 0.75rem/1.5 var(--display);
    transition: background-color 120ms ease-out;
}
.video-toggle:hover {
    background: var(--raised);
}
.demo-frame {
    position: relative;
}
.demo-button {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 1;
}
.hero-screen {
    margin: 0;
}
.screen-action {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--text);
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    background: var(--surface);
}
.screen-action .icon {
    width: 14px;
    height: 14px;
}
figcaption {
    margin-top: 12px;
    color: var(--quiet);
    font-size: 12px;
}

.compatibility {
    display: grid;
    grid-template-columns: 1.55fr repeat(4, 1fr);
    align-items: center;
    gap: 24px;
    padding: 20px 32px;
}
.compatibility-intro strong,
.compatibility-intro span,
.version strong,
.version span {
    display: block;
}
.compatibility-intro strong {
    font: 12px/1.6 var(--display);
}
.compatibility-intro span {
    margin-top: 3px;
    color: var(--quiet);
    font-size: 12px;
}
.version {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}
.version strong {
    color: var(--text);
    font: 15px/1.5 var(--display);
}
.version span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.75rem;
}

h2 {
    font-size: clamp(25px, 2.35vw, 32px);
    line-height: 1.45;
    letter-spacing: -0.8px;
}
.section-heading {
    max-width: 760px;
    margin-bottom: 32px;
}
.section-heading > p:not(.eyebrow),
.section-copy {
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.75;
}
.showcase {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
}
.feature-tabs {
    display: grid;
    gap: 0;
    padding: 3px;
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
    background: var(--recessed);
}
.feature-tab {
    position: relative;
    display: block;
    padding: 17px 16px;
    border: 2px solid transparent;
    border-bottom-color: var(--line-soft);
    transition: background-color 120ms ease-out;
}
.feature-tab:last-child:not([aria-selected='true']) {
    border-bottom-color: transparent;
}
.feature-tab:hover {
    background: var(--inset-hover);
}
.feature-tab[aria-selected='true'] {
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    background: var(--accent-fill);
}
/* Countdown of the showcase tour; it overlays the tab's bottom border, so nothing moves. */
.feature-tab::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(var(--progress, 0));
    transform-origin: left;
}
[data-touring] .feature-tab[aria-selected='true']::after {
    opacity: 1;
}
.feature-tab span,
.feature-tab small {
    display: block;
}
.feature-tab span {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 13px/1.65 var(--display);
}
.feature-tab .icon {
    width: 16px;
    height: 16px;
}
.feature-tab small {
    margin-top: 3px;
    margin-left: 26px;
    font-size: 12px;
    color: var(--muted);
}
.feature-panels {
    min-width: 0;
    container-type: inline-size;
}
.feature-panel + .feature-panel {
    margin-top: 44px;
}
.feature-panel[role='tabpanel'] {
    margin-top: 0;
}
.feature-panel[role='tabpanel']:not([hidden]) {
    animation: gallery-appear 160ms ease-out;
}
@keyframes gallery-appear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.section-entering {
    animation: section-enter 220ms ease-out;
}
@keyframes section-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.panel-copy {
    min-height: 112px;
    padding-bottom: 20px;
}
.panel-copy h3 {
    font-size: 19px;
    line-height: 1.6;
}
.panel-copy p {
    max-width: 670px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 15px;
}
.feature-panel img {
    aspect-ratio: 16 / 9;
    object-fit: contain;
}
.feature-note {
    min-height: 3.2em;
    margin-top: 14px;
    color: var(--quiet);
    font-size: 13px;
}
/* Keep the preview in place when tab descriptions wrap on narrow screens. */
@container (max-width: 400px) {
    .feature-panels .panel-copy {
        min-height: 176px;
    }
}
@container (max-width: 300px) {
    .feature-panels .feature-note {
        min-height: 4.8em;
    }
}

.tracking-section {
    padding: 0;
}
.tracking-section > .window {
    padding: 36px;
}
.tracking-heading {
    max-width: 760px;
}
.tracking-heading .eyebrow {
    margin-bottom: 17px;
}
.tracking-media {
    max-width: 1080px;
    margin-inline: auto;
}
.tracking-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 2px solid var(--line-soft);
}
.tracking-details h3 {
    font-size: 1rem;
    line-height: 1.65;
}
.tracking-details p {
    margin-top: 9px;
    color: var(--muted);
    font-size: 14px;
}

.personalize {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
    align-items: center;
    gap: 80px;
}
.personalize-copy {
    max-width: 600px;
}
.personalize .section-copy {
    max-width: 440px;
}
.capability {
    margin-top: 25px;
    padding-left: 18px;
    border-left: 3px solid var(--line);
}
.capability h3 {
    font-size: 0.9375rem;
    line-height: 1.7;
}
.capability p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}
.mobile-media {
    justify-self: center;
    width: min(100%, 290px);
}
.mobile-media .screenshot-link {
    background: #292d35;
}
.mobile-media video {
    aspect-ratio: 540 / 1100;
}
.mobile-media figcaption {
    max-width: 250px;
}

.notification-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}
.notification-destinations {
    display: grid;
    gap: 24px;
}
.notification-media {
    justify-self: end;
    width: 100%;
    max-width: 519px;
    margin: 0;
}
.notification-media .screenshot-link img {
    display: block;
    height: auto;
    aspect-ratio: 509 / 364;
}
.notification-destination {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.notification-destination + .notification-destination {
    padding-top: 24px;
    border-top: 2px solid var(--line-soft);
}
.notification-destination > .icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-top: 3px;
}
.notification-destination h3 {
    font-size: 17px;
}
.notification-destination p {
    margin-top: 10px;
    color: var(--muted);
}
.notification-destination .text-link {
    margin-top: 14px;
}
.notification-conditions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--line-soft);
    color: var(--quiet);
    font-size: 14px;
}

.api-section {
    padding: 0;
}
.api-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: 64px;
    padding: 36px;
}
.api-content h2 {
    max-width: 340px;
}
.api-content .section-copy {
    max-width: 370px;
}
.api-content .text-link {
    margin-top: 20px;
    color: var(--accent);
}
.code-panel {
    min-width: 0;
    overflow: hidden;
    background: var(--recessed);
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
}
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 62px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font: 12px/1.5 var(--mono);
}
.copy-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 12px;
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    background: var(--surface);
    font: 0.75rem/1.5 var(--display);
    transition: background-color 120ms ease-out;
}
.copy-button:hover {
    background: var(--raised);
    color: var(--text);
}
.copy-button .icon {
    width: 13px;
    height: 13px;
}
pre {
    overflow-x: auto;
    margin: 0;
    padding: 26px 26px 22px;
    font: 12px/1.95 var(--mono);
    tab-size: 2;
}
code {
    font-family: var(--mono);
}
.code-keyword {
    color: var(--code-keyword);
}
.code-string {
    color: var(--code-string);
}
.code-comment {
    color: var(--quiet);
}
.code-help {
    padding: 0 26px 22px;
    color: var(--quiet);
    font-size: 12px;
}

.download-section .section-heading {
    max-width: 680px;
}
.download-platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.platform {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    min-height: 125px;
    padding: 26px;
    border: 2px solid;
    border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    background: var(--surface);
    transition: background-color 120ms ease-out;
}
.platform:hover {
    background: var(--raised);
}
.platform:hover p {
    color: var(--text);
}
.platform h3 {
    font-size: 22px;
}
.platform p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}
.platform > .icon {
    color: var(--accent);
}
.releases-link {
    margin-top: 16px;
    color: var(--muted);
}
.download-guides {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-top: 18px;
}
.download-guides .text-link {
    color: var(--accent);
}
.setup {
    display: grid;
    grid-template-columns: 1.1fr repeat(3, 1fr);
    gap: 32px;
    margin-top: 44px;
    padding-top: 38px;
    border-top: 1px solid var(--line-soft);
}
.setup h3 {
    max-width: 210px;
    font-size: 19px;
    line-height: 1.6;
}
.setup h4 {
    color: var(--accent);
    font-size: 0.9375rem;
}
.setup p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}
.setup code {
    color: var(--text);
    font-size: 12px;
}

/* The chart's text is in SVG user units, so it scales with the chart and is enlarged where the chart is narrow. */
.community-section .section-heading a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.community-layout {
    display: grid;
    grid-template-columns: minmax(200px, 0.34fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}
.community-count {
    display: grid;
    gap: 8px;
}
.community-count strong {
    color: var(--accent);
    font: 400 clamp(48px, 6vw, 72px) / 1 var(--display);
}
.community-count span {
    font-weight: 700;
}
.community-range {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 2px solid var(--line-soft);
}
.community-range dt {
    color: var(--muted);
    font-size: 13px;
}
.community-range dd {
    margin: 0;
    font: 1.25rem/1.5 var(--display);
}
.community-chart {
    padding: 16px 16px 12px;
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
    background: var(--recessed);
}
.community-chart figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}
.community-svg {
    display: block;
    width: 100%;
    height: auto;
}
.community-svg text {
    fill: var(--muted);
    font: 13px var(--sans);
}
.community-svg .y-label {
    text-anchor: end;
    dominant-baseline: central;
}
.community-svg .x-label {
    text-anchor: middle;
}
.community-svg .grid {
    stroke: var(--line-soft);
    stroke-width: 1px;
    shape-rendering: crispEdges;
    vector-effect: non-scaling-stroke;
}
.community-svg .grid.day {
    stroke-dasharray: 2 4;
}
.community-svg .area {
    fill: var(--accent);
    fill-opacity: 0.22;
}
.community-svg .line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2px;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
.community-svg .marker {
    fill: var(--accent);
}

.faq-section {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 70px;
}
.faq-intro p {
    max-width: 320px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 15px;
}
.faq-intro .text-link {
    margin-top: 18px;
}
.faq-list {
    padding: 0 20px;
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
    background: var(--surface);
}
.faq-list details {
    border-bottom: 1px solid var(--line);
}
.faq-list details:last-child {
    border-bottom: 0;
}
summary {
    padding: 20px 0;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
summary::marker {
    color: var(--accent);
}
summary:hover {
    color: var(--accent);
}
.faq-answer {
    padding: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}
.faq-answer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

:root {
    --attachment-width: 225px;
}
/* The window stays centered; its attachment hangs in the left margin, so the header narrows to the window's width. */
@media (min-width: 1201px) {
    body:has(.page-attachment) .nav-inner,
    body:has(.page-attachment) .document-main {
        width: min(1280px, calc(100% - 2 * (var(--attachment-width) + 14px)));
    }
}
.document-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    margin-block: 24px 28px;
}
.document-main > :is(.document-page, .docs-frame, .page-attachment) {
    grid-area: 1 / 1;
    min-width: 0;
}
.document-main > :is(.document-page, .docs-frame) {
    margin: 0;
}
.document-page {
    padding: 36px;
}
.document-header {
    margin-bottom: 36px;
}
.document-header h1 {
    margin-top: 12px;
    font-size: clamp(25px, 2.35vw, 32px);
    line-height: 1.5;
    letter-spacing: -0.8px;
}
.document-header > p:last-child {
    margin-top: 14px;
    color: var(--muted);
}
/* Attached to the window's left edge, like the terminal's resource details panel but mirrored. */
.page-attachment {
    position: sticky;
    top: 24px;
    z-index: 1;
    display: grid;
    align-content: start;
    gap: 2px;
    justify-self: start;
    width: var(--attachment-width);
    max-height: calc(100dvh - 48px);
    margin: 26px 0 0 calc(2px - var(--attachment-width));
    padding: 5px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 16px solid transparent;
    border-image: var(--details-frame) 8 fill / 16px stretch;
    font-size: 14px;
    line-height: 1.5;
}
.attachment-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font: 0.9375rem/1.6 var(--display);
}
.page-attachment a {
    padding: 7px 9px;
    overflow-wrap: anywhere;
    border: 1px solid transparent;
}
.page-attachment a:hover {
    background: var(--raised);
    border-color: var(--line);
    color: var(--text);
}
.page-attachment a[aria-current='location'] {
    background: var(--accent-fill);
    border-color: transparent;
    box-shadow: inset 3px 0 0 var(--accent);
    font-weight: 700;
}
.attachment-label {
    margin-top: 6px;
    padding: 10px 10px 2px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: 0.75rem/1.5 var(--display);
}
/* Links that leave the page differ from chapters: accent colour and an arrow that leans forward on hover. */
.page-attachment .page-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--accent);
}
.page-attachment .page-link:hover {
    color: var(--text);
}
.page-link .icon {
    width: 14px;
    height: 14px;
    transition: transform 120ms ease-out;
}
.page-link:hover .icon {
    transform: translateX(3px);
}
@media (max-width: 1500px) {
    :root {
        --attachment-width: 200px;
    }
}
/* Without room in the margin, the chapters stack above the window. */
@media (max-width: 1200px) {
    .document-main > .document-page {
        grid-area: 2 / 1;
    }
    /* Above the content the chapters are an ordinary window, as the terminal shows its details on a phone. */
    .page-attachment {
        position: static;
        justify-self: stretch;
        width: auto;
        max-height: none;
        margin: 0 0 16px;
        padding: 9px;
        background: var(--surface);
        background-clip: padding-box;
        border-width: 12px;
        border-image: var(--frame) 6 / 12px stretch;
        grid-template-columns: 1fr 1fr;
    }
    .attachment-title,
    .attachment-label {
        grid-column: 1 / -1;
    }
}
.document-content {
    min-width: 0;
}
.document-section + .document-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--line-soft);
}
.document-section h2,
.privacy-page .document-section h3 {
    font-size: 22px;
}
.privacy-page .document-section h3 {
    margin-top: 0;
}
.privacy-policy-title {
    margin-bottom: 28px;
    font-size: clamp(23px, 2.2vw, 28px);
    line-height: 1.5;
}
.privacy-policy-divider {
    margin: 48px 0 36px;
    border: 0;
    border-top: 2px solid var(--line);
}
.credit-entry {
    margin-top: 24px;
}
.credit-entry h3 {
    font-size: 16px;
    line-height: 1.6;
}
.credit-entry p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}
.credit-entry .credit-license {
    font-size: 13px;
}
.credit-entry .credit-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 0;
}
.credit-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.credit-links a:hover {
    color: var(--text);
}
.guide-content {
    line-height: 1.8;
}
.guide-content p,
.guide-content ul,
.guide-content ol,
.guide-content dl,
.guide-content pre {
    margin-top: 16px;
}
.guide-content h3 {
    margin-top: 26px;
    font-size: 16px;
    line-height: 1.6;
}
.guide-content p,
.guide-content li,
.guide-content dd {
    color: var(--muted);
}
.guide-content ol,
.guide-content ul {
    padding-left: 26px;
}
.guide-content li {
    padding-left: 4px;
    margin-block: 12px;
}
.guide-content li::marker {
    color: var(--accent);
    font-weight: 700;
}
.guide-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.guide-content a:hover {
    color: var(--text);
}
.guide-content code {
    color: var(--text);
    font-size: 0.85em;
    overflow-wrap: anywhere;
}
.guide-content kbd {
    padding: 1px 4px;
    border: 1px solid var(--line);
    background: var(--surface);
    font: 12px/1.6 var(--mono);
}
.guide-content pre {
    padding: 16px 18px;
    background: var(--recessed);
    border: 2px solid;
    border-color: var(--slot-dark) var(--slot-light) var(--slot-light) var(--slot-dark);
    line-height: 1.8;
}
.guide-content pre code {
    font-size: 12px;
    overflow-wrap: normal;
}
.guide-content dt {
    margin-top: 18px;
    font-weight: 700;
}
.guide-content dd {
    margin: 5px 0 0;
}
.code-block {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
}
.code-block pre {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}
.code-block .copy-button {
    flex: none;
}

.site-footer {
    color: #eeeaf4;
    --muted: #d1cbdc;
    --quiet: #c0bacd;
    --accent: #d2b7f2;
    --line-soft: #55505e;
}
.footer-main,
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.footer-main {
    padding-block: 29px;
}
.footer-brand {
    font-weight: 700;
    font-size: 14px;
}
.footer-brand span {
    margin-left: 12px;
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
    font-size: 12px;
}
.footer-links a:hover,
.footer-brand a:hover,
.footer-bottom a:hover {
    color: var(--accent);
}
.footer-bottom {
    justify-content: flex-start;
    padding-block: 20px;
    border-top: 1px solid var(--line-soft);
    color: var(--quiet);
    font-size: 0.75rem;
}
.footer-bottom p {
    margin-right: auto;
}
.footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.lightbox {
    width: min(1460px, 94vw);
    max-height: 94dvh;
    padding: 0;
    overflow: auto;
    background: var(--panel);
    color: var(--text);
    border: 12px solid transparent;
    border-image: var(--frame) 6 / 12px stretch;
}
.lightbox::backdrop {
    background: rgb(6 8 10 / 88%);
}
.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}
.lightbox-header h2 {
    font-size: 16px;
    letter-spacing: 0;
}
.lightbox img,
.lightbox video {
    width: 100%;
    height: auto;
    max-height: 75dvh;
    object-fit: contain;
    background: #252a34;
}
.lightbox video {
    display: block;
}
.lightbox-error {
    padding: 55px 24px;
}
.lightbox-error a {
    color: var(--accent);
    text-decoration: underline;
}
.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 16px 20px;
    color: var(--muted);
    font-size: 12px;
}
.lightbox-footer a {
    color: var(--accent);
}
.lightbox-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .wrap {
        width: calc(100% - 48px);
    }
    .nav-inner {
        gap: 16px;
    }
    .nav-links {
        gap: 18px;
    }
    .nav-links .github-link {
        padding-left: 18px;
    }
    .hero {
        gap: 32px;
        padding: 36px 24px;
    }
    .hero h1 {
        font-size: 30px;
    }
    .hero-actions .button {
        padding-inline: 14px;
        font-size: 13px;
    }
    .showcase {
        grid-template-columns: 224px minmax(0, 1fr);
        gap: 30px;
    }
    .panel-copy {
        min-height: 130px;
    }
    .personalize {
        gap: 70px;
    }
    .api-layout {
        gap: 45px;
    }
    .setup {
        gap: 24px;
    }
    .faq-section {
        gap: 60px;
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    .brand {
        gap: 8px;
        font-size: 0.75rem;
    }
    .brand img {
        width: 30px;
        height: 30px;
    }
    .nav-links {
        gap: 13px;
    }
    .nav-links .github-link {
        border: 0;
        padding-left: 0;
    }
    .github-link {
        font-size: 0 !important;
    }
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: 24px;
    }
    .hero h1 {
        font-size: 27px;
        letter-spacing: -1.4px;
    }
    .hero-description {
        font-size: 15px;
    }
    .hero-actions {
        gap: 8px;
    }
    .hero-actions .button {
        gap: 8px;
        padding-inline: 11px;
        font-size: 12px;
    }
    .compatibility {
        gap: 14px;
        grid-template-columns: 1.4fr repeat(4, 1fr);
    }
    .version {
        padding-left: 14px;
    }
    .version strong {
        font-size: 14px;
    }
    .personalize {
        gap: 40px;
    }
    .api-layout {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 28px;
    }
    pre {
        padding-inline: 18px;
        font-size: 0.75rem;
    }
    .setup {
        grid-template-columns: repeat(3, 1fr);
    }
    .setup > h3 {
        grid-column: 1 / -1;
        max-width: none;
    }
    .footer-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (min-width: 768px) and (max-width: 1000px) {
    .brand-name-full {
        display: none;
    }
    .brand-name-short {
        display: inline;
    }
}

@media (max-width: 959px) {
    .notification-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .notification-media {
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .document-main {
        margin-top: 18px;
    }
    .document-page {
        padding: 24px 16px;
    }
    .document-header {
        margin-bottom: 26px;
    }
    .document-header h1 {
        font-size: 23px;
    }
    .document-section h2,
    .privacy-page .document-section h3 {
        font-size: 20px;
    }
    .credit-entry h3 {
        font-size: 0.9375rem;
    }
    .nav {
        --nav-gap: 8px;
    }
    .tracking-section.section,
    .api-section.section {
        padding: 0;
    }
    .community-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    .community-chart {
        padding: 12px 8px 8px;
    }
    .community-svg text {
        font-size: 26px;
    }
    .tracking-section > .window,
    .api-layout {
        padding: 24px 16px;
    }
    main > .window,
    main > .section > .window {
        margin-bottom: 18px;
    }

    html {
        scroll-padding-top: 76px;
    }
    .wrap {
        width: calc(100% - 16px);
    }
    .section {
        padding: 24px 16px;
    }
    .nav-inner {
        min-height: 76px;
        padding: 4px 10px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .brand {
        gap: 9px;
        font-size: 0.75rem;
    }
    .brand img {
        width: 33px;
        height: 33px;
    }
    .nav-controls {
        margin-left: auto;
        order: 2;
        min-width: 96px;
    }
    .menu-toggle {
        display: inline-flex;
    }
    .nav-links {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        gap: 14px;
        padding-bottom: 14px;
        margin: 0;
    }
    .navigation-enhanced .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: grid;
        gap: 2px;
        padding: 10px;
        background: var(--panel);
        border: 2px solid;
        border-color: var(--edge-light) var(--edge-dark) var(--edge-dark) var(--edge-light);
    }
    .navigation-enhanced .nav-links:not([data-open]) {
        display: none;
    }
    .navigation-enhanced .nav-links > a {
        padding: 9px 12px;
    }
    .nav-links .github-link {
        border: 0;
        padding-left: 0;
    }
    .navigation-enhanced .nav-links .github-link {
        padding-left: 12px;
    }
    .hero {
        grid-template-columns: 1fr;
        gap: 33px;
        margin-top: 18px;
        padding: 28px 16px;
    }
    .hero h1 {
        font-size: clamp(23px, 6.8vw, 35px);
        line-height: 1.5;
        letter-spacing: -1.3px;
    }
    .hero-description {
        max-width: 420px;
        margin-top: 19px;
        font-size: 16px;
        line-height: 1.65;
    }
    .hero-actions {
        margin-top: 24px;
        gap: 10px;
    }
    .hero-actions .button {
        min-height: 46px;
        padding-inline: 14px;
        font-size: 13px;
        gap: 10px;
    }
    .hero-media figcaption {
        margin-top: 9px;
        font-size: 0.75rem;
    }
    .compatibility {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 20px;
        padding: 22px 16px;
    }
    .compatibility-intro {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 5px 12px;
        align-items: baseline;
    }
    .compatibility-intro span {
        margin: 0;
    }
    .version {
        padding-left: 13px;
    }
    h2 {
        font-size: 23px;
        letter-spacing: -0.6px;
    }
    .section-heading {
        margin-bottom: 28px;
    }
    .section-heading > p:not(.eyebrow),
    .section-copy {
        font-size: 15px;
    }
    .showcase {
        grid-template-columns: 1fr;
        gap: 27px;
    }
    .feature-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 3px;
    }
    .feature-tab {
        padding: 12px 15px;
        border: 2px solid transparent;
    }
    .feature-tab span {
        font-size: 0.75rem;
    }
    .feature-tab small {
        display: none;
    }
    .panel-copy {
        min-height: 130px;
        padding-bottom: 18px;
    }
    .panel-copy h3 {
        font-size: 17px;
    }
    .panel-copy p {
        font-size: 14px;
    }
    .feature-note {
        font-size: 12px;
    }
    .tracking-details {
        grid-template-columns: 1fr;
        gap: 23px;
        margin-top: 28px;
    }
    .tracking-details h3 {
        font-size: 0.9375rem;
    }
    .tracking-details p {
        margin-top: 5px;
        font-size: 14px;
    }
    .personalize {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .capability {
        margin-top: 24px;
    }
    .mobile-media {
        width: min(100%, 260px);
    }
    .api-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .api-content h2,
    .api-content .section-copy {
        max-width: 450px;
    }
    .api-content .text-link {
        margin-top: 12px;
    }
    .code-header {
        padding-inline: 17px;
        min-height: 58px;
    }
    pre {
        padding: 21px 17px;
        font-size: 0.75rem;
    }
    .code-help {
        padding-inline: 17px;
        font-size: 0.75rem;
    }
    .download-platforms {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .platform {
        min-height: 110px;
        padding: 23px;
    }
    .platform h3 {
        font-size: 21px;
    }
    .setup {
        grid-template-columns: 1fr;
        gap: 25px;
        padding-top: 28px;
        margin-top: 28px;
    }
    .setup h3 {
        max-width: none;
        font-size: 19px;
    }
    .setup p {
        margin-top: 5px;
    }
    .faq-section {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px 16px;
    }
    .faq-intro p {
        max-width: 440px;
    }
    .faq-intro .text-link {
        margin-top: 11px;
    }
    summary {
        padding-block: 18px;
        font-size: 14px;
    }
    .footer-main,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-main {
        padding-block: 24px 15px;
    }
    .footer-brand span {
        margin-left: 6px;
    }
    .footer-links {
        gap: 19px;
    }
    .footer-links a {
        font-size: 0.75rem;
    }
    .footer-bottom {
        padding-block: 19px;
        font-size: 0.75rem;
    }
    .lightbox-header {
        padding: 10px 12px;
        gap: 12px;
    }
    .lightbox-header h2 {
        font-size: 13px;
    }
    .lightbox-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
        padding: 13px;
        font-size: 0.75rem;
    }
}

@media (max-width: 359px) {
    .brand-name-full {
        display: none;
    }
    .brand-name-short {
        display: inline;
    }
    .wrap {
        width: calc(100% - 12px);
    }
    .brand {
        font-size: 0.75rem;
        gap: 7px;
    }
    .brand img {
        width: 24px;
        height: 24px;
    }
    .nav-inner {
        gap: 6px;
    }
    .nav-controls {
        gap: 6px;
    }
    .hero h1 {
        font-size: 23px;
    }
    .hero-actions .button {
        font-size: 12px;
        padding-inline: 11px;
        gap: 8px;
    }
    pre {
        font-size: 0.75rem;
    }
    .footer-brand span {
        display: block;
        margin: 5px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
