/* Microsoft knowledge FAQ
   Extends the shared Linkmetax visual system in styles.css. */

.knowledge-page {
  overflow-x: clip;
  background: var(--paper);
}

.knowledge-page .main-nav a[aria-current="page"] {
  color: var(--blue);
}

.knowledge-page .main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Hero */
.knowledge-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 76px 0 62px;
  color: var(--white);
  background:
    radial-gradient(circle at 16% 12%, rgba(47, 113, 245, 0.32), transparent 35%),
    radial-gradient(circle at 88% 72%, rgba(69, 221, 207, 0.13), transparent 29%),
    linear-gradient(140deg, #07111f 0%, #0b1a2f 60%, #071521 100%);
}

.knowledge-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  top: -310px;
  right: -120px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 76px rgba(255, 255, 255, 0.018),
    0 0 0 152px rgba(255, 255, 255, 0.012);
}

.knowledge-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 94%);
}

.knowledge-hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.76);
}

.breadcrumbs a:hover {
  color: var(--cyan);
}

.knowledge-hero-copy {
  max-width: 890px;
}

.knowledge-hero-copy h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.knowledge-hero-copy h1 em {
  color: var(--cyan);
  font-family: Georgia, "Songti SC", serif;
  font-style: normal;
  font-weight: 500;
}

.knowledge-hero-copy > p:last-child {
  max-width: 780px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.9;
}

.knowledge-search-wrap {
  max-width: 930px;
  margin-top: 38px;
}

.knowledge-search {
  min-height: 66px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 18px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 17px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.knowledge-search:focus-within {
  border-color: var(--blue-bright);
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.24),
    0 0 0 4px rgba(114, 162, 255, 0.16);
  transform: translateY(-1px);
}

.knowledge-search > span:first-child {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.knowledge-search input {
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.knowledge-search input::placeholder {
  color: #8a94a3;
}

.knowledge-search kbd {
  min-width: 28px;
  padding: 3px 8px;
  color: var(--muted);
  background: #f0f2f5;
  border: 1px solid #d8dee5;
  border-radius: 6px;
  font-size: 10px;
  text-align: center;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
}

.search-suggestions button {
  min-height: 30px;
  padding: 4px 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.35;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.search-suggestions button:hover {
  color: var(--white);
  background: rgba(47, 113, 245, 0.25);
  border-color: rgba(114, 162, 255, 0.55);
}

.knowledge-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 930px;
  margin-top: 38px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.knowledge-proof span {
  min-width: 0;
  padding: 15px 17px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(6, 17, 31, 0.58);
  font-size: 9px;
  line-height: 1.5;
}

.knowledge-proof b {
  display: block;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 12px;
}

/* Popular questions */
.popular-section {
  padding: 92px 0;
  background: #eef1f4;
  border-bottom: 1px solid var(--line);
}

.knowledge-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.knowledge-section-head h2,
.category-sidebar h2,
.method-section h2,
.ask-copy h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

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

.popular-card {
  min-width: 0;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 25px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  text-align: left;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.popular-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 113, 245, 0.42);
  box-shadow: 0 18px 44px rgba(14, 31, 53, 0.12);
}

.popular-index {
  margin-bottom: 38px;
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.popular-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
}

.popular-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.popular-summary {
  display: -webkit-box;
  margin: 11px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.popular-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--blue);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 740;
  text-align: left;
}

.popular-link span {
  transition: transform 0.2s ease;
}

.popular-link:hover span {
  transform: translateX(4px);
}

/* Searchable knowledge library */
.knowledge-library {
  padding: 104px 0 116px;
  background: var(--paper);
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 68px;
  align-items: start;
}

.category-sidebar,
.library-content {
  min-width: 0;
}

.category-sticky {
  position: sticky;
  top: 126px;
}

.category-sidebar h2 {
  margin-bottom: 24px;
  font-size: 34px;
}

.category-nav {
  display: grid;
  gap: 6px;
}

.category-button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  color: #586577;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.category-button.is-active,
.category-button[aria-current="true"] {
  color: var(--ink);
  background: var(--white);
  border-color: rgba(47, 113, 245, 0.32);
  box-shadow: 0 8px 24px rgba(14, 31, 53, 0.07);
}

.category-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #edf3ff;
  border-radius: 8px;
  font-size: 13px;
}

.category-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 690;
}

.category-count {
  color: #8b95a2;
  font-size: 9px;
  font-weight: 700;
}

.sidebar-help {
  margin-top: 24px;
  padding: 19px;
  background: #edf3ff;
  border: 1px solid #d5e1f8;
  border-radius: 14px;
}

.sidebar-help > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  color: var(--white);
  background: var(--blue);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-weight: 700;
}

.sidebar-help strong {
  display: block;
  font-size: 12px;
}

.sidebar-help p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.sidebar-help a {
  color: var(--blue);
  font-size: 10px;
  font-weight: 760;
}

.library-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.library-label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.library-toolbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.result-count {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.result-count strong {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1;
}

.active-filters {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 13px;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: #4d617e;
  background: #edf3ff;
  border: 1px solid #d4e0f7;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 690;
}

.knowledge-list {
  display: grid;
  gap: 10px;
}

.knowledge-item {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 26px rgba(14, 31, 53, 0.045);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.knowledge-item:hover,
.knowledge-item.is-open {
  border-color: rgba(47, 113, 245, 0.38);
  box-shadow: 0 13px 36px rgba(14, 31, 53, 0.08);
}

.knowledge-item[hidden] {
  display: none;
}

.knowledge-question {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 22px;
  align-items: center;
  padding: 21px 22px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.question-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.question-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #788493;
  font-size: 9px;
  font-weight: 680;
}

.intent-badge {
  justify-self: start;
  display: inline-flex;
  padding: 3px 7px;
  color: #52657f;
  background: #f0f3f7;
  border-radius: 5px;
  font-size: 8px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.45;
}

.question-title {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.55;
  letter-spacing: -0.012em;
}

.question-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #7a8594;
  font-size: 9px;
  font-weight: 620;
}

.question-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  background: #f7f8fa;
  border: 1px solid #eaedf1;
  border-radius: 999px;
  line-height: 1.35;
}

.question-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #edf3ff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.knowledge-question[aria-expanded="true"] .question-toggle {
  color: var(--white);
  background: var(--blue);
}

.knowledge-answer {
  display: none;
  padding: 0 22px 24px;
  border-top: 1px solid transparent;
}

.knowledge-item.is-open .knowledge-answer {
  display: block;
  border-top-color: var(--line);
  animation: knowledgeAnswerIn 0.24s ease both;
}

@keyframes knowledgeAnswerIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.answer-direct {
  margin: 20px 0 16px;
  padding: 16px 18px;
  color: #344a66;
  background: #edf3ff;
  border-left: 3px solid var(--blue);
  border-radius: 0 11px 11px 0;
  font-size: 12px;
  line-height: 1.75;
}

.answer-direct strong,
.answer-direct b {
  color: var(--ink);
}

.answer-direct p {
  margin: 5px 0 0;
}

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

.answer-block {
  min-width: 0;
  padding: 15px 16px;
  color: #566274;
  background: #f8f9fa;
  border: 1px solid #e8ebef;
  border-radius: 11px;
  font-size: 10px;
  line-height: 1.7;
}

.answer-block h3,
.answer-block h4,
.answer-block strong:first-child {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
}

.answer-block p {
  margin: 0;
}

.answer-block ul,
.answer-block ol {
  margin: 5px 0 0;
  padding-left: 17px;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 16px;
  color: #7f8997;
  font-size: 9px;
}

.answer-meta span {
  overflow-wrap: anywhere;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #dce1e7;
  color: var(--muted);
  font-size: 9px;
}

.source-links strong {
  color: var(--ink);
}

.source-links a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(47, 113, 245, 0.28);
  text-underline-offset: 3px;
}

.source-links a:hover {
  text-decoration-color: currentColor;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}

.item-actions .button {
  min-height: 38px;
  padding-inline: 15px;
  font-size: 10px;
}

.item-actions .text-link {
  padding: 7px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.knowledge-empty {
  display: none;
  padding: 52px 24px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed #ccd3dc;
  border-radius: 16px;
  text-align: center;
}

.knowledge-empty.is-visible {
  display: block;
}

.knowledge-empty > span {
  color: var(--blue);
  font-size: 34px;
}

.knowledge-empty h3 {
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 19px;
}

.knowledge-empty p {
  margin: 0 0 18px;
  font-size: 11px;
}

.load-more {
  width: 100%;
  margin-top: 16px;
}

.load-more[hidden] {
  display: none;
}

/* Editorial method */
.method-section {
  position: relative;
  overflow: hidden;
  padding: 104px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 18%, rgba(47, 113, 245, 0.22), transparent 32%),
    linear-gradient(140deg, #07111f, #0d2039);
}

.method-section::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -180px;
  bottom: -210px;
  border: 1px solid rgba(69, 221, 207, 0.17);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(69, 221, 207, 0.025);
}

.method-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: 70px;
  align-items: start;
}

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

.method-grid article {
  min-width: 0;
  min-height: 180px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
}

.method-grid article > span {
  display: block;
  margin-bottom: 26px;
  color: var(--cyan);
  font-family: Georgia, serif;
  font-size: 10px;
}

.method-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.method-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1.75;
}

/* Ask form */
.ask-section {
  padding: 112px 0;
  background:
    radial-gradient(circle at 12% 22%, rgba(47, 113, 245, 0.08), transparent 30%),
    var(--paper);
}

.ask-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  gap: 84px;
  align-items: start;
}

.ask-copy {
  min-width: 0;
}

.ask-copy > p:not(.kicker) {
  max-width: 480px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
}

.ask-copy ul {
  display: grid;
  gap: 9px;
  margin: 25px 0 0;
  padding: 0;
  color: #586576;
  list-style: none;
  font-size: 10px;
}

.ask-copy li {
  position: relative;
  padding-left: 20px;
}

.ask-copy li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

.ask-form {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ask-form label {
  min-width: 0;
}

.ask-form label > span:first-child:not(.sr-only) {
  display: block;
  margin-bottom: 6px;
  color: #596474;
  font-size: 10px;
  font-weight: 690;
}

.ask-form input:not([type="checkbox"]),
.ask-form select,
.ask-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #f7f8fa;
  border: 1px solid #e0e5eb;
  border-radius: 9px;
  outline: 0;
  font-size: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ask-form input:not([type="checkbox"]),
.ask-form select {
  height: 44px;
}

.ask-form textarea {
  min-height: 112px;
  resize: vertical;
}

.ask-form input:focus,
.ask-form select:focus,
.ask-form textarea:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 113, 245, 0.1);
}

.ask-form .is-invalid {
  border-color: #d34f4f;
}

.ask-full {
  grid-column: 1 / -1;
}

.ask-form .consent-row {
  margin: 2px 0;
}

.ask-form .consent-row > span {
  display: inline;
  margin: 0;
}

.reply-field[hidden] {
  display: none;
}

.ask-form .form-message {
  width: 100%;
}

/* Shared homepage hand-off to the full knowledge page. */
.qa-sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 18px;
}

.qa-sidebar-actions .button {
  min-height: 44px;
  padding-inline: 18px;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1050px) {
  .popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 38px;
  }

  .method-layout,
  .ask-layout {
    gap: 48px;
  }
}

@media (max-width: 860px) {
  .knowledge-page .main-nav a[aria-current="page"]::after {
    display: none;
  }

  .knowledge-hero {
    padding: 64px 0 54px;
  }

  .knowledge-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-layout,
  .method-layout,
  .ask-layout {
    grid-template-columns: 1fr;
  }

  .library-layout {
    gap: 42px;
  }

  .category-sticky {
    position: static;
  }

  .category-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-help {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 3px 12px;
    align-items: center;
  }

  .sidebar-help > span {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .sidebar-help p {
    margin: 0;
  }

  .sidebar-help a {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .method-layout,
  .ask-layout {
    gap: 34px;
  }

  .ask-copy > p:not(.kicker) {
    max-width: 650px;
  }
}

@media (max-width: 640px) {
  .knowledge-hero {
    padding: 50px 0 44px;
  }

  .breadcrumbs {
    margin-bottom: 25px;
  }

  .knowledge-hero-copy h1 {
    font-size: clamp(42px, 13.4vw, 58px);
  }

  .knowledge-hero-copy > p:last-child {
    font-size: 14px;
    line-height: 1.8;
  }

  .knowledge-search-wrap {
    margin-top: 28px;
  }

  .knowledge-search {
    min-height: 58px;
    grid-template-columns: 26px minmax(0, 1fr);
    padding: 0 14px;
    border-radius: 14px;
  }

  .knowledge-search input {
    height: 56px;
    font-size: 12px;
  }

  .knowledge-search kbd {
    display: none;
  }

  .search-suggestions {
    align-items: flex-start;
  }

  .search-suggestions > span {
    width: 100%;
  }

  .knowledge-proof {
    margin-top: 28px;
  }

  .knowledge-proof span {
    padding: 12px;
  }

  .popular-section,
  .knowledge-library,
  .method-section,
  .ask-section {
    padding: 78px 0;
  }

  .knowledge-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .knowledge-section-head h2,
  .method-section h2,
  .ask-copy h2 {
    font-size: 37px;
  }

  .popular-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .popular-card {
    min-height: 205px;
    padding: 21px;
  }

  .popular-index {
    margin-bottom: 28px;
  }

  .category-sidebar h2 {
    font-size: 31px;
  }

  .category-nav {
    display: flex;
    gap: 8px;
    margin-inline: -14px;
    padding: 2px 14px 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: inline proximity;
  }

  .category-button {
    width: auto;
    flex: 0 0 auto;
    grid-template-columns: 28px auto auto;
    gap: 7px;
    padding: 9px 8px;
    scroll-snap-align: start;
  }

  .category-icon {
    width: 28px;
    height: 28px;
  }

  .sidebar-help {
    display: block;
  }

  .sidebar-help > span {
    margin-bottom: 12px;
  }

  .sidebar-help p {
    margin: 5px 0 12px;
  }

  .library-toolbar {
    align-items: flex-start;
  }

  .library-toolbar h2 {
    font-size: 26px;
  }

  .knowledge-question {
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 12px;
    padding: 18px 16px;
  }

  .question-title {
    font-size: 13px;
  }

  .question-toggle {
    width: 31px;
    height: 31px;
  }

  .knowledge-answer {
    padding: 0 16px 19px;
  }

  .answer-direct {
    margin-top: 16px;
    padding: 14px;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    min-height: 0;
  }

  .ask-form {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .ask-full {
    grid-column: auto;
  }

  .item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .item-actions .button,
  .qa-sidebar-actions .button {
    width: 100%;
  }

  .qa-sidebar-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .knowledge-page .shell {
    width: calc(100% - 28px);
  }

  .knowledge-page main,
  .knowledge-hero-inner,
  .knowledge-search-wrap,
  .library-layout,
  .library-content,
  .knowledge-list,
  .knowledge-item,
  .ask-layout,
  .ask-form {
    min-width: 0;
    max-width: 100%;
  }

  .knowledge-hero-copy h1 {
    font-size: clamp(38px, 11.7vw, 48px);
    overflow-wrap: anywhere;
  }

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

  .knowledge-proof span {
    overflow-wrap: anywhere;
  }

  .category-button {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .library-toolbar {
    gap: 12px;
  }

  .result-count strong {
    font-size: 25px;
  }

  .question-tags,
  .answer-meta,
  .source-links {
    max-width: 100%;
  }

  .ask-form select {
    min-width: 0;
  }

  .ask-form .button {
    width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-item.is-open .knowledge-answer {
    animation: none;
  }
}
