/* asichost.ca: machine telemetry. Dark blue-black over a fine blueprint grid, Digital Block FX
   logo blue (#1A73E8 / #4D9FEF), and machined silver like a miner's aluminium housing.
   The calculator's answer is a chamfered, brushed-silver plate that reads like a utility bill.
   DIN-style system faces (Bahnschrift on Windows) for headings and figures; system UI for text.
   Grids come out even at every width (6 guides: 3x2 / 2x3 / 1; 4 keys: 2x2 / 1; chain: 5 / 1). */
:root {
  --bg: #070b12;
  --bg-deep: #04070c;
  --panel: rgba(14, 21, 32, .92);
  --panel-2: #141d2a;
  --line: #1f2a3a;
  --line-strong: #34445a;
  --silver: #d4dae2;
  --silver-dim: #93a0b2;
  --white: #f3f6fa;
  --blue: #1a73e8;
  --blue-lt: #4d9fef;
  --ice: #9ccbff;
  --glow: rgba(77, 159, 239, .35);
  --loss: #f07a6e;
  /* the silver plate */
  --plate-top: #f1f4f7;
  --plate-bot: #d3d9e1;
  --plate-ink: #070b12;
  --plate-dim: #4b5666;
  --plate-line: #b2bcc8;
  --din: "Bahnschrift", "DIN Alternate", "DIN Next LT Pro", "D-DIN", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --w: 74rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--silver); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 1rem/1.6 var(--text);
  background-image:
    radial-gradient(1100px 560px at 75% -8%, rgba(26, 115, 232, .2), transparent 70%),
    linear-gradient(rgba(77, 159, 239, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 159, 239, .045) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
}
a { color: var(--ice); text-decoration-color: color-mix(in srgb, var(--ice) 45%, transparent); text-underline-offset: .18em; }
a:hover { color: #fff; text-decoration-color: var(--blue-lt); }
:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 2px; box-shadow: 0 0 0 5px var(--glow); }
h1, h2, h3, .calc-title { font-family: var(--din); font-weight: 600; letter-spacing: .005em; line-height: 1.12; color: var(--white); font-stretch: 92%; }
h2 { font-size: 1.55rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .7rem; }
h2::before { content: ""; flex: 0 0 auto; width: 1.4rem; height: 2px; background: var(--blue-lt); box-shadow: 0 0 8px var(--glow); }
.calc-title::before, .bill h2::before { display: none; }
p { margin: 0 0 1rem; }
.num, .stub-amt, .keys dd, .lines td, input { font-variant-numeric: tabular-nums lining-nums; }
.skip { position: absolute; left: -999px; top: 0; background: var(--panel-2); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* header: a machined band with fine heat-sink fins */
.top {
  background: var(--bg-deep);
  background-image: repeating-linear-gradient(90deg, rgba(212, 218, 226, .04) 0 1px, transparent 1px 7px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(77, 159, 239, .18);
}
.top-in { max-width: var(--w); margin: 0 auto; padding: .85rem 1.5rem; display: flex; align-items: center; gap: 1rem 2.5rem; }
.mark { display: inline-flex; align-items: center; gap: .55rem; color: var(--white); text-decoration: none; font: 700 1.25rem var(--din); letter-spacing: .02em; white-space: nowrap; }
.mark svg { width: 1.6rem; height: 1.6rem; color: var(--silver); filter: drop-shadow(0 0 6px var(--glow)); }
.mark:hover { color: #fff; }
.top nav { display: flex; gap: .25rem 1.4rem; overflow-x: auto; scrollbar-width: none; font: 500 .98rem var(--din); margin-left: auto; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--silver-dim); text-decoration: none; white-space: nowrap; padding: .35rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: #fff; }
.top nav a[aria-current] { color: #fff; border-bottom-color: var(--blue-lt); text-shadow: 0 0 12px var(--glow); }
@media (max-width: 62rem) {
  .top-in { flex-direction: column; align-items: stretch; gap: .35rem; padding-bottom: .4rem; }
  .top nav { margin-left: 0; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 2rem; }
}

main { max-width: var(--w); margin: 0 auto; padding: 0 1.5rem 3rem; }
main > section { padding: 2.75rem 0; border-top: 1px solid var(--line); }
main > section:first-of-type, main > .disclose + section, .hero + .calc { border-top: 0; }
.disclose { margin: 1.25rem 0 0; padding: .7rem 1rem; background: var(--panel); border-left: 3px solid var(--blue-lt); font-size: .93rem; color: var(--silver-dim); }
.disclose a { white-space: nowrap; }

.hero { padding: 3.5rem 0 2rem; }
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 700; max-width: 20ch; margin: 0 0 1.1rem; letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 0%, #d9e0e8 48%, #8f9cad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero--page h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 26ch; }
.lede { font-size: 1.15rem; line-height: 1.55; max-width: 62ch; color: var(--silver); margin: 0; }
.crumb { font: 500 .95rem var(--din); margin: 0 0 .5rem; }
.intro, .src, .hint { color: var(--silver-dim); max-width: 68ch; }
.src { font-size: .88rem; }
.hint { font-size: .9rem; margin: 0; }

/* HUD corner brackets on panels and tables */
.calc-in, .table-wrap, .guides a { position: relative; }
.calc-in::before, .calc-in::after, .table-wrap::before, .table-wrap::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 1;
}
.calc-in::before, .table-wrap::before { top: -1px; left: -1px; border-top: 2px solid var(--blue-lt); border-left: 2px solid var(--blue-lt); }
.calc-in::after, .table-wrap::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--blue-lt); border-right: 2px solid var(--blue-lt); }
/* inside a scroll box, keep the brackets within it so they don't create scrollbars */
.table-wrap::before { top: 0; left: 0; }
.table-wrap::after { bottom: 0; right: 0; }

/* ---------- calculator ---------- */
.calc, .mob { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 60rem) { .calc, .mob { grid-template-columns: 1fr; } }
.calc-in { background: var(--panel); border: 1px solid var(--line); padding: 1.5rem; backdrop-filter: blur(2px); }
.calc-title { font-size: 1.3rem; margin: 0 0 1rem; }
.modes { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line-strong); margin-bottom: 1.25rem; }
.modes label { padding: .45rem .95rem; cursor: pointer; font: 500 .98rem var(--din); position: relative; color: var(--silver-dim); }
.modes label + label { border-left: 1px solid var(--line-strong); }
.modes input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.modes label:has(input:checked) { background: var(--blue); color: #fff; box-shadow: 0 0 18px var(--glow); }
.modes label:has(input:focus-visible) { outline: 2px solid var(--blue-lt); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; margin: 0 0 1.1rem; padding: 0; border: 0; min-width: 0; }
.fields[hidden], .f[hidden], .hint[hidden], .custom-genset[hidden] { display: none; }
.fields .fields { margin: 0; }
.f-wide { grid-column: 1 / -1; }
@media (max-width: 30rem) { .fields { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: .3rem; font: 500 .92rem var(--din); min-width: 0; color: var(--silver); }
.lab { display: block; }
.unit { color: var(--silver-dim); font-weight: 400; margin-left: .2rem; }
legend { font: 600 1.05rem var(--din); padding: 0; margin-bottom: .6rem; grid-column: 1 / -1; color: var(--white); }
fieldset.fields { border-top: 1px solid var(--line); padding-top: 1rem; }
.net-status { font-weight: 400; color: var(--silver-dim); font-size: .9rem; }
input, select {
  font: 1rem var(--text); color: var(--white); background: rgba(4, 7, 12, .8); width: 100%; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: 0; padding: .5rem .6rem; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #66748a; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--blue-lt) 50%), linear-gradient(135deg, var(--blue-lt) 50%, transparent 50%); background-position: calc(100% - 1rem) 55%, calc(100% - .7rem) 55%; background-size: .3rem .3rem; background-repeat: no-repeat; text-overflow: ellipsis; }
select option, select optgroup { background: #0e1520; color: var(--silver); }
input:hover, select:hover { border-color: #4a5c75; }
input:focus, select:focus { border-color: var(--blue-lt); outline: none; box-shadow: 0 0 0 3px var(--glow); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: .4rem; }
.check { display: flex; align-items: center; gap: .5rem; font: 500 .95rem var(--din); }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.tax-label { color: var(--silver-dim); font-weight: 400; }
.more { border-top: 1px solid var(--line); padding-top: .9rem; }
.more summary { cursor: pointer; font: 600 1rem var(--din); margin-bottom: .9rem; color: var(--white); }
.more summary::marker { color: var(--blue-lt); }
.more[open] summary { margin-bottom: 1.1rem; }
.link-btn { background: none; border: 0; padding: 0; font: 500 .95rem var(--din); color: var(--ice); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; justify-self: start; align-self: end; }

/* the statement: a chamfered, brushed silver plate */
.bill {
  --cut: 22px;
  position: sticky; top: 1rem; overflow: hidden;
  color: var(--plate-ink);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .24) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, var(--plate-top), var(--plate-bot));
  border-top: 6px solid var(--blue);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.bill::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
  transform: translateX(-120%); animation: sweep 1.4s .35s ease-out 1 forwards;
}
@keyframes sweep { to { transform: translateX(120%); } }
.bill a { color: var(--blue); }
@media (max-width: 60rem) { .bill { position: relative; top: 0; } }
.bill-head { padding: 1.25rem 1.5rem .75rem; border-bottom: 1px solid var(--plate-line); }
.bill-kind { font: 700 1.35rem var(--din); margin: 0 0 .2rem; font-stretch: 92%; }
.bill-acct { font: 500 1.05rem var(--din); margin: 0; }
.bill-period { color: var(--plate-dim); font-size: .9rem; margin: .15rem 0 0; }
.bill-feed { display: inline-flex; align-items: center; gap: .45rem; margin: .55rem 0 0; font: 500 .82rem var(--din); color: var(--plate-dim); letter-spacing: .02em; }
.bill-feed::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #8a96a6; }
.bill-feed.is-live { color: #0f4fae; }
.bill-feed.is-live::before { background: var(--blue); box-shadow: 0 0 0 0 rgba(26, 115, 232, .6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, .55); } 70% { box-shadow: 0 0 0 8px rgba(26, 115, 232, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); } }
.bill-msg, .bill-noscript { padding: 1.25rem 1.5rem; margin: 0; color: var(--plate-dim); }
.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { padding: .7rem 1.5rem; border-bottom: 1px dotted var(--plate-line); vertical-align: baseline; }
.lines th { text-align: left; font: 500 1rem var(--din); }
.lines th span { display: block; font: .85rem var(--text); color: var(--plate-dim); margin-top: .1rem; }
.lines td { text-align: right; font: 500 1.05rem var(--din); white-space: nowrap; }
.lines td.pos { color: #1559c4; }
.stub { margin-top: 1.1rem; padding: 1.1rem 1.5rem 1.2rem; border-top: 2px dashed #8f9aa8; background: rgba(7, 11, 18, .05); }
.stub-label { font: 600 .95rem var(--din); margin: 0; color: var(--plate-dim); }
.stub-amt { font: 700 clamp(2.4rem, 5vw, 3.4rem)/1.05 var(--din); margin: .2rem 0 .35rem; border-radius: 2px; font-stretch: 92%; }
.is-neg .stub-amt { color: #b3261e; }
.is-pos .stub-amt { color: #1559c4; }
.stub-sub { margin: 0; font-size: .92rem; color: #2a3444; max-width: 46ch; }
.flash { animation: flash .9s ease-out; }
@keyframes flash { from { background: rgba(77, 159, 239, .35); } to { background: transparent; } }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--plate-line); }
.keys div { padding: .85rem 1.5rem; border-bottom: 1px solid var(--plate-line); }
.keys div:nth-child(odd) { border-right: 1px solid var(--plate-line); }
.keys dt { font-size: .85rem; color: var(--plate-dim); }
.keys dd { margin: .15rem 0 0; font: 600 1.08rem var(--din); }
@media (max-width: 22rem) { .keys { grid-template-columns: 1fr; } .keys div:nth-child(odd) { border-right: 0; } }
.assume { font-size: .84rem; color: var(--plate-dim); padding: .9rem 1.5rem 0; margin: 0; }
.assume:last-child { padding-bottom: 1.6rem; }

/* ---------- content ---------- */
.how-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; }
@media (max-width: 52rem) { .how-cols { grid-template-columns: 1fr; } }
.how-cols p { margin: 0; color: var(--silver-dim); }
.how-cols strong { display: block; font: 600 1.15rem var(--din); color: var(--white); margin-bottom: .3rem; }

.guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 60rem) { .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .guides { grid-template-columns: 1fr; } }
.guides a {
  display: block; height: 100%; padding: 1.1rem 1.2rem 1.2rem; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--line-strong);
  transition: border-color .15s, box-shadow .15s;
}
.guides strong { display: block; font: 600 1.25rem var(--din); margin-bottom: .3rem; color: var(--white); font-stretch: 92%; }
.guides span { color: var(--silver-dim); }
.guides a:hover { border-color: var(--line-strong); border-top-color: var(--blue-lt); box-shadow: 0 0 24px -8px var(--glow); }
.guides a:hover strong { color: var(--ice); }

.table-wrap { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); background: var(--panel); }
table.rates, table.rules, table.plain-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rates th, .rates td, .rules th, .rules td, .plain-table th, .plain-table td { padding: .65rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.rates thead th, .plain-table thead th { font: 600 .92rem var(--din); background: var(--panel-2); color: var(--white); border-bottom: 1px solid var(--blue-lt); white-space: nowrap; }
.rates tbody tr:last-child td, .rules tbody tr:last-child > *, .plain-table tbody tr:last-child > * { border-bottom: 0; }
.rates tbody tr:hover td { background: rgba(77, 159, 239, .05); }
.rates td.num, .rates th.num, .plain-table .num { text-align: right; white-space: nowrap; }
.rates td.rate { font: 600 1.02rem var(--din); min-width: 8.5rem; color: var(--white); }
.rates tbody th[scope="rowgroup"] { font: 600 1rem var(--din); background: var(--panel-2); border-right: 1px solid var(--line); min-width: 9rem; }
.rates .src { font-size: .82rem; min-width: 14rem; }
.rules th, .plain-table tbody th { font: 600 1rem var(--din); width: 15rem; color: var(--white); }
.plain-table tbody th { width: auto; min-width: 11rem; }
.bar { display: block; height: 4px; margin-top: .35rem; background: linear-gradient(90deg, var(--blue-lt) var(--w), var(--line) var(--w)); }
.bar.over { background: repeating-linear-gradient(90deg, var(--blue-lt) 0 10px, var(--ice) 10px 13px); }
.flag { font-style: normal; font-size: .8rem; color: var(--loss); white-space: nowrap; }
.notes { margin: 1.25rem 0 1rem; padding-left: 1.1rem; max-width: 72ch; color: var(--silver-dim); }
.notes li { margin: .4rem 0; }
.notes strong { color: var(--silver); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
@media (max-width: 52rem) { .cols2 { grid-template-columns: 1fr; } }
.plain { margin: 0 0 1rem; padding-left: 1.1rem; }
.plain li { margin: .45rem 0; }
.plain li::marker { color: var(--blue-lt); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.more-links p { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font: 500 1rem var(--din); }

/* gas-to-bitcoin chain: a real sequence, so it is numbered. 5 across, or one column. */
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
@media (max-width: 60rem) { .chain { grid-template-columns: 1fr; gap: .9rem; } }
.chain li { counter-increment: step; border-top: 2px solid var(--line-strong); padding-top: .75rem; position: relative; }
.chain li::before { content: ""; position: absolute; top: -2px; left: 0; width: 2.2rem; height: 2px; background: var(--blue-lt); box-shadow: 0 0 8px var(--glow); }
.chain strong { display: block; font: 600 1.2rem var(--din); margin-bottom: .25rem; color: var(--white); }
.chain strong::before { content: counter(step) " "; color: var(--blue-lt); margin-right: .2rem; }
.chain span { color: var(--silver-dim); font-size: .95rem; }
.pools td, .pools th { min-width: 7.5rem; }
.pools td:last-child { min-width: 15rem; }

.foot { background: var(--bg-deep); color: var(--silver-dim); border-top: 1px solid var(--line); box-shadow: 0 -1px 0 rgba(77, 159, 239, .12); }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 2rem 1.5rem 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 3rem; font-size: .9rem; }
@media (max-width: 52rem) { .foot-in { grid-template-columns: 1fr; } }
.foot a { color: var(--silver); }
.foot a:hover { color: #fff; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .flash, .bill::after, .bill-feed.is-live::before { animation: none; }
  .bill::after { display: none; }
  input, select, .guides a { transition: none; }
}
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; }
  .top nav, .calc-in, .more-links, .disclose { display: none; }
  .calc { grid-template-columns: 1fr; }
  .bill { position: static; clip-path: none; }
  .bill::after { display: none; }
  .hero h1 { color: #000; background: none; }
}

.ref-note { font-size: .85em; color: var(--silver-dim); }
