/* Public front page and sign up pages. Self contained: served from their own folder, not from a panel. */
:root {
    --ink: #0f172a; --soft: #475569; --line: #d9dee7; --bg: #f3f6fb; --card: #ffffff; --band: #e8eefb;
    --blue: #1d4ed8; --blue-dark: #1e40af; --blue-ink: #ffffff; --red-bg: #fef2f2; --red: #b91c1c;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f1f5f9; --soft: #b6bfcc; --line: #334155; --bg: #0b1220; --card: #162033; --band: #111b2e;
        --blue: #3b82f6; --blue-dark: #60a5fa; --blue-ink: #ffffff; --red-bg: #3b1d1d; --red: #fca5a5;
        --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue); }
h1, h2 { line-height: 1.2; text-wrap: balance; }
section, article { scroll-margin-top: 80px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, calc((100% - 1160px) / 2)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 20px; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.nav a { color: var(--soft); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.btn { color: var(--blue-ink); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 8px 16px 48px; }

.btn { display: inline-block; padding: 12px 22px; font: inherit; font-weight: 600; color: var(--blue-ink); background: var(--blue); border: 1px solid var(--blue); border-radius: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn.small { padding: 8px 14px; font-size: 14px; }
form .btn { margin-top: 18px; }
form:not(.signin) .btn { width: 100%; }

.hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; padding: 40px 0 28px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.pitch h1 { font-size: 42px; margin: 0 0 16px; letter-spacing: -0.01em; }
.lead { font-size: 18px; color: var(--soft); margin: 0 0 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 26px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
.facts strong { display: block; font-size: 20px; }
.facts span { color: var(--soft); font-size: 14px; }

.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: var(--card); }

.band { margin: 28px 0; padding: 28px; background: var(--band); border: 1px solid var(--line); border-radius: 14px; }
.band h2 { margin: 0 0 10px; font-size: 24px; }
.band p { margin: 0; max-width: 80ch; }
.band p + p, .band form + p { margin-top: 12px; }

.feature { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.feature.solo { grid-template-columns: 1fr; max-width: 80ch; }
.feature:first-child { border-top: 0; padding-top: 12px; }
.feature.flip .feature-text { order: 2; }
.feature.flip { grid-template-columns: 1.2fr 0.8fr; }
.feature h2 { margin: 0 0 12px; font-size: 26px; }
.feature p { margin: 0 0 12px; color: var(--soft); }
.feature ul { margin: 0; padding-left: 20px; }
.feature li { margin: 6px 0; }

.grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.grid strong { display: block; margin-bottom: 4px; }
.grid span { color: var(--soft); font-size: 14px; }

section.steps { padding: 20px 0; }
section.steps h2, .faq h2 { font-size: 26px; margin: 0 0 16px; }
section.steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
section.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
section.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); font-weight: 700; }
section.steps strong { display: block; font-size: 18px; margin-bottom: 4px; }
section.steps span { color: var(--soft); }

.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 36px 0; border-top: 1px solid var(--line); margin-top: 20px; }
.signup-text h2 { font-size: 30px; margin: 0 0 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h1, .card h2 { margin: 0 0 14px; font-size: 22px; }
.narrow { max-width: 520px; margin: 32px auto; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.card label:first-of-type { margin-top: 0; }
input { width: 100%; padding: 11px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.site-row { display: flex; align-items: center; gap: 8px; }
.site-row input { flex: 1; min-width: 0; }
.site-row span { color: var(--soft); white-space: nowrap; font-size: 15px; }
.site-row .btn { margin-top: 0; white-space: nowrap; }
.signin { max-width: 560px; }
.hint, .muted { color: var(--soft); font-size: 14px; }
.hint { margin: 8px 0 0; }
.alert { background: var(--red-bg); color: var(--red); border-radius: 8px; padding: 10px 12px; font-size: 15px; margin-bottom: 14px; }
.address { font-family: ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.faq { padding: 12px 0 8px; max-width: 80ch; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--soft); }



@media (max-width: 900px) {
    .nav a:not(.btn) { display: none; }
    .hero, .feature, .feature.flip, .signup { grid-template-columns: 1fr; gap: 20px; }
    .feature.flip .feature-text { order: 0; }
    .pitch h1 { font-size: 30px; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    section.steps ol { grid-template-columns: 1fr; }
    .band { padding: 20px; }
}
@media (max-width: 480px) {
    .grid, .facts { grid-template-columns: 1fr; }
    .signin .site-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Grid children may shrink below their content, so nothing pushes a phone screen wider. */
.hero > *, .feature > *, .signup > * { min-width: 0; }

/* Shared frame: skip link, current page in the menu, footer. */
.skip { position: absolute; left: -5000px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.nav a[aria-current="page"]:not(.btn) { color: var(--ink); font-weight: 600; }
.more { margin-top: 12px; font-weight: 600; }
.band.cta { text-align: center; }
.band.cta p { margin-left: auto; margin-right: auto; }
.band.cta .cta-row { justify-content: center; margin-top: 18px; }
.foot { max-width: none; margin: 40px 0 0; padding: 40px max(16px, calc((100% - 1160px) / 2)) 28px; background: var(--band); border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 28px; }
.foot h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 7px 0; }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot a.btn { color: var(--blue-ink); }
.foot a.btn.ghost { color: var(--blue); }
.foot-about p { margin: 10px 0; max-width: 36ch; }
.foot-line { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }

/* Register and sign in pages. */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: 48px 0 24px; }
.auth > * { min-width: 0; }
.auth-text h1 { font-size: 36px; margin: 0 0 14px; }
.steps-list { margin: 0 0 18px; padding-left: 22px; }
.steps-list li { margin: 10px 0; }

/* Documentation and information pages. */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 24px; align-items: start; }
.doc-nav { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: 14px; padding-right: 8px; }
.doc-nav h2 { margin: 18px 0 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.doc-nav ul { list-style: none; margin: 0; padding: 0; }
.doc-nav a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.doc-nav a:hover { background: var(--band); }
.doc-nav a[aria-current="page"] { background: var(--band); color: var(--blue); font-weight: 600; }
.doc-home { font-weight: 700; }
.doc { max-width: 78ch; min-width: 0; }
.doc-wide { margin: 24px auto 0; }
.doc h1 { font-size: 34px; margin: 8px 0 18px; }
.doc h2 { font-size: 24px; margin: 34px 0 10px; padding-top: 6px; }
.doc h3 { font-size: 18px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin: 6px 0; }
.doc code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: var(--band); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.doc pre { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; }
.doc pre code { background: none; border: 0; padding: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--band); white-space: nowrap; }
.doc .note, .doc .warn { margin: 18px 0; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 4px; background: var(--card); }
.doc .note { border-left-color: var(--blue); }
.doc .warn { border-left-color: #d97706; }
.doc .note > :first-child, .doc .warn > :first-child { margin-top: 0; }
.doc .note > :last-child, .doc .warn > :last-child { margin-bottom: 0; }
.doc ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
.doc ol.steps > li { counter-increment: step; position: relative; padding-left: 42px; margin: 14px 0; }
.doc ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.doc .shot { margin: 20px 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--soft); }
.crumbs a { color: var(--soft); }
.doc-cards { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.doc-cards li { margin: 0; }
.doc-cards a { display: block; height: 100%; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.doc-cards a:hover { border-color: var(--blue); }
.doc-cards strong { display: block; margin-bottom: 4px; color: var(--blue); }
.doc-cards span { color: var(--soft); font-size: 14px; }
.doc-pager { display: flex; justify-content: space-between; gap: 16px; margin: 40px 0 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-pager a { text-decoration: none; font-weight: 600; max-width: 48%; }
.doc-pager .next { margin-left: auto; text-align: right; }
.doc-pager span { display: block; font-weight: 400; font-size: 13px; color: var(--soft); }
.doc-help { color: var(--soft); font-size: 14px; }

@media (max-width: 1000px) {
    .foot-grid { grid-template-columns: repeat(3, 1fr); }
    .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
    .auth-text h1 { font-size: 28px; }
    .doc-layout { grid-template-columns: 1fr; gap: 16px; }
    .doc-nav { position: static; max-height: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
    .doc-cards { grid-template-columns: 1fr; }
    .doc h1 { font-size: 28px; }
}
@media (max-width: 560px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
.foot-line-2 { margin-top: 10px; padding-top: 0; border-top: 0; }
