/* Sitebound shop pages (onboarding + dashboard). Same tokens as web/landing/style.css. */
:root {
  color-scheme: light dark;
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #121417;
  --muted: #565c66;
  --line: #e2e2da;
  --accent: #0b7a5a;
  --accent-ink: #ffffff;
  --ring: rgba(11, 122, 90, 0.28);
  --err: #b42318;
  --warn: #8a5a00;
  --shadow: 0 1px 2px rgba(18, 20, 23, 0.04), 0 6px 24px rgba(18, 20, 23, 0.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 5vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f11;
    --surface: #15181b;
    --ink: #f1f2f0;
    --muted: #a3a9b0;
    --line: #25292d;
    --accent: #3fd69a;
    --accent-ink: #04150d;
    --ring: rgba(63, 214, 154, 0.32);
    --err: #ff9a90;
    --warn: #f1c56b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg);
  text-decoration: none; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); min-height: 64px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.15rem; font-weight: 650; letter-spacing: -0.03em; border-radius: 999px; }
.mark { width: 24px; height: 24px; flex: none; color: var(--ink); overflow: visible; }
.mark-dot { fill: var(--accent); }
.bar-end { display: flex; align-items: center; gap: 8px; min-width: 0; }

.page { width: 100%; max-width: 680px; margin: 0 auto; padding: clamp(8px, 3vw, 24px) var(--pad) 72px; }

.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.1; font-weight: 650; letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: anywhere; }
.lede { margin-top: 10px; color: var(--muted); max-width: 52ch; text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}
.btn:hover:not(:disabled) { box-shadow: 0 6px 20px var(--ring); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:focus-visible { outline-offset: 4px; border-radius: 999px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 0.9rem; }
.btn.danger { color: var(--err); }
.btn.done { color: var(--accent); }
.btn .icon { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 8px 4px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; border-radius: 6px; }
.link-btn:hover { color: var(--ink); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

.icon { width: 18px; height: 18px; flex: none; }
.spin { width: 16px; height: 16px; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fields */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-width: 0; height: 48px; padding: 0 16px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 1rem; /* 16px: no iOS zoom */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.input[aria-invalid="true"] { border-color: var(--err); }
.hint { font-size: 0.875rem; color: var(--muted); }
.hint.err { color: var(--err); }

/* Notices */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); border-radius: 14px;
  background: color-mix(in srgb, var(--c) 7%, var(--surface)); --c: var(--muted); font-size: 0.95rem;
}
.notice > div { min-width: 0; overflow-wrap: anywhere; }
.notice .icon { color: var(--c); margin-top: 2px; }
.notice strong { display: block; font-weight: 600; letter-spacing: -0.01em; }
.notice p + p { margin-top: 6px; }
.notice strong + * { margin-top: 3px; }
.notice.warn { --c: var(--warn); }
.notice.error { --c: var(--err); }
.notice.ok { --c: var(--accent); }
.notice a { text-decoration-thickness: 1px; }
.notice .row { margin-top: 6px; }
.notice .row .link-btn { padding-left: 0; }

/* Key/value rows with copy */
.kv { display: grid; gap: 6px; padding: 12px 14px; background: color-mix(in srgb, var(--ink) 3%, var(--surface)); border: 1px solid var(--line); border-radius: 14px; }
.kv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kv.inline { display: flex; align-items: baseline; gap: 14px; }
.kv-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kv-val { font: 0.9rem/1.5 var(--mono); overflow-wrap: anywhere; word-break: break-all; user-select: all; }

.mono { font-family: var(--mono); font-size: 0.9em; }
.code { margin: 0; padding: 16px 18px; overflow-x: auto; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); border: 1px solid var(--line); border-radius: 14px; font: 0.82rem/1.65 var(--mono); tab-size: 2; }
.code:focus-visible { outline-offset: 2px; }

/* Badges and links */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); --c: var(--muted); }
.badge.ok { --c: var(--accent); }
.badge.warn { --c: var(--warn); }
.badge.err { --c: var(--err); }
.exlink { display: inline-flex; align-items: center; gap: 4px; }
.exlink .icon { width: 13px; height: 13px; opacity: 0.7; }

/* Full-page empty / error states */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: clamp(40px, 12vw, 96px) 8px; }
.empty h2 { font-size: clamp(1.35rem, 4.6vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.2; text-wrap: balance; margin-top: 6px; }
.empty p { color: var(--muted); max-width: 46ch; text-wrap: pretty; overflow-wrap: anywhere; }
.empty .btn, .empty .row { margin-top: 12px; }

.foot { width: min(680px, 100% - 2 * var(--pad)); margin: 0 auto; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot p + p { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .spin { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

/* created payout wallet: optional backup */
.phrase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; padding: 0; list-style: none; counter-reset: w; }
.phrase li { counter-increment: w; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.phrase li::before { content: counter(w); min-width: 1.4em; font-size: 0.75rem; color: var(--muted); text-align: right; }
.phrase .mono { overflow-wrap: anywhere; user-select: all; }
.wallet-note { margin-top: 8px; }
.wallet-note .backup { display: grid; gap: 10px; margin-top: 8px; }
.wallet-note .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-link { padding: 0 2px; }
@media (max-width: 420px) { .phrase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
