/* Shared design system for the freemium tools.
   Light, quiet, document-like. One accent, thin rules, no decoration. */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --ok: #0f7b5f;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --bad: #b42318;
  --bad-soft: #fef3f2;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 32px -12px rgba(15, 23, 42, 0.16);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 44px; line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: 27px; line-height: 1.2; letter-spacing: -0.025em; }
h3 { font-size: 17px; line-height: 1.35; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #dbeafe; }

.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand svg { color: var(--ink); }
.brand .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 1px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .nav-cta {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.nav .nav-cta:hover { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px 4px 7px;
}
.eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #1e293b; }
.btn-primary:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #fff; cursor: not-allowed; }
.btn-ghost { background: var(--bg); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 8px 10px; }
.btn-quiet:hover { background: var(--bg-soft); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-icon { padding: 7px; border-radius: 8px; }
.link-quiet { color: var(--muted); font-size: 13.5px; }
.link-quiet:hover { color: var(--ink); }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chip:hover { background: var(--bg-soft); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
  white-space: nowrap;
}
.badge-ok { color: var(--ok); background: var(--ok-soft); border-color: #cdeadd; }
.badge-warn { color: var(--warn); background: var(--warn-soft); border-color: #f3e1c3; }
.badge-bad { color: var(--bad); background: var(--bad-soft); border-color: #f6d5d1; }
.badge-pro { color: var(--ink); background: var(--bg-soft); border-color: var(--line); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 84px;
  padding: 34px 0 46px;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
.site-footer .links { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

.toast-zone { position: fixed; left: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.18s ease-out;
  max-width: 380px;
}
.toast.bad { background: #fff; color: var(--bad); border: 1px solid #f6d5d1; box-shadow: var(--shadow-lg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 90;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: min(460px, 100%);
  box-shadow: 0 24px 64px -16px rgba(15, 23, 42, 0.32);
  border: 1px solid var(--line);
  overflow: hidden;
}
.modal-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 14px 22px 4px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; }
.close-x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.close-x:hover { background: var(--bg-soft); color: var(--ink); }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.notice svg { flex: none; margin-top: 2px; color: var(--muted); }

@media (max-width: 860px) {
  .wrap { width: calc(100% - 32px); }
  h1 { font-size: 32px; letter-spacing: -0.03em; }
  h2 { font-size: 23px; }
  .nav { gap: 14px; }
  .nav a:not(.nav-cta) { display: none; }
  .site-header .wrap { height: 56px; }
  .site-footer { margin-top: 56px; }
  .toast-zone { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

/* Unlock dialog */
.pay-amount { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.pay-amount > span:first-child { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.pay-address {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  border: 1px solid var(--line); background: var(--bg-soft); border-radius: 9px;
  padding: 8px 8px 8px 11px;
}
.pay-address code { overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 0; font-size: 12px; }
.pay-steps { margin: 14px 0 0; counter-reset: step; }
.pay-steps li {
  counter-increment: step; position: relative; padding: 0 0 8px 26px;
  font-size: 13.2px; color: var(--ink-2);
}
.pay-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 10.5px; color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.unlock-error { color: var(--bad); margin-top: 8px; font-size: 12.8px; line-height: 1.5; }
.export-row { display: flex; gap: 8px; margin-top: 16px; }
.export-row .btn { flex: 1; }
