/* All rules belong to this one page. No resets or global typography changes. */
.pkmah-page .pkmah-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 16px; min-height: 166px; margin: 0 0 8px; padding: 10px 24px; border: 1px solid var(--line, #e4d8f0); border-radius: 24px; background: radial-gradient(ellipse at 12% 70%, rgba(255, 155, 47, .12), transparent 42%), radial-gradient(ellipse at 88% 55%, rgba(141, 56, 232, .10), transparent 42%), linear-gradient(110deg, #fff9f1, #fff 50%, #faf5ff); }
.pkmah-page .pkmah-hero-copy { min-width: 0; text-align: center; }
.pkmah-page .pkmah-hero .pkm-breadcrumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 10px; font-size: 13px; }
.pkmah-page .pkmah-hero .entry-title { margin: 0; font-size: clamp(34px, 4.5vw, 54px); line-height: 1.1; overflow-wrap: anywhere; text-align: center; }
.pkmah-page .pkmah-hero-pet { min-width: 0; display: grid; place-items: center; pointer-events: none; }
.pkmah-page .pkmah-hero .pkmah-hero-mascot { display: block; width: 144px; max-width: 100%; height: auto; margin: 0; border-radius: 0; object-fit: contain; }
/* PRO has no switches for these labels. Keep its renderer and tree intact. */
.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero > .pk5-breadcrumb,
.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero > .pk5-tree-eyebrow,
.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-center > strong,
.pkmah-page .pk5-knowledge-hub > .pk5-seo-foot { display: none; }
.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-center { min-width: 0; }
.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-center > small { margin-top: 0; white-space: normal; overflow-wrap: anywhere; }
.pkmah-page .pk5-knowledge-hub { padding-top: 8px; padding-bottom: 4px; }
.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero { padding-top: 20px; padding-bottom: 20px; }
.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero > h2,
.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero > p { margin-left: auto; margin-right: auto; }
/* These two properties must override PRO's later inline !important spacing. */
.pkmah-page .pk5-knowledge-hub > .pk5-latest-tree { margin-top: 30px !important; padding-top: 24px !important; }
.pkmah-page .pkmah-jump { margin: 18px 0; text-align: center; }
.pkmah-page .pkmah-jump a { display: inline-block; }
.pkmah-page .pkmah-archive { scroll-margin-top: 115px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #e4d8f0); }
.pkmah-page .pkmah-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 12px; }
.pkmah-page .pkmah-filters a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line, #e4d8f0); border-radius: 999px; background: #fff; color: var(--purple, #6623c7); text-decoration: none; font-weight: 800; }
.pkmah-page .pkmah-filters a[aria-current="true"] { background: var(--purple, #6623c7); color: #fff; border-color: var(--purple, #6623c7); }
.pkmah-page .pkmah-count { margin: 0 0 18px; color: var(--muted, #646075); font-size: 14px; }
.pkmah-page .pkmah-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pkmah-page .pkmah-grid .post-card { min-width: 0; background: #fff; border: 1px solid var(--line, #e4d8f0); border-radius: 20px; box-shadow: 0 12px 30px rgba(40, 18, 74, .08); overflow: hidden; }
.pkmah-page .pkmah-grid .thumb { display: block; height: 165px; overflow: hidden; background: linear-gradient(135deg, #fff2e4, #f1e4ff); }
.pkmah-page .pkmah-grid .thumb picture { display: block; width: 100%; height: 100%; }
.pkmah-page .pkmah-grid .thumb img { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.pkmah-page .pkmah-grid .noimg { display: grid; place-items: center; font-size: 60px; text-decoration: none; }
.pkmah-page .pkmah-grid .post-card-content { position: relative; min-width: 0; padding: 16px; }
.pkmah-page .pkmah-grid .badge { display: inline-block; position: relative; max-width: 100%; margin-top: -36px; padding: 6px 9px; border-radius: 8px; background: linear-gradient(135deg, var(--purple, #6623c7), #d84ca2); color: #fff; font-size: 12px; font-weight: 900; text-transform: uppercase; overflow-wrap: anywhere; }
.pkmah-page .pkmah-grid h3 { margin: 10px 0; font-size: 18px; line-height: 1.22; overflow-wrap: anywhere; }
.pkmah-page .pkmah-grid h3 a { color: var(--ink, #100d2b); text-decoration: none; }
.pkmah-page .pkmah-grid .post-meta { padding-right: 35px; font-size: 13px; color: var(--muted, #646075); }
.pkmah-page .pkmah-grid .round-arrow { position: absolute; right: 10px; bottom: 8px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: #f4ebff; color: var(--purple, #6623c7); text-decoration: none; }
.pkmah-page .pkmah-pagination { margin-top: 28px; }
.pkmah-page .pkmah-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pkmah-page .pkmah-pagination li { margin: 0; padding: 0; }
.pkmah-page .pkmah-pagination a,
.pkmah-page .pkmah-pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line, #e4d8f0); border-radius: 12px; background: #fff; text-decoration: none; }
.pkmah-page .pkmah-pagination span.current { color: #fff; background: var(--purple, #6623c7); }
.pkmah-page .pkmah-filters a:focus-visible,
.pkmah-page .pkmah-pagination a:focus-visible,
.pkmah-page .pkmah-hero a:focus-visible,
.pkmah-page .pkmah-jump a:focus-visible,
.pkmah-page .pkmah-grid a:focus-visible { outline: 3px solid #b34700; outline-offset: 3px; }
.pkmah-page .pkmah-grid .thumb:focus-visible { outline-offset: -3px; }
.pkmah-page .pkmah-diagnostics { margin-top: 24px; padding: 16px; border: 1px solid #b78000; border-radius: 12px; background: #fff9e9; color: #493300; }
.pkmah-page .pkmah-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 1025px) {
	/* Remove PRO's 780px cap, retaining its font size and natural wrapping. */
	.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero > h2 { max-width: 100%; }
}
@media (max-width: 1024px) {
	.pkmah-page .pkmah-hero { min-height: 136px; gap: 12px; padding: 10px 18px; }
	.pkmah-page .pkmah-hero .pkmah-hero-mascot { width: 114px; }
	.pkmah-page .pkmah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	/* Parent menu: (20px + 11px) * 1.55 + 16px padding + 2px border + 10px bottom = 76.05px. */
	.pkmah-page { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
	.pkmah-page .pkmah-hero { grid-template-columns: 50px minmax(0, 1fr) 50px; gap: 6px; min-height: 104px; padding: 10px 8px; border-radius: 20px; }
	.pkmah-page .pkmah-hero .pkmah-hero-mascot { width: 50px; }
	.pkmah-page .pkmah-hero .entry-title { font-size: 34px; }
	.pkmah-page .pkmah-hero .pkm-breadcrumbs { font-size: 11px; gap: 4px; margin-bottom: 8px; }
	.pkmah-page .pk5-knowledge-hub { padding-top: 8px; padding-bottom: 4px; }
	.pkmah-page .pkmah-jump { margin: 14px 0; }
	.pkmah-page .pkmah-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.pkmah-page .pkmah-grid .post-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
	.pkmah-page .pkmah-grid .thumb { height: 112px; }
	.pkmah-page .pkmah-grid .post-card-content { padding: 12px; }
	.pkmah-page .pkmah-grid .badge { margin-top: 0; font-size: 10px; }
	.pkmah-page .pkmah-grid h3 { font-size: 14px; }
	.pkmah-page .pkmah-grid .post-meta { padding-right: 0; font-size: 11px; }
	.pkmah-page .pkmah-grid .round-arrow { display: none; }
	.pkmah-page .pkmah-archive { scroll-margin-top: 92px; }
}
@media (max-width: 600px) {
	/* Stack only the latest-guides heading; its existing border stays below both texts. */
	.pkmah-page .pk5-knowledge-hub > .pk5-latest-tree > .pk5-section-head { flex-direction: column; align-items: stretch; gap: 7px; text-align: left; }
	.pkmah-page .pk5-knowledge-hub > .pk5-latest-tree > .pk5-section-head > h2,
	.pkmah-page .pk5-knowledge-hub > .pk5-latest-tree > .pk5-section-head > p { width: 100%; min-width: 0; max-width: 100%; }
	/* PRO adds an important 7px margin; use the single gap above instead. */
	.pkmah-page .pk5-knowledge-hub > .pk5-latest-tree > .pk5-section-head > h2 { margin-bottom: 0 !important; }
}
@media (max-width: 390px) {
	.pkmah-page .pk5-knowledge-hub > .pk5-tree-hero { padding-top: 18px; padding-bottom: 18px; }
	/* Fixed decoration slots preserve both emoji pairs; only the centre grows. */
	.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner { grid-template-columns: 46px minmax(0, 1fr) 46px; margin-top: 18px !important; }
	.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-side { min-width: 0; flex-wrap: wrap; gap: 2px; font-size: 22px !important; }
	.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-center { padding-left: 0; padding-right: 0; }
	/* Match PRO's !important declarations without changing its banner height. */
	.pkmah-page .pk5-knowledge-hub > .pk5-moro-banner > .pk5-moro-center > small { font-size: 13px !important; line-height: 1.6; font-weight: 700; letter-spacing: .02em !important; text-align: center; }
}
@media (max-width: 360px) {
	.pkmah-page .pkmah-hero { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 4px; padding: 8px 6px; min-height: 94px; }
	.pkmah-page .pkmah-hero .pkmah-hero-mascot { width: 32px; }
	.pkmah-page .pkmah-hero .entry-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
	.pkmah-page .pkmah-grid .post-card { transition: none; }
	.pkmah-page .pkmah-grid .post-card:hover { transform: none; }
}
