* {
  box-sizing: border-box;
}

:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #637083;
  --line: #d9e1ea;
  --blue: #2563eb;
  --green: #14805f;
  --amber: #b7791f;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.10);
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.knowledge-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.knowledge-brand,
.knowledge-nav {
  display: flex;
  align-items: center;
}

.knowledge-brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.knowledge-brand img {
  border-radius: 8px;
}

.knowledge-nav {
  gap: 8px;
}

.knowledge-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.knowledge-nav a:hover,
.knowledge-nav a:focus-visible {
  color: var(--blue);
  background: #edf4ff;
  outline: none;
}

.knowledge-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.knowledge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(26px, 5vw, 48px) 0 clamp(24px, 5vw, 42px);
  border-bottom: 1px solid var(--line);
}

.knowledge-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.knowledge-hero h1,
.knowledge-article-head h2,
.knowledge-list-head h2,
.knowledge-state h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

.knowledge-hero h1 {
  max-width: 780px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.knowledge-lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.knowledge-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 720px;
  margin-top: 26px;
}

.knowledge-search-field {
  display: grid;
  gap: 6px;
}

.knowledge-search-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.knowledge-search input,
.knowledge-search button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

.knowledge-search input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}

.knowledge-search input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

.knowledge-search button {
  align-self: end;
  border: 0;
  padding: 0 20px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.knowledge-search button:hover,
.knowledge-search button:focus-visible {
  background: #1e4fc2;
  outline: none;
}

.knowledge-hero-media {
  margin: 0;
}

.knowledge-hero-media img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding-top: 28px;
}

.knowledge-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  display: grid;
  gap: 8px;
}

.knowledge-sidebar-head,
.knowledge-category,
.knowledge-list-head,
.knowledge-state,
.knowledge-card,
.knowledge-article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.knowledge-sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.knowledge-sidebar-head strong {
  color: var(--ink);
}

.knowledge-category {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
}

.knowledge-category small {
  color: var(--green);
  font-weight: 850;
}

.knowledge-category:hover,
.knowledge-category:focus-visible,
.knowledge-category.is-active {
  border-color: rgba(20, 128, 95, 0.38);
  color: var(--green);
  background: #edf8f4;
  outline: none;
}

.knowledge-content {
  min-width: 0;
}

.knowledge-list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.knowledge-list-head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.knowledge-list-head span {
  color: var(--amber);
  font-weight: 850;
}

.knowledge-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-card {
  min-height: 172px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.knowledge-card:hover,
.knowledge-card:focus-within {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
  transform: translateY(-1px);
}

.knowledge-card a {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 18px;
  text-decoration: none;
}

.knowledge-card span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.knowledge-card strong {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.24;
}

.knowledge-card small {
  color: var(--muted);
  font-size: 0.94rem;
}

.knowledge-state {
  padding: 26px;
}

.knowledge-state h2 {
  font-size: 1.55rem;
}

.knowledge-state p {
  max-width: 620px;
  color: var(--muted);
}

.knowledge-state a {
  color: var(--blue);
  font-weight: 800;
}

.knowledge-state-error {
  border-color: rgba(183, 121, 31, 0.45);
  background: #fffaf0;
}

.knowledge-article {
  overflow: hidden;
}

.knowledge-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 22px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.knowledge-breadcrumb a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.knowledge-article-head {
  padding: 24px 22px 20px;
  border-bottom: 1px solid var(--line);
}

.knowledge-article-head h2 {
  max-width: 840px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
}

.knowledge-article-head p {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.knowledge-article-head small {
  display: inline-flex;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 750;
}

.knowledge-article-body {
  padding: clamp(22px, 4vw, 40px);
  color: #263244;
  font-size: 1.04rem;
}

.knowledge-article-body > *:first-child {
  margin-top: 0;
}

.knowledge-article-body > *:last-child {
  margin-bottom: 0;
}

.knowledge-article-body h1,
.knowledge-article-body h2,
.knowledge-article-body h3,
.knowledge-article-body h4 {
  margin: 1.6em 0 0.55em;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.18;
}

.knowledge-article-body p,
.knowledge-article-body li {
  max-width: 780px;
}

.knowledge-article-body a {
  color: var(--blue);
  font-weight: 750;
}

.knowledge-article-body img,
.knowledge-article-body video {
  display: block;
  max-width: min(100%, 900px);
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.knowledge-article-body table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.knowledge-article-body th,
.knowledge-article-body td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.knowledge-article-body th {
  background: #f0f5fa;
}

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

  .knowledge-hero-media {
    max-width: 520px;
  }

  .knowledge-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .knowledge-topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .knowledge-nav {
    width: 100%;
  }

  .knowledge-nav a {
    flex: 1;
    text-align: center;
    background: #f0f5fa;
  }

  .knowledge-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

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

  .knowledge-list-head {
    flex-direction: column;
  }

  .knowledge-search button {
    width: 100%;
  }

  .knowledge-list-head {
    align-items: start;
  }
}
