@font-face {
  font-family: "Readex Pro";
  src: url("assets/ReadexPro.ttf") format("truetype-variations");
  font-weight: 160 700;
  font-style: normal;
}

:root {
  --rb-red: #FF5050;
  --rb-red-bright: #FA423C;
  --rb-slate: #283A46;
  --rb-deep: #142530;
  --rb-mid-grey: #848B91;
  --rb-light-grey: #D9D9D9;
  --rb-off-white: #ECEBEC;
  --rb-white: #FFFFFF;

  --color-bg: var(--rb-white);
  --color-surface: var(--rb-off-white);
  --color-text: var(--rb-slate);
  --color-text-muted: #5B6469;
  --color-border: var(--rb-light-grey);

  --font-sans: "Readex Pro", system-ui, sans-serif;
  --font-weight-header: 500;
  --font-weight-body: 400;

  --shadow-card: 0 2px 8px rgba(20,37,48,0.05), 0 8px 24px rgba(20,37,48,0.06);
  --shadow-card-dark: 0 8px 28px rgba(20,37,48,0.22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.watermark-bg {
  position: fixed;
  inset: 0;
  background-image: url("assets/hero-bg.png");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0.055;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 0 8px 0;
}

h1, h2, h3, h4 {
  font-weight: var(--font-weight-header);
  color: var(--rb-slate);
  margin: 0 0 10px 0;
  line-height: 1.25;
}

p { margin: 0 0 12px 0; }
a { color: var(--rb-red); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rb-red);
  margin: 0 0 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.eyebrow::before {
  content: "";
  width: 14px; height: 1.5px;
  background: var(--rb-red);
  display: inline-block;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 32px 22px 32px;
  gap: 16px;
}
.logo-plate {
  display: inline-flex;
  align-items: center;
  padding: 12px;
}
/* Redbelly's Brand Manual (June 2022) sets a recommended minimum logo height of
   2cm, with 1-1.5cm allowed as a special case for "Web or apps ... under
   professional supervision." At standard 96dpi that special-case range is
   38-57px. 58px targets the top of that sanctioned web range. Clear space is
   not numerically specified in the manual (confirmed absent, not just unread),
   so the 12px pad above is our own reasonable default, not a sourced figure. */
.logo-plate img { display: block; height: 58px; width: auto; }
.header-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: right;
  max-width: 220px;
  line-height: 1.5;
}

/* ---------- Hero, with hexagon watermark ---------- */
.hero {
  position: relative;
  padding: 10px 32px 30px 32px;
  overflow: hidden;
}
.hero-hexfield {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 340px;
  height: 340px;
  z-index: 0;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: 32px;
  max-width: 600px;
  letter-spacing: -0.01em;
}
.hero p.lead {
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 540px;
}
.hero-rule {
  margin-top: 18px;
  height: 3px;
  width: 64px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--rb-red), var(--rb-red-bright));
}

/* ---------- Scam warning: translucent glass card ---------- */
.scam-banner {
  position: relative;
  margin: 24px 32px 26px 32px;
  background: linear-gradient(150deg, rgba(255,80,80,0.13), rgba(250,66,60,0.05));
  border: 1.5px solid rgba(255,80,80,0.30);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 32px rgba(255,80,80,0.10);
}
.scam-banner .icon-wrap {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,80,80,0.16);
  border: 1px solid rgba(255,80,80,0.25);
  display: flex; align-items: center; justify-content: center;
}
.scam-banner .icon { width: 20px; height: 20px; }
.scam-banner h2 {
  color: var(--rb-red-bright);
  font-size: 15px;
  margin: 0 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.scam-banner p {
  color: var(--rb-slate);
  margin: 0;
  font-size: 14.5px;
  font-weight: 400;
}

/* ---------- Quick nav ---------- */
.quicknav {
  margin: 0 32px 34px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quicknav a {
  background: var(--rb-white);
  border: 1px solid var(--rb-light-grey);
  color: var(--rb-slate);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(20,37,48,0.04);
}
.quicknav a:hover { border-color: var(--rb-red); color: var(--rb-red); text-decoration: none; }

/* ---------- Sections ---------- */
section.block {
  padding: 34px 32px;
  border-top: 1px solid rgba(132,139,145,0.22);
}
section.block.light {
  background: var(--rb-off-white);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.hex-badge {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0% 50%);
  background: linear-gradient(150deg, var(--rb-red), var(--rb-red-bright));
  box-shadow: 0 6px 16px rgba(255,80,80,0.28);
}
.hex-badge svg { width: 22px; height: 22px; }
.section-head h2 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.section-head .step-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.callout {
  border-left: 3px solid var(--rb-red);
  background: rgba(255,80,80,0.07);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14.5px;
  margin: 16px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.net-card {
  background: var(--rb-deep);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card-dark);
  position: relative;
  overflow: hidden;
}
.net-card::after {
  content: "";
  position: absolute;
  right: -30px; bottom: -30px;
  width: 120px; height: 120px;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0% 50%);
  background: rgba(255,255,255,0.035);
}
.net-card.testnet { background: var(--rb-slate); }
.net-card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.net-card.mainnet .tag { background: var(--rb-red); color: var(--rb-white); }
.net-card.testnet .tag { background: var(--rb-mid-grey); color: var(--rb-deep); }
.net-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--rb-white) !important; position: relative; z-index: 1; }
.kv { font-size: 13.5px; margin: 0; position: relative; z-index: 1; }
.kv dt { color: var(--rb-mid-grey); float: left; width: 108px; clear: left; font-weight: 400; }
.kv dd { margin: 0 0 8px 108px; color: var(--rb-white); font-weight: 500; word-break: break-all; }
.chainid-flag {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--rb-red);
  position: relative; z-index: 1;
}
.net-card.testnet .chainid-flag { color: var(--rb-off-white); }

.deprecated-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.link-out {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rb-red);
  border: 1.5px solid var(--rb-red);
  padding: 9px 16px;
  border-radius: 999px;
}
.link-out:hover { background: var(--rb-red); color: var(--rb-white); text-decoration: none; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 6px;
}
.mini-card {
  background: var(--rb-white);
  border: 1px solid var(--rb-light-grey);
  border-radius: 12px;
  padding: 18px 18px;
  box-shadow: var(--shadow-card);
}
.mini-card h3 { font-size: 15px; margin-bottom: 6px; }
.mini-card p { font-size: 13.5px; margin-bottom: 10px; }

.faucet-box {
  background: linear-gradient(150deg, var(--rb-red), var(--rb-red-bright));
  color: var(--rb-deep);
  border-radius: 14px;
  padding: 20px 22px;
  margin-top: 14px;
  box-shadow: 0 10px 28px rgba(255,80,80,0.25);
}
.faucet-box a { color: var(--rb-deep); text-decoration: underline; font-weight: 700; }
.faucet-box dt { color: var(--rb-deep); opacity: 0.7; }
.faucet-box dd { color: var(--rb-deep); }
.faucet-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--rb-white);
  color: var(--rb-red-bright) !important;
  font-weight: 700 !important;
  font-size: 14.5px;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(20,37,48,0.18);
}
.faucet-btn:hover { background: var(--rb-off-white); }
.faucet-btn svg { flex: 0 0 auto; }

footer.crosslinks {
  background: var(--rb-deep);
  padding: 40px 32px 34px 32px;
}
footer.crosslinks h2 { font-size: 17px; color: var(--rb-white); }
footer.crosslinks .eyebrow { color: var(--rb-red); }
.footer-sign {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
/* Kept at the 1cm floor of Redbelly's web/app special-case range (38px at 96dpi)
   since this is a secondary sign-off mark, not the primary lockup. See the
   .logo-plate rule above for the source. */
.footer-sign img { height: 40px; width: auto; display: block; }
.footer-sign span {
  font-size: 11.5px;
  color: var(--rb-mid-grey);
  border-left: 1px solid rgba(132,139,145,0.4);
  padding-left: 12px;
  line-height: 1.4;
}
.xlink-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.xlink-card {
  background: rgba(255,255,255,0.045);
  border-radius: 12px;
  padding: 16px 17px;
  border: 1px solid rgba(132,139,145,0.28);
}
.xlink-card .eyebrow { margin-bottom: 7px; }
.xlink-card p { font-size: 13px; color: var(--rb-mid-grey); margin-bottom: 9px; }
.xlink-card a { font-size: 13px; font-weight: 600; color: var(--rb-red); }

.sources {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(132,139,145,0.25);
  font-size: 11.5px;
  color: var(--rb-mid-grey);
}
.sources p { margin: 0 0 4px 0; }

.cite {
  font-size: 11px;
  font-weight: 600;
  color: var(--rb-red) !important;
  text-decoration: none !important;
  vertical-align: super;
  margin-left: 2px;
}
.cite:hover { text-decoration: underline !important; }
section.block.light .cite,
section.block .cite { color: var(--rb-red) !important; }
.faucet-box .cite { color: var(--rb-deep) !important; text-decoration: underline !important; opacity: 0.7; }

.mod-note {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--rb-mid-grey);
}

/* ---------- Sub-page shared utilities ---------- */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted) !important;
  margin: 22px 32px 0 32px;
}
.crumb:hover { color: var(--rb-red) !important; text-decoration: none; }

.step-list { counter-reset: step; margin-top: 18px; }
.step-item {
  position: relative;
  padding: 0 0 26px 40px;
  border-left: 2px solid var(--rb-light-grey);
  margin-left: 15px;
}
.step-item:last-child { border-left: 2px solid transparent; padding-bottom: 0; }
.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -15px; top: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--rb-red);
  color: var(--rb-white);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(255,80,80,0.3);
}
.step-item h3 { font-size: 15.5px; margin-bottom: 6px; }
.step-item p { font-size: 14px; margin-bottom: 8px; }

.code-block {
  background: var(--rb-deep);
  color: var(--rb-off-white);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin: 10px 0;
}
.code-block .cm { color: var(--rb-mid-grey); }
.code-block .cs { color: var(--rb-red); }

.warn-box {
  border-left: 3px solid var(--rb-red);
  background: rgba(255,80,80,0.07);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin: 16px 0;
}

.diag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.diag-card {
  border-radius: 12px;
  padding: 16px 17px;
  border: 1px solid var(--rb-light-grey);
  background: var(--rb-white);
  box-shadow: var(--shadow-card);
}
.diag-card.ok { border-color: rgba(255,80,80,0.3); }
.diag-card h3 { font-size: 14.5px; margin-bottom: 6px; }
.diag-card p { font-size: 13px; margin-bottom: 0; }

.exchange-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--rb-light-grey);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--rb-white);
}
.exchange-row .ex-name { font-weight: 600; font-size: 14.5px; }
.exchange-row .ex-pair { font-size: 12.5px; color: var(--color-text-muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}
.stat-box {
  background: var(--rb-deep);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.stat-box .num { font-size: 22px; font-weight: 700; color: var(--rb-red); }
.stat-box .lbl { font-size: 11.5px; color: var(--rb-mid-grey); margin-top: 4px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .header { padding: 22px 18px 18px 18px; flex-direction: column; align-items: flex-start; }
  .header-tag { text-align: left; max-width: none; }
  .hero { padding: 6px 18px 22px 18px; }
  .hero h1 { font-size: 25px; }
  .hero-hexfield { width: 220px; height: 220px; top: -30px; right: -70px; }
  .scam-banner { margin: 18px 18px 20px 18px; }
  .quicknav { margin: 0 18px 26px 18px; }
  section.block { padding: 24px 18px; }
  .crumb { margin: 18px 18px 0 18px; }
  .diag-grid, .stat-row { grid-template-columns: 1fr; }
  .grid-2, .two-col { grid-template-columns: 1fr; }
  .xlink-grid { grid-template-columns: 1fr; }
  .kv dt { width: 96px; }
  .kv dd { margin-left: 96px; }
}
