/* grepped.ai/swipe */
:root {
  --ink: #16191f; --ink2: #5f6572; --ink3: #9097a3; --rule: #e4e3de; --bg: #f6f6f3; --card: #fff;
  --yes: #1f9d63; --no: #d6453d; --up: #2f6fe4;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }

.sw-top {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px calc(10px) 18px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.sw-logo img { height: 18px; display: block; }
.sw-decks { margin: 0 auto; display: flex; background: #ebeae5; border-radius: 999px; padding: 3px; }
.sw-decks button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.sw-decks button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sw-likes-btn { display: flex; align-items: center; gap: 5px; border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 6px 11px; font-weight: 700; font-size: 13px; }
.sw-likes-btn svg { width: 16px; height: 16px; fill: var(--yes); }

.sw-main { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 0 16px max(14px, env(safe-area-inset-bottom)); }
.sw-q { margin: 2px 0 10px; font-size: 14px; color: var(--ink2); font-weight: 600; letter-spacing: .01em; }
.sw-stack { position: relative; width: 100%; max-width: 400px; flex: 1; min-height: 0; max-height: 640px; }

.sw-card {
  position: absolute; inset: 0; background: var(--card); border-radius: 22px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(22,25,31,.10);
  display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none;
  transform: translateY(calc(var(--d) * 10px)) scale(calc(1 - var(--d) * .04));
  transition: transform .25s;
  --py: 0; --pn: 0; --pu: 0;
}
.sw-card.top { cursor: grab; will-change: transform; }
.sw-card.sw-in { animation: sw-in .28s ease-out both; }
@keyframes sw-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sw-card, .sw-card.sw-in { transition: none; animation: none; } }
.sw-card.top:active { cursor: grabbing; }
.sw-cover { flex: 0 0 auto; aspect-ratio: 4 / 3; background: #f6f6f3; border-bottom: 1px solid var(--rule); }
.sw-cover svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.sw-nocover { height: 100%; display: grid; place-items: center; font-weight: 700; color: var(--ink3); }
.sw-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.sw-cat { margin: 0; font: 500 11px/1 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); }
.sw-body h2 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.sw-head { margin: 0; color: var(--ink2); font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sw-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sw-facts li { font-size: 12px; font-weight: 600; background: #f1f0ec; border-radius: 999px; padding: 4px 9px; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sw-stamp {
  position: absolute; top: 22px; padding: 6px 12px; border: 3px solid; border-radius: 10px;
  font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .04em; background: rgba(255,255,255,.85);
  pointer-events: none; opacity: 0;
}
.sw-stamp-yes { left: 18px; color: var(--yes); border-color: var(--yes); transform: rotate(-12deg); opacity: var(--py); }
.sw-stamp-no { right: 18px; color: var(--no); border-color: var(--no); transform: rotate(12deg); opacity: var(--pn); }
.sw-stamp-up { left: 50%; top: 40%; color: var(--up); border-color: var(--up); transform: translateX(-50%); opacity: var(--pu); }
.sw-card.go-right .sw-stamp-yes, .sw-card.go-left .sw-stamp-no, .sw-card.go-up .sw-stamp-up { opacity: 1; }

.sw-actions { display: flex; gap: 20px; align-items: center; margin: 16px 0 6px; }
.sw-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(22,25,31,.12); transition: transform .12s; }
.sw-btn:active { transform: scale(.9); }
.sw-btn svg { width: 26px; height: 26px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sw-no svg { stroke: var(--no); }
.sw-yes svg { fill: var(--yes); stroke: var(--yes); stroke-width: 1.5; }
.sw-up { width: 48px; height: 48px; }
.sw-up svg { width: 22px; height: 22px; fill: none; stroke: var(--up); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sw-hint { margin: 4px 0 0; font-size: 12px; color: var(--ink3); }

.sw-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; color: var(--ink2); }

.sw-overlay { position: fixed; inset: 0; background: rgba(22,25,31,.55); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 10; animation: sw-fade .2s; }
.sw-overlay[hidden] { display: none; }
.sw-sheet { background: #fff; border-radius: 24px; width: 100%; max-width: 380px; max-height: 90vh; overflow: auto; padding: 24px 22px 16px; text-align: center; animation: sw-pop .28s cubic-bezier(.2,1.4,.4,1); }
.sw-match-h { margin: 0 0 12px; font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--yes); }
.sw-match-cover { border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); }
.sw-match-cover svg { width: 100%; display: block; }
.sw-match-t { margin: 12px 0 4px; font-weight: 700; font-size: 18px; }
.sw-match-s, .sw-type-s { margin: 0 0 16px; color: var(--ink2); font-size: 14px; line-height: 1.45; }
.sw-kicker { margin: 0; font: 500 11px/1 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--ink3); }
.sw-type { margin: 10px 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.sw-bars { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; text-align: left; }
.sw-bar { position: relative; background: #f1f0ec; border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 600; }
.sw-bar span { position: relative; z-index: 1; display: block; padding: 7px 10px; }
.sw-bar i { position: absolute; inset: 0 auto 0 0; background: #cfe9dc; }
.sw-cta { display: block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; padding: 13px 18px; border-radius: 999px; }
.sw-ghost { display: block; width: 100%; margin-top: 8px; border: 0; background: none; padding: 10px; color: var(--ink2); font-weight: 600; }
.sw-likes ul { list-style: none; padding: 0; margin: 14px 0 16px; text-align: left; }
.sw-likes li { padding: 9px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.sw-likes li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.sw-likes li small { color: var(--ink3); font-size: 12px; }

@keyframes sw-fade { from { opacity: 0; } }
@keyframes sw-pop { from { transform: scale(.85); opacity: 0; } }

@media (max-height: 700px) {
  .sw-body h2 { font-size: 19px; }
  .sw-head { -webkit-line-clamp: 3; font-size: 13.5px; }
  .sw-hint { display: none; }
  .sw-actions { margin: 10px 0 2px; }
}
.sw-decks button { white-space: nowrap; }
.sw-inside { margin: 6px 0 0; padding: 10px 0 0; border-top: 1px solid var(--rule); list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink2); }
.sw-inside li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-inside li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink3); margin: 0 8px 2px 0; vertical-align: middle; }
@media (max-width: 440px) {
  .sw-top { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .sw-logo img { height: 13px; }
  .sw-decks button { padding: 6px 9px; font-size: 12px; }
  .sw-likes-btn { padding: 5px 9px; }
}
@media (max-height: 760px) { .sw-inside { display: none; } }
.sw-body > * { flex-shrink: 0; }
.sw-body > .sw-inside { flex-shrink: 1; min-height: 0; overflow: hidden; }

/* Buyer app (7 Nov): account chip, price line, one sheet for sign-in, samples and the shortlist, toast, home-screen hint */
.sw-acct { border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 6px 11px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.sw-acct.is-in { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: var(--ink); color: #fff; border-color: var(--ink); }
.sw-price { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.sw-price b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sw-price span { font-size: 12px; color: var(--ink3); font-weight: 600; }
.sw-price.is-ask span { font-size: 13px; color: var(--ink2); }
.sw-sheet-h { margin: 8px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.sw-sheet-s { margin: 0 0 16px; color: var(--ink2); font-size: 14px; line-height: 1.45; }
.sw-done .sw-sheet-h { color: var(--ink); }
.sw-form { display: flex; flex-direction: column; gap: 10px; }
.sw-form input { font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid var(--rule); border-radius: 12px; background: #fbfbf9; text-align: center; }
.sw-form input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.sw-form .sw-cta { border: 0; width: 100%; font-size: 15px; }
.sw-form .sw-cta:disabled { opacity: .5; }
.sw-note { margin: 8px 0 0; min-height: 1em; font-size: 13px; color: var(--no); }
.sw-note:empty { display: none; }
button.sw-cta { border: 0; width: 100%; font-size: 15px; }
.sw-strong { color: var(--ink); font-weight: 700; }
.sw-synced { margin: 6px 0 0; font-size: 12.5px; }
.sw-likes li { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.sw-likes li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-x { border: 0; background: #f1f0ec; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; font-size: 17px; line-height: 1; color: var(--ink2); }
.sw-status { list-style: none; padding: 0; margin: 4px 0 18px; text-align: left; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sw-status li { padding: 10px 12px; border-radius: 12px; background: #f6f1e6; color: #7a5a12; }
.sw-status li.ok { background: #e7f4ec; color: #17734a; }
.sw-toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px; z-index: 20; pointer-events: none; animation: sw-fade .2s; white-space: nowrap; }
.sw-toast[hidden] { display: none; }
.sw-a2hs { position: relative; width: 100%; max-width: 400px; margin: 0 0 10px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 10px 42px 10px 14px; font-size: 13px; line-height: 1.4; }
.sw-a2hs p { margin: 0; }
.sw-a2hs button { position: absolute; top: 50%; margin-top: -14px; right: 8px; border: 0; background: #f1f0ec; width: 28px; height: 28px; border-radius: 50%; font-size: 17px; line-height: 1; }
.sw-a2hs[hidden] { display: none; }
@media (max-width: 400px) {
  .sw-top { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .sw-logo img { height: 12px; }
  .sw-decks { padding: 2px; }
  .sw-decks button { padding: 5px 8px; font-size: 12px; }
  .sw-likes-btn, .sw-acct { padding: 5px 8px; font-size: 12px; }
  .sw-acct.is-in { width: 28px; height: 28px; padding: 0; }
}
@media (max-width: 360px) { .sw-logo { display: none; } .sw-decks { margin-left: 0; } }
