/* Spot the Slop demos: the game's site look (app.css + site.css) and what the three demos add to it. */

[hidden] { display: none !important; }
.demo-page { flex: 1; box-sizing: border-box; width: 100%; max-width: 860px; margin: 0 auto; padding: 24px 24px 64px; }
.demo-page.has-sheet { padding-bottom: 210px; }
@media (min-width: 721px) {
  .demo-page { border-inline: 1px solid var(--line); }
}

/* The three demos, as pills in their own colours. */
.demo-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.demo-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border: 0; border-radius: 99px;
  background: var(--surface); color: var(--text-muted); font: 500 14px/1 Geist; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.demo-tab:hover { background: var(--surface-2); color: var(--text); }
.demo-tab .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--surface-2); color: var(--text); font: 600 12px/1 Geist; }
.demo-tab[aria-selected="true"] { background: color-mix(in oklab, var(--c) 18%, var(--surface)); color: var(--text); }
.demo-tab[aria-selected="true"] .n { background: var(--c); color: var(--on-ink); }

.demo-head { margin-top: 34px; text-align: center; }
.demo-head h1 { margin: 0; font-weight: 650; font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.03em; }
.demo-head h1, .demo-head p { text-wrap: balance; }
.demo-head p { margin: 8px auto 0; max-width: 54ch; color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.demo-body { margin-top: 26px; }

/* The result bar's buttons. */
.sheet-actions { display: flex; flex: none; gap: 8px; margin-left: auto; }
@media (max-width: 720px) {
  .sheet-actions { width: 100%; }
  .sheet-actions .key { flex: 1; }
}

/* ---------- 1. Always the top word ---------- */
.tw { display: grid; gap: 16px; max-width: 620px; margin-inline: auto; }
.post { padding: 18px 20px 6px; border-radius: 18px; background: var(--surface); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-av { width: 38px; height: 38px; border-radius: 99px; background: var(--art-violet) center / cover, var(--violet); }
.post-name { margin: 0; font-weight: 600; font-size: 14px; }
.post-meta { margin: 1px 0 0; color: var(--text-faint); font-size: 12.5px; }
.post-text { margin-top: 14px; min-height: 8.4em; font-size: 16.5px; line-height: 1.55; }
.post-text p { margin: 0 0 12px; }
.chunk { border-radius: 4px; transition: background 0.4s, box-shadow 0.4s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.chunk.new { animation: chunk-in 0.3s ease-out both; }
@keyframes chunk-in { from { opacity: 0; filter: blur(3px); } }
/* At the end each piece shows where it came from: the AI's top pick, or a less likely one. */
.post-text.done .chunk.top { background: color-mix(in oklab, var(--pink) 24%, transparent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--pink) 24%, transparent); }
.post-text.done .chunk.rare { background: color-mix(in oklab, var(--green) 24%, transparent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--green) 24%, transparent); }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.22em; background: var(--ink); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.meter { display: grid; gap: 8px; }
.meter-row { display: flex; align-items: center; gap: 12px; }
.meter-label { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.cells { display: flex; flex: 1; gap: 4px; }
.cell { flex: 1; height: 10px; border-radius: 3px; background: var(--surface-2); transition: background 0.25s; }
.cell.top { background: var(--pink); }
.cell.rare { background: var(--green); }
.meter-n { min-width: 4.5em; text-align: right; font: 600 13px/1 var(--mono); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; color: var(--text-faint); font-size: 12.5px; }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; }
.legend .dot.top { background: var(--pink); }
.legend .dot.rare { margin-left: 10px; background: var(--green); }

.choices { display: grid; gap: 8px; }
.choice {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 54px;
  padding: 10px 16px 12px; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--text);
  font: 500 15.5px/1.35 Geist; text-align: left; cursor: pointer; transition: background 0.15s; animation: chunk-in 0.25s ease-out both;
}
.choice:nth-child(2) { animation-delay: 0.04s; }
.choice:nth-child(3) { animation-delay: 0.08s; }
.choice:hover:not(:disabled), .choice.auto { background: var(--surface-2); }
.choice.auto { box-shadow: inset 0 0 0 2px var(--ink); }
.choice:disabled { cursor: default; color: var(--text); }
.choice .odds { font: 600 13px/1 var(--mono); color: var(--text-muted); }
.choice.first .odds { color: var(--ink); }
/* How likely the piece is, as a line along the bottom of its button. */
.choice .odds-line { position: absolute; left: 0; bottom: 0; width: calc(var(--p) * 1%); height: 3px; background: var(--ink); opacity: 0.85; }
.choice:not(.first) .odds-line { opacity: 0.4; }
.tw-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tw-compare { padding: 16px 20px 6px; border: 1px dashed var(--line); border-radius: 18px; }
.tw-compare .post-text { min-height: 0; margin-top: 10px; color: var(--text-muted); font-size: 15px; }

/* ---------- 2. Fix the page ---------- */
.fp { display: grid; gap: 14px; }
.fp-status { display: flex; align-items: center; gap: 12px; }
.slop-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.slop-bar > i { display: block; width: calc(var(--v, 100) * 1%); height: 100%; border-radius: 99px; background: var(--ink); transition: width 0.6s var(--ease-pop); }
.fp-left { min-width: 4.8em; color: var(--text-muted); font: 600 13px/1 var(--mono); text-align: right; }
.fp-note { display: flex; align-items: flex-start; gap: 10px; min-height: 46px; padding: 12px 16px; border-radius: 14px; background: var(--surface); color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
.fp-note p { margin: 0; }
.fp-note b { color: var(--text); font-weight: 600; }
.fp-note .ic { width: 20px; height: 20px; margin-top: 0.5px; color: var(--text-faint); }
.fp-note.good .ic { color: var(--green); }
.fp-note.bad .ic { color: var(--red); }
.fp-note.swap { animation: chunk-in 0.3s ease-out both; }

.frame { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.frame-top { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--surface-2); }
.frame-top i { width: 9px; height: 9px; border-radius: 99px; background: oklch(40% 0.005 250); }
.frame-top .url { margin-left: 10px; color: var(--text-faint); font: 500 11.5px/1 var(--mono); }
.frame-body { position: relative; overflow: hidden; }

/* The page itself, in its own colours: dark and glowing while it's slop, warm paper once the glow is fixed. */
.mock {
  --m-bg: #0c0a1d; --m-text: #f4f2ff; --m-muted: #a7a2c8; --m-card: rgb(255 255 255 / 0.06); --m-line: rgb(255 255 255 / 0.12);
  container-type: inline-size; position: relative; box-sizing: border-box; padding: 18px 28px 30px; color: var(--m-text);
  background:
    radial-gradient(55% 45% at 78% 22%, rgb(139 92 246 / 0.5), transparent 70%),
    radial-gradient(45% 40% at 10% 88%, rgb(59 130 246 / 0.35), transparent 70%),
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px) 0 0 / 32px 100%,
    var(--m-bg);
  font: 400 14px/1.45 Geist, system-ui, sans-serif; cursor: pointer; -webkit-user-select: none; user-select: none;
}
.mock.bg-fixed { --m-bg: #f6f1e7; --m-text: #2b2219; --m-muted: #75685a; --m-card: #fffaf0; --m-line: #e3d8c6; background: var(--m-bg); animation: bg-in 0.5s ease-out; }
@keyframes bg-in { from { filter: brightness(1.6); } }
.mock h3, .mock h4, .mock p { margin: 0; }
[data-fix].is-fixed > .s, [data-fix]:not(.is-fixed) > .r { display: none !important; }
[data-fix].is-fixed > .r { animation: fix-in 0.5s var(--ease-pop) both; }
@keyframes fix-in { from { opacity: 0; transform: scale(0.96); filter: blur(4px); } }
/* Under the pointer, every part you could tap (slop or not) shows a dashed outline; the page's own space doesn't. */
.mock:not(.cleaned) :is([data-fix]:not(.is-fixed), [data-decoy]):hover { outline: 2px dashed color-mix(in oklab, var(--m-text) 45%, transparent); outline-offset: 5px; border-radius: 8px; }
.mock .hint { animation: hint 1.5s ease-out; border-radius: 8px; }
@keyframes hint { 0%, 60% { outline: 3px solid var(--ink); outline-offset: 6px; } 100% { outline: 3px solid transparent; outline-offset: 12px; } }
.mock.hint { animation: hint-page 1.5s ease-out; }
@keyframes hint-page { 0%, 60% { box-shadow: inset 0 0 0 4px var(--ink); } }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.m-nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.m-logo { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; }
.m-logo i { width: 14px; height: 14px; border-radius: 99px 99px 99px 3px; background: #e0a458; }
.m-links { display: flex; gap: 16px; margin-left: auto; color: var(--m-muted); }
.btn-slop, .btn-real { display: inline-block; padding: 9px 16px; font-weight: 600; white-space: nowrap; }
.btn-slop { border-radius: 99px; background: linear-gradient(90deg, #8b5cf6, #ec4899); color: #fff; box-shadow: 0 0 24px rgb(168 85 247 / 0.55); }
.btn-real { border-radius: 9px; background: var(--m-text); color: var(--m-bg); }
.m-hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 24px; margin-top: 30px; }
.m-h { font-weight: 650; font-size: clamp(26px, 5.2cqi, 40px); line-height: 1.08; letter-spacing: -0.035em; }
.m-h.slop { font-weight: 750; background: linear-gradient(90deg, #c4b5fd, #f0abfc 50%, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m-sub { margin-top: 12px !important; max-width: 36ch; color: var(--m-muted); font-size: 15px; line-height: 1.5; }
.m-cta { display: inline-block; margin-top: 20px; }
.m-art > div { display: grid; place-items: center; min-height: 230px; }
.m-art > .s { position: relative; }
.orb { width: min(190px, 70%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 4%, #e9d5ff 10%, #a78bfa 30%, #6d28d9 62%, #2e1065 100%); box-shadow: 0 30px 80px rgb(139 92 246 / 0.6), inset -20px -30px 60px rgb(46 16 101 / 0.8); animation: float 5s ease-in-out infinite; }
.orb.small { position: absolute; top: 6%; right: 10%; width: 60px; background: radial-gradient(circle at 30% 30%, #fff 0 5%, #bae6fd 15%, #60a5fa 45%, #1e3a8a 100%); box-shadow: 0 10px 30px rgb(96 165 250 / 0.5); animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-8px); } }
.spark { position: absolute; color: #f5d0fe; font-size: 22px; text-shadow: 0 0 12px #e879f9; }
.spark.a { top: 14%; left: 14%; }
.spark.b { bottom: 16%; right: 18%; font-size: 16px; }
.spark.c { bottom: 30%; left: 8%; font-size: 14px; }
.m-app { box-sizing: border-box; width: min(100%, 250px); padding: 16px; border: 1px solid var(--m-line); border-radius: 16px; background: var(--m-card); box-shadow: 0 14px 30px -18px rgb(60 40 20 / 0.4); }
.m-app-top, .m-app-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.m-app-top b { font-size: 15px; }
.m-app-top span, .m-app-foot span:first-child { color: var(--m-muted); font-size: 12px; }
.m-rise { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin: 14px 0; }
.m-rise i { flex: 1; height: calc(var(--h) * 1%); border-radius: 4px 4px 2px 2px; background: #e0a458; opacity: 0.35; }
.m-rise i:last-child { opacity: 1; }
.m-pill { padding: 4px 8px; border-radius: 99px; background: var(--m-text); color: var(--m-bg); font-size: 11.5px; font-weight: 600; }
.m-proof { margin-top: 28px; text-align: center; }
.m-trust { color: var(--m-muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.m-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 10px; }
.m-logos b { color: var(--m-muted); opacity: 0.75; font-size: 15px; letter-spacing: 0.08em; }
.m-quote { font-size: 18px; font-weight: 550; letter-spacing: -0.01em; }
.m-by { margin-top: 4px !important; color: var(--m-muted); font-size: 13px; }
.m-feats { margin-top: 26px; }
.m-feats > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.m-card { padding: 16px; border: 1px solid var(--m-line); border-radius: 18px; background: var(--m-card); backdrop-filter: blur(8px); }
.m-emoji { font-size: 22px; }
.m-feats h4 { margin-top: 8px !important; font-size: 14px; font-weight: 650; }
.m-feats p { margin-top: 4px !important; color: var(--m-muted); font-size: 12.5px; line-height: 1.45; }
.m-feat { padding-top: 12px; border-top: 1px solid var(--m-line); }
.m-num { color: #c0803a; font: 600 11.5px/1 var(--mono); }
@container (max-width: 560px) {
  .mock { padding: 16px 18px 24px; }
  .m-links { display: none; }
  .m-navcta { margin-left: auto; }
  .m-hero { grid-template-columns: 1fr; margin-top: 22px; }
  .m-art > div { min-height: 190px; }
  .m-feats > div { grid-template-columns: 1fr; }
}

/* Once it's clean: the slop page over the clean one, cut at a line you drag. */
.frame-body.comparing { cursor: ew-resize; touch-action: pan-y; }
.frame-body.comparing .mock { cursor: ew-resize; }
.cmp-before { position: absolute; top: 0; left: 0; width: 100%; clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); pointer-events: none; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25); pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; background: #fff; color: #15171a; font: 700 14px/1 Geist; box-shadow: 0 4px 14px rgb(0 0 0 / 0.35); transform: translate(-50%, -50%); }
.cmp-tag { position: absolute; bottom: 12px; padding: 6px 10px; border-radius: 99px; background: rgb(0 0 0 / 0.6); color: #fff; font: 600 12px/1 Geist; pointer-events: none; }
.cmp-tag.l { left: 12px; }
.cmp-tag.r { right: 12px; }

/* ---------- 3. Look closer ---------- */
.lc { display: grid; justify-items: center; gap: 14px; }
.lc-pic { position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 16px; background: var(--surface); cursor: none; touch-action: none; -webkit-user-select: none; user-select: none; }
.lc-pic.over { cursor: default; }
.lc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.loupe {
  position: absolute; top: 0; left: 0; width: 150px; height: 150px; margin: -75px 0 0 -75px; border: 3px solid #fff; border-radius: 50%;
  background-repeat: no-repeat; box-shadow: 0 12px 30px rgb(0 0 0 / 0.55), inset 0 0 0 1px rgb(0 0 0 / 0.3); opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.loupe::after { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgb(0 0 0 / 0.5); }
.lc-pic.aiming .loupe { opacity: 1; }
.mark { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2.5px solid var(--red); border-radius: 50%; box-shadow: 0 0 0 2px rgb(0 0 0 / 0.35); pointer-events: none; animation: mark-in 0.3s var(--ease-pop) both; }
@keyframes mark-in { from { transform: scale(0.4); opacity: 0; } }
.zone { position: absolute; border: 3px solid var(--green); border-radius: 10px; box-shadow: 0 0 0 2px rgb(0 0 0 / 0.4); pointer-events: none; animation: mark-in 0.4s var(--ease-pop) both; }
.zone b { position: absolute; bottom: calc(100% + 6px); left: -3px; padding: 4px 8px; border-radius: 99px; background: var(--green); color: var(--on-ink); font: 600 11.5px/1 Geist; white-space: nowrap; }
.zone.below b { top: calc(100% + 6px); bottom: auto; }
.lc-row { display: flex; align-items: center; gap: 12px; width: min(100%, 420px); min-height: 22px; }
.lc-tries { display: flex; flex: none; gap: 6px; }
.lc-tries i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transition: background 0.2s; }
.lc-tries i.used { background: var(--surface-2); }
.lc-note { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
.lc-lesson { display: grid; gap: 14px; width: min(100%, 620px); margin-top: 6px; }
.lc-crops { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.lc-crop { margin: 0; }
.lc-crop .zoom { height: 180px; border-radius: 12px; background-repeat: no-repeat; }
.lc-crop figcaption { max-width: 190px; margin-top: 8px; color: var(--text-muted); font-size: 13px; }
.lc-lesson > p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
@media (max-width: 720px) {
  .demo-page { padding: 16px 16px 48px; }
  .loupe { width: 130px; height: 130px; margin: -65px 0 0 -65px; }
}
