/* Bitcoin2x site styles. Own design; Bitcoin orange is used as a colour, not as an endorsement. */

:root {
  --ink: #111418;
  --ink-2: #1a1e24;
  --ink-line: #2a2f37;
  --accent: #e8770b;
  --accent-2: #ffa53a;
  --accent-3: #f7931a;
  --amber: #b45309;
  --text: #474d55;
  --heading: #111418;
  --muted: #9aa1aa;
  --grey-text: #262b31;
  --link: #b85a00;
  --border: #e3e0dc;
  --soft: #f8f6f3;
  --bg: #ffffff;
  --code-text: #1a1e24;
  --warn-bg: #fff7ed;
  --on-dark: #cdd1d6;
  --maxw: 1140px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.7 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: var(--soft); color: var(--code-text); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.88em; word-break: break-word; }
pre { background: var(--soft); color: var(--code-text); border-left: 4px solid var(--accent-3); padding: 16px 18px; overflow-x: auto; font-size: 0.88rem; line-height: 1.6; }
pre code { background: none; padding: 0; }
h1, h2, h3, h4, .brand { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); color: var(--heading); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.7rem); color: var(--heading); margin: 2em 0 0.6em; }
h3 { font-size: 1.3rem; color: var(--heading); margin: 1.5em 0 0.4em; }
b, strong { color: var(--grey-text); font-weight: 600; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }

/* independence notice */
.testnet-banner { background: #2a1a08; color: #ffe2bf; border-bottom: 1px solid #5a3510; font-size: 0.9rem; text-align: center; padding: 7px 16px; }
.testnet-banner a, .testnet-banner strong { color: #fff; }
.btn.cta { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink) !important; padding: 6px 16px !important; margin-left: 6px; font-weight: 600; }
.btn.cta:hover { background: #ffc27a; }
.testnet-banner a { text-decoration: underline; }

/* header */
header.site { background: var(--ink); border-bottom: 1px solid var(--ink-line); position: relative; z-index: 10; }
header.site .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.45rem; font-weight: 400; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--accent-3); font-weight: 600; }
.brand small { color: var(--on-dark); font-size: 0.72rem; border: 1px solid #3a3f48; padding: 0 7px; border-radius: 99px; letter-spacing: 0.04em; }
nav.main { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
nav.main a { color: #fff; padding: 8px 10px; font-size: 1rem; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--accent-2); text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid #3a3f48; color: #fff; border-radius: 4px; padding: 6px 12px; cursor: pointer; font: inherit; }
@media (max-width: 1080px) {
  .menu-btn { display: block; }
  nav.main { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--ink); border-bottom: 1px solid var(--ink-line); padding: 6px 16px 16px; }
  nav.main.open { display: flex; }
}

/* hero */
.hero { background: linear-gradient(160deg, var(--ink) 0%, #2a1a08 100%); color: var(--on-dark); text-align: left; padding: 70px 0 84px; position: relative; overflow: hidden; }
.hero .lattice { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.35; pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.2rem); }
.eyebrow { display: inline-block; font-size: 0.85rem; color: var(--accent-2); border: 1px solid rgba(255, 165, 58, 0.45); padding: 2px 12px; border-radius: 99px; margin-bottom: 20px; }
.lead { font-size: clamp(1.08rem, 2.2vw, 1.3rem); max-width: 760px; margin: 0; }
.hero .lead { color: var(--on-dark); }
.btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; margin-top: 34px; }
.btn { display: inline-block; padding: 11px 24px; border-radius: 999px; font-weight: 600; font-size: 1.05rem; color: #fff; background: transparent; border: 1px solid #fff; cursor: pointer; font-family: inherit; }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.08); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
main .btn:not(.primary) { color: var(--heading); border-color: var(--border); }
.hero .btn:not(.primary) { color: #fff; border-color: #fff; }

/* page head */
.page-head-band { background: var(--ink); }
.page-head { padding-top: 46px; padding-bottom: 42px; }
.page-head h1 { color: #fff; margin-bottom: 0.3em; }
.page-head p { color: var(--on-dark); font-size: 1.15rem; max-width: 760px; margin: 0; }

/* cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 26px 0; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.card h3 { margin-top: 0; color: var(--heading); }
.card p { margin: 0.4em 0 0; }
.card .icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; margin-bottom: 14px; font-size: 1.15rem; font-weight: 600; }
a.card { color: inherit; transition: box-shadow .15s, border-color .15s; }
a.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 4px 18px rgba(17, 20, 24, 0.08); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: -44px 0 30px; position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 24px rgba(17, 20, 24, 0.08); }
.stat { padding: 20px 22px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 1.45rem; color: var(--accent); font-weight: 600; }
.stat span { font-size: 0.92rem; }
section.wrap > .stats:first-child { margin-top: -44px; }
.testnet-stats { margin-top: 20px !important; box-shadow: none; }

.note { background: var(--warn-bg); border-left: 4px solid var(--accent-3); padding: 14px 18px; margin: 22px 0; }
.note strong:first-child { display: block; margin-bottom: 2px; color: var(--heading); }
.placeholder { border: 1px dashed var(--border); border-radius: 4px; padding: 22px; background: var(--soft); }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.96rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--soft); color: var(--heading); font-weight: 600; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 18px 56px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; }
.steps h3 { margin-top: 0.3em; }

details { border-bottom: 1px solid var(--border); padding: 14px 4px; }
details summary { cursor: pointer; color: var(--heading); font-size: 1.12rem; }
details summary::marker { color: var(--accent); }
details[open] summary { margin-bottom: 8px; }

/* tool */
.tool label { display: block; color: var(--heading); font-weight: 600; margin: 14px 0 6px; }
.tool textarea, .tool input, .tool select, .field { width: 100%; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.9rem; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--border); background: #fff; color: var(--code-text); }
.tool .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .tool .row { grid-template-columns: 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--border); } }
.tool button { margin-top: 18px; }
.out { margin-top: 18px; }
.out div { margin: 6px 0; }
.out code { display: block; padding: 8px 10px; word-break: break-all; }
.err { color: #d14; }

footer.site { margin-top: 90px; background: var(--ink); padding: 46px 0 34px; color: var(--muted); font-size: 0.93rem; }
footer.site .cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
footer.site h4 { color: #fff; margin: 0 0 8px; font-size: 1.05rem; }
footer.site a { color: var(--muted); display: block; padding: 2px 0; }
footer.site a:hover { color: var(--accent-2); text-decoration: none; }
.fine { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ink-line); font-size: 0.85rem; }
.fine a { display: inline !important; color: var(--on-dark) !important; }

/* block explorer page */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.x-search { display: flex; gap: 10px; margin: 30px 0 10px; }
.x-search .field { flex: 1; min-width: 0; }
.x-search .btn { padding: 8px 20px; }
@media (max-width: 640px) { .x-search { flex-direction: column; } }
.x-stats { margin-bottom: 14px !important; }
.x-meta, .x-small { font-size: 0.88rem; color: var(--muted); }
.x-meta code { font-size: 0.85em; }
.x-scroll { overflow-x: auto; margin: 16px 0; }
.x-scroll table { display: table; margin: 0; }
.x-table td, .x-kv td { word-break: break-word; }
.x-table td:first-child, .x-table th { white-space: nowrap; }
.x-kv th { width: 170px; background: none; font-weight: 600; }
.x-wrap { word-break: break-all; }
.x-badge { display: inline-block; font-size: 0.78rem; line-height: 1.5; padding: 0 8px; margin: 2px 4px 2px 0; border-radius: 99px; border: 1px solid var(--border); color: var(--grey-text); background: var(--soft); white-space: nowrap; }
.x-badge.pq { border-color: rgba(232, 119, 11, 0.45); background: var(--warn-bg); color: var(--amber); }
.x-pq { margin-top: 6px; }
.x-asm { display: block; margin-top: 4px; padding: 6px 8px; font-size: 0.8rem; word-break: break-all; }
.x-list { columns: 2 320px; padding-left: 18px; }
.x-full { margin-top: 18px; }
.x-offline strong { display: block; color: var(--heading); margin-bottom: 4px; }

/* run a node: agent prompts */
details.prompt { border: 1px solid var(--border); border-radius: 4px; padding: 12px 16px; margin: 10px 0; }
details.prompt summary { font-size: 1.08rem; }
.prompt-box { position: relative; }
.prompt-box pre { white-space: pre-wrap; word-break: break-word; margin: 0; padding-top: 52px; font-size: 0.82rem; }
.prompt-box .copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 14px; font-size: 0.9rem; }
nav.main a.gh { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 1081px) { nav.main a.gh .gh-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
nav.main a.gh svg { flex: none; }

/* plan pages */
.chosen { background: #fff4e6; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0 9px; border-radius: 99px; background: var(--accent); color: #fff; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.tag.off { background: #94a3b8; }
.tag.warn { background: #f59e0b; color: var(--ink); }
.track { border-top: 4px solid var(--accent-3); }
.track.two { border-top-color: var(--ink); }
.roadmap { margin: 24px 0; }
.roadmap svg { width: 100%; height: auto; display: block; }
.log { list-style: none; padding: 0; }
.log li { border-left: 3px solid var(--accent-3); padding: 4px 0 14px 18px; position: relative; }
.log time { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--accent); display: block; }
.log h3 { margin: 2px 0 4px; font-size: 1.1rem; }
.log p { margin: 0; }
.form label { display: block; color: var(--heading); font-weight: 600; margin: 14px 0 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 0.95rem; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--code-text); }
.form .checks label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.form .checks input { width: auto; }
.form button { margin-top: 18px; }
.s-val { font-family: "JetBrains Mono", monospace; }
/* Ecosystem page: integration status labels */
.eco-status { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; margin: 0 0 6px !important; background: #eef0f4; color: var(--heading); }
.eco-e2e, .eco-native { background: #e3f4e8; color: #17633a; }
.eco-unit { background: #fff1dc; color: #8a4b00; }
.eco-config { background: #eef0f4; color: #3b4252; }
