/* overpass.ch — hand-written, no framework */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --muted: #5b6475;
  --border: #e3e6eb;
  --accent: #d52b1e;
  --accent-hover: #b3231a;
  --accent-soft: #fdecea;
  --ok: #15803d;
  --ok-soft: #e8f6ee;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --info-soft: #eaf1fb;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 6%);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #111831;
    --bg-card: #121a33;
    --text: #e6e9f2;
    --muted: #9aa3b8;
    --border: #232c48;
    --accent: #ef4b3f;
    --accent-hover: #ff6257;
    --accent-soft: #3a1a1c;
    --ok: #4ade80;
    --ok-soft: #12291f;
    --warn: #fbbf24;
    --warn-soft: #2e2512;
    --info-soft: #15223f;
    --code-bg: #060a16;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: .1em .35em; word-break: break-word; }
pre {
  background: var(--code-bg); color: var(--code-text); border-radius: var(--radius);
  padding: 1rem 1.2rem; overflow-x: auto; line-height: 1.5; margin: 0 0 1.2em;
}
pre .c { color: #7d8aa8; }
pre .s { color: #a5d6a7; }
pre .k { color: #f8a5a0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.section { padding-block: 72px; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.center .lead { margin-inline: auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.12rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand > span { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav button.linklike {
  color: var(--muted); font-weight: 550; padding: 8px 12px; border-radius: 8px; font-size: .95rem;
}
.nav a:hover, .nav button.linklike:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a.active { color: var(--text); }
.nav .btn { margin-left: 6px; color: #fff; }
.nav .btn:hover { color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; color: var(--text); font: inherit; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; }
  .nav-open .nav { display: flex; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 10px; padding: 10px 18px; font: 600 .97rem/1.2 var(--font); cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
.btn-sm { padding: 6px 12px; font-size: .88rem; border-radius: 8px; }
.btn-danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.linklike { background: none; border: 0; font: inherit; cursor: pointer; color: var(--accent); padding: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
label.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 450; }
label.check input { margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 84px; font-family: var(--mono); font-size: .9rem; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
.hint { color: var(--muted); font-size: .86rem; margin-top: .3rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* alerts */
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 1.2rem; border: 1px solid transparent; font-size: .95rem; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-info { background: var(--info-soft); border-color: var(--border); }
.alert-error { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: .88rem; padding: 6px 12px; border-bottom: 1px solid var(--border); }

/* cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* hero */
.hero { padding-block: 84px 64px; background:
  radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
  radial-gradient(800px 300px at -10% 10%, color-mix(in srgb, #3b82f6 8%, transparent), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .actions { margin: 28px 0 18px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--muted);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot-ok { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 20%); }
.dot-warn { background: #f59e0b; box-shadow: 0 0 0 3px rgb(245 158 11 / 20%); }
.dot-bad { background: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / 20%); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .93rem; }
.checks li::before, .features li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 7px; }

.terminal { border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgb(15 23 42 / 18%); border: 1px solid #1e293b; }
.terminal-bar { background: #1e293b; padding: 10px 14px; display: flex; gap: 7px; align-items: center; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #475569; display: block; }
.terminal-bar span { margin-left: 8px; color: #94a3b8; font: .8rem var(--mono); }
.terminal pre { margin: 0; border-radius: 0; font-size: .84rem; }

/* features */
.feature .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .9rem; }

/* pricing */
.toggle { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 2px; }
.toggle a { padding: 6px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.toggle a:hover { text-decoration: none; color: var(--text); }
.toggle a.on { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow); }
.toggles { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0 36px; }
.save { color: var(--ok); font-size: .78rem; font-weight: 700; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 1040px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.popular { border: 2px solid var(--accent); }
.plan .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.plan .price { font-size: 2.3rem; font-weight: 780; letter-spacing: -0.03em; margin: 10px 0 0; }
.plan .price small { font-size: .95rem; font-weight: 500; letter-spacing: 0; }
.plan .per { color: var(--muted); font-size: .88rem; min-height: 1.4em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; font-size: .94rem; flex: 1; }
.plan li { padding: 5px 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; gap: 8px; }
.plan li:last-child { border-bottom: 0; }
.plan li b { font-weight: 650; text-align: right; }
.features { list-style: none; padding: 0; margin: 0 0 18px; font-size: .93rem; color: var(--muted); }
.features li { padding: 3px 0; }
.badge { display: inline-block; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.badge-soft { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* faq */
details { border-bottom: 1px solid var(--border); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--muted); }

/* auth */
.auth { max-width: 440px; margin: 56px auto; }
.auth h1 { font-size: 1.8rem; }
.auth .alt { text-align: center; margin-top: 1.2rem; color: var(--muted); font-size: .94rem; }

/* dashboard */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-block: 36px 72px; }
@media (max-width: 820px) { .dash { grid-template-columns: 1fr; gap: 16px; } }
.side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; align-self: start; }
@media (max-width: 820px) { .side { position: static; flex-direction: row; flex-wrap: wrap; } }
.side a { color: var(--muted); padding: 9px 12px; border-radius: 9px; font-weight: 560; }
.side a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.side a.active { background: var(--accent-soft); color: var(--accent); }
.dash h1 { font-size: 1.8rem; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.meter { height: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.ok > i { background: #22c55e; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .94rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 560; }
.keybox { display: flex; gap: 8px; align-items: stretch; }
.keybox input { font-family: var(--mono); font-size: .9rem; }
.newkey { border: 2px solid var(--ok); background: var(--ok-soft); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .err { fill: #f59e0b; }
.chart text { fill: var(--muted); font: 10px var(--font); }
.legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.mono { font-family: var(--mono); font-size: .9em; }
.danger-zone { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding-block: 40px 80px; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs .toc { display: none; } }
.docs .toc { position: sticky; top: 84px; align-self: start; font-size: .92rem; display: flex; flex-direction: column; gap: 2px; }
.docs .toc a { color: var(--muted); padding: 5px 10px; border-radius: 7px; }
.docs .toc a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.docs article h2 { margin-top: 2.4rem; padding-top: .6rem; scroll-margin-top: 80px; }
.docs article h2:first-child { margin-top: 0; }
.docs article h3 { margin-top: 1.6rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 0; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 8px 14px; font: 600 .9rem var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
[data-tabs] pre { border-top-left-radius: 0; border-top-right-radius: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.4rem; font-size: 1.1rem; }
.prose li { margin-bottom: .35rem; }

/* status */
.status-big { display: flex; align-items: center; gap: 16px; font-size: 1.4rem; font-weight: 700; }
.status-big .dot { width: 16px; height: 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-block: 44px 28px; font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: var(--text); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.fineprint { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* utilities (no inline styles: CSP) */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .8rem; } .mt-2 { margin-top: 1.6rem; } .mt-3 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .8rem; } .mb-2 { margin-bottom: 1.6rem; }
.w-auto { width: auto; } .inline { display: inline; } .right { text-align: right; } .small { font-size: .88rem; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.bar-swatch { background: var(--accent); } .err-swatch { background: #f59e0b; }
.side-logout { color: var(--muted); padding: 9px 12px; font-weight: 560; text-align: left; }
.center .actions { justify-content: center; }
/* meter widths (CSP forbids inline styles) */
.w-0{width:0%} .w-1{width:1%} .w-2{width:2%} .w-3{width:3%} .w-4{width:4%} .w-5{width:5%} .w-6{width:6%} .w-7{width:7%} .w-8{width:8%} .w-9{width:9%} .w-10{width:10%} .w-11{width:11%} .w-12{width:12%} .w-13{width:13%} .w-14{width:14%} .w-15{width:15%} .w-16{width:16%} .w-17{width:17%} .w-18{width:18%} .w-19{width:19%} .w-20{width:20%} .w-21{width:21%} .w-22{width:22%} .w-23{width:23%} .w-24{width:24%} .w-25{width:25%} .w-26{width:26%} .w-27{width:27%} .w-28{width:28%} .w-29{width:29%} .w-30{width:30%} .w-31{width:31%} .w-32{width:32%} .w-33{width:33%} .w-34{width:34%} .w-35{width:35%} .w-36{width:36%} .w-37{width:37%} .w-38{width:38%} .w-39{width:39%} .w-40{width:40%} .w-41{width:41%} .w-42{width:42%} .w-43{width:43%} .w-44{width:44%} .w-45{width:45%} .w-46{width:46%} .w-47{width:47%} .w-48{width:48%} .w-49{width:49%} .w-50{width:50%} .w-51{width:51%} .w-52{width:52%} .w-53{width:53%} .w-54{width:54%} .w-55{width:55%} .w-56{width:56%} .w-57{width:57%} .w-58{width:58%} .w-59{width:59%} .w-60{width:60%} .w-61{width:61%} .w-62{width:62%} .w-63{width:63%} .w-64{width:64%} .w-65{width:65%} .w-66{width:66%} .w-67{width:67%} .w-68{width:68%} .w-69{width:69%} .w-70{width:70%} .w-71{width:71%} .w-72{width:72%} .w-73{width:73%} .w-74{width:74%} .w-75{width:75%} .w-76{width:76%} .w-77{width:77%} .w-78{width:78%} .w-79{width:79%} .w-80{width:80%} .w-81{width:81%} .w-82{width:82%} .w-83{width:83%} .w-84{width:84%} .w-85{width:85%} .w-86{width:86%} .w-87{width:87%} .w-88{width:88%} .w-89{width:89%} .w-90{width:90%} .w-91{width:91%} .w-92{width:92%} .w-93{width:93%} .w-94{width:94%} .w-95{width:95%} .w-96{width:96%} .w-97{width:97%} .w-98{width:98%} .w-99{width:99%} .w-100{width:100%}
.inline-details { display: inline-block; text-align: left; margin-right: 8px; } .inline-details summary { display: inline; color: var(--accent); } .inline-details summary::after { content: none; } .inline-details[open] form { position: absolute; right: 24px; z-index: 5; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); width: 320px; }
.brand b { color: var(--accent); font-weight: inherit; }
.grid-3x { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3x { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3x { grid-template-columns: 1fr; } }
.plan ul.features { flex: none; margin-top: 0; }
.plan .features li { display: block; border: 0; padding: 3px 0; }
.dash > div, .docs > article { min-width: 0; }
.side form { display: block; }
.side button.side-logout { display: block; width: 100%; color: var(--muted); padding: 9px 12px; border-radius: 9px; font-weight: 560; text-align: left; }
.side button.side-logout:hover { background: var(--bg-soft); color: var(--text); }
.empty { padding: 28px 0; text-align: center; }
