/* Blog. Same world as the home page (next.css, refinements.css): the pink playroom page, Bricolage Grotesque,
   ink #332238, the product-card pastels and their tilt. Purple surfaces are left out on purpose. */
:root { --page: #f7eafa; --ink: #332238; --muted: #635667; --body: 'Bricolage Grotesque', Arial, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--page); color: var(--ink); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.035em; }
p, li, dd { text-wrap: pretty; }

.top, .wrap, footer { width: min(100% - 32px, 760px); margin-inline: auto; }
.top { padding-top: 20px; }
.top a, footer a, .crumb { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
.top a { font-weight: 600; font-size: 15px; text-decoration: none; }
.top img { width: 28px; height: 28px; }

/* Blog home: the home page header, then the posts as tilted product cards. */
.intro { display: flex; align-items: center; gap: 1.25rem; margin: clamp(24px, 6vw, 56px) 0 clamp(32px, 6vw, 56px); }
.intro img { width: 96px; height: 96px; flex: none; }
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; font-weight: 700; }
.intro p { margin-top: .5rem; color: var(--muted); font-size: 19px; }
.posts { list-style: none; display: grid; gap: 1.75rem; }
.post-card { --surface: #ffebe0; --edge: #efd5c4; position: relative; isolation: isolate; padding: 1.4rem; background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 6px 7px 0 color-mix(in srgb, var(--edge) 35%, #8a7a8e 18%); transform: rotate(-.65deg); transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease; }
.post-card:nth-child(even) { transform: rotate(.65deg); }
.post-card:hover, .post-card:focus-within { transform: rotate(0) translateY(-3px); }
.post-card:focus-within { outline: 2px dashed var(--ink); outline-offset: 4px; }
.post-art { margin-bottom: 1.1rem; border-radius: 8px; }
.post-card h2 { margin-top: .9rem; font-size: clamp(1.45rem, 3vw, 1.75rem); line-height: 1.2; font-weight: 600; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.post-card h2 a:focus-visible { outline: none; }
.post-card p { margin-top: .6rem; color: #55455a; }
.post-card time { display: block; margin-top: .9rem; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tone-yellow { --surface: #fff1c9; --edge: #efdfa9; }
.tone-blue { --surface: #def1f5; --edge: #bfdee4; }
.tone-pink { --surface: #fbe2ec; --edge: #efc4d5; }
.tone-green { --surface: #e7f1df; --edge: #cdddc0; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 4px; background: #f0c7b2; color: #793f2c; font-size: .875rem; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.tone-yellow .tag { background: #f3dc94; color: #5f4a0c; }
.tone-blue .tag { background: #b9dfe8; color: #1f4c57; }
.tone-pink .tag { background: #f1b9ce; color: #792f4d; }
.tone-green .tag { background: #d5e4c5; color: #385029; }

/* A post. Layout from Codecademy and Homerun articles on Mobbin: back link, big title, author row,
   then contents on the left (sticky on desktop, folded on phones) and one reading column. */
.post-page { width: min(100% - 32px, 760px); margin-inline: auto; }
.crumb { margin-top: clamp(16px, 4vw, 40px); font-weight: 600; font-size: 15px; text-decoration: none; }
.post-head h1 { margin-top: .5rem; font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.02; font-weight: 700; }
.author { display: flex; align-items: center; gap: 12px; margin-top: 1.25rem; font-size: 16px; line-height: 1.4; color: var(--muted); }
.author img { width: 40px; height: 40px; flex: none; }
.author a { font-weight: 600; color: var(--ink); text-decoration: none; }
.author span { font-variant-numeric: tabular-nums; }
.nb { white-space: nowrap; }
/* On phones the read time takes its own line instead of starting one with a dot. */
@media (max-width: 640px) { .author .sep { display: none; } .author .read { display: block; } }

.toc { margin-top: 1.75rem; }
.toc details { background: #fff; border-radius: 12px; }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 1rem; font-weight: 600; font-size: 16px; white-space: nowrap; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--muted); }
.toc details[open] summary::after { content: '−'; }
.toc ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; padding: 0 1rem .75rem; }
.toc a { display: flex; align-items: center; min-height: 40px; font-size: 15px; white-space: nowrap; overflow: hidden; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); }

.post-body { margin-top: 2rem; }
.post-body > * + * { margin-top: 1rem; }
.post-body > h2 { margin-top: clamp(48px, 7vw, 72px); scroll-margin-top: 24px; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.1; font-weight: 700; }
.post-body > h3 { margin-top: 1.75rem; font-size: 1.25rem; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.post-body > h3 + p { margin-top: .35rem; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .5rem; }
.post-body ol li::marker { font-weight: 700; }
.post-body code { font: 500 .88em ui-monospace, SFMono-Regular, Menlo, monospace; }

/* The short answer: four lines you can act on, in the yellow card. */
.answer { --surface: #fff1c9; --edge: #efdfa9; margin-top: 0; padding: 1.25rem 1.4rem 1.35rem; background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 6px 7px 0 color-mix(in srgb, var(--edge) 35%, #8a7a8e 18%); }
.post-body .answer-title { margin: 0 0 .6rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.answer ul { list-style: none; padding: 0; }
.answer li { position: relative; padding-left: 1.4em; line-height: 1.45; }
.answer li::before { content: '→'; position: absolute; left: 0; color: #8a6d12; font-weight: 600; }
.answer li + li { margin-top: .55rem; }

/* Tables stay real <table>s (search and AI answers quote them) and scroll in their own box on phones.
   Rows are white pills on the page, no lines across them. */
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin-inline: -4px; padding: 0 4px 4px; }
.table-scroll:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }
.post-body table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 16px; line-height: 1.4; }
.post-body th { white-space: nowrap; padding: 0 14px 2px; text-align: left; vertical-align: bottom; font-size: 14px; font-weight: 600; color: var(--muted); }
.post-body td { padding: 12px 14px; vertical-align: top; background: #fff; }
.post-body td:first-child { border-radius: 10px 0 0 10px; }
.post-body td:last-child { border-radius: 0 10px 10px 0; }
.post-body td:first-child strong { white-space: nowrap; }
.wide table { min-width: 58rem; font-size: 15px; }
/* Phones and tablets scroll it anyway, so give each cell room for one or two lines. */
@media (max-width: 1099px) { .wide table { min-width: 70rem; } }
.wide td { padding-block: 11px; }
.wide td:first-child strong { white-space: normal; }
.wide th:first-child { width: 11%; }
.wide th:last-child { width: 16%; }
.wide th:nth-child(n+2):nth-child(-n+6) { width: 14.6%; }
/* Ship It is the first row, in the card green: across the wheel from the pink page, so it sits with it. */
.wide tbody tr:first-child td { background: #e7f1df; }
/* Phones scroll the table sideways, so the option names stay pinned on the left. */
.wide th:first-child, .wide td:first-child { position: sticky; left: 0; z-index: 1; }
.wide th:first-child { background: var(--page); }
.wide td:first-child { box-shadow: 6px 0 8px -6px rgb(51 34 56 / .18); }
@media (min-width: 1100px) { .wide td:first-child { box-shadow: none; } }
/* Marks: green check good, red cross bad, amber dash partly. Always next to the words, never color alone. */
.wide td { padding-inline: 12px; }
.wide td[class^="s-"] { position: relative; padding-left: 36px; }
.lead { display: block; font-weight: 600; }
.detail { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.mark { position: absolute; left: 10px; top: 11px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.s-yes .mark { color: #2b7a3d; }
.s-no .mark { color: #b3352c; }
.s-part .mark { color: #8a5d00; }
.s-soon .mark { color: var(--muted); }
.wide td:last-child { color: var(--muted); }
.wide td.s-none { padding-left: 14px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The tally: each count is a bar in the flower pink, number at the end. */
.tally td { vertical-align: middle; }
.tally th:last-child, .tally td.count { width: 45%; }
.count { font-variant-numeric: tabular-nums; font-weight: 600; }
.count-in { display: flex; align-items: center; gap: 10px; }
.bar { display: block; flex: none; width: calc(var(--w) * .8); min-width: 6px; height: 10px; border-radius: 99px; background: #ed4f9b; }

.post-body .sources, .post-body > p:last-child { color: var(--muted); }

/* The infographic from the LinkedIn post, near the top so people can save and share it. Its own white art, no panel.
   The share options are one column of full-width rows beside it, like Patreon's post share panel and Notion's share menu.
   Phones: the image, then the rows. */
.share-art { margin-block: 2rem 0; }
.share-art img { width: 100%; max-width: 540px; margin-inline: auto; border-radius: 10px; box-shadow: 0 8px 24px rgb(51 34 56 / .12); }
.share-art figcaption { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 1.25rem; }
.post-body .share-title { margin: 0; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.post-body .share-list { list-style: none; display: grid; gap: 8px; width: 100%; max-width: 340px; padding: 0; }
.post-body .share-list li { margin: 0; }
.share-list li[hidden] { display: none; }
.share-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 16px; border: 1px solid #eadcee; border-radius: 12px; background: #fff; color: var(--ink); font: 500 15px/1 var(--body); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.share-row:hover { border-color: #b9a3bf; }
.share-row:focus-visible { outline: 2px dashed var(--ink); outline-offset: 2px; }
.share-row svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.share-row svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The first row is the main action: Share image where the phone can share it, otherwise Download image. */
.share-native, .share-native-item[hidden] + li .save { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.share-native:hover, .share-native-item[hidden] + li .save:hover { background: #4a3550; border-color: #4a3550; }
/* When the phone can share the image itself, its share sheet covers every app, so the post links step aside. */
.share-art.can-share .social { display: none; }
@media (min-width: 700px) {
  .share-art { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: center; }
  .share-art img { margin: 0; max-width: none; }
  .share-art figcaption { align-items: flex-start; margin: 0; }
  .post-body .share-list { max-width: 260px; }
}

@media (min-width: 1100px) {
  .top, footer { width: min(100% - 64px, 1240px); }
  .post-page { width: min(100% - 64px, 1240px); display: grid; grid-template-columns: 200px minmax(0, 700px) minmax(0, 1fr); column-gap: 56px; }
  .post-head, .post-body { grid-column: 2; }
  .toc { grid-column: 1; grid-row: 1 / span 2; margin-top: clamp(16px, 4vw, 40px); }
  .toc details { position: sticky; top: 24px; background: none; }
  .toc summary { min-height: 44px; padding: 0; color: var(--ink); pointer-events: none; }
  .toc summary::after { display: none; }
  .toc ul { grid-template-columns: 1fr; padding: 0; }
  .toc a { min-height: 34px; }
  /* The comparison uses the empty space to the right of the reading column. */
  .post-body .wide { width: calc(min(100vw - 64px, 1240px) - 256px); }
}

footer { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 64px 0 24px; font-size: 15px; color: var(--muted); }

@media (max-width: 640px) {
  .intro { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .intro img { width: 72px; height: 72px; }
  .post-card { padding: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card:nth-child(even), .post-card:hover, .answer { transform: none; transition: none; }
  .toc a { transition: none; }
}
