/* solarerp.in — blog + knowledge base (site/posts-engine).
   Loaded only by those pages, on top of site.css, and uses its tokens (--green, --line, --r-lg, ...).
   Hand-written, static: ships with a plain `git pull`, no build step. Brand is green; no amber. */

/* ---------------- Filters (category chips, module jump links) ---------------- */
.po-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.po-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font: 600 13.5px/1 var(--ff-body); color: var(--ink); white-space: nowrap; transition: border-color .15s, background-color .15s, color .15s; }
.po-chip:hover { border-color: #cfcfcf; background: var(--mist); }
.po-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- Listing ---------------- */
.po-list { padding-top: 40px; padding-bottom: 96px; }
.po-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .po-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .po-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.po-grid-sm { margin-top: 20px; }
.po-empty { padding: 56px 0; text-align: center; color: var(--slate); }

.po-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease); }
.po-card:hover { border-color: #d3dbd3; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.po-card-img, .po-card-ph { width: 100%; aspect-ratio: 1200 / 630; background: var(--band); }
.po-card-img { object-fit: cover; }
.po-card-ph { display: grid; place-items: center; color: var(--green-700); background: radial-gradient(70% 90% at 20% 0%, rgba(98, 191, 82, .16), transparent 70%), var(--green-50); }
.po-card-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 20px 22px 22px; }
.po-card-tag { align-self: flex-start; }
.po-card h2 { font: 700 19px/1.3 var(--ff-display); letter-spacing: -0.02em; color: var(--onyx); }
.po-card h2 a::after { content: ''; position: absolute; inset: 0; }   /* the whole card is the link */
.po-card p { font-size: 14.5px; color: var(--slate); }
.po-card .po-meta { margin-top: auto; padding-top: 6px; }
.po-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--ash); }

.po-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; }
.po-pager-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font: 700 13.5px/1 var(--ff-display); color: var(--ink); transition: border-color .15s, background-color .15s; }
a.po-pager-btn:hover { border-color: #cfcfcf; background: var(--mist); }
.po-pager-btn.is-off { color: var(--fog); background: var(--mist); }
.po-pager-pos { font-size: 13.5px; color: var(--ash); }

/* ---------------- Article ---------------- */
.po-kicker { margin-top: 22px; }
.po-title { max-width: 860px; }
.po-byline { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 18px; font-size: 14px; color: var(--ash); }
.po-byline span:first-child { color: var(--slate); font-weight: 600; }
.po-cover { margin: 32px 0 0; max-width: 900px; }
.po-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--r-img); border: 1px solid var(--line); }
.po-main { min-width: 0; }

/* Body. The editor's output meets .prose from site.css; these fill the gaps. */
.po-body { max-width: 720px; overflow-wrap: anywhere; }
.po-body h2, .po-body h3 { scroll-margin-top: calc(var(--header-h) + 24px); }
.po-body img { max-width: 100%; height: auto; }
.po-body pre.ql-syntax { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13.5px/1.6 var(--ff-mono); }
.po-body .ql-align-center { text-align: center; }
.po-body .ql-align-right { text-align: right; }
.po-body .ql-align-justify { text-align: justify; }
.po-body li.ql-indent-1 { margin-left: 1.5em; }
.po-body li.ql-indent-2 { margin-left: 3em; }
.po-body li.ql-indent-3 { margin-left: 4.5em; }

/* Table of contents: a card in the side rail on wide screens, a fold-out above the text on phones. */
.po-aside { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1000px) {
    .po-aside { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
    .po-aside .aside-card { position: static; }
}
.po-toc ol { margin: 0; }
.po-toc li { margin: 0; }
.po-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); font-size: 13.5px; line-height: 1.4; color: var(--slate); transition: color .15s, border-color .15s; }
.po-toc a:hover { color: var(--ink); }
.po-toc a[aria-current="true"] { border-left-color: var(--green); color: var(--green-700); font-weight: 600; }
.po-toc .lvl-3 a { padding-left: 24px; font-size: 13px; }
.po-toc-side { display: none; }
.po-toc-side .mono { margin-bottom: 8px; }
@media (min-width: 1000px) { .po-toc-side { display: block; } .po-toc-mobile { display: none; } }
.po-toc-mobile { margin-bottom: 28px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--mist); }
.po-toc-mobile summary { cursor: pointer; font: 700 14px var(--ff-display); color: var(--ink); }
.po-toc-mobile ol { margin-top: 10px; }

/* Older / newer, related, other guides. */
.po-pair { display: grid; gap: 12px; margin-top: 56px; max-width: 720px; }
@media (min-width: 640px) { .po-pair { grid-template-columns: 1fr 1fr; } }
.po-pair-link { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; transition: border-color .2s, box-shadow .25s var(--ease); }
.po-pair-link:hover { border-color: #d3dbd3; box-shadow: var(--shadow-soft); }
.po-pair-link b { font: 700 15px/1.35 var(--ff-display); letter-spacing: -0.015em; color: var(--ink); }
.po-pair-link.is-next { text-align: right; }
@media (min-width: 640px) { .po-pair-link.is-next { grid-column: 2; } }
.po-more { margin-top: 56px; }

/* ---------------- Knowledge base ---------------- */
.po-kb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.po-mod { padding-top: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.po-mod:first-child { padding-top: 0; }
.po-mod-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-bottom: 16px; }
.po-mod-head h2 { font: 700 24px/1.2 var(--ff-display); letter-spacing: -0.03em; }
.po-guides { display: grid; gap: 10px; margin-top: 4px; }
@media (min-width: 760px) { .po-mod .po-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.po-more .po-guides { max-width: 720px; margin-bottom: 0; }
.po-guide { position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 44px 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease); }
.po-guide:hover { border-color: #d3dbd3; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.po-guide b { font: 700 15.5px/1.35 var(--ff-display); letter-spacing: -0.018em; color: var(--ink); }
.po-guide span { font-size: 14px; color: var(--slate); }
/* Knowledge base: each guide wears its module's icon tile (same icon as the module page). */
.po-guide:has(.tile) { flex-direction: row; align-items: flex-start; gap: 14px; }
.po-guide .tile { flex: none; margin-top: 1px; color: #fff; }  /* beats .po-guide span's grey, so the icon stays white */
.po-guide .po-guide-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.po-guide-arrow { position: absolute; right: 16px; top: 18px; color: var(--ash); transition: transform .25s var(--ease), color .15s; }
.po-guide:hover .po-guide-arrow { transform: translateX(3px); color: var(--green-700); }

@media (max-width: 639px) {
    .po-pager-pos { display: none; }
    .po-pager { justify-content: space-between; }
}

/* ---------------- Layout builder (site/blog-seo-builder) ----------------
   Only used when an editor switches an option or adds a block; a post nobody customised never carries these classes. */
.po-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.po-byline.po-byline-plain span:first-child { color: var(--ash); font-weight: 400; }

/* Cover across the whole content width instead of the 900px card. */
.po-cover.po-cover-full { max-width: none; }
.po-cover-full img { max-height: 560px; }

/* Content width: the reading column (720px) or the full column beside the side rail. */
.po-main-wide .po-body, .po-main-wide .po-takeaways, .po-main-wide .po-faq, .po-main-wide .po-cta { max-width: none; }
.page-body.po-solo { grid-template-columns: minmax(0, 1fr); }

/* Key takeaways: a highlighted box above the article. */
.po-takeaways { max-width: 720px; margin: 0 0 32px; padding: 20px 22px 22px; border: 1px solid var(--green-100); border-left: 4px solid var(--green); border-radius: var(--r-card); background: var(--green-50); }
.po-takeaways-title { margin: 0 0 12px; font: 600 12px/1.2 var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); }
.po-takeaways ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.po-takeaways li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.55; color: var(--ink); }
.po-takeaways li::before { content: ''; position: absolute; left: 3px; top: .5em; width: 11px; height: 6px; border-left: 2px solid var(--green-700); border-bottom: 2px solid var(--green-700); transform: rotate(-45deg); }

/* FAQ: native <details>, so it works with no script and from the keyboard. */
.po-faq { max-width: 720px; margin-top: 56px; }
.po-faq-list { margin-top: 16px; border-top: 1px solid var(--line); }
.po-faq-item { border-bottom: 1px solid var(--line); }
.po-faq-item summary { position: relative; display: block; padding: 16px 36px 16px 0; cursor: pointer; list-style: none; font: 700 16px/1.4 var(--ff-display); letter-spacing: -0.015em; color: var(--ink); }
.po-faq-item summary::-webkit-details-marker { display: none; }
.po-faq-item summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ash); border-bottom: 2px solid var(--ash); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease), border-color .15s; }
.po-faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); border-color: var(--green-700); }
.po-faq-item summary:hover { color: var(--onyx); }
.po-faq-answer { padding: 0 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--slate); overflow-wrap: anywhere; }

/* End-of-article call to action. */
.po-cta { max-width: 720px; margin-top: 56px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--mist); }
.po-cta-title { margin: 0; font: 700 22px/1.25 var(--ff-display); letter-spacing: -0.025em; color: var(--onyx); }
.po-cta p { margin-top: 8px; font-size: 15.5px; line-height: 1.6; color: var(--slate); }
.po-cta .btn { margin-top: 18px; }

/* Click a screenshot to enlarge it (posts.js, section 3). */
.po-body img.po-zoomable { cursor: zoom-in; }
.po-zoom { border: 0; padding: 0; background: transparent; max-width: 98vw; max-height: 98vh; overflow: visible; }
.po-zoom::backdrop { background: rgba(10, 14, 12, .78); }
.po-zoom img { display: block; max-width: 98vw; max-height: 86vh; width: auto; height: auto; margin: 0 auto; border-radius: 10px; background: #fff; cursor: zoom-out; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.po-zoom-cap { margin: 10px auto 0; max-width: 900px; color: #fff; font: 500 15px/1.45 var(--ff-body, system-ui, sans-serif); text-align: center; }
.po-zoom-x { position: absolute; top: -14px; right: -6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #62BF52; color: #fff; font: 700 22px/36px system-ui, sans-serif; cursor: pointer; z-index: 2; }

/* Knowledge base: module icon on the jump chips, the section heads and the article hero. */
.po-chip { display: inline-flex; align-items: center; gap: 8px; }
.po-chip .tile-sm { width: 20px; height: 20px; border-radius: 6px; }
.po-chip .tile-sm .ico { width: 12px; height: 12px; }
.po-mod-head { align-items: center; }
.po-mod-head .tile { align-self: center; }
.tile-xl { width: 56px; height: 56px; border-radius: 16px; }
.tile-xl .ico { width: 28px; height: 28px; }
.po-kb-hero { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: radial-gradient(60% 120% at 0% 0%, rgba(98, 191, 82, .14), transparent 70%), var(--green-50); }
.po-kb-hero p { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.po-kb-hero b { font: 700 18px/1.25 var(--ff-display); letter-spacing: -0.02em; color: var(--onyx); }
.po-kb-hero span { font-size: 14px; color: var(--slate); }

/* Enlarge button on every screenshot (posts.js, section 3): visible on touch screens too. */
.po-body figure.po-has-zoom { position: relative; }
.po-zoom-btn { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border: 0; border-radius: 999px; background: rgba(15, 20, 18, .84); color: #fff; font: 600 13px/1 var(--ff-body, system-ui, sans-serif); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.po-zoom-btn:hover, .po-zoom-btn:focus-visible { background: #1d7a1d; }
.po-zoom-btn svg { width: 16px; height: 16px; }

