.knowledge-hub-page {
  color: var(--ink-deep);
}

.knowledge-hub {
  overflow: hidden;
}

.kh-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.knowledge-hub svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kh-hero {
  position: relative;
  min-height: 500px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.kh-hero::before {
  position: absolute;
  top: 46px;
  left: max(5vw, calc(50% - 600px));
  width: 190px;
  height: 190px;
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(var(--ink-rgb), 0.025),
    0 0 0 68px rgba(var(--ink-rgb), 0.018);
  content: "";
}

.kh-hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 72px;
  text-align: center;
}

.kh-hero-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 12px;
  color: var(--on-fill);
  background: var(--fill);
  box-shadow: 5px 5px 0 var(--marker);
}

.kh-hero-mark svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.kh-kicker,
.kh-section-heading p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.kh-hero h1 {
  margin: 0;
  color: var(--ink-deep);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -2px;
}

.kh-hero h1 span {
  position: relative;
  z-index: 0;
}

.kh-hero h1 span::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 7px;
  width: calc(100% + 8px);
  height: 13px;
  background: var(--marker);
  content: "";
  transform: rotate(-1deg);
}

.kh-hero-copy {
  max-width: 650px;
  margin: 18px auto 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.kh-search {
  width: min(680px, 100%);
  min-height: 60px;
  margin-inline: auto;
  padding: 7px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.kh-search:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(241, 95, 34, 0.24), var(--shadow);
}

.kh-search > svg {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: var(--muted);
}

.kh-search input {
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  color: var(--ink-deep);
  background: transparent;
}

.kh-search input::placeholder {
  color: var(--muted);
}

.kh-search button {
  padding: 11px 22px;
  border: 1px solid var(--fill);
  border-radius: 8px;
  color: var(--on-fill);
  background: var(--fill);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--marker);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.kh-search button:hover {
  box-shadow: 5px 5px 0 var(--marker);
  transform: translate(-1px, -1px);
}

.kh-search-hints {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 11px;
  color: var(--muted);
  font-size: 10px;
}

.kh-search-hints a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.kh-section {
  padding-block: 72px;
}

.kh-section + .kh-section {
  border-top: 1px solid var(--line);
}

.kh-section:nth-of-type(odd) {
  background: var(--glass);
}

.kh-section-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.kh-section-heading h2 {
  margin: 0;
  color: var(--ink-deep);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.7px;
}

.kh-section-heading > a,
.kh-section-heading > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.kh-section-heading > a:hover,
.kh-manage-link:hover {
  color: var(--ink);
}

.kh-action-grid,
.kh-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kh-action-card {
  min-height: 154px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid var(--line-dark);
  border-radius: 5px 15px 15px 5px;
  color: var(--ink-deep);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(var(--ink-rgb), 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.kh-action-card:hover {
  border-color: var(--ink);
  color: var(--ink-deep);
  box-shadow: 8px 9px 0 rgba(var(--ink-rgb), 0.07);
  transform: translateY(-2px);
}

.kh-card-icon,
.kh-section-entry-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 17px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--marker-soft);
}

.kh-card-icon svg,
.kh-section-entry-icon svg {
  width: 18px;
  height: 18px;
}

.kh-action-card strong {
  margin-bottom: 5px;
  color: var(--ink-deep);
  font-size: 13px;
}

.kh-action-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.kh-topic-card {
  min-height: 145px;
  padding: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-deep);
  background: var(--surface);
  text-align: center;
  transition: border-color 160ms ease, transform 160ms ease;
}

.kh-topic-card:hover {
  border-color: var(--ink);
  color: var(--ink-deep);
  transform: translateY(-2px);
}

.kh-topic-card.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgb(37 99 235 / 0.2);
}

.kh-topic-card svg {
  width: 29px;
  height: 29px;
  color: var(--ink);
  stroke-width: 1.45;
}

.kh-topic-card strong {
  font-size: 12px;
}

.kh-topic-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.kh-section-groups {
  display: grid;
  gap: 34px;
}

.kh-section-group {
  min-width: 0;
}

.kh-section-category-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kh-section-category-head > span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--marker-soft);
}

.kh-section-category-head h3,
.kh-section-category-head p {
  margin: 0;
}

.kh-section-category-head h3 {
  font-size: 16px;
}

.kh-section-category-head p {
  color: var(--muted);
  font-size: 10px;
}

.kh-section-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kh-section-entry-card {
  position: relative;
  min-height: 225px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 5px 18px 18px 5px;
  color: var(--ink-deep);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease;
}

.kh-section-entry-card::after {
  position: absolute;
  top: 0;
  right: 18px;
  width: 2px;
  height: 100%;
  background: #efb4b4;
  content: "";
}

.kh-section-entry-card:hover {
  border-color: var(--ink);
  color: var(--ink-deep);
  transform: translateY(-3px);
}

.kh-section-entry-card .kh-section-entry-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 50% 50% 50% 12px;
  color: var(--on-fill);
  background: var(--fill);
  box-shadow: 4px 4px 0 var(--marker);
}

.kh-section-entry-card small {
  color: color-mix(in srgb, var(--marker) 55%, var(--ink));
  font-size: 9px;
  font-weight: 900;
}

.kh-section-entry-card h4 {
  margin: 4px 0 8px;
  font-size: 19px;
}

.kh-section-entry-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.kh-section-entry-card strong {
  color: var(--ink);
  font-size: 10px;
}

.kh-entry-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.kh-entry-list > a {
  min-height: 74px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-deep);
}

.kh-entry-list > a:last-child {
  border-bottom: 0;
}

.kh-entry-list > a:hover {
  background: #f8fafc;
}

.kh-entry-list .kh-section-entry-icon {
  width: 36px;
  height: 36px;
  margin: 0;
}

.kh-entry-list strong,
.kh-entry-list small {
  display: block;
}

.kh-entry-list strong {
  font-size: 12px;
}

.kh-entry-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.kh-entry-list > a > b {
  color: var(--ink);
}

.kh-faq-list {
  display: grid;
  gap: 9px;
}

.kh-faq-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  overflow: hidden;
}

.kh-faq-item[open] {
  border-color: var(--line-dark);
  box-shadow: 0 12px 28px rgba(var(--ink-rgb), 0.06);
}

.kh-faq-item summary {
  min-height: 60px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-deep);
  font-size: 12px;
  font-weight: 800;
}

.kh-faq-item summary b {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--marker-soft);
  font-size: 18px;
  transition: transform 160ms ease;
}

.kh-faq-item[open] summary b {
  transform: rotate(45deg);
}

.kh-faq-answer {
  padding: 0 18px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}

.kh-faq-answer p {
  margin: 0 0 12px;
}

.kh-content-empty {
  grid-column: 1 / -1;
  min-height: 130px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px dashed var(--line-dark);
  border-radius: 12px;
  color: var(--muted);
  background: var(--glass);
  text-align: center;
}

.kh-content-empty strong {
  color: var(--ink-deep);
}

.kh-content-empty span {
  font-size: 10px;
}

.kh-content-empty a {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.kh-featured {
  margin-bottom: 58px;
}

.knowledge-hub .kh-article-grid,
.knowledge-hub .article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-hub .article-card {
  min-width: 0;
  min-height: 240px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-deep);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.knowledge-hub .article-card:hover {
  border-color: var(--ink);
  box-shadow: 0 15px 35px rgba(var(--ink-rgb), 0.09);
  transform: translateY(-2px);
}

.kh-featured-grid .article-card {
  border-top: 4px solid var(--marker);
}

.kh-article-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kh-article-symbol {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--marker-soft);
  font-size: 14px;
  font-weight: 900;
}

.knowledge-hub .article-card-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.knowledge-hub .category-pill,
.knowledge-hub .featured-label {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
}

.knowledge-hub .category-pill {
  color: color-mix(in srgb, #3b82f6 55%, var(--ink));
  background: #e8f0fb;
}

.knowledge-hub .featured-label {
  color: color-mix(in srgb, var(--marker) 45%, var(--ink));
  background: var(--marker-soft);
}

.knowledge-hub .article-card h2 {
  margin: 22px 0 9px;
  color: var(--ink-deep);
  font-size: 17px;
  line-height: 1.65;
}

.knowledge-hub .article-card h2 a {
  color: inherit;
}

.knowledge-hub .article-card > p,
.knowledge-hub .article-card .kh-article-summary {
  flex: 0 0 auto;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  max-height: calc(1.9em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.knowledge-hub .article-card footer {
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.knowledge-hub .article-card footer a {
  color: var(--ink);
  font-weight: 800;
}

.kh-guides-heading {
  margin-bottom: 16px;
}

.kh-category-banner {
  margin-bottom: 1.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ink) 4%, var(--surface)), var(--surface) 55%);
}

.kh-category-back {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.kh-category-back:hover {
  text-decoration: underline;
}

.kh-category-banner-main {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.kh-category-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: #eff6ff;
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
  flex: 0 0 auto;
}

.kh-category-banner-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kh-category-banner-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.kh-category-banner-main h2,
.kh-category-banner-main h1 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  color: var(--ink-deep);
  line-height: 1.4;
}

.kh-section-category-page {
  padding-top: 2rem;
}

.kh-category-search {
  margin: 0 auto 1.25rem;
  display: grid;
}

.kh-section-category-page .kh-category-filter {
  margin-bottom: 1.35rem;
}

.kh-category-banner-copy {
  margin-top: 0.35rem !important;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  line-height: 1.7;
}

#all-guides {
  scroll-margin-top: 5.5rem;
}

.kh-manage-link {
  padding: 8px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: var(--surface);
}

.kh-category-filter {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.kh-category-filter a {
  padding: 8px 12px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
}

.kh-category-filter a:hover,
.kh-category-filter a.is-active {
  border-color: var(--fill);
  color: var(--on-fill);
  background: var(--fill);
}

.kh-article-empty {
  grid-column: 1 / -1;
  padding: 52px 24px;
  border: 1px dashed var(--line-dark);
  color: var(--muted);
  background: var(--glass);
}

.kh-article-empty > span,
.kh-article-empty a {
  color: var(--ink);
}

.kh-article-empty h2 {
  color: var(--ink-deep);
}

.kh-article-empty a {
  font-size: 11px;
  font-weight: 800;
}

.knowledge-hub .pagination {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 10px;
}

.knowledge-hub .pagination a {
  padding: 8px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
}

.kh-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.kh-support-card {
  min-height: 195px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  color: var(--ink-deep);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease;
}

.kh-support-card:hover {
  border-color: var(--ink);
  color: var(--ink-deep);
  transform: translateY(-2px);
}

.kh-support-card > div > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.kh-support-card h3 {
  margin: 5px 0 8px;
  font-size: 18px;
}

.kh-support-card p {
  max-width: 440px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

.kh-support-card strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 10px;
}

.kh-support-card strong svg {
  width: 14px;
  height: 14px;
}

.kh-support-illustration {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 18px;
  color: var(--on-fill);
  background: var(--fill);
  box-shadow: 7px 7px 0 var(--marker);
  transform: rotate(-4deg);
}

.kh-support-illustration svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.35;
}

.kh-entry-detail-head {
  padding: 70px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
}

.kh-entry-detail-head h1 {
  margin: 0;
  color: var(--ink-deep);
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -2px;
}

.kh-entry-detail-head > .container > p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.kh-entry-detail-layout {
  padding-block: 42px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 24px;
}

.kh-entry-description {
  min-height: 340px;
  padding: 34px;
}

.kh-entry-detail-aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 14px;
}

.kh-entry-detail-aside .panel {
  padding: 22px;
}

.kh-entry-detail-aside strong {
  display: block;
  margin-bottom: 8px;
}

.kh-entry-detail-aside p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .knowledge-hub .kh-article-grid,
  .knowledge-hub .article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .kh-action-grid,
  .kh-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kh-section-card-grid,
  .knowledge-hub .kh-article-grid,
  .knowledge-hub .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kh-support-grid,
  .kh-entry-detail-layout {
    grid-template-columns: 1fr;
  }

  .kh-entry-detail-aside {
    position: static;
  }
}

@media (max-width: 600px) {
  .kh-hero {
    min-height: auto;
  }

  .kh-hero-inner {
    padding-block: 54px;
  }

  .kh-hero h1 {
    letter-spacing: -1px;
  }

  .kh-hero-copy {
    font-size: 13px;
  }

  .kh-search {
    grid-template-columns: auto 1fr;
  }

  .kh-search button {
    grid-column: 1 / -1;
  }

  .kh-search-hints {
    align-items: center;
    flex-wrap: wrap;
  }

  .kh-section {
    padding-block: 48px;
  }

  .kh-section-heading {
    align-items: flex-start;
  }

  .kh-section-heading > a,
  .kh-section-heading > span {
    padding-top: 7px;
  }

  .kh-action-grid,
  .kh-topic-grid,
  .kh-section-card-grid,
  .knowledge-hub .kh-article-grid,
  .knowledge-hub .article-grid {
    grid-template-columns: 1fr;
  }

  .kh-section-entry-card {
    min-height: 0;
  }

  .kh-support-card {
    padding: 23px;
    grid-template-columns: 1fr;
  }

  .kh-support-illustration {
    width: 66px;
    height: 66px;
  }

  .kh-support-illustration svg {
    width: 32px;
    height: 32px;
  }

  .kh-entry-description {
    padding: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-action-card,
  .kh-topic-card,
  .kh-section-entry-card,
  .knowledge-hub .article-card,
  .kh-support-card,
  .kh-search button {
    transition: none;
  }
}

/* Article detail — HTML from TinyMCE (sanitized) */
.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4 {
  color: var(--ink-deep);
  font-weight: 700;
  line-height: 1.45;
  margin: 1.4em 0 0.55em;
  scroll-margin-top: 6rem;
}

.article-prose h1 { font-size: 1.55rem; }
.article-prose h2 { font-size: 1.35rem; }
.article-prose h3 { font-size: 1.18rem; }
.article-prose h4 { font-size: 1.05rem; }

.article-prose ul,
.article-prose ol {
  margin: 0 0 1.1em;
  padding-inline-start: 1.4em;
}

.article-prose li {
  margin-bottom: 0.35em;
}

.article-prose a {
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.article-prose blockquote {
  margin: 0 0 1.1em;
  padding: 0.65em 1em;
  border-inline-start: 3px solid color-mix(in srgb, #3b82f6 55%, var(--line));
  background: var(--soft-surface);
  color: var(--ink);
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 0.95em;
}

.article-prose th,
.article-prose td {
  border: 1px solid var(--line);
  padding: 0.55em 0.7em;
  text-align: start;
}

.article-prose th {
  background: var(--soft-surface);
  font-weight: 700;
}

.article-prose code,
.article-prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.article-prose :not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 0.35em;
  background: var(--soft-surface);
  color: var(--ink-deep);
  border: 1px solid var(--line);
}

.article-prose pre,
.article-prose pre[class*="language-"] {
  position: relative;
  display: block;
  margin: 1.25em 0;
  padding: 2.4rem 1.15rem 1.05rem;
  overflow-x: auto;
  border-radius: 0.85rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent 28%),
    #0b1220;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  box-shadow:
    0 10px 28px rgb(15 23 42 / 0.18),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.article-prose .kh-code-copy {
  position: absolute;
  top: 0.55rem;
  inset-inline-end: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgb(148 163 184 / 0.28);
  border-radius: 0.55rem;
  background: rgb(15 23 42 / 0.72);
  color: #cbd5e1;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.article-prose .kh-code-copy:hover,
.article-prose .kh-code-copy:focus-visible {
  background: rgb(30 41 59 / 0.95);
  border-color: rgb(148 163 184 / 0.55);
  color: #f8fafc;
  outline: none;
}

.article-prose .kh-code-copy.is-copied {
  border-color: rgb(74 222 128 / 0.55);
  color: #86efac;
}

.article-prose .kh-code-copy svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-prose pre code {
  display: block;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #e2e8f0;
  border: 0;
  white-space: pre;
  font-size: 0.88rem;
  line-height: 1.75;
  tab-size: 2;
}

.article-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em auto;
  border-radius: 0.55em;
}

.article-prose hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-toc h2,
.article-recommended h2,
.article-admin-actions h2 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink-deep);
}

.article-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.article-toc-item a {
  display: block;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  border: 1px solid transparent;
}

.article-toc-item a:hover,
.article-toc-item a:focus-visible {
  background: color-mix(in srgb, #3b82f6 12%, var(--surface));
  border-color: color-mix(in srgb, #3b82f6 35%, var(--line));
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
}

.article-toc-item.level-3 a,
.article-toc-item.level-4 a {
  padding-inline-start: 1.15rem;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}

.article-toc-item.level-4 a {
  padding-inline-start: 1.7rem;
}

.article-recommended ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-recommended li {
  padding: 0.65rem 0;
  border-bottom: 1px solid #e5edf7;
}

.article-recommended li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.article-recommended a {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-deep);
  text-decoration: none;
  line-height: 1.45;
}

.article-recommended a:hover,
.article-recommended a:focus-visible {
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
}

.article-recommended-current {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
  line-height: 1.45;
}

.article-recommended li.is-current {
  background: var(--soft-surface);
  margin: 0 -0.55rem;
  padding: 0.65rem 0.55rem;
  border-radius: 0.55rem;
  border-bottom-color: transparent;
}

.article-recommended small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.article-sidebar-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.article-sidebar-empty span,
.article-sidebar-empty a {
  display: block;
  margin-top: 0.35rem;
}

.article-sidebar-empty a {
  color: color-mix(in srgb, #3b82f6 70%, var(--ink));
  font-weight: 700;
  text-decoration: none;
}

.article-sidebar-empty a:hover {
  text-decoration: underline;
}

/* Keep detail layout in knowledge.css so sidebar stays visible with hub stylesheet */
.article-layout {
  max-width: 1040px;
  padding-block: 35px 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 15px;
}

.article-sidebar .panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line, #e5edf7);
  border-radius: 12px;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

