/* The landing page (index.html), privacy.html and thanks.html. No web fonts; the only other
   host is Paddle's checkout (buy.js), loaded once the sale is on. The colours follow the
   editor's dark Starship theme, and scripts/paddle_checkout_style.py copies them to Paddle. */
:root {
    --bg: #151515;
    --panel: #1e1e1e;
    --border: #2f2f2f;
    --text: #c0c0c0;
    --bright: #ffffff;
    --dim: #8a8a8a;
    --accent: #5aa0ff;
    --added: #4fbf61;
    --removed: #e05555;
    --width: 64rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

code, pre {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.9em;
}

code { color: var(--bright); }

pre {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--removed);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    overflow-x: auto;
}

h1, h2, h3 { color: var(--bright); line-height: 1.25; }
h1 { font-size: 2.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.7rem; margin: 0 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

main, footer, .nav {
    max-width: var(--width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

section { padding: 3rem 0; border-top: 1px solid var(--border); }
section.hero { border-top: none; padding-top: 3.5rem; }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.nav nav a:not(.button) { color: var(--text); text-decoration: none; }
.nav nav a:not(.button):hover { color: var(--bright); }

.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--bright); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.brand img { display: block; }

.lead { font-size: 1.2rem; max-width: 46rem; }
.note { color: var(--dim); font-size: 0.95rem; }
.small { font-size: 0.85rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0.5rem; }

.button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    background: var(--accent);
    color: #0b1320;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--accent);
}

.button:hover { filter: brightness(1.1); }
.button.small { padding: 0.35rem 0.8rem; font-size: 0.95rem; }
.button.ghost { background: transparent; color: var(--accent); }
.button.disabled { border-color: var(--border); color: var(--dim); cursor: default; filter: none; }
button.button { font: inherit; font-weight: 600; cursor: pointer; }
button.button:disabled { filter: none; opacity: 0.6; cursor: default; }

/* A screenshot's larger view (lightbox.js): click anywhere to close */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vmin;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
.lightbox:focus { outline: none; }
body.lightbox-open { overflow: hidden; }
figure.shot a { cursor: zoom-in; }

/* The beta sign-up (index.html #beta, beta.js) */
.signup { max-width: 34rem; margin-top: 1.25rem; }
.signup label { display: block; margin-bottom: 0.9rem; color: var(--bright); }
.signup .optional { color: var(--dim); font-weight: normal; }
.signup input, .signup textarea {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.55rem 0.7rem;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
}
.signup input:focus, .signup textarea:focus { outline: none; border-color: var(--accent); }
.signup textarea { resize: vertical; }
/* The field only bots fill in (site/worker/beta.js): off screen, not display:none, which some skip. */
.signup .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup [data-beta-status] { min-height: 1.5em; color: var(--added); }
.signup [data-beta-status].error { color: var(--removed); }

/* Screenshots. A .placeholder is a labelled box until the image exists in img/. */
.shot { margin: 1.5rem 0 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
/* Each image links to itself at full size, for the small text. */
.shot a { display: block; cursor: zoom-in; }

.shot.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: repeating-linear-gradient(45deg, #1b1b1b, #1b1b1b 12px, #1f1f1f 12px, #1f1f1f 24px);
    color: var(--dim);
    font-size: 0.95rem;
    text-align: center;
    padding: 1rem;
}

/* One feature per row, so the screenshots get the page's full width. */
.features { display: grid; grid-template-columns: 1fr; gap: 3.5rem; }
.features p { max-width: 46rem; }
.features article { min-width: 0; }

.fit ul, .plan ul { padding-left: 1.2rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin: 1.5rem 0 1rem; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.1rem; }
.stat p { margin: 0; }
.footnote {
    color: var(--dim);
    font-size: 0.8rem;
    line-height: 1.5;
    max-width: 46rem;
    margin-top: 1.25rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

.stat .detail { color: var(--dim); font-size: 0.8rem; margin-top: 0.5rem; }

.stat .figure { color: var(--bright); font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.4rem; }
.fit li { margin: 0.3rem 0; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }

.plan {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem 1.25rem 0.75rem;
}

.plan.featured { border-color: var(--accent); }
.plan li { margin: 0.35rem 0; }
.price { color: var(--bright); font-size: 1.8rem; font-weight: 700; margin: 0.25rem 0 0.5rem; }
.price span { color: var(--dim); font-size: 0.95rem; font-weight: 400; }

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

.faq summary { color: var(--bright); cursor: pointer; }
.faq details p { margin: 0.6rem 0 0.2rem; }

footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
    color: var(--dim);
}

footer a { margin-right: 1.25rem; }

/* privacy.html */
.doc { max-width: 46rem; padding: 2.5rem 0 3rem; }
.doc h2 { font-size: 1.3rem; margin-top: 2rem; }
.doc address { font-style: normal; margin: 0 0 1rem 1rem; }

/* /changelog/ (site/changelog.html): one section per release, from CHANGELOG.md */
.releases section.release { padding: 1.5rem 0 0.5rem; }
.releases section.release h2 { margin: 0; }
.releases section.release .note { margin: 0.2rem 0 0.6rem; }
.releases .tag {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--dim);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.05rem 0.4rem;
    vertical-align: middle;
}

/* /docs/ (site/docs.html, scripts/build_docs.py): the contents on the left, the page beside it */
.docs {
    max-width: 78rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 2.5rem;
}
.docs main { max-width: none; margin: 0; padding: 0; }
.docs .doc { max-width: 52rem; padding-top: 1.5rem; }
.docs-nav { padding-top: 1.8rem; font-size: 0.95rem; }
.docs-nav details { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.docs-nav summary { display: none; }
.docs-nav h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin: 1.2rem 0 0.4rem; }
.docs-nav h2:first-of-type { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 0.2rem 0.6rem; border-left: 2px solid transparent; color: var(--text); text-decoration: none; }
.docs-nav li a:hover { color: var(--bright); }
.docs-nav li a[aria-current="page"] { color: var(--bright); border-left-color: var(--accent); }
.doc h1 { font-size: 2.2rem; }
.doc h3 { margin-top: 1.6rem; }
.doc h4 { color: var(--bright); margin: 1.2rem 0 0.4rem; }
.doc h2[id], .doc h3[id], .doc h4[id] { scroll-margin-top: 1rem; }
.doc img { display: block; max-width: 100%; height: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: 4px; }
.doc table { border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--border); padding: 0.4rem 0.7rem; text-align: left; vertical-align: top; }
.doc th { background: var(--panel); color: var(--bright); }
.doc li { margin: 0.25rem 0; }
.doc blockquote { margin: 1rem 0; padding: 0.6rem 1rem; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 4px 4px 0; }
.doc blockquote p { margin: 0.3rem 0; }
.doc kbd {
    font: 0.85em ui-monospace, "Cascadia Mono", Consolas, monospace;
    color: var(--bright);
    background: var(--panel);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
}
.doc pre code { color: var(--text); }
.shot-missing {
    display: block;
    margin: 1rem 0;
    padding: 2rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--dim);
    text-align: center;
}
.pager { display: flex; justify-content: space-between; gap: 1rem; max-width: 52rem; padding: 0 0 3rem; }
.pager a { text-decoration: none; }

@media (max-width: 760px) {
    .docs { grid-template-columns: 1fr; gap: 0; }
    .docs-nav { padding-top: 1rem; }
    .docs-nav details { position: static; max-height: none; }
    .docs-nav summary { display: list-item; color: var(--bright); cursor: pointer; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    .plans { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    section { padding: 2.25rem 0; }
}

/* Buy buttons (buy.js) and the thank-you page (thanks.html). */
[hidden] { display: none !important; }
.plan [data-seats] input { width: 4em; margin-left: 0.5em; }
.thanks { max-width: 640px; margin: 3rem auto; }
.license-key { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.license-key code { font-size: 1.25rem; font-weight: bold; user-select: all; }
.license-key span { color: var(--dim, #9aa4b2); width: 100%; }
