:root {
  --page: #eef1f4;
  --surface: #ffffff;
  --header: #182430;
  --header-line: #2b3947;
  --ink: #1c2733;
  --text: #43505d;
  --muted: #788491;
  --line: #dce2e7;
  --blue: #256ba9;
  --blue-dark: #1c5689;
  --blue-soft: #e8f1f8;
  --green: #26865e;
  --green-soft: #e8f5ef;
  --red: #b54848;
  --red-soft: #faecec;
  --amber: #916c19;
  --amber-soft: #faf3df;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; color: var(--text); background: var(--page); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
code { font-family: var(--mono); }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.pool-header { border-bottom: 1px solid var(--header-line); background: var(--header); color: #fff; }
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 30px; }
.pool-brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; color: #fff; }
.pool-brand:hover { text-decoration: none; }
.pool-brand img { width: 38px; height: 38px; padding: 3px; border-radius: 6px; background: #fff; object-fit: contain; }
.pool-brand strong, .pool-brand small { display: block; }
.pool-brand strong { font-size: 16px; line-height: 1.15; }
.pool-brand small { margin-top: 4px; color: #aebbc7; font-size: 12px; }
.pool-nav { display: flex; align-items: center; gap: 22px; }
.pool-nav a { color: #d2dae1; font-size: 14px; }
.pool-nav a:hover { color: #fff; text-decoration: none; }
.online-state i { width: 7px; height: 7px; border-radius: 50%; background: #54bf89; }

main { padding: 42px 0 68px; }
.page-heading { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); align-items: end; gap: 36px; padding: 14px 0 34px; }
.page-label { display: block; color: var(--blue); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.page-heading h1, .miner-heading h1, .error-page h1 { margin: 8px 0 0; color: var(--ink); font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.page-heading p { max-width: 730px; margin: 15px 0 0; color: #5e6975; font-size: 17px; }
.endpoint-box { padding: 20px; border: 1px solid #cad4dc; border-radius: 7px; background: var(--surface); }
.endpoint-box span, .endpoint-box strong, .endpoint-box small { display: block; }
.endpoint-box span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.endpoint-box strong { margin-top: 9px; overflow-wrap: anywhere; color: var(--ink); font: 600 15px/1.45 var(--mono); }
.endpoint-box small { margin-top: 9px; color: var(--muted); font-size: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats-grid article { min-width: 0; min-height: 108px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.stats-grid span, .stats-grid strong { display: block; }
.stats-grid span { color: var(--muted); font-size: 13px; }
.stats-grid strong { margin-top: 12px; overflow: hidden; color: var(--ink); font-size: clamp(23px, 3vw, 32px); line-height: 1; text-overflow: ellipsis; }

.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-bottom: 16px; }
.panel { min-width: 0; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.two-column .panel { margin-bottom: 0; }
.panel-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; color: var(--ink); font-size: 21px; letter-spacing: -.015em; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.online-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 13px; font-weight: 650; }
.online-state.offline { color: var(--red); }
.online-state.offline i { background: var(--red); }
.plain-link, .back-link { font-size: 13px; font-weight: 650; }
.muted-label { color: var(--muted); font-size: 12px; }

.address-lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 20px; }
.address-lookup input { min-width: 0; height: 45px; padding: 0 13px; border: 1px solid #cbd4dc; border-radius: 5px; outline: none; color: var(--ink); background: #fff; font-family: var(--mono); font-size: 14px; }
.address-lookup input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37, 107, 169, .12); }
.address-lookup button, .download-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--blue); border-radius: 5px; color: #fff; background: var(--blue); cursor: pointer; font-size: 13px; font-weight: 700; }
.address-lookup button:hover, .download-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); text-decoration: none; }
.address-lookup input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 2px rgba(181, 72, 72, .11); }
.address-lookup button i { display: none; width: 14px; height: 14px; margin-right: 8px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; }
.address-lookup button.is-loading i { display: block; animation: button-spin .65s linear infinite; }
.address-lookup button:disabled { cursor: wait; opacity: .82; }
.form-error { grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 13px; }
.form-error[hidden] { display: none; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.network-list { margin: 0; padding: 7px 20px 11px; }
.network-list div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #edf0f2; }
.network-list div:last-child { border-bottom: 0; }
.network-list dt { color: var(--muted); font-size: 13px; }
.network-list dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 650; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { min-height: 130px; padding: 20px; border-right: 1px solid var(--line); counter-increment: steps; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: counter(steps); width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 700; }
.steps strong, .steps span { display: block; }
.steps strong { color: var(--ink); font-size: 15px; }
.steps span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.steps code { color: var(--blue-dark); }
.command-box { margin: 0 20px 20px; overflow: hidden; border: 1px solid #ced5db; border-radius: 5px; background: #f6f8f9; }
.command-box > div { min-height: 36px; display: flex; align-items: center; justify-content: space-between; padding-left: 13px; border-bottom: 1px solid #dce2e7; color: var(--muted); font-size: 12px; }
.command-box button { align-self: stretch; padding: 0 14px; border: 0; border-left: 1px solid #dce2e7; color: var(--blue); background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; }
.command-box > code { display: block; padding: 16px; overflow-x: auto; color: var(--ink); font-size: 13px; white-space: nowrap; }
.pool-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.pool-rules > div { min-width: 0; padding: 15px 20px; border-right: 1px solid var(--line); }
.pool-rules > div:last-child { border-right: 0; }
.pool-rules dt { color: var(--muted); font-size: 11px; }
.pool-rules dd { margin: 5px 0 0; color: var(--ink); font-size: 12px; font-weight: 650; }

.software-list article { min-height: 105px; display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.software-list article:last-child { border-bottom: 0; }
.software-badge { justify-self: start; padding: 5px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.software-badge.compatible { color: var(--green); background: var(--green-soft); }
.software-badge.upstream { color: var(--blue-dark); background: var(--blue-soft); }
.software-list h3 { margin: 0; color: var(--ink); font-size: 16px; }
.software-list p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.software-list small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.software-list small code { color: #606d78; }
.software-links { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; font-size: 13px; font-weight: 650; }

.data-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { height: 46px; padding: 0 16px; border-bottom: 1px solid #e7ebee; text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f6f8f9; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
td { color: #4a5763; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
.truncate { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.empty-row { padding: 32px 16px; color: var(--muted); text-align: center; font-size: 13px; }

.miner-heading { padding: 10px 0 30px; }
.miner-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-top: 28px; }
.miner-title h1 { font-size: clamp(32px, 5vw, 48px); }
.miner-title p { max-width: 760px; margin: 10px 0 0; overflow-wrap: anywhere; color: var(--muted); font: 14px/1.5 var(--mono); }
.miner-title > div:last-child { flex: 0 0 auto; text-align: right; }
.miner-title > div:last-child span, .miner-title > div:last-child strong { display: block; }
.miner-title > div:last-child span { color: var(--muted); font-size: 12px; }
.miner-title > div:last-child strong { margin-top: 7px; color: var(--ink); font-size: 32px; }
.miner-tables { grid-template-columns: 1.25fr .75fr; }
.balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.balance-grid > div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.balance-grid > div:last-child { border-right: 0; }
.balance-grid span, .balance-grid strong, .balance-grid small { display: block; }
.balance-grid span { color: var(--muted); font-size: 12px; }
.balance-grid strong { margin-top: 7px; overflow: hidden; color: var(--ink); font-size: 22px; text-overflow: ellipsis; }
.balance-grid small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.result-tag { display: inline-block; padding: 4px 7px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.result-tag.block { color: var(--amber); background: var(--amber-soft); }
.block-list a { min-height: 58px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.block-list a:last-child { border-bottom: 0; }
.block-list span { font-size: 12px; font-weight: 700; }
.block-list code { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; }
.block-list strong { color: var(--ink); font-size: 12px; }
.truncate.short { max-width: 150px; }
.pagination { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination a { min-width: 68px; padding: 6px 9px; border: 1px solid #cad3da; border-radius: 4px; background: #fff; text-align: center; font-weight: 650; }
.pagination a:hover { border-color: var(--blue); text-decoration: none; }
.pagination a.disabled { color: #a6aeb5; background: #f4f6f7; pointer-events: none; }
.error-page { min-height: 560px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.error-page > span { color: var(--red); font-size: 13px; font-weight: 700; }
.error-page p { max-width: 600px; margin: 16px 0 25px; color: var(--muted); }

.pool-footer { border-top: 1px solid #d4dbe1; background: #e8ecef; }
.footer-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .pool-nav { display: none; }
  .page-heading { grid-template-columns: 1fr; align-items: start; }
  .endpoint-box { max-width: 620px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column, .miner-tables { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: 1fr; }
  .balance-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .balance-grid > div:last-child { border-bottom: 0; }
  .pool-rules { grid-template-columns: repeat(2, 1fr); }
  .pool-rules > div:nth-child(2) { border-right: 0; }
  .pool-rules > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 650px) {
  .container { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 62px; }
  .pool-brand small { display: none; }
  main { padding-top: 28px; }
  .page-heading { padding-top: 4px; }
  .page-heading p { font-size: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { min-height: 92px; }
  .address-lookup { grid-template-columns: 1fr; }
  .address-lookup button { min-height: 44px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .pool-rules { grid-template-columns: 1fr; }
  .pool-rules > div, .pool-rules > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .pool-rules > div:last-child { border-bottom: 0; }
  .software-list article { grid-template-columns: 1fr; gap: 10px; }
  .software-links { align-items: flex-start; }
  .software-list .download-button { justify-self: start; }
  .miner-title { align-items: flex-start; flex-direction: column; }
  .miner-title > div:last-child { text-align: left; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}
