/* TES site. The three strand colours mean proof type and nothing else:
   blue = mined on a TES pool, amber = via XDAG, teal = via Etica. */
@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2330;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --ink: #e6edf3;
  --soft: #9aa4af;
  --faint: #6b7480;
  --teal: #1d9e75;
  --teal-bright: #3ecf9e;
  --teal-dim: rgba(29, 158, 117, .15);
  --amber: #ef9f27;
  --amber-dim: rgba(239, 159, 39, .12);
  --blue: #58a6ff;
  --red: #f85149;
  --red-dim: rgba(248, 81, 73, .12);
  --native: #58a6ff;
  --xdag: #ef9f27;
  --eti: #3ecf9e;
  --code-bg: #0a0e13;
  --code-ink: #e6edf3;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px;
  --r-lg: 14px;
}
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
a { color: var(--teal-bright); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bg2); padding: 8px 12px; z-index: 110; border-radius: var(--r); }

/* header */
.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 17, 23, .9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: .5px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.mark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: "Archivo", var(--sans); font-weight: 750; font-stretch: 125%; font-size: 20px;
}
.mark:hover { color: var(--ink); }
.s-native { fill: var(--native); } .s-xdag { fill: var(--xdag); } .s-eti { fill: var(--eti); }
.ver {
  font-size: 12px; font-weight: 600; color: var(--teal-bright);
  background: var(--teal-dim); border-radius: 99px; padding: 3px 9px; margin-right: auto;
}
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
nav a {
  font-size: 14px; color: var(--soft); text-decoration: none;
  padding: 6px 10px; border-radius: 7px;
}
nav a:hover { color: var(--ink); background: var(--bg3); }
nav a[aria-current="page"] { color: var(--teal-bright); background: var(--teal-dim); }
.notice { background: var(--amber-dim); color: var(--amber); padding: 9px 20px; text-align: center; font-size: 14px; }

main.wrap { padding-top: 34px; padding-bottom: 70px; min-height: 60vh; outline: none; }

/* type */
h1 {
  font-family: "Archivo", var(--sans); font-weight: 760; font-stretch: 112%;
  font-size: clamp(30px, 5vw, 50px); line-height: 1.05; letter-spacing: -.015em;
  margin: 0 0 16px; max-width: 18ch;
}
h1.page { font-size: clamp(26px, 3.4vw, 34px); max-width: none; }
h2 { font-weight: 600; font-size: 21px; line-height: 1.25; margin: 46px 0 10px; letter-spacing: -.01em; }
h3 { font-weight: 600; font-size: 16px; margin: 24px 0 6px; }
p { margin: 0 0 13px; max-width: 70ch; }
.lead { font-size: 17px; line-height: 1.5; max-width: 60ch; color: var(--soft); }
.soft { color: var(--soft); }
.small { font-size: 13px; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
.addr { font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* the braid: recent blocks, one lane per way of mining */
.braid { margin: 28px 0 10px; background: var(--bg2); border: .5px solid var(--line2); border-radius: var(--r-lg); padding: 14px 18px; }
.lane { display: grid; grid-template-columns: 124px 1fr 44px; align-items: center; gap: 12px; padding: 7px 0; }
.lane + .lane { border-top: .5px solid var(--line); }
.lane-name { font-weight: 600; font-size: 14px; }
.lane-count { text-align: right; font-weight: 600; font-size: 14px; color: var(--c); }
.cells { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; height: 28px; }
.cell { border-radius: 3px; display: block; background: var(--bg3); }
.cell.on { background: var(--c); }
.cell.on:hover, .cell.on:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.cell.new { animation: arrive .9s ease-out 1; }
@keyframes arrive { from { transform: scaleY(.1); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cell.new { animation: none; } }
.lane.native { --c: var(--native); } .lane.xdag { --c: var(--xdag); } .lane.eti { --c: var(--eti); }
.braid-cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--faint); padding: 8px 56px 0 136px; }
@media (max-width: 620px) {
  .braid { padding: 10px 12px; }
  .lane { grid-template-columns: 82px 1fr 26px; gap: 8px; }
  .lane-name, .lane-count { font-size: 13px; white-space: nowrap; }
  .braid-cap { padding: 8px 30px 0 90px; }
  .cells { gap: 2px; height: 24px; }
}

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 22px 0 0; }
.facts div { background: var(--bg2); border: .5px solid var(--line2); border-radius: var(--r); padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--soft); }
.facts dd { margin: 2px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }

/* three ways */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.way { background: var(--bg2); border: .5px solid var(--line2); border-top: 3px solid var(--c); border-radius: var(--r); padding: 14px 18px 4px; }
.way.native { --c: var(--native); } .way.xdag { --c: var(--xdag); } .way.eti { --c: var(--eti); }
.way h3 { margin-top: 4px; }
.way p { font-size: 14px; color: var(--soft); }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } }

/* tags */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; color: var(--c, var(--soft)); background: var(--bg3); }
.tag.native { --c: var(--native); } .tag.xdag { --c: var(--xdag); } .tag.eti { --c: var(--eti); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); margin-right: 6px; }
.dot.on { background: var(--teal-bright); }

/* commands */
.cmd { max-width: 820px; position: relative; background: var(--code-bg); border: .5px solid var(--line2); color: var(--code-ink); border-radius: var(--r); margin: 10px 0 16px; }
.cmd pre { margin: 0; padding: 40px 16px 14px; overflow-x: auto; white-space: pre; line-height: 1.6; font-size: 13px; color: var(--teal-bright); }
.cmd button { position: absolute; top: 8px; right: 8px; }
button, .btn {
  font: 600 14px var(--sans); color: var(--ink); background: var(--bg3);
  border: .5px solid var(--line2); border-radius: var(--r); padding: 8px 14px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { border-color: var(--teal); color: var(--teal-bright); background: var(--bg3); }
.cmd button { background: transparent; color: var(--soft); border-color: var(--line2); padding: 4px 10px; font-size: 12px; }
.cmd button:hover { color: var(--teal-bright); border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-bright); border-color: var(--teal-bright); color: #04130d; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 0; }

/* forms */
.field { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin-top: 14px; }
input[type="text"], input[type="search"] {
  flex: 1; min-width: 220px; font: 14px var(--mono); padding: 9px 11px;
  border: .5px solid var(--line2); border-radius: var(--r); background: var(--code-bg); color: var(--ink);
}
input[type="text"]:focus, input[type="search"]:focus { border-color: var(--teal); outline: none; }
input.short { flex: 0 1 170px; min-width: 120px; }

/* tables */
.tablewrap { overflow-x: auto; background: var(--bg2); border: .5px solid var(--line2); border-radius: var(--r-lg); margin: 10px 0 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 16px; white-space: nowrap; }
th { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }
td { border-top: .5px solid var(--line); }
tbody tr:hover { background: var(--bg3); }
td.num, th.num { text-align: right; }
td.empty { color: var(--soft); white-space: normal; padding: 18px 16px; }
dl.kv { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 0; margin: 14px 0; background: var(--bg2); border: .5px solid var(--line2); border-radius: var(--r-lg); overflow: hidden; }
dl.kv dt, dl.kv dd { margin: 0; padding: 10px 16px; border-top: .5px solid var(--line); }
dl.kv dt { color: var(--soft); font-size: 14px; }
dl.kv dd { word-break: break-word; }
dl.kv > :nth-child(-n+2) { border-top: 0; }
@media (max-width: 560px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { border-bottom: 0; padding-bottom: 0; } }

/* guides */
ol.steps { padding-left: 0; list-style: none; counter-reset: step; max-width: 820px; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 10px 48px; margin-top: 28px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px;
  border: .5px solid var(--teal); background: var(--teal-dim); color: var(--teal-bright);
  border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px;
}
ol.steps h3 { margin-top: 0; }
.callout { border-left: 3px solid var(--amber); background: var(--bg2); padding: 13px 18px; margin: 18px 0; max-width: 820px; border-radius: 0 var(--r) var(--r) 0; }
.callout p:last-child { margin-bottom: 0; }
ul { padding-left: 20px; max-width: 70ch; }
li { margin-bottom: 6px; }
.err { color: var(--red); font-weight: 600; }

/* downloads page */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 20px 0 8px; }
.dl { background: var(--bg2); border: .5px solid var(--line2); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; }
.dl h3 { margin: 0 0 4px; font-size: 17px; }
.dl .who { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.dl p { font-size: 14px; color: var(--soft); margin-bottom: 14px; }
.dl .go { margin-top: auto; }

.foot { border-top: .5px solid var(--line); padding: 24px 0 40px; font-size: 13px; color: var(--soft); }
.foot p { max-width: 80ch; margin-bottom: 8px; }
