:root {
  --paper: #ffffff;
  --band: #ffffff;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.72);
  --faint: rgba(17, 17, 17, 0.55);
  --line: rgba(17, 17, 17, 0.12);
  --red: #ff060a;
  --red-deep: #e10509;
  --sheet: #ffffff;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Poppins, "PingFang SC", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, p, dl, dd, dt {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}

.skip:focus {
  top: 12px;
  z-index: 20;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.brand strong {
  font-weight: 600;
}

.brand-tron {
  color: var(--red);
  font-weight: 600;
}

.mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 22px;
}

nav a {
  font-size: 15px;
  font-weight: 500;
}

nav a:hover {
  color: var(--red);
}

.menu {
  display: none;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
}

.hero {
  padding: 42px 0 28px;
}

.meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 36px;
  align-items: end;
}

h1, h2, .totals-main strong, .end p {
  font-family: Poppins, "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.7rem, 5.4vw, 4.5rem);
  line-height: 1.02;
  max-width: 11ch;
}

h1 span {
  color: var(--red);
}

.hero-note p + p {
  margin-top: 12px;
}

.verify-wallet {
  margin-top: 14px;
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
}

.hero-note .btn {
  margin-top: 18px;
}

.quiet {
  color: var(--faint);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover {
  background: var(--red);
}

.btn-line {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.35);
}

.btn-line:hover {
  background: transparent;
  color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red);
}

.check-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: end;
  max-width: 720px;
  margin-top: 18px;
}

.check-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.check-form .btn {
  margin-bottom: 1px;
}

.check-form .quiet {
  grid-column: 1 / -1;
}

.check-result {
  max-width: 720px;
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}

.check-result[hidden] {
  display: none;
}

.check-status {
  margin: 10px 0 4px;
  font-weight: 600;
}

.check-result dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.check-result dt {
  color: var(--muted);
}

.check-result dd {
  margin: 0;
  text-align: right;
}

.check-status.is-ok {
  color: var(--red);
}

.check-status.is-bad {
  color: var(--red-deep);
}

.blotter {
  padding: 16px 0 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.blotter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.blotter-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr 1.15fr;
  gap: 12px;
}

.blotter-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blotter-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 1.2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.blotter-grid div:last-child strong {
  color: var(--red);
}

.blotter-note {
  margin-top: 12px;
  max-width: 78ch;
}

.block {
  padding: 72px 0 8px;
}

h2 {
  max-width: 16ch;
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.02;
}

.intro, .example {
  max-width: 68ch;
  color: var(--muted);
}

.intro {
  margin: 10px 0 22px;
}

.rows div {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.rows div:last-child {
  border-bottom: 1px solid var(--line);
}

.rows dt {
  font-weight: 600;
}

.rows dd, .count p, .faq p {
  color: var(--muted);
  max-width: 62ch;
}

.count {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.count li {
  counter-increment: step;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.count li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: Poppins, "PingFang SC", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0;
}

.count h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.formula {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  border-top: 2px solid var(--ink);
}

.fields {
  display: grid;
  gap: 16px;
  padding: 18px 28px 8px 0;
}

.fields label {
  display: grid;
  gap: 6px;
  font-weight: 560;
}

.fields small, .formula-mini {
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
}

input {
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

input:focus {
  outline: none;
  border-bottom-color: var(--red);
  border-bottom-width: 2px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
}

.totals {
  padding: 18px 0 18px 28px;
  border-left: 1px solid var(--line);
}

.totals-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.totals-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.totals-main strong {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.totals-main span, .totals-usd {
  color: var(--muted);
}

.totals dl {
  margin: 16px 0 0;
}

.totals dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.totals dt {
  color: var(--muted);
}

.formula-mini {
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  padding: 0 12px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 14px 16px 14px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

td:first-child {
  font-weight: 600;
}

tr.is-active td {
  background: #fff;
}

tr.is-active td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
  padding-left: 10px;
}

.example {
  margin-top: 16px;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "Open";
  float: right;
  color: var(--red);
  font-weight: 500;
  font-size: 14px;
}

.faq details[open] summary::after {
  content: "Close";
}

.faq p {
  margin: 0 0 14px;
}

.note-bad {
  color: var(--red);
}

.note-ok {
  color: var(--red);
}

.end {
  margin-top: 56px;
  background: #fff;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.end-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 22px 0;
}

.end p {
  max-width: 22ch;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.end a {
  color: var(--red);
  font-weight: 600;
  white-space: nowrap;
}

.end a:hover {
  text-decoration: underline;
}

.foot {
  padding: 28px 0 48px;
}

.foot-row {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
}

.foot p {
  color: var(--muted);
  font-size: 14px;
}

.foot strong {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

::selection {
  background: var(--red);
  color: #fff;
}

@media (max-width: 840px) {
  .menu {
    display: inline-flex;
    margin-left: auto;
  }

  nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    gap: 0;
    padding: 4px 20px 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
  }

  nav.is-open {
    display: flex;
  }

  nav a {
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }

  .hero-grid,
  .sheet,
  .rows div,
  .count,
  .foot-row,
  .end {
    grid-template-columns: 1fr;
  }

  .end-inner {
    align-items: start;
    flex-direction: column;
  }

  .blotter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .totals {
    padding: 8px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .fields {
    padding-right: 0;
  }

  .check-form {
    grid-template-columns: 1fr;
  }

  .check-form .btn {
    width: 100%;
  }

  h1 {
    max-width: 11ch;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1040px, calc(100% - 28px));
  }

  .block {
    padding-top: 52px;
  }

  th:last-child,
  td:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
