/* Knowledge hub (board PM-8), the guide collections and the article cards shared with the guide pages.
   Every component comes from site.css; this file only sets the hub layout and the few local pieces (.kh-*).
   Desktop values match the board at 1280 px (board px × 1.36). Section padding comes from the shared .sec / .how /
   .cta-band-section (var(--sec-y)) and heading gaps from .section-head (var(--sec-head-gap)), so no section here sets its own. */

/* ============================================================ hero: search, topic pills and the hub laptop */
.kh-hero .page-hero-inner { min-height: 392px; }
.kh-hero .hero-badge { min-height: 30px; margin-bottom: 12px; padding: 0 15px 0 13px; gap: 8px; font-size: 13px; letter-spacing: .02em; }
.kh-hero .hero-badge > .icon { width: 20px; height: 20px; }
.kh-hero .page-hero-title { font-size: clamp(32px, 2.4vw + 14px, 45px); line-height: 1.1; }
.kh-hero .page-hero-intro { max-width: 600px; margin-top: 10px; font-size: 18.75px; line-height: 1.38; }
.kh-hero .search-bar--hero { max-width: 596px; min-height: 51px; margin-top: 24px; padding: 6px 5px 6px 52px; border-radius: var(--r-pill); }
.kh-hero .search-bar-icon { left: 20px; width: 20px; height: 20px; margin-top: -10px; stroke-width: 2.2; }
.kh-hero .search-bar-input { min-height: 37px; font-size: 16.5px; }
.kh-hero .search-bar-input::placeholder { color: #6b7280; }
.kh-hero .search-bar-btn { min-height: 38px; padding: 0 19px; border-radius: var(--r-pill); background: #64f0cf; font-size: 16.5px; font-weight: 800; }
.kh-hero .search-bar-btn:hover { background: #46e0bb; }
.kh-hero .page-hero-pills { gap: 8px; margin-top: 24px; }
.kh-hero .pill { min-height: 34px; padding: 0 10px; border-width: 1.5px; font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; }
.kh-hero .pill.is-active { border-color: #52f0c6; background: #52f0c6; }
/* Laptop screen: sidebar plus the knowledge hub cards */
.kh-hero .device-lid { width: 56.2em; }
.kh-hero .hero-blob--a { left: 46em; top: -3.8em; width: 21.5em; height: 27.5em; border-radius: 48% 52% 46% 54% / 42% 44% 56% 58%; background: linear-gradient(180deg, #2df0d6 0%, #1fd3c3 50%, #15aea8 100%); }
.kh-hero .hero-blob--c { left: -2.3em; top: 20.1em; width: 13.8em; height: 13.8em; }
.kh-hero .device-screen { grid-template-columns: 15.4em minmax(0, 1fr); height: 29em; }
.kh-hero .device-side { padding: 2.2em .9em 1em 1em; }
.kh-hero .device-brand { margin: 0 0 1.5em .45em; font-size: 1.25em; }
.kh-hero .device-nav { gap: .28em; }
.kh-hero .device-nav li { gap: .75em; min-height: 2.75em; padding: 0 .75em; font-size: 1.2em; }
.kh-hero .device-nav li .icon { width: 1.4em; height: 1.4em; }
.kh-hero .device-main { gap: 1.7em; padding: 3em 1.7em 1.5em; }
.kh-screen-top { display: flex; flex: none; align-items: center; gap: 1.4em; height: 13.9em; padding: 1.1em 1.2em; }
.kh-screen-photo { display: block; flex: none; width: 14.4em; height: 100%; overflow: hidden; border-radius: .75em; background: linear-gradient(180deg, #8dc2fc 0%, #b7d9fd 75%); }
.kh-screen-photo svg { width: 100%; height: 100%; }
.kh-screen-top .dash-lines { flex: 1; gap: 1.05em; }
.kh-screen-top .dash-lines i { height: .7em; background: #cfd8e5; }
.kh-screen-top .dash-lines i:nth-child(-n + 2) { height: .85em; background: #5b76a3; }
.kh-screen-top .dash-lines i:nth-child(1) { width: 100%; }
.kh-screen-top .dash-lines i:nth-child(2) { width: 72%; }
.kh-screen-top .dash-lines i:nth-child(3) { width: 100%; margin-top: .4em; }
.kh-screen-top .dash-lines i:nth-child(4) { width: 80%; }
.kh-screen-top .dash-lines i:nth-child(5) { width: 42%; margin-top: .4em; }
.kh-hero .dash-row { flex: 1; gap: 1.5em; }
.kh-screen-mini { display: flex; align-items: center; gap: 1.2em; padding: 1em 1.1em; }
.kh-screen-tile { display: grid; place-items: center; flex: none; width: 5.6em; height: 5.6em; border-radius: .7em; background: #deebfe; color: #2680fb; }
.kh-screen-tile .icon { width: 3em; height: 3em; }
.kh-screen-mini .dash-lines { flex: 1; gap: .6em; }
.kh-screen-mini .dash-lines i { height: .55em; background: #cfd8e5; }
.kh-screen-mini .dash-lines i:nth-child(-n + 2) { height: .65em; background: #5b76a3; }
.kh-screen-mini .dash-lines i:nth-child(1) { width: 100%; }
.kh-screen-mini .dash-lines i:nth-child(2) { width: 84%; }
.kh-screen-mini .dash-lines i:nth-child(3) { width: 74%; }
.kh-screen-mini .dash-lines i:nth-child(4) { width: 52%; }
@media (min-width: 1100px) {
  .kh-hero .page-hero-inner { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 0; }
  .kh-hero .page-hero-copy { padding-left: 20px; }
  .kh-hero .page-hero-pills { flex-wrap: nowrap; width: max-content; }
  .kh-hero .page-hero-media { align-self: center; max-width: 527px; margin: 0 -7px 12px 0; }
}

/* ============================================================ featured article */
.kh-feature {
  position: relative; display: grid; grid-template-columns: 442px minmax(0, 1fr); align-items: center; gap: 34px;
  min-height: 279px; padding: 19px 253px 19px 19px;
  border: 1px solid #e8eef8; border-radius: 19px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f1f6fc 100%); box-shadow: 0 8px 22px rgba(16, 36, 77, .05);
}
.kh-feature-photo { width: 100%; height: 239px; border-radius: 14px; object-fit: cover; }
.kh-feature-copy { position: relative; z-index: 1; min-width: 0; }
.kh-feature-badge { min-height: 30px; padding: 0 15px; background: #c4fceb; color: #04231d; font-size: 13px; letter-spacing: .02em; }
.kh-feature h2 { margin-top: 12px; font-size: 27px; line-height: 1.15; }
.kh-feature p { margin-top: 10px; color: #4f5361; font-size: 17px; font-weight: 500; line-height: 1.5; }
.kh-feature-btn { --btn-h: 46px; min-width: 177px; margin-top: 18px; border-radius: 13px; background: #031f47; font-size: 17px; font-weight: 700; }
.kh-feature-btn:hover { background: #10305f; }
.kh-feature-art {
  position: absolute; right: 13px; top: 50%; width: 264px; height: auto; transform: translateY(-50%);
  /* the crop carries the board card's own background: fade its edges into this card so no box shows */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 10%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

/* ============================================================ browse by topic */
.kh-topic-grid { gap: clamp(16px, .6vw + 9px, 22px); }
.kh-topic.icon-card--topic { min-height: 133px; padding: 14px 50px 19px 29px; gap: 9px; border-color: #e6edf8; border-radius: 16px; background: #f4f8fe; }
.kh-topic .icon-card-icon { width: 44px; height: 44px; }
.kh-topic .icon-card-icon .icon { stroke-width: 2; }
.kh-topic .icon-card-body { align-content: center; min-height: 47px; }
.kh-topic .icon-card-title { font-size: 18px; line-height: 1.3; }
.kh-topic .icon-card-arrow { right: 11px; bottom: 27px; width: 31px; height: 31px; box-shadow: 0 1px 4px rgba(16, 36, 77, .1); }
.kh-topic .icon-card-arrow .icon { color: #112c5f; }
.kh-topic--tax .icon-card-icon { color: #0a7448; }
.kh-topic--accounting .icon-card-icon { color: #0b4a83; }
.kh-topic--company-setup .icon-card-icon { color: #0f7a46; }
.kh-topic--payroll .icon-card-icon { color: #155f98; }
.kh-topic--compliance .icon-card-icon { color: #0f7a46; }
.kh-topic--business-growth .icon-card-icon { color: #12d27a; }
.kh-glyph-fill { fill: #33dc8e; }
.kh-glyph-accent { stroke: #19c96b; }
.kh-glyph-bar { fill: currentColor; stroke: none; }

/* ============================================================ article cards (hub, collections, related guides) */
.kh-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, .8vw + 14px, 28px) clamp(18px, .6vw + 11px, 24px); list-style: none; padding: 0; }
.kh-post { display: flex; min-width: 0; }
.kh-post[hidden] { display: none; }
.kh-post .post-card { position: relative; flex: 1; flex-direction: row; min-height: 188px; padding: 8px; border-color: #e8eef8; border-radius: 16px; background: linear-gradient(180deg, #fff 0%, #f6f9fe 100%); box-shadow: 0 4px 14px rgba(16, 36, 77, .04); }
.kh-post .post-card-media { position: static; flex: none; width: 121px; aspect-ratio: auto; overflow: hidden; border-radius: 11px; }
.kh-post .post-card-img { height: 100%; }
.kh-post .post-card-tag { left: 148px; top: 17px; bottom: auto; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: #c7fced; color: #06231c; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.kh-post .post-card-body { gap: 5px; padding: 44px 10px 6px 19px; }
.kh-post .post-card-title { font-size: 17px; line-height: 1.2; }
.kh-post .post-card-text { color: #5c6170; font-size: 15px; font-weight: 500; line-height: 1.4; }
.kh-post .post-meta { justify-content: space-between; gap: 6px 14px; padding-top: 9px; color: #4f5566; font-size: 13.5px; }
.kh-post .post-meta .icon { width: 17px; height: 17px; color: #1d3561; }

/* ============================================================ latest articles */
.kh-more { padding: 0; border: 0; background: none; font-size: 17px; }
.kh-more[hidden] { display: none; }
.kh-status { margin: -6px 0 18px; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.kh-status:empty { display: none; }

/* ============================================================ tools and resources */
.kh-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, .6vw + 11px, 24px); list-style: none; padding: 0; }
.kh-tool { display: flex; align-items: flex-start; gap: 33px; min-width: 0; min-height: 156px; padding: 18px 18px 16px 20px; border: 1px solid #e6edf8; border-radius: 16px; background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%); }
.kh-tool-icon { display: grid; place-items: center; flex: none; width: 78px; height: 78px; border-radius: 16px; background: #dcf9f1; color: #0d8a57; }
.kh-tool-icon .icon { width: 54px; height: 54px; stroke-width: 1.75; }
.kh-tool-copy { min-width: 0; margin-top: -4px; }
.kh-tool-copy h3 { font-size: 20px; line-height: 1.2; }
.kh-tool-copy p { margin-top: 6px; color: #545966; font-size: 15.5px; font-weight: 500; line-height: 1.38; }
.kh-tool-btn { --btn-h: 38px; margin-top: 18px; padding: 0 17px; border-color: #0e1d42; border-radius: 13px; font-size: 16px; font-weight: 700; }

/* ============================================================ inbox panel (preview form: nothing is sent or stored) */
.kh-news-panel { display: grid; grid-template-columns: 79px minmax(0, 1fr) 460px; align-items: center; gap: 0 28px; min-height: 124px; padding: calc(var(--sec-y) * .6) 24px; border-radius: 19px; background: linear-gradient(90deg, #eafafa 0%, #f2fbfc 100%); }
.kh-news-icon { display: grid; place-items: center; width: 79px; height: 78px; margin-bottom: 4px; border-radius: 16px; background: #cdfbef; color: #0f7a4f; }
.kh-news-icon .icon { width: 44px; height: 44px; stroke-width: 1.6; }
.kh-news-icon .kh-glyph-fill { fill: #44efc0; }
.kh-news-copy { margin-bottom: 9px; }
.kh-news-copy h2 { font-size: 25.5px; line-height: 1.2; }
.kh-news-copy p { margin-top: 8px; color: #50575f; font-size: 15px; font-weight: 500; }
.kh-news-form { align-self: start; min-width: 0; }
.kh-news-row { display: flex; }
.kh-news-input { flex: 1; min-width: 0; min-height: 45px; padding: 0 16px; border: 1px solid #d9e0ea; border-right: 0; border-radius: 13px 0 0 13px; background: #fff; color: var(--ink); font-size: 15.5px; }
.kh-news-input::placeholder { color: #6b7280; opacity: 1; }
.kh-news-input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31, 107, 239, .18); }
.kh-news-btn { --btn-h: 45px; flex: none; min-width: 140px; padding: 0 18px; border-radius: 0 13px 13px 0; box-shadow: none; font-size: 16.5px; font-weight: 700; }
.kh-news-ticks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 15px; padding-left: 8px; }
.kh-news-ticks li { gap: 7px; color: #4e565e; font-size: 14px; font-weight: 500; }
.kh-news-ticks .icon { width: 18px; height: 18px; margin-top: 0; color: #0fb453; stroke-width: 2.6; }
.kh-news-status { margin-top: 8px; color: #0b5b45; font-size: 14px; font-weight: 600; }
.kh-news-status:empty { display: none; }

/* ============================================================ CTA band */
@media (min-width: 1100px) {
  .kh-cta .wrap-wide { width: min(100% - 36px, var(--container-bleed)); }
  .kh-cta--hub .cta-band { gap: 24px 104px; padding-left: 42px; }
  .kh-cta--hub .cta-band-copy h2 { font-size: 30px; }
  .kh-cta--hub .cta-band-copy p { font-size: 17px; }
  .kh-cta--hub .cta-band-actions .btn-primary { min-width: 222px; }
}

/* ============================================================ dense desktop (1100-1240 px) */
@media (min-width: 1100px) and (max-width: 1240px) {
  .kh-topic.icon-card--topic { padding: 14px 42px 19px 18px; }
  .kh-topic .icon-card-title { font-size: 16px; }
  .kh-topic .icon-card-arrow { right: 9px; width: 28px; height: 28px; }
  .kh-tool { gap: 18px; padding: 16px 14px 16px 16px; }
  .kh-tool-icon { width: 64px; height: 64px; }
  .kh-tool-icon .icon { width: 44px; height: 44px; }
  .kh-tool-btn { padding: 0 14px; font-size: 15px; }
  /* the split band would push the copy onto the left decoration and the button onto the right one */
  .kh-cta--hub .cta-band { flex-direction: column; gap: 16px; padding: 22px 48px 24px; }
  .kh-roadmap .how-panel { grid-template-columns: 260px minmax(0, 1fr); }
  .kh-roadmap .how-arrow { display: none; }
}

/* ============================================================ guide collections and guide heroes (photo instead of the laptop) */
.kh-photo-hero .page-hero-inner { min-height: 340px; }
.kh-hero-photo { position: relative; width: 100%; padding: 0 1.2em 1.2em 3.4em; }
.kh-hero-photo img { width: 100%; aspect-ratio: 3 / 2; border-radius: 1.8em; object-fit: cover; box-shadow: var(--shadow-lg); }
.kh-photo-hero .hero-blob--a { left: 44em; top: -2.2em; width: 20em; height: 20em; }
.kh-photo-hero .hero-blob--b { left: -1em; top: 14em; width: 17em; height: 17em; }
.kh-photo-hero .hero-blob--c { left: .6em; top: 30em; width: 10em; height: 10em; }
@media (min-width: 1100px) {
  .kh-photo-hero .page-hero-inner { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); }
  .kh-photo-hero .page-hero-media { align-self: center; max-width: 560px; margin: 0; }
}
.kh-roadmap .how-panel { grid-template-columns: 300px minmax(0, 1fr); }
.kh-roadmap .how-intro h2 { font-size: var(--fs-h2-sm); text-wrap: balance; }

/* ============================================================ tablet and mobile */
@media (max-width: 1099px) {
  .kh-hero .page-hero-intro { font-size: 17px; }
  .kh-br { display: none; }
  .kh-feature { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; padding: 16px; }
  .kh-feature-photo { height: 100%; min-height: 220px; }
  .kh-feature-art { display: none; }
  .kh-topic-grid.grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kh-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .kh-tool-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .kh-tool { min-height: 0; gap: 22px; }
  .kh-news-panel { grid-template-columns: 79px minmax(0, 1fr); gap: 16px 22px; }
  .kh-news-form { grid-column: 1 / -1; }
  .kh-roadmap .how-panel { grid-template-columns: minmax(0, 1fr); }
  .kh-photo-hero .page-hero-media { margin-bottom: 0; }
  .kh-hero-photo { padding-bottom: 28px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .kh-guides .kh-post:last-child:nth-child(odd):not(:only-child), .kh-related .kh-post:last-child:nth-child(odd):not(:only-child) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
}
@media (max-width: 767px) {
  .kh-hero .search-bar-btn { padding: 0 18px; }
  .kh-feature { grid-template-columns: minmax(0, 1fr); }
  .kh-feature-photo { height: auto; min-height: 0; aspect-ratio: 442 / 239; }
  .kh-feature h2 { font-size: 24px; }
  .kh-topic-grid.grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kh-topic.icon-card--topic { min-height: 118px; padding: 14px 46px 18px 18px; }
  .kh-posts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .kh-post .post-card { min-height: 170px; }
  .kh-post .post-card-media { width: 104px; }
  .kh-post .post-card-tag { left: 128px; }
  .kh-tool { gap: 16px; padding: 16px; }
  .kh-tool-icon { width: 60px; height: 60px; border-radius: 14px; }
  .kh-tool-icon .icon { width: 40px; height: 40px; }
  .kh-news-panel { grid-template-columns: minmax(0, 1fr); padding: calc(var(--sec-y) * .75) 18px; }
  .kh-news-row { flex-direction: column; gap: 10px; }
  .kh-news-input { min-height: 48px; border-right: 1px solid #d9e0ea; border-radius: 13px; }
  .kh-news-btn { border-radius: 13px; }
}
@media (max-width: 479px) {
  .kh-hero .search-bar--hero { padding-left: 44px; }
  .kh-hero .search-bar-icon { left: 16px; }
  .kh-hero .search-bar-input { font-size: 16px; text-overflow: ellipsis; }
  .kh-hero .search-bar-btn { padding: 0 15px; font-size: 15.5px; }
  .kh-topic-grid.grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-topic .icon-card-title { font-size: 16.5px; }
}

/* Without JavaScript the hero search and topic pills cannot filter anything (all articles show), so hide them. */
@media (scripting: none) {
  .kh-hero .search-bar, .kh-hero .page-hero-pills { display: none; }
}
