/* ==========================================================================
   help.aritma.com: the shared frame of every help centre page.

   Base rules for the page body, the breadcrumb, the product band and product
   cards, the announcements, and the product guide frame around the
   FinanceManagerDocs module. Design approved 2026-11-19
   (proto-views/produktsider-2026-11-19, shared/hjelp.css). Loaded by every
   template that includes help-header and help-footer, after help-chrome.css,
   which help-header loads and which has the header, menus, contact block,
   footer, the tokens and the font; page files (topic-page.css,
   kb-front-page.css) add only what their page has.

   Regular weight only, hierarchy from size and colour, 5 px controls and
   10 px cards, spacing 4/8/16/24/32/48/64, no tracked uppercase labels,
   left-border accents or arrows in buttons. Every selector starts with .kb-
   so nothing reaches main.css or other templates.
   ========================================================================== */

/* <main> stretches inside .body-wrapper, so the page colour is set on both. */
.body-wrapper:has(.kb-page),
.body-container-wrapper:has(.kb-page) {
  background: #f9f0ee;
}

.kb-page {
  background: var(--kb-seashell);
  color: var(--kb-indigo);
}

.kb-page :is(h1, h2, h3, p, ul, ol, li) {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

/* main.css sets its own font-family on every heading, so headings do not
   inherit the one set on the containers above. */
.kb-page :is(h1, h2, h3) {
  font-family: var(--kb-font);
  color: inherit;
}

.kb-page :is(ul, ol) {
  list-style: none;
}

.kb-page a {
  color: inherit;
}

.kb-page img {
  display: block;
}

.kb-page :focus-visible {
  outline: 2px solid var(--kb-blue);
  outline-offset: 2px;
}

/* Type roles */
.kb-page .kb-h2 {
  font-size: 40px;
  line-height: 50px;
  text-wrap: balance;
}
.kb-page .kb-h3 {
  font-size: 24px;
  line-height: 34px;
  text-wrap: balance;
}
.kb-page .kb-lead {
  max-width: 720px;
  margin-top: var(--kb-space-3);
  font-size: 18px;
  line-height: 28px;
  color: var(--kb-text);
}
.kb-page .kb-small {
  font-size: 14px;
  line-height: 20px;
}
.kb-muted {
  color: var(--kb-indigo-70);
}

.kb-page .kb-button--dark {
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-page .kb-textlink {
  color: var(--kb-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-page .kb-textlink:hover {
  text-decoration-thickness: 2px;
}

/* ===== Breadcrumb, also on the indigo product band ===== */
.kb-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kb-space-1) var(--kb-space-2);
  margin-bottom: var(--kb-space-5);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-breadcrumb li + li::before {
  content: '/';
  margin-right: var(--kb-space-2);
}
.kb-breadcrumb a {
  text-decoration: none;
}
.kb-breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== kb-product-head: the product band on the guide pages =====
   A short indigo top: where you are, the product and one line on what it is.
   The search is the bar's, as on every help centre page. */
.kb-product-head {
  position: relative;
  padding: 0 0 var(--kb-space-6);
  background-color: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-product-head :focus-visible {
  outline-color: var(--kb-seashell);
}
.kb-product-head .kb-breadcrumb ol {
  margin-bottom: var(--kb-space-4);
  color: var(--kb-on-dark-muted);
}
.kb-product-head__body {
  max-width: 720px;
}
.kb-page .kb-product-head h1 {
  font-size: 40px;
  line-height: 50px;
  text-wrap: balance;
}
.kb-page .kb-product-head__lead {
  max-width: 640px;
  margin-top: var(--kb-space-2);
  color: var(--kb-on-dark-muted);
}
.kb-page .kb-product-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kb-space-2) var(--kb-space-4);
  margin-top: var(--kb-space-3);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-on-dark-muted);
}
.kb-product-head__meta:not(:has(span:not([hidden]))) {
  display: none;
}
.kb-product-head__meta [hidden] {
  display: none;
}
.kb-product-head__meta a {
  color: var(--kb-seashell);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* kb-product-tile: the product's icon, in the style of the topic tiles. */
.kb-product-tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-seashell);
}
.kb-product-tile svg {
  display: block;
  width: 28px;
  height: 28px;
}

/* ===== kb-announce: the announcements list and a single announcement =====
   The topic overview's head and white cards, one reading column for a post. */
.kb-announce__head {
  padding: var(--kb-space-6) 0 var(--kb-space-5);
}
.kb-announce__body,
.kb-announce__post {
  padding-bottom: var(--kb-space-7);
}
.kb-page .kb-announce__list {
  display: grid;
  gap: var(--kb-space-3);
  max-width: var(--kb-measure);
}
.kb-page .kb-announce__item,
.kb-announce .kb-empty {
  display: flex;
  flex-direction: column;
  gap: var(--kb-space-2);
  max-width: var(--kb-measure);
  padding: var(--kb-space-5);
  border-radius: var(--kb-radius-md);
  background-color: var(--kb-white);
}
.kb-page .kb-announce__item p,
.kb-announce .kb-empty p {
  color: var(--kb-text);
}
.kb-announce__item h2 a {
  text-decoration: none;
}
.kb-announce__item h2 a:hover {
  text-decoration: underline;
}
.kb-announce .kb-empty .kb-textlink {
  align-self: flex-start;
}
.kb-announce__pager {
  display: flex;
  gap: var(--kb-space-5);
  margin-top: var(--kb-space-5);
}
.kb-announce__post {
  padding-top: var(--kb-space-6);
}
.kb-announce__post > * {
  max-width: var(--kb-measure);
}
.kb-announce__post .kb-h2 {
  margin-top: var(--kb-space-1);
}
.kb-page .kb-announce__prose {
  margin-top: var(--kb-space-5);
  color: var(--kb-text);
  overflow-wrap: break-word;
}
.kb-page .kb-announce__prose :is(h2, h3) {
  margin: var(--kb-space-5) 0 var(--kb-space-2);
  color: var(--kb-indigo);
}
.kb-page .kb-announce__prose h2 {
  font-size: 24px;
  line-height: 34px;
}
.kb-page .kb-announce__prose h3 {
  font-size: 20px;
  line-height: 30px;
}
.kb-page .kb-announce__prose :is(p, ul, ol) {
  margin-top: var(--kb-space-3);
}
.kb-page .kb-announce__prose :is(ul, ol) {
  padding-left: var(--kb-space-4);
}
.kb-page .kb-announce__prose ul {
  list-style: disc;
}
.kb-page .kb-announce__prose ol {
  list-style: decimal;
}
.kb-page .kb-announce__prose :is(strong, b) {
  font-weight: 400;
  color: var(--kb-indigo);
}
.kb-page .kb-announce__prose a {
  color: var(--kb-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-page .kb-announce__prose img {
  max-width: 100%;
  height: auto;
  margin: var(--kb-space-4) 0;
  border-radius: var(--kb-radius-md);
}

/* ===== kb-guide: the product guide frame around the FinanceManagerDocs module ===== */
/* The module's own HTML, restyled from outside until the module itself
   follows the help centre (listed for the module owner in the pull request).
   Its body font is set inline, so only !important reaches it. Aritma Uten has
   only a regular weight, so the module's bold would be drawn by the browser. */
.kb-guide .swebase-docs {
  --swebase-font-body: var(--kb-font) !important;
  --da-font-family-body: var(--kb-font) !important;
  --swebase-font-display: var(--kb-font) !important;
  --da-font-family-title: var(--kb-font) !important;
  /* The release notes' subscribe form (a HubSpot form) falls back to Helvetica. */
  --hsf-global__font-family: var(--kb-font);
  /* The module's warm surface (root, sticky tool bar, drawer) is the page's
     seashell, so the guide is not a lighter panel of its own. */
  --swebase-surface-warm: var(--kb-seashell);
  /* As tall as its content, so the help centre links follow right after it. */
  min-height: 0;
  background: var(--kb-seashell);
}
.kb-guide .swebase-docs :is(*) {
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
/* The band carries the title and lead, so the module's hero goes. */
.kb-guide .swebase-docs__hero {
  display: none;
}
.kb-guide .swebase-docs__rail-list,
.kb-guide .swebase-docs__rail-list a,
.kb-guide .swebase-docs__rail-subs a,
.kb-guide .swebase-docs .release-notes__version-list :is(ul, a) {
  border: 0;
}
/* The search dialog is white, so its selected result is seashell. */
.kb-guide .swebase-docs .swebase-docs__search-result[aria-selected='true'] {
  background: var(--kb-seashell);
  box-shadow: none;
}

/* Depth from surfaces, not lines: the current item in the guide's menus is a
   white surface on the page colour, never a stripe at its left edge. */
.kb-guide
  .swebase-docs
  :is(
    .swebase-docs__group-row,
    .swebase-docs__group-button,
    .swebase-docs__nav-link,
    .swebase-docs__nav-sub,
    .swebase-docs__topic-row
  )::before {
  content: none;
}
.kb-guide
  .swebase-docs
  :is(
    .swebase-docs__group-button[aria-current='page'],
    .swebase-docs__nav-link[aria-current='location'],
    .swebase-docs__nav-sub[aria-current='location'],
    .swebase-docs__topic-row[data-active='true'],
    .swebase-docs__rail-list a[aria-current='location'],
    .swebase-docs__rail-subs a[aria-current='location']
  ) {
  background: var(--kb-white);
  color: var(--kb-indigo);
}
.kb-guide .swebase-docs .swebase-docs__group-row:hover,
.kb-guide
  .swebase-docs
  .swebase-docs__group-button:not([aria-current='page']):hover {
  background: var(--kb-card-alt);
}
/* The release notes' version list: the same white surface, no rule or stripe. */
.kb-guide .release-notes .release-notes__version-list :is(ul, a) {
  border: 0;
}
.kb-guide .release-notes .release-notes__version-list a {
  margin-left: 0;
  border-radius: var(--kb-radius-sm);
}
.kb-guide .release-notes .release-notes__version-list a[aria-current] {
  background: var(--kb-white);
  color: var(--kb-indigo);
}
/* An open group whose page is current stays plain; only the page is marked. */
.kb-guide .swebase-docs .swebase-docs__group-row[data-active='true'] {
  background: transparent;
}
.kb-guide
  .swebase-docs
  .swebase-docs__group-row[data-active='true']
  .swebase-docs__nav-icon {
  color: var(--kb-indigo);
}
.kb-guide .swebase-docs__nav-family {
  border-top: 0;
  color: var(--kb-indigo-70);
}
/* The guide's text sits on the page background, as every article: no card,
   and the empty rule at its top goes. */
.kb-guide .swebase-docs__content div.da-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.kb-guide .swebase-docs__content div.da-card > hr:first-child {
  display: none;
}
/* The guide home's section cards: white on the page colour, no outline. */
.kb-guide .swebase-docs__quick-link {
  border: 0;
  border-radius: var(--kb-radius-md);
  background: var(--kb-white);
  box-shadow: none;
}
.kb-guide .swebase-docs__quick-link:hover {
  box-shadow: 0 8px 24px rgba(69, 9, 90, 0.1);
}
.kb-guide .swebase-docs__quick-link strong {
  color: var(--kb-indigo);
  font-size: 20px;
  line-height: 30px;
}
/* Phones and tablets: the compact bar with Contents and Search. */
.kb-guide .swebase-docs[data-guide] .swebase-docs__guide-tools,
.kb-guide .swebase-docs__guide-tools {
  border-color: transparent;
  background: var(--kb-white);
}
.kb-guide .swebase-docs__rail-search-button {
  border-color: var(--kb-border);
  background: var(--kb-white);
}

/* The help centre's focus ring (2 px blue, 2 px off), not the module's 3 px. */
.kb-guide .swebase-docs {
  --swebase-focus: var(--kb-blue);
}
.kb-guide
  .swebase-docs
  :is(a, button, input, summary, .table-wrap):focus-visible {
  outline: 2px solid var(--kb-blue);
  outline-offset: 2px;
}
/* "Til toppen": the help centre's dark button, not the design system's blue. */
.kb-guide .swebase-docs .swebase-docs__back-to-top {
  border: 0;
  border-radius: var(--kb-radius-sm);
  background: var(--kb-indigo);
  color: var(--kb-seashell);
}
.kb-guide .swebase-docs .swebase-docs__back-to-top:hover {
  background: var(--kb-indigo-70);
}

.kb-guide-after {
  padding-bottom: var(--kb-space-7);
}

.kb-guide .kb-doc__aside-title {
  margin-bottom: var(--kb-space-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-guide .kb-textlink {
  color: var(--kb-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The guide in the article layout (help-chrome.css, .kb-article): the
   module's own contents column and right rail give way to the theme's right
   column («På denne siden», «Flere i denne seksjonen», filled by
   product-guide's script from the module's markup), and its text takes the
   shared article styles. The module's headings are one level lower than a
   knowledge base article's (h2 is the page title), so they are mapped here. */
.kb-article--guide:not(.is-ready) {
  display: block;
}
.kb-article--guide.is-ready .swebase-docs {
  display: block;
}
.kb-article--guide.is-ready
  .swebase-docs
  :is(
    .swebase-docs__sidebar,
    .swebase-docs__rail,
    .swebase-docs__backdrop,
    .swebase-docs__contents-button,
    .swebase-docs__compact-search
  ) {
  display: none;
}
.kb-article .swebase-docs__main {
  max-width: none;
  margin: 0;
  padding: 0;
}
.kb-article .swebase-docs__content h2 {
  margin: 0 0 var(--kb-space-4);
  font-size: 32px;
  line-height: 40px;
}
.kb-article .swebase-docs__content h3 {
  margin: var(--kb-space-6) 0 var(--kb-space-3);
  font-size: 24px;
  line-height: 34px;
}
.kb-article .swebase-docs__content h4,
.kb-article .swebase-docs__content p.prose-label {
  margin: var(--kb-space-5) 0 var(--kb-space-2);
  font-size: 20px;
  line-height: 30px;
  color: var(--kb-indigo);
}
.kb-article .swebase-docs__content p.prose-label > strong {
  all: unset;
}
.kb-article .swebase-docs__content .fm-release-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--kb-space-1) var(--kb-space-3);
}
.kb-article .swebase-docs__content .swebase-docs__release-date {
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-indigo-70);
}
.kb-article .swebase-docs__content .doc-fig img {
  width: auto;
  margin: 0;
}

/* kb-guide-more: the help centre links under the module, until the module
   has a place for them in its right column. */
.kb-guide-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--kb-space-4);
  padding-top: var(--kb-space-5);
  border-top: 1px solid var(--kb-border);
}
.kb-guide-more li + li {
  margin-top: var(--kb-space-2);
}
/* The other user guides: icon beside the name at every width, since it is a list. */
.kb-page .kb-guide-others li {
  display: flex;
  align-items: center;
  gap: var(--kb-space-3);
}
.kb-guide-others .kb-product-tile {
  background-color: var(--kb-white);
}
.kb-page .kb-guide-more a {
  font-size: 16px;
  line-height: 26px;
}

/* kb-help-row: the one support line at the end of a guide. */
.kb-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--kb-space-3) var(--kb-space-4);
  margin-top: var(--kb-space-6);
  padding: var(--kb-space-4);
  border-radius: var(--kb-radius-md);
  background: var(--kb-white);
}
.kb-page .kb-help-row p:first-child {
  font-size: 18px;
  line-height: 28px;
}
.kb-page .kb-help-row p + p {
  font-size: 14px;
  line-height: 20px;
  color: var(--kb-text);
}
.kb-help-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kb-space-3) var(--kb-space-4);
}
.kb-page .kb-help-row .kb-button {
  padding: var(--kb-space-2) var(--kb-space-3);
}

/* ===== kb-error: the help centre 404 (templates/system/help-404) =====
   The hero and search come from kb-front-page.css; the hero has no shelf
   here, so it keeps its bottom padding at every width. */
.kb-page.kb-error h1 {
  margin-bottom: var(--kb-space-3);
}
.kb-page.kb-error .kb-hero {
  padding-bottom: var(--kb-space-7);
}
.kb-error__after {
  padding-top: var(--kb-space-6);
  padding-bottom: var(--kb-space-7);
}
.kb-page .kb-error__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kb-space-3) var(--kb-space-5);
}
.kb-page .kb-error__links + .kb-help-row {
  margin-top: var(--kb-space-6);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  /* The help centre's container already has the side margin. */
  .kb-guide .swebase-docs__main {
    padding-inline: 0;
  }
  .kb-guide .swebase-docs__guide-tools {
    width: 100%;
  }
  .kb-page .kb-h2 {
    font-size: 32px;
    line-height: 40px;
  }
  .kb-page .kb-h3 {
    font-size: 18px;
    line-height: 28px;
  }
  .kb-page .kb-lead {
    font-size: 16px;
    line-height: 26px;
  }
  .kb-page .kb-product-head h1 {
    font-size: 32px;
    line-height: 42px;
  }
  .kb-guide-more {
    grid-template-columns: minmax(0, 1fr);
  }
  .kb-article .swebase-docs__content h2 {
    font-size: 28px;
    line-height: 36px;
  }
  .kb-page.kb-error .kb-hero {
    padding-bottom: var(--kb-space-6);
  }
  .kb-error__after {
    padding-top: var(--kb-space-5);
    padding-bottom: var(--kb-space-6);
  }
}
