/* ==========================================================================
   Help centre categories (HubDB dynamic pages, topic-category): one page per
   category with a card per section, and one page per section with its whole
   list. The section tabs under the header are in help-chrome.css, shared
   with the knowledge base articles. Regular weight only, hierarchy from size and colour, 5 px
   controls and 10 px cards, spacing 4/8/16/24/32/48/64, and no tracked
   uppercase labels, left-border accents or arrows in buttons.

   Loaded after help.css, which holds the tokens, header, footer, buttons and
   breadcrumb shared by every help centre page. Every selector starts with
   .kb- so nothing reaches main.css or other templates. The block class names
   are shared with the knowledge base block catalogue, so keep them as they are.
   ========================================================================== */

.kb-tile {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kb-tile :is(img, svg) {
  width: 32px;
  height: 32px;
}

/* ===== kb-cat-head: breadcrumb, icon and title, description, filter ===== */
.kb-cat-head {
  padding: var(--kb-space-6) 0 var(--kb-space-5);
}
.kb-cat-title {
  display: flex;
  align-items: center;
  gap: var(--kb-space-4);
}

/* ===== kb-filter: ERP system and installation, as chips ===== */
.kb-filter {
  display: flex;
  flex-direction: column;
  gap: var(--kb-space-3);
  margin-top: var(--kb-space-5);
}
.kb-filter[hidden],
.kb-chips[hidden] {
  display: none;
}
.kb-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kb-space-2);
}
.kb-chips__label {
  min-width: 96px;
  margin-right: var(--kb-space-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-chips button {
  min-height: 36px;
  padding: 0 var(--kb-space-3);
  border: 1px solid var(--kb-border);
  border-radius: 18px;
  background-color: var(--kb-white);
  color: var(--kb-indigo);
  font-family: var(--kb-font);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.kb-chips button:hover {
  border-color: var(--kb-indigo);
}
.kb-chips button[aria-pressed='true'] {
  border-color: var(--kb-indigo);
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-page .kb-filter__note {
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}

/* ===== kb-sec-grid and kb-sec-card: the four sections ===== */
.kb-cat-body {
  padding-bottom: var(--kb-space-6);
}
.kb-sec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--kb-space-4);
}
.kb-page .kb-sec-card {
  padding: var(--kb-space-4) var(--kb-space-4) var(--kb-space-3);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-page .kb-sec-card--full {
  max-width: 880px;
  padding: var(--kb-space-3) var(--kb-space-4);
}
.kb-page .kb-sec-card__title {
  display: flex;
  align-items: baseline;
  gap: var(--kb-space-2);
  margin-bottom: var(--kb-space-2);
  font-size: 24px;
  line-height: 34px;
}
.kb-sec-card__title a {
  text-decoration: none;
}
.kb-sec-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-sec-card__count {
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-page .kb-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.kb-page .kb-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--kb-space-3);
  padding: var(--kb-space-2) 0;
}
.kb-page .kb-list li[hidden],
.kb-page .kb-list[hidden],
.kb-page .kb-sec-card__all[hidden],
.kb-page .kb-list__none[hidden] {
  display: none;
}
.kb-page .kb-list a {
  color: var(--kb-indigo);
  text-decoration: none;
}
.kb-page .kb-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-badges {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--kb-space-1);
  max-width: 50%;
}
.kb-badge {
  padding: 0 var(--kb-space-2);
  border-radius: var(--kb-radius-sm);
  background-color: var(--kb-seashell);
  font-size: 12px;
  line-height: 20px;
  color: var(--kb-indigo-70);
  white-space: nowrap;
}
.kb-page .kb-sec-card__all {
  display: inline-block;
  margin: var(--kb-space-2) 0 var(--kb-space-2);
}
.kb-page .kb-none,
.kb-page .kb-list__none {
  padding: var(--kb-space-2) 0;
  color: var(--kb-indigo-70);
}

/* The row to the error-code page, first in Bank og filer, Feilsøking. */
.kb-page .kb-codes-row {
  display: flex;
  align-items: center;
  gap: var(--kb-space-3);
  margin: var(--kb-space-2) calc(-1 * var(--kb-space-3));
  padding: var(--kb-space-3);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-seashell);
  text-decoration: none;
}
.kb-codes-row:hover .kb-codes-row__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-codes-row__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--kb-radius-sm);
  background-color: var(--kb-pink);
}
.kb-codes-row__text {
  display: flex;
  flex-direction: column;
}

/* Finance Manager and SweBase: the way to the user guide. */
.kb-page .kb-guide-card {
  max-width: 720px;
  padding: var(--kb-space-5);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-page .kb-guide-card p {
  margin: var(--kb-space-2) 0 var(--kb-space-4);
  color: var(--kb-text);
}

/* ===== kb-empty: the calm state before the table has rows ===== */
.kb-empty {
  max-width: 720px;
  padding: var(--kb-space-5);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-page .kb-empty p {
  margin: var(--kb-space-2) 0 var(--kb-space-3);
  color: var(--kb-text);
}
.kb-page .kb-none {
  color: var(--kb-text);
}

/* ===== kb-codes: «Feilkoder fra banken» (error-codes) =====
   The find field, the A–Å bar and one white card per letter with the codes
   grouped by type; the code in monospace, the text beside it. */
.kb-codes-find {
  position: relative;
  max-width: 720px;
  margin-top: var(--kb-space-5);
}
.kb-codes-find[hidden] {
  display: none;
}
.kb-codes-find__icon {
  position: absolute;
  left: var(--kb-space-3);
  top: 14px;
  color: var(--kb-indigo-70);
}
.kb-page .kb-codes-find input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 var(--kb-space-3) 0 48px;
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
  color: var(--kb-indigo);
  font-family: var(--kb-font);
  font-size: 16px;
}
.kb-page .kb-codes-find input:focus {
  border-color: var(--kb-indigo);
  outline: 2px solid var(--kb-blue);
  outline-offset: 2px;
}
.kb-page .kb-codes-find input::placeholder {
  color: var(--kb-indigo-70);
}
.kb-az[hidden] {
  display: none;
}
.kb-page .kb-az ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kb-space-1);
  margin-top: var(--kb-space-4);
}
.kb-az :is(a, span) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: var(--kb-radius-sm);
  font-size: 14px;
  line-height: 20px;
}
.kb-page .kb-az a {
  background-color: var(--kb-white);
  color: var(--kb-indigo);
  text-decoration: none;
}
.kb-page .kb-az a:hover {
  text-decoration: underline;
}
.kb-az span {
  color: var(--kb-border);
}
.kb-codes__letter {
  scroll-margin-top: var(--kb-space-4);
}
.kb-codes__letter + .kb-codes__letter {
  margin-top: var(--kb-space-5);
}
.kb-codes__letter[hidden],
.kb-codes__group[hidden],
.kb-page .kb-codes__list li[hidden],
.kb-codes__none[hidden] {
  display: none;
}
.kb-page .kb-codes__head {
  margin-bottom: var(--kb-space-2);
  font-size: 24px;
  line-height: 34px;
}
.kb-page .kb-codes__card {
  max-width: 880px;
}
.kb-codes__group + .kb-codes__group {
  margin-top: var(--kb-space-3);
}
.kb-page .kb-codes__type {
  margin-bottom: var(--kb-space-1);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-codes__prefix {
  margin-right: var(--kb-space-1);
  font-family: var(--kb-mono);
  color: var(--kb-indigo);
}
.kb-page .kb-codes__list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--kb-space-3);
  padding: var(--kb-space-2) 0;
  color: var(--kb-indigo);
  text-decoration: none;
}
.kb-page .kb-codes__list a:hover .kb-codes__text {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-codes__code {
  font-family: var(--kb-mono);
  font-size: 14px;
  line-height: 26px;
  color: var(--kb-indigo-70);
}
.kb-codes__text {
  color: var(--kb-text);
}
.kb-page .kb-codes__none,
.kb-page .kb-codes__others {
  max-width: 880px;
  margin-top: var(--kb-space-5);
  color: var(--kb-text);
}

/* ===== kb-contact, small layout: one line and two ways ===== */
.kb-contact-small {
  padding: var(--kb-space-7) 0;
}
.kb-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kb-space-4) var(--kb-space-6);
  padding: var(--kb-space-5);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-page .kb-contact-row p {
  margin-top: var(--kb-space-1);
  color: var(--kb-text);
}
.kb-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kb-space-3) var(--kb-space-4);
}

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

@media (max-width: 640px) {
  .kb-cat-head {
    padding: var(--kb-space-5) 0 var(--kb-space-4);
  }
  .kb-breadcrumb ol {
    margin-bottom: var(--kb-space-4);
  }
  .kb-page .kb-cat-head .kb-h2 {
    font-size: 32px;
    line-height: 40px;
  }
  .kb-cat-title {
    gap: var(--kb-space-3);
  }
  .kb-chips__label {
    flex-basis: 100%;
  }
  .kb-page .kb-list li {
    flex-direction: column;
    gap: var(--kb-space-1);
  }
  .kb-badges {
    justify-content: flex-start;
    max-width: none;
  }
  .kb-contact-small {
    padding: var(--kb-space-6) 0;
  }
  .kb-contact-row {
    padding: var(--kb-space-4);
  }
}
