/* Blog list + article styles (works with style.css and human.css) */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* hero search */
.blog-search { margin-top: 26px; display: flex; gap: 10px; max-width: 560px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 6px; border-radius: 999px; }
.blog-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: inherit; font-size: 16px; padding: 10px 16px; outline: none; }
.blog-search input::placeholder { color: #9FB2C8; }
.blog-search .btn { padding: 10px 22px; }

/* category chips */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.cat-chips a { text-decoration: none; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-size: 15px; font-weight: 500; transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .2s, border-color .2s; }
.cat-chips a small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.cat-chips a:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--green); }
.cat-chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-chips a.on small { color: var(--lime); }
.blog-count { margin: -14px 0 26px; color: var(--muted); }
.blog-sub { font-size: clamp(24px, 3vw, 32px); margin: 56px 0 22px; }

/* cards */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.post-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--green); box-shadow: 0 22px 44px rgba(10,26,51,.12); }
.pc-img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--mist); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.post-card:hover .pc-img img { transform: scale(1.06) rotate(.6deg); }
.pc-ph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 30%, #7BE0A8, #17855A 70%); }
.pc-ph span { font: 700 72px/1 var(--f-hand, cursive); color: #fff; transform: rotate(-8deg); }
.pc-body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pc-cat { position: relative; z-index: 2; text-decoration: none; color: var(--green); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.pc-title { font-size: 21px; line-height: 1.2; }
.pc-title a { text-decoration: none; }
.pc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pc-ex { color: var(--muted); font-size: 15.5px; }
.pc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); padding-top: 8px; }
.pc-more { color: var(--green); font-weight: 600; transition: letter-spacing .3s; }
.post-card:hover .pc-more { letter-spacing: .02em; }
.post-card--big { display: grid; grid-template-columns: 1.15fr 1fr; }
.post-card--big .pc-img { aspect-ratio: auto; min-height: 320px; }
.post-card--big .pc-body { padding: 34px; justify-content: center; }
.post-card--big .pc-title { font-size: clamp(26px, 3vw, 36px); }
.post-card--big .pc-foot { margin-top: 14px; }

.blog-empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--line); border-radius: 24px; display: grid; gap: 14px; justify-items: center; }
.blog-empty h2 { font-size: 30px; }
.blog-empty p { color: var(--muted); max-width: 32em; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 46px; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; background: var(--white); }
.pager a:hover { border-color: var(--green); }
.pager span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* article */
.preview-bar { background: #F5C451; color: var(--ink); text-align: center; padding: 10px 16px; font-weight: 600; font-size: 15px; }
.post-hero h1 { max-width: 20em; }
.post-meta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #9FB2C8; font-size: 15px; }
.post-meta b { color: #fff; font-weight: 600; }
.pm-av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lime); color: var(--ink); font: 700 20px/1 var(--f-hand, cursive); }
.pm-av.big { width: 64px; height: 64px; font-size: 36px; flex: none; }

.post-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-block: 56px 80px; align-items: start; }
.post-aside { position: sticky; top: 100px; display: grid; gap: 28px; }
.toc-t { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); display: grid; gap: 2px; }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: 14.5px; color: var(--muted); line-height: 1.35; transition: color .2s, border-color .2s, padding .3s; }
.toc li.l3 a { padding-left: 28px; font-size: 13.5px; }
.toc li a:hover, .toc li a.on { color: var(--ink); border-color: var(--green); }
.toc li a.on { font-weight: 600; padding-left: 18px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share .toc-t { width: 100%; margin: 0; }
.share a, .share button { font: inherit; font-size: 13.5px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); text-decoration: none; cursor: pointer; color: var(--text); }
.share a:hover, .share button:hover { border-color: var(--green); color: var(--green); }

.post-main { max-width: 740px; min-width: 0; }
.post-cover { margin: 0 0 36px; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(10,26,51,.12); transform: rotate(-.6deg); }
.post-cover img { width: 100%; height: auto; }

.post-body { font-size: 18px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 1.9em; scroll-margin-top: 100px; }
.post-body h3 { font-size: clamp(21px, 2.4vw, 24px); margin-top: 1.6em; scroll-margin-top: 100px; }
.post-body h4 { font-family: var(--f-display); font-size: 19px; margin-top: 1.4em; }
.post-body a { color: var(--green); font-weight: 500; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .4em; }
.post-body ul li::marker { color: var(--green); }
.post-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--lime); font: 600 22px/1.45 var(--f-display); color: var(--ink); }
.post-body img { border-radius: 16px; margin-inline: auto; }
.post-body figure { margin: 1.8em 0; }
.post-body figcaption { text-align: center; font: 600 19px/1.3 var(--f-hand, cursive); color: var(--muted); margin-top: 10px; }
.post-body pre { background: var(--ink); color: #E4ECE8; padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: 14.5px; line-height: 1.6; }
.post-body code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--mist); padding: 2px 6px; border-radius: 6px; }
.post-body pre code { background: none; padding: 0; }
.post-body hr { border: 0; height: 12px; margin: 2.4em auto; width: 120px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12'%3E%3Cpath d='M1 6c5-6 8-6 13 0s8 6 13 0 8-6 12 0' fill='none' stroke='%2317855A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 40px 12px repeat-x; }
.post-body mark { background: linear-gradient(104deg, transparent .2em, rgba(123,224,168,.55) .3em, rgba(123,224,168,.55) calc(100% - .1em), transparent) no-repeat 0 85% / 100% .5em; color: inherit; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 480px; }
.post-body th, .post-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body th { background: var(--mist); font-weight: 600; }
.post-body tr:last-child td { border-bottom: 0; }
.post-body .callout { padding: 18px 22px 18px 58px; border-radius: 16px; background: rgba(123,224,168,.16); border: 1.5px solid rgba(23,133,90,.25); position: relative; }
.post-body .callout::before { content: "✎"; position: absolute; left: 20px; top: 14px; font-size: 24px; color: var(--green); }
.post-body .callout-warn { background: rgba(245,196,81,.18); border-color: rgba(201,140,0,.3); }
.post-body .callout-warn::before { content: "!"; font-weight: 800; color: #B07800; left: 26px; }
.post-body .callout-info { background: rgba(16,43,82,.06); border-color: rgba(16,43,82,.18); }
.post-body .callout-info::before { content: "i"; font-weight: 800; color: var(--ink-2); left: 27px; font-family: Georgia, serif; }
.post-body .key-takeaways { padding: 22px 26px; border-radius: 18px; background: var(--ink); color: var(--on-ink); }
.post-body .key-takeaways strong, .post-body .key-takeaways b { color: var(--lime); }
.post-body .cta-box { padding: 26px; border-radius: 18px; background: var(--lime); color: var(--ink); text-align: center; font-weight: 600; }
.post-body .cta-box a { color: var(--ink); }
.post-body .embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.post-body .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-body p.lead { font-size: 21px; color: var(--ink); }

.post-faq { margin-top: 56px; }
.post-faq h2 { font-size: 30px; margin-bottom: 18px; }
.post-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a { text-decoration: none; font-size: 14px; padding: 5px 12px; background: var(--mist); border-radius: 999px; color: var(--ink); }
.post-tags a:hover { background: var(--lime); }
.author-box { margin-top: 40px; display: flex; gap: 18px; padding: 24px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); }
.ab-n { font: 700 26px/1 var(--f-hand, cursive); color: var(--ink); }
.ab-r { font-size: 14px; color: var(--green); font-weight: 600; margin: 4px 0 8px; }
.author-box p:last-child { color: var(--muted); font-size: 15.5px; }
.post-cta { margin-top: 34px; padding: 34px; border-radius: 24px; background: var(--ink); color: var(--on-ink); display: grid; gap: 12px; position: relative; overflow: hidden; }
.post-cta .dh { font-size: 28px; color: #fff; }
.post-cta p:last-child { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.post-nav { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a { text-decoration: none; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 16px; display: grid; gap: 4px; background: var(--white); }
.post-nav a.r { text-align: right; grid-column: 2; }
.post-nav a:hover { border-color: var(--green); }
.post-nav small { color: var(--muted); font-size: 13px; }
.post-nav span { font-weight: 600; line-height: 1.35; }

@media (max-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .post-aside { position: static; order: 2; margin-top: 40px; }
  .toc { order: -1; }
  .post-main { max-width: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  /* show the table of contents before the article on tablets/phones */
  .post-layout { display: flex; flex-direction: column; }
  .post-aside { order: 0; margin: 0 0 28px; }
  .post-aside .share { display: none; }
  .toc { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
}
@media (max-width: 720px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .post-card--big { grid-template-columns: minmax(0, 1fr); }
  .post-card--big .pc-img { min-height: 0; aspect-ratio: 1200 / 630; }
  .post-card--big .pc-body { padding: 22px; }
  .post-body { font-size: 17px; }
  .post-body blockquote { font-size: 19px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav a.r { grid-column: 1; }
  .post-cta { padding: 26px 22px; }
  .author-box { flex-direction: column; }
  .blog-search { border-radius: 18px; }
}
.blog-search .btn { width: auto !important; flex: none; margin: 0 !important; }
@media (max-width: 420px) { .blog-search .btn { padding: 10px 16px; } }
