/* GitBills' own pages (gitbills.com /, /docs and /pricing; lib/pilot/gitbills-home.mjs), loaded after /site.css.
   Everything here is scoped to body.gb, so no other page changes, and site.css's variables and fonts are used as they are.
   One idea carries the look: the URL swap is a diff (hub struck out, bills added). Emerald means added or ready,
   amber needs a vouch, crimson removed or blocked: colour is meaning, never decoration. Monospace is only for what
   people type (addresses, commands, commit SHAs). Hairline borders, no shadows, no entrance motion. */

html:has(> body.gb) { background: #07090e; }

.gb {
  --gb-bg: #07090e;
  --gb-raised: #0b0f17;
  --gb-card: #101520;
  --gb-border: #1e293b;
  --gb-border-strong: #2b3a52;
  --gb-emerald: #3ddc97;
  --gb-emerald-hover: #66e8b0;
  --gb-amber: #f59e0b;
  --gb-crimson: #ef4444;
  --gb-ink: #f8fafc;
  --gb-muted: #94a3b8;
  --gb-faint: #5b6b82;
  background: var(--gb-bg);
  color: var(--gb-ink);
  font-weight: 400;
}
.gb ::selection { background: rgba(61, 220, 151, 0.32); color: var(--gb-ink); }
.gb [hidden] { display: none !important; }
.gb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* header: the mark is drawn here, so the markup stays the plain name other GitBills pages use */
.gb .gb-top { padding-top: 18px; padding-bottom: 12px; }
.gb .gb-brand { gap: 0.65rem; font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }
.gb .gb-brand::before {
  content: "G"; content: "G" / "";
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--gb-emerald); color: var(--gb-bg); font: 700 1rem/1 var(--sans);
}
.gb .top nav { color: var(--gb-border-strong); font-size: 0.95rem; line-height: 1.9; }
.gb .top nav a { color: var(--gb-muted); padding: 0.55rem 0.1rem; }
.gb .top nav a:hover, .gb .top nav a[aria-current="page"] { color: var(--gb-ink); }
.gb .top nav a[aria-current="page"] { text-decoration-color: var(--gb-emerald); }

/* type */
.gb-main { padding-bottom: 1rem; }
.gb h1, .gb h2, .gb h3 { color: var(--gb-ink); }
.gb-eyebrow { margin: 0 0 1.4rem; color: var(--gb-emerald); font: 500 0.98rem/1.4 var(--sans); letter-spacing: 0.01em; }
.gb-lede { margin: 0 0 2.4rem; max-width: 40em; color: var(--gb-muted); font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.6; }
.gb-lede a { color: var(--gb-ink); text-decoration-color: var(--gb-border-strong); }
.gb-lede a:hover { text-decoration-color: var(--gb-emerald); }

/* the hero */
.gb-hero { padding: clamp(3rem, 8vw, 6.5rem) 0 2.6rem; }
.gb-hero h1 { max-width: 13.5em; margin: 0 0 1.6rem; font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 560; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }

/* the inspect form, shaped like the address bar it rewrites */
.gb-inspect {
  display: flex; align-items: stretch; max-width: 54rem; padding: 6px;
  background: var(--gb-raised); border: 1px solid var(--gb-border-strong); border-radius: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gb-inspect:focus-within { border-color: var(--gb-emerald); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.16); }
.gb-inspect-prefix { display: flex; align-items: center; padding-left: 14px; color: var(--gb-muted); font: 400 0.95rem/1 var(--mono); white-space: nowrap; }
.gb-inspect-input {
  flex: 1 1 auto; min-width: 0; padding: 14px 10px 14px 2px;
  background: transparent; border: 0; color: var(--gb-ink); font: 400 0.95rem/1.4 var(--mono);
}
.gb-inspect-input::placeholder { color: var(--gb-faint); opacity: 1; }
.gb-inspect-input:focus, .gb-inspect-input:focus-visible { outline: none; }   /* the form's ring shows focus */
.gb-inspect .gb-btn { flex: none; }
.gb-inspect-error { margin: 0.8rem 0 0; color: #fca5a5; font-size: 0.95rem; }
.gb-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1.1rem 0 0; color: var(--gb-muted); font-size: 0.95rem; }
.gb-samples > span { margin-right: 0.2rem; }
.gb-pill {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 0.85rem;
  border: 1px solid var(--gb-border); border-radius: 999px; background: var(--gb-raised);
  color: var(--gb-ink); text-decoration: none; font: 400 0.85rem/1 var(--mono);
}
.gb-pill:hover { border-color: var(--gb-emerald); }

/* the URL swap, as the diff it is */
.gb-swap-section { padding: 0.6rem 0 4.5rem; }
.gb-swap { margin: 0; max-width: 54rem; }
.gb-swap-diff { overflow: hidden; background: var(--gb-card); border: 1px solid var(--gb-border); border-radius: 14px; font-family: var(--mono); }
.gb-swap-line { display: flex; align-items: baseline; gap: 1rem; margin: 0; padding: 0.95rem 1.25rem; overflow-x: auto; font-size: clamp(0.88rem, 2.3vw, 1.15rem); }
.gb-swap-line + .gb-swap-line { border-top: 1px solid var(--gb-border); }
.gb-swap-del { background: rgba(239, 68, 68, 0.06); }
.gb-swap-add { background: rgba(61, 220, 151, 0.07); }
.gb-swap-sign { flex: none; width: 1ch; font-weight: 700; }
.gb-swap-del .gb-swap-sign { color: var(--gb-crimson); }
.gb-swap-add .gb-swap-sign { color: var(--gb-emerald); }
.gb .gb-swap-line code { padding: 0; border: 0; background: none; color: var(--gb-muted); font-size: inherit; white-space: nowrap; }
.gb .gb-swap-add code { color: var(--gb-ink); }
.gb-swap del {
  padding: 0.05em 0.15em; border-radius: 4px; background: rgba(239, 68, 68, 0.26); color: #fecaca;
  text-decoration: line-through; text-decoration-color: var(--gb-crimson); text-decoration-thickness: 2px;
}
.gb-swap ins { padding: 0.05em 0.15em; border-radius: 4px; background: var(--gb-emerald); color: var(--gb-bg); text-decoration: none; }
.gb-swap figcaption { margin-top: 0.9rem; color: var(--gb-muted); font-size: 1rem; }
.gb-swap figcaption strong { color: var(--gb-ink); font-weight: 500; }

/* actions */
.gb-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-top: 2.2rem; }
.gb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0 1.2rem;
  border: 1px solid var(--gb-border-strong); border-radius: 10px; background: transparent;
  color: var(--gb-ink); font: 500 0.98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.gb-btn:hover { border-color: var(--gb-muted); }
.gb-btn-primary { background: var(--gb-emerald); border-color: var(--gb-emerald); color: var(--gb-bg); font-weight: 600; }
.gb-btn-primary:hover { background: var(--gb-emerald-hover); border-color: var(--gb-emerald-hover); }
.gb-btn-lg { min-height: 52px; padding: 0 1.5rem; font-size: 1.02rem; }
.gb-cmd {
  display: inline-flex; align-items: center; gap: 0.75rem; min-height: 52px; max-width: 100%; padding: 0 0.5rem 0 1rem;
  background: var(--gb-raised); border: 1px solid var(--gb-border); border-radius: 10px;
}
.gb .gb-cmd code { overflow-x: auto; padding: 0.2rem 0; border: 0; background: none; color: var(--gb-ink); font: 400 0.92rem/1.4 var(--mono); white-space: nowrap; }
.gb .gb-cmd code::before { content: "$ "; content: "$ " / ""; color: var(--gb-faint); }
.gb-copy {
  flex: none; min-height: 34px; padding: 0 0.75rem; border: 1px solid var(--gb-border-strong); border-radius: 7px;
  background: transparent; color: var(--gb-muted); font: 400 0.78rem/1 var(--mono); cursor: pointer;
}
.gb-copy:hover { color: var(--gb-ink); border-color: var(--gb-muted); }
.gb-cta-note { margin: 0.9rem 0 0; color: var(--gb-muted); font-size: 0.95rem; }

/* the four ways in: one bordered table of four, not four floating cards */
.gb-roles { padding: 4rem 0 5rem; border-top: 1px solid var(--gb-border); }
.gb-roles h2 { margin: 0 0 2rem; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 540; letter-spacing: -0.02em; }
.gb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--gb-border); border: 1px solid var(--gb-border); border-radius: 16px; }
.gb-role { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; padding: 2rem; background: var(--gb-raised); }
.gb-role h3 { margin: 0; font-size: 1.2rem; font-weight: 560; letter-spacing: -0.01em; }
.gb-role p { margin: 0; max-width: 34em; color: var(--gb-muted); }
.gb-role-cmd { margin-top: auto !important; }
.gb .gb-role-cmd code {
  display: inline-block; padding: 0.45rem 0.75rem; border: 1px solid var(--gb-border); border-radius: 8px;
  background: var(--gb-bg); color: var(--gb-emerald); font: 400 0.9rem/1.5 var(--mono); overflow-wrap: anywhere;
}
.gb-snippet {
  margin: auto 0 0; padding: 0.85rem 1rem; overflow-x: auto;
  background: var(--gb-bg); border: 1px solid var(--gb-border); border-radius: 8px;
  color: var(--gb-ink); font: 400 0.85rem/1.65 var(--mono);
}
.gb-snippet code { padding: 0; border: 0; background: none; font: inherit; }
.gb-role-link { align-self: flex-start; color: var(--gb-ink); font-size: 0.95rem; text-decoration-color: var(--gb-border-strong); }
.gb-role-link:hover { text-decoration-color: var(--gb-emerald); }

/* docs */
.gb-page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.4rem; }
.gb-page-head h1 { margin: 0 0 1rem; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 560; letter-spacing: -0.03em; line-height: 1.05; }
.gb-page-head .gb-lede { margin-bottom: 1rem; }
.gb-docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-bottom: 4rem; }
.gb-toc { padding-top: 2rem; }
.gb-toc-title { margin: 0 0 0.6rem; color: var(--gb-muted); font-size: 0.85rem; }
.gb-toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--gb-border); }
.gb-toc a { display: block; margin-left: -1px; padding: 0.4rem 0 0.4rem 1rem; border-left: 1px solid transparent; color: var(--gb-muted); font-size: 0.95rem; text-decoration: none; }
.gb-toc a:hover { color: var(--gb-ink); border-left-color: var(--gb-emerald); }
@media (min-width: 960px) {
  .gb-docs { grid-template-columns: 13rem minmax(0, 1fr); gap: 3.5rem; }
  .gb-toc { position: sticky; top: 1.5rem; align-self: start; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
}
.gb-doc { padding: 2.6rem 0; border-top: 1px solid var(--gb-border); scroll-margin-top: 1rem; }
.gb-doc h2 { margin: 0 0 1rem; font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 540; letter-spacing: -0.02em; }
.gb-doc h3 { margin: 0 0 0.4rem; font-size: 1.08rem; font-weight: 560; }
.gb-doc p { max-width: 42em; color: var(--gb-muted); }
.gb-doc p strong { color: var(--gb-ink); font-weight: 500; }
.gb-table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--gb-border); border-radius: 12px; }
.gb-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.gb-table caption { padding: 0.9rem 1rem 0.2rem; color: var(--gb-muted); font-size: 0.85rem; text-align: left; }
.gb-table th, .gb-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gb-border); text-align: left; vertical-align: top; }
.gb-table thead th { background: var(--gb-raised); color: var(--gb-muted); font-size: 0.85rem; font-weight: 500; }
.gb-table tbody th { font-weight: 400; }
.gb-table tbody tr:last-child > * { border-bottom: 0; }
.gb-table td { color: var(--gb-muted); }
.gb-table a { color: var(--gb-ink); }
.gb .gb-table code { white-space: nowrap; overflow-wrap: normal; }   /* an identifier never breaks mid-word; the table scrolls instead */
.gb-code { position: relative; max-width: 46rem; margin: 1.2rem 0; }
.gb-code pre {
  margin: 0; padding: 1rem 5.5rem 1rem 1.1rem; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--gb-raised); border: 1px solid var(--gb-border); border-radius: 12px;
  color: var(--gb-ink); font: 400 0.88rem/1.7 var(--mono);
}
.gb-code pre code { padding: 0; border: 0; background: none; font: inherit; }
.gb-code .gb-copy { position: absolute; top: 0.6rem; right: 0.6rem; }
.gb-cli, .gb-integrations { display: grid; gap: 1rem; margin: 1.2rem 0; padding: 0; list-style: none; }
.gb-cli li p, .gb-integrations li p { margin: 0.5rem 0 0; }
.gb-integrations li { padding: 1.2rem 1.3rem; background: var(--gb-raised); border: 1px solid var(--gb-border); border-radius: 12px; }
.gb-integrations .gb-cmd { margin-top: 0.8rem; }

/* pricing */
.gb-tiers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
@media (min-width: 960px) { .gb-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gb-tier { display: flex; flex-direction: column; gap: 1rem; padding: 1.8rem; background: var(--gb-raised); border: 1px solid var(--gb-border); border-radius: 16px; }
.gb-tier-free { border-color: rgba(61, 220, 151, 0.55); }
.gb-tier h2 { margin: 0; font-size: 1.3rem; font-weight: 560; letter-spacing: -0.01em; line-height: 1.25; }
.gb-status { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--gb-muted); font-size: 0.88rem; }
.gb-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.gb-status-live { color: var(--gb-emerald); }
.gb-status-early { color: var(--gb-amber); }
.gb-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin: 0; }
.gb-price-amount { color: var(--gb-ink); font-size: clamp(2.4rem, 4vw, 3rem); font-weight: 560; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.gb-price-period { color: var(--gb-muted); }
.gb-features { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.gb-features li { position: relative; padding-left: 1.4rem; color: var(--gb-muted); }
.gb-features li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--gb-border-strong); }
.gb-tier-free .gb-features li::before { background: var(--gb-emerald); }
.gb-tier .gb-btn { align-self: flex-start; margin-top: auto; }
.gb-pricing-note { margin: 1.6rem 0 4rem; color: var(--gb-muted); }

/* a link this page could not take */
.gb-invalid h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }

/* footer */
.gb .gb-foot { border-top-color: var(--gb-border); }
.gb .gb-foot nav ul { margin-top: 0.4rem; }

@media (max-width: 760px) {
  .gb-grid { grid-template-columns: minmax(0, 1fr); }
  .gb-role { padding: 1.5rem; }
}
@media (max-width: 640px) {
  .gb .top nav { flex: 1 1 100%; }
  .gb-inspect { flex-wrap: wrap; gap: 6px; }
  .gb-inspect-prefix { display: none; }
  .gb-inspect-input { flex-basis: 100%; padding-left: 10px; }
  .gb-inspect .gb-btn { flex: 1 1 100%; }
  .gb-cmd { width: 100%; }
  .gb-ctas .gb-btn-lg { width: 100%; }
}
@media (forced-colors: active) {
  .gb-inspect:focus-within { outline: 2px solid Highlight; }
  .gb-btn-primary, .gb-pill, .gb-copy { border: 1px solid ButtonText; }
  .gb-status::before, .gb-features li::before { forced-color-adjust: none; }
}
