@font-face {
    font-family: Fraunces;
    src: url('./fraunces.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('./dm-sans.woff2') format('woff2');
    font-weight: 100 1000;
    font-display: swap;
}

:root {
    color-scheme: light;
    --paper: #fbf8f0;
    --ink: #202b3c;
    --muted: #4e5b6b;
    --blue: #b3cde8;
    --blue-shadow: #9fb8d1;
    --coral: #ff8d82;
    --coral-shadow: #c65752;
    --line: #dcd8cd;
    --white: #fffdf8;
    --display: Fraunces, Georgia, serif;
    --body: 'DM Sans', system-ui, sans-serif;
    --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    --gutter: clamp(1rem, 4vw, 3rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 1rem/1.65 var(--body);
}
a {
    color: inherit;
    text-underline-offset: 0.22em;
}
button,
input {
    font: inherit;
}
button {
    cursor: pointer;
}
:focus-visible {
    outline: 2px solid #345b8e;
    outline-offset: 4px;
}
::selection {
    background: var(--blue);
    color: var(--ink);
}
h1,
h2,
h3,
p,
pre {
    margin: 0;
}
h1,
h2,
h3 {
    line-height: 1.05;
}
h1,
h2 {
    font-family: var(--display);
    font-weight: 650;
    letter-spacing: -0.05em;
}
code,
pre {
    font-family: var(--mono);
}
img {
    display: block;
}
.skip {
    position: absolute;
    z-index: 5;
    transform: translateY(-130%);
    background: var(--white);
    padding: 0.6rem 1rem;
}
.skip:focus {
    transform: translateY(0);
}

.wrap {
    width: min(100% - 2 * var(--gutter), 76rem);
    margin-inline: auto;
}
.masthead {
    border-bottom: 1px solid var(--line);
}
.masthead-inner {
    min-height: 4.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
}
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--display);
    font-size: 1.53rem;
    font-weight: 740;
    letter-spacing: -0.045em;
    text-decoration: none;
}
.masthead nav,
.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem clamp(0.9rem, 3vw, 2.35rem);
    font-size: 0.9rem;
    font-weight: 650;
}
.masthead nav a {
    text-decoration: none;
}
.masthead nav a:hover,
nav [aria-current='page'] {
    text-decoration: underline;
}
.github {
    border: 1px solid var(--line);
    padding: 0.24rem 0.7rem;
    border-radius: 6px;
}
.hero {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    padding-block: clamp(2.75rem, 6.5vw, 5rem);
}
.kicker {
    display: inline-block;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--coral);
    padding-bottom: 0.18rem;
    color: #364256;
    font: 600 0.75rem/1.4 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero h1 {
    max-width: 11ch;
    text-wrap: balance;
    font-size: clamp(3.4rem, 7.2vw, 7.2rem);
    line-height: 0.95;
    letter-spacing: -0.075em;
}
.intro {
    margin-block: 1.55rem 1.7rem;
    max-width: 36rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.23rem);
}
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.4rem;
}
.button {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--coral);
    box-shadow: inset 0 -4px var(--coral-shadow);
    border-radius: 7px;
    padding: 0.58rem 1.05rem 0.82rem;
    text-decoration: none;
    font-weight: 750;
}
.button:hover {
    background: #ff9d92;
}
.button:active {
    transform: translateY(2px);
    box-shadow: inset 0 -2px var(--coral-shadow);
}
.text-link {
    font-weight: 750;
}
.button span,
.text-link span,
.card-title span {
    padding-inline-start: 0.15em;
}
.logo-panel {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: clamp(20rem, 36vw, 29rem);
    overflow: hidden;
    border: 1px solid #a6bdd2;
    border-radius: 12px;
    background: linear-gradient(#436b8b14 1px, transparent 1px) center / 24px
            24px,
        linear-gradient(90deg, #436b8b14 1px, transparent 1px) center / 24px
            24px,
        #d9e8f4;
}
.logo-panel::before,
.logo-panel::after {
    content: '';
    z-index: -1;
    position: absolute;
    border: 1px dashed #8faac2;
    border-radius: 50%;
    width: 76%;
    aspect-ratio: 1;
}
.logo-panel::after {
    width: 64%;
    border-style: solid;
    border-color: #b2c8db;
}
.logo-panel img {
    width: min(56%, 16.75rem);
    height: auto;
    transform: rotate(-9deg);
    filter: drop-shadow(8px 13px 0 #7b9cbb36);
}
.example {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(1.65rem, 5vw, 5rem);
    align-items: center;
    border-top: 1px solid var(--line);
    padding-block: clamp(2.15rem, 5vw, 4.2rem);
}
.example h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}
.example p {
    margin-block: 0.85rem 1rem;
    color: var(--muted);
    max-width: 27ch;
}
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding-bottom: 2.9rem;
}
.card {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 1.1rem;
    color: var(--muted);
    text-decoration: none;
}
.card:hover {
    background: #edf5fa;
    border-color: var(--blue-shadow);
}
.card-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    color: var(--ink);
    font-weight: 780;
}
.footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-block: 1.65rem 2.5rem;
}
.footer .wordmark {
    margin-right: auto;
    font-size: 1.28rem;
}
.footer > a:not(.wordmark) {
    color: var(--muted);
    font-size: 0.86rem;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.snippet {
    min-width: 0;
    border: 1px solid #293b51;
    border-radius: 8px;
    background: #202c3d;
    color: #f5eee1;
    overflow: hidden;
}
.snippet-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 2.45rem;
    padding: 0.25rem 0.9rem;
    background: #2a384d;
    color: #d6e4f2;
    font: 0.74rem/1.5 var(--mono);
}
.snippet pre {
    overflow: auto;
    padding: 1rem 1.15rem 1.3rem;
}
.snippet code {
    font: 0.87rem/1.65 var(--mono);
}
.copy {
    color: inherit;
    background: #3b4c62;
    border: 0;
    border-radius: 4px;
    font-size: 0.74rem;
    padding: 0.2rem 0.5rem;
}
.copy:hover {
    background: #506582;
}
.copy:focus-visible {
    outline-color: #d5e8fa;
}
.hljs-keyword,
.hljs-title.function_ {
    color: #ffacaa;
}
.hljs-string,
.hljs-attr {
    color: #c8e8ab;
}
.hljs-number,
.hljs-literal {
    color: #ffcb9f;
}
.hljs-title,
.hljs-name,
.hljs-type {
    color: #abcef8;
}
.hljs-comment {
    color: #b4c5d7;
}

.docs {
    display: grid;
    grid-template-columns: minmax(8.5rem, 1fr) minmax(0, 4fr) minmax(8rem, 1fr);
    align-items: start;
    gap: clamp(1.1rem, 3vw, 3rem);
    padding-block: 3.9rem 5rem;
}
.sidebar,
.contents {
    display: grid;
    gap: 0.35rem;
    position: sticky;
    top: 1rem;
    font-size: 0.88rem;
    line-height: 1.4;
}
.sidebar {
    border-top: 1px solid var(--line);
    padding-top: 0.55rem;
}
.sidebar a {
    padding: 0.35rem 0.5rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.sidebar a[aria-current='page'] {
    border-radius: 5px;
    background: #dceaf6;
    font-weight: 760;
}
.contents {
    border-left: 1px solid var(--line);
    padding: 0.15rem 0 0.3rem 0.95rem;
}
.contents a {
    text-decoration: none;
    overflow-wrap: anywhere;
    color: var(--muted);
}
.sidebar a:hover,
.contents a:hover {
    text-decoration: underline;
}
.contents strong {
    margin-bottom: 0.2rem;
    font-size: 0.83rem;
}
.prose {
    min-width: 0;
    color: var(--muted);
    font-size: 1.04rem;
}
.prose h1,
.prose h2,
.prose h3 {
    color: var(--ink);
    overflow-wrap: anywhere;
}
.prose h1 {
    font-size: clamp(2.75rem, 5vw, 5rem);
    margin-bottom: 1.05rem;
}
.prose h2 {
    font-size: clamp(1.8rem, 3.3vw, 2.6rem);
    margin: 2.3rem 0 0.6rem;
}
.prose h3 {
    font-size: 1.13rem;
}
.prose p,
.prose ul,
.prose .snippet {
    margin-block: 0.85rem;
}
.prose :not(pre) > code {
    font-size: 0.83em;
    color: #284b71;
    background: #e7eef5;
    border-radius: 4px;
    padding: 0.12em 0.24em;
}
.prose a {
    color: #284b71;
}
.prose .api-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.55rem;
}
.prose .api-cards a {
    color: var(--muted);
}
.prose .page-intro {
    font-size: 1.15rem;
}
.api-entry {
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
    margin-top: 1.3rem;
}
.api-title {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: baseline;
}
.api-title h3 {
    font-family: var(--mono);
}
.api-title a {
    font-size: 0.8rem;
    white-space: nowrap;
}
.api-members dt {
    font-weight: 700;
}
.api-members dd {
    margin: 0 0 0.75rem;
}

@media (max-width: 850px) {
    .hero {
        grid-template-columns: 1fr 0.85fr;
    }
    .docs {
        grid-template-columns: 9rem minmax(0, 1fr);
    }
    .contents {
        display: none;
    }
}

@media (max-width: 620px) {
    .masthead-inner {
        padding-block: 0.65rem;
    }
    .masthead nav {
        font-size: 0.79rem;
    }
    .masthead .github {
        border: 0;
        padding: 0;
    }
    .hero,
    .example,
    .docs {
        grid-template-columns: 1fr;
    }
    .hero {
        padding-block: 2.4rem 2rem;
    }
    .hero h1 {
        font-size: clamp(3.35rem, 12vw, 4.8rem);
    }
    .logo-panel {
        min-height: 16rem;
    }
    .logo-panel img {
        width: min(44%, 10.75rem);
    }
    .cards,
    .prose .api-cards {
        grid-template-columns: 1fr;
    }
    .footer .wordmark {
        flex-basis: 100%;
    }
    .docs {
        padding-block: 1.45rem 3rem;
    }
    .sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.1rem 0.45rem;
        border: 0;
        padding: 0;
    }
    .sidebar a {
        padding: 0.2rem 0.35rem;
    }
}

@media (max-width: 375px) {
    .masthead-inner {
        flex-wrap: wrap;
    }
}
