/* Blog index and article pages. Tokens and the pixel UI kit come from base.css. */
body { padding-bottom: 0; }
.skip { position: absolute; left: 16px; top: -40px; z-index: 80; padding: 8px 12px; background: var(--amber); color: #1b1408; }
.skip:focus { top: 8px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 28px 0; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.post-head { display: grid; gap: 14px; padding-block: 18px 26px; max-width: 760px; }
.post-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; color: var(--ink); text-wrap: balance; margin: 0; }
.post-head .lead { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 62ch; margin: 0; }
.post-head .byline { color: var(--muted); margin: 0; }

.post-banner { position: relative; height: 112px; overflow: hidden; background: var(--sky) center bottom / 400px 112px repeat-x;
  image-rendering: pixelated; margin-bottom: 36px; }
.post-banner .w-dog { position: absolute; bottom: 4px; left: calc(50% - 64px); }

.prose { max-width: 68ch; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-family: "Jersey 15", monospace; font-weight: 400; font-size: 36px; line-height: 1.05; color: var(--ink); margin-top: 1.6em; text-wrap: balance; }
.prose ul { padding-left: 1.2em; list-style: square; }
.prose li { margin-top: .45em; }
.prose li::marker { color: var(--pine); }
.prose strong { color: var(--ink); }
.prose a { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.prose .sources { font-size: 15px; line-height: 1.55; color: var(--muted); }
.prose .sources li { margin-top: .6em; }

.post-cta { display: grid; gap: 10px; justify-items: start; max-width: 68ch; margin-block: 44px 56px; padding: 22px; background: var(--amber-soft); }
.post-cta p { margin: 0; }
.post-cta .font-pixel { font-size: 28px; line-height: 1; color: var(--ink); }

/* The matching printable sheet at the end of an article */
.post-print { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; max-width: 68ch; margin-top: 44px; padding: 18px; }
@media (max-width: 520px) { .post-print { grid-template-columns: 84px 1fr; gap: 14px; } }
.post-print img { width: 100%; height: auto; border: 2px solid var(--shadow); background: #fff; }
.post-print div { display: grid; gap: 6px; min-width: 0; }
.post-print p { margin: 0; }
.post-print .tag { color: var(--pine); }
.post-print .font-pixel { font-size: 28px; line-height: 1; color: var(--ink); }
.post-print-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px !important; }
.post-print-links a:not(.px-btn) { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.post-print + .post-cta { margin-top: 24px; }

/* Link to the printables from the blog index */
.print-banner { display: grid; gap: 6px; margin-top: 28px; padding: 20px 22px; background: var(--amber-soft); color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease; }
.print-banner:hover, .print-banner:focus-visible { transform: translate(-3px, -3px); box-shadow: calc(var(--px) + 3px) calc(var(--px) + 3px) 0 var(--shadow); }
.print-banner .tag { color: var(--pine); }
.print-banner .font-pixel { font-size: 32px; line-height: 1; color: var(--ink); }

/* Terms and privacy */
.legal { padding-bottom: 72px; }
.legal .prose h2 { font-size: 30px; }
.legal-other { margin-top: 40px; }
.legal-other a { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }

.related { padding-bottom: 72px; }
.related h2 { font-size: 38px; margin: 0 0 18px; color: var(--ink); }
.blog-index { padding-bottom: 72px; }
.post-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-card { padding: 0; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover, .post-card:focus-within { transform: translate(-3px, -3px); box-shadow: calc(var(--px) + 3px) calc(var(--px) + 3px) 0 var(--shadow); }
.post-link { display: grid; color: inherit; text-decoration: none; height: 100%; }
.post-scene { position: relative; display: block; height: 112px; overflow: hidden; border-bottom: 3px solid var(--shadow);
  background: var(--sky) center bottom / 400px 112px repeat-x; image-rendering: pixelated; }
.post-scene .w-dog { position: absolute; bottom: 4px; left: calc(50% - 64px); }
.post-text { display: grid; gap: 8px; padding: 18px 20px 20px; align-content: start; }
.post-title { font-size: 27px; line-height: 1.05; margin: 0; color: var(--ink); }
.post-desc { font-size: 15px; color: var(--muted); line-height: 1.5; }
.post-meta { color: var(--pine); }

/* Interactive examples */
.widget { margin: 2em 0; padding: 0; overflow: hidden; display: grid; }
.widget figcaption { display: grid; gap: 4px; padding: 16px 18px 12px; }
.widget figcaption strong { font-size: 26px; line-height: 1; color: var(--ink); }
.widget .w-intro { font-size: 15px; color: var(--muted); line-height: 1.5; }
.w-stage { position: relative; height: 112px; overflow: hidden; border-block: 3px solid var(--shadow); image-rendering: pixelated;
  background: var(--sky) center bottom / 400px 112px repeat-x; }
.w-dog { position: absolute; bottom: 4px; z-index: 2; }
.w-prop { position: absolute; z-index: 3; image-rendering: pixelated; }
.w-bubble { z-index: 4; left: calc(50% - 10px); bottom: 82px; font-size: 18px; padding: 6px 9px; opacity: 0; transition: opacity .15s; }
.w-bubble.show { opacity: 1; animation: w-fade 1.4s steps(6, end) forwards; }
@keyframes w-fade { 70% { opacity: 1; } 100% { opacity: 0; } }
.w-heart { position: absolute; bottom: 60px; z-index: 4; width: 14px; height: 12px; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath fill='%23e5484d' d='M1 0h2v1h1V0h2v1h1v2H6v1H5v1H4v1H3V5H2V4H1V3H0V1h1z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: w-rise 1.2s steps(8, end) forwards; }
@keyframes w-rise { to { transform: translateY(-46px); opacity: 0; } }
.w-options, .w-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 4px; align-items: center; }
.w-opt { border: 2px solid var(--line); background: var(--mist); color: var(--fg); font: 500 14px/1 Figtree, system-ui, sans-serif;
  padding: 9px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.w-opt:hover { border-color: var(--muted); }
.w-opt[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.w-check[aria-pressed="true"]::before { content: "✓ "; }
.w-out { padding: 10px 18px 0; margin: 0; font-size: 16px; line-height: 1.55; min-height: 3em; }
.w-out p { margin: 0 0 .5em; }
.w-note, .w-score { padding: 0 18px 16px; margin: 0; font-size: 14px; color: var(--muted); }
.w-score { padding: 0; }
.widget > :last-child { padding-bottom: 18px; }
.w-range { display: grid; gap: 8px; padding: 14px 18px 0; }
.w-range input { width: 100%; accent-color: var(--pine); }
.w-value { font-size: 24px; line-height: 1; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .w-heart, .w-bubble.show { animation: none; } }
