/* spudnote.com/blog: the index and every post, in all four languages (built by tools/blog.py).
 * The site's chrome (field, header, footer, back to top, night garden) comes from /site/site.css;
 * this file is the blog's own content, in both themes. Everything sits straight on the field
 * like every other page; the lists are .panel so field.js keeps its sprouts off them. */

:root {
  --card: #FFFDF8;
  --soft: #FDEEDA;
  --soft-edge: rgba(154, 85, 24, 0.18);
  --ink: #2A1408;
  --ink-dim: #6E4A2E;
  --ink-faint: #8A6A4E;
  --line: rgba(90, 52, 12, 0.14);
  --brand: #9A5518;
  --sprout: #2E7018;
  --shadow: 0 22px 48px -26px rgba(90, 52, 12, 0.34), 0 2px 6px rgba(90, 52, 12, 0.05);
  --fred: 'Fredoka', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
:root[data-theme="dark"] {
  --card: #2E3452;
  --soft: #333852;
  --soft-edge: rgba(240, 185, 104, 0.26);
  --ink: #F2EEFF;
  --ink-dim: #B0AACC;
  --ink-faint: #9893B8;
  --line: rgba(176, 170, 204, 0.24);
  --brand: #F0B968;
  --sprout: #7FC44C;
  --shadow: 0 22px 48px -26px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; padding-bottom: clamp(48px, 9vh, 96px); }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 36px); }
/* the reading column: one width for the list and the post, so the two feel like one place */
.read { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }

h1, h2, h3 { font-family: var(--fred); font-weight: 500; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--fred); font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 10px;
}

/* ---------- the index, on paper like the posts (Lukas, 2026-11-08) ----------
   The heading left-aligned in the reading column, then the posts as rows split by hairlines:
   topic, date and reading time, the title, the description, and the post's share card as its
   picture. No cards, no shadows. "more from the blog" under a post uses the same rows. */
.index-head { padding: clamp(36px, 7vh, 64px) 0 clamp(18px, 3vh, 26px); border-bottom: 1px solid var(--line); }
.index-head .eyebrow { font-size: .72rem; letter-spacing: .16em; margin-bottom: 12px; }
.index-head h1 { font-weight: 600; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; }

.posts { list-style: none; margin: 0; padding: 0; }
.post-item { border-bottom: 1px solid var(--line); }
.post-item a {
  display: grid; grid-template-columns: 1fr 176px; gap: clamp(16px, 4vw, 32px); align-items: center;
  padding: clamp(20px, 4vw, 28px) 0; text-decoration: none; color: inherit;
}
.post-item a:focus-visible { outline: 2px solid var(--sprout); outline-offset: 4px; border-radius: 6px; }
.post-text { min-width: 0; }
.post-meta { margin: 0 0 8px; font-family: var(--sans); font-weight: 600; font-size: .8rem; color: var(--ink-faint); }
.post-title { font-family: var(--fred); font-weight: 600; font-size: clamp(1.22rem, 3.4vw, 1.5rem); line-height: 1.22; letter-spacing: -.01em; color: var(--ink); transition: color .15s ease; }
.post-item a:hover .post-title { color: var(--brand); }
.post-desc { margin: 8px 0 0; color: var(--ink-dim); font-size: 1rem; line-height: 1.55; }
.post-thumb { width: 176px; height: auto; aspect-ratio: 1200 / 630; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 560px) {
  .post-item a { grid-template-columns: 1fr; }
  .post-thumb { order: -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .post-title { transition: none; } }

.empty { text-align: center; padding: clamp(36px, 7vh, 56px) 0 0; overflow-x: clip; }
/* the dangling crop, as on /garden (garden.css .crop-*; tap and blink in blog.js) */
.crop-btn {
  appearance: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; background: none; border: 0; padding: 0; cursor: pointer;
  width: 150px; line-height: 0; border-radius: 14px; display: block; margin: 0 auto 14px;
}
.crop-btn:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; }
.crop-swing, .crop-kick { display: block; transform-origin: 50% 15.4%; }
.crop-swing { animation: dangle var(--d, 3s) ease-in-out var(--p, 0s) infinite alternate; }
@keyframes dangle { from { transform: rotate(calc(var(--a, 3.5deg) * -1)); } to { transform: rotate(var(--a, 3.5deg)); } }
.crop-btn.kick .crop-kick { animation: kick 1.7s cubic-bezier(.3, .1, .3, 1); }
@keyframes kick {
  0% { transform: rotate(0); } 12% { transform: rotate(16deg); } 30% { transform: rotate(-12deg); }
  48% { transform: rotate(8deg); } 64% { transform: rotate(-5deg); } 80% { transform: rotate(2.5deg); }
  100% { transform: rotate(0); }
}
.crop-art { width: 100%; height: auto; aspect-ratio: 300 / 390; margin: 0 auto; display: block; }
@media (prefers-reduced-motion: reduce) { .crop-swing, .crop-btn.kick .crop-kick { animation: none; } }
.empty p { margin: 0; font-family: var(--fred); font-size: 1.12rem; color: var(--ink-dim); }

/* ---------- a post: the clean "paper" type (Lukas picked A, 2026-11-08) ----------
   No card: the article sits straight on the site's field, which every page wears (field.js keeps its
   sprouts off the text), with Fredoka headings, ruled sections and a slim sign-off. Sheet:
   Desktop Files/spudnote/blog-style. */
:root { --body-ink: #3A2516; }
:root[data-theme="dark"] { --body-ink: #E4E0F4; }

.paper .read { max-width: 760px; }
.read > .back {
  display: inline-flex; align-items: center; gap: 6px; margin: clamp(28px, 5vh, 40px) 0 22px;
  font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--ink-faint); text-decoration: none;
}
.read > .back:hover { color: var(--sprout); }
.post-head .eyebrow { font-size: .72rem; letter-spacing: .16em; margin-bottom: 14px; }
.post-head h1 { font-weight: 600; font-size: clamp(2.05rem, 5.6vw, 3.05rem); line-height: 1.1; letter-spacing: -.02em; }
.byline {
  margin: 18px 0 0; padding-bottom: 26px; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--ink-faint);
}
.byline .by { color: var(--ink); }

/* the short answer: a quiet callout, a brand rule down its left */
.answer { margin: 30px 0 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--brand); }
.answer-label {
  margin: 0 0 6px; font-family: var(--fred); font-weight: 600; font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
}
.answer p:last-child { margin: 0; font-size: 1.14rem; line-height: 1.6; color: var(--ink); }

.prose { margin-top: 30px; font-size: 1.09rem; line-height: 1.8; color: var(--body-ink); overflow-wrap: break-word; }
.prose > * { margin: 0 0 1.05em; }
.prose h2 { font-weight: 600; font-size: clamp(1.4rem, 3.8vw, 1.72rem); line-height: 1.25; letter-spacing: -.01em; margin: 1.9em 0 .5em; scroll-margin-top: 76px; }
.prose h3 { font-weight: 600; font-size: clamp(1.14rem, 3.2vw, 1.28rem); line-height: 1.3; margin: 1.5em 0 .4em; scroll-margin-top: 76px; }
.prose a, .faq a, .author a { color: var(--sprout); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover, .faq a:hover, .author a:hover { text-decoration-thickness: 2.5px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin-left: 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--line); color: var(--ink-dim); font-style: italic; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose code { font-size: .9em; background: var(--soft); padding: .1em .35em; border-radius: 5px; }
.prose pre { background: var(--soft); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .9rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0 auto; border-radius: 12px; width: auto; height: auto; max-height: min(560px, 72vh); }
/* a crop (300x390 art) sits small, like on /garden */
.prose figure img[src^="/garden/crops/"] { max-height: 220px; border-radius: 0; }
/* the post illustrations (art-*.webp) are cut out to sit straight on either theme (tools/blog-cutout.py): no card */
.prose figure img[src*="/art-"] { border-radius: 0; }
.prose figcaption { margin-top: 10px; text-align: center; font-size: .88rem; color: var(--ink-faint); }
.prose .table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--fred); font-weight: 600; background: var(--soft); color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* questions, split by hairlines */
.faq { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.faq > h2 { font-weight: 600; font-size: clamp(1.3rem, 3.8vw, 1.55rem); margin-bottom: 6px; }
.qa { padding: 16px 0; border-bottom: 1px solid var(--line); }
.qa h3 { font-weight: 600; font-size: 1.06rem; line-height: 1.35; }
.qa p { margin: 6px 0 0; color: var(--ink-dim); line-height: 1.65; }

/* the sign-off (Lukas, 2026-11-13, picked A for /facts, then the blog and FAQ too): centered on a soft block, the
   app's icon, the wordmark in the logo's own colors (index.html's hero), the slogan, the badge. The slogan sits as
   far from the badge as from the wordmark (measured in the ink at 2x, 33 to 35px each, within half a CSS pixel;
   the -1px on the badge evens them). */
.app-cta { --cta-gap: 14px; margin-top: 40px; padding: 28px 20px 30px; border-radius: 22px; background: var(--soft); text-align: center; }
.app-cta .cta-icon { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(90, 52, 12, .10), 0 6px 14px -6px rgba(90, 52, 12, .35); }
:root[data-theme="dark"] .app-cta .cta-icon { box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6); }
.app-cta p { margin: 0; }
.app-cta .cta-name { font-family: var(--fred); font-weight: 600; font-size: 1.35rem; line-height: 1; letter-spacing: .01em; }
.app-cta .cta-name .spud { color: #C07A30; }
.app-cta .cta-name .note { color: #1F0C04; }
:root[data-theme="dark"] .app-cta .cta-name .spud { color: #E7A24E; }
:root[data-theme="dark"] .app-cta .cta-name .note { color: #F2EEFF; }
.app-cta .cta-slogan { margin-top: var(--cta-gap); color: var(--ink-dim); line-height: 1.35; text-wrap: balance; }
.app-cta .appstore { display: inline-block; margin-top: calc(var(--cta-gap) - 1px); vertical-align: top; }
.app-cta .appstore img { display: block; height: 44px; width: auto; }

.author { margin-top: 20px; font-size: .9rem; color: var(--ink-faint); }
.author p { margin: 0; }

.related { margin-top: clamp(44px, 7vh, 64px); padding-top: 30px; border-top: 1px solid var(--line); }
.related > h2 { font-weight: 600; font-size: clamp(1.25rem, 3.6vw, 1.5rem); margin-bottom: 4px; }

/* ---------- /faq: one list of rows, tap a question to open it (Lukas, 2026-11-08: "click it and it
   expands. make it simple") ---------- */
.faq-list { margin-top: 0; }   /* the heading's rule is the list's top line */
.qa-row { border-bottom: 1px solid var(--line); }
.qa-row summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;
}
.qa-row summary::-webkit-details-marker { display: none; }
.qa-row summary:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; border-radius: 6px; }
.qa-q { font-family: var(--fred); font-weight: 500; font-size: clamp(1.06rem, 3vw, 1.18rem); line-height: 1.35; color: var(--ink); }
.qa-row summary:hover .qa-q { color: var(--brand); }
/* a plus that turns into a cross */
.qa-icon { position: relative; width: 14px; height: 14px; flex: none; transition: transform .25s ease; }
.qa-icon::before, .qa-icon::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 2px; background: var(--ink-faint); }
.qa-icon::after { transform: rotate(90deg); }
.qa-row[open] .qa-icon { transform: rotate(45deg); }
/* the answer: Spud beside his speech bubble, like his bubble on the landing page */
.qa-a { display: flex; align-items: flex-end; gap: 10px; padding: 0 2px 22px; }
.qa-spud { width: 40px; height: auto; flex: none; margin-bottom: 2px; }
.qa-bubble {
  position: relative; min-width: 0; padding: 12px 16px; border-radius: 18px 18px 18px 6px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 20px -16px rgba(90, 52, 12, 0.4);
  color: var(--ink); font-size: 1.02rem; line-height: 1.6;
}
:root[data-theme="dark"] .qa-bubble { box-shadow: 0 8px 20px -16px rgba(0, 0, 0, 0.6); }
.qa-bubble > * { margin: 0 0 .6em; }
.qa-bubble > :last-child { margin-bottom: 0; }
.qa-bubble a { color: var(--sprout); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
/* where the browser can, the answer slides open instead of jumping */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .qa-row::details-content { height: 0; overflow: clip; transition: height .28s ease, content-visibility .28s allow-discrete; }
  .qa-row[open]::details-content { height: auto; }
}
.faq-page .app-cta { margin-top: 48px; }
@media (prefers-reduced-motion: reduce) {
  .qa-icon { transition: none; }
  .qa-row::details-content { transition: none; }
}
