/* ---------------------------------------------------------------
 * windy.sisobus.com/coin/ — single-page trophy site for the WNDY
 * token. Aesthetic: everything monospace (JetBrains Mono), high
 * contrast, no decoration, one accent color. Reads like a polished
 * terminal session — same color tokens as the windy playground so
 * the trilogy feels like one family.
 * --------------------------------------------------------------- */

:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --panel-bg: #ffffff;
  --fg: #1a1a1a;
  --fg-soft: #333;
  --muted: #6a6a6a;
  --accent: #2463eb;
  --accent-soft: rgba(36, 99, 235, 0.10);
  --border: #e2e2e2;
  --border-strong: #cccccc;
  --pre-bg: #f3f3f3;
  --code-bg: #ececec;
  --ok: #1f7a3d;

  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-feature-settings: "calt" 1, "ss01" 1, "zero" 1;
  font-variant-ligatures: contextual;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --panel-bg: #161618;
    --fg: #ececec;
    --fg-soft: #d0d0d0;
    --muted: #8a8a8a;
    --accent: #8db1ff;
    --accent-soft: rgba(141, 177, 255, 0.12);
    --border: #2a2a2c;
    --border-strong: #3a3a3c;
    --pre-bg: #0a0a0b;
    --code-bg: #1c1c1f;
    --ok: #5bd47f;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  max-width: 920px;
  margin-inline: auto;
  padding: 1.5rem 1.5rem 4rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:hover, a:focus-visible {
  border-bottom-color: var(--accent);
  outline: none;
}

code {
  font-family: inherit;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  white-space: nowrap;
}

p code { white-space: normal; word-break: break-all; }

.muted { color: var(--muted); }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

/* Inline SVG (path uses stroke=currentColor) — picks up the accent
   token so dark mode auto-tints. The standalone logo.svg used as
   the favicon + BaseScan asset is the same shape with a literal
   #2463eb so it renders correctly outside our color tokens. */
.logo {
  display: inline-block;
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  transform: translateY(3px);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.brand-chain {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  font-size: 0.88rem;
}

.nav a {
  color: var(--fg-soft);
  border-bottom: none;
  padding: 0.15rem 0;
  position: relative;
}
.nav a::before {
  content: "·";
  color: var(--muted);
  margin-right: 0.4rem;
  opacity: 0;
}
.nav a:hover, .nav a:focus-visible {
  color: var(--accent);
}
.nav a:hover::before, .nav a:focus-visible::before {
  opacity: 1;
}

/* ---------- sections ---------- */

main section + section {
  margin-top: 3rem;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1rem;
  font-weight: 700;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  color: var(--fg-soft);
  font-weight: 600;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h2 .hash {
  color: var(--accent);
  margin-right: 0.4rem;
  font-weight: 700;
}

h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1.75rem 0 0.65rem;
  font-weight: 600;
}

h4 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.prose {
  max-width: 70ch;
  color: var(--fg-soft);
  margin: 0.6rem 0;
}

/* ---------- hero ---------- */

.hero {
  margin-bottom: 2.5rem;
}

.lede {
  max-width: 70ch;
  font-size: 1.02rem;
  color: var(--fg-soft);
  margin: 0 0 1.5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stat {
  background: var(--panel-bg);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 0.45rem;
  box-shadow: 0 0 0 3px rgba(31, 122, 61, 0.18);
}

@media (prefers-color-scheme: dark) {
  .dot { box-shadow: 0 0 0 3px rgba(91, 212, 127, 0.18); }
}

#supply-num { font-variant-numeric: tabular-nums; }

/* ---------- tables (spec + addrs + tiers) ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

table th, table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table th {
  font-weight: 500;
  color: var(--muted);
  width: 14em;
  white-space: nowrap;
}

table.spec td, table.addrs td {
  color: var(--fg-soft);
}

table.addrs th { width: 14em; }

.addr {
  font-family: inherit;
  font-size: 0.85rem;
  word-break: break-all;
}
code.addr {
  background: var(--code-bg);
  display: inline-block;
  padding: 0.1em 0.4em;
  white-space: normal;
  word-break: break-all;
}

table.tiers {
  max-width: 460px;
}
table.tiers th, table.tiers td {
  border-bottom: 1px solid var(--border);
}
table.tiers thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-strong);
}
table.tiers td:first-child { font-weight: 600; }

/* ---------- mining flow ---------- */

.flow {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.flow li {
  background: var(--panel-bg);
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: 0.8rem;
  align-items: start;
}

.step {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.2;
  text-align: right;
}

.flow li p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 0.92rem;
  max-width: 65ch;
}

/* ---------- terminal block ---------- */

pre.terminal {
  background: var(--pre-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  margin: 1rem 0;
  white-space: pre;
  color: var(--fg-soft);
}

pre.terminal .prompt {
  color: var(--accent);
  user-select: none;
  margin-right: 0.4rem;
}

pre.terminal .cmnt {
  color: var(--muted);
}

/* ---------- trust list ---------- */

.trust {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.85rem;
}

.trust li {
  border-left: 2px solid var(--border-strong);
  padding: 0.15rem 0.9rem;
  color: var(--fg-soft);
  max-width: 75ch;
  font-size: 0.92rem;
}

.trust li strong {
  color: var(--fg);
  font-weight: 600;
  display: inline;
}

/* ---------- trilogy cards ---------- */

.trilogy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 1rem 0.85rem;
  background: var(--panel-bg);
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card:hover, .card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.card-icon {
  color: var(--accent);
  font-size: 1rem;
}
.card p {
  font-size: 0.82rem;
  color: var(--fg-soft);
  margin: 0.2rem 0 0.6rem;
}
.card-host {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}
.card.current {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ---------- footer ---------- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-row a { color: var(--fg-soft); border-bottom: 1px solid transparent; }
.footer-row a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  body { padding: 1rem 1rem 3rem; font-size: 14px; }
  h1 { font-size: 1.65rem; }
  .masthead { padding-bottom: 0.85rem; margin-bottom: 1.75rem; }
  .nav { gap: 0 0.85rem; font-size: 0.82rem; }
  main section + section { margin-top: 2.5rem; }
  table th, table td { padding: 0.45rem 0.55rem; }
  table th { width: auto; }
  table.spec th, table.addrs th { width: 9em; }
  pre.terminal { font-size: 0.78rem; padding: 0.75rem 0.85rem; }
  .flow li { grid-template-columns: 1.8em 1fr; padding: 0.85rem 0.9rem; }
}
