/* Copyright (c) 2026, Mike Pultz All rights reserved. */

:root {
    color-scheme: light dark;

    --bg:        #ffffff;
    --bg-alt:    #f5f7fa;
    --surface:   #ffffff;
    --text:      #36393f;
    --muted:     #5b6475;
    --border:    #e1e5ec;
    --accent:    #5f4fdc;
    --accent-fg: #ffffff;
    --code-bg:   #eef1f6;
    --code-fg:   #36393f;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #38393c;
        --bg-alt:    #3e3e42;
        --surface:   #434548;
        --text:      #e8e9ec;
        --muted:     #b0b3ba;
        --border:    #505157;
        --accent:    #b3a8ff;
        --accent-fg: #18191b;
        --code-bg:   #2f3032;
        --code-fg:   #e0e2e6;
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

code {
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

pre {
    background: var(--code-bg);
    color: var(--code-fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    line-height: 1.5;
}

pre code { background: none; padding: 0; font-size: 1em; }

h1, h2, h3 { font-weight: 500; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.05rem; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }

/* header */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 500; font-size: 1.1rem; color: var(--text); }
.brand img { display: block; }
.brand:hover { text-decoration: none; }

nav a { color: var(--muted); margin-left: 1.25rem; font-size: 0.95rem; font-weight: 500; }
nav a:hover { color: var(--text); text-decoration: none; }

/* hero */

.hero { padding: 5rem 0 4rem; text-align: center; }
.hero h1 { font-size: 3.25rem; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.hero h1 .tagline { display: block; margin: 0.35rem 0 0; font-weight: 400; letter-spacing: 0; line-height: 1.4; }
.tagline { font-size: 1.35rem; color: var(--muted); margin: 0 0 1.5rem; }
.lead { max-width: 640px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* copy-to-clipboard */

.copyable { position: relative; }
.copyable pre { padding-right: 3.5rem; }

.copyable.inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 100%;
}
.copyable.inline code { background: none; padding: 0; font-size: 1rem; overflow-x: auto; white-space: nowrap; }

.copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    flex: none;
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}
.copy:hover, .copy:focus-visible { color: var(--text); border-color: var(--border); background: var(--surface); }
.copyable pre + .copy { position: absolute; top: 0.55rem; right: 0.55rem; }

.copy svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.copy .i-check { display: none; }
.copy.done { color: #2f9e5b; }
.copy.done .i-copy { display: none; }
.copy.done .i-check { display: block; }

/* external link icon */

a[target="_blank"]:not(.sponsor-logo)::after {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.3em;
    vertical-align: -0.08em;
    background-color: currentColor;
    opacity: 0.8;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") no-repeat center / contain;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1.75rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
    font-weight: 500;
    font-size: 0.95rem;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }

/* sections */

.section { padding: 4rem 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
}
.card p { margin: 0; color: var(--muted); }

.more { margin: 1.75rem 0 0; color: var(--muted); }

.requirements { max-width: 640px; margin-top: 2.5rem; }

.faq { display: grid; gap: 0.75rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; }
.faq-item summary::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.2rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover h3 { color: var(--accent); }
.faq-item p { margin: 0; padding: 0 1.25rem 1.15rem; color: var(--muted); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
td:first-child { white-space: nowrap; padding-left: 0; }
td:last-child { color: var(--muted); }

/* sponsor */

.sponsor { text-align: center; }
.sponsor p { max-width: 680px; margin: 0 auto 1.75rem; }
.sponsor-logo { display: inline-block; margin-bottom: 1.5rem; }
.sponsor-logo img { width: 320px; max-width: 100%; height: auto; }

/* footer */

.foot { padding: 2rem 0; color: var(--muted); font-size: 0.9rem; text-align: center; }
.foot p { margin: 0; }

@media (max-width: 720px) {
    html { scroll-padding-top: 6.5rem; }
    .top-inner { flex-direction: column; align-items: flex-start; height: auto; gap: 0.3rem; padding-top: 0.6rem; padding-bottom: 0.5rem; }
    nav { display: flex; gap: 1.1rem; width: 100%; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
    nav a { margin-left: 0; font-size: 0.9rem; }
    .hero { padding: 3.5rem 0 3rem; }
    .hero h1 { font-size: 2.5rem; }
}
