/* blog.css — the blog pages. Layout here; colours and font come from lib/palette.mjs. */
/* palette:start */
  /* written by website/apply-palette.mjs from lib/palette.mjs; change colours and font there, not here */
  :root { --sans: 'Helvetica Neue',Helvetica,Arial,sans-serif; --ground: #ffffff; --paper: #f3f6f5; --ink: #1b2320; --muted: #4f5c57; --soft: #7b8883; --line: #dfe6e3; --teal: #1f6f66; --teal-ink: #ffffff; --teal-wash: #e3f1ee; --manila: #efe3bd; --manila-edge: #d9c78f; --manila-ink: #3d3421; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --ground: #121816; --paper: #182120; --ink: #e8eeec; --muted: #adb9b4; --soft: #82908a; --line: #283330; --teal: #6cc0b4; --teal-ink: #0d1614; --teal-wash: #16302c; --manila: #3a3322; --manila-edge: #5a4e30; --manila-ink: #efe3bd; color-scheme: dark; }
  }
  :root[data-theme="dark"] { --ground: #121816; --paper: #182120; --ink: #e8eeec; --muted: #adb9b4; --soft: #82908a; --line: #283330; --teal: #6cc0b4; --teal-ink: #0d1614; --teal-wash: #16302c; --manila: #3a3322; --manila-edge: #5a4e30; --manila-ink: #efe3bd; color-scheme: dark; }
  /* palette:end */

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 18px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
a { color: var(--teal); }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; }

/* header: the home page's, plus a Blog link */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px; }
.name { display: inline-flex; align-items: center; gap: 10px; font: 600 22px/1 var(--sans); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.name img { width: 32px; height: 32px; flex: none; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.nav a.link[aria-current="page"], .nav a.link:hover { color: var(--teal); }
.button { display: inline-flex; align-items: center; justify-content: center; font: 600 16px/1 var(--sans); text-decoration: none; border-radius: 10px;
  padding: 14px 20px; background: var(--teal); color: var(--teal-ink); border: 0; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); padding: 11px 16px; }
.button.big { padding: 17px 26px; font-size: 17px; }

/* images: a rounded frame; the picture fills it */
.img { aspect-ratio: 16 / 9; border-radius: 14px; background: var(--teal-wash); overflow: hidden; }
.img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- list page ---------- */
.index-head { padding-block: 36px 36px; max-width: 720px; }
.index-head h1 { font-size: clamp(2.3rem, 4.2vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; }
.index-head p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }

.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.feature h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em; margin-top: 8px; }
.feature h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.feature h2 a:hover, .card h3 a:hover { color: var(--teal); }
.feature p { margin-top: 12px; color: var(--muted); }
.meta { color: var(--soft); font-size: 15px; }

.grid { list-style: none; margin: 0; padding: 48px 0 80px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }
.card .img { aspect-ratio: 3 / 2; }
.card .meta { margin-top: 16px; }
.card h3 { margin-top: 6px; font-size: 1.2rem; line-height: 1.3; }
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* ---------- post page ---------- */
.post { display: grid; grid-template-columns: minmax(0, 680px) 300px; gap: 64px; justify-content: space-between; align-items: start; }
.crumb { padding-top: 12px; font-size: 15px; }
.crumb a { color: var(--soft); text-decoration: none; }
.crumb a:hover { color: var(--teal); }
article h1 { margin-top: 14px; font-size: clamp(2.1rem, 4vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; }
.byline { margin-top: 20px; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 15.5px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.byline strong { color: var(--ink); font-weight: 600; }
.nw { white-space: nowrap; }
.hero-img { margin-top: 28px; }
.caption { margin-top: 10px; font-size: 14px; color: var(--soft); }
.body { margin-top: 32px; }
.body > * + * { margin-top: 20px; }
.body h2 { margin-top: 44px; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.body h3 { margin-top: 32px; font-size: 1.2rem; line-height: 1.3; }

/* the answer first: what an AI or a skimming reader lifts out */
.takeaways { background: var(--teal-wash); border-radius: 14px; padding: 22px 24px; }
.body .takeaways h2 { margin-top: 0; font-size: 1.05rem; color: var(--teal); }
.takeaways ul { margin: 10px 0 0; }
.takeaways li { color: var(--ink); }

.faq h3 { margin-top: 26px; font-size: 1.1rem; }
.faq h3:first-child { margin-top: 12px; }
.faq p { margin-top: 8px; color: var(--muted); }

.author { margin-top: 36px; display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line); }
.author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.author h2 { font-size: 1rem; color: var(--muted); }
.author p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.author strong { color: var(--ink); }
.body sup { line-height: 0; }
.body ul, .body ol { padding-left: 1.2em; }
.body li + li { margin-top: 8px; }
.body .lead { font-size: 1.16rem; color: var(--ink); }
.body .img { margin-top: 28px; }

/* the one place the article sells: plainly labelled, at the end */
.help { margin-top: 48px; background: var(--paper); border-radius: 16px; padding: 30px; }
.help h2 { font-size: 1.4rem; }
.help p { margin-top: 10px; color: var(--muted); }
.help .actions { margin-top: 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.help .actions a.alt { font-weight: 600; font-size: 16px; }

.sources { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--soft); }
.sources h2 { font-size: 1rem; color: var(--muted); }
.sources ol { margin: 10px 0 0; padding-left: 1.2em; }

.prevnext { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prevnext a { display: block; padding: 18px 20px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; color: var(--ink); }
.prevnext a:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.prevnext small { display: block; color: var(--soft); font-size: 14px; margin-bottom: 6px; }
.prevnext strong { font-weight: 600; font-size: 16.5px; line-height: 1.35; display: block; }
.prevnext .next { text-align: right; }

/* side column: fills the right-hand space with something useful, and stays in view */
.side { position: sticky; top: 24px; display: grid; gap: 20px; margin-top: 52px; }
.book { background: var(--paper); border-radius: 16px; padding: 24px; }
.book .who { display: flex; gap: 12px; align-items: center; }
.book .who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.book .who p { font-size: 15px; line-height: 1.4; color: var(--muted); }
.book .who strong { color: var(--ink); display: block; font-size: 16px; }
.book h2 { margin-top: 16px; font-size: 1.15rem; line-height: 1.3; }
.book p.sub { margin-top: 8px; font-size: 15.5px; color: var(--muted); }
.book .button { width: 100%; margin-top: 18px; }
.book .or { margin-top: 12px; text-align: center; font-size: 15px; }
.toc { padding: 4px 4px 0; }
.toc h2 { font-size: .95rem; color: var(--soft); font-weight: 600; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; border-left: 2px solid var(--line); }
.toc li { padding: 5px 0 5px 14px; font-size: 15px; line-height: 1.4; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--teal); }

.related { border-top: 1px solid var(--line); margin-top: 72px; padding-top: 44px; }
.related > h2 { font-size: 1.5rem; }
.related .grid { padding-top: 28px; }

footer { padding-block: 36px 48px; color: var(--soft); font-size: 14.5px; line-height: 1.7; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }


@media (max-width: 1000px) {
  .post { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* on narrow screens the "How I can help" box already carries the booking button */
  .side { display: none; }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 36px; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { text-align: left; }
}
@media (max-width: 460px) {
  .top { gap: 10px; flex-wrap: wrap; }
  .name { font-size: 18px; white-space: nowrap; gap: 8px; }
  .name img { width: 28px; height: 28px; }
  .nav { gap: 14px; }
  .top .button { white-space: nowrap; padding: 11px 15px; font-size: 15px; }
  .help { padding: 22px; }
  .help .button.big { width: 100%; }
}
