/* psyrob.com layout. Tokens, type, focus, icons, the cross-site strip and the footer come from
   psyrob-theme.css (shared with explorer.psyrob.com); load that file first. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-size: 18px; line-height: 1.6; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
main:focus { outline: none; }
a { text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 12px; }
h2 { margin-top: 36px; }
p { margin: 0 0 14px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--mute); }
.warn { color: var(--danger); }
.lede { font-size: 20px; line-height: 1.5; max-width: 640px; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(7, 16, 20, 0.92); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top-inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); letter-spacing: 0.22em; font: 600 18px/1 var(--head); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { color: var(--mute); font: 500 14px/1 var(--head); letter-spacing: 0.08em; text-transform: uppercase; padding: 0 9px; min-height: 44px; display: inline-flex; align-items: center; gap: 7px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--cyan); }
.nav a.nav-cta { margin-left: 8px; border: 1px solid var(--cyan); color: var(--cyan); padding: 0 12px; }
.nav a.nav-cta:hover { background: var(--cyan-wash); color: var(--ink); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); width: 44px; height: 44px; cursor: pointer; color: var(--glow); place-items: center; padding: 0; }
.menu-btn .prb { width: 24px; height: 24px; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1120px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--field); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px; max-height: calc(100dvh - var(--header-h) - 34px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { min-height: 48px; font-size: 16px; border-bottom: 1px solid var(--line); padding: 0 4px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--cyan); }
  .nav a .prb { width: 18px; height: 18px; }
  .nav a.nav-cta { margin: 12px 0 0; justify-content: center; }
}

/* page header band: the same canvas backdrop as the explorer's page bands (web-band.js) */
.band { position: relative; border: 1px solid var(--line); overflow: hidden; margin: 24px 0 8px; min-height: 200px; }
.band canvas { position: absolute; inset: 0; display: block; }
.band-head { position: relative; padding: 34px 28px 30px; max-width: 760px; }
.band-head h1 { margin: 4px 0 10px; }
.band-head .lede { margin: 0; color: var(--mute); }
.band.hero { min-height: 400px; display: grid; align-items: center; }
.band.hero .band-head { padding: 48px 32px; }
.band.hero h1 { font-size: clamp(52px, 8vw, 92px); letter-spacing: 0.04em; }
.band.hero .lede { color: var(--ink); }
.hero-logo { width: 88px; height: 88px; margin-bottom: 18px; filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.35)); }
@media (max-width: 700px) {
  .band { margin-top: 16px; min-height: 0; }
  .band-head { padding: 24px 18px 22px; }
  .band.hero { min-height: 0; }
  .band.hero .band-head { padding: 32px 18px; }
  .hero-logo { width: 64px; height: 64px; }
}

/* buttons: same size, type and states as the explorer's .btn-cyan and .btn-line */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); padding: 0 16px; font: 600 14px/1 var(--head); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s; }
.btn:hover { background: var(--cyan-wash); color: var(--ink); }
.btn.fill { background: var(--cyan); color: var(--on-cyan); }
.btn.fill:hover { background: var(--glow); color: var(--on-cyan); }
.btn .prb { color: currentColor; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* sections */
.rule { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 4px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px; }
.story p { max-width: 720px; }
@media (min-width: 801px) { .split.rule > div:last-child { padding-top: 40px; } }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* services grid */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.work-item { border: 1px solid var(--line); background: var(--panel); padding: 18px 16px 16px; transition: border-color 0.15s; }
.work-item:hover { border-color: var(--line-2); }
.work-item .prb { width: 34px; height: 34px; margin-bottom: 12px; }
.work-item h3 { font-size: 19px; margin: 0 0 6px; }
.work-item p { margin: 0; color: var(--mute); font-size: 15px; line-height: 1.45; }

/* process steps */
.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 18px; counter-reset: step; padding: 0; list-style: none; }
.step { border-top: 2px solid var(--cyan); padding-top: 14px; }
.step .prb { width: 30px; height: 30px; }
.step strong { display: block; margin: 10px 0 4px; font: 600 17px/1.2 var(--head); letter-spacing: 0.06em; }
.step p { margin: 0; color: var(--mute); font-size: 15px; line-height: 1.45; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; } .step .prb { grid-row: span 2; } .step strong { margin-top: 0; } }

/* live network panel (filled by assets/js/network.js from rpc.psyrob.com) */
.net { border: 1px solid var(--line); background: var(--panel); margin-top: 18px; }
.net-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.net-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.net-live { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.net-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); animation: beat 1.6s ease-in-out infinite; }
.net-live.off { color: var(--mute); }
.net-live.off i { background: var(--faint); animation: none; }
@keyframes beat { 50% { opacity: 0.25; } }
.net-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.net-stats div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.net-stats div:last-child { border-right: 0; }
.net-stats dt { color: var(--mute); font: 500 13px/1.2 var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.net-stats dd { margin: 6px 0 0; font: 600 28px/1.1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.net-chart { padding: 6px 16px 14px; border-top: 1px solid var(--line); position: relative; }
.net-chart p { margin: 8px 0 4px; font-size: 14px; color: var(--mute); }
.net-tip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--line-2); border-left: 2px solid var(--cyan); padding: 6px 10px; font: 500 13px/1.3 var(--head); letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; transform: translate(-50%, -100%); }
.net-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
@media (max-width: 700px) { .net-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .net-stats div:nth-child(2) { border-right: 0; } .net-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .net-stats dd { font-size: 24px; } }

/* search */
.search-form { display: flex; gap: 8px; margin: 18px 0 20px; }
.search-form input { flex: 1; }
input, textarea, select, .search { width: 100%; background: var(--field); border: 1px solid var(--line-2); padding: 11px 12px; min-height: 44px; color: var(--ink); border-radius: 0; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--cyan); }
textarea { min-height: 140px; }
.search-form .btn { flex: 0 0 auto; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; transition: border-color 0.15s; }
.card:hover { border-color: var(--line-2); }
.card > img { aspect-ratio: 16 / 9; height: auto; width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); }
.card .pad { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card .pad > .row { margin-top: auto; padding-top: 12px; }
.card h3 { margin: 4px 0 6px; }
.meta { color: var(--mute); font: 500 14px/1.4 var(--head); letter-spacing: 0.04em; margin: 0 0 8px; }
.tag { color: var(--cyan); font: 600 13px/1.2 var(--head); letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 9px 10px; vertical-align: top; }
th { color: var(--mute); font: 500 13px/1.2 var(--head); letter-spacing: 0.08em; text-transform: uppercase; }

/* facts list */
dl.facts { display: grid; grid-template-columns: 190px 1fr; gap: 8px 18px; max-width: 760px; border: 1px solid var(--line); background: var(--panel); padding: 18px 20px; margin: 18px 0; font-size: 16px; }
dl.facts dt { color: var(--mute); font: 500 14px/1.4 var(--head); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* articles */
.article-list { display: grid; margin-top: 20px; }
.article-item { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.article-item:not(:has(.article-cover)) { grid-template-columns: 1fr; }
.article-item h2 { margin: 0 0 8px; font-size: 30px; }
.article-item h2 a { color: var(--ink); }
.article-item h2 a:hover { color: var(--cyan); }
.article-item p { margin: 0 0 12px; }
.article-item.featured { border-top: 2px solid var(--cyan); }
.article-cover { display: block; max-width: 100%; overflow: visible; }
.article-cover img { width: 100%; max-width: 100%; height: auto !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; object-position: center center; background: var(--panel); border: 1px solid var(--line); }
.article-hero { width: 100%; max-width: 100%; height: auto; max-height: none; aspect-ratio: auto; object-fit: contain; object-position: center; background: var(--panel); border: 1px solid var(--line); margin: 18px 0; display: block; }
.article-body { max-width: 720px; font-size: 19px; line-height: 1.7; }
.article-body h2 { font-size: 30px; }
.article-body h3 { font-size: 23px; margin-top: 26px; }
.article-body a { text-decoration: underline; text-decoration-color: rgba(62, 224, 214, 0.4); }
.article-body blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--cyan); color: var(--mute); }
.article-body li { margin-bottom: 6px; }
.article-body img { max-width: 100%; height: auto; margin: 16px 0; border: 1px solid var(--line); }
.article-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); margin: 16px 0; }
.article-body pre { background: var(--field); border: 1px solid var(--line); padding: 14px; overflow-x: auto; font-size: 15px; }
.article-body code { color: var(--cyan); }
.article-body table { margin: 16px 0; display: block; overflow-x: auto; }
.article-body figure { margin: 16px 0; }
.article-body figcaption { color: var(--mute); font-size: 15px; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.crumbs { font: 500 14px/1.4 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--mute); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.chips a { border: 1px solid var(--line-2); min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; font: 500 15px/1 var(--head); letter-spacing: 0.06em; color: var(--mute); }
.chips a[aria-current], .chips a:hover { border-color: var(--cyan); color: var(--cyan); }
.chips a span { opacity: 0.7; margin-left: 6px; }
.pager { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager a { border: 1px solid var(--line-2); min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; font-family: var(--head); }
.pager a[aria-current] { border-color: var(--cyan); color: var(--ink); background: var(--cyan-wash); }

/* members gate and wallet sheet */
.gate { max-width: 520px; margin: 40px auto; border: 1px solid var(--line); padding: 28px; background: var(--panel); }
.gate img { width: 72px; margin-bottom: 14px; }
.gate h1 { font-size: 44px; }
.gate ol { padding-left: 20px; color: var(--mute); font-size: 16px; }
.notice { border: 1px solid var(--cyan); color: var(--cyan); padding: 10px 12px; }
.wallet-modal { position: fixed; inset: 0; background: rgba(4, 10, 12, 0.72); display: grid; place-items: center; z-index: 40; padding: 20px; }
.wallet-sheet { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); padding: 18px; }
.wallet-sheet h2 { margin-top: 0; }
.wallet-list { display: grid; gap: 8px; margin: 14px 0; }
.wallet-list button { text-align: left; background: var(--field); border: 1px solid var(--line); padding: 12px; min-height: 48px; cursor: pointer; font-family: var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.wallet-list button:hover { border-color: var(--cyan); }
.dapp { margin-top: 22px; border: 1px solid var(--line); background: var(--field); }
.dapp-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wallet-chip { font-family: var(--head); letter-spacing: 0.06em; color: var(--cyan); border: 1px solid var(--cyan); padding: 6px 10px; }
.dapp-tabs { display: flex; border-bottom: 1px solid var(--line); }
.dapp-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--mute); padding: 12px 16px; cursor: pointer; font-family: var(--head); letter-spacing: 0.08em; text-transform: uppercase; }
.dapp-tabs button.on { color: var(--ink); border-bottom-color: var(--cyan); }
.dapp-panel { display: none; padding: 16px; }
.dapp-panel.on { display: block; }

/* not found */
.lost { text-align: center; max-width: 560px; margin: 56px auto 0; }
.lost > .prb { width: 96px; height: 96px; margin: 0 auto 18px; display: block; }
.lost .search-form { margin: 20px auto; }
.lost .row { justify-content: center; }

/* back to top */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 20; width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); color: var(--glow); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top .prb { width: 22px; height: 22px; }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .split { grid-template-columns: 1fr; gap: 0; }
  .article-item { gap: 12px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; padding: 16px; }
  dl.facts dd { margin-bottom: 10px; }
  .search-form { flex-direction: column; }
}
