/* ============================================================
   KENNISBANK · hub + blog detail
   Pairs with home.css topribbon + footer styles.
   ============================================================ */

/* ============ HUB: HERO ============ */
.kb-hero {
  position: relative;
  padding: 96px 56px 64px;
  max-width: 1320px;
  margin: 0 auto;
}
.kb-hero-inner {
  max-width: 920px;
}
.kb-hero .eyebrow-big {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.kb-hero .eyebrow-big .bar {
  width: 28px; height: 2px;
  background: var(--grad-line);
  border-radius: 2px;
}
.kb-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.kb-hero h1 .grad {
  background: var(--grad-full-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kb-hero .lede {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 720px;
  margin: 0 0 8px;
}

/* ============ HUB: TYPE LEGEND ============ */
.kb-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  max-width: 1320px;
  margin: 8px auto 0;
  padding: 0 56px 8px;
}
.kb-legend .kb-chip {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--chip-bg, #FFF3E4);
  color: var(--chip-color, #C2620A);
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(0,0,0,0.04);
}
.kb-legend .kb-chip::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--chip-accent, #FB993F);
}

/* ============ HUB: GRID ============ */
.kb-grid-wrap {
  max-width: 1320px;
  margin: 32px auto 80px;
  padding: 0 56px;
}
.kb-grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.kb-grid-head .kb-count {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--ink-4); letter-spacing: 0.04em; text-transform: uppercase;
}

/* Featured: spans full row, large cover left + content right */
.kb-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--r-2xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}
.kb-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.kb-featured-tag {
  position: absolute; top: 32px; left: 32px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  z-index: 2;
  border: 1px solid rgba(0,0,0,0.06);
}
.kb-featured-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad-line);
}
.kb-featured .kb-cover {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16 / 11;
}
.kb-featured-body {
  padding: 16px 24px 16px 8px;
  display: flex; flex-direction: column; gap: 18px;
}
.kb-featured-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.kb-featured h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  margin: 0;
  text-wrap: balance;
}
.kb-featured .kb-excerpt {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
}
.kb-featured .kb-arr {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  color: var(--ink-1);
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap 0.3s ease;
  white-space: nowrap;
}
.kb-featured:hover .kb-arr { gap: 14px; }
.kb-featured .kb-arr-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-line);
  color: #fff; font-size: 13px;
  flex: 0 0 28px;
}

/* Standard cards (3-col grid) */
.kb-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.kb-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.kb-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.kb-card .kb-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
}
.kb-card-body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
}
.kb-card-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.kb-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.006em;
  color: var(--ink-1);
  margin: 0;
  text-wrap: balance;
}
.kb-card-excerpt {
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
  flex: 1;
}
.kb-card-tail {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--ink-4);
  margin-top: 4px;
}
.kb-card-arr {
  color: var(--ink-1); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.25s ease;
  white-space: nowrap;
}
.kb-card:hover .kb-card-arr { gap: 8px; }

/* Type chip — shared between featured + card */
.kb-type {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip-bg, #FFF3E4);
  color: var(--chip-color, #C2620A);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(0,0,0,0.04);
}
.kb-type::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--chip-accent, #FB993F);
}
.kb-dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-6);
  display: inline-block;
}
.kb-meta-text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: 0.01em;
}

/* Empty-state placeholder card (greyed) */
.kb-card.kb-card-empty {
  background: transparent;
  border: 1px dashed rgba(28,28,28,0.16);
  box-shadow: none;
  padding: 24px;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--ink-4);
  min-height: 320px;
  font-family: var(--font-display);
  font-size: 14px;
}
.kb-card.kb-card-empty:hover { transform: none; box-shadow: none; }

/* ============================================================
   BLOG DETAIL
   ============================================================ */
.kbb-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 56px 0;
}
.kbb-back {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 28px;
  transition: gap 0.25s ease, color 0.25s ease;
}
.kbb-back:hover { gap: 10px; color: var(--brand-purple); }

/* ---- Reading progress bar ---- */
.kbb-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(28,28,28,0.06);
  pointer-events: none;
}
.kbb-progress-fill {
  height: 100%;
  background: var(--grad-full-r);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 80ms linear;
}

.kbb-hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px 48px;
}
.kbb-hero-inner {
  max-width: 880px;
}
.kbb-hero-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.kbb-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: var(--ink-1);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.kbb-hero h1 .grad {
  background: var(--grad-full-r);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kbb-hero .lede {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0;
  max-width: 760px;
}
.kbb-hero-author {
  display: flex; align-items: center; gap: 12px;
  margin-top: 32px;
}
.kbb-hero-author .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-full);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.02em;
}
.kbb-hero-author .who {
  display: flex; flex-direction: column; line-height: 1.25;
}
.kbb-hero-author .who .name {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--ink-1);
}
.kbb-hero-author .who .role {
  font-family: var(--font-display); font-size: 12px;
  color: var(--ink-4);
}

/* Big cover band */
.kbb-cover {
  max-width: 1320px;
  margin: 0 auto 64px;
  padding: 0 56px;
}
.kbb-cover .kb-cover {
  border-radius: var(--r-2xl);
  overflow: hidden;
  aspect-ratio: 21 / 8;
  position: relative;
}
.kbb-cover-watermark {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 36px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--font-display);
  color: rgba(255,255,255,0.78);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* ---- Body layout: sticky TOC + content ---- */

/* ---- Body layout: sticky TOC + content ---- */
.kbb-body {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px 64px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
.kbb-toc {
  position: sticky; top: 92px;
  font-family: var(--font-display);
  font-size: 13px;
  align-self: start;
}
.kbb-toc-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.kbb-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.kbb-toc a {
  display: block;
  color: var(--ink-3);
  text-decoration: none;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--ink-7);
  font-size: 13px;
  line-height: 1.35;
  transition: color 0.2s, border-color 0.2s;
}
.kbb-toc a:hover { color: var(--ink-1); }
.kbb-toc a.active {
  color: var(--ink-1);
  font-weight: 600;
  border-left-color: var(--brand-purple);
}

/* Content prose */
.kbb-prose {
  max-width: 720px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
}
.kbb-prose > .lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-1);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.kbb-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink-1);
  margin: 64px 0 20px;
  scroll-margin-top: 88px;
  position: relative;
  padding-left: 18px;
}
.kbb-prose h2:not(.kbb-faq-title)::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-line);
}
.kbb-faq-title { padding-left: 0; }
.kbb-prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink-1);
  margin: 36px 0 12px;
}
.kbb-prose p {
  margin: 0 0 20px;
}
.kbb-prose p:has(+ p) {}
.kbb-prose strong { font-weight: 600; color: var(--ink-1); }
.kbb-prose em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-2);
}
.kbb-prose ul, .kbb-prose ol {
  padding-left: 22px;
  margin: 0 0 24px;
}
.kbb-prose li { margin-bottom: 8px; }
.kbb-prose a {
  color: var(--brand-purple);
  text-decoration: underline;
  text-decoration-color: rgba(77,1,180,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.kbb-prose a:hover { text-decoration-color: var(--brand-pink); color: var(--brand-pink); }

/* Pull quote */
.kbb-pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ink-1);
  letter-spacing: -0.008em;
  padding: 28px 0 28px 28px;
  margin: 32px 0;
  border-left: 3px solid;
  border-image: var(--grad-line) 1;
  text-wrap: pretty;
}

/* Hairline divider */
.kbb-rule {
  border: 0;
  height: 2px;
  margin: 56px 0;
  background: var(--grad-line);
  border-radius: 2px;
  max-width: 80px;
  opacity: 0.6;
}

/* Share row */
.kbb-share {
  display: flex; align-items: center; gap: 14px;
  margin: 48px 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.kbb-share-label {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4);
  margin-right: 4px;
}
.kbb-share button, .kbb-share a.kbb-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.kbb-share button:hover, .kbb-share a.kbb-share-btn:hover {
  border-color: var(--ink-1);
  color: var(--ink-1);
  transform: translateY(-1px);
}
.kbb-share button.copied {
  background: var(--ink-1);
  color: #fff;
  border-color: var(--ink-1);
}

/* FAQ accordion */
.kbb-faq {
  margin: 64px 0 0;
}
.kbb-faq-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.012em;
  margin: 0 0 24px;
  color: var(--ink-1);
}
.kbb-faq-item {
  border-top: 1px solid var(--hairline);
  padding: 0;
}
.kbb-faq-item:last-child {
  border-bottom: 1px solid var(--hairline);
}
.kbb-faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 22px 0;
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-1);
  cursor: pointer;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.kbb-faq-q:hover { color: var(--brand-purple); }
.kbb-faq-toggle {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--canvas-alt);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--ink-2);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.kbb-faq-item[data-open="true"] .kbb-faq-toggle {
  background: var(--ink-1);
  color: #fff;
  transform: rotate(45deg);
}
.kbb-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}
.kbb-faq-item[data-open="true"] .kbb-faq-a {
  max-height: 600px;
}
.kbb-faq-a-inner {
  padding: 0 0 24px 0;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
  color: var(--ink-3);
  max-width: 680px;
}

/* Bottom contact strip uses .hm-contact from home.css — nothing extra needed */

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .kb-hero, .kb-grid-wrap, .kbb-shell, .kbb-hero, .kbb-cover, .kbb-body {
    padding-left: 28px; padding-right: 28px;
  }
  .kb-legend { padding-left: 28px; padding-right: 28px; }
  .kb-featured {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 18px;
  }
  .kb-featured-body { padding: 4px 8px 12px; }
  .kb-featured-tag { top: 24px; left: 24px; }
  .kb-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .kbb-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .kbb-toc {
    position: static;
    border-radius: var(--r-lg);
    background: var(--canvas-alt);
    padding: 16px 18px;
  }
  .kbb-toc-label { margin-bottom: 8px; padding-bottom: 8px; }
}

@media (max-width: 640px) {
  .kb-hero { padding: 56px 20px 40px; }
  .kb-grid-wrap, .kbb-shell, .kbb-hero, .kbb-cover, .kbb-body {
    padding-left: 20px; padding-right: 20px;
  }
  .kb-legend { padding-left: 20px; padding-right: 20px; }
  .kb-cards {
    grid-template-columns: 1fr;
  }
  .kbb-prose {
    font-size: 17px;
  }
  .kbb-prose > .lede { font-size: 20px; }
  .kbb-prose h2 { font-size: 24px; margin-top: 48px; }
  .kbb-pull { font-size: 22px; padding-left: 18px; }
  .kbb-cover .kb-cover { aspect-ratio: 16 / 11; }
}
