:root {
  --bg: #080a12;
  --surface: #10131f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5fb;
  --muted: #9299ad;
  --dim: #697084;
  --violet: #9c7cff;
  --violet-bright: #b89cff;
  --cyan: #38d9ed;
  --green: #48df9b;
  --amber: #f9bd5a;
  --red: #ff6e7c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-header, main, footer { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }

.site-header { height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; fill: none; stroke: var(--violet-bright); stroke-width: 1.5; }
.brand-mark path + path { fill: rgba(156, 124, 255, 0.18); stroke: var(--cyan); }
.brand strong { display: block; font-size: 13px; letter-spacing: 0.2em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: 0.06em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.network-label { color: var(--muted); font-size: 12px; }
.header-link { color: var(--muted); font-size: 10px; text-decoration: none; }
.header-link:hover { color: var(--text); }

.status-pill, .mini-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.025); padding: 6px 10px; color: #cfd3e1; font-size: 11px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.status-pill.is-ready { border-color: rgba(72, 223, 155, 0.25); color: var(--green); }
.status-pill.is-ready .status-dot { background: var(--green); }
.status-pill.is-paused { border-color: rgba(249, 189, 90, 0.25); color: var(--amber); }
.status-pill.is-error { border-color: rgba(255, 110, 124, 0.25); color: var(--red); }
.status-pill.is-error .status-dot { background: var(--red); }
.status-pill.is-loading .status-dot { animation: pulse 1.2s ease-in-out infinite; }

.eyebrow { margin: 0 0 7px; color: var(--violet-bright); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
h2, p { margin-top: 0; }

.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 18px 0 12px; border: 1px solid rgba(156, 124, 255, 0.2); border-radius: 11px; background: rgba(156, 124, 255, 0.055); padding: 10px 13px; }
.notice-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: rgba(156, 124, 255, 0.11); color: var(--violet-bright); font-size: 12px; font-weight: 700; }
.notice strong { display: block; margin-bottom: 2px; font-size: 12px; }
.notice p, .notice time { margin: 0; color: var(--muted); font-size: 10px; }
.notice.is-good { border-color: rgba(72, 223, 155, 0.18); background: rgba(72, 223, 155, 0.045); }
.notice.is-good .notice-icon { background: rgba(72, 223, 155, 0.1); color: var(--green); }
.notice.is-warning { border-color: rgba(249, 189, 90, 0.2); background: rgba(249, 189, 90, 0.045); }
.notice.is-warning .notice-icon { background: rgba(249, 189, 90, 0.1); color: var(--amber); }
.notice.is-danger { border-color: rgba(255, 110, 124, 0.2); background: rgba(255, 110, 124, 0.045); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.metric-card, .panel { border: 1px solid var(--line); background: var(--surface); }
.metric-card { min-height: 108px; border-radius: 12px; padding: 16px 17px; }
.metric-primary { border-color: rgba(156, 124, 255, 0.23); background: rgba(156, 124, 255, 0.075); }
.metric-card p { margin: 0 0 13px; color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; margin-bottom: 4px; font-size: 23px; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--dim); font-size: 9px; }

.dashboard-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 10px; margin-bottom: 10px; }
.panel { border-radius: 13px; padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -0.02em; }
.mini-pill.accent { color: var(--violet-bright); border-color: rgba(156, 124, 255, 0.25); }

.chain-progress { margin-bottom: 13px; border-radius: 9px; background: rgba(255, 255, 255, 0.022); padding: 14px; }
.chain-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: end; gap: 13px; }
.chain-row small, .detail-list dt, .connect-steps small, .miner-summary small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.chain-row strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.align-right { text-align: right; }
.chain-line { height: 3px; margin-bottom: 6px; border-radius: 999px; background: #242838; overflow: hidden; }
.chain-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 0.35s ease; }
.chain-progress p { margin: 9px 0 0; color: var(--muted); font-size: 9px; text-align: center; }

.detail-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detail-list div { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 42px; padding: 10px 0; border-top: 1px solid var(--line); }
.detail-list div:nth-child(odd) { padding-right: 14px; }
.detail-list div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
.detail-list dt { margin: 0; }
.detail-list dd { margin: 0; font-size: 12px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }

.connect-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.connect-steps > li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.connect-steps > li > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(156, 124, 255, 0.11); color: var(--violet-bright); font-size: 9px; font-weight: 700; }
.connect-steps > li > div { min-width: 0; }
.connect-steps small { margin-top: 1px; }
.connect-steps strong { font-size: 11px; font-weight: 550; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.copy-field { display: flex; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.14); overflow: hidden; }
.copy-field code { min-width: 0; flex: 1; padding: 7px 9px; overflow: hidden; text-overflow: ellipsis; color: #d8dbea; font-size: 10px; white-space: nowrap; }
.copy-field button { flex: 0 0 auto; border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 10px; color: var(--muted); font-size: 9px; }
.copy-field button:hover { background: rgba(156, 124, 255, 0.08); color: var(--text); }
.connect-footnote { margin: 11px 0 0 34px; color: var(--dim); font-size: 9px; line-height: 1.45; }

.miner-panel, .blocks-panel { margin-bottom: 10px; }
.miner-entry-panel { margin-bottom: 10px; }
.miner-entry-note { margin: -6px 0 0; color: var(--dim); font-size: 9px; line-height: 1.5; }
.miner-heading { align-items: center; }
.miner-search { display: flex; width: min(520px, 58%); border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(0, 0, 0, 0.13); overflow: hidden; }
.miner-search:focus-within { border-color: rgba(156, 124, 255, 0.55); }
.miner-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; padding: 9px 11px; color: var(--text); font-size: 11px; }
.miner-search input::placeholder { color: #61687a; }
.miner-search button { border: 0; background: var(--violet); padding: 0 16px; color: white; font-size: 10px; font-weight: 700; }
.miner-empty { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 68px; border: 1px dashed var(--line); border-radius: 9px; color: var(--dim); }
.miner-empty span { color: var(--violet-bright); }
.miner-empty p { margin: 0; font-size: 10px; }
.miner-result { display: grid; gap: 14px; }
.miner-summary { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 9px; }
.miner-summary > div { min-width: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.025); padding: 11px; }
.miner-summary strong { display: block; font-size: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { border-bottom: 1px solid var(--line); padding: 9px 10px; color: #737b8e; font-size: 8px; text-align: left; text-transform: uppercase; letter-spacing: 0.09em; white-space: nowrap; }
td { border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 11px 10px; color: #c6cad8; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.empty-table { padding: 28px; color: var(--dim); text-align: center; }
.status-tag { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.status-tag.confirmed, .status-tag.canonical { color: var(--green); border-color: rgba(72, 223, 155, 0.22); background: rgba(72, 223, 155, 0.05); }
.status-tag.immature, .status-tag.accepted, .status-tag.submitting { color: var(--amber); border-color: rgba(249, 189, 90, 0.22); background: rgba(249, 189, 90, 0.05); }
.status-tag.rejected, .status-tag.orphaned { color: var(--red); border-color: rgba(255, 110, 124, 0.22); background: rgba(255, 110, 124, 0.05); }
.short-hash { color: var(--muted); }
.form-error { margin: 10px 0 0; border-radius: 7px; background: rgba(255, 110, 124, 0.06); padding: 9px 11px; color: var(--red); font-size: 10px; }

.miner-dashboard-page { padding-top: 18px; }
.miner-dashboard-head { display: grid; grid-template-columns: 1fr minmax(420px, 0.8fr); align-items: end; gap: 28px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding: 18px 2px 20px; }
.miner-dashboard-head h1 { margin: 0 0 7px; font-size: 28px; line-height: 1; letter-spacing: -0.04em; }
.miner-dashboard-head > div > p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.dashboard-search { width: 100%; }
.dashboard-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dashboard-empty h2 { margin: 0 0 8px; font-size: 17px; }
.dashboard-empty > p:last-child { max-width: 520px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.dashboard-error { border-color: rgba(255, 110, 124, 0.22); background: rgba(255, 110, 124, 0.05); color: var(--red); font-size: 11px; }
.miner-dashboard-content { display: grid; gap: 10px; }
.wallet-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 13px 16px; }
.wallet-strip > div { min-width: 0; }
.wallet-strip .eyebrow { margin-bottom: 4px; }
.wallet-address { display: block; overflow: hidden; text-overflow: ellipsis; color: #cfd3e1; font-size: 10px; white-space: nowrap; }
.balance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.balance-card { min-height: 112px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px 17px; }
.balance-card.balance-primary { border-color: rgba(156, 124, 255, 0.25); background: rgba(156, 124, 255, 0.075); }
.balance-card p { margin: 0 0 14px; color: var(--muted); font-size: 10px; }
.balance-card strong { display: block; margin-bottom: 5px; font-size: 19px; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.balance-card small { color: var(--dim); font-size: 8px; }
.miner-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.miner-kpi-grid article { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--line); }
.miner-kpi-grid article:last-child { border-right: 0; }
.miner-kpi-grid span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.07em; }
.miner-kpi-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-wide-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 10px; }
.account-list { margin: 0; }
.account-list div { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 37px; border-top: 1px solid var(--line); }
.account-list dt { color: var(--muted); font-size: 9px; }
.account-list dd { margin: 0; font-size: 10px; font-weight: 650; text-align: right; }
.placeholder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.placeholder-panel { min-height: 190px; }
.placeholder-state { display: flex; min-height: 105px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 9px; padding: 20px; text-align: center; }
.placeholder-state strong { margin-bottom: 7px; font-size: 11px; }
.placeholder-state p { max-width: 460px; margin: 0; color: var(--dim); font-size: 9px; line-height: 1.55; }
.connection-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.connection-summary h2 { margin: 0 0 7px; color: var(--cyan); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 15px; font-weight: 600; }
.connection-summary > div > p:last-child { margin: 0; color: var(--muted); font-size: 9px; }
.link-button { flex: 0 0 auto; text-decoration: none; }

.pool-identity { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 14px 18px; }
.pool-identity .eyebrow { margin-bottom: 5px; }
.pool-identity code { display: block; max-width: 75vw; overflow: hidden; text-overflow: ellipsis; color: #c8ccda; font-size: 10px; white-space: nowrap; }
.outline-button { border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; padding: 8px 11px; color: #afb5c7; font-size: 9px; }
.outline-button:hover { border-color: rgba(156, 124, 255, 0.45); color: var(--text); }

footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #5e6578; font-size: 9px; }
footer b { color: #888fa2; font-weight: 550; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; transform: translateY(15px); border: 1px solid rgba(72, 223, 155, 0.28); border-radius: 8px; background: #121a1b; padding: 9px 12px; color: var(--green); font-size: 10px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.75); } }

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .miner-heading { align-items: stretch; flex-direction: column; }
  .miner-search { width: 100%; }
  .miner-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .site-header, main, footer { width: min(100% - 24px, 1220px); }
  .site-header { height: 60px; }
  .network-label { display: none; }
  .notice { grid-template-columns: auto 1fr; }
  .notice time { grid-column: 2; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 100px; padding: 14px; }
  .metric-card strong { font-size: 20px; }
  .panel { border-radius: 11px; padding: 16px; }
  .panel-heading { margin-bottom: 16px; }
  .chain-row { grid-template-columns: 75px 1fr 75px; gap: 8px; }
  .chain-row strong { font-size: 14px; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list div:nth-child(odd), .detail-list div:nth-child(even) { padding-inline: 0; border-left: 0; }
  .miner-summary { grid-template-columns: 1fr; }
  .pool-identity { align-items: flex-start; flex-direction: column; }
  .pool-identity code { max-width: 88vw; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
@media (max-width: 430px) {
  .brand small { display: none; }
  .miner-search { flex-direction: column; border-radius: 9px; }
  .miner-search button { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
