/* ============================================================
   TinyProducts design system
   Warm paper + vermilion accent, mono prices ("auction ticket").
   Shape rule: cards 14px, inputs 10px, buttons pill, modal 20px.
   ============================================================ */

:root {
  --bg: #f6f5f2;
  --surface: #fdfdfb;
  --surface-2: #efede8;
  --ink: #1a1917;
  --ink-soft: #55524c;
  --muted: #8a867d;
  --line: #e3e0d9;
  --accent: #e8480f;
  --accent-strong: #c93c08;
  --accent-soft: #fdeae1;
  --accent-ink: #a33204;
  --success: #15803d;
  --success-soft: #e3f3e9;
  --danger: #c53030;
  --radius-card: 14px;
  --radius-input: 10px;
  --radius-pill: 999px;
  --radius-modal: 20px;
  --shadow-card: 0 1px 2px rgba(26, 25, 23, 0.05), 0 8px 24px -12px rgba(26, 25, 23, 0.16);
  --shadow-modal: 0 40px 80px -20px rgba(0, 0, 0, 0.35);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #141312;
  --surface: #1c1a18;
  --surface-2: #24221f;
  --ink: #f1efea;
  --ink-soft: #b8b3a9;
  --muted: #8b867c;
  --line: #2b2925;
  --accent: #ff6a33;
  --accent-strong: #ff7d4d;
  --accent-soft: #2e1a10;
  --accent-ink: #ffa17e;
  --success: #34d399;
  --success-soft: #123326;
  --danger: #fca5a5;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, p { margin: 0; }

button {
  font-family: inherit;
  color: inherit;
}

img { display: block; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle paper grain, fixed so it never repaints on scroll */
.grain {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
  line-height: 1;
  padding-top: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-name em {
  font-style: normal;
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), border-color 0.18s, color 0.18s, background 0.18s;
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.icon-btn:active { transform: scale(0.94); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease-out), background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
}

.btn:active { transform: scale(0.97); }

.btn i { font-size: 1.05em; }

.btn-sm { padding: 10px 16px; font-size: 14px; }

.btn-lg { padding: 16px 24px; font-size: 16px; }

.btn-block { width: 100%; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn-accent:hover { background: var(--accent-strong); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s var(--ease-out);
}

.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-ghost:active { transform: scale(0.98); }

.link-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.link-btn:hover { color: var(--ink); }

.nav-money {
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink-soft);
}

.nav-money:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav-money { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 32px;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.trust-line {
  font-size: 13px;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.6;
}

/* Board peek panel: a real mini version of the board */
.peek {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transform: rotate(0.6deg);
  transition: transform 0.35s var(--ease-out);
}

.peek:hover { transform: rotate(0deg); }

.peek-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.peek-title { font-weight: 700; font-size: 15px; }

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 7px;
  vertical-align: middle;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  animation: live-pulse 2.4s ease-out infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

.peek-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.peek-list { display: flex; flex-direction: column; }

.peek-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.peek-row:last-child { border-bottom: 0; }

.peek-row:hover { background: var(--surface-2); }

.peek-row:active { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }

.peek-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
}

.peek-info { min-width: 0; }

.peek-domain {
  display: block;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peek-clicks {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.peek-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
}

/* ---------- Stats strip ---------- */

.stats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 8px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat:first-child { padding-left: 0; }

.stat:last-child { padding-right: 0; }

.stat:not(:first-child) { border-left: 1px solid var(--line); }

.stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- How it works ---------- */

.how {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.how-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.step {
  padding: 4px 32px;
}

.step:first-child { padding-left: 0; }

.step:last-child { padding-right: 0; }

.step:not(:first-child) { border-left: 1px solid var(--line); }

.step h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }

.step p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* ---------- Tiers: the more you pay, the more you get ---------- */

.tiers {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.tiers h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 8px;
}

.tiers-sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.tier-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-modal);
  overflow: hidden;
  background: var(--surface);
}

.tier {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier:not(:first-child) { border-left: 1px solid var(--line); }

.tier-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.tier-name--boosted { color: var(--accent-ink); }

.tier-name--featured, .tier-name--spotlight { color: var(--accent); }

.tier-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-ink);
}

.tier-perk {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Board ---------- */

.board {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.board-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.board-head h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.board-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.sort {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}

.sort-btn {
  border: 0;
  background: transparent;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.sort-btn:hover { color: var(--ink); }

.sort-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26, 25, 23, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 16px;
}

/* ---------- Product card ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(26, 25, 23, 0.03);
  transition: transform 0.22s var(--ease-out), border-color 0.22s, box-shadow 0.22s;
  animation: cardIn 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-card);
}

.card:active { transform: translateY(-1px) scale(0.99); }

.card.flash {
  animation: cardIn 0.5s var(--ease-out), cardFlash 1.5s var(--ease-out);
}

@keyframes cardFlash {
  0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 transparent; background: var(--surface); }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-input);
  background: var(--surface-2);
}

.card-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.card-domain {
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-clicks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-clicks i { font-size: 14px; color: var(--accent); }

.card-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.sample-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: lowercase;
}

/* Rank circle: rank = money, updated live. Top 3 get medal colors. */

.icon-wrap { position: relative; }

.rank {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  padding-top: 1px;
}

.rank--1 { background: #e8b339; color: #241a02; }

.rank--2 { background: #b9bec6; color: #1c2026; }

.rank--3 { background: #c47a4a; color: #241107; }

/* Tier card variants */

.card--boosted {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.card--featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), 0 1px 2px rgba(26, 25, 23, 0.03);
}

.card--spotlight {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 55%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent), 0 1px 2px rgba(26, 25, 23, 0.03);
  padding: 22px;
}

.card--spotlight .card-icon { width: 52px; height: 52px; }

.card--spotlight .card-domain { font-size: 17px; }

.card--spotlight .card-desc { font-size: 14px; }

.tier-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.tier-chip--boosted {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.tier-chip--featured {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.tier-chip--spotlight {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- Empty state ---------- */

.empty {
  text-align: center;
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-modal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-tile {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--muted);
  margin-bottom: 8px;
}

.empty h3 { font-size: 22px; letter-spacing: -0.01em; }

.empty p { font-size: 15px; color: var(--ink-soft); max-width: 38ch; }

.empty .btn { margin-top: 10px; }

/* ---------- Board loading state ---------- */

.container {
  --uib-size: 40px;
  --uib-color: var(--accent);
  --uib-speed: 2s;
  --uib-bg-opacity: 0;
  height: var(--uib-size);
  width: var(--uib-size);
  transform-origin: center;
  animation: rotate var(--uib-speed) linear infinite;
  will-change: transform;
  overflow: visible;
}

.car {
  fill: none;
  stroke: var(--uib-color);
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: stretch calc(var(--uib-speed) * 0.75) ease-in-out infinite;
  will-change: stroke-dasharray, stroke-dashoffset;
  transition: stroke 0.5s ease;
}

.track {
  fill: none;
  stroke: var(--uib-color);
  opacity: var(--uib-bg-opacity);
  transition: stroke 0.5s ease;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

@keyframes stretch {
  0% {
    stroke-dasharray: 0, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 75, 150;
    stroke-dashoffset: -25;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

@media (prefers-reduced-motion: reduce) {
  .container { animation: none; }
  .car { animation: none; }
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-modal);
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.paypal-buttons {
  margin-top: 18px;
  min-height: 45px;
}

.paypal-buttons iframe { border-radius: 8px; }

.peek-loading {
  display: flex;
  justify-content: center;
  padding: 16px 2px;
}

.peek-loading .container {
  --uib-size: 20px;
  height: 20px;
  width: 20px;
}

.peek-loading .car,
.peek-loading .track {
  stroke-width: 2.5px;
}

/* ---------- Footer ---------- */

.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.footer .brand-name { font-size: 15px; color: var(--ink); }

.db-error {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.footer-note { margin-left: auto; }

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Modals ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(18, 16, 14, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-modal);
  padding: 30px;
  box-shadow: var(--shadow-modal);
  animation: modalIn 0.3s var(--ease-out);
}

.modal-pay { max-width: 420px; text-align: center; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease-out);
  z-index: 2;
}

.modal-close:hover { background: var(--accent-soft); color: var(--accent); }

.modal-close:active { transform: scale(0.92); }

.modal h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 40px;
  text-align: left;
}

.modal-sub {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  text-align: left;
}

/* ---------- Form ---------- */

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field input[type="url"],
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input[type="url"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field textarea { resize: vertical; min-height: 92px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.field-hint { font-size: 12.5px; color: var(--muted); }

.field-hint--block { display: block; margin-top: 10px; }

.char-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.field-err {
  font-size: 13px;
  color: var(--danger);
  margin-top: 7px;
  font-weight: 500;
}

/* Detected domain + favicon under the URL field */
.detected {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.detected-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface);
}

/* Price */
.price-wrap {
  position: relative;
}

.price-symbol {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink-soft);
  pointer-events: none;
}

.price-wrap input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  padding: 12px 14px 12px 34px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.price-wrap input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.price-wrap input[type="number"]::-webkit-outer-spin-button,
.price-wrap input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.price-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s var(--ease-out);
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.chip:active { transform: scale(0.96); }

.chip.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--accent-ink);
}

/* Review step */
.review-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  margin-bottom: 22px;
  text-align: left;
}

.review-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface-2);
}

.review-info { min-width: 0; }

.review-domain {
  display: block;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--accent-ink);
  white-space: nowrap;
}

.review-tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -8px 0 18px;
  text-align: left;
}

.review-perks {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Checkout modal ---------- */

.pp-header { margin-bottom: 20px; }

.pp-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 26px;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.pay-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  padding: 6px 18px;
  margin-bottom: 16px;
  text-align: left;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.pay-row:last-child { border-bottom: 0; }

.pay-label { font-size: 13px; color: var(--muted); white-space: nowrap; }

.pay-domain {
  font-weight: 600;
  font-size: 13.5px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.pay-total {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
}

.pay-tier {
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-ink);
}

.pay-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Spinner + success check */
.spinner {
  width: 44px;
  height: 44px;
  margin: 26px auto 20px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.check-wrap {
  width: 68px;
  height: 68px;
  margin: 22px auto 18px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 34px;
  display: grid;
  place-items: center;
  animation: pop 0.4s var(--ease-out);
}

@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.35s var(--ease-out);
  max-width: min(92vw, 420px);
}

.toast i { color: var(--accent); font-size: 17px; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast.is-leaving { animation: toastOut 0.25s var(--ease-out) forwards; }

@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
  }

  .peek { transform: none; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }

  .hero { padding: 40px 16px 44px; }

  .hero h1 { font-size: 40px; }

  .stats { grid-template-columns: 1fr; gap: 18px; padding: 0 16px 48px; }

  .stat { padding: 0 0 14px; border-left: 0 !important; border-bottom: 1px solid var(--line); }

  .stat:last-child { border-bottom: 0; padding-bottom: 0; }

  .how { padding: 0 16px 56px; }

  .how-steps { grid-template-columns: 1fr; gap: 0; }

  .step { padding: 16px 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--line); }

  .step:last-child { border-bottom: 0; }

  .board { padding: 0 16px 72px; }

  .sort { margin-left: 0; width: 100%; }

  .sort-btn { flex: 1; }

  .modal { padding: 24px 20px; }

  .footer-note { margin-left: 0; width: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}

/* ---------- Legal pages (About, Terms, Privacy) ---------- */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.legal-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 14px;
}

.legal h1 {
  font-size: 44px;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.legal-lede {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
}

.legal p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 65ch;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal li {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 8px;
  max-width: 65ch;
}

.legal a { color: var(--accent); }

/* ---------- Responsive additions ---------- */

@media (max-width: 900px) {
  .tier-row { grid-template-columns: 1fr 1fr; }

  .tier:nth-child(3) { border-left: 0; }

  .tier:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .tier-row { grid-template-columns: 1fr; }

  .tier { padding: 18px 16px; }

  .tier:not(:first-child) { border-left: 0; border-top: 1px solid var(--line); }

  .legal-page { padding: 48px 16px 72px; }

  .legal h1 { font-size: 34px; }

  .footer-links { order: 3; width: 100%; }
}
