@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: block; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: block; }
:root {
  --bg: #151D27; --bg-2: #1C2632; --panel: rgba(255,255,255,.03); --line: rgba(255,255,255,.10);
  --text: #F4F6F8; --muted: #A3ADB8;
  --green: #4ADE80; --cyan: #5BCFE6; --pink: #EC4899;
  --grad: linear-gradient(90deg, var(--green), var(--cyan));
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); font-family: "Geist", system-ui, sans-serif;
  font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0),
    radial-gradient(900px 500px at 15% 0%, rgba(74,222,128,.10), transparent 70%),
    linear-gradient(135deg, #13232B 0%, #161C28 50%, #1E1A2D 100%);
  background-size: 28px 28px, auto, auto;
  background-attachment: scroll, fixed, fixed;
}
main { flex: 1; width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--cyan); color: var(--bg); }
.g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 700px) { .wrap { padding: 0 18px; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
header { position: sticky; top: 0; z-index: 10; background: rgba(17,26,34,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { font-weight: 600; letter-spacing: .03em; text-decoration: none; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.brand .sub { font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: 0; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; }
nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
nav a { display: block; padding: 8px 13px; border-radius: 8px; text-decoration: none; color: var(--text); }
nav a:hover, nav a[aria-current] { color: var(--green); }
.menu-btn { display: none; }
@media (max-width: 780px) {
  .menu-btn { display: inline-flex; background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
  nav ul { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; padding: 8px 18px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  nav.open ul { display: flex; }
  nav a { padding: 12px 4px; font-size: 1.05rem; }
}
@media (max-width: 360px) { .brand .sub { display: none; } }

footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
footer a { color: var(--cyan); text-decoration: none; }

/* ---------- Shared ---------- */
.head { padding: 88px 0 36px; }
.head .kicker { font-family: var(--mono); font-size: .85rem; color: var(--cyan); letter-spacing: .02em; }
.head h1 { margin: 12px 0 0; font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; max-width: 20ch; }
.head p { margin: 18px 0 0; color: var(--muted); font-size: 1.15rem; max-width: 56ch; }
@media (max-width: 700px) { .head { padding: 56px 0 28px; } }

.btn {
  display: inline-block; padding: 12px 24px; border-radius: 10px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--green); color: var(--green); font: inherit; font-weight: 500; background: rgba(74,222,128,.06);
  box-shadow: 0 0 18px -2px rgba(74,222,128,.45), inset 0 0 12px -4px rgba(74,222,128,.3);
  transition: background .2s, box-shadow .2s;
}
.btn:hover { background: rgba(74,222,128,.12); box-shadow: 0 0 28px 0 rgba(74,222,128,.55), inset 0 0 14px -4px rgba(74,222,128,.4); }
.btn.ghost { border-color: var(--line); color: var(--text); background: none; box-shadow: none; }
.btn.ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.small { padding: 7px 14px; font-size: .9rem; border-width: 1px; box-shadow: none; }

.panel { position: relative; padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 560px) { .panel { padding: 20px 16px; } }

.cta { margin: 56px 0 80px; padding: 28px; border-radius: 10px; border: 1px solid rgba(236,72,153,.45); background: linear-gradient(135deg, rgba(236,72,153,.10), rgba(91,207,230,.04)); display: flex; justify-content: space-between; align-items: center; gap: 18px 32px; flex-wrap: wrap; }
.cta h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.cta p { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }

.toast { position: fixed; left: 50%; top: 82px; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; z-index: 20;
  padding: 10px 16px; border-radius: 8px; background: #0F161E; border: 1px solid rgba(74,222,128,.55); color: var(--green); font-size: .92rem; font-weight: 500;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Landing ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }
.tool-card { min-width: 0; }
.tool-card a { display: flex; flex-direction: column; height: 100%; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tool-card a:hover { border-color: rgba(91,207,230,.6); box-shadow: 0 0 30px -12px var(--cyan); }
.tool-card .tag { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.tool-card h2 { margin: 12px 0 0; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.tool-card a:hover h2 { color: var(--green); }
.tool-card p { margin: 10px 0 0; color: var(--muted); flex: 1; }
.tool-card .go { margin-top: 22px; font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--cyan); }
.tool-card .demo { margin-top: 22px; padding: 14px 16px; border-radius: 8px; background: #0F161E; border: 1px solid var(--line); font-family: var(--mono); font-size: .82rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tool-card .demo b { color: var(--green); font-weight: 500; }
.tool-card .demo em { color: #CFF3FB; font-style: normal; }
.note { margin: 36px 0 0; color: var(--muted); font-size: .95rem; max-width: 70ch; }

/* ---------- Form controls ---------- */
label, .lbl { display: block; font-size: .92rem; font-weight: 500; }
.hint { display: block; margin-top: 2px; color: var(--muted); font-size: .84rem; font-weight: 400; }
input[type="text"], input[type="number"], input[type="search"], select {
  width: 100%; margin-top: 8px; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line); background: #0F161E;
  color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(91,207,230,.18); }
input[type="number"] { font-family: var(--mono); -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.affix { position: relative; }
.affix span { position: absolute; left: 13px; top: 50%; transform: translateY(calc(-50% + 4px)); color: var(--muted); font-family: var(--mono); pointer-events: none; }
.affix input { padding-left: 28px; }
.affix.suffix span { left: auto; right: 13px; }
.affix.suffix input { padding-left: 13px; padding-right: 34px; }

/* ---------- Savings calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.presets .lbl { width: 100%; margin-bottom: 2px; color: var(--muted); font-weight: 400; font-size: .88rem; }
.chip { font: inherit; font-size: .88rem; color: var(--text); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.chip:hover { border-color: rgba(91,207,230,.5); }
.chip[aria-pressed="true"] { border-color: var(--cyan); background: rgba(91,207,230,.12); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.freq { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.range-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
input[type="range"] { flex: 1; accent-color: var(--green); height: 24px; cursor: pointer; }
.range-row output { font-family: var(--mono); font-size: .95rem; min-width: 4ch; text-align: right; }

.results { position: sticky; top: 90px; }
.results .big { font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.results .money { margin: 4px 0 0; font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.results .per { color: var(--muted); font-size: .95rem; }
.stats { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stats li { padding: 14px 16px; background: #18212C; }
.stats b { display: block; font-family: var(--mono); font-size: 1.15rem; font-weight: 500; }
.stats span { font-size: .84rem; color: var(--muted); }
.bars { margin: 24px 0 0; }
.bars .row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; font-size: .84rem; color: var(--muted); }
.bars .row + .row { margin-top: 8px; }
.bars .track { height: 10px; border-radius: 5px; background: rgba(255,255,255,.06); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 5px; width: 0; transition: width .35s ease; }
.bars .fill.now { background: rgba(236,72,153,.75); }
.bars .fill.after { background: var(--grad); }
@media (prefers-reduced-motion: reduce) { .bars .fill { transition: none; } }
.explain { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-family: var(--mono); line-height: 1.7; word-break: break-word; }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.assume { margin: 28px 0 0; color: var(--muted); font-size: .92rem; max-width: 80ch; }
.assume strong { color: var(--text); font-weight: 500; }

/* ---------- Scope finder ---------- */
.finder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .finder { grid-template-columns: 1fr; } }
.search-row { display: flex; flex-direction: column; gap: 14px; }
.search-row input { margin-top: 0; font-size: 1.05rem; padding: 13px 15px; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.apps .count { color: var(--muted); font-family: var(--mono); font-size: .76rem; margin-left: 6px; }
.scope-list { list-style: none; margin: 20px 0 0; padding: 0; }
.scope-group { margin: 28px 0 0; }
.scope-group:first-child { margin-top: 0; }
.scope-group h2 { margin: 0 0 10px; font-size: 1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.scope-group h2 a { font-size: .82rem; font-weight: 400; color: var(--cyan); text-decoration: none; font-family: var(--mono); }
.scope-group h2 a:hover { text-decoration: underline; }
.scope { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.scope + .scope { margin-top: 8px; }
.scope code { font-family: var(--mono); font-size: .9rem; color: #CFF3FB; word-break: break-all; }
.scope p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.ops { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.op { font-family: var(--mono); font-size: .76rem; font-weight: 500; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.op:hover { border-color: var(--cyan); color: var(--text); }
.op[aria-pressed="true"] { border-color: var(--green); color: #0E1A1F; background: var(--green); }
@media (max-width: 640px) {
  .scope { grid-template-columns: 1fr; }
  .ops { justify-content: flex-start; }
}
.nores { padding: 26px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }

.tray { position: sticky; top: 90px; }
.tray h2 { margin: 0; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; }
.tray h2 span { font-family: var(--mono); font-size: .82rem; color: var(--muted); font-weight: 400; }
.tray .empty { margin: 12px 0 0; color: var(--muted); font-size: .92rem; }
.picked { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.picked li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 6px; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); }
.picked code { font-family: var(--mono); font-size: .8rem; word-break: break-all; }
.picked button { flex: none; width: 24px; height: 24px; border-radius: 5px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.picked button:hover { color: var(--pink); background: rgba(236,72,153,.12); }
.out { margin: 14px 0 0; padding: 12px; border-radius: 8px; background: #0F161E; border: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; color: #CFF3FB; word-break: break-all; min-height: 44px; }
.tray-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.tray .how { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.tray .how a { color: var(--cyan); }
@media (max-width: 960px) { .tray { position: static; } }
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .mobile-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 15; display: none; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px 10px 16px; border-radius: 10px; background: #0F161E; border: 1px solid rgba(74,222,128,.55); box-shadow: 0 10px 30px -8px rgba(0,0,0,.7); font-size: .92rem; }
  .mobile-bar.show { display: flex; }
}
.tray .how code { font-family: var(--mono); font-size: .9em; color: #CFF3FB; }
@media (max-width: 960px) { .mobile-bar.show + footer { padding-bottom: 96px; } }
@media (max-width: 560px) { .tool-card .demo { white-space: normal; overflow-wrap: anywhere; } }

/* ---------- Endpoint matcher ---------- */
.omni { display: flex; gap: 10px; }
.omni input { flex: 1; min-width: 0; }
.omni select { width: auto; margin-top: 0; font-family: var(--mono); font-size: .9rem; }
.omni select[hidden] { display: none; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.ex { font: inherit; font-family: var(--mono); font-size: .78rem; color: var(--cyan); padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: none; cursor: pointer; }
.ex:hover { border-color: var(--cyan); }
.match { margin: 20px 0 0; padding: 22px; border-radius: 10px; border: 1px solid rgba(74,222,128,.45); background: linear-gradient(135deg, rgba(74,222,128,.08), rgba(91,207,230,.04)); }
.match.guess { border-color: rgba(247,200,115,.5); background: linear-gradient(135deg, rgba(247,200,115,.07), rgba(91,207,230,.03)); }
.match.none { border-style: dashed; border-color: var(--line); background: none; color: var(--muted); }
.match.none p { margin: 0; }
.match.none p + p { margin-top: 8px; font-size: .92rem; }
.match-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.match-head strong { font-size: 1.05rem; }
.pill { font-family: var(--mono); font-size: .76rem; font-weight: 500; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.conf { margin: 8px 0 0; font-size: .86rem; color: var(--green); }
.match.guess .conf { color: #F7C873; }
.hit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: 14px 0 0; padding: 14px 16px; border-radius: 8px; background: #0F161E; border: 1px solid var(--line); }
.hit code { font-family: var(--mono); font-size: 1.02rem; color: #CFF3FB; word-break: break-all; }
.hit + .hit { margin-top: 8px; }
.hit .acts { display: flex; gap: 8px; }
.hit .btn.small[aria-pressed="true"] { background: var(--green); color: #0E1A1F; border-color: var(--green); }
.also { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.also .op { font-size: .78rem; }
.mnotes { margin: 14px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: .9rem; }
.mnotes li + li { margin-top: 4px; }
.mnotes a { color: var(--cyan); }
.browse-h { margin: 40px 0 14px; font-size: 1.05rem; }
@media (max-width: 560px) { .omni { flex-direction: column; } .omni select { width: 100%; } }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 0; }
.pager:empty { display: none; }
.pager .btn:disabled { opacity: .4; cursor: default; }
.pnums { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pnum { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-family: var(--mono); font-size: .85rem; cursor: pointer; }
.pnum:hover { border-color: var(--cyan); }
.pnum[aria-current="page"] { border-color: var(--green); background: var(--green); color: #0E1A1F; font-weight: 500; }
.pnums .gap { color: var(--muted); padding: 0 2px; }
.pinfo { width: 100%; margin: 0; text-align: center; color: var(--muted); font-size: .85rem; font-family: var(--mono); }
@media (max-width: 560px) { .pager { justify-content: center; } .pager > .btn { flex: 1; } .pnums { order: 3; width: 100%; justify-content: center; } .pinfo { order: 4; } }
.tool-card p code { font-family: var(--mono); font-size: .88em; color: #CFF3FB; }
@media (min-width: 1100px) { .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
