/* Puffball blog — list page and article page. Shared tokens, buttons and footer come from ../assets/site.css */
main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 0; }

/* ===== Intro ===== */
.intro { display: flex; align-items: center; gap: 22px; margin: 8px 0 24px; animation: rise .5s var(--ease-pop) both; }
.intro h1 { margin: 0; font: 700 clamp(40px, 6vw, 60px)/1 var(--display); color: var(--ink); text-shadow: 0 4px 0 rgba(255,255,255,.7); }
.intro p { margin: 8px 0 0; font: 500 clamp(17px, 2vw, 20px)/1.45 var(--body); color: var(--ink-2); }
.mascot { width: clamp(84px, 11vw, 120px); height: auto; flex: none; animation: read-bob 3s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot .paper { transform-origin: 60px 90px; animation: paper 3s ease-in-out infinite; }
@keyframes read-bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes paper { 50% { transform: rotate(3deg); } }

/* ===== Filter tabs (design-system Tabs) ===== */
.filters { margin: 0 0 26px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.tabs { position: relative; display: inline-grid; grid-auto-flow: column; padding: 6px; border-radius: 24px; background: rgba(255,255,255,.75);
  box-shadow: inset 0 4px 0 rgba(20,32,90,.08), 0 4px 0 rgba(169,186,227,.6); }
.tabs .cushion { position: absolute; top: 6px; bottom: 10px; border-radius: 18px; background: var(--aqua);
  box-shadow: var(--gloss), 0 4px 0 var(--aqua-lip); transition: inset-inline-start .32s var(--ease-pop), width .32s var(--ease-pop); }
.tabs button { position: relative; z-index: 1; height: 46px; padding: 0 22px; margin-bottom: 4px; border: 0; background: none; cursor: pointer;
  font: 700 18px/1 var(--display); color: var(--ink-2); white-space: nowrap; transition: color .2s; -webkit-tap-highlight-color: transparent; }
.tabs button[aria-selected="true"] { color: var(--on-aqua); }
.tabs button:focus-visible { outline: 3px solid var(--focus); border-radius: 16px; }

/* ===== Post cards ===== */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 30px; background: var(--surface);
  box-shadow: var(--gloss), 0 8px 0 var(--surface-lip), 0 22px 30px var(--shade);
  transition: transform .32s var(--ease-pop), box-shadow .32s var(--ease-pop); animation: card-in .55s var(--ease-boing) both; }
.post-card[hidden] { display: none; }
@keyframes card-in { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.post-card .cover { display: block; aspect-ratio: 2 / 1; overflow: hidden; }
.post-card .cover svg { display: block; width: 100%; height: 100%; transition: transform .6s var(--ease-glide); }
.post-card .body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 24px 22px; flex: 1; }
.post-card h2 { margin: 2px 0 0; font: 700 25px/1.25 var(--display); color: var(--ink); }
.post-card h2 a { text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.post-card { position: relative; }
.post-card p { margin: 0; font: 500 16px/1.6 var(--body); color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; font: 500 14px/1.4 var(--body); color: var(--ink-3); }
@media (hover: hover) {
  .post-card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: var(--gloss), 0 12px 0 var(--surface-lip), 0 28px 36px var(--shade); }
  .post-card:hover .cover svg { transform: scale(1.06); }
}
.post-card:active { transform: translateY(5px) scale(.99); box-shadow: var(--gloss), 0 2px 0 var(--surface-lip), 0 8px 12px var(--shade); transition-duration: 80ms; }
.post-card:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.post-card h2 a:focus-visible { outline: none; }

/* featured: full width, cover beside text */
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured .cover { flex: 1.25; aspect-ratio: auto; min-height: 320px; }
.post-card.featured .body { flex: 1; justify-content: center; padding: 32px 34px; gap: 14px; }
.post-card.featured h2 { font-size: clamp(28px, 3.2vw, 38px); }
.post-card.featured p { font-size: 18px; }

/* category badge */
.cat { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--c); color: var(--on, #fff);
  font: 700 14px/1 var(--display); letter-spacing: .2px; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 3px 0 var(--cl); }

/* ===== Article page ===== */
.post-page { max-width: 880px; }
.back { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px 0 12px; margin: 6px 0 18px; border-radius: 999px; text-decoration: none;
  background: rgba(255,255,255,.85); color: var(--ink); font: 700 16px/1 var(--display); box-shadow: var(--gloss), 0 4px 0 var(--surface-lip);
  transition: transform .32s var(--ease-pop); }
.back svg { width: 18px; height: 18px; }
.back:hover { transform: translateX(4px); }
.article { overflow: hidden; border-radius: 36px; background: var(--surface); box-shadow: var(--gloss), 0 10px 0 var(--surface-lip), 0 26px 36px var(--shade);
  animation: card-in .6s var(--ease-boing) both; }
.hero-cover { aspect-ratio: 2.2 / 1; overflow: hidden; }
.hero-cover svg { display: block; width: 100%; height: 100%; }
.article-body { padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 64px) clamp(32px, 5vw, 56px); }
.article-body h1 { margin: 16px 0 10px; font: 700 clamp(32px, 4.6vw, 46px)/1.15 var(--display); color: var(--ink); }
.article-body > .meta { margin: 0 0 26px; padding-bottom: 22px; border-bottom: 3px dashed var(--well); }

.prose { font: 500 19px/1.8 var(--body); color: var(--ink-2); }
.prose > * + * { margin-top: 18px; }
.prose p { margin: 0; }
.prose .lead { font-size: 21px; line-height: 1.7; color: var(--ink); font-weight: 600; }
.prose h2 { margin: 36px 0 0; font: 700 28px/1.25 var(--display); color: var(--ink); }
.prose h2 + * { margin-top: 10px; }
.prose a { color: var(--blue-lip); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.prose li { position: relative; padding-inline-start: 38px; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--volt); box-shadow: inset 0 -3px 0 var(--volt-lip), 0 0 0 3px var(--ink); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: .1em; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold); font: 700 16px/1 var(--display); box-shadow: inset 0 -3px 0 var(--gold-lip), 0 0 0 3px var(--ink); }
.callout { padding: 18px 22px; border-radius: 22px; background: #F1FBFF; color: var(--ink); font-size: 18px; line-height: 1.6;
  box-shadow: inset 0 3px 0 #fff, 0 4px 0 #9FD9EE; border-inline-start: 0; }
.callout strong { color: var(--ink); }

/* keyboard keys in the how-to-play post */
.keys { display: grid; gap: 14px; padding: 20px; border-radius: 24px; background: var(--raised); box-shadow: inset 0 4px 0 rgba(20,32,90,.06); }
.key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; direction: ltr; justify-content: flex-end; }
.kbd { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 12px; background: #fff; color: var(--ink);
  font: 700 20px/1 var(--display); box-shadow: inset 0 -2px 0 var(--well), 0 4px 0 var(--surface-lip), 0 0 0 2px var(--surface-lip); }
.kbd.wide { min-width: 96px; font-size: 17px; }
.or { font: 600 15px/1 var(--body); color: var(--ink-3); padding: 0 4px; }
.what { margin-inline-start: 12px; padding: 8px 14px; border-radius: 999px; background: var(--volt); color: var(--on-volt); font: 700 16px/1 var(--display);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 3px 0 var(--volt-lip); direction: rtl; }

.more { margin-top: 48px; }
.more h2 { margin: 0 0 18px; font: 700 30px/1.2 var(--display); color: var(--ink); }

@media (max-width: 860px) {
  .post-card.featured { flex-direction: column; }
  .post-card.featured .cover { flex: none; aspect-ratio: 2 / 1; min-height: 0; }
  .post-card.featured .body { padding: 22px 24px; }
}
@media (max-width: 680px) {
  .posts { grid-template-columns: 1fr; }
  .intro { gap: 14px; }
  .tabs button { padding: 0 13px; font-size: 16px; }
  .prose { font-size: 18px; }
  .key-row { justify-content: flex-start; }
  .what { margin-inline-start: 0; }
}
