* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #0d1117; color: #e6edf3; font: 16px/1.5 system-ui, -apple-system, sans-serif; }
main { width: min(760px, 100%); margin: 0 auto; padding: 22px 18px 56px; }
h1 { font-size: 1.5rem; margin: 0 0 6px; }
h2 { font-size: 1.05rem; margin: 24px 0 10px; }
a { color: #58a6ff; }
code { background: #161b22; padding: 2px 6px; border-radius: 5px; font: 13px/1.4 ui-monospace, monospace; }

.hint { color: #8b949e; margin: 6px 0 14px; font-size: .92rem; }
.lede { color: #9da7b3; margin: 4px 0 20px; }
.error { background: #3a1616; border: 1px solid #f85149; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; color: #ffb4ae; }
.flash { background: #14361f; border: 1px solid #2ea043; border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; }

/* forms */
label { display: block; margin: 0 0 14px; font-size: .9rem; color: #9da7b3; }
input, textarea, button, select { font: inherit; }
input[type=email], input[type=password], input[type=text], input[type=number], textarea {
  width: 100%; margin-top: 6px; border: 1px solid #30363d; border-radius: 8px; padding: 11px 12px; background: #0d1117; color: #e6edf3; }
input:focus, textarea:focus { outline: 2px solid #2f81f7; border-color: #2f81f7; }
textarea { min-height: 42vh; resize: vertical; font: 13px/1.45 ui-monospace, monospace; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 8px; padding: 11px 16px; background: #21262d; color: #e6edf3; font-weight: 600; }
button.primary { background: #238636; border-color: #2ea043; }
button.ghost { background: #21262d; border-color: #30363d; }
button.link { background: none; border: 0; padding: 0; color: #58a6ff; font-weight: 400; }
.btn { display: inline-block; text-decoration: none; background: #2f81f7; color: #fff; border-radius: 8px; padding: 9px 16px; font-weight: 600; }

/* auth */
.auth .brand { text-align: center; margin: 8px 0 22px; }
.auth .card { margin-bottom: 16px; }
.auth button { width: 100%; margin-top: 4px; }

/* card */
.card { border: 1px solid #21262d; background: #0f141b; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.card h2 { margin-top: 0; }

/* shop header + wallet */
header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #21262d; }
.greet { font-size: 1.05rem; }
.wallet-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #0f141b; border: 1px solid #21262d; border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.wallet-bar span { display: block; color: #8b949e; font-size: .8rem; }
.wallet-bar strong { font-size: 1.35rem; }

/* steps */
.steps { counter-reset: step; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 18px; }
.steps li { counter-increment: step; flex: 1 1 200px; background: #0f141b; border: 1px solid #21262d; border-radius: 10px; padding: 12px 12px 12px 42px; position: relative; font-size: .9rem; color: #9da7b3; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: #2f81f7; color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.steps strong { color: #e6edf3; }

/* method cards */
.method-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.method .sub { color: #8b949e; font-size: .85rem; }
.method .generate { margin: 0; }
.keys-tag { border: 1px solid #30363d; color: #8b949e; border-radius: 999px; padding: 3px 12px; font-size: .8rem; white-space: nowrap; }
.keys-tag.good { border-color: #2ea043; color: #56d364; }
.note { color: #8b949e; font-size: .85rem; margin: 10px 0 0; }
.block { display: block; width: 100%; }

/* disclosures: keep secondary actions out of the way of the primary one */
details.buy-more, details.promo { margin-top: 12px; }
details.promo { border: 1px solid #21262d; border-radius: 10px; padding: 4px 14px; }
summary { cursor: pointer; color: #8b949e; font-size: .9rem; padding: 6px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '＋ '; color: #6e7681; }
details[open] summary::before { content: '－ '; }
details .inline { margin-top: 4px; }
details .inline input { width: auto; flex: 1 1 120px; }

/* inline forms */
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline input { width: auto; flex: 1 1 160px; margin-top: 0; }

/* rows / lists */
.row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.ledger, .jobs { list-style: none; padding: 0; margin: 8px 0; }
.ledger li { padding: 6px 0; border-bottom: 1px solid #161b22; color: #9da7b3; font-size: .92rem; }
.jobs li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #161b22; font-size: .9rem; }
.mono { font: 12px/1.4 ui-monospace, monospace; color: #8b949e; }
.tag { border-radius: 999px; padding: 2px 10px; font-size: .78rem; background: #21262d; color: #9da7b3; }
.tag.good { background: #14361f; color: #56d364; }
.tag.bad { background: #3a1616; color: #ffb4ae; }

/* wait / qr */
#qr { width: min(320px, 92%); margin: 16px auto 0; display: block; border-radius: 12px; background: #fff; padding: 12px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #30363d; border-top-color: #2f81f7; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.back { display: inline-block; margin-top: 14px; }
