/* Ferminux Network — public site
   Institutional light. White background, system font stack, one amber accent
   used sparingly, hairline borders, tabular numerals. No gradients, no blur,
   no shadows. Zero external requests.

   Grid discipline: one 1120px container; every titled section shares the same
   rail grid (280px heading rail + content column) so all edges align. The
   live band and the ecosystem directory deliberately span the full container. */

:root {
  --bg: #ffffff;
  --surface: #fbfbfa;
  --surface-2: #f4f4f2;
  --border: #e3e3e0;
  --border-soft: #efefec;
  --hairline: #efefec;
  --ink: #16181c;
  --text: #16181c;
  --muted: #5b6169;
  --faint: #8b9198;
  --accent: #a8761c;
  --accent-hover: #8a5f14;
  --ok: #1f7a45;
  --warn: #a33a1f;
  --r: 6px;
  --r-s: 6px;   /* buttons, inputs, small chrome */
  --r-m: 6px;   /* cards, rows */
  --r-l: 6px;   /* the band, large panels */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
}

.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--faint); }
.fine { color: var(--faint); font-size: 13px; margin-top: 16px; }
.fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.fine a:hover { color: var(--accent-hover); }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 600; }
p { text-wrap: pretty; }

/* ---------- Section grid: the shared measure ---------- */

.section { padding-top: 112px; }
.section-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px 56px;
  align-items: start;
}
.rail h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 12px;
}
.rail p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.rail p a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.rail p a:hover { color: var(--accent-hover); }
.section-content { min-width: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: block; border-radius: 5px; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.brand-dim { color: var(--muted); font-weight: 450; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--muted); font-size: 14px; transition: color 130ms ease-out; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding: 108px 0 0; }
.kicker {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 62px);
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 880px;
}
.hero-sub {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  max-width: 560px;
  margin-top: 22px;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.hero-trust { color: var(--faint); font-size: 14px; margin-top: 22px; max-width: 560px; }
.hero-trust a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.hero-trust a:hover { color: var(--accent-hover); }

.wallet-status { color: var(--muted); font-size: 13px; margin-top: 10px; min-height: 1.2em; }
.wallet-status.is-error { color: var(--warn); }
.wallet-status.is-ok { color: var(--ok); }

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: background-color 130ms ease-out, border-color 130ms ease-out,
    color 130ms ease-out, transform 130ms ease-out;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.btn-primary:hover { background: #000000; border-color: #000000; color: #ffffff; }
.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--faint); color: var(--ink); }

/* ---------- Live telemetry band ---------- */

.liveband-wrap { padding-top: 64px; }
.liveband {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  overflow: hidden;
}
.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--hairline);
}
.lb-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.lb-net { color: var(--faint); font-weight: 500; }
.lb-explore { color: var(--faint); font-size: 13px; font-family: var(--font-mono); }
.lb-explore:hover { color: var(--accent-hover); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.status-dot.is-online { background: var(--ok); }
.status-dot.is-offline { background: var(--warn); }

.lb-main {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 26px 24px 22px;
}
.lb-height { display: flex; flex-direction: column; gap: 4px; flex: none; }
.lb-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.lb-num {
  font-family: var(--font-mono);
  font-size: clamp(38px, 4.6vw, 54px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@keyframes height-pulse {
  0% { color: var(--accent); }
  100% { color: var(--ink); }
}
.lb-num.pulse { animation: height-pulse 900ms ease-out; }
.lb-num.is-offline { color: var(--faint); }
.lb-value.is-warn { color: var(--warn); }

.lb-tape { flex: 1 1 auto; min-width: 0; margin: 0; }
.lb-tape svg { display: block; width: 100%; height: 48px; }
.lb-caption {
  color: var(--faint);
  font-size: 12px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.tape-block {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 1;
}
.tape-block-num {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tape-link { stroke: var(--border); stroke-width: 1.5; }
.tape-dt {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--faint);
  font-variant-numeric: tabular-nums;
}
.tape-new .tape-block { fill: #ffffff; stroke: var(--accent); }
.tape-new .tape-block-num { fill: var(--accent); }
@keyframes tape-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.tape-new.tape-arrived .tape-block {
  transform-box: fill-box;
  transform-origin: center;
  animation: tape-pop 460ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.lb-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--hairline);
}
.lb-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 24px 18px;
  border-left: 1px solid var(--hairline);
}
.lb-stat:first-child { border-left: none; }
.lb-value {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.lb-value.is-offline { color: var(--faint); font-weight: 500; }
.lb-unit { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------- Markets ---------- */

.market-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}
.market-grid > * { min-width: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 24px;
  transition: border-color 130ms ease-out;
}
.card:hover { border-color: #cfcfcb; }
.card-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

.card-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.mono-label { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.pair-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.dex-price {
  font-family: var(--font-mono);
  font-size: clamp(34px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.dex-price-unit { font-size: 0.42em; font-weight: 500; color: var(--muted); margin-left: 6px; }
.dex-price-sub { color: var(--faint); font-size: 13px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card-dex .btn { margin-top: 22px; }
.card-dex .kv { margin-top: 20px; }
.card-aznt .kv { margin-top: 18px; }

.kv { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.kv-row dt { color: var(--faint); flex: none; }
.kv-row dd { text-align: right; color: var(--ink); min-width: 0; }
.addr { word-break: break-all; }
.copy-mini {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--faint);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  margin-left: 8px;
  cursor: pointer;
  vertical-align: 1px;
  transition: color 130ms ease-out, border-color 130ms ease-out;
}
.copy-mini:hover { color: var(--ink); border-color: var(--faint); }

/* ---------- Quickstart tabs ---------- */

.tabs {
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--surface);
  overflow: hidden;
}
.tab-list {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 22px;
  cursor: pointer;
  transition: color 130ms ease-out, border-color 130ms ease-out;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { padding: 22px; }
.tab-panel .fine { margin-bottom: 0; }

.codeblock {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-s);
  overflow-x: auto;
}
.codeblock pre {
  padding: 18px 96px 18px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.codeblock code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--ink);
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 130ms ease-out, border-color 130ms ease-out;
}
.copy-btn:hover { color: var(--ink); border-color: var(--faint); }

/* ---------- Downloads ---------- */

.dl-list {
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--bg);
  overflow: hidden;
}
.dl-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-top: 1px solid var(--hairline);
  transition: background-color 130ms ease-out;
}
.dl-row:first-child { border-top: none; }
a.dl-row:hover { background: var(--surface); color: var(--ink); }
a.dl-row:hover .dl-get { color: var(--accent); transform: translateY(1px); }
.dl-os { font-weight: 600; font-size: 14px; }
.dl-arch { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 6px; }
.dl-file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-get {
  color: var(--faint);
  font-size: 14px;
  transition: color 130ms ease-out, transform 130ms ease-out;
}
.dl-row-soon { opacity: 0.45; }
.dl-row-soon .dl-get { font-size: 12px; }

/* ---------- Wallet ---------- */

.wallet-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 24px;
}
.wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.wallet-head .btn { flex: none; }
.wallet-panel .wallet-status { margin-top: 12px; }
.wallet-panel .params-table { margin-top: 12px; }

.params-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.params-table th {
  text-align: left;
  color: var(--faint);
  font-weight: 500;
  padding: 9px 16px 9px 0;
  white-space: nowrap;
  vertical-align: top;
  width: 160px;
}
.params-table td { padding: 9px 0; overflow-wrap: anywhere; }
.params-table code { word-break: break-all; }
.params-table tr th, .params-table tr td { border-top: 1px solid var(--hairline); }
.params-table a { color: var(--accent); }
.params-table a:hover { color: var(--accent-hover); }

/* ---------- Chain parameters ---------- */

.pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
  overflow: hidden;
}
.pcell { background: var(--bg); padding: 14px 20px; min-width: 0; }
.pcell-wide { grid-column: 1 / -1; }
.pcell dt {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.pcell dd { font-size: 14px; line-height: 1.55; }
.hash { word-break: break-all; }

/* ---------- Ecosystem directory ---------- */

.section-dir { padding-top: 128px; }
.section-dir h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.dir-sub { color: var(--muted); font-size: 14px; margin-top: 10px; }
.dir { margin-top: 28px; border-top: 1px solid var(--border); }
.dir-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 24px;
  padding: 17px 4px;
  border-bottom: 1px solid var(--hairline);
  transition: background-color 130ms ease-out;
}
a.dir-row:hover { background: var(--surface); color: var(--ink); }
a.dir-row:hover .dir-arrow { color: var(--accent); transform: translateX(3px); }
a.dir-row:hover .dir-domain { color: var(--muted); }
.dir-name { font-weight: 600; font-size: 15px; }
.dir-desc { color: var(--muted); font-size: 14px; }
.dir-domain { font-family: var(--font-mono); font-size: 12px; color: var(--faint); text-align: right; }
.dir-arrow { color: var(--faint); font-size: 15px; transition: color 130ms ease-out, transform 130ms ease-out; }
.dir-row-static .dir-arrow { visibility: hidden; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 120px;
  border-top: 1px solid var(--border);
  padding: 44px 0 48px;
}
.inscription { color: var(--muted); font-size: 14px; }
.inscription em { color: var(--ink); font-style: normal; }
.footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 18px;
}
.footer-row .fine { margin-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rail p { max-width: 560px; }
  .lb-stats { grid-template-columns: repeat(3, 1fr); }
  .lb-stat { border-top: 1px solid var(--hairline); }
  .lb-stat:nth-child(-n+3) { border-top: none; }
  .lb-stat:nth-child(4) { border-left: none; }
  .dl-row { grid-template-columns: 180px minmax(0, 1fr) auto; }
  .dir-row { grid-template-columns: 120px minmax(0, 1fr) auto 20px; gap: 16px; }
}

@media (max-width: 760px) {
  .nav-extra { display: none; }
  .site-nav { gap: 20px; }
  .hero { padding-top: 72px; }
  .h1-br { display: none; }
  .section { padding-top: 80px; }
  .section-dir { padding-top: 88px; }
  .liveband-wrap { padding-top: 52px; }

  .lb-main { flex-direction: column; align-items: stretch; gap: 22px; padding: 22px 20px; }
  .lb-top { padding: 13px 20px; }
  .lb-explore { display: none; }
  .lb-stats { grid-template-columns: repeat(2, 1fr); }
  .lb-stat { padding: 14px 20px 16px; }
  .lb-stat:nth-child(3) { border-top: 1px solid var(--hairline); }
  .lb-stat:nth-child(odd) { border-left: none; }
  .lb-stat:nth-child(even) { border-left: 1px solid var(--hairline); }

  .market-grid { grid-template-columns: minmax(0, 1fr); }
  .wallet-head { flex-direction: column; }

  .tab { padding: 12px 14px; font-size: 13px; }
  /* Wrap code on small screens: the install command must be readable at a
     glance, not discovered behind an unhinted horizontal scroll. */
  .codeblock pre {
    padding-right: 18px;
    padding-top: 44px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .copy-mini { padding: 5px 10px; }

  .dl-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: 13px 16px; }
  .dl-file { grid-column: 1 / -1; }
  .dl-get { grid-row: 1; grid-column: 2; justify-self: end; }

  /* Stack the wallet parameters label-over-value (same grammar as .pcell)
     instead of squeezing values into a 130px column. */
  .params-table, .params-table tbody { display: block; }
  .params-table tr {
    display: block;
    padding: 10px 0 11px;
    border-top: 1px solid var(--hairline);
  }
  .params-table tr th, .params-table tr td {
    display: block;
    border-top: none;
    padding: 0;
    width: auto;
  }
  .params-table th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 3px;
  }

  .pgrid { grid-template-columns: minmax(0, 1fr); }

  .dir-row {
    grid-template-columns: minmax(0, 1fr) 20px;
    row-gap: 3px;
    padding: 14px 4px;
  }
  .dir-desc { grid-column: 1; }
  .dir-domain { grid-column: 1; text-align: left; }
  .dir-arrow { grid-row: 1; grid-column: 2; }

  .footer-row { flex-direction: column; }
}
