/*
 * Page kit: the shared look for every public page, matching the home page and dashboards.
 * Hero (.page-head), sections (.pk-sec), headings (.pk-head), cards (.pk-card / .pk-grid),
 * tabs (.pk-tabs), link tiles (.pk-tiles), chips (.pk-chips), prose (.pk-prose) and CTAs (.pk-cta).
 */

/* ---------- Hero: the home page's rounded dark panel, sized for inner pages ---------- */
.page-head { padding: 14px clamp(10px, 1.6vw, 22px) 0; background: none; border: 0; }
.page-head > .site-container {
    position: relative; overflow: hidden; border-radius: 28px; color: #fff; max-width: none;
    padding: clamp(30px, 4vw, 54px) clamp(22px, 4.4vw, 64px) clamp(34px, 4.4vw, 58px);
    background:
        radial-gradient(640px 380px at 92% 0%, rgba(233, 215, 168, .16), transparent 62%),
        radial-gradient(520px 340px at 0% 100%, rgba(30, 107, 82, .42), transparent 65%),
        linear-gradient(155deg, #24524A 0%, #163A32 58%, #12302A 100%);
}
.page-head > .site-container::before {
    content: "\00A7"; position: absolute; right: -30px; bottom: -150px; pointer-events: none;
    font: 300 400px/1 var(--heading); color: rgba(233, 215, 168, .06);
}
.page-head .crumbs { position: relative; color: rgba(255, 255, 255, .7); margin-bottom: 18px; }
.page-head .crumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.page-head .crumbs a:hover { color: #E9D7A8; }
.page-head .crumbs li + li::before { color: rgba(255, 255, 255, .4); }
.page-head h1 { position: relative; font: 700 clamp(32px, 4.4vw, 54px)/1.08 var(--heading); letter-spacing: -.025em; margin: 0 0 12px; color: #fff; max-width: 22ch; }
.page-head__lede { position: relative; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: #CFDDD6; margin: 0; max-width: 62ch; }
.page-head__kicker { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(233, 215, 168, .3); color: #F3E6C2; font: 600 13.5px var(--sans); }
.page-head__kicker i { color: #E9D7A8; }
.page-head__actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.page-head__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .page-head__grid { grid-template-columns: 1fr; } }

/* Search box inside a hero */
.pk-search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 14px; border-radius: 20px; background: #fff; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .7); }
.pk-search label { display: flex; flex-direction: column; gap: 5px; }
.pk-search span { font: 700 12.5px var(--sans); color: var(--slate); }
.pk-search select, .pk-search input { height: 46px; padding: 0 12px; border: 1.5px solid var(--rule); border-radius: 12px; font: 500 15px var(--sans); color: var(--ink); background: #fff; width: 100%; box-sizing: border-box; }
.pk-search select:focus, .pk-search input:focus { outline: 0; border-color: var(--action); box-shadow: 0 0 0 3px rgba(30, 107, 82, .16); }
.pk-search button { align-self: end; height: 46px; }
@media (max-width: 700px) { .pk-search { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; font: 700 15px var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap; }
.pk-btn--primary { background: var(--action); color: #fff; }
.pk-btn--primary:hover { background: #17573F; color: #fff; }
.pk-btn--gold { background: #E9D7A8; color: var(--binding); }
.pk-btn--gold:hover { background: #F3E6C2; color: var(--binding); }
.pk-btn--line { background: #fff; border-color: var(--rule); color: var(--ink); }
.pk-btn--line:hover { border-color: var(--action); color: var(--action); }
.pk-btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.pk-btn--ghost-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pk-btn:focus-visible { outline: 3px solid var(--brass, #C9A257); outline-offset: 2px; }

/* ---------- Sections ---------- */
.pk-sec { padding: clamp(44px, 5vw, 72px) 0 0; }
.pk-sec:last-of-type { padding-bottom: clamp(56px, 6vw, 88px); }
.pk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.pk-head h2 { font: 700 clamp(26px, 2.7vw, 36px)/1.15 var(--heading); letter-spacing: -.02em; margin: 0 0 8px; color: var(--ink); }
.pk-head p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--slate); max-width: 64ch; }
.pk-link { display: inline-flex; align-items: center; gap: 6px; font: 700 15px var(--sans); color: var(--action); text-decoration: none; }
.pk-link:hover { text-decoration: underline; }

/* ---------- Tabs ---------- */
.pk-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 16px; background: #fff; border: 1px solid var(--rule); margin-bottom: 26px; }
.pk-tabs button, .pk-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: none; font: 600 14.5px var(--sans); color: var(--slate); cursor: pointer; text-decoration: none; }
.pk-tabs button:hover, .pk-tabs a:hover { color: var(--ink); background: #F2F5F3; }
.pk-tabs .is-active, .pk-tabs [aria-selected="true"] { background: var(--binding); color: #fff; }
.pk-tabs .is-active:hover, .pk-tabs [aria-selected="true"]:hover { background: var(--binding); color: #fff; }
.pk-tabs i { font-size: 17px; }
.pk-panel[hidden] { display: none; }

/* ---------- Cards ---------- */
.pk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .pk-grid, .pk-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pk-grid, .pk-grid--2, .pk-grid--4 { grid-template-columns: 1fr; } }
.pk-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: #fff; border: 1px solid var(--rule); }
a.pk-card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.pk-card:hover { border-color: #9DBFB1; box-shadow: 0 22px 44px -30px rgba(24, 58, 51, .55); transform: translateY(-2px); }
.pk-card h3 { margin: 0; font: 700 19px/1.25 var(--heading); color: var(--ink); }
.pk-card h3 a { color: inherit; text-decoration: none; }
.pk-card h3 a:hover { color: var(--action); }
.pk-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--slate); }
.pk-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #E4EFE9; color: var(--action); font-size: 24px; flex-shrink: 0; }
.pk-ico--gold { background: #E9D7A8; color: var(--binding); }
.pk-ico--dark { background: var(--binding); color: #E9D7A8; }
.pk-card__top { display: flex; align-items: center; gap: 14px; }
.pk-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.pk-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; color: var(--ink); text-decoration: none; font: 500 15px var(--sans); }
.pk-list a:hover { background: #F2F5F3; color: var(--action); }
.pk-list a i { color: #A3ACA8; font-size: 14px; }
.pk-list a:hover i { color: var(--action); }
.pk-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #EEF1EF; }

/* Link tiles: a dense grid of named links (states, topics, letters) */
.pk-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pk-tiles a { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 48px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1px solid var(--rule); color: var(--ink); font: 600 14.5px var(--sans); text-decoration: none; transition: border-color .15s, color .15s; }
.pk-tiles a:hover { border-color: var(--action); color: var(--action); }
.pk-tiles a i { color: #A3ACA8; font-size: 14px; }
.pk-tiles a:hover i { color: var(--action); }

/* Letter picker */
.pk-letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pk-letters button, .pk-letters a { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--rule); background: #fff; font: 700 14.5px var(--sans); color: var(--ink); cursor: pointer; display: grid; place-items: center; text-decoration: none; }
.pk-letters button:hover:not(:disabled), .pk-letters a:hover { border-color: var(--action); color: var(--action); }
.pk-letters .is-active { background: var(--binding); border-color: var(--binding); color: #fff; }
.pk-letters button:disabled, .pk-letters .is-off { opacity: .35; cursor: default; }

/* Chips */
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pk-chips li, .pk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: #EEF3F0; color: #2F4A41; font: 600 13px var(--sans); }

/* ---------- Prose: long-form reading ---------- */
.pk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.pk-layout--toc { grid-template-columns: 240px minmax(0, 1fr); }
@media (max-width: 1000px) { .pk-layout, .pk-layout--toc { grid-template-columns: 1fr; } }
.pk-prose { font-size: 17px; line-height: 1.72; color: #2A322F; max-width: 72ch; }
.pk-prose > :first-child { margin-top: 0; }
.pk-prose h2 { font: 700 clamp(23px, 2.2vw, 29px)/1.25 var(--heading); letter-spacing: -.015em; color: var(--ink); margin: 40px 0 12px; scroll-margin-top: 100px; }
.pk-prose h3 { font: 700 20px/1.3 var(--heading); color: var(--ink); margin: 28px 0 8px; scroll-margin-top: 100px; }
.pk-prose p { margin: 0 0 16px; }
.pk-prose ul, .pk-prose ol { margin: 0 0 18px; padding-left: 22px; }
.pk-prose li { margin-bottom: 8px; }
.pk-prose a { color: var(--action); font-weight: 600; text-underline-offset: 3px; }
.pk-prose blockquote { margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid #E9D7A8; background: #FBF7EC; border-radius: 0 12px 12px 0; }
.pk-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.pk-prose th, .pk-prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.pk-prose img { max-width: 100%; height: auto; border-radius: 16px; }
.pk-toc { position: sticky; top: 96px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--rule); }
.pk-toc h2 { margin: 0 0 10px; font: 700 14px var(--sans); color: var(--slate); }
.pk-toc ol, .pk-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pk-toc a { display: block; padding: 7px 10px; border-radius: 9px; font: 500 14px/1.35 var(--sans); color: var(--ink); text-decoration: none; }
.pk-toc a:hover, .pk-toc a.is-active { background: #EEF7F2; color: var(--action); }
@media (max-width: 1000px) { .pk-toc { position: static; } }

/* Sidebar boxes */
.pk-aside { display: grid; gap: 16px; position: sticky; top: 96px; }
@media (max-width: 1000px) { .pk-aside { position: static; } }
.pk-box { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--rule); }
.pk-box h2, .pk-box h3 { margin: 0 0 8px; font: 700 17px/1.3 var(--heading); color: var(--ink); }
.pk-box p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--slate); }
.pk-box--dark { background: linear-gradient(155deg, #24524A, #163A32); border: 0; color: #fff; }
.pk-box--dark h2, .pk-box--dark h3 { color: #fff; }
.pk-box--dark p { color: rgba(255, 255, 255, .78); }
.pk-box--gold { background: linear-gradient(150deg, #F6EBCD, #EEDDB0); border: 0; }
.pk-box .pk-btn { width: 100%; }

/* ---------- Closing call to action ---------- */
.pk-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(26px, 3.4vw, 44px); border-radius: 26px; background: radial-gradient(520px 300px at 100% 0%, rgba(233, 215, 168, .18), transparent 60%), linear-gradient(155deg, #24524A, #163A32); color: #fff; }
.pk-cta h2 { margin: 0 0 6px; font: 700 clamp(24px, 2.4vw, 32px)/1.2 var(--heading); color: #fff; }
.pk-cta p { margin: 0; color: #CFDDD6; font-size: 16.5px; max-width: 58ch; }
.pk-cta__act { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 800px) { .pk-cta { grid-template-columns: 1fr; } }

/* Small helpers */
.pk-note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: #FBF3DC; border: 1px solid #EFDFAE; color: #5C4610; font-size: 14.5px; }
.pk-note i { font-size: 19px; color: #9A7B2F; flex-shrink: 0; }
.pk-muted { color: var(--slate); }
