/* Blog and About pages. Builds on site.css and uses the same colours. */

/* ---------- Article layout ---------- */
.post { max-width: 780px; padding-top: clamp(24px, 4vw, 48px); padding-bottom: var(--section); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span { margin: 0 6px; }

.post-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.post-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(36px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.035em;
  text-wrap: balance;
}
.post-meta { font-size: 15px; color: var(--muted); line-height: 1.5; }
.post-meta a { color: var(--ink); font-weight: 700; }

/* ---------- Contents ---------- */
.answer + .toc { margin-top: 20px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; margin-bottom: 40px; }
.toc ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.toc li::marker { color: var(--muted); }
.toc li { font-size: 15.5px; line-height: 1.45; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Body text ---------- */
.post-body { font-size: 18px; line-height: 1.7; color: #3A3832; }
.post-body > * + * { margin-top: 18px; }
.post-body h2 {
  font-family: var(--display); font-weight: 800; color: var(--ink);
  font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.025em;
  margin-top: 56px; scroll-margin-top: 24px; text-wrap: balance;
}
.post-body h3 { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.3; margin-top: 32px; }
.post-body h2 + *, .post-body h3 + * { margin-top: 12px; }
.post-body a { color: var(--char); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body strong { color: var(--ink); }
.post-body ul, .post-body ol { margin-bottom: 0; padding-left: 24px; }
.post-body li + li { margin-top: 8px; }
.post-body li::marker { color: var(--muted); }
.post-body code { font-size: 0.88em; background: var(--panel); border-radius: 6px; padding: 2px 6px; }
.post-body blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold); color: var(--ink); font-style: italic;
}

/* Short answer at the top of a post (and anywhere a direct answer helps) */
.answer { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.answer .eyebrow { display: block; margin-bottom: 8px; }
.answer p { color: var(--ink); font-size: 17.5px; line-height: 1.6; }
.answer p + p, .answer ul { margin-top: 10px; }

/* Plain side note */
.note { background: var(--panel); border-radius: 18px; padding: 18px 22px; font-size: 16.5px; }
.note strong:first-child { display: block; margin-bottom: 4px; }

/* Numbered steps */
.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; min-height: 32px; }
.steps > li + li { margin-top: 14px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--char); color: #fff;
  font-size: 14px; font-weight: 800; line-height: 32px; text-align: center;
}

/* Tables scroll sideways on small screens instead of breaking the page */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; min-width: 560px; }
.post-body th, .post-body td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.post-body th { font-size: 13px; font-weight: 800; letter-spacing: 0.4px; color: var(--muted); background: var(--bg); }
.post-body tr:last-child td { border-bottom: 0; }
.post-body td:first-child { font-weight: 700; color: var(--ink); }
.table-note { font-size: 14px; color: var(--muted); }

/* App card: where YourPriority fits the answer */
.app-box {
  background: var(--char); color: #fff; border-radius: 24px; padding: 24px 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.app-box .eyebrow { color: var(--gold); }
.app-box p { color: var(--on-char); font-size: 16.5px; line-height: 1.6; }
.app-box p strong { color: #fff; }
.app-box a.btn { align-self: flex-start; margin-top: 6px; text-decoration: none; }
.post-body .app-box a:not(.btn) { color: #fff; }

/* Drawing of a YourPriority block screen (reuses .mini-shield from site.css) */
.figure { background: var(--panel); border-radius: 22px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.figure figcaption { font-size: 14px; color: var(--muted); text-align: center; max-width: 420px; }
.figure .mini-shield { max-width: 290px; }
.post-body .figure .mini-shield strong { color: #fff; font-size: 17px; }
.post-body .figure .mini-shield .gold { text-decoration: none; }
.figure .mini-shield .ghost { margin-top: 2px; font-size: 13px; font-weight: 700; color: #fff; }

/* ---------- FAQ, sources, author, related ---------- */
.post-faq { padding-bottom: 0; margin-top: 56px; gap: 18px; }
.post-faq h2, .sources h2, .related h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.025em;
}
.post-faq summary { font-size: 17px; }
.post-faq details p { font-size: 16.5px; }
.sources { margin-top: 48px; }
.sources ol { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.sources a { color: var(--muted); word-break: break-word; }
.sources a:hover { color: var(--ink); }
.author-box {
  margin-top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px;
  display: flex; gap: 18px; align-items: flex-start;
}
.author-box img { width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.author-box p { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.author-box .author-name { font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.author-box a { color: var(--ink); }
.related { margin-top: 56px; }
.related h2 { margin-bottom: 20px; }

/* ---------- Blog list ---------- */
.blog-index { padding-top: clamp(32px, 5vw, 64px); padding-bottom: var(--section); }
.blog-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); max-width: 760px; }
.blog-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 6vw, 80px); line-height: 0.98; letter-spacing: -0.045em; }
.blog-head .lead { max-width: 620px; }

/* ---------- Post cards (blog list and "Keep reading") ---------- */
.card-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(36px, 4vw, 52px) clamp(20px, 2.4vw, 32px);
}
.card { position: relative; display: flex; flex-direction: column; gap: 18px; }
.card-img {
  aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(122,108,78,0.12);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.035); }
.card-text { display: flex; flex-direction: column; gap: 10px; }
.card h2, .card h3 {
  font-family: var(--display); font-weight: 800; color: var(--ink);
  font-size: clamp(22px, 2vw, 25px); line-height: 1.16; letter-spacing: -0.022em; text-wrap: balance;
}
.card h2 a, .card h3 a { color: inherit; text-decoration: none; }
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; } /* whole card is the link */
.card:hover h2 a, .card:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card a:focus-visible { outline: none; }
.card:has(a:focus-visible) { outline: 3px solid var(--char); outline-offset: 6px; border-radius: 24px; }
.card-text p:not(.eyebrow) { font-size: 16px; line-height: 1.55; color: var(--muted); }
.card .card-text p.card-meta { font-size: 14px; }

/* The newest post is shown large, with the picture beside the text */
@media (min-width: 900px) {
  .card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 4vw, 56px); align-items: center; }
  .card-featured .card-img { border-radius: 28px; }
  .card-featured h2 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.06; letter-spacing: -0.035em; }
  .card-featured .card-text p:not(.eyebrow) { font-size: 17.5px; }
  .card-featured .card-text { gap: 14px; }
  .card-featured h2 a::after { border-radius: 28px; }
}

/* Smaller cards under "Keep reading" */
.card-grid-small { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 28px 20px; }
.card-grid-small .card { gap: 12px; }
.card-grid-small .card-img { border-radius: 16px; }
.card-grid-small h3 { font-size: 18px; line-height: 1.22; }
.card-grid-small .card-text p:not(.eyebrow):not(.card-meta) { display: none; }
.card-grid-small h3 a::after { border-radius: 16px; }

/* ---------- Cover picture at the top of a post ---------- */
.post-cover { margin: 0 0 32px; }
.post-cover img { width: 100%; height: auto; border-radius: 24px; box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(122,108,78,0.16); }
@media (min-width: 900px) {
  /* a little wider than the text column */
  .post-cover { width: min(1040px, calc(100vw - 2 * var(--gutter))); position: relative; left: 50%; transform: translateX(-50%); margin-bottom: 40px; }
  .post-cover img { border-radius: 30px; }
}

@media (max-width: 560px) {
  .post-body { font-size: 17px; }
  .author-box { flex-direction: column; }
}
