/* Reading choices follow the task: select a question, compare, or follow a worked example. */
.knowledge-hub .knowledge-hero { padding-block: clamp(36px, 4vw, 56px) 0; background: var(--soft); }
.knowledge-hub .knowledge-hero h1 { max-width: 22ch; margin: 0 0 16px; font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1.2; letter-spacing: -.035em; }
.knowledge-hub .knowledge-hero .lead { max-width: 48em; margin-bottom: 24px; color: var(--ink-soft); }
.knowledge-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); }
.knowledge-tabs a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 8px; color: var(--muted); font-size: 1rem; font-weight: 650; text-decoration: none; transition: color .16s ease; }
.knowledge-tabs a:hover, .knowledge-tabs a[aria-current="page"] { color: var(--brand); }
.knowledge-tabs a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.knowledge-tabs a:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 4px; }
.knowledge-articles, .knowledge-question-topics { padding-top: 32px; scroll-margin-top: 100px; }
.knowledge-question-topics .page-jumps { margin-top: 0; }
.knowledge-faq .knowledge-faq-content { padding-top: 40px; }
.knowledge-faq .faq-groups { gap: 48px; }
.knowledge-faq .faq-group-heading { align-items: center; gap: 14px; }
.knowledge-faq .faq-group-heading h2 { font-size: clamp(1.55rem, 2vw, 1.85rem); line-height: 1.35; }
.knowledge-faq .faq-group-heading > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.knowledge-faq .faq-groups > section > .faq-more { padding-left: 52px; margin-bottom: 20px; }
.knowledge-faq .faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; border-top: 0; }
.knowledge-faq .faq-list details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; }
.knowledge-faq .faq-list details[open] { border-color: var(--line-hover); }
.knowledge-faq .faq-list summary { display: flex; align-items: center; min-height: 88px; padding: 20px 64px 20px 24px; font-size: 1.05rem; font-weight: 650; line-height: 1.55; }
.knowledge-faq .faq-list summary::after { top: 50%; right: 20px; transform: translateY(-50%); border-radius: 50%; background: var(--soft); }
.knowledge-faq .faq-list summary:hover { color: var(--brand); }
.knowledge-faq .faq-list summary:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 12px; }
.knowledge-faq .faq-answer { padding: 0 24px 20px; }
.knowledge-faq .faq-answer > p:last-child { margin-bottom: 0; }
.knowledge-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.knowledge-topics a { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 8px; color: var(--ink-soft); font-size: .88rem; line-height: 1.5; text-decoration: none; transition: color .16s ease, background .16s ease; }
.knowledge-topics a:hover { color: var(--brand); background: var(--brand-soft); }
.knowledge-topics span { flex-shrink: 0; padding: 3px 8px; border-radius: 20px; color: var(--muted); background: var(--soft); font-size: .72rem; white-space: nowrap; }
.knowledge-group { padding-block: 48px; scroll-margin-top: 100px; }
.knowledge-group + .knowledge-group { border-top: 1px solid var(--line); }
.knowledge-group-layout { display: grid; gap: 28px; }
.knowledge-group-intro { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px 14px; }
.knowledge-group-intro h2 { grid-column: 2; margin: 0; font-size: clamp(1.55rem, 2vw, 1.85rem); line-height: 1.35; }
.knowledge-group-intro p { grid-column: 2; max-width: 72ch; margin-bottom: 0; color: var(--muted); font-size: .92rem; line-height: 1.8; }
.knowledge-group-intro .eyebrow { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 38px; height: 38px; margin: 0; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: .78rem; }
.knowledge-group-intro .eyebrow::before { display: none; }
.knowledge-group-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 14px 20px; border-radius: 10px; background: var(--soft); }
.knowledge-group-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.knowledge-group-links a, .knowledge-related a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-size: .88rem; text-decoration: none; text-underline-offset: 4px; }
.knowledge-group-help a:hover { text-decoration: underline; }
.knowledge-related { margin: 0; }
.knowledge-related span { display: block; color: var(--muted); font-size: .74rem; font-weight: 650; }
.knowledge-bucket + .knowledge-bucket { margin-top: 28px; }
.knowledge-bucket h3 { margin: 0 0 14px; padding-left: 12px; border-left: 3px solid var(--brand); color: var(--ink-soft); font-size: .94rem; line-height: 1.5; }
.knowledge-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.knowledge-list li { min-width: 0; margin: 0; }
.knowledge-entry { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 18px; align-items: center; min-height: 126px; height: 100%; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); text-decoration: none; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.knowledge-entry strong { display: block; font-size: 1.05rem; line-height: 1.55; font-weight: 650; }
.knowledge-entry small { display: block; margin-top: 8px; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.knowledge-entry > span:last-child { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); background: var(--soft); transition: color .16s ease, background .16s ease; }
.knowledge-entry:hover { border-color: var(--line-hover); background: var(--soft); box-shadow: var(--shadow-image); }
.knowledge-entry:hover strong { color: var(--brand); }
.knowledge-entry:hover > span:last-child { color: var(--brand); background: var(--brand-soft); }
.knowledge-entry:focus-visible, .knowledge-topics a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.knowledge-guide .guide-hero h1 { max-width: 28ch; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.28; }
.knowledge-guide .guide-hero .project-lead { max-width: 64ch; margin-bottom: 12px; }
.knowledge-guide .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.knowledge-guide .breadcrumb a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-inline: 4px; }
.guide-service-link { margin: 10px 0 0; }
.guide-service-link a { display: inline-block; padding-block: 9px; min-height: 44px; color: var(--brand); font-size: .9rem; text-underline-offset: 4px; }
.knowledge-guide .project-reading { padding-top: 42px; }
.knowledge-guide .project-article section { margin-bottom: 48px; }
.knowledge-guide .project-article h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); }
.knowledge-guide .article-author { font-size: .84rem; color: var(--muted); margin-bottom: 36px; }
.knowledge-guide .article-author p { font-size: inherit; color: inherit; line-height: 1.9; }
.knowledge-guide .article-author a { display: inline-block; padding-block: 5px; }
.knowledge-guide .article-author time { font-size: .8rem; }
.guide-example { margin-block: 26px; padding: 22px 24px; background: var(--soft); border-left: 3px solid var(--brand); }
.project-article .guide-example-label { margin-bottom: 12px; color: var(--brand); font-size: .8rem; font-weight: 650; }
.guide-example p:last-child { margin-bottom: 0; }
.knowledge-guide .decision-table { width: 100%; min-width: 560px; }
.knowledge-guide .decision-table th, .knowledge-guide .decision-table td { min-width: 160px; font-size: .92rem; line-height: 1.8; }
.knowledge-guide .table-scroll { margin-block: 24px; }
.guide-all-link a { display: inline-block; padding-block: 10px; min-height: 44px; color: var(--brand); text-underline-offset: 4px; }
.guide-reading-links { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.guide-reading-links li { margin: 0 !important; border-bottom: 1px solid var(--line); }
.guide-reading-links a { display: block; min-height: 44px; padding-block: 13px; text-decoration: none; }
.guide-reading-links a:hover { text-decoration: underline; }
.table-scroll-hint { display: none; }
@media (max-width: 900px) {
  .knowledge-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-faq .faq-list { grid-template-columns: minmax(0, 1fr); }
  .knowledge-group-layout { gap: 24px; }
  .knowledge-list { grid-template-columns: minmax(0, 1fr); }
  .knowledge-group-intro p { max-width: 52em; }
  .knowledge-guide .guide-hero h1 { max-width: none; }
  :is(.project-article, .article-body) .decision-table[data-columns="2"] { min-width: 0; width: 100%; table-layout: fixed; }
  :is(.project-article, .article-body) .decision-table[data-columns="2"] :is(th, td) { min-width: 0; width: auto; padding: 14px 12px; overflow-wrap: break-word; }
  :is(.project-article, .article-body) .decision-table[data-columns="2"] :is(th, td):first-child { width: 35%; }
  :is(.project-article, .article-body) .table-scroll-hint { display: block; margin: 14px 0 -12px; color: var(--muted); font-size: .8rem; }
}
@media (max-width: 600px) {
  .knowledge-hub .knowledge-hero { padding-block: 30px 0; }
  .knowledge-hub .knowledge-hero h1 { margin-bottom: 14px; font-size: 2rem; }
  .knowledge-tabs { gap: 24px; }
  .knowledge-tabs a { min-height: 50px; padding-inline: 4px; font-size: .94rem; }
  .knowledge-articles, .knowledge-question-topics { padding-top: 24px; }
  .knowledge-faq .knowledge-faq-content { padding-top: 32px; }
  .knowledge-faq .faq-groups { gap: 36px; }
  .knowledge-faq .faq-group-heading > span { width: 34px; height: 34px; border-radius: 8px; }
  .knowledge-faq .faq-group-heading h2 { font-size: 1.4rem; }
  .knowledge-faq .faq-groups > section > .faq-more { padding-left: 48px; margin-bottom: 16px; }
  .knowledge-faq .faq-list summary { padding: 18px 56px 18px 18px; font-size: 1rem; }
  .knowledge-faq .faq-list summary::after { right: 14px; }
  .knowledge-faq .faq-answer { padding: 0 18px 18px; }
  .knowledge-topics { gap: 6px; padding: 4px; }
  .knowledge-topics a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; font-size: .8rem; padding: 10px 12px; }
  .knowledge-topics span { padding: 2px 5px; font-size: .68rem; }
  .knowledge-group { padding-block: 34px; }
  .knowledge-group-intro { grid-template-columns: 34px minmax(0, 1fr); gap: 10px 12px; }
  .knowledge-group-intro .eyebrow { width: 34px; height: 34px; border-radius: 8px; }
  .knowledge-group-intro h2 { font-size: 1.4rem; }
  .knowledge-group-intro p:not(.eyebrow) { grid-column: 1 / -1; }
  .knowledge-group-help { padding: 12px 16px; }
  .knowledge-group-links { gap: 0 20px; }
  .knowledge-entry { grid-template-columns: minmax(0, 1fr) 28px; min-height: 108px; padding: 18px; gap: 12px; }
  .knowledge-entry > span:last-child { width: 28px; height: 28px; }
  .knowledge-entry strong { font-size: 1rem; }
  .knowledge-entry small { font-size: .85rem; }
  .knowledge-guide .project-reading { padding-top: 28px; }
  .guide-example { padding: 18px; margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge-entry, .knowledge-entry > span:last-child, .knowledge-topics a, .knowledge-tabs a { transition: none; }
}

/* Short answers and longer guides are different reading choices. */
.knowledge-group-faq:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.knowledge-group-faq { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--brand); font-size: .88rem; font-weight: 650; text-decoration: none; }
.knowledge-reading-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; margin-bottom: 18px; }
.knowledge-detail .knowledge-reading-bar .breadcrumb { margin: 0; font-size: .83rem; }
.knowledge-detail .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.knowledge-detail .breadcrumb a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-inline: 4px; }
.knowledge-short-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--brand); font-size: .85rem; text-decoration: none; }
.knowledge-short-link:hover { text-decoration: underline; }
.knowledge-detail :is(.page-hero, .project-hero) { padding-block: 28px; }
.knowledge-detail :is(.page-hero, .project-hero) h1 { max-width: 28ch; margin: 0 0 16px; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1.3; }
.knowledge-detail :is(.page-hero, .project-hero) .container > p:not(.eyebrow):not(.project-kicker):not(.guide-service-link) { max-width: 72ch; margin-bottom: 0; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }
.knowledge-detail .guide-service-link { margin-top: 10px; }
.knowledge-detail .answer-strip .container { padding-block: 18px; }
.knowledge-detail .answer-strip p { max-width: 72ch; font-size: 1rem; line-height: 1.85; }
.knowledge-detail :is(.article-layout, .project-reading) { display: grid; grid-template-columns: minmax(0, 760px) 220px; align-items: start; justify-content: space-between; gap: 28px 56px; }
.knowledge-detail .project-reading { padding-block: 32px 56px; }
.knowledge-detail main > .section { padding-block: 32px 56px; }
.knowledge-detail :is(.article-body, .project-article) { grid-column: 1; grid-row: 1; min-width: 0; }
.knowledge-detail :is(.article-toc, .project-toc) { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-height) + 24px); }
.knowledge-detail :is(.article-toc, .project-toc) a { display: block; min-height: 44px; padding-block: 10px; font-size: .84rem; line-height: 1.5; }
.knowledge-detail :is(.article-body, .project-article) :is(h2, h3, section, tr[id]) { scroll-margin-top: calc(var(--header-height) + 24px); }
.knowledge-detail :is(.article-body, .project-article) h2 { margin: 32px 0 14px; font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.4; letter-spacing: 0; }
.knowledge-detail .project-article section { margin-bottom: 36px; }
.knowledge-detail .project-article section > h2, .knowledge-detail .article-body > .article-byline + h2 { margin-top: 0; }
.knowledge-detail :is(.article-body, .project-article) h3 { margin: 24px 0 10px; font-size: 1.08rem; line-height: 1.5; }
.knowledge-detail :is(.article-body, .project-article) :is(p, li) { font-size: 1rem; line-height: 1.85; }
.knowledge-detail :is(.article-author p, .article-byline) { margin-bottom: 24px; font-size: .82rem !important; line-height: 1.6; }
.knowledge-detail .article-author p { margin: 0; }
.knowledge-detail .article-byline a { display: inline-block; min-height: 28px; padding-block: 3px; }
.knowledge-detail .article-author br { display: none; }
.knowledge-detail .article-author time { margin-left: 10px; }
.knowledge-detail .reading-note { margin-block: 24px; padding: 18px 20px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--soft); }
.knowledge-detail .reading-note h3 { margin-top: 0; }
.knowledge-detail .reading-note p:last-child { margin-bottom: 0; }
.knowledge-detail .guide-reading-links a { display: block; }
@media (max-width: 1040px) {
  .knowledge-detail :is(.article-layout, .project-reading) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .knowledge-detail :is(.article-toc, .project-toc) { display: none; }
  .knowledge-detail :is(.article-layout, .project-reading) > .reading-nav-mobile { display: block; grid-column: 1; grid-row: 1; }
  .knowledge-detail :is(.article-body, .project-article) { grid-column: 1; grid-row: 2; }
}
@media (max-width: 600px) {
  .knowledge-detail :is(.page-hero, .project-hero) { padding-block: 18px 24px; }
  .knowledge-reading-bar { gap: 0 16px; margin-bottom: 12px; }
  .knowledge-detail .knowledge-reading-bar .breadcrumb, .knowledge-short-link { font-size: .8rem; }
  .knowledge-detail :is(.article-body, .project-article) h2 { font-size: 1.35rem; }
}
