.knowledge-index,
.knowledge-page {
  max-width: 980px;
}

.knowledge-page {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(340px, 0.86fr);
  column-gap: clamp(32px, 5vw, 64px);
  max-width: 1220px;
  font-size: 1.075rem;
  line-height: 1.75;
}

.topbar nav > a[aria-current="page"] {
  color: var(--ink);
  background: #f3eadc;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.breadcrumbs {
  margin-bottom: clamp(24px, 4vw, 42px);
  color: var(--muted);
  font-size: 0.95rem;
}

.knowledge-page > .breadcrumbs {
  grid-column: 1 / -1;
  grid-row: 1;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: ">";
  margin-inline-start: 8px;
  color: var(--line);
}

.breadcrumbs a {
  text-underline-offset: 3px;
}

.knowledge-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.knowledge-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 26px rgba(104, 70, 38, 0.1);
}

.knowledge-card h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.knowledge-card h2 a {
  text-underline-offset: 4px;
}

.knowledge-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.knowledge-article {
  display: contents;
}

.knowledge-hero {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: start;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.knowledge-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.knowledge-article header {
  grid-column: 1;
  grid-row: 2;
  margin: 0 0 22px;
}

.knowledge-article header p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.16rem;
}

.knowledge-article header.long-title h1 {
  font-size: clamp(2.35rem, 3.8vw, 3.4rem);
}

.knowledge-article section {
  grid-column: 1 / -1;
  padding: 0;
  margin: clamp(24px, 4.2vw, 42px) 0 0;
}

.knowledge-article h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.knowledge-article p,
.knowledge-article ul,
.knowledge-article ol {
  margin-block: 0 0.9rem;
}

.knowledge-article .summary,
.knowledge-article .callout,
.knowledge-article .vtech-note {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.knowledge-article .summary {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin: 0;
}

.knowledge-article .summary p:last-child {
  margin-bottom: 0;
}

.knowledge-article .callout {
  border-inline-start: 4px solid var(--brand);
}

.knowledge-article .vtech-note {
  background: white;
  box-shadow: 0 10px 26px rgba(104, 70, 38, 0.08);
}

.knowledge-article .table-wrap {
  max-width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.knowledge-article table {
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.knowledge-article th,
.knowledge-article td {
  width: auto;
  border: 1px solid var(--line);
  line-height: 1.6;
}

.knowledge-article [aria-label="השוואה בין סוגי טלפונים"] th:nth-child(1) {
  width: 18%;
}

.knowledge-article [aria-label="השוואה בין סוגי טלפונים"] th:nth-child(2) {
  width: 30%;
}

.knowledge-article [aria-label="השוואה בין סוגי טלפונים"] th:nth-child(3) {
  width: 27%;
}

.knowledge-article [aria-label="השוואה בין סוגי טלפונים"] th:nth-child(4) {
  width: 25%;
}

.knowledge-article [aria-label="שיקולי ניהול ותחזוקה"] th:nth-child(1) {
  width: 24%;
}

.knowledge-article [aria-label="שיקולי ניהול ותחזוקה"] th:nth-child(2) {
  width: 42%;
}

.knowledge-article [aria-label="שיקולי ניהול ותחזוקה"] th:nth-child(3) {
  width: 34%;
}

.knowledge-article [aria-label="מילון מונחים לטלפוניה מלונאית"] th:nth-child(1) {
  width: 18%;
}

.knowledge-article [aria-label="מילון מונחים לטלפוניה מלונאית"] th:nth-child(2) {
  width: 30%;
}

.knowledge-article [aria-label="מילון מונחים לטלפוניה מלונאית"] th:nth-child(3) {
  width: 30%;
}

.knowledge-article [aria-label="מילון מונחים לטלפוניה מלונאית"] th:nth-child(4) {
  width: 22%;
}

.knowledge-article .decision-flow {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.knowledge-article .decision-step {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.knowledge-article .decision-arrow {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.knowledge-article .checklist {
  padding-inline-start: 0;
  list-style: none;
}

.knowledge-article .checklist li {
  position: relative;
  padding-inline-start: 1.7em;
}

.knowledge-article .checklist li::before {
  position: absolute;
  inset-inline-start: 0;
  content: "☐";
  color: var(--brand);
  font-weight: 800;
}

.knowledge-article .checklist.checklist-approved li {
  padding-inline-start: 0;
}

.knowledge-article .checklist.checklist-approved li::before {
  content: none;
}

.knowledge-article .checklist .checklist-box {
  display: inline-block;
  min-width: 1.5em;
  color: var(--brand);
  font-weight: 800;
}

.knowledge-article .caption {
  color: var(--muted);
  font-size: 0.95rem;
}

.knowledge-article .closing-cta {
  display: grid;
  justify-items: start;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(104, 70, 38, 0.1);
  margin-top: clamp(24px, 4vw, 38px);
}

.knowledge-article .closing-cta h2 {
  padding-bottom: 0;
  border-bottom: 0;
}

.knowledge-article .closing-cta .button {
  margin-top: 6px;
}

.knowledge-article header.faq-hub-hero {
  grid-column: 1 / -1;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(104, 70, 38, 0.1);
}

.knowledge-article .faq-hub-hero .lead {
  max-width: 860px;
}

.knowledge-article .faq-hub-hero .meta {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.knowledge-article .toc {
  grid-column: 1 / -1;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.knowledge-article .toc h2 {
  margin-bottom: 14px;
}

.knowledge-article .toc ol {
  columns: 2;
  column-gap: 40px;
  margin-bottom: 0;
  padding-inline-start: 24px;
}

.knowledge-article .toc li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.knowledge-article .toc a,
.knowledge-article .deep-link a {
  text-underline-offset: 3px;
}

.knowledge-article .faq-group {
  scroll-margin-top: 110px;
}

.knowledge-article .group-intro {
  max-width: 900px;
  color: var(--muted);
}

.knowledge-article .faq-item {
  border-top: 1px solid var(--line);
}

.knowledge-article .faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.knowledge-article .faq-item summary {
  position: relative;
  padding: 18px 34px 18px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 1.08rem;
  font-weight: 800;
}

.knowledge-article .faq-item summary::-webkit-details-marker {
  display: none;
}

.knowledge-article .faq-item summary::after {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  content: "+";
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.4rem;
  line-height: 1;
}

.knowledge-article .faq-item[open] summary::after {
  content: "−";
}

.knowledge-article .faq-item summary:focus-visible {
  outline: 3px solid #f4b23d;
  outline-offset: 3px;
}

.knowledge-article .faq-answer {
  max-width: 900px;
  padding: 0 4px 18px;
}

.knowledge-article .faq-answer p:last-child {
  margin-bottom: 0;
}

.knowledge-article .deep-link {
  font-size: 0.95rem;
}

.knowledge-article .closing {
  padding-top: 30px;
  border-top: 3px solid var(--ink);
}

.knowledge-article .article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.knowledge-article .article-nav a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
}

.knowledge-article .article-nav a:hover {
  border-color: var(--brand);
}

.knowledge-article .article-nav span {
  color: var(--brand);
  font-weight: 900;
}

@media (min-width: 901px) {
  .knowledge-page:has(.knowledge-article > header:not(.long-title)) .knowledge-hero {
    grid-row: 2;
  }

  .knowledge-article:not(:has(> header.long-title)) .summary {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .knowledge-page:has(.knowledge-article > header.long-title) .knowledge-hero {
    grid-row: 2;
  }

  .knowledge-article:has(> header.long-title) .summary {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 900px) {
  .knowledge-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-hero,
  .knowledge-article header,
  .knowledge-article .summary,
  .knowledge-article section {
    grid-column: 1;
    grid-row: auto;
  }

  .knowledge-hero {
    margin-bottom: 28px;
  }
}

@media (max-width: 640px) {
  .knowledge-index,
  .knowledge-page {
    padding-inline: 18px;
  }

  .knowledge-card {
    padding: 20px;
  }

  .knowledge-article .summary,
  .knowledge-article .callout,
  .knowledge-article .vtech-note {
    padding: 16px;
  }

  .knowledge-article .closing-cta {
    padding: 22px 18px;
  }

  .knowledge-article header.faq-hub-hero,
  .knowledge-article .toc {
    padding: 20px 18px;
  }

  .knowledge-article .toc ol {
    columns: 1;
  }

  .knowledge-article .article-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .knowledge-article .table-wrap {
    overflow: visible;
  }

  .knowledge-article table {
    min-width: 0;
    font-size: 9pt;
  }

  .knowledge-article .faq-item > .faq-answer {
    display: block !important;
  }

  .knowledge-article .faq-item > summary {
    list-style: none;
  }
}
