/* The Growney blog (backend/blog/build.py), on top of home.css: the same paper,
   header, footer and pencil. Photos are taped onto the page, the one-line answer
   sits on a sticky note, the post ends at its app's door. Left edges line up with
   the logo. No cards, stripes or uppercase labels (docs/SPACE_DESIGN.md §10). */

.nav a[aria-current="page"] { text-decoration: underline wavy var(--sun) 2px; text-underline-offset: 6px; }

.hand { margin: 0 0 10px; font-family: var(--font-hand); font-size: 26px; line-height: 1.15; }

/* A photo taped onto the page: a white paper edge, a strip of tape, a tilt. */
.photo {
  position: relative;
  margin: 40px 0;
  padding: 10px 10px 8px;
  background: var(--card);
  box-shadow: 0 6px 0 var(--paper-deep);
  border-radius: 6px 4px 7px 5px;
}
.photo::before {
  content: "";
  position: absolute;
  top: -14px;
  left: calc(50% - 56px);
  width: 112px;
  height: 28px;
  background: rgba(244, 227, 176, .82);
  transform: rotate(-3deg);
}
.photo img { width: 100%; border-radius: 3px; }
.photo figcaption { margin-top: 6px; color: var(--ink-muted); font-size: 13px; line-height: 1.4; }
.photo figcaption a { text-decoration-color: var(--sun); text-underline-offset: 2px; }
.tilt-left { transform: rotate(-.8deg); }
.tilt-right { transform: rotate(.7deg); }

/* Post: a newspaper page. The text runs round photos taped left and right in
   turn; the rail on the right holds the app's door, the sources and what to
   read next, so the page has no empty half. */

.post { padding-block: 16px 56px; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 56px; align-items: start; }
.post-head { grid-column: 1 / -1; max-width: 980px; margin-bottom: 28px; }
.crumbs { margin: 0 0 14px; font-family: var(--font-hand); font-size: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:first-child::before { content: "← "; }
.crumbs a:hover { text-decoration: underline wavy var(--sun) 2px; text-underline-offset: 6px; }
.post h1 { margin: 0 0 12px; font-family: var(--font-hand); font-weight: 400; font-size: 56px; line-height: 1.04; letter-spacing: -.3px; text-wrap: balance; }
.byline { margin: 0; color: var(--ink-muted); font-size: 15px; }

.prose { font-size: 19px; line-height: 1.7; }
.prose::after { content: ""; display: block; clear: both; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { display: flow-root; padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--leaf); font-weight: 700; }
.prose a { text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose h2 { margin: 40px 0 12px; font-family: var(--font-hand); font-weight: 400; font-size: 36px; line-height: 1.1; }
.prose h3 { margin: 28px 0 8px; font-size: 21px; line-height: 1.3; }

/* Photos float: the cover to the right of the opening, then left, right… */
.prose .photo { width: 50%; margin: 6px 0 22px; }
.prose .photo:nth-of-type(odd) { float: right; margin-left: 36px; transform: rotate(.7deg); }
.prose .photo:nth-of-type(even) { float: left; margin-right: 36px; transform: rotate(-.8deg); }
.prose .photo.cover { width: 56%; margin-top: 0; }

/* The one-line answer and the tips: a sticky note stuck slightly askew,
   as narrow as the text beside a photo. */
.try {
  display: flow-root;
  margin: 26px 0;
  padding: 20px 24px;
  background: var(--sun-soft);
  box-shadow: 0 5px 0 var(--paper-deep);
  border-radius: 3px 3px 22px 3px;
  transform: rotate(-.6deg);
}
.try p { margin: 0; }

/* Rail */
.post-rail { position: sticky; top: 24px; display: grid; gap: 34px; }

/* The app's door: its mascot, name and button, as on the home page's slide. */
.door-post { padding: 24px 24px 26px; border-radius: 28px 22px 30px 20px / 22px 30px 20px 28px; background: var(--tint); text-align: center; }
.door-post img { width: 150px; height: auto; margin: 0 auto 10px; }
.door-post p { margin: 0 0 12px; font-size: 16px; }
.door-post .door-name { margin: 0; font-family: var(--font-hand); font-size: 34px; line-height: 1.05; }
.door-post .door-sub { margin-bottom: 8px; font-weight: 500; color: var(--ink-muted); }
.door-post .btn { margin-top: 4px; }
.door-space { --tint: #E8E6F1; }
.door-travel { --tint: #DCEBF0; }
.door-dino { --tint: #F3E5C6; }
.door-build { --tint: #E2E8DE; }
.door-body { --tint: #E3EFED; }
.door-family { --tint: #F3DFD9; }
.door-wallet { --tint: #E1EAD6; }

.sources { color: var(--ink-muted); font-size: 14px; line-height: 1.45; }
.sources ol { margin: 0; padding-left: 1.3em; }
.sources li + li { margin-top: 6px; }
.sources a { text-decoration-color: var(--sun); text-underline-offset: 2px; }

.more ul { margin: 0; padding: 0; list-style: none; }
.more li + li { margin-top: 10px; }
.more a { font-size: 17px; font-weight: 500; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (max-width: 1100px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .door-post { grid-row: span 2; }
}

@media (max-width: 600px) {
  .post h1 { font-size: 38px; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 30px; }
  .prose .photo, .prose .photo.cover { float: none; width: auto; margin: 30px 0; }
  .post-rail { grid-template-columns: minmax(0, 1fr); }
}

/* Index: taped photos in rows of three on the 12-column grid. */

.blog { padding-block: 16px 64px; }
.blog-head { max-width: 640px; margin-bottom: 44px; }
.blog-head h1 { margin: 0 0 12px; font-family: var(--font-hand); font-weight: 400; font-size: 64px; line-height: 1; letter-spacing: -.5px; }
.blog-head .lead { margin: 0; font-size: 20px; color: var(--ink-muted); }
.entries { margin: 0; padding: 0; list-style: none; row-gap: 56px; }
.entry { grid-column: span 4; }
.entry > a { display: block; text-decoration: none; }
.entry img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  padding: 8px;
  background: var(--card);
  box-shadow: 0 6px 0 var(--paper-deep);
  border-radius: 6px 4px 7px 5px;
}
.entry-title { display: block; margin-top: 18px; font-family: var(--font-hand); font-size: 28px; line-height: 1.1; }
.entry > a:hover .entry-title { text-decoration: underline wavy var(--sun) 2px; text-underline-offset: 6px; }
.entry p { margin: 8px 0 0; color: var(--ink-muted); }
.entry .byline { font-size: 14px; }
.entry.tilt-left, .entry.tilt-right { transform: none; }
.entry.tilt-left img { transform: rotate(-1deg); }
.entry.tilt-right img { transform: rotate(.9deg); }

@media (max-width: 980px) {
  .entry { grid-column: span 6; }
}

@media (max-width: 600px) {
  .blog-head h1 { font-size: 46px; }
  .entry { grid-column: 1 / -1; }
}

/* Topics: the home page's tabs made small, the app's icon and its name.
   The open one is on paper with a bold pencil; the others' pencil is faint. */
.cats { display: flex; flex-wrap: wrap; gap: 12px; margin: -12px 0 44px; }
.cat { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 18px; background: rgba(255, 251, 242, .5); text-decoration: none; transition: background-color .2s, transform .15s; }
.cat:hover { background: rgba(255, 251, 242, .9); transform: translateY(-2px); }
.cat[aria-current="page"] { background: var(--card); transform: none; }
.cat:not([aria-current]) > svg.pencil { opacity: .3; }
.cat img { width: 36px; height: 36px; border-radius: 10px; }
.cat b { font-family: var(--font-hand); font-weight: 400; font-size: 20px; line-height: 1; }
.crumbs span { color: var(--ink-soft); }
.blog-head .crumbs { margin-bottom: 10px; }

@media (max-width: 600px) {
  .cats { gap: 8px; }
  .cat { padding: 6px 14px 6px 6px; }
  .cat img { width: 30px; height: 30px; }
  .cat b { font-size: 18px; }
}
