/* ==========================================================================
   PiPO HRIS — LAYER 19 · PAGE TEMPLATE FURNITURE
   Shared chrome for the product, article and Kenya landing-page frameworks:
   breadcrumbs, hero, intro, flow, capabilities, outcomes, FAQ, related and
   article body. Every value comes from the tokens in layer 01.
   ========================================================================== */

/* ── Breadcrumbs — present but quiet ─────────────────────────────────────── */
.crumbs {
  background: var(--paper); border-bottom: 1px solid var(--line-soft);
  padding-block: .75rem; font-size: .84rem;
}
.crumbs .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; }
.crumbs a { color: var(--muted); text-decoration: none; padding: .25rem .1rem; }
.crumbs a:hover { color: var(--emerald-700); text-decoration: underline; text-underline-offset: 2px; }
.crumbs__sep { color: var(--muted-2); padding-inline: .45rem; }
.crumbs [aria-current="page"] { color: var(--ink-3); font-weight: 600; }
.on-dark .crumbs, .crumbs--dark { background: var(--ink-soft); border-bottom-color: rgba(255,255,255,.58); }

/* ── Template hero ───────────────────────────────────────────────────────── */
.tpl-hero__grid {
  display: grid; grid-template-columns: 47fr 53fr;
  gap: clamp(28px, 4vw, 64px); align-items: center;
}
@media (max-width: 1020px) { .tpl-hero__grid { grid-template-columns: 1fr; } }
.tpl-hero__grid > * { min-width: 0; }
/* With a product visual the copy shares the row; without one it still needs a
   reading measure, but the display headline gets more room to breathe. */
.tpl-hero__grid .tpl-hero__copy { max-width: 46ch; }
.tpl-hero__copy { max-width: 22ch; }
.tpl-hero__copy .lede { max-width: 46ch; }
@media (max-width: 720px) { .tpl-hero__copy { max-width: 100%; } }
.tpl-hero__copy .h-display { margin-top: 1.1rem; }
.on-dark .tpl-hero__copy .h-display { color: #fff; }
.tpl-hero__copy .lede { margin-top: 1.2rem; }
.on-dark .tpl-hero__copy .lede { color: rgba(255,255,255,.72); }
.tpl-hero__cta { margin-top: 2rem; }

/* ── Search-intent intro ─────────────────────────────────────────────────── */
.tpl-intro-sec { padding-block: clamp(48px, 5vw, 76px); background: #fff; }
.tpl-intro { max-width: 70ch; }
.tpl-intro p { font-size: 1.12rem; line-height: 1.7; color: var(--ink-3); }

/* ── Buyer problem ───────────────────────────────────────────────────────── */
.tpl-problem-sec { background: var(--paper); }
.tpl-problem { list-style: none; margin: clamp(26px, 3vw, 40px) 0 0; padding: 0;
  display: grid; gap: 1px; max-width: 80ch; }
.tpl-problem li {
  border-top: 1px solid var(--line); padding: 1.1rem 0;
  display: grid; grid-template-columns: 20px 1fr; gap: .9rem; align-items: start;
  font-size: 1.02rem; line-height: 1.6; color: var(--ink-3);
}
.tpl-problem li:last-child { border-bottom: 1px solid var(--line); }
.tpl-problem svg { width: 17px; height: 17px; color: var(--st-warning); margin-top: .22rem; }

/* ── End-to-end workflow ─────────────────────────────────────────────────── */
.tpl-flow-sec { background: #fff; }
.tpl-flow {
  list-style: none; margin: clamp(28px, 3.4vw, 46px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}
.tpl-stage { position: relative; padding-top: 1.4rem; border-top: 2px solid var(--line); }
.tpl-stage:first-child { border-top-color: var(--emerald); }
.tpl-stage__n {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--emerald-700);
}
.tpl-stage h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.022em; margin-top: .4rem; }
.tpl-stage p { font-size: .96rem; line-height: 1.55; color: var(--muted); margin-top: .5rem; }

/* ── Capabilities — editorial columns, not a card grid ───────────────────── */
.tpl-caps-sec { background: var(--paper); }
.tpl-caps {
  margin-top: clamp(28px, 3.4vw, 46px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(22px, 2.8vw, 44px);
}
.tpl-cap { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.tpl-cap h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.024em; }
.tpl-cap p { font-size: .98rem; line-height: 1.6; color: var(--muted); margin-top: .6rem; }

/* ── Role outcomes ───────────────────────────────────────────────────────── */
.tpl-outs-sec { background: #fff; }
.tpl-outs {
  margin-top: clamp(28px, 3.4vw, 46px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.tpl-out { background: #fff; padding: 20px 22px; }
.tpl-out__who {
  display: block; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--emerald-700);
}
.tpl-out b { display: block; font-size: 1.02rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.022em; margin-top: .6rem; }
.tpl-out > span:last-child { display: block; font-size: .96rem; line-height: 1.55;
  color: var(--muted); margin-top: .4rem; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.tpl-faq-sec { background: var(--paper); }
.tpl-faq { margin-top: clamp(24px, 3vw, 40px); max-width: 82ch;
  border-top: 1px solid var(--line); }
.tpl-faq__i { border-bottom: 1px solid var(--line); }
.tpl-faq__i h3 { margin: 0; }
.tpl-faq__i button {
  font: inherit; font-size: 1.05rem; font-weight: 600; letter-spacing: -.018em;
  color: var(--ink); background: none; border: 0; cursor: pointer;
  width: 100%; text-align: left; padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative; min-height: 44px;
}
.tpl-faq__i button svg {
  width: 18px; height: 18px; color: var(--muted); position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  transition: transform var(--t-std) var(--e-out);
}
.tpl-faq__i[data-acc].is-open button svg { transform: translateY(-50%) rotate(180deg); }
.tpl-faq__a { display: none; padding-bottom: 1.3rem; }
.tpl-faq__i[data-acc].is-open .tpl-faq__a { display: block; }
.tpl-faq__a p { font-size: 1rem; line-height: 1.7; color: var(--ink-3); max-width: 70ch; }

/* ── Related / explore next ──────────────────────────────────────────────── */
.rel { background: var(--mist); }
.rel .h3 { margin-bottom: clamp(20px, 2.4vw, 32px); }
.rel__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}
.rel__card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px; text-decoration: none;
  transition: border-color var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-out);
}
.rel__card:hover { border-color: var(--emerald); transform: translateY(-2px); }
.rel__card b { display: block; font-size: 1rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.02em; }
.rel__card span { display: block; font-size: .94rem; line-height: 1.5;
  color: var(--muted); margin-top: .4rem; }
.rel__k {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
  margin-top: clamp(24px, 3vw, 36px);
}
.rel__links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .9rem; }

/* ── Final CTA ───────────────────────────────────────────────────────────── */
.tpl-cta { max-width: 62ch; }
.tpl-cta .h2 { color: #fff; }
.tpl-cta .lede { color: rgba(255,255,255,.7); margin-top: 1.1rem; }
.tpl-cta .ctas { margin-top: 1.8rem; }

/* ── Reviewed-on note (regulatory pages) ─────────────────────────────────── */
.tpl-reviewed-sec { background: #fff; padding-block: clamp(32px, 3.4vw, 48px); }
.tpl-reviewed {
  font-size: .92rem; line-height: 1.6; color: var(--muted);
  border-left: 3px solid var(--line); padding-left: 1.1rem; max-width: 70ch;
}

/* ── Article ─────────────────────────────────────────────────────────────── */
.art { background: #fff; padding-block: clamp(48px, 6vw, 96px); }
.art__wrap { max-width: var(--c-read); }
.art__cat { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; }
.art__cat a { color: var(--emerald-700); text-decoration: none; }
.art h1 { margin-top: .9rem; }
.art__meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: baseline;
  margin-top: 1.6rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line);
  font-size: .92rem; color: var(--muted);
}
.art__author b { color: var(--ink); font-weight: 600; }
.art__author span { margin-left: .5rem; }
.art__toc {
  margin-top: 1.8rem; padding: 1.1rem 1.3rem; background: var(--paper);
  border-radius: var(--r-lg); border: 1px solid var(--line-soft);
}
.art__toc-k { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); }
.art__toc ul { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .4rem; }
/* A contents link is a navigation target, not prose, so it carries its own
   hit area rather than inheriting the line height of the list. */
.art__toc a {
  display: inline-flex; align-items: center; min-height: 24px;
  padding: .15rem 0; font-size: .96rem; color: var(--ink-3); text-decoration: none;
}
.art__toc a:hover { color: var(--emerald-700); text-decoration: underline; text-underline-offset: 2px; }

.art__body { margin-top: 2rem; }
.art__body > * + * { margin-top: 1.3rem; }
.art__body p { font-size: 1.08rem; line-height: 1.75; color: var(--ink-3); }
.art__body h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); letter-spacing: -.028em; margin-top: 2.6rem; }
.art__body h3 { font-size: clamp(1.18rem, 1.6vw, 1.35rem); letter-spacing: -.022em; margin-top: 2rem; }
.art__body ul, .art__body ol { padding-left: 1.3rem; display: grid; gap: .6rem; }
.art__body li { font-size: 1.05rem; line-height: 1.7; color: var(--ink-3); }
.art__body img { border-radius: var(--r-lg); border: 1px solid var(--line); }
.art__body table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.art__body th, .art__body td { text-align: left; padding: .75rem .9rem;
  border-bottom: 1px solid var(--line); }
.art__body th { background: var(--paper); font-weight: 600; color: var(--ink); }
.art__body blockquote {
  border-left: 3px solid var(--emerald); padding-left: 1.2rem;
  font-size: 1.1rem; line-height: 1.6; color: var(--ink);
}

.art__cta {
  margin-top: 2.6rem; padding: 1.3rem 1.5rem; border-radius: var(--r-lg);
  background: var(--mist); border: 1px solid rgba(8,127,91,.2);
}
.art__cta b { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--emerald-700); }
.art__cta p { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink); margin-top: .5rem; }
.art__cta .tlink { margin-top: .9rem; }

.art__bio {
  margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.art__bio b { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.art__bio > span { display: block; font-size: .9rem; color: var(--emerald-700); margin-top: .2rem; }
.art__bio p { font-size: .98rem; line-height: 1.6; color: var(--muted); margin-top: .7rem; }

@media (prefers-reduced-motion: reduce) {
  .rel__card, .tpl-faq__i button svg { transition: none !important; }
}

/* ==========================================================================
   ARTICLE CARDS — the blog listing on /resources/ and its five topic hubs
   ========================================================================== */
.tpl-arts-sec { padding-block: clamp(30px, 3.4vw, 54px); }
.tpl-arts-sec > .wrap > .h2 { margin-bottom: clamp(16px, 1.8vw, 24px); }
.tpl-arts-sec .lede { max-width: 62ch; color: var(--muted); }

.artc__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.artc {
  display: flex; flex-direction: column; gap: .5rem;
  padding: clamp(18px, 2vw, 26px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
  transition: border-color var(--t-fast) var(--e-out),
              box-shadow var(--t-fast) var(--e-out),
              transform var(--t-fast) var(--e-out);
}
.artc:hover {
  border-color: var(--emerald-300);
  box-shadow: 0 10px 30px -22px rgba(11,26,22,.5);
  transform: translateY(-2px);
}
.artc:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
.artc__cat {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-ink);
}
.artc__t { font-size: 1.1rem; line-height: 1.3; font-weight: 700; color: var(--ink); margin: 0; }
.artc:hover .artc__t { color: var(--emerald-700); }
.artc__d { font-size: .9rem; line-height: 1.6; color: var(--ink-3); margin: 0; flex: 1 1 auto; }
.artc__m {
  font-family: var(--font-mono); font-size: .68rem; color: var(--muted-2);
  padding-top: .6rem; border-top: 1px solid var(--line-soft);
}
@media (prefers-reduced-motion: reduce) { .artc { transition: none; } .artc:hover { transform: none; } }

/* Reading time sits with the byline; tags close the article out. */
.art__read {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em;
  color: var(--gold-ink); white-space: nowrap;
}
.art__tags {
  display: flex; flex-wrap: wrap; gap: .45rem; list-style: none;
  margin: clamp(22px, 2.4vw, 32px) 0 0; padding: 0;
}
.art__tags li {
  font-size: .78rem; color: var(--ink-3);
  padding: .28rem .7rem; background: var(--mist);
  border: 1px solid var(--line-soft); border-radius: 100px;
}
/* The byline link is a standalone target rather than a word inside a
   sentence, so it carries its own hit area. */
.art__bio b a {
  display: inline-flex; align-items: center; min-height: 24px;
  color: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.art__bio b a:hover { color: var(--emerald-700); }

/* ── A tighter hero ──────────────────────────────────────────────────────
   Used by the calculator pages and by every article. It lives here rather than
   in the calculator layer because an article does not load that layer — which
   is exactly how it went wrong the first time. */
.tpl-hero--tight { padding-block: clamp(28px, 3.2vw, 52px); }
/* wider, not narrower — the headline should sit on one or two lines rather
   than stacking into a column, which is what makes a hero tall */
.tpl-hero--tight .tpl-hero__copy { max-width: 60ch; }
.tpl-hero--tight .h-display {
  font-size: clamp(1.85rem, 3.2vw, 2.7rem); margin-top: .65rem;
}
.tpl-hero--tight .lede { margin-top: .7rem; font-size: 1.02rem; max-width: 56ch; }

/* ── The article's own hero band ─────────────────────────────────────────
   An article had no dark band under the header, so the white logo rendered on
   a white page. It now opens the way every other page does. */
.tpl-hero--art .art__head { max-width: 58ch; }
.tpl-hero--art .art__cat { margin: 0 0 .7rem; }
.tpl-hero--art .art__cat a {
  display: inline-flex; align-items: center; min-height: 24px;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--gold-lt);
  text-decoration: none;
}
.tpl-hero--art .art__cat a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tpl-hero--art .h-display {
  color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin: 0;
}
.tpl-hero--art .art__meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.1rem;
  margin-top: 1.1rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 0;
}
.tpl-hero--art .art__author b { color: #fff; }
.tpl-hero--art .art__author span, .tpl-hero--art .art__dates {
  color: rgba(255,255,255,.62);
}
.tpl-hero--art .art__read { color: var(--gold-lt); }
.art__wrap > .art__toc:first-child { margin-top: clamp(24px, 3vw, 40px); }
