:root {
  color-scheme: dark;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  --bg: #07151b;
  --panel: #10242b;
  --ink: #f4f3eb;
  --muted: #afbfbd;
  --gold: #edcc87;
  --mint: #97dacb;
  --line: #45605e;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 15% 12%, #24655e2b, transparent 44%),
    radial-gradient(ellipse at 84% 27%, #bc94401b, transparent 42%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.shell { width: min(1080px, calc(100% - 56px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 1;
  inset: 12px auto auto 12px;
  transform: translateY(-180%);
  padding: 10px 16px;
  background: var(--gold);
  color: #101b1d;
  font-weight: 650;
}
.skip-link:focus { transform: none; }
.topbar { border-bottom: 1px solid #9cb9ac2d; }
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 83px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { object-fit: contain; }
.brand span {
  color: var(--gold);
  font: 700 24px Georgia, serif;
  letter-spacing: .12em;
}
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 8px 12px; }
.language-picker { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .83rem; }
.language-picker select { min-height: 40px; width: auto; max-width: 115px; padding-inline: 7px; }
.topbar .topbar-content { flex-wrap: wrap; padding-block: 8px; }
#tracking-entry, #tracking-link, #wallet-name, #miner-address { direction: ltr; unicode-bidi: isolate; }
.tracking-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 10px;
  background: #162d33;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 630;
}
.tracking-toggle:hover, .tracking-toggle.is-active { color: var(--gold); border-color: #94774d; }
.test-label {
  padding: 4px 10px;
  border: 1px solid #94774d;
  border-radius: 6px;
  color: #f3d79e;
  font-size: .78rem;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: start;
  gap: clamp(34px, 6vw, 86px);
  padding-block: clamp(36px, 8.2vw, 115px) 56px;
}
.introduction { padding-top: 24px; }
h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -.05em;
  line-height: 1.03;
  font-weight: 660;
}
h1 em {
  display: block;
  margin-top: .18em;
  color: var(--gold);
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.065em;
}
.introduction > p { margin-top: 20px; color: var(--muted); max-width: 370px; }
.steps {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 29px 0 24px;
  color: var(--muted);
  font-size: .93rem;
}
.steps li { display: flex; align-items: center; gap: 10px; }
.steps li::before { content: ""; width: 9px; height: 9px; border: 1px solid #6d817c; border-radius: 50%; }
.steps li.current { color: var(--gold); font-weight: 650; }
.steps li.current::before { background: var(--gold); border-color: var(--gold); }
.steps li.done { color: var(--mint); }
.steps li.done::before { background: var(--mint); border-color: var(--mint); }
.introduction .test-notice { color: #e8c88c; font-size: .85rem; }
.checkout {
  min-width: 0;
  background: var(--panel);
  border: 1px solid #a08c586e;
  border-radius: 19px;
  box-shadow: 0 22px 50px #0005;
  overflow: hidden;
}
.checkout-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #adc3b82b;
  background: #10282e;
}
.checkout h2 { font-size: 1.22rem; font-weight: 650; }
.host-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
}
.host-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.host-state[data-state="online"] { color: var(--mint); }
.host-state[data-state="offline"] { color: #ffaca0; }
.checkout-content { padding: 22px 24px 24px; }
form { display: grid; gap: 8px; }
form label { color: #e0ebe1; font-size: .92rem; font-weight: 600; }
form label:not(:first-child) { margin-top: 10px; }
.order-plan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.order-plan > div { display: grid; gap: 8px; min-width: 0; }
.capacity-state { color: var(--muted); font-size: .83rem; }
.capacity-state[data-full="true"] { color: var(--gold); }
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #091a21;
  color: var(--ink);
  padding: 0 12px;
}
input::placeholder, textarea::placeholder { color: #9aada8; }
textarea { padding-block: 10px; resize: vertical; }
#batch-wallet-names, #batch-tracking-link { direction: ltr; text-align: left; }
#batch-tracking-link-box { margin-block-start: 12px; }
.wallet-fields, .batch-members { display: grid; gap: 8px; }
.checkout-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block-end: 14px; }
.checkout-mode [aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: #42341d; }
.batch-quote-detail { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.batch-quote-detail li, .batch-member {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1e27;
}
.batch-member { display: grid; gap: 8px; }
.batch-member-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 10px; }
.batch-member-name { overflow-wrap: anywhere; }
.batch-member-cost { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .82rem; }
.batch-member-status { color: var(--mint); font-size: .82rem; }
.batch-member .wallet-connect { margin-block-start: 2px; }
.batch-member .actions .button { text-align: center; }
.examples { color: var(--muted); font-size: .8rem; }
.examples > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.examples button {
  padding: 4px 7px;
  color: var(--mint);
  background: #0c2529;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.price {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin: 10px 0;
  padding: 11px 0;
  border-bottom: 1px solid #adc3b82b;
  color: var(--muted);
  font-size: .88rem;
}
.price strong { color: var(--gold); font-size: 1.05rem; text-align: right; }
.quote-level { margin: 5px 0; color: var(--muted); font-size: .84rem; }
.price-result { text-align: right; overflow-wrap: anywhere; }
.price-floor {
  display: grid;
  gap: 4px;
  margin: 0 0 7px;
  padding: 13px 15px;
  border: 1px solid #c69c50;
  border-inline-start-width: 4px;
  border-radius: 8px;
  background: #382717;
  color: #fff0d3;
  overflow-wrap: anywhere;
}
.price-floor strong { color: #f9d591; font-size: 1.125rem; line-height: 1.35; }
.price-floor span { font-size: .94rem; line-height: 1.5; }
.order-panel .price-floor { margin-bottom: 17px; }
.renewal-term {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #162d33;
}
.renewal-term > p { color: var(--gold); font-size: .91rem; font-weight: 630; }
.renewal-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.renewal-dates dt { color: var(--muted); font-size: .76rem; }
.renewal-dates dd { margin: 2px 0 0; font-size: .87rem; overflow-wrap: anywhere; }
.renewal-state { margin-top: 15px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #ecce8d;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}
.button.primary { color: #1c2118; background: linear-gradient(113deg, #f2d79c, #dfb361); }
.button.primary:not(:disabled):hover { background: #f3d99d; }
.button.secondary { border-color: var(--line); color: var(--ink); background: #173037; }
.button.secondary:not(:disabled):hover { background: #214047; }
.button:disabled { opacity: .6; }
.order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px 16px;
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-bottom: 1px solid #adc3b82b;
}
.order-summary div { min-width: 0; }
.order-summary dt { color: var(--muted); font-size: .8rem; }
.order-summary dd { margin: 2px 0 0; color: var(--ink); font-weight: 620; overflow-wrap: anywhere; }
.order-state h3 { color: var(--gold); font-size: 1.03rem; }
.order-state p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.order-state .expiry { color: var(--mint); }
.invoice-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 14px 0 0;
  padding: 9px 12px;
  border: 1px solid #94774d;
  border-radius: 7px;
  background: #30291d;
  color: #f3d79e;
}
.invoice-total dt { font-size: .86rem; }
.invoice-total dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.payment-test-note { margin: 8px 0 0; color: var(--muted); font-size: .875rem; }
.payment-recipient { display: grid; gap: 8px; margin-block: 10px; }
.payment-recipient dl { margin: 0; display: grid; gap: 8px; }
.payment-recipient dt { color: var(--muted); font-size: .83rem; }
.payment-recipient dd { margin: 2px 0 0; }
.payment-recipient code { display: block; text-align: left; overflow-wrap: anywhere; user-select: all; }
.payment-recipient button { justify-self: start; }
.payment-window { margin: 0; color: var(--gold); font-size: .85rem; }
.payment-confirmation-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid #8a6935;
  border-radius: 8px;
  background: #362b1b;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 600;
}
.wallet-connect {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid #7d9b934e;
  border-radius: 10px;
  background: #0b2027;
}
.wallet-qr { display: grid; justify-items: center; gap: 10px; margin: 0; text-align: center; }
.wallet-qr img { display: block; width: min(256px, 100%); height: auto; border-radius: 6px; background: #fff; }
.wallet-qr figcaption { color: var(--muted); font-size: .83rem; }
.wallet-open { justify-content: center; }
.wallet-connect-options { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.wallet-connect-options .button { padding-inline: 10px; font-size: .82rem; }
.actions { display: grid; gap: 8px; margin-top: 16px; }
#tracking-form .button { margin-top: 8px; }
.tracking-help { color: var(--muted); font-size: .84rem; }
#follow-existing-order { width: 100%; margin-top: 8px; }
.tracking-actions { display: grid; gap: 8px; margin-top: 10px; }
#tracking-link-box label { display: block; margin-bottom: 4px; font-size: .83rem; }
#tracking-link-box input { min-height: 38px; font-size: .78rem; }
#tracking-link-box p { margin-top: 5px; color: var(--muted); font-size: .78rem; }
.wallet-info { margin-top: 22px; padding-top: 17px; border-top: 1px solid #adc3b82b; }
.wallet-info-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.wallet-info-header h3 { font-size: .98rem; }
.wallet-data-source { color: #edcc87; font-size: .72rem; }
.wallet-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.wallet-metrics > div {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #adc3b82b;
  border-radius: 7px;
  background: #0b2027;
}
.wallet-metrics .address-row, .wallet-metrics .last-reward { grid-column: 1 / -1; }
.wallet-metrics dt { color: var(--muted); font-size: .74rem; }
.wallet-metrics dd { margin: 3px 0 0; font-size: .89rem; font-weight: 580; overflow-wrap: anywhere; }
.wallet-metrics .balance-metric dd { color: #91e6ae; font-weight: 670; font-variant-numeric: tabular-nums; }
.wallet-metrics .balance-total { background: #112c28; border-color: #41855a; }
.address-row dd, .last-reward dd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
#miner-address { font-family: ui-monospace, monospace; }
.copy-address {
  color: var(--mint);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #142c33;
  padding: 0 8px;
  min-height: 26px;
  font-size: .72rem;
}
.copy-address:hover { background: #214047; }
.last-reward time, .wallet-observed { color: var(--muted); font-size: .72rem; font-weight: 400; }
.wallet-observed { margin-top: 9px; }
.reward-history { margin-top: 21px; padding-top: 15px; border-top: 1px solid #adc3b82b; }
.reward-history-header, .reward-history-rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
}
.reward-history-header h3 { font-size: .98rem; }
.reward-history .button { min-height: 36px; padding: 6px 10px; font-size: .82rem; }
#reward-history-status { color: var(--muted); font-size: .83rem; margin-top: 7px; }
.reward-history-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.reward-history-rows li { padding: 9px 3px; border-bottom: 1px solid #adc3b82b; }
.reward-history-rows time { color: var(--muted); font-size: .8rem; }
.reward-history-rows strong { color: var(--mint); font-size: .86rem; overflow-wrap: anywhere; }
.reward-history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.message { margin-top: 13px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: .87rem; }
.error { border-color: #885f58; background: #321f20; color: #ffd4ce; }
.notice { background: #0d2826; color: var(--mint); }

@media (max-width: 720px) {
  .shell { width: min(520px, calc(100% - 30px)); }
  .topbar-content { min-height: 65px; }
  .brand img { width: 40px; height: 40px; }
  .brand span { font-size: 20px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-top: 21px; }
  .introduction { padding-top: 0; }
  .steps { margin-block: 17px 0; gap: 6px; }
  .introduction .test-notice { margin-top: 12px; }
  .checkout-content, .checkout-header { padding-inline: 17px; }
}
