:root {
  --bg: #0b0e14;
  --bg-soft: #121722;
  --panel: #161c28;
  --border: #232b3a;
  --text: #e6ebf2;
  --muted: #97a3b6;
  --accent: #f7931a;      /* bitcoin orange */
  --accent-2: #5b8cff;
  --good: #3fb950;
  --code: #0e131c;
  --radius: 14px;
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1a2130 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Nav */
header.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11,14,20,0.72);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.nav nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 74px 0 34px; text-align: center; }
.badge {
  display: inline-block; font-size: 13px; color: var(--accent);
  border: 1px solid #3a2e17; background: #1c1710; padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), #ffcf7a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); max-width: 720px; margin: 0 auto 30px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  padding: 12px 18px; border-radius: 11px; font-size: 15px; font-weight: 600;
  transition: transform .06s ease, border-color .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; border-color: #35405a; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #ffa733, var(--accent)); color: #1a1206; border-color: #b8710f; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Hero client chips */
.client-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 20px; }
.client-chips .chips-label { color: var(--muted); font-size: 13.5px; margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: transform .06s ease, border-color .2s ease;
}
.chip:hover { transform: translateY(-1px); border-color: #35405a; }
.chip .ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; flex: 0 0 auto; }
.chip.detected { border-color: var(--accent); background: #1c1710; color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.chip .you { font-size: 11px; color: var(--good); font-weight: 700; }

/* Connect card */
.connect {
  margin: 30px auto 0; max-width: 760px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.connect h3 { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.url-box { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: var(--code); }
.url-box code { flex: 1; padding: 13px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; color: #ffd9a3; overflow-x: auto; white-space: nowrap; }
.url-box button { border: none; border-left: 1px solid var(--border); background: var(--bg-soft); color: var(--text); padding: 0 18px; cursor: pointer; font-weight: 600; }
.url-box button:hover { background: #1d2536; }
.connect .hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* Client selector */
.os-note { font-size: 13px; color: var(--muted); margin: 14px 0 10px; text-align: left; }
.os-note b { color: var(--text); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab {
  cursor: pointer; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .15s ease;
}
.tab:hover { color: var(--text); border-color: #35405a; }
.tab.active { background: #1c1710; color: var(--accent); border-color: #4a3a1a; }
.tab .rec { font-size: 11px; color: var(--good); margin-left: 6px; }
.panel { text-align: left; }
.panel h4 { margin: 0 0 4px; font-size: 16px; }
.panel .desc { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.panel ol { margin: 0 0 12px; padding-left: 20px; color: #cdd7e8; font-size: 14.5px; }
.panel ol li { margin: 4px 0; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.codewrap { position: relative; }
.codewrap .copybtn {
  position: absolute; top: 8px; right: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); border-radius: 8px; padding: 4px 10px;
  font-size: 12.5px; cursor: pointer; font-weight: 600;
}
.codewrap .copybtn:hover { background: #1d2536; }
.codewrap pre { margin: 0; }
.path { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; word-break: break-all; }

/* Sections */
section { padding: 46px 0; border-top: 1px solid var(--border); }
section h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
section .lead { color: var(--muted); margin: 0 0 26px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step .n { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: #1c1710; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.step h4 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Tools */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.tool .name { font-family: ui-monospace, Menlo, monospace; color: var(--accent); font-weight: 600; font-size: 15px; }
.tool p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Code block */
pre { background: var(--code); border: 1px solid var(--border); border-radius: 12px; padding: 18px; overflow-x: auto; }
pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; color: #d7e0ee; }
.inline { font-family: ui-monospace, Menlo, monospace; background: var(--code); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; color: #ffd9a3; }

/* Docs layout */
.doc-body { display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: start; padding: 34px 0 70px; }
.toc { position: sticky; top: 84px; font-size: 14.5px; }
.toc a { display: block; color: var(--muted); padding: 5px 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.doc-content h2 { margin-top: 40px; padding-top: 8px; }
.doc-content h2:first-child { margin-top: 0; }
.doc-content h3 { margin-top: 28px; font-size: 19px; }
.doc-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.doc-content th, .doc-content td { text-align: left; border: 1px solid var(--border); padding: 8px 12px; font-size: 14px; }
.doc-content th { background: var(--bg-soft); }
.callout { border: 1px solid #2a3550; background: #131a29; border-left: 3px solid var(--accent-2); border-radius: 10px; padding: 12px 16px; color: #cdd7e8; margin: 16px 0; font-size: 14.5px; }

footer { border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--good); color: #06210c; font-weight: 600; padding: 10px 18px; border-radius: 10px; transition: all .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 780px) {
  .doc-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .nav nav a { margin-left: 14px; }
}
