.knowledge-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-block: 14px;
}
.knowledge-search__label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.knowledge-search input,
.knowledge-search button,
.knowledge-more {
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 6px 12px;
  border: 1px solid #b8a68c;
  border-radius: 9px;
  color: #30261e;
  font: inherit;
}
.knowledge-search input {
  background: #fffdf6;
  font-size: 16px;
}
.knowledge-search button,
.knowledge-more {
  background: #f2e4cf;
  font-weight: 800;
  cursor: pointer;
}
.knowledge-tabs,
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@container (min-width: 600px) {
  .knowledge-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.knowledge-tabs {
  gap: 10px;
  margin-block: 18px;
}
.knowledge-tabs button {
  --tab-color: #dceeed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-inline-size: 0;
  min-block-size: 58px;
  padding: 12px 10px;
  border: 2px solid #675a4b50;
  border-radius: 12px;
  background: var(--tab-color);
  color: #30261e;
  box-shadow: 0 3px 0 #675a4b30;
  font: 800 14px/1.45 Rounded, sans-serif;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.knowledge-tabs button span {
  flex: 1;
  min-inline-size: 0;
  text-wrap: balance;
}
.knowledge-tabs button .topic-mark { width: clamp(20px, 6cqi, 30px); }
.knowledge-tabs button .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.knowledge-tabs [data-category="ea"] { --tab-color: #d7e6f6; }
.knowledge-tabs [data-category="indicators"] { --tab-color: #f4d4e7; }
.knowledge-tabs [data-category="brokers"] { --tab-color: #f4d0b4; }
.knowledge-tabs button[aria-pressed="true"] {
  border-color: #675a4b;
  box-shadow: inset 0 0 0 1px #675a4b;
  transform: translateY(2px);
}
@media (hover: hover) {
  .knowledge-tabs button:hover {
    border-color: #675a4b;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #675a4b30;
  }
  .knowledge-tabs button[aria-pressed="true"]:hover {
    transform: translateY(2px);
    box-shadow: inset 0 0 0 1px #675a4b;
  }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge-tabs button { transition: none; }
}
.knowledge-results {
  margin-block: 12px 16px;
}
.knowledge-results p {
  margin: 0 0 6px;
  font-size: .82rem;
}
.knowledge-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}
.knowledge-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  box-sizing: border-box;
  min-block-size: 44px;
  block-size: 100%;
  padding: 7px 9px;
  border: 1px solid #b8a68c;
  border-radius: 8px;
  background: #fffdf6;
  color: #30261e;
  font: 800 .85rem/1.45 Rounded, sans-serif;
  overflow-wrap: anywhere;
}
.knowledge-grid a:hover { text-decoration: underline; }
.knowledge-more { margin-top: 10px; }
.knowledge-search :focus-visible,
.knowledge-tabs :focus-visible,
.knowledge-results :focus-visible {
  outline: 2px solid #215854;
  outline-offset: 2px;
}
.basics:has(.knowledge-tabs) {
  container-type: inline-size;
}
