@font-face { font-family: "Ronzino"; src: url("fonts/Ronzino-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("fonts/Ronzino-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("fonts/Ronzino-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("fonts/fragment-mono-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #10110f;
  --raised: #171815;
  --sunk: #0b0c0a;
  --line: #2a2b27;
  --line-strong: #3d3e39;
  --text: #edebe4;
  --muted: #8e8c84;
  --faint: #4a4a45;
  --hi: #f2cf4a;
  --hi-ink: #1a1605;
  --bad: #ff7a66;
  --ok: #8fd694;
  --sans: "Ronzino", system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
  accent-color: var(--hi);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
::selection { background: var(--hi); color: var(--hi-ink); }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 22px 24px 0;
}
.mark { display: inline-flex; align-items: center; gap: 9px; font: 500 17px/1 var(--mono); letter-spacing: -.01em; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
a.mark { text-decoration: none; }
.top nav a:hover { color: var(--text); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px 40px; }

/* ---------- intro ---------- */
.intro { padding: 64px 0 28px; max-width: 46rem; }
.intro h1 { margin: 0; font: 700 clamp(34px, 5.4vw, 60px)/1.02 var(--sans); letter-spacing: -.035em; }
.intro p { margin: 18px 0 0; max-width: 38rem; color: var(--muted); font-size: 18px; }

/* ---------- the address readout ---------- */
.readout {
  container-type: inline-size;
  margin: 8px 0 28px;
  padding: 26px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.addr-line {
  font: 400 calc(100cqi / 27) / 1.1 var(--mono);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  color: var(--faint);
  font-variant-ligatures: none;
}
.addr-line .want { color: var(--hi); }
.addr-line .want:empty { display: none; }
.addr-line .bad { color: var(--bad); text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.addr-line .mid { color: var(--faint); }
.readout.running .addr-line .mid { color: #6c6b64; }
.readout.done .addr-line { color: var(--text); }
.readout.done .addr-line .mid { color: var(--text); }
.readout.done .addr-line .want { background: var(--hi); color: var(--hi-ink); box-shadow: 0 0 0 .06em var(--hi); }
.readout-note { margin: 12px 0 0; min-height: 1.5em; color: var(--muted); font-size: 14px; }

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; }
.side { display: flex; flex-direction: column; gap: 20px; }

/* ---------- controls ---------- */
.controls { padding: 24px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset + fieldset, .actions + fieldset { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
legend { padding: 0; margin-bottom: 16px; font: 700 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
fieldset.locked { opacity: .55; }
#coin .coin-when { margin: -6px 0 16px; }

.coin-top { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
.coin-names { display: grid; gap: 12px; }
.pic {
  position: relative; display: grid; place-items: center; width: 112px; height: 112px; cursor: pointer; overflow: hidden;
  background: var(--sunk); border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 14px;
}
.pic:hover { border-color: var(--muted); }
.pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pic input:disabled { cursor: default; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic:focus-within { outline: 2px solid var(--hi); outline-offset: 2px; }

.text { display: block; }
.text + .text, .coin-top + .text, .text + .links, .links + .text { margin-top: 12px; }
.text > span:first-child { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.text small { color: var(--faint); font-size: 13px; }
.text input, .text textarea {
  width: 100%; padding: 10px 12px; font: 400 16px/1.4 var(--sans); color: var(--text);
  background: var(--sunk); border: 1px solid var(--line-strong); border-radius: 6px; outline: none; resize: vertical;
}
.text input::placeholder, .text textarea::placeholder { color: var(--faint); }
.text input:focus, .text textarea:focus { border-color: var(--hi); }
.links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.links .text { margin: 0; }
.sol-input { position: relative; display: block; max-width: 14rem; }
.sol-input input { padding-right: 52px; font-family: var(--mono); }
.sol-input i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 400 14px var(--mono); font-style: normal; color: var(--muted); }
.field + .field, .field + .toggle, .toggle + .field { margin-top: 24px; }
.label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.label output { color: var(--text); font-variant-numeric: tabular-nums; }
.fine { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.error { margin: 22px 0 0; color: var(--bad); font-size: 14px; }

.pos { display: inline-flex; padding: 3px; margin-bottom: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; }
.pos label { position: relative; cursor: pointer; }
.pos input { position: absolute; opacity: 0; }
.pos span { display: block; padding: 6px 14px; border-radius: 4px; font-size: 15px; color: var(--muted); }
.pos input:checked + span { background: var(--line-strong); color: var(--text); }
.pos input:focus-visible + span { outline: 2px solid var(--hi); outline-offset: 1px; }
.pos input:disabled + span { cursor: default; }

.box { display: block; }
.box input {
  width: 100%; padding: 14px 16px;
  font: 400 30px/1.1 var(--mono); letter-spacing: .04em;
  color: var(--hi); caret-color: var(--hi);
  background: var(--sunk); border: 1px solid var(--line-strong); border-radius: 6px;
  outline: none;
}
.box input::placeholder { color: var(--faint); }
.box input:focus { border-color: var(--hi); }
.box input.bad { border-color: var(--bad); }
.box input:disabled { opacity: .6; }

.toggle { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle .switch {
  flex: none; position: relative; width: 38px; height: 22px; margin-top: 1px;
  background: var(--line-strong); border-radius: 11px; transition: background .15s;
}
.toggle .switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  background: var(--text); border-radius: 50%; transition: transform .15s;
}
.toggle input:checked + .switch { background: var(--hi); }
.toggle input:checked + .switch::after { transform: translateX(16px); background: var(--hi-ink); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--hi); outline-offset: 2px; }
.toggle b { display: block; font-weight: 500; }
.toggle small { display: block; font-size: 13.5px; color: var(--muted); }
.toggle input:disabled ~ * { opacity: .6; }

.engines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.engine, .rig { position: relative; cursor: pointer; }
.engine input, .rig input { position: absolute; opacity: 0; }
.engine > span, .rig > span {
  display: block; height: 100%; padding: 14px 16px;
  background: var(--sunk); border: 1px solid var(--line); border-radius: 6px;
}
.engine b { display: block; font-weight: 500; margin-bottom: 4px; }
.engine small { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.engine input:checked + span, .rig input:checked + span { border-color: var(--hi); box-shadow: inset 0 0 0 1px var(--hi); }
.engine input:focus-visible + span, .rig input:focus-visible + span { outline: 2px solid var(--hi); outline-offset: 2px; }
.engine input:disabled + span, .rig input:disabled + span { opacity: .45; cursor: default; }

input[type=range] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 22px; margin: 0;
  background: transparent; cursor: pointer; --fill: 66.66%;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--hi) var(--fill), var(--line-strong) var(--fill)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-strong); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--hi); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]:disabled { opacity: .5; cursor: default; }

.actions { display: flex; gap: 10px; margin-top: 28px; }
.btn {
  font: 500 16px/1 var(--sans);
  padding: 15px 20px; cursor: pointer;
  color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 6px;
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { flex: 1; background: var(--hi); border-color: var(--hi); color: var(--hi-ink); font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: #f7da6a; border-color: #f7da6a; }
.btn.small { font-size: 14px; padding: 10px 14px; }

.unsupported { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 6px; color: var(--bad); font-size: 14px; }

/* ---------- estimate ---------- */
.estimate { padding: 22px 24px; color: var(--muted); font-size: 14.5px; }
.estimate .big { display: block; margin-bottom: 8px; font: 700 34px/1.05 var(--sans); letter-spacing: -.025em; color: var(--text); }
.estimate .big.quiet { font-size: 20px; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
.estimate b { color: var(--text); font-weight: 500; }
.estimate .switch { display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.estimate .switch button {
  margin-top: 8px; display: inline-block; padding: 8px 12px; cursor: pointer;
  font: 500 14px var(--sans); color: var(--text); background: none;
  border: 1px solid var(--line-strong); border-radius: 6px;
}
.estimate .switch button:hover { border-color: var(--hi); }

/* ---------- live stats ---------- */
.stats { padding: 20px 24px 22px; }
.stats-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.stats.running .dot { background: var(--hi); animation: pulse 1.2s ease-in-out infinite; }
.stats.done .dot { background: var(--ok); }
.stats.done .stats-head { color: var(--ok); }
@keyframes pulse { 50% { opacity: .3; } }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 16px 0 0; }
.stats-grid div { display: flex; flex-direction: column-reverse; }
.stats-grid dt { margin-top: 2px; font-size: 13px; color: var(--muted); }
.stats-grid dd { margin: 0; font: 400 26px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.luck { margin-top: 18px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.luck i { display: block; height: 100%; width: 0; background: var(--hi); transition: width .2s linear; }
.luck-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- launch ---------- */
.launch { padding: 22px 24px; border-color: var(--hi); }
.launch h2 { margin: 0 0 14px; font: 700 24px/1.1 var(--sans); letter-spacing: -.02em; }
.launch.live { border-color: var(--ok); }
.launch.live h2 { color: var(--ok); }
.value { display: flex; align-items: stretch; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.value code {
  flex: 1; min-width: 0; padding: 12px 14px;
  font: 400 15px/1.5 var(--mono); word-break: break-all;
}
.value code mark { background: var(--hi); color: var(--hi-ink); border-radius: 2px; }
.value code mark:empty { display: none; }
.copy {
  flex: none; padding: 0 16px; cursor: pointer;
  font: 500 13px var(--sans); color: var(--muted);
  background: transparent; border: 0; border-left: 1px solid var(--line);
}
.copy:hover { color: var(--text); background: var(--raised); }
.copy.ok { color: var(--ok); }
.launch-note { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); }
.launch-note b { color: var(--text); font-weight: 500; }
.launch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.launch-actions:not(:empty) { margin-top: 16px; }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- how it works ---------- */
.how { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.how h2 { margin: 0 0 22px; font: 700 26px/1 var(--sans); letter-spacing: -.02em; }
.how dl { display: grid; grid-template-columns: 13rem minmax(0, 40rem); gap: 14px 32px; margin: 0; }
.how dt { font-weight: 500; }
.how dd { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- coins launched here ---------- */
.latest { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.latest-head h2 { margin: 0; font: 700 26px/1 var(--sans); letter-spacing: -.02em; }
.latest-head a { color: var(--muted); text-decoration: none; font-size: 15px; }
.latest-head a:hover { color: var(--text); }

.coins-intro { padding-bottom: 20px; }
.coins-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin-bottom: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.coins-bar select { margin-left: 8px; padding: 6px 10px; font: 500 14px var(--sans); color: var(--text); background: var(--sunk); border: 1px solid var(--line-strong); border-radius: 6px; }

.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.coin { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; }
.coin:hover { border-color: var(--line-strong); }
.coin-img { display: block; width: 76px; height: 76px; overflow: hidden; background: var(--sunk); border-radius: 4px; }
.coin-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coin-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.coin-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.coin-head a { text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.coin-head b { font-weight: 500; }
.coin-head span { flex: none; font: 400 13px var(--mono); color: var(--muted); }
.coin-ca {
  padding: 0; text-align: left; cursor: copy; background: none; border: 0;
  font: 400 12.5px/1.4 var(--mono); color: var(--muted); word-break: break-all; font-variant-ligatures: none;
}
.coin-ca mark { background: none; color: var(--hi); }
.coin-ca mark:empty { display: none; }
.coin-ca:hover { color: var(--text); }
.coin-ca.ok, .coin-ca.ok mark { color: var(--ok); }
.coin-mkt { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); }
.coin-mkt b { color: var(--text); font-weight: 500; }
.curve { height: 3px; margin-top: auto; background: var(--line); border-radius: 2px; overflow: hidden; }
.curve i { display: block; height: 100%; background: var(--hi); }
.curve.full i { background: var(--ok); }
.coins-empty { grid-column: 1 / -1; margin: 0; padding: 28px 0; color: var(--muted); }

footer { margin-top: 56px; font-size: 13.5px; color: var(--faint); }

/* ---------- small screens ---------- */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top, .wrap { padding-left: 16px; padding-right: 16px; }
  .intro { padding-top: 40px; }
  .intro p { font-size: 16px; }
  .addr-line { font-size: calc(100cqi / 15.5); white-space: normal; word-break: break-all; line-height: 1.25; }
  .controls, .estimate, .stats, .launch { padding: 18px; }
  .links { grid-template-columns: 1fr; }
  .coin-top { grid-template-columns: 88px minmax(0, 1fr); }
  .pic { width: 88px; height: 88px; }
  .engines { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .how dl { grid-template-columns: 1fr; gap: 4px; }
  .how dd { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.launch.deposit .addr { display: none; }
.launch-note.bill { padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.launch-note.bill a { color: var(--text); }
