/* Knowledge pages share the main site's typography, colour and navigation. */
.knowledge-page {
  --kh-rule: #ffffff24;
}
.kh-main {
  padding-top: 96px;
  padding-bottom: 64px;
}
.kh-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 48px;
}
.kh-breadcrumb a:hover {
  color: var(--ink);
}
.kh-label {
  display: block;
  font: 11px/1.5 var(--mono);
  letter-spacing: 0.09em;
  color: var(--muted);
}
.kh-hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--kh-rule);
}
.knowledge-page .kh-hero h1 {
  font: 490 clamp(44px, 6.4vw, 82px)/1.03 var(--display);
  letter-spacing: -0.035em;
  max-width: 900px;
  margin: 20px 0 24px;
}
.kh-deck {
  font: 400 clamp(17px, 1.6vw, 21px)/1.6 var(--body);
  max-width: 720px;
  color: #bcc3cf;
}
.kh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 26px;
}
.kh-hub-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 32px 0 22px;
}
.kh-hub-intro p {
  max-width: 520px;
  color: #bcc3cf;
}
.kh-hub-intro .kh-label {
  white-space: nowrap;
}
.kh-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--kh-rule);
}
.kh-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  min-height: 310px;
  transition: background 0.15s;
}
.kh-card + .kh-card {
  border-left: 1px solid var(--kh-rule);
}
.kh-card:hover {
  background: #ffffff06;
}
.kh-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 10px/1.5 var(--mono);
  letter-spacing: 0.05em;
}
.knowledge-page .kh-card h2 {
  font: 490 31px/1.12 var(--display);
  letter-spacing: -0.025em;
  margin: 30px 0 16px;
}
.kh-card p {
  font-size: 14px;
  line-height: 1.65;
  color: #aab3c2;
}
.kh-card-link {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  margin-top: auto;
  font-size: 13px;
}
.kh-card:first-child {
  background: #121a2b;
}
.kh-card:first-child:hover {
  background: #182239;
}
.kh-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 64px 0;
  border-bottom: 1px solid var(--kh-rule);
}
.knowledge-page .kh-index h2,
.knowledge-page .kh-cta h2 {
  font: 490 38px/1.13 var(--display);
  letter-spacing: -0.025em;
  margin: 16px 0;
}
.kh-index p {
  color: #aab3c2;
  max-width: 470px;
}
.kh-text-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.kh-stage-list > span {
  display: grid;
  grid-template-columns: 30px 1fr 1.5fr;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--kh-rule);
  gap: 12px;
  color: var(--muted);
  font: 11px/1.6 var(--mono);
}
.kh-stage-list strong {
  font: 500 17px/1.5 var(--body);
  color: var(--ink);
}
.kh-stage-list small {
  font: 12px/1.5 var(--body);
}
.kh-stage-list p {
  font-size: 11px;
  margin-top: 14px;
}
.kh-reading {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 56px;
}
.kh-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  padding-top: 42px;
  display: grid;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.kh-toc .kh-label {
  margin-bottom: 8px;
}
.kh-toc a:hover {
  color: var(--ink);
}
.kh-article {
  min-width: 0;
}
.kh-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--kh-rule);
  scroll-margin-top: 85px;
}
.knowledge-page .kh-section h2 {
  font: 490 34px/1.16 var(--display);
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.kh-section p {
  color: #bcc3cf;
  line-height: 1.8;
  margin-top: 14px;
  max-width: 760px;
}
.kh-section a {
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #c1caff;
}
.kh-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--kh-rule);
}
.kh-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  line-height: 1.65;
  min-width: 610px;
}
.kh-table-wrap th,
.kh-table-wrap td {
  padding: 18px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--kh-rule);
}
.kh-table-wrap thead th {
  background: #121722;
  color: #dbe1ec;
  font-weight: 500;
  font-size: 12px;
}
.kh-table-wrap tbody th {
  min-width: 115px;
  font-weight: 500;
  color: #edf0f7;
}
.kh-table-wrap td {
  color: #b0bac9;
  min-width: 125px;
}
.kh-table-wrap tbody tr:last-child > * {
  border-bottom: 0;
}
.kh-section .kh-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.kh-steps {
  padding-left: 24px;
}
.kh-steps li {
  padding: 16px 0 20px 12px;
  border-bottom: 1px solid var(--kh-rule);
}
.kh-steps li:last-child {
  border: 0;
}
.knowledge-page .kh-steps h3,
.knowledge-page .kh-question-grid h3 {
  font: 500 17px/1.4 var(--body);
  letter-spacing: -0.02em;
}
.kh-steps p {
  margin-top: 8px;
}
.kh-question-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}
.kh-question-grid > div {
  border-top: 1px solid var(--kh-rule);
  padding-top: 20px;
}
.kh-question-grid span {
  display: block;
  color: var(--muted);
  font: 10px/1.5 var(--mono);
  margin-bottom: 14px;
}
.kh-question-grid p {
  font-size: 14px;
  margin-top: 8px;
}
.kh-section details {
  padding: 20px 0;
  border-top: 1px solid var(--kh-rule);
}
.kh-section summary {
  cursor: pointer;
  font-size: 15px;
  padding-right: 12px;
}
.kh-section details p {
  font-size: 14px;
}
.kh-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 42px 0;
}
.kh-cta p {
  color: var(--muted);
  font-size: 14px;
  max-width: 580px;
}
.kh-cta .button {
  flex-shrink: 0;
}
.kh-article .kh-cta {
  display: block;
}
.kh-article .kh-cta .button {
  margin-top: 24px;
}
.kh-related {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--kh-rule);
  font-size: 13px;
}
.kh-related .kh-label {
  margin-right: auto;
}
.knowledge-page .site-footer {
  margin-top: 0;
}
@media (max-width: 1000px) {
  .kh-reading {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 32px;
  }
  .kh-card {
    padding: 24px;
  }
  .kh-index {
    gap: 36px;
  }
}
@media (max-width: 760px) {
  .knowledge-page .wrap {
    width: calc(100% - 40px);
  }
  .kh-main {
    padding-top: 88px;
    padding-bottom: 40px;
  }
  .kh-breadcrumb {
    margin-bottom: 32px;
    font-size: 11px;
  }
  .kh-hero {
    padding-bottom: 30px;
  }
  .knowledge-page .kh-hero h1 {
    font-size: 48px;
    margin: 16px 0 20px;
  }
  .kh-deck {
    font-size: 16px;
  }
  .kh-meta {
    font-size: 11px;
    gap: 6px;
  }
  .kh-hub-intro {
    display: block;
    margin-top: 24px;
  }
  .kh-hub-intro p {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .kh-cards,
  .kh-index,
  .kh-reading,
  .kh-question-grid {
    grid-template-columns: 1fr;
  }
  .kh-card {
    min-height: 0;
    padding: 24px;
  }
  .kh-card + .kh-card {
    border-left: 0;
    border-top: 1px solid var(--kh-rule);
  }
  .knowledge-page .kh-card h2 {
    margin-top: 22px;
  }
  .kh-card-link {
    padding-top: 24px;
  }
  .kh-index {
    padding: 40px 0;
    gap: 24px;
  }
  .knowledge-page .kh-index h2,
  .knowledge-page .kh-cta h2 {
    font-size: 32px;
  }
  .kh-reading {
    gap: 0;
  }
  .kh-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--kh-rule);
  }
  .kh-toc .kh-label {
    flex-basis: 100%;
    margin: 0;
  }
  .kh-toc a {
    padding: 4px 0;
  }
  .kh-section {
    padding: 30px 0;
  }
  .knowledge-page .kh-section h2 {
    font-size: 29px;
  }
  .kh-section p {
    font-size: 14px;
  }
  .kh-cta {
    display: block;
    padding: 32px 0;
  }
  .kh-cta .button {
    margin-top: 24px;
  }
  .kh-related {
    display: grid;
    gap: 18px;
  }
  .kh-stage-list > span {
    grid-template-columns: 22px 1fr 1.6fr;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .kh-card {
    transition: none;
  }
}

/* Evidence and direct-answer additions retain the existing page system. */
.knowledge-page .kh-hero h1 {
  font-size: clamp(42px, 5.2vw, 66px);
  max-width: 930px;
}
.kh-evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.kh-evidence-card {
  border: 1px solid var(--kh-rule);
  background: #121a2b;
  padding: 24px;
}
.knowledge-page .kh-evidence-card h3 {
  font: 490 27px/1.2 var(--display);
  margin: 14px 0;
}
.kh-evidence-card p {
  font-size: 14px;
}
.kh-evidence-card > a {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
}
.kh-fact-record dl {
  margin: 16px 0;
}
.kh-fact-record dl > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--kh-rule);
}
.kh-fact-record dt {
  color: var(--muted);
  font-size: 12px;
}
.kh-fact-record dd {
  margin: 0;
  color: #bcc3cf;
  font-size: 14px;
  line-height: 1.65;
}
.kh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin: 24px 0 12px;
  font-size: 14px;
}
.kh-workflow {
  background: linear-gradient(90deg, #121a2b44, transparent);
  padding-inline: 24px;
}
@media (max-width: 760px) {
  .knowledge-page .kh-hero h1 {
    font-size: 42px;
  }
  .kh-evidence-grid {
    grid-template-columns: 1fr;
  }
  .kh-fact-record dl > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .kh-workflow {
    padding-inline: 16px;
  }
}
