/* apayable landing styles — hand-written, served by the Go app (no runtime
   Tailwind CDN, which caused scroll jank). Kept small and dependency-free. */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #6366f1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; max-width: 64rem; margin: 0 auto; }
.brand { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

.hero { text-align: center; padding: 4rem 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.hero p { max-width: 42rem; margin: 1.25rem auto 0; font-size: 1.125rem; color: var(--muted); }
.hero .cta { margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 500;
  padding: 0.75rem 1.5rem; border-radius: 0.5rem; border: 0; cursor: pointer;
  transition: background-color 0.12s ease;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn-block { width: 100%; padding: 0.625rem 1rem; }

.btn:disabled { opacity: 0.65; cursor: not-allowed; }
/* Loading state: hide the label and show a spinner (used while a file uploads). */
.btn.loading { color: transparent; pointer-events: none; position: relative; opacity: 0.85; }
.btn.loading:hover { background: var(--accent); }
.btn.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Square icon-only buttons (download / delete on catalog cards). */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; padding: 0;
  background: var(--card); color: #475569;
  border: 1px solid var(--line); border-radius: 0.5rem; cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.icon-btn:hover { background: #f1f5f9; color: #0f172a; }
.icon-btn svg { width: 1.1rem; height: 1.1rem; display: block; }
.icon-btn.icon-danger:hover { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.features { display: grid; gap: 1.5rem; grid-template-columns: 1fr; grid-auto-rows: 1fr; padding-bottom: 4rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; flex-direction: column; background: var(--card); border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.feature .card-actions { margin-top: auto; padding-top: 0.75rem; }
.feature h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.feature p { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); }

.signup { max-width: 28rem; margin: 0 auto; padding-bottom: 6rem; }
.panel { background: var(--card); border-radius: 1rem; padding: 2rem; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.panel h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.panel .sub { margin: 0.25rem 0 1.5rem; color: var(--muted); }
.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.field input {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.5rem;
  font: inherit; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25); }
.fineprint { text-align: center; font-size: 0.75rem; color: #64748b; margin-top: 0.75rem; }

.plans { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.plans legend { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; padding: 0; }
.plan { display: flex; align-items: flex-start; gap: 0.625rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; padding: 0.75rem; cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.plan:hover { border-color: var(--accent); }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25); }
.plan input { margin-top: 0.2rem; }
.plan-body { display: flex; flex-direction: column; gap: 0.15rem; }
.plan-head { display: flex; align-items: baseline; gap: 0.5rem; }
.plan-price { font-size: 0.8125rem; color: var(--accent); font-weight: 600; }
.plan-feat { font-size: 0.8125rem; color: var(--muted); }

.field select {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.5rem;
  font: inherit; color: var(--ink); background: #fff;
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25); }

table.preview { border-collapse: collapse; width: 100%; font-size: 0.8125rem; }
table.preview th, table.preview td {
  border: 1px solid var(--line); padding: 0.35rem 0.5rem; text-align: left; white-space: nowrap;
}
table.preview th { background: #f1f5f9; font-weight: 600; }

.note { text-align: center; max-width: 36rem; margin: 0 auto; padding: 6rem 1.5rem; }
.note h1 { font-size: 1.875rem; font-weight: 700; }
.note p { color: var(--muted); }
.addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 2rem 0; text-align: center; font-size: 0.875rem; color: #64748b; }
