/* ToadSwap restored — site.css (custom chrome + light fixes) */
:root {
  --ts-bg: #0b0d10;
  --ts-bg-2: #121418;
  --ts-surface: #181b20;
  --ts-border: #232830;
  --ts-text: #e6ecef;
  --ts-muted: #9aa4ad;
  --ts-accent: #6ecb37;
  --ts-accent-dark: #4fa020;
  --ts-link: #8fdd5b;
  --ts-radius: 10px;
  --ts-maxw: 1240px;
  --ts-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  background: var(--ts-bg);
  color: var(--ts-text);
  font-family: var(--ts-font);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}
img { max-width: 100%; height: auto; }
a { color: var(--ts-link); text-decoration: none; }
a:hover { color: #b7f080; text-decoration: underline; }

/* HEADER */
.ts-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ts-border);
}
.ts-header-inner {
  max-width: var(--ts-maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.ts-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #fff !important;
  text-decoration: none !important;
}
.ts-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 24px;
  flex: 1;
}
.ts-nav a {
  color: var(--ts-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.ts-nav a:hover { color: var(--ts-accent); text-decoration: none; }
.ts-cta {
  background: var(--ts-accent);
  color: #0a1108 !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}
.ts-cta:hover { background: #86dc4c; color: #0a1108 !important; }
.ts-menu-btn {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.ts-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: 0.2s;
}

/* DOC SHELL */
.ts-doc-shell {
  max-width: var(--ts-maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 20px 20px 60px;
}
.ts-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  font-size: 14px;
}
.ts-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.ts-sidebar li {
  margin: 0;
}
.ts-sidebar a {
  display: block;
  color: var(--ts-muted);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.35;
}
.ts-sidebar a:hover {
  background: var(--ts-surface);
  color: var(--ts-text);
  text-decoration: none;
}
.ts-article {
  max-width: 780px;
  min-width: 0;
  padding: 12px 0;
}
.ts-article h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 16px;
  color: #fff;
  line-height: 1.2;
}
.ts-article h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin: 36px 0 12px;
  color: #fff;
}
.ts-article h3 {
  font-size: 1.15rem;
  margin: 26px 0 10px;
  color: #fff;
}
.ts-article p { margin: 0 0 14px; color: #cfd6db; }
.ts-article ul, .ts-article ol { margin: 0 0 16px; padding-left: 24px; }
.ts-article li { margin: 6px 0; color: #cfd6db; }
.ts-article a { color: var(--ts-link); }
.ts-article code {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ts-article pre {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  padding: 16px;
  overflow-x: auto;
}
.ts-article img {
  border-radius: 0;
  margin: 16px 0;
  max-width: 100%;
  height: auto;
}
.ts-article blockquote {
  border-left: 3px solid var(--ts-accent);
  background: var(--ts-surface);
  margin: 16px 0;
  padding: 12px 16px;
  color: #cfd6db;
  border-radius: 0 var(--ts-radius) var(--ts-radius) 0;
}
.ts-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  overflow-x: auto;
  display: block;
}
.ts-article th, .ts-article td {
  border: 1px solid var(--ts-border);
  padding: 10px 14px;
  text-align: left;
}
.ts-article th { background: var(--ts-surface); color: #fff; }

/* Hide GitBook chrome that leaks through */
[class*="gitbook-"],
[class*="slate-"],
[class*="Splash"],
.theme-overlay,
[aria-label="Main navigation"],
[data-testid^="gitbook-"],
iframe[src*="gitbook"],
.app-sidebar-toc,
.page-aside,
.breadcrumb--hide-on-mobile {
  display: none !important;
}

/* FOOTER */
.ts-footer {
  background: var(--ts-bg-2);
  border-top: 1px solid var(--ts-border);
  padding: 48px 20px 24px;
  margin-top: 60px;
}
.ts-footer-inner {
  max-width: var(--ts-maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.ts-foot-col strong {
  display: block;
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ts-foot-col a {
  display: block;
  color: var(--ts-muted);
  padding: 5px 0;
  font-size: 14px;
  text-decoration: none;
  min-height: 30px;
}
.ts-foot-col a:hover { color: var(--ts-accent); }
.ts-foot-col p {
  color: var(--ts-muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.55;
}
.ts-disclaim { font-size: 12px !important; color: #7a848c !important; }
.ts-foot-bottom {
  max-width: var(--ts-maxw);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--ts-border);
  color: #7a848c;
  font-size: 13px;
  text-align: center;
}

/* HOMEPAGE specific fallbacks (Svelte bundle stripped) */
.ts-home {
  min-height: 60vh;
  padding: 20px;
}
.ts-home > div { max-width: var(--ts-maxw); margin: 0 auto; }

/* Mobile */
@media (max-width: 900px) {
  .ts-doc-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ts-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 20px;
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius);
    padding: 8px;
    display: none;
  }
  .ts-sidebar.open { display: block; }
  .ts-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (max-width: 720px) {
  .ts-header-inner { gap: 10px; padding: 0 14px; }
  .ts-nav { display: none; }
  .ts-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--ts-bg-2);
    padding: 12px 20px;
    border-bottom: 1px solid var(--ts-border);
    gap: 6px;
    align-items: flex-start;
  }
  .ts-nav.open a {
    width: 100%;
    padding: 12px 6px;
  }
  .ts-menu-btn { display: flex; }
  .ts-cta { padding: 10px 14px; font-size: 13px; }
  .ts-footer-inner { grid-template-columns: 1fr; }
  .ts-article h1 { font-size: 1.7rem; }
}

/* Floating FAB CTA on mobile */
.ts-fab-mobile {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 900;
  background: var(--ts-accent);
  color: #0a1108;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 6px 24px rgba(110, 203, 55, 0.35);
  text-decoration: none !important;
}
@media (max-width: 720px) {
  .ts-fab-mobile { display: inline-flex; align-items: center; gap: 6px; }
}
