:root {
  --yellow: #FFC93C;
  --ink: #1B1B2F;
  --red: #E23D3D;
  --blue: #2F6FED;
  --cream: #FFF6E6;
  --muted: #4A4A5E;
  --line: 3px;
  --radius: 28px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(27, 27, 47, 0.07) 1.5px, transparent 2px);
  background-size: 24px 24px;
  line-height: 1.5;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; color: var(--ink);
  background: #fff; border: var(--line) solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-pin { background: var(--red); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* Header */
.topbar { background: #fff; border-bottom: var(--line) solid var(--ink); position: sticky; top: 0; z-index: 5; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 46px; height: 46px; }
.brand span { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.brand b { color: var(--red); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav > a:not(.btn) { font-weight: 700; text-decoration: none; }
.nav > a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 520px) {
  .brand span { font-size: 24px; }
  .brand svg { width: 40px; height: 40px; }
  .nav > a:not(.btn) { display: none; }
}

/* Hero */
.hero { padding: 40px 0 24px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px; align-items: center; }
.kicker { margin: 0 0 8px; font-size: 14px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -1.5px; font-weight: 800; }
.hero h1 em { font-style: italic; color: var(--red); }
.lede { font-size: 19px; color: var(--muted); max-width: 30ch; margin: 18px 0 0; }
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 28px; }
}

/* Joke card */
.jcard {
  --c: #7B4FD8;
  position: relative;
  display: flex; flex-direction: column; gap: 34px;
  padding: clamp(20px, 4vw, 36px) clamp(18px, 4vw, 36px) clamp(30px, 5vw, 46px);
  background-color: var(--c);
  background-image: radial-gradient(rgba(0, 0, 0, 0.10) 1.5px, transparent 2px);
  background-size: 22px 22px;
  border: 5px solid var(--ink); border-radius: var(--radius);
  box-shadow: 9px 9px 0 var(--ink);
}
.jcard-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.jcard-meta { flex: 1; min-width: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; margin-bottom: 12px;
  background: #fff; border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  font-size: 14px; font-weight: 800; text-decoration: none;
}
.pill .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.jtitle {
  margin: 0; color: #fff; font-weight: 800; letter-spacing: -0.3px;
  font-size: clamp(26px, 4.4vw, 40px); line-height: 1.1;
  text-shadow: 3px 3px 0 var(--ink); text-wrap: balance;
}
.jtitle a { text-decoration: none; }
.jtitle a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.jchar { flex: none; width: clamp(78px, 16vw, 118px); transform: rotate(7deg); margin-bottom: -28px; }
.bub {
  position: relative; max-width: 88%;
  border: 4px solid var(--ink); border-radius: 24px; box-shadow: 7px 7px 0 var(--ink);
  padding: 18px 24px 20px;
}
.bub p { margin: 0; }
.setup { align-self: flex-start; background: #fff; color: #fff; }
.setup p { color: var(--ink); font-size: clamp(21px, 3.4vw, 29px); font-weight: 700; line-height: 1.22; }
.punch { align-self: flex-end; background: var(--yellow); color: var(--yellow); }
.punch p { color: var(--ink); font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -0.4px; transition: filter .35s ease, opacity .35s ease; }
.tail { position: absolute; width: 40px; height: 34px; bottom: -31px; }
.tail-l { left: 30px; }
.tail-r { right: 30px; }
.punch.locked p { filter: blur(11px); opacity: .55; user-select: none; }
.reveal {
  position: absolute; inset: 0; margin: auto; width: max-content; height: 48px; padding: 0 20px;
  font: inherit; font-weight: 800; font-size: 16px; color: #fff;
  background: var(--ink); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.reveal:hover { background: #2c2c48; }
.punch:not(.locked) .reveal { display: none; }
.punch.just-revealed { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .punch.just-revealed { animation: none; } .btn { transition: none; } }

/* Deck on home */
.deck { display: flex; flex-direction: column; gap: 22px; }
.deck-card { display: none; }
.deck-card.is-active { display: flex; }
.deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deck-count { font-weight: 700; color: var(--muted); }

/* Sections */
.section { padding: 44px 0; }
.section-tight { padding: 40px 0 8px; }
.sec-title { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -0.5px; margin: 0 0 22px; font-weight: 800; }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 20px; text-decoration: none; color: #fff;
  background: var(--c); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.tile-char { width: 76px; margin-bottom: 8px; transform: rotate(-5deg); }
.tile-name { font-size: 22px; font-weight: 800; text-shadow: 2px 2px 0 var(--ink); }
.tile-count { font-weight: 700; opacity: .92; }
@media (max-width: 880px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Mini cards */
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.mini {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px;
  background: #fff; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink);
  text-decoration: none; transition: transform .08s ease, box-shadow .08s ease;
}
.mini:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.mini-top { display: flex; align-items: center; justify-content: space-between; }
.mini-cat { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #fff; background: var(--c); border-radius: 999px; padding: 4px 12px; }
.mini-char { width: 46px; }
.mini-title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.mini-setup { color: var(--muted); font-weight: 500; }
.mini-go { margin-top: auto; font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* Joke page */
.page { padding: 26px 16px 40px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.joke-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pin-side { position: sticky; top: 96px; }
.pin-img { width: 100%; height: auto; border-radius: 20px; transition: filter .35s ease; }
.pin-side.locked .pin-img { filter: blur(16px); }
.pin-note { color: var(--muted); font-weight: 600; font-size: 15px; margin: 12px 4px 0; }
@media (max-width: 880px) {
  .joke-layout { grid-template-columns: 1fr; }
  .pin-side { position: static; max-width: 340px; }
}

/* Category page */
.cat-head {
  display: flex; align-items: center; gap: 22px; margin-bottom: 34px;
  padding: 24px; background: var(--c); color: #fff;
  border: 5px solid var(--ink); border-radius: var(--radius); box-shadow: 9px 9px 0 var(--ink);
}
.cat-head h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.8px; text-shadow: 3px 3px 0 var(--ink); }
.cat-head p { margin: 8px 0 0; font-size: 18px; font-weight: 600; }
.cat-char { flex: none; width: clamp(80px, 14vw, 120px); transform: rotate(-6deg); }
.stack { display: flex; flex-direction: column; gap: 40px; max-width: 760px; }
.more-soon { font-weight: 700; color: var(--muted); }

/* Prose pages */
.prose { max-width: 720px; font-size: 18px; }
.prose h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.8px; line-height: 1.08; margin: 10px 0 18px; }
.prose h2 { font-size: 22px; margin: 30px 0 6px; }
.center { text-align: center; margin: 0 auto; }
.lost { width: 140px; margin: 30px auto 10px; transform: rotate(-6deg); }

/* Footer */
.foot { margin-top: 30px; background: var(--ink); color: #fff; padding: 36px 0 30px; }
.foot-in { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.brand-foot span { color: #fff; }
.brand-foot b { color: var(--yellow); }
.tag { margin: 0; font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px; }
.foot-links a { font-weight: 700; text-decoration: none; opacity: .9; padding: 6px 0; }
.foot-links a:hover { text-decoration: underline; opacity: 1; }
.copy { margin: 8px 0 0; opacity: .7; font-size: 14px; }

/* Joke lists */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-row .sec-title { margin: 0; }
.list-intro { max-width: 760px; margin: 0 0 34px; font-size: 18px; }
.list-intro p { margin: 0 0 12px; }
.list-intro .how { color: var(--muted); font-weight: 600; }
.list-intro .btn { margin-top: 6px; }
.jlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 40px; max-width: 760px; }
.litem { display: flex; gap: 16px; align-items: flex-start; scroll-margin-top: 96px; }
.num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff; font-weight: 800; font-size: 17px;
  border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); margin-top: 4px;
}
.lbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.bub.sm { max-width: 92%; padding: 14px 20px 16px; border-radius: 20px; box-shadow: 5px 5px 0 var(--ink); }
.bub.sm .tail { width: 32px; height: 27px; bottom: -25px; }
.setup.sm p { font-size: clamp(18px, 2.6vw, 22px); }
.punch.sm p { font-size: clamp(19px, 2.8vw, 24px); }
.punch.sm .reveal { height: 40px; font-size: 15px; padding: 0 18px; }
.litem-link { align-self: flex-end; margin-top: -14px; font-weight: 800; text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.see-all { margin: 36px 0 0; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 880px) { .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Home quick laughs */
.jlist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; max-width: none; }
.jlist-grid .litem { flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
.jlist-grid .lbody { width: 100%; padding-bottom: 14px; }
.jlist-grid .setup { background: #F1F1F5; color: #F1F1F5; }
.num-cat { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #fff; background: var(--c); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
@media (max-width: 760px) { .jlist-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .litem { gap: 10px; }
  .num { width: 36px; height: 36px; font-size: 15px; }
  .bub.sm { max-width: 96%; }
}
.jlist-grid .num { display: none; }
@media (max-width: 520px) {
  .cat-head { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .cat-char { width: 76px; }
}

/* Share buttons */
.share { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; padding-right: 64px; flex-wrap: wrap; }
.share .litem-link { margin: 0 6px 0 0; }
.sh {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; border: var(--line) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; padding: 0;
  transition: transform .08s ease, box-shadow .08s ease;
}
.sh svg { width: 20px; height: 20px; }
.sh:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.sh:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.sh-p { background: #E60023; }
.sh-f { background: #1877F2; }
.sh-x { background: #000; }
.sh-c { background: #fff; color: var(--ink); }
.sh-c.copied { background: var(--yellow); }
.sh-c.copied::after { content: "Copied"; position: absolute; transform: translateY(-34px); background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.sh-c { position: relative; }

/* Spotlight (linked joke at the top of a list) */
.spotlight { margin: 0 0 40px; max-width: 760px; }
.spotlight .pill { cursor: default; }
.spot-more { margin: 26px 0 0; font-weight: 800; color: var(--muted); }
.litem.is-spot .num { background: var(--yellow); color: var(--ink); }

/* Header tagline + new hero */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-wrap { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-tag { font-weight: 700; color: var(--muted); padding-left: 16px; border-left: 3px solid #E4DCCB; white-space: nowrap; }
.brand-tag em { font-style: italic; font-weight: 800; color: var(--ink); }
.hero { padding: 36px 0 12px; }
.hero-in { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; gap: 44px; }
.hero-side .sec-title { margin-top: 0; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-side .tile { min-height: 150px; }
@media (max-width: 880px) {
  .hero-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand-wrap { flex-direction: column; align-items: flex-start; gap: 0; }
  .brand-tag { border: 0; padding: 0 0 0 50px; margin-top: -6px; font-size: 13px; }
}
.btn { white-space: nowrap; }
@media (max-width: 640px) { .hide-sm { display: none; } .topbar .btn-sm { padding: 0 14px; } }
.bub p { overflow-wrap: anywhere; }

/* Sections inside lists */
.jtoc { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 30px; max-width: 760px; }
.jtoc-label { font-weight: 800; color: var(--muted); margin-right: 2px; }
.jtoc a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; background: #fff; border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.jtoc a span { font-size: 13px; color: var(--muted); }
.jtoc a:hover { background: var(--yellow); }
.jsec { margin: 0 0 48px; scroll-margin-top: 90px; }
.jsec-title { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.4px; line-height: 1.15; margin: 0 0 6px; max-width: 760px; }
.jsec-n { color: var(--muted); font-weight: 700; font-size: .7em; }
.jsec-desc { margin: 0 0 26px; color: var(--muted); font-weight: 600; font-size: 17px; max-width: 760px; }

/* Sub-list cards */
.sub-head { font-size: 22px; margin: 0 0 14px; }
.subcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0 0 40px; }
.subcard { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border: 4px solid var(--ink); border-left: 14px solid var(--c); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); text-decoration: none; transition: transform .08s ease, box-shadow .08s ease; }
.subcard:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.subcard-char { flex: none; width: 52px; }
.subcard-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.subcard-txt b { font-size: 18px; line-height: 1.2; }
.subcard-txt span { color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.35; }
.subcard-go { font-weight: 800; font-size: 22px; }
.up-link { font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.foot-h { margin: 18px 0 0; font-weight: 800; color: var(--yellow); }
.kin { margin-top: -10px; }
.kin a { background: #FFF6E6; }
@media (max-width: 520px) {
  .subcard-txt span { display: none; }
  .subcards { gap: 12px; margin-bottom: 28px; }
  .subcard { padding: 10px 14px; }
  .subcard-char { width: 42px; }
  .subcard-txt b { font-size: 16px; }
}
.share-spot { margin-top: 18px; padding-right: 8px; }
.deck-card + .share-spot { display: none; }
.deck-card.is-active + .share-spot { display: flex; }

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 22px; z-index: 20;
  width: 54px; height: 54px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--ink);
  border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.to-top[hidden] { display: none; }
.to-top svg { width: 24px; height: 24px; }
.to-top:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.to-top:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
@media (max-width: 520px) { .to-top { right: 14px; bottom: 16px; width: 50px; height: 50px; } }
