:root {
    --bg: #ffffff;
    --surface: #f6f7f7;
    --text: #1d2327;
    --muted: #50575e;
    --link: #c63a00;
    --accent: #ff4a00;
    --accent-hover: #e04100;
    --accent-text: #ffffff;
    --accent-soft: #fff1ea;
    --code-bg: #f6f7f7;
    --border: #dcdcde;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16191d;
        --surface: #1d2327;
        --text: #f0f0f1;
        --muted: #a7aaad;
        --link: #ff7a40;
        --accent: #ff4a00;
        --accent-hover: #ff6a26;
        --accent-text: #ffffff;
        --accent-soft: #2e1d14;
        --code-bg: #2c3338;
        --border: #3c434a;
    }
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

a {
    color: var(--link);
}

h1 {
    margin: 0 0 24px;
    font-size: 34px;
    line-height: 1.2;
}

h2 {
    margin: 40px 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

/* Section links: site.js turns docs headings with an id into links that copy their address. */

.heading-link {
    color: inherit;
    text-decoration: none;
}

.heading-link::after {
    content: "#";
    margin-left: 8px;
    color: var(--muted);
    font-weight: 400;
    opacity: 0;
}

.heading-link:hover::after,
.heading-link:focus-visible::after {
    opacity: 1;
}

.heading-link.copied::after {
    content: "Link copied";
    font-size: 14px;
    opacity: 1;
}

.content h2[id],
.content h3[id] {
    scroll-margin-top: 16px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

ol,
ul {
    padding-left: 24px;
}

:not(pre) > code {
    padding: 1px 5px;
    background: var(--code-bg);
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    overflow-x: auto;
    margin: 12px 0 24px;
    padding: 16px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-title {
    color: var(--text);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    align-items: center;
}

.site-nav a:not(.button) {
    color: var(--muted);
    font-size: 16px;
    text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current] {
    color: var(--text);
}

/* Buttons */

.button {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--link);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-text);
}

.button:hover {
    background: var(--accent-soft);
}

.button-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button-small {
    padding: 6px 14px;
    font-size: 15px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Main areas */

.site-main {
    flex: 1;
    padding: 48px 0 64px;
}

.content {
    max-width: 720px;
}

.content > :first-child {
    margin-top: 0;
}

.lead {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 20px;
}

.breadcrumb {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 15px;
}

/* Home */

.hero {
    max-width: 760px;
    padding: 24px 0 48px;
}

.hero h1 {
    font-size: 44px;
}

.hero .lead {
    font-size: 22px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 48px;
    margin: 36px 0 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
}

.stats strong {
    display: block;
    color: var(--text);
    font-size: 30px;
    line-height: 1.2;
}

.section-title {
    margin: 0 0 20px;
    font-size: 26px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 0 0 56px;
    padding: 0;
    list-style: none;
}

.card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.card:hover h3 {
    color: var(--link);
    text-decoration: underline;
}

.steps {
    max-width: 720px;
    padding-left: 22px;
}

.steps li {
    margin-bottom: 8px;
}

/* Docs */

.docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.docs-nav {
    position: sticky;
    top: 24px;
    font-size: 15px;
}

.docs-nav p {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.docs-nav ul {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.docs-nav li {
    margin: 0 0 4px;
}

.docs-nav a {
    display: block;
    padding: 3px 10px;
    border-left: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.docs-nav a:hover {
    color: var(--link);
}

.docs-nav a[aria-current] {
    border-left-color: var(--accent);
    color: var(--link);
    font-weight: 600;
}

@media (max-width: 800px) {
    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .docs-nav {
        position: static;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }
}

/* FAQ */

.faq details {
    border-bottom: 1px solid var(--border);
}

.faq summary {
    padding: 14px 0;
    font-weight: 600;
    cursor: pointer;
}

.faq details[open] summary {
    color: var(--link);
}

.faq details > :not(summary) {
    margin-top: 0;
}

.faq details > :last-child {
    margin-bottom: 18px;
}

/* Footer */

.site-footer {
    padding: 24px 0 32px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 15px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
}

.site-footer p {
    margin: 0;
}

.site-footer .footer-note {
    flex-basis: 100%;
    font-size: 13px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

/* 404 */

.centered {
    max-width: 560px;
    padding: 48px 0;
}

/* Acknowledgments */

.credits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    max-width: 760px;
    gap: 16px;
    margin: 0 0 56px;
    padding: 0;
    list-style: none;
}

.credit {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.credit-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: 50%;
    color: var(--link);
    font-size: 20px;
    font-weight: 700;
}

.credit h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.credit p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.credit .credit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
    font-size: 14px;
}

.badge {
    padding: 2px 10px;
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--link);
    font-weight: 600;
}

.callout {
    max-width: 760px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.callout h2 {
    margin: 0 0 8px;
}

.callout p {
    margin: 0 0 20px;
    color: var(--muted);
}

@media (max-width: 600px) {
    h1,
    .hero h1 {
        font-size: 32px;
    }

    .hero .lead {
        font-size: 19px;
    }

    .site-main {
        padding-top: 32px;
    }
}
