/* Genesis402 testnet faucet. Tokens follow genesis402.com. */
:root {
  --ink: #0e1621;
  --ink2: #26324a;
  --muted: #56637a;
  --orange: #d9631f;
  --volt: #2f7bff;
  --ok: #128a66;
  --bad: #c9362f;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --line: #d8dee8;
  --text: var(--ink);
  --text-2: var(--ink2);
  --text-muted: var(--muted);
  --link: #1f5fd6;
  --btn-bg: #b8501a;
  --btn-text: #ffffff;
  --accent: var(--orange);
  --ok-text: #0f7a5a;
  --ok-bg: #e5f5ef;
  --bad-text: var(--bad);
  --bad-bg: #fbeceb;
  --focus: #1f5fd6;
  --shadow: 0 1px 2px rgba(14, 22, 33, 0.06), 0 8px 24px rgba(14, 22, 33, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1018;
    --surface: #121a26;
    --surface-2: #19233a;
    --line: #26324a;
    --text: #e7ecf3;
    --text-2: #c6cfdc;
    --text-muted: #9aa7bb;
    --link: #6ea2ff;
    --btn-bg: #d9631f;
    --btn-text: #0e1621;
    --ok-text: #3ccf9e;
    --ok-bg: #0f2a22;
    --bad-text: #ff6b63;
    --bad-bg: #2d1414;
    --focus: #6ea2ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1018;
  --surface: #121a26;
  --surface-2: #19233a;
  --line: #26324a;
  --text: #e7ecf3;
  --text-2: #c6cfdc;
  --text-muted: #9aa7bb;
  --link: #6ea2ff;
  --btn-bg: #d9631f;
  --btn-text: #0e1621;
  --ok-text: #3ccf9e;
  --ok-bg: #0f2a22;
  --bad-text: #ff6b63;
  --bad-bg: #2d1414;
  --focus: #6ea2ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--text);
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

code,
.mono {
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  font-size: 0.92em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

/* header */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* hero */
.hero {
  padding: 40px 0 24px;
  max-width: 760px;
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
}
.lede {
  font-size: 1.08rem;
  color: var(--text-2);
}
.notice {
  display: inline-block;
  border: 1px solid var(--accent);
  border-left-width: 5px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-feature {
  border-top: 4px solid var(--accent);
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.card-head h2 {
  margin: 0;
}
.pill,
.token-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}
.pill {
  border-color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 24px;
  }
}

/* buttons */
.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: 600 1rem/1 "IBM Plex Sans", sans-serif;
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn:hover {
  filter: brightness(1.06);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--btn-bg);
}
.btn-ghost {
  appearance: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 40px;
  font: 500 0.9rem/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

/* claim form */
.claim {
  margin: 12px 0;
}
.claim label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.claim-row {
  display: flex;
  gap: 8px;
}
.claim-row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.claim-row input::placeholder {
  color: var(--text-muted);
}

/* details */
.details {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.86rem;
}
.details div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
}
.details dt {
  color: var(--text-muted);
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-2);
}

/* results that stay until closed */
.out {
  margin-top: 12px;
}
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid;
  overflow-wrap: anywhere;
}
.alert-body > p {
  margin-bottom: 4px;
}
.alert-body {
  flex: 1 1 auto;
  min-width: 0;
}
.alert-ok {
  background: var(--ok-bg);
  border-color: var(--ok-text);
  color: var(--text);
}
.alert-ok .alert-msg {
  color: var(--ok-text);
  font-weight: 600;
}
.alert-bad {
  background: var(--bad-bg);
  border-color: var(--bad-text);
  color: var(--text);
}
.alert-bad .alert-msg {
  color: var(--bad-text);
  font-weight: 600;
}
.alert-close {
  flex: 0 0 auto;
  white-space: nowrap;
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 36px;
  cursor: pointer;
  font: 500 0.85rem/1 "IBM Plex Sans", sans-serif;
}
.fix {
  margin-top: 8px;
}
.fix-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.fix ol {
  margin: 0 0 6px;
  padding-left: 1.2rem;
}

/* key/value rows with copy */
.kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.kv-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.kv .value {
  overflow-wrap: anywhere;
  background: var(--surface-2);
  padding: 6px 8px;
  border-radius: 6px;
}
.kv-secret .value {
  border: 1px dashed var(--bad-text);
}
@media (max-width: 480px) {
  .kv {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .kv-label {
    grid-column: 1 / -1;
  }
}

/* wallet steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 6px;
}
.steps li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.steps li::before {
  content: "\25CB";
  font-family: "IBM Plex Mono", monospace;
}
.steps li[data-state="doing"] {
  color: var(--text);
}
.steps li[data-state="doing"]::before {
  content: "\25D0";
  color: var(--accent);
}
.steps li[data-state="done"] {
  color: var(--text);
}
.steps li[data-state="done"]::before {
  content: "\2713";
  color: var(--ok-text);
}
.steps li[data-state="failed"] {
  color: var(--bad-text);
}
.steps li[data-state="failed"]::before {
  content: "\2715";
}
.step-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.wallet-result {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.warn {
  border-left: 4px solid var(--bad-text);
  padding: 8px 12px;
  background: var(--bad-bg);
  border-radius: 6px;
  margin-top: 10px;
}
.tx-list {
  margin: 0;
  padding-left: 1.2rem;
}

.how {
  margin-bottom: 32px;
}
.muted {
  color: var(--text-muted);
}

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
