/* Ferminux Network — public site
   Institutional dark. System font stack, 6px radius, tabular numerals.
   Zero external requests. */

:root {
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #171b21;
  --border: #232932;
  --border-soft: #1b2027;
  --text: #e7eaef;
  --muted: #9aa3ae;
  --faint: #6b7480;
  --accent: #e2a437;
  --accent-hover: #edb44f;
  --accent-ink: #14100a;
  --ok: #3fb96a;
  --warn: #d96a4a;
  --radius: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 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(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); 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;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  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: 14px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 28px; font-weight: 650; margin-bottom: 8px; }
h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }

.section { padding: 88px 0 0; }
.section-sub { color: var(--muted); max-width: 620px; margin-bottom: 32px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.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 120ms ease-out; }
.site-nav a:hover { color: var(--text); }

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

.hero { padding: 96px 0 0; }
.kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 780px;
}
.hero-sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 600px;
  margin-top: 20px;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.hero-link { color: var(--muted); font-size: 14px; }
.hero-link:hover { color: var(--accent-hover); }
.wallet-status { color: var(--muted); font-size: 13px; margin-top: 14px; 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(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--faint); color: var(--text); }

/* ---------- Stats strip ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.stat {
  padding: 16px 20px;
  border-left: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat:first-child { border-left: none; }
.stat-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}
.stat-value { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.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); }
.stat-value.is-offline { color: var(--faint); font-weight: 500; }
.stat-value.is-warn { color: var(--warn); }

/* ---------- Cards / two-col ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/* grid items must be allowed to shrink below content size —
   otherwise an unbreakable URL widens the whole page on mobile */
.two-col > *, .dl-grid > *, .link-grid > * { min-width: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.card .fine { margin-top: 12px; margin-bottom: 0; }

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

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

.notice {
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.notice strong { color: var(--text); }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}
.dl-card:hover { border-color: var(--faint); background: var(--surface-2); color: var(--text); }
.dl-os { font-weight: 650; font-size: 15px; }
.dl-arch { color: var(--muted); font-size: 13px; }
.dl-file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin-top: 8px;
  word-break: break-all;
}
.dl-card-app { grid-column: 1 / -1; border-color: var(--border); }
.dl-card-app .dl-os::after {
  content: "GUI";
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  margin-left: 10px;
  vertical-align: 2px;
}

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

.tabs {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  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 120ms ease-out, border-color 120ms ease-out;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { padding: 22px; }
.tab-panel .fine { margin-bottom: 0; }

.codeblock {
  position: relative;
  background: #0d0f13;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}
.codeblock pre {
  padding: 18px 96px 18px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}
.codeblock code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: #d3dae3;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface-2);
  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 120ms ease-out, border-color 120ms ease-out;
}
.copy-btn:hover { color: var(--text); border-color: var(--faint); }

/* ---------- Ecosystem links ---------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}
.link-card:hover { border-color: var(--faint); background: var(--surface-2); color: var(--text); }
.link-title { font-weight: 650; font-size: 15px; }
.link-sub { color: var(--muted); font-size: 13px; }

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

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 48px;
  background: var(--surface);
}
.table-scroll { overflow-x: auto; margin-top: 20px; }
.chain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.chain-table th {
  text-align: left;
  color: var(--faint);
  font-weight: 500;
  padding: 9px 24px 9px 0;
  white-space: nowrap;
  vertical-align: top;
  width: 220px;
}
.chain-table td { padding: 9px 0; color: var(--text); }
.chain-table tr + tr th,
.chain-table tr + tr td { border-top: 1px solid var(--border-soft); }
.hash { word-break: break-all; }

.inscription { color: var(--muted); font-size: 14px; margin-top: 28px; }
.inscription em { color: var(--accent); font-style: normal; }

.footer-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.site-footer .fine { margin-top: 24px; }

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

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stat { border-top: 1px solid var(--border-soft); }
  .stat:nth-child(-n+3) { border-top: none; }
  .stat:nth-child(4) { border-left: none; }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero { padding-top: 64px; }
  .section { padding-top: 64px; }
  .two-col { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }
  .stat { border-left: none; border-top: 1px solid var(--border-soft); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--border-soft); }
  .tab { padding: 12px 14px; font-size: 13px; }
  .codeblock pre { padding-right: 18px; padding-top: 44px; }
}

@media (max-width: 480px) {
  .link-grid { grid-template-columns: 1fr; }
}

/* Downloads: not-yet-available targets */
.dl-card-soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
