/*
 * The components. Only design tokens from tokens.css: no colour codes, sizes, fonts or durations here
 * (scripts/check_design.py). Media queries are the exception, since they cannot read variables.
 * Breakpoints: mobile below 600, iPad portrait 820, iPad landscape 1180, desktop 1440.
 */

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--color-ground);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body); /* 13 px, the type scale M10 (T2.191) */
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading); /* marin: set slightly tighter */
  margin: 0;
}
h1 {
  font-size: var(--text-h1);
}
h2 {
  font-size: var(--text-2xl);
}
h3 {
  font-size: var(--text-xl);
}
a {
  color: var(--color-link);
}
/* A short name with its whole name in a title, as a column's Ver.nr (T2.45): no dotted underline, which the browser
   draws by default and which read as a link; the title and the aria label stay, for the pointer and a screen reader. */
abbr[title] {
  text-decoration: none;
}
:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
.ui-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.ui-neg {
  color: var(--color-negative-amount);
  font-weight: var(--weight-strong);
}
/* A low value in the warning's colour, as the prototype's m-low (#501, P.0.17a, P.0.18): the portfolio's margin under 5 %
   and the ledger's days left to a due date within a week. The figure says it in itself, so the colour is never the only
   sign. */
.ui-low {
  color: var(--color-warning-text);
  font-weight: var(--weight-strong);
}
/* A saving in a deviation column, as the forecast's Diff mot kalkyl (1d.2): green, with its sign as the text. */
.ui-better {
  color: var(--color-positive-text);
  font-weight: var(--weight-medium);
}
.ui-muted {
  color: var(--color-text-3);
}
/* A date in running text, for example in a lead, is never broken at its hyphens (granskningslistan). */
.ui-date {
  white-space: nowrap;
}
/* A general comment under a table or a list: running text in italics (granskningslistan, 3/10). */
.ui-note {
  margin: 0;
  color: var(--color-text-3);
  font-style: italic;
}
/* A comment with a largest line length (measure, P.0.13): under the page's grid, where the row is as wide as the content
   and a line over the whole of a large screen is hard to read. */
/* The note's words per width (wide_text): text under 1180 px, wide_text from it, where a side panel stands beside. */
.ui-note-wide {
  display: none;
}
@media (min-width: 1180px) {
  .ui-note-narrow {
    display: none;
  }
  .ui-note-wide {
    display: inline;
  }
}
.ui-note-measure {
  max-width: var(--note-measure);
}
/* The variant Sammanfattning (box, K61, Björn 12/11): what a form's choices give, upright on the grey second surface,
   such as "2 blad A3 · 13 rader" in Skriv ut tidplanen. */
.ui-note-box {
  margin-block: var(--note-box-gap);
  padding: var(--note-box-pad);
  border-radius: var(--note-box-radius);
  background: var(--note-box-surface);
  color: var(--note-box-text);
  font-size: var(--note-box-size);
  font-style: normal;
}
.ui-visually-hidden {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Display level: anything belonging to Avancerad (advanced) is hidden when an ancestor has the level Enkel (simple). */
[data-level="simple"] .ui-level-advanced {
  display: none;
}

/* ---- Page ---- */
.ui-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--page-pad-top) var(--page-side) var(--space-11);
  display: flex;
  flex-direction: column;
  gap: var(--page-gap);
}
/* A line of text in the page's column, as ÄTA-uppföljningen's "4 ÄTA följs upp" under its heading row (T2.183.1): the
   page's gap is the air around it, as between the page's other parts, and never the browser's margin as well. */
.ui-page > p {
  margin: 0;
}
/* The regions of a filter that applies at once (ui-filter-flow on data-filter-view and data-filter-results, T2.59.1):
   no boxes of their own, so that the form, the message, the cards and the table stand in the page's column with its
   gap, as they did before the regions were marked. */
.ui-filter-flow {
  display: contents;
}
/* A row of actions directly under the page's head, as the prototype's .head .bar under its line (P.0.2): the island's
   first part when nothing stands before it, with --actions-after-head between them instead of the page's gap. */
.ui-page-head ~ .ui-island > .ui-editbar-plain:first-child {
  margin-top: calc(var(--actions-after-head) - var(--page-gap));
}
/* One largest width for every page (D-ALLA-34, T2.179, Björn 25/11): ui-page above, the band and the row of tabs have
   --content-max, the project overview's, and are centred alike beside the side menu, so that every page has the same left
   and right edge at one window. No page has a largest width of its own (scripts/check_design.py, page-shell-width): the
   class of a page of cards (ui-page-cards) is left as the views' mark of one, without a width, and a page for a wide
   sheet (ui-page-wide) keeps its folded side menu and its grid's bleed; what is narrow on purpose narrows inside the
   page (--diary-max, --note-measure, the dialogs), and a table is as wide as its columns (D-TAB-34). */
/* A page for a sheet with many columns (the summary, 1e.6), ui-page-wide: the side menu folded by default, and from 1440 px the frame of its grid goes out over the page's side air (--grid-bleed, T2.51b), so that the sheet fits beside the folded side menu; the heading, the actions and the notes keep their air. Its largest width is every page's (D-ALLA-34). */
/* The selector meets every grid on a page over the whole width, not only the summary's (today one in each view); the 1440 px is --bp-desktop, which tests/test_sidenav.py holds equal. */
@media screen and (min-width: 1440px) {
  .ui-page.ui-page-wide .ui-grid-scroll {
    margin-left: calc(-1 * var(--grid-bleed));
    margin-right: calc(-1 * var(--grid-bleed));
  }
}
.ui-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5) var(--space-9);
}
.ui-page-head p {
  margin: 0;
  color: var(--color-text-2);
}
/* ---- The logo (brand_lockup, T2.64) ---- */
/* The symbol and the wordmark in Outfit; the vector's geometry is in em of the text, from the tokens (--brand-*). The
   colours follow the theme; on a ground that is dark in both themes (the top bar and the side menu) the dark theme's
   colours are used (ui-brand-on-dark). At 1 dppx or less the symbol is a hand-drawn one on whole pixels (T2.79, K10 D, at
   the end of this block): the small sizes (22 and 16 px) in Outfit 400 and the large one in 300. --brand-ink and
   --brand-space are the size's distances from the symbol's edge and from its square to the word, for the vector and
   for the hand-drawn symbol. */
.ui-brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--brand-ink) - var(--brand-vector-inset));
  font-family: var(--font-brand);
  font-weight: var(--brand-weight);
  letter-spacing: var(--brand-tracking);
  line-height: 1;
  white-space: nowrap;
  color: var(--brand-word);
}
.ui-brand-small {
  --brand-ink: var(--brand-ink-gap-22);
  --brand-space: var(--brand-hand-gap-22);
  font-size: var(--brand-size-small);
  font-weight: var(--brand-weight-small);
}
.ui-brand-large {
  --brand-ink: var(--brand-ink-gap-40);
  --brand-space: var(--brand-hand-gap-40);
  font-size: var(--brand-size-large);
}
/* Over a page's heading (lead), as on the sign-in page: left in line with the heading, the large size and, on a phone
   (under --bp-mobile, 600 px, which a media query cannot read; tests/test_brand.py holds the two equal) the small one. */
.ui-brand-lead {
  align-self: flex-start;
}
@media (max-width: 599px) {
  .ui-brand-lead {
    --brand-ink: var(--brand-ink-gap-22);
    --brand-space: var(--brand-hand-gap-22);
    font-size: var(--brand-size-small);
    font-weight: var(--brand-weight-small);
  }
}
.ui-brand-on-dark {
  --brand-symbol-line: var(--brand-on-dark-symbol-line);
  --brand-symbol-face: var(--brand-on-dark-symbol-face);
  --brand-word: var(--brand-on-dark-word);
  --brand-nav: var(--brand-on-dark-nav);
}
/* The catalog's sample of the logo on a dark ground: the top bar's ground behind it. */
.ui-brand-framed {
  padding: var(--space-6) var(--space-8);
  background: var(--color-band);
  border-radius: var(--radius-md);
}
.ui-brand-symbol {
  display: block;
  flex: none;
  width: var(--brand-symbol-height);
  height: var(--brand-symbol-height);
  margin: 0 var(--brand-symbol-room);
}
.ui-brand-face {
  fill: var(--brand-symbol-face);
}
.ui-brand-line {
  stroke: var(--brand-symbol-line);
}
.ui-brand-word {
  line-height: normal; /* the word's box is centred on the symbol's square, then moved (--brand-word-shift) */
  color: var(--brand-word);
  transform: translateY(var(--brand-word-shift));
}
.ui-brand-nav {
  color: var(--brand-nav);
}
/* The hand-drawn symbols (T2.79, K10 D, Björn 2/11 22.58): three SVG files, 23, 31 and 57 px, drawn on whole pixels, in
   the markup next to the vector and shown instead of it at 1 dppx or less (a screen at 100 %); above that the vector is
   shown. The size gives the symbol: 22 px the 31 px one, 40 px the 57 px one, 16 px (the top bar from 1180 to 1319 px)
   the 23 px one, and the lead on a phone is the small one. The square has no negative margin, the gap to the word is
   the size's (--brand-space), and the box is --brand-parity larger than the symbol in width and height, so that a row
   of 44 px, which centres it, puts the symbol's left and top edges on whole pixels. */
.ui-brand-hand {
  display: none;
  flex: none;
}
@media (max-resolution: 1dppx) {
  .ui-brand-symbol {
    display: none;
  }
  .ui-brand-small .ui-brand-hand-22,
  .ui-brand-large .ui-brand-hand-40 {
    display: block;
  }
  .ui-brand {
    gap: var(--brand-space);
  }
  .ui-brand:not(.ui-brand-framed) {
    padding-right: var(--brand-parity);
    padding-bottom: var(--brand-parity);
  }
}
@media (max-resolution: 1dppx) and (max-width: 599px) {
  .ui-brand-lead .ui-brand-hand-40 {
    display: none;
  }
  .ui-brand-lead .ui-brand-hand-22 {
    display: block;
  }
}

/* ---- The sender's line (ui-attribution, T2.72, K8, decision 0034) ---- */
/* The product's symbol and En produkt från and the product name, discreet, in the weakest text colour, last on a page of the customer's
   own and in the foot of what goes out (the print documents have the same as .doc .ui-attribution in print.css). The
   symbol is the logo's own, size mark: alone, a heavier line since it is small, and drawn as a vector also at 1 dppx or
   less, where the logo's hand-drawn symbols take over for the sizes that have one. */
.ui-attribution {
  display: inline-flex;
  align-items: center;
  gap: var(--attribution-gap);
  font-size: var(--attribution-size);
  line-height: var(--leading-normal);
  color: var(--attribution-text);
  white-space: nowrap;
}
.ui-attribution-on-dark {
  color: var(--attribution-text-on-dark);
}
.ui-attribution-row {
  display: flex;
  margin-top: var(--attribution-row-gap);
  padding-top: var(--attribution-row-space);
  border-top: var(--line-thin) solid var(--attribution-row-line);
}
.ui-brand-mark {
  gap: 0;
}
.ui-brand-mark .ui-brand-symbol {
  width: var(--attribution-symbol);
  height: var(--attribution-symbol);
  margin: 0;
}
.ui-brand-mark .ui-brand-line {
  stroke-width: var(--attribution-symbol-line);
}
@media (max-resolution: 1dppx) {
  .ui-brand-mark .ui-brand-symbol {
    display: block;
  }
  .ui-brand-mark:not(.ui-brand-framed) {
    padding: 0;
  }
}

/* ---- Navigation ---- */
.ui-band {
  background: var(--color-band);
  color: var(--color-band-text);
}
.ui-band-inner {
  position: relative; /* the top bar's popovers keep inside it */
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5) var(--space-9);
}
/* The product's logo (the component brand_lockup, T2.64) and the company beside it on one row. */
.ui-logo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-5);
  justify-content: center;
  min-height: var(--target-min);
  min-width: var(--target-min);
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  text-decoration: none;
}
.ui-logo small {
  display: block;
  font-weight: var(--weight-regular);
  font-size: var(--text-xs);
  color: var(--color-band-muted);
}
.ui-band-tools {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  flex-wrap: wrap;
}
.ui-user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-band-muted);
}
.ui-user b {
  color: var(--color-band-text);
  font-weight: var(--weight-medium);
}
.ui-avatar {
  display: grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-round);
  background: var(--color-brand-accent); /* the logo's salvia, a surface and never text */
  color: var(--color-band);
  font-weight: var(--weight-bold);
  font-size: var(--text-xs);
}
/* When the accounting system was last read (T7.1), and a link when something newer has come. */
.ui-fetched {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-band-muted);
  font-variant-numeric: tabular-nums;
}
.ui-fetched b {
  color: var(--color-band-text);
  font-weight: var(--weight-medium);
}
.ui-fetched-info summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target-min);
  cursor: pointer;
  list-style: none;
}
.ui-fetched-info summary::-webkit-details-marker {
  display: none;
}
.ui-fetched-info summary::after {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-round);
  border: var(--line-thin) solid var(--color-band-muted);
  font-size: var(--text-2xs);
}
/* The help under Hämtat, at the right of the top row; the common placement (T2.94, ui-pop) keeps it inside the window
   and opens it over its button where there is no room under it. Its text wraps inside the box: from 1180 px the times
   in the top row stand on one line (white-space: nowrap on ui-fetched), and the help's text ran past its box and made
   the page wider (found when it was put under the common placement, T2.94). */
.ui-fetched-info p {
  position: absolute;
  z-index: 2;
  top: 100%;
  right: var(--space-7);
  width: min(var(--dialog-max), calc(100% - 2 * var(--space-7)));
  margin: var(--space-2) 0 0;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
  white-space: normal;
}
.ui-fetched-newer {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--color-band-text);
  font-weight: var(--weight-bold);
}
.ui-theme {
  min-height: var(--target-min);
  padding: 0 var(--space-6);
  border-radius: var(--radius-round);
  border: var(--line-thin) solid var(--color-band-muted);
  background: var(--color-band-control);
  color: var(--color-band-text);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
/* The top bar's menu: the areas the user may open, and signing out (E0.2). */
.ui-band-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
}
.ui-band-menu a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--color-band-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}
.ui-band-menu a[aria-current="page"] {
  color: var(--color-band-text);
}
/* A planned area (1a.4): the same dot as a planned tab. */
.ui-band-menu a.ui-band-planned::after {
  content: "";
  display: inline-block;
  width: var(--dot);
  height: var(--dot);
  margin-left: var(--space-3);
  border-radius: var(--radius-round);
  background: var(--color-warning);
}
/* A number on a link of the menu, such as the new replies in the feedback (1a.5). */
.ui-band-count {
  display: inline-grid;
  place-items: center;
  min-width: var(--space-9);
  height: var(--space-9);
  margin-left: var(--space-3);
  padding: 0 var(--space-3);
  border-radius: var(--radius-round);
  /* The accent, the salvia as a surface (tokens.css) */
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}
.ui-band-menu form {
  margin: 0;
}
.ui-logo img {
  display: block;
  max-height: var(--space-10);
  max-width: calc(var(--space-11) * 4);
  margin-bottom: 0;
}
/* The product's logo (brand_lockup, T2.64) in the bar: the bar gives room by cutting the company name, never by
   squeezing the logo. */
.ui-logo .ui-brand {
  flex: none;
}
.ui-theme-icon {
  display: inline-grid;
  place-items: center;
  min-width: var(--target-min);
  padding: 0;
}
/* The switch shows the mode it is in: a sun in the light mode, a moon in the dark (aria-checked, components.js). */
.ui-theme-icon .ui-theme-moon,
.ui-theme-icon[aria-checked="true"] .ui-theme-sun {
  display: none;
}
.ui-theme-icon[aria-checked="true"] .ui-theme-moon {
  display: block;
}
/* The company name beside the logo is the choice of company for a user in several (T2.13). With a choice of company
   the logo and the company name are each a tap target of 44 px, side by side on one row since marin (T2.22), so the
   bar is as high for a user in several companies as for one in a single. */
.ui-logo-name {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  color: inherit;
  text-decoration: none;
}
.ui-logo-form,
.ui-logo-choice {
  margin: 0;
}
.ui-logo-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--target-min);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  list-style: none;
  cursor: pointer;
}
.ui-logo-switch::-webkit-details-marker {
  display: none;
}
.ui-logo-switch::after {
  content: "";
  flex: none;
  border: var(--space-2) solid transparent;
  border-top-color: var(--color-band-muted);
  border-bottom-width: 0;
}
/* The lists that open from the top bar stand over the tabs, which stay at the top from 1180 px (z-index 10), also when
   the compact project row (#506) puts the tabs right under the bar, where a long list of companies reaches. */
.ui-logo-list,
.ui-user-info[open] .ui-user-full {
  display: block;
  position: absolute;
  z-index: 20;
  top: 100%;
  margin: var(--space-2) 0 0;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  letter-spacing: normal;
  text-transform: none;
}
.ui-logo-list {
  left: var(--space-7);
  min-width: var(--picker-min);
}
.ui-logo-list p {
  margin: 0 0 var(--space-3);
}
.ui-logo-list form {
  margin: 0;
}
.ui-logo-pick {
  display: block;
  width: 100%;
  min-height: var(--target-min);
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-action);
  font: inherit;
  font-weight: var(--weight-medium);
  text-align: left;
  cursor: pointer;
}
.ui-user-info {
  margin: 0;
}
.ui-user-info summary {
  min-width: var(--target-min);
  min-height: var(--target-min);
  list-style: none;
  cursor: pointer;
}
.ui-user-info summary::-webkit-details-marker {
  display: none;
}
.ui-user-full {
  display: none;
}
.ui-user-info[open] .ui-user-full {
  right: var(--space-7);
}
.ui-fetched-times {
  display: inline-flex;
  gap: var(--space-3);
}
.ui-fetched-all::before {
  content: "·";
  margin-right: var(--space-3);
}

/* The top bar on one row from 1180 px (T2.13), as the prototype's, with the same content: the company, the areas, when the
   accounting system was read, the user, light or dark, and signing out. The row is the full width of the page and gets
   room by smaller gaps and shorter texts, never by wrapping: the light or dark choice is an icon (with its name for a
   screen reader), signing out is a link in the menu's style, a long company name is cut at the end, the two times of
   the fetch stand over each other, and under 1320 px the user is the initials. Under 1180 px the bar wraps. */
@media (min-width: 1180px) {
  .ui-band-inner {
    gap: var(--space-4);
  }
  .ui-logo {
    flex: 0 1 auto;
    min-width: 0;
  }
  /* The logo (T2.22) is wider than the name was in text, so the company name is cut at 96 px in every width from
     1180 px, as the page is at most 1320 px; the whole name is in the title and in the choice of company. */
  .ui-logo small {
    max-width: calc(var(--space-11) * 2);
    letter-spacing: normal;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ui-band-tools {
    gap: var(--space-4);
    min-width: 0;
  }
  .ui-band-menu {
    flex-wrap: nowrap;
    gap: var(--space-2) var(--space-4);
  }
  .ui-band-menu a {
    font-size: var(--text-xs);
    white-space: nowrap;
  }
  .ui-fetched {
    flex-wrap: nowrap;
    gap: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    white-space: nowrap;
  }
  .ui-fetched-times {
    flex-direction: column;
    gap: 0;
    line-height: var(--leading-tight);
  }
  .ui-fetched-all::before {
    content: none;
  }
  .ui-fetched-newer {
    white-space: nowrap;
  }
  .ui-user {
    gap: var(--space-4);
    white-space: nowrap;
  }
  .ui-user b {
    max-width: calc(var(--space-11) * 2);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ui-band-signout {
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--color-band-muted);
    font-size: var(--text-xs);
    white-space: nowrap;
  }
}
/* The compact logo of the top bar (T2.79): the 23 px symbol at 1 dppx or less, in place of the 31 px one. */
@media (min-width: 1180px) and (max-width: 1319px) and (max-resolution: 1dppx) {
  .ui-logo .ui-brand .ui-brand-hand-22 {
    display: none;
  }
  .ui-logo .ui-brand .ui-brand-hand-16 {
    display: block;
  }
}
@media (min-width: 1180px) and (max-width: 1319px) {
  /* The logo a size lower, the company cut at 72 px and the gap beside it smaller where the user is only the initials
     too (T2.22), so that the bar stays on one row with room to spare: in CI's Linux the row was a few px too wide at
     1180 px for a user in several companies with long names (#381). */
  .ui-logo {
    gap: var(--space-4);
  }
  .ui-logo .ui-brand {
    --brand-ink: var(--brand-ink-gap-16);
    --brand-space: var(--brand-hand-gap-16);
    font-size: var(--brand-size-compact);
  }
  .ui-logo small {
    max-width: calc(var(--space-11) * 1.5);
  }
  .ui-user b {
    position: absolute;
    width: var(--line-thin);
    height: var(--line-thin);
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Tabs: each tab is a link to its own address. */
.ui-tabs {
  position: relative; /* the button Tillbaka stands in the margin beside the band (T2.58) */
  background: var(--color-surface);
  border-bottom: var(--line-thin) solid var(--color-border);
  box-shadow: var(--shadow-raised);
}
.ui-tabs-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-7);
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-1);
}
/* The tabs stay when the page scrolls, from an iPad in landscape (T2.14), where they are on one row; what sticks under
   them (a table's header row, the edit bar) takes their height as its top, --sticky-top, which components.js measures. */
@media (min-width: 1180px) {
  .ui-tabs:not(.ui-tabs-sub) {
    position: sticky;
    top: var(--sticky-band);
    z-index: 10;
  }
}
/* What stays at the top must not cover the field the keyboard reaches (T2.140): the page scrolls a focused field into view
   below the lowest of them (the tabs, the edit bar, a table's header row), which components.js measures as --sticky-focus-top
   (the stack's height changes with the text, the width and the page, so not a value written here). The same room keeps an
   address with # below them. */
html {
  scroll-padding-top: calc(var(--sticky-focus-top) + var(--space-2));
  /* The same air at the bottom (T2.140.1, pilotsessionen 17/11): the page is what scrolls, so the window's edge is the edge,
     and a field Tab has scrolled up from below, as row 30 of the edit view, otherwise sits with its ring cut by it
     (4.9 px beyond the window at 1440). --space-2 and the ring's room beyond the field's own scroll margin, since the
     browser also rounds the scroll to whole pixels and a ring may be drawn a pixel wider than the token says. A pinned
     edit bar at the window's lower edge (ui-editbar-pinned) adds its height, measured by components.js, so that a field
     the keyboard or + Lägg till rad reaches is scrolled up above it and never cut by it (T2.187). */
  scroll-padding-bottom: calc(var(--sticky-focus-bottom) + var(--space-2) + var(--float-head-ring-room));
}
/* The room of the classic scroll bar (Windows and Linux) is kept on every page in the shell, also when the page is too
   short to scroll, so that a short page has the same edges as a long one and nothing moves between pages (D-ALLA-34,
   T2.179, Björn 25/11: 8 px between a short and a long page; before only in a view with the project's head, the pilot
   session 19/11, e2e/project-head-steady.spec.ts). Nothing changes where the scroll bar lies over the page (macOS,
   iPad, phones), nor on a printed document's preview, which is not in the shell. A page for a wide sheet (ui-page-wide,
   the summary) does not keep it, as on 19/11: its sheet is measured against the window and needs the 15 px (#3660,
   T2.179, the pilot session 26/11, choice A, e2e/sva.spec.ts: at least 12 px to spare at 1440 px). */
html:has(main.ui-page:not(.ui-page-wide)) {
  scrollbar-gutter: stable;
}
/* T2.140.1: the focus ring is drawn outside the field (its offset and its width, --float-head-ring-room), so a field the
   keyboard has scrolled to the top or the bottom keeps its ring, and not only its box, --space-2 from the edge. */
:focus-visible {
  scroll-margin-top: var(--float-head-ring-room);
  scroll-margin-bottom: var(--float-head-ring-room);
}
.ui-tab {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-tab);
  letter-spacing: normal;
  text-transform: none;
  color: var(--color-text-2);
  text-decoration: none;
  border-bottom: var(--line-tab-active) solid transparent;
  white-space: nowrap;
}
/* A tab that gives nothing (muted, T2.47), such as a filter's tab with 0 in it: it stays, dimmed, so that the row does not jump. */
.ui-tab-muted {
  color: var(--color-text-3);
}
.ui-tab[aria-current="page"] {
  color: var(--color-tab-current);
  border-bottom-color: var(--color-tab-line);
}
/* Mer (T2.36): the tabs of a project on one row at every width, from 360 px. Since T2.184 (D-NAV-16) every built tab
   stands in the row while it fits, measured by components.js (the rules after "With JavaScript" below), and what
   follows here is the page without JavaScript, where the first six stand in the row and the rest in Mer (ui-tab-spill),
   a menu at the end of the row; what does not fit the row moves into Mer from the end of the row,
   level by level (ui-tab-hide-1 is the last tab of the row, which moves first, and the first tab never moves). The row
   is its own container, so its width is what is left beside Tillbaka (shown only in the app on the home screen), and
   the levels follow the width of the row in a browser and in the app alike. Mer shows the name of the current tab when
   it is in Mer or has moved into it, and the name must fit: the row's class says how wide the name is (the server:
   -u no name, -s up to 95 px for Mer with its name, -m up to 110 px, -l up to 150 px, apps.core.tab_row), and the
   widths below are for that class, so the tabs move out earlier when Mer is wider. Only the tabs before the current one
   need that: Mer has no name until the current tab moves, so the current tab and the ones after it move at the widths
   without a name (ui-tab-hide-u-n, 1f.11), and a row of six stands whole at 820 px when its current tab is one of
   them. Where not even Projektöversikt and Mer with the name fit (the app at 360 px with the longest name, Levande
   budget: the arrow of Tillbaka, T2.39, leaves a row of 262 px), Mer says Mer and is marked, and the name is on the
   page and in the menu. The widths are measured for the project's tabs in Chromium 22/11 (1f.11; the same at 390,
   600, 820 and 1440 px, narrower at 1180): Projektöversikt 129 px (116,9 on most pages, 129 on a planned one), ÄTA
   48,9, Fakturaunderlag 138,1, Rapporter 94, Levande budget 133,8, Prognos 80,8, a gap of 2 and Mer 64, plus the
   name's width and 4 px to spare, rounded up (the widths where Mer says Mer are those of 31/10, T2.36), and
   e2e/tab-row.spec.ts measures the row at every width, so that a change in the list of tabs
   (apps/projects/tab_list.py) that makes the row too wide, or a name clipped, fails there. Mer is a details: without
   JavaScript every tab is reached by opening it, and components.js adds the rest. */
.ui-tabs-inner:has(> .ui-tabs-row) {
  flex-wrap: nowrap;
}
/* On a phone the row has less air at the sides, so that Tillbaka, Projektöversikt and a name in Mer fit. */
@media (max-width: 479px) {
  .ui-tabs-inner:has(> .ui-tabs-row) {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }
}
.ui-tabs-row {
  flex: 1 1 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0 var(--space-1);
  min-width: 0;
  container-type: inline-size;
}
.ui-tabs-row > .ui-tab {
  flex: none;
}
.ui-tab-more {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
}
.ui-tab-more-button {
  flex: 0 1 auto;
  gap: var(--space-3);
  min-width: 0;
  cursor: pointer;
  list-style: none;
}
.ui-tab-more-button::-webkit-details-marker {
  display: none;
}
.ui-tab-more-label,
.ui-tab-more-named {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-tab-more-named {
  display: none;
}
.ui-tab-more-caret {
  flex: none;
  border: var(--space-2) solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
}
.ui-tab-more[open] .ui-tab-more-caret {
  transform: rotate(180deg);
}
/* Mer is marked when the current tab is in it (and shows its name), as a current tab is. */
.ui-tab-more-current .ui-tab-more-button {
  color: var(--color-tab-current);
  border-bottom-color: var(--color-tab-line);
}
.ui-tab-more-current .ui-tab-more-label {
  display: none;
}
.ui-tab-more-current .ui-tab-more-named {
  display: block;
}
/* The menu hangs from the button (T2.49): its left edge at the button's left edge, a gap of --space-2 under it, and the same
   border, radius and shadow as the project picker's list and the user menu (--shadow-overlay). The common placement
   (T2.94, ui-pop) keeps it --pop-edge from the screen's edges: it is right-aligned to the button where it would go past
   the right edge. Without JavaScript it hangs from the button's left edge and can pass the right edge of the screen when
   Mer stands far to the right: every tab is still in the menu, and only the script keeps it inside the screen (G1 of
   T2.49). */
.ui-tab-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--space-2));
  left: 0;
  display: none;
  width: max-content;
  max-width: calc(100vw - 2 * var(--space-7));
  margin: 0;
  padding: var(--space-3);
  list-style: none;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
}
.ui-tab-more[open] .ui-tab-menu {
  display: block;
}
.ui-tab-menu li {
  margin: 0;
}
.ui-tab-menu-item {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0 var(--space-6);
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  color: var(--color-text-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
/* The heading of the tabs of the modules outside grundfasen in Mer (T2.41), not a link. */
.ui-tab-menu-heading {
  padding: var(--space-6) var(--space-6) var(--space-2);
  border-top: var(--line-thin) solid var(--color-border-soft);
  color: var(--color-text-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.ui-tab-menu-item:hover {
  background: var(--color-surface-2);
}
.ui-tab-menu-item[aria-current="page"] {
  color: var(--color-tab-current);
}
/* Without JavaScript (T2.184): the first six tabs stand in the row with the widths below, the ones after them
   (ui-tab-spill) in Mer, and what moves into Mer is in the menu only where it has moved. Only where no script runs
   (data-js on <html>, templates/base.html): with a script components.js measures the row (setupTabRow). */
:root:not([data-js]) .ui-tabs-row > .ui-tab-spill {
  display: none;
}
:root:not([data-js]) .ui-tab-menu-hide-1,
:root:not([data-js]) .ui-tab-menu-hide-2,
:root:not([data-js]) .ui-tab-menu-hide-3,
:root:not([data-js]) .ui-tab-menu-hide-4,
:root:not([data-js]) .ui-tab-menu-hide-5,
:root:not([data-js]) .ui-tab-menu-hide-u-1,
:root:not([data-js]) .ui-tab-menu-hide-u-2,
:root:not([data-js]) .ui-tab-menu-hide-u-3,
:root:not([data-js]) .ui-tab-menu-hide-u-4,
:root:not([data-js]) .ui-tab-menu-hide-u-5 {
  display: none;
}
/* The widths without a name in Mer (-u): every tab of a row whose current tab never moves, and in a row whose current
   tab may move, that tab and the ones after it, which move before Mer has the name (ui-tab-hide-u-n). Mer shows the
   name when the current tab moves, at its level here. */
@container (max-width: 705px) {
  :root:not([data-js]) .ui-tab-hide-u-1 {
    display: none;
  }
  :root:not([data-js]) .ui-tab-menu-hide-u-1 {
    display: list-item;
  }
  :root:not([data-js]) .ui-tab-more-hide-1 .ui-tab-more-button {
    color: var(--color-tab-current);
    border-bottom-color: var(--color-tab-line);
  }
  :root:not([data-js]) .ui-tab-more-hide-1 .ui-tab-more-label {
    display: none;
  }
  :root:not([data-js]) .ui-tab-more-hide-1 .ui-tab-more-named {
    display: block;
  }
}
@container (max-width: 622px) {
  :root:not([data-js]) .ui-tab-hide-u-2 {
    display: none;
  }
  :root:not([data-js]) .ui-tab-menu-hide-u-2 {
    display: list-item;
  }
  :root:not([data-js]) .ui-tab-more-hide-2 .ui-tab-more-button {
    color: var(--color-tab-current);
    border-bottom-color: var(--color-tab-line);
  }
  :root:not([data-js]) .ui-tab-more-hide-2 .ui-tab-more-label {
    display: none;
  }
  :root:not([data-js]) .ui-tab-more-hide-2 .ui-tab-more-named {
    display: block;
  }
}
@container (max-width: 486px) {
  :root:not([data-js]) .ui-tab-hide-u-3 {
    display: none;
  }
  :root:not([data-js]) .ui-tab-menu-hide-u-3 {
    display: list-item;
  }
  :root:not([data-js]) .ui-tab-more-hide-3 .ui-tab-more-button {
    color: var(--color-tab-current);
    border-bottom-color: var(--color-tab-line);
  }
  :root:not([data-js]) .ui-tab-more-hide-3 .ui-tab-more-label {
    display: none;
  }
  :root:not([data-js]) .ui-tab-more-hide-3 .ui-tab-more-named {
    display: block;
  }
}
@container (max-width: 390px) {
  :root:not([data-js]) .ui-tab-hide-u-4 {
    display: none;
  }
  :root:not([data-js]) .ui-tab-menu-hide-u-4 {
    display: list-item;
  }
  :root:not([data-js]) .ui-tab-more-hide-4 .ui-tab-more-button {
    color: var(--color-tab-current);
    border-bottom-color: var(--color-tab-line);
  }
  :root:not([data-js]) .ui-tab-more-hide-4 .ui-tab-more-label {
    display: none;
  }
  :root:not([data-js]) .ui-tab-more-hide-4 .ui-tab-more-named {
    display: block;
  }
}
@container (max-width: 250px) {
  :root:not([data-js]) .ui-tab-hide-u-5 {
    display: none;
  }
  :root:not([data-js]) .ui-tab-menu-hide-u-5 {
    display: list-item;
  }
  :root:not([data-js]) .ui-tab-more-hide-5 .ui-tab-more-button {
    color: var(--color-tab-current);
    border-bottom-color: var(--color-tab-line);
  }
  :root:not([data-js]) .ui-tab-more-hide-5 .ui-tab-more-label {
    display: none;
  }
  :root:not([data-js]) .ui-tab-more-hide-5 .ui-tab-more-named {
    display: block;
  }
}
/* The widths with the name in Mer: the tabs before the current one, or every tab when the current one stands in Mer. */
@container (max-width: 736px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-hide-1 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-menu-hide-1 {
    display: list-item;
  }
}
@container (max-width: 653px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-hide-2 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-menu-hide-2 {
    display: list-item;
  }
}
@container (max-width: 517px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-hide-3 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-menu-hide-3 {
    display: list-item;
  }
}
@container (max-width: 421px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-hide-4 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-menu-hide-4 {
    display: list-item;
  }
}
@container (max-width: 281px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-hide-5 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-menu-hide-5 {
    display: list-item;
  }
}
@container (max-width: 751px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-hide-1 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-menu-hide-1 {
    display: list-item;
  }
}
@container (max-width: 668px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-hide-2 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-menu-hide-2 {
    display: list-item;
  }
}
@container (max-width: 532px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-hide-3 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-menu-hide-3 {
    display: list-item;
  }
}
@container (max-width: 436px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-hide-4 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-menu-hide-4 {
    display: list-item;
  }
}
@container (max-width: 296px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-hide-5 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-menu-hide-5 {
    display: list-item;
  }
}
@container (max-width: 791px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-hide-1 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-menu-hide-1 {
    display: list-item;
  }
}
@container (max-width: 708px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-hide-2 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-menu-hide-2 {
    display: list-item;
  }
}
@container (max-width: 572px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-hide-3 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-menu-hide-3 {
    display: list-item;
  }
}
@container (max-width: 476px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-hide-4 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-menu-hide-4 {
    display: list-item;
  }
}
@container (max-width: 336px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-hide-5 {
    display: none;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-menu-hide-5 {
    display: list-item;
  }
}
/* Where Projektöversikt and Mer with the name do not fit, Mer says Mer (and stays marked). */
@container (max-width: 230px) {
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-more .ui-tab-more-label {
    display: block;
  }
  :root:not([data-js]) .ui-tabs-row-s .ui-tab-more .ui-tab-more-named {
    display: none;
  }
}
@container (max-width: 246px) {
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-more .ui-tab-more-label {
    display: block;
  }
  :root:not([data-js]) .ui-tabs-row-m .ui-tab-more .ui-tab-more-named {
    display: none;
  }
}
@container (max-width: 284px) {
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-more .ui-tab-more-label {
    display: block;
  }
  :root:not([data-js]) .ui-tabs-row-l .ui-tab-more .ui-tab-more-named {
    display: none;
  }
}
/* With JavaScript (T2.184, D-NAV-16): components.js (setupTabRow) measures the tabs and the row, and what does not fit
   moves into Mer from the end of the row, the first tab never: the tab gets hidden in the row and its row in the menu
   is shown (data-tab-moves, hidden while the tab is in the row). Mer is hidden when nothing is in it. Until the first
   measurement the row keeps its place but is not drawn, so that nothing jumps when the page loads; should the script
   not run, the row is drawn after --tabs-reveal anyway. While measuring, Mer is as wide as its text. Where not even the
   first tab and Mer with the name fit, Mer says Mer and is marked (ui-tab-more-short), and the name is in the menu. */
:root[data-js] .ui-tabs-row:not([data-tabs-fit]) {
  visibility: hidden;
  animation-name: ui-tabs-reveal;
  animation-delay: var(--tabs-reveal);
  animation-fill-mode: forwards;
}
@keyframes ui-tabs-reveal {
  to {
    visibility: visible;
  }
}
.ui-tabs-measuring > .ui-tab-more,
.ui-tabs-measuring .ui-tab-more-button {
  flex: none;
}
.ui-tab-more-current.ui-tab-more-short .ui-tab-more-label {
  display: block;
}
.ui-tab-more-current.ui-tab-more-short .ui-tab-more-named {
  display: none;
}
.ui-tab-planned {
  color: var(--color-text-3);
  font-weight: var(--weight-regular);
}
.ui-tab-planned::after {
  content: "";
  display: inline-block;
  width: var(--dot);
  height: var(--dot);
  margin-left: var(--space-3);
  border-radius: var(--radius-round);
  background: var(--color-warning);
}
/* Under 1180 px the tabs do not stay when the page scrolls (T2.14). In the app the band of the tabs stays at every width,
   as it does from 1180 px (T2.19, the prototype's .nav is sticky too), under the bar at the top where the bar stays
   (--sticky-band, T2.19b); components.js measures the height as --sticky-top for what sticks under them. In a
   browser nothing changes, and the print rule hides the tabs. */
@media (display-mode: standalone) and (max-width: 1179px) {
  .ui-tabs:not(.ui-tabs-sub) {
    position: sticky;
    top: var(--sticky-band);
    z-index: 10;
  }
}
@media (max-width: 1179px) {
  html[data-display="standalone"] .ui-tabs:not(.ui-tabs-sub) {
    position: sticky;
    top: var(--sticky-band);
    z-index: 10;
  }
}
/* From 1180 to 1319 px the tabs' own air is a little less (T2.30, for the eleven tabs of a project beside Tillbaka; since
   T2.36 a project's row has Mer and the row's widths below are for the wider tabs, so there is room over). */
@media (min-width: 1180px) and (max-width: 1319px) {
  .ui-tabs:not(.ui-tabs-sub) .ui-tab {
    padding-right: var(--space-5);
    padding-left: var(--space-5);
  }
}
.ui-tabs-sub {
  background: var(--color-surface-2);
  box-shadow: none;
}
.ui-tabs-sub .ui-tab {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  letter-spacing: normal;
  text-transform: none;
  border-bottom-width: var(--line-tab-active);
}
/* The row of tabs A (T2.70, Björn 1/11 via the pilot session, the layout sketch's choice "A: linje under"), the variant
   for a project's tabs: the tabs stand straight on the page's ground, with no band, no edge across the screen and no
   card's surface, and a thin line under them only as wide as the content, the cards' edges (the content box of the
   row, inside its air at the sides, so it follows the air under 480 px too). The chosen tab keeps the accent's colour
   and its line of 2 px over the thin one. The tabs themselves are as in every row (font, air and the widths that Mer
   is measured for), and the surface is the ground's, so the row still hides what scrolls under it where it sticks. */
.ui-tabs-line {
  background: var(--tabs-line-surface);
  border-bottom: 0;
  box-shadow: none;
}
.ui-tabs-line > .ui-tabs-inner {
  background: linear-gradient(to top, var(--tabs-line-edge) var(--tabs-line-width), transparent var(--tabs-line-width))
    content-box;
}
/* In a view the row stands in the page's content, which has the page's air already (P.0.14, the layout sketch): the
   row has no air of its own, so that the thin line is exactly as wide as the cards, also under 480 px, and the first
   tab has none at its left, so that its text starts at the content's edge, as the heading and the cards do. */
.ui-tabs-line > .ui-tabs-inner,
.ui-tabs-line > .ui-tabs-inner:has(> .ui-tabs-row) {
  padding-right: 0;
  padding-left: 0;
}
.ui-tabs-line .ui-tabs-row > .ui-tab:first-child,
.ui-tabs-line > .ui-tabs-inner > .ui-tab:first-of-type {
  padding-left: 0;
}

/* ---- The side menu (T2.27) ---- */
/* The portal's frame for a signed-in member since T2.73 (decision 0036): the side menu in the top bar's place
   (base.html, components/sidenav.html); the top bar stays for the pages without a member's menu. From 820 px open (names and pictures) or folded (pictures only), chosen with the button at the foot, kept
   in the browser, and by default folded under 1440 px and open from 1440 px, decided when the page loads (T2.51); the page beside it is pushed and the
   logo and every row stay where they are (T2.29). Under 820 px behind a button in a bar at the top, opened over the
   page (components.js). Every tap target is 44 px. */
.ui-sidenav {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: var(--sidenav-width);
  min-height: 0;
  padding: var(--space-6) var(--space-6) var(--space-7);
  background: var(--color-nav);
  color: var(--color-nav-text);
  font-family: var(--font-body);
}
/* The focus ring on the menu's slate is the salvia; the dark sage of the light theme is too dark on it. */
.ui-sidenav :focus-visible,
.ui-sidenav-bar :focus-visible {
  outline-color: var(--color-nav-current);
}
.ui-sidenav .ui-sidenav-usermenu :focus-visible {
  outline-color: var(--color-focus);
}
.ui-sidenav-head,
.ui-sidenav-menu,
.ui-sidenav-foot {
  align-self: stretch;
}
.ui-sidenav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-4);
  border-bottom: var(--line-thin) solid var(--color-nav-line);
}
.ui-sidenav-logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  min-width: var(--target-min);
  padding: 0 var(--space-4);
  color: inherit;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  text-decoration: none;
}
/* The customer's own logo in the product's logo's place (T2.73): as high as the top bar's, and within the menu's width. */
/* The image is the custom property --company-logo, which components/sidenav.html writes once (V45-4), shown as the background
   of a span with role="img" and the company's name as its label (V46-7), so that a logo of up to 87 kB is not in the page twice
   and a screen reader reads a name, not an img without a src. The span has no size of its own: it is as wide as the link and as
   high as the top bar's, and the logo is fitted inside it, from the left. */
.ui-sidenav-logo:has(.ui-sidenav-company-logo) {
  flex: 1 1 auto;
  min-width: 0;
}
.ui-sidenav-company-logo {
  display: block;
  width: 100%;
  height: var(--space-10);
  background: var(--company-logo) left center / contain no-repeat;
}
/* A logo higher than wide (V46-7, the pilot session 11/11): at the top bar's height it is about 20 px wide and its text
   cannot be read, so it stands higher; a wide one keeps its size. The folded menu keeps its width of a square but not its
   height, so that the head is as high folded as open (V46-7b). */
.ui-sidenav-company-logo-tall {
  height: var(--sidenav-logo-tall-height);
}
.ui-sidenav-close,
.ui-sidenav-open,
.ui-sidenav-back {
  display: none;
  place-items: center;
  flex: none;
  width: var(--target-min);
  height: var(--target-min);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-nav-muted);
  cursor: pointer;
}
.ui-sidenav-menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  /* From a window height of 700 px the areas fit and there is nothing to scroll (the group Kommande folded); under it
     the list scrolls, with a thin scrollbar in the menu's own colours and not the classic one (T2.41). */
  scrollbar-width: thin;
  scrollbar-color: var(--color-nav-scroll) transparent;
}
@supports not (scrollbar-width: thin) {
  .ui-sidenav-menu::-webkit-scrollbar {
    width: var(--sidenav-scroll-width);
  }
  .ui-sidenav-menu::-webkit-scrollbar-track {
    background: transparent;
  }
  .ui-sidenav-menu::-webkit-scrollbar-thumb {
    border-radius: var(--radius-round);
    background: var(--color-nav-scroll);
  }
}
.ui-sidenav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--target-min);
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  color: var(--color-nav-muted);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  text-decoration: none;
}
.ui-sidenav-icon {
  flex: none;
  width: var(--icon-nav);
  height: var(--icon-nav);
  fill: none;
  stroke: var(--color-nav-icon);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-sidenav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The chosen area: a lighter surface, the salvia for its text and icon, and a mark at the edge, so not by colour alone. */
.ui-sidenav-link[aria-current="page"] {
  background: var(--color-nav-active);
  color: var(--color-nav-current);
}
.ui-sidenav-link[aria-current="page"] .ui-sidenav-icon {
  stroke: var(--color-nav-current);
}
.ui-sidenav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-5);
  bottom: var(--space-5);
  width: var(--line-thick);
  border-radius: var(--radius-sm);
  background: var(--color-nav-current);
}
/* A planned area (1a.4): the dot of a planned tab, and "(planerad)" for a screen reader. */
.ui-sidenav-planned .ui-sidenav-label {
  font-weight: var(--weight-regular);
}
.ui-sidenav-planned::after {
  content: "";
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-round);
  background: var(--color-warning);
}
/* A number on an area, such as the new replies in the feedback (1a.5). */
.ui-sidenav-count {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: var(--space-8);
  height: var(--space-8);
  padding: 0 var(--space-3);
  border-radius: var(--radius-round);
  background: var(--color-nav-count);
  color: var(--color-nav-count-text);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}
/* The group Kommande (T2.41): the modules outside grundfasen, shown when the company has chosen to see them, in one
   folded row before Instruktion. The row is a summary of a details, so a tap, Enter or Space opens it; it is open when
   it holds the current area. Its areas are the menu's links, with the dot of a planned area. */
.ui-sidenav-group {
  margin: 0;
}
.ui-sidenav-group-summary {
  cursor: pointer;
  list-style: none;
}
.ui-sidenav-group-summary::-webkit-details-marker {
  display: none;
}
.ui-sidenav-group-chevron {
  flex: none;
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-sidenav-group[open] .ui-sidenav-group-chevron {
  transform: rotate(180deg);
}
.ui-sidenav-group-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-1);
}
/* The button that folds and opens the menu (T2.29): at the foot, above the user's menu, with a picture and the words
   "Fäll ihop" or "Fäll ut", framed so that it is not taken for an area. Folded, only the picture is seen and the words are its
   label, shown beside it like an area's name (T2.90.1). Not shown under 820 px, where the menu is a drawer with its own close button. */
.ui-sidenav-toggle {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  width: 100%;
  height: var(--target-min);
  margin: 0 0 var(--space-4);
  padding: 0 var(--space-5);
  border: var(--line-thin) solid var(--color-nav-line);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-nav-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
}
.ui-sidenav-toggle svg {
  flex: none;
}
.ui-sidenav-toggle-unfold {
  display: none;
}
/* The user's menu in the foot: the user and the company, the choice of company, when the accounting system was read,
   light or dark, and signing out. It opens with a tap (details), and Esc or a tap outside closes it (components.js). */
.ui-sidenav-foot {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: var(--line-thin) solid var(--color-nav-line);
}
/* The sender's line at the foot of the menu, when the customer shows its own logo (K8); folded to the pictures it is left out. */
.ui-sidenav-attribution {
  align-self: stretch;
  padding: var(--space-4) var(--space-4) 0;
}
.ui-sidenav-user {
  margin: 0;
}
.ui-sidenav-user > summary {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  box-sizing: border-box;
  /* the same height open and folded, so that the button above it stays where it is (T2.29) */
  height: calc(var(--target-min) + var(--space-2));
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-nav-text);
  list-style: none;
  cursor: pointer;
}
.ui-sidenav-user > summary::-webkit-details-marker {
  display: none;
}
.ui-sidenav-user[open] > summary {
  background: var(--color-nav-active);
}
.ui-sidenav-user .ui-avatar {
  flex: none;
}
.ui-sidenav-user-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-nav-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-tight);
}
.ui-sidenav-user-first {
  display: none;
}
.ui-sidenav-user-text b,
.ui-sidenav-user-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-sidenav-user-text b {
  color: var(--color-nav-text);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}
.ui-sidenav-chevron {
  flex: none;
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: var(--color-nav-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-sidenav-usermenu {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(100% + var(--space-2));
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
  font-size: var(--text-md);
}
.ui-sidenav-usermenu-head {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--space-4) var(--space-5) var(--space-3);
  color: var(--color-text-2);
  font-size: var(--text-xs);
  overflow-wrap: break-word;
}
.ui-sidenav-usermenu-head b {
  color: var(--color-text);
  font-size: var(--text-md);
}
.ui-sidenav-usermenu form {
  margin: 0;
}
.ui-sidenav-item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  min-height: var(--target-min);
  margin: 0;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ui-sidenav-foot > .ui-sidenav-theme {
  color: var(--color-nav-muted);
}
/* The switch shows the mode it is in, as the top bar's: a sun in the light mode, a moon in the dark. */
.ui-sidenav-theme svg {
  flex: none;
}
.ui-sidenav-theme .ui-theme-moon,
.ui-sidenav-theme[aria-checked="true"] .ui-theme-sun {
  display: none;
}
.ui-sidenav-theme[aria-checked="true"] .ui-theme-moon {
  display: block;
}
/* The row of events not sent above Logga ut (1g.11c, K52): quiet grey with a grey edge, never a warning */
.ui-sidenav-unsent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin: var(--space-2) 0;
  padding: var(--space-4) var(--space-5);
  border-left: var(--sidenav-unsent-edge);
  border-radius: var(--radius-sm);
  background: var(--sidenav-unsent-surface);
  color: var(--sidenav-unsent-text);
  font-size: var(--text-xs);
}
.ui-sidenav-unsent[hidden] {
  display: none;
}
.ui-sidenav-unsent p {
  margin: 0;
}
.ui-sidenav-unsent b {
  color: var(--sidenav-unsent-strong);
}
.ui-sidenav-unsent-icon {
  flex: none;
  width: var(--sidenav-unsent-icon);
  height: var(--sidenav-unsent-icon);
  margin-top: var(--space-1);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-sidenav-usermenu .ui-fetched {
  display: flex;
  margin: var(--space-2) 0;
  padding: 0 var(--space-5);
  border-top: var(--line-thin) solid var(--color-border-soft);
  border-bottom: var(--line-thin) solid var(--color-border-soft);
  color: var(--color-text-2);
  font-size: var(--text-xs);
}
.ui-sidenav-usermenu .ui-fetched b {
  color: var(--color-text);
}
.ui-sidenav-usermenu .ui-fetched-info summary::after {
  border-color: var(--color-text-3);
}
.ui-sidenav-usermenu .ui-fetched-info p {
  position: static;
  width: auto;
  margin: 0 0 var(--space-4);
  padding: 0;
  background: transparent;
  color: var(--color-text-2);
  box-shadow: none;
}
.ui-sidenav-usermenu .ui-fetched-newer {
  color: var(--color-action);
}
/* The bar at the top under 820 px, with the button that opens the menu. */
.ui-sidenav-bar {
  display: none;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-6);
  background: var(--color-nav);
  color: var(--color-nav-text);
}
.ui-sidenav-bar .ui-sidenav-open {
  display: inline-grid;
  color: var(--color-nav-text);
}
/* Tillbaka in the bar (T2.19b, K83 v2, Björn 14/11): directly right of the menu button, the arrow alone in the menu button's colour, with no
   edge and no surface, and the same tap target of 44 x 44 px that is not seen (the rule above). Only in the app on the home screen, where the
   browser's Back is missing (T2.35): display-mode standalone, or data-display="standalone" from register.js in an older iOS. navigation.js
   shows it when the portal has an earlier step; without one, and without JavaScript, it is hidden and its place stands empty, so that the
   logo stands still between the pages. In the app the bar stays at the top when the page scrolls (K83 question 2), and the tabs stick under
   it (--sticky-band, measured by components.js). */
.ui-sidenav-bar .ui-sidenav-back {
  color: var(--color-nav-text);
}
@media (display-mode: standalone) {
  .ui-sidenav-bar .ui-sidenav-back {
    display: inline-grid;
  }
  .ui-sidenav-bar .ui-sidenav-back[hidden] {
    display: inline-grid !important; /* against the global [hidden] above: the place stands empty, and only the sight is hidden */
    visibility: hidden;
  }
  .ui-shell > .ui-sidenav-bar {
    position: sticky;
    top: 0;
    z-index: 11;
  }
}
html[data-display="standalone"] .ui-sidenav-bar .ui-sidenav-back {
  display: inline-grid;
}
html[data-display="standalone"] .ui-sidenav-bar .ui-sidenav-back[hidden] {
  display: inline-grid !important; /* as above */
  visibility: hidden;
}
html[data-display="standalone"] .ui-shell > .ui-sidenav-bar {
  position: sticky;
  top: 0;
  z-index: 11;
}
/* The catalog shows the bar outside the page's frame, and the arrow as it is when shown, whatever the screen is. */
.ui-sidenav-bar-preview {
  display: flex;
}
.ui-sidenav-bar .ui-sidenav-back-preview {
  display: inline-grid;
}
.ui-sidenav-scrim[hidden] {
  display: none;
}
/* Folded to its icons: the catalog's sample (ui-sidenav-mini), and the page under 1440 px below, without a saved choice. The names stay
   for a screen reader. */
.ui-sidenav-mini {
  width: var(--sidenav-mini-width);
  padding-right: var(--space-5);
  padding-left: var(--space-5);
  align-items: center;
}
.ui-sidenav-mini .ui-sidenav-head {
  justify-content: center;
}
.ui-sidenav-mini .ui-sidenav-menu,
.ui-sidenav-mini .ui-sidenav-foot {
  align-items: center;
}
.ui-sidenav-mini .ui-sidenav-logo {
  padding: 0;
  justify-content: center;
}
.ui-sidenav-mini .ui-sidenav-company-logo {
  width: var(--target-min);
  height: var(--target-min);
  background-position: center;
}
/* A tall logo stands as high folded as open, so that the head and every row under it keep their place (T2.29, V46-7b). */
.ui-sidenav-mini .ui-sidenav-company-logo-tall {
  height: var(--sidenav-logo-tall-height);
}
.ui-sidenav-mini .ui-sidenav-attribution,
.ui-sidenav-mini .ui-sidenav-logo .ui-brand-word,
.ui-sidenav-mini .ui-sidenav-group-chevron,
.ui-sidenav-mini .ui-sidenav-chevron {
  display: none;
}
.ui-sidenav-mini .ui-sidenav-toggle {
  width: var(--target-min);
  padding: 0;
}
.ui-sidenav-mini .ui-sidenav-toggle-icon {
  transform: rotate(180deg);
}
.ui-sidenav-mini .ui-sidenav-toggle-fold {
  display: none;
}
.ui-sidenav-mini .ui-sidenav-toggle-unfold {
  display: inline;
}
.ui-sidenav-mini .ui-sidenav-link,
.ui-sidenav-mini .ui-sidenav-user > summary,
.ui-sidenav-mini .ui-sidenav-foot > .ui-sidenav-theme {
  width: var(--target-min);
  padding: 0;
  justify-content: center;
}
.ui-sidenav-mini .ui-sidenav-label,
.ui-sidenav-mini .ui-sidenav-user-text,
.ui-sidenav-mini .ui-sidenav-toggle-unfold {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ui-sidenav-mini .ui-sidenav-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: var(--space-7);
  height: var(--space-7);
  padding: 0 var(--space-2);
}
.ui-sidenav-mini .ui-sidenav-planned::after {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}
.ui-sidenav-mini .ui-sidenav-usermenu {
  left: calc(100% + var(--space-4));
  right: auto;
  bottom: 0;
  width: var(--picker-min);
}
/* The folded menu's label (T2.90, the variant tip): the name of the area beside its picture, shown on hover with a mouse, on
   focus with the keyboard and on a long press with touch (components.js sets data-tip-open on the link, and --tip-x, the menu's
   right edge, and --tip-y, the link's middle, in pixels). It is the area's own label, the text a screen reader reads once, taken
   out of its clip and put beside the menu with a fixed position, so that the menu's list, which scrolls, cannot cut it off. It
   stands beside the menu and never over the next picture, and a planned area's "(planerad)" is shown with it. */
.ui-sidenav-mini [data-sidenav-tip][data-tip-open] > :is(.ui-sidenav-label, .ui-sidenav-user-text, .ui-sidenav-toggle-unfold),
html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav [data-sidenav-tip][data-tip-open] > :is(.ui-sidenav-label, .ui-sidenav-user-text, .ui-sidenav-toggle-unfold) {
  position: fixed;
  top: var(--tip-y);
  left: calc(var(--tip-x) + var(--sidenav-tip-gap));
  box-sizing: border-box;
  width: auto;
  max-width: calc(100vw - var(--tip-x) - var(--sidenav-tip-gap));
  height: auto;
  padding: var(--sidenav-tip-pad-y) var(--sidenav-tip-pad-x);
  overflow: visible;
  clip-path: none;
  transform: translateY(-50%);
  border: var(--line-thin) solid var(--sidenav-tip-edge);
  border-radius: var(--sidenav-tip-radius);
  background: var(--sidenav-tip-bg);
  color: var(--sidenav-tip-text);
  box-shadow: var(--shadow-overlay);
  font-size: var(--sidenav-tip-size);
  font-weight: var(--weight-heading);
  line-height: 1.2;
  pointer-events: none;
}
.ui-sidenav-link[data-tip-open] > .ui-sidenav-label > .ui-visually-hidden {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
/* The user's label (T2.90.1) is the user and the company on two lines, in the label's size and the strong weight for the name. */
[data-sidenav-tip][data-tip-open] > .ui-sidenav-user-text b {
  font-size: inherit;
  font-weight: var(--weight-heading);
}
/* The page's frame (base.html). From 820 px the menu is open or folded, by html[data-sidenav-state] (the inline script in
   base.html and components.js), and --sidenav-room is the width it takes and the page beside it leaves free. */
.ui-shell > .ui-shell-main {
  min-width: 0;
}
/* The drawer (T2.90.1): under 820 px the menu is behind a button in a bar at the top and opens over the page, with the names, a button that closes it, and the page behind dimmed.
   Its width is the content's own, between --drawer-width-min and --drawer-width-max (tokens.css); a long name wraps between words and never in one. It is the
   phone's menu, with a mouse or with touch, and since T2.19b (K83 v2, Björn 14/11) the menu of every touch screen, an iPad too, which has the
   phone's bar with the menu button, Tillbaka and the name (on screen: paper keeps the frame below). With a mouse from 820 px the menu stands beside the page. */
@media (max-width: 819px), screen and (pointer: coarse) {
  .ui-shell > .ui-sidenav-bar {
    display: flex;
  }
  .ui-shell > .ui-sidenav {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: fit-content;
    min-width: var(--drawer-width-min);
    max-width: var(--drawer-width-max);
    transform: translateX(-100%);
    visibility: hidden;
  }
  .ui-shell > .ui-sidenav .ui-sidenav-toggle {
    display: none;
  }
  .ui-shell > .ui-sidenav .ui-sidenav-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
  }
  .ui-shell[data-sidenav-open] > .ui-sidenav {
    transform: none;
    visibility: visible;
    box-shadow: var(--shadow-overlay);
  }
  .ui-shell[data-sidenav-open] > .ui-sidenav .ui-sidenav-close {
    display: inline-grid;
  }
  .ui-shell[data-sidenav-open] > .ui-sidenav-scrim {
    position: fixed;
    z-index: 29;
    inset: 0;
    background: var(--color-nav-scrim);
  }
}
@media (min-width: 820px) and (pointer: fine), (min-width: 820px) and (pointer: none), print and (min-width: 820px) {
  .ui-shell {
    --sidenav-room: var(--sidenav-width);
  }
  html[data-sidenav-state="folded"] .ui-shell {
    --sidenav-room: var(--sidenav-mini-width);
  }
  .ui-shell > .ui-sidenav {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidenav-room);
  }
  .ui-shell-main {
    margin-left: var(--sidenav-room);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav {
    padding-right: var(--space-5);
    padding-left: var(--space-5);
    align-items: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-head {
    justify-content: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-menu,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-foot {
    align-items: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-logo {
    padding: 0;
    justify-content: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-company-logo {
    width: var(--target-min);
    height: var(--target-min);
    background-position: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-company-logo-tall {
    height: var(--sidenav-logo-tall-height);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-attribution,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-logo .ui-brand-word,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-group-chevron,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-chevron {
    display: none;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-link,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-user > summary,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-foot > .ui-sidenav-theme {
    width: var(--target-min);
    padding: 0;
    justify-content: center;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-label,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-user-text,
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-toggle-unfold {
    position: absolute;
    width: var(--line-thin);
    height: var(--line-thin);
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: var(--space-7);
    height: var(--space-7);
    padding: 0 var(--space-2);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-planned::after {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-usermenu {
    left: calc(100% + var(--space-4));
    right: auto;
    bottom: 0;
    width: var(--picker-min);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-toggle {
    width: var(--target-min);
    padding: 0;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-toggle-icon {
    transform: rotate(180deg);
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-toggle-fold {
    display: none;
  }
  html[data-sidenav-state="folded"] .ui-shell > .ui-sidenav .ui-sidenav-toggle-unfold {
    display: inline;
  }
}
/* The rail (A, Björn 8/11, T2.90.2): the folded menu where the name always stands under the picture, so nothing is seen only on hover or a
   long press. Since T2.19b (K83 v2, Björn 14/11) every touch screen has the bar at the top and the drawer, as a phone, so the rail is the
   catalog's sample only (ui-sidenav-rail). Its width is the longest word among the names (width: min-content, so no number): a name wraps
   between words and a word is never broken, and the user's name in the foot never widens it. */
@media (min-width: 820px) {
  .ui-sidenav-mini.ui-sidenav-rail {
    width: min-content;
    min-width: calc(var(--target-min) + var(--space-2) * 2);
    padding-right: var(--space-2);
    padding-left: var(--space-2);
  }
  /* The longest word has a width with fractions, and the page beside the rail would stand on them: where the browser can, the width is rounded up to
     a whole pixel (calc-size, Chromium), so that the page and the logos in it keep their whole pixels (T2.79). Elsewhere it is the word's own width;
     the symbol at the top stands on whole pixels in every browser (below). */
  @supports (width: calc-size(min-content, size)) {
    .ui-sidenav-mini.ui-sidenav-rail {
      width: calc-size(min-content, round(up, size, var(--sidenav-rail-step)));
    }
  }
  /* The logo's hand-drawn symbol stands on whole pixels (T2.79), but a rail as wide as its longest word has a width with fractions, so the symbol is not
     centred by the layout: the head is a container, and the symbol's left edge is the half of what is left beside it, rounded down to a whole pixel
     from the head's own whole left edge (at most half a pixel from the centre). */
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-head {
    container-type: inline-size;
    justify-content: flex-start;
  }
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-logo:has(.ui-brand) {
    box-sizing: border-box;
    width: 100%;
    justify-content: flex-start;
    padding-left: calc((100cqi - var(--brand-hand-size-22)) / 2);
    padding-left: round(down, (100cqi - var(--brand-hand-size-22)) / 2, var(--brand-hand-step));
  }
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-link,
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-user > summary,
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-foot > .ui-sidenav-theme,
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-toggle,
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-user {
    width: 100%;
  }
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-label,
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-toggle-unfold,
  /* The user's whole name stays the summary's name for a screen reader, hidden to the eye as in the folded menu (out of the flow, so it never widens the
     rail); the first name under the picture is only what is seen (aria-hidden). */
  .ui-sidenav-mini.ui-sidenav-rail .ui-sidenav-user-first {
    display: block;
    align-self: stretch;
    contain: inline-size;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--sidenav-rail-label-size);
    font-weight: var(--weight-heading);
    line-height: 1.15;
  }
}
/* The foot of the drawer (T2.90.1, G1 round 4): the user's name and the company never widen the drawer, which the menu's own names decide (contain: inline-size gives
   them no width of their own to count); they break between words, never in one, and are cut with ... after --drawer-user-lines lines. */
@media (max-width: 819px), screen and (pointer: coarse) {
  .ui-shell > .ui-sidenav .ui-sidenav-user-text {
    contain: inline-size;
  }
  .ui-shell > .ui-sidenav .ui-sidenav-user-text > :is(b, span) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--drawer-user-lines);
    white-space: normal;
    overflow-wrap: normal;
  }
}
@media (hover: hover) {
  .ui-sidenav-link:hover,
  .ui-sidenav-user > summary:hover {
    background: var(--color-nav-active);
    color: var(--color-nav-text);
  }
  .ui-sidenav-link[aria-current="page"]:hover {
    color: var(--color-nav-current);
  }
  .ui-sidenav-item:hover {
    background: var(--color-surface-2);
  }
  .ui-sidenav-close:hover {
    color: var(--color-nav-text);
  }
  .ui-sidenav-toggle:hover {
    background: var(--color-nav-active);
    color: var(--color-nav-text);
  }
}

/* The project bar over the tabs of Produktion (T2.13): the project picker, as in the prototype's top row, and the
   company's own views next to it as buttons in a group of their own (T2.40, ui-actions-split and ui-actions-group, the
   pattern of T2.38: the group stands at the right when there is room, and under the picker, at the left, when the row
   wraps). The bar stands inside the page's own padding, so its picker has the left edge of the tabs, the heading and the
   cards (T2.40: it had a padding of its own and stood a step to the right). */
.ui-projectbar {
  box-sizing: border-box;
  width: 100%;
  padding: var(--space-6) 0;
}
.ui-projectbar form {
  flex: 1 1 var(--picker-min);
  max-width: calc(var(--picker-min) * 2);
  margin: 0;
}
/* The compact project row (Björn 1/11 on an iPad, via the pilot session): the label beside the picker on the same row
   (ui-field-beside), --projectbar-air over and under the row instead of the page's air and gap, and the picker as high
   as a compact row of actions (ui-actions-compact: --control-min, about 36 px with a mouse and the tap target with touch)
   and at most --projectbar-picker-max wide. It is the row of every view with the project picker, through
   projects/base.html: Produktion's tabs, Levande budget, Prognos, ÄTA and Rapporter. */
.ui-projectbar-compact {
  padding: 0;
}
/* In the page (and not in the catalogue's frame): the air under the row instead of the page's gap, and over it, when it
   is the page's first part, instead of the page's air. */
.ui-page > .ui-projectbar-compact {
  margin-bottom: calc(var(--projectbar-air) - var(--page-gap));
}
.ui-page > .ui-projectbar-compact:first-child {
  margin-top: calc(var(--projectbar-air) - var(--page-pad-top));
}
.ui-projectbar-compact form {
  flex: 0 1 auto;
  max-width: 100%;
}
.ui-projectbar-compact .ui-picker-box {
  width: var(--projectbar-picker-max);
  max-width: 100%;
}

/* ---- Buttons ---- */
.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  /* 36 px with a mouse and with touch alike (T2.120): the rule is the component's, not the pointer's */
  min-height: var(--button-visible-min);
  min-width: var(--button-visible-min);
  padding: var(--space-3) var(--space-7);
  /* An edge in a darker salvia, so that the button stands out on white (3:1, T2.27), and the accent as its surface */
  border: var(--line-thin) solid var(--color-accent-border);
  border-radius: var(--button-radius); /* lager 1's form (T2.191, D-KORT-10): 8 px and a light shadow on a button with a frame */
  box-shadow: var(--shadow-card);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  letter-spacing: normal;
  line-height: var(--leading-tight);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
/* A button is drawn 36 px high with a mouse and with touch alike, --button-visible-min (T2.120, Björn's words K83 and K106,
   the pilot session 13/11): a tap target of 44 px does not mean that the button is seen that large. A button with a frame
   is as high as a mouse's in a dense row, and a button without one (ghost, quiet, link, create, a symbol) shows only its
   word or its symbol. With touch, and only then, its ::after is the tap target, --button-target (44 x 44 px) or the
   button's own size when it is larger, centred on the button and out of the flow, so it moves nothing and nobody sees it;
   with a mouse there is no larger surface. Here, straight after the base, so that a variant or a place that sets its own
   size or position (back, a step's signs, Ring and Mejla) still does. Two buttons side by side or one under the other
   reach each other's targets only when they are less than --space-4 apart (8 px, the gap of .ui-actions): then the
   targets meet and never overlap. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-button {
    position: relative;
  }
  .ui-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    /* 100% is the padding box: the button's own edge is the button, so a wide button's target does not reach past it
       (which a scroll width would count) */
    width: max(100%, var(--button-target));
    height: max(100%, var(--button-target));
    transform: translate(-50%, -50%);
  }
}
/* the button Tillbaka has its tap target in its ::before (T2.58), so not a second one here (after the rule above, outside
   its media query, which no rule for Tillbaka stands in) */
.ui-button-back::after {
  content: none;
}
/* The symbol before a button's label (button.html icon, K55, 1g.11g.1): the size is a token, the colour the text's. A
   symbol drawn with no attributes of its own, as the diary's camera and image (1g.12b), takes its line from here. */
.ui-button-icon {
  flex: none;
  width: var(--button-icon-size);
  height: var(--button-icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--button-icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-button-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
/* The variant create (T2.47): the buttons that make something new, with a set of tokens of its own (tokens.css), so that a change
   of them changes every such button. The plus is part of the variant, in the component (button.html). */
.ui-button-create {
  box-shadow: none; /* no frame, no shadow */
  background: var(--button-create-bg);
  color: var(--button-create-text);
  border-color: var(--button-create-border);
}
/* Since T2.76 (K9 B) the variant is text with no box: the soft surface shows at hover, with the keyboard's focus and
   while its menu is open, as the value picker's button does (--valuepicker-open-bg), not only with a mouse. */
.ui-button-create:focus-visible,
.ui-menu[open] > .ui-button-create {
  background: var(--button-create-hover-bg);
}
.ui-button-ghost {
  box-shadow: none; /* no frame, no shadow */
  background: transparent;
  color: var(--color-action);
  border-color: transparent;
}
/* A link to another page in a row of actions (the variant link, P.0.14): the link's colour and an underline, no fill and
   no edge, at the height of the row's buttons and with their font, so that it is read as a way to another page and never
   as an action. The underline is thicker under the mouse and on focus. */
.ui-button-link {
  box-shadow: none; /* no frame, no shadow */
  background: transparent;
  color: var(--button-link-text);
  border-color: transparent;
  padding-right: var(--space-3);
  padding-left: var(--space-3);
  text-decoration: underline;
  text-underline-offset: var(--button-link-underline-offset);
}
.ui-button-link:hover,
.ui-button-link:focus-visible {
  text-decoration-thickness: var(--line-tab-active);
}
/* A discreet button for what removes or ends something, set apart at the end of its row (quiet, 1c.P round 3: an ÄTA's
   Makulera and Ta bort): grey text, no fill and no edge, red under the mouse. */
.ui-button-quiet {
  box-shadow: none; /* no frame, no shadow */
  background: transparent;
  color: var(--color-text-3);
  border-color: transparent;
}
.ui-button-danger {
  background: var(--color-error);
  color: var(--color-text-on-strong);
  border-color: transparent;
}
/* The variant back (T2.58, Björn 1/11): the button Tillbaka, with a weak surface, an edge and rounded corners that the
   tokens --button-back-* set (bg, text, border, radius, size, gap), so that it is not taken for a tab or a choice in a
   menu. It is --button-back-size high, and its tap target is 44 x 44 px (--target-min) all the same: the ::before
   reaches over its edge, which is also why a tap beside it is a tap on it. It is the arrow and the name, in an action row
   (Tillbaka till projektet). The arrow alone in the app's bar at the top is the menu's own button (.ui-sidenav-back, T2.19b). */
.ui-button-back {
  position: relative;
  gap: var(--space-3);
  min-width: var(--button-back-size);
  min-height: 0;
  height: var(--button-back-size);
  padding: 0 var(--space-6);
  background: var(--button-back-bg);
  color: var(--button-back-text);
  border: var(--line-thin) solid var(--button-back-border);
  border-radius: var(--button-back-radius);
  font-size: var(--text-md);
}
.ui-button-back::before {
  content: "";
  position: absolute;
  /* from the padding box, inside the edge, so the edge is taken off: the target is 44 x 44 px round the drawn button */
  inset: calc((var(--button-back-size) - var(--target-min)) / 2 - var(--line-thin));
}
.ui-button-back svg {
  flex: none;
}
/* The page a secondary button links to, when it is the one shown (the company's own views in the project bar): the line
   of the current tab under it, and aria-current for a screen reader. Only the secondary button: a primary one is
   marked as it is. */
.ui-button-secondary[aria-current="page"] {
  border-color: var(--color-action);
  box-shadow: inset 0 calc(-1 * var(--line-tab-active)) 0 var(--color-action);
}
/* A secondary button that is on or off (aria-pressed, P.0, the summary's Visa): on, it has the fill, the edge and the bold text
   of --toggle-on-*, set per theme in tokens.css and shared by no other button (in light a dark fill and white text, in dark a
   light fill and dark text, K36, Björn 7/11), so that the state is told by
   more than colour: the fill, the weight, and a mark if a variant sets one. No mark is the default (T2.93, Björn 7/11: a
   check means done, not chosen). A screen reader says the state from aria-pressed. */
.ui-button-secondary[aria-pressed="true"] {
  background: var(--toggle-on-surface);
  border-color: var(--toggle-on-border);
  color: var(--toggle-on-text);
  font-weight: var(--toggle-on-weight);
  box-shadow: inset 0 calc(-1 * var(--toggle-on-underline)) 0 var(--toggle-on-text);
}
/* The mark of the chosen one is set once: the default is none, and a variant sets the mark, a check or a line, for every toggle
   at once. The check is for the eye only: the alternative text "" after the slash hides it from a screen reader (aria-pressed
   says the state); a browser that does not know the slash (Safari before 17.4) drops the declaration, and the check is not
   drawn there, which the fill and the bold text make up for. */
.ui-toggle-mark-check {
  --toggle-on-mark: "\2713" / "";
}
.ui-toggle-mark-underline {
  --toggle-on-underline: var(--line-tab-active);
}
/* The mark is drawn off as well, but not seen, so that the button has the same width on and off and its neighbours do not move
   (the pilot session after G1 of #799). */
.ui-button-secondary[aria-pressed]::before {
  content: var(--toggle-on-mark);
}
.ui-button-secondary[aria-pressed="false"]::before {
  visibility: hidden;
}
/* The bold text of the chosen one is wider than the plain: the label's bold twin is laid under it, unseen and without height,
   so that the label is as wide as the bold text on and off (templates/components/button.html wraps the label of a toggle in
   this span with data-label). */
.ui-button-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.ui-button-label::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: var(--toggle-on-weight);
  pointer-events: none;
}
/* A small button's text is the body text's, 13 px in lager 1 (D-ALLA-35), never larger than the text beside it, as the
   names of the rows beside Kopiera från in the diary's crew (K55); it was 14 px when the body text was. */
.ui-button-small {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-body);
}
/* A button that chooses a file (1g.6, back in 1g.5a): its input is hidden, and its focus shows on the button. */
.ui-button-file {
  cursor: pointer;
}

/* A button with a sign and no label (button.html icon, 1g.12b) is square. */
.ui-button-icon-only {
  padding: var(--space-3);
}
.ui-button-file:has(input:focus-visible) {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
/* A button that waits for its form to be saved (button.html, unsaved_form, 1g.5a): the button, and under it its line
   while the form has a change not saved; the row grows downward and the button stays where it is (T2.97). */
.ui-button-unsaved {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  gap: var(--space-1);
}
.ui-button:disabled {
  opacity: 0.45;
  filter: none;
  cursor: default;
}
/* A button that waits (aria-disabled, T2.143): it dims its fill, its edge and its text, never its focus ring. It can still
   take the keyboard's focus, and opacity would dim the ring along with the button (2.1:1 on white in the pilot's side by
   side of #1992, under the 3:1 of 1.4.11), so the three colours are mixed with transparent, by --button-wait-share, one
   rule for each variant, and the ring stays --color-focus in full, as on the active button. */
.ui-button[aria-disabled="true"] {
  background: color-mix(in srgb, var(--color-accent) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--color-accent-text) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--color-accent-border) var(--button-wait-share), transparent);
  filter: none;
  cursor: default;
}
.ui-button-secondary[aria-disabled="true"] {
  background: color-mix(in srgb, var(--color-surface) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--color-text) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--color-border) var(--button-wait-share), transparent);
}
.ui-button-secondary[aria-pressed="true"][aria-disabled="true"] {
  background: color-mix(in srgb, var(--toggle-on-surface) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--toggle-on-text) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--toggle-on-border) var(--button-wait-share), transparent);
  box-shadow: inset 0 calc(-1 * var(--toggle-on-underline)) 0
    color-mix(in srgb, var(--toggle-on-text) var(--button-wait-share), transparent);
}
.ui-button-create[aria-disabled="true"] {
  background: color-mix(in srgb, var(--button-create-bg) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--button-create-text) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--button-create-border) var(--button-wait-share), transparent);
}
.ui-button-create[aria-disabled="true"]:focus-visible {
  background: color-mix(in srgb, var(--button-create-hover-bg) var(--button-wait-share), transparent);
}
.ui-button-ghost[aria-disabled="true"] {
  background: transparent;
  color: color-mix(in srgb, var(--color-action) var(--button-wait-share), transparent);
  border-color: transparent;
}
.ui-button-link[aria-disabled="true"] {
  background: transparent;
  color: color-mix(in srgb, var(--button-link-text) var(--button-wait-share), transparent);
  border-color: transparent;
}
.ui-button-quiet[aria-disabled="true"] {
  background: transparent;
  color: color-mix(in srgb, var(--color-text-3) var(--button-wait-share), transparent);
  border-color: transparent;
}
.ui-button-danger[aria-disabled="true"] {
  background: color-mix(in srgb, var(--color-error) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--color-text-on-strong) var(--button-wait-share), transparent);
  border-color: transparent;
}
.ui-button-back[aria-disabled="true"] {
  background: color-mix(in srgb, var(--button-back-bg) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--button-back-text) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--button-back-border) var(--button-wait-share), transparent);
}
.ui-button[aria-busy="true"]::before {
  content: "";
  width: var(--icon);
  height: var(--icon);
  border-radius: var(--radius-round);
  border: var(--line-medium) solid currentColor;
  border-right-color: transparent;
  animation: ui-spin calc(var(--motion-normal) * 4) linear infinite;
}
@keyframes ui-spin {
  to {
    transform: rotate(1turn);
  }
}
/* ---- Menu (P.0): a small secondary button with a down arrow that opens a short list of actions under it ---- */
.ui-menu {
  position: relative;
  display: inline-flex;
}
/* The split button (1g.16, K61): the action and the arrow joined, the line between them --split-button-divider. */
.ui-split-button {
  display: inline-flex;
}
.ui-split-button-main {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}
.ui-split-button-more {
  padding-inline: var(--split-button-more-pad);
  border-inline-start-color: var(--split-button-divider);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  margin-inline-start: calc(-1 * var(--line-thin));
}
/* With touch the arrow is drawn at least the tap target wide (T2.120, e1 in #2746), and each part's tap target is its own
   width: the two meet at the line between them, which they share, and never overlap further, and both are 44 px high
   round the drawn 36 px. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-split-button-more {
    min-width: var(--split-button-more-min);
  }
  .ui-split-button > .ui-button::after {
    /* the part's border box: 100% is its padding box */
    width: calc(100% + 2 * var(--line-thin));
  }
}
.ui-split-button-more[aria-expanded="true"] .ui-menu-caret {
  transform: rotate(180deg);
}
.ui-menu-button {
  list-style: none;
}
.ui-menu-button::-webkit-details-marker {
  display: none;
}
.ui-menu-caret {
  border: var(--space-2) solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
}
.ui-menu[open] .ui-menu-caret {
  transform: rotate(180deg);
}
.ui-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--space-1));
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: calc(100vw - var(--space-10));
  margin: 0;
  padding: var(--space-3);
  list-style: none;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-overlay);
}
.ui-menu-list li {
  margin: 0;
}
/* A line between two groups of items (a divider, role separator): the border's colour, with air over and under it. */
.ui-menu-list .ui-menu-divider {
  height: 0;
  margin: var(--space-3) var(--space-3);
  border-top: var(--line-thin) solid var(--color-border);
}
.ui-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--target-min);
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-md);
  color: var(--color-text);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.ui-menu-item:hover,
.ui-menu-item:focus-visible {
  background: var(--color-action-soft);
}
.ui-menu-item:disabled,
.ui-menu-item[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}
/* A menu that stands first or in the middle of its row, as the report's Skriv ut after the period (T2.45), hangs from the
   button's left edge, so that its list never passes the left edge of the screen when the row wraps on a phone. */
.ui-menu-from-start .ui-menu-list {
  right: auto;
  left: 0;
}
/* The status row of a printout being made (the report's Alla projekt, T2.45) is for the screen, not the paper, and so is
   the arrow before a linked amount in a table. */
@media print {
  .ui-print-status,
  .ui-table td > a.ui-amount-link::before {
    display: none;
  }
}
.ui-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}
/* A filter form: fields (with labels above them) and the button that shows, aligned at the bottom, so that the upper and
   lower edge of the button are those of the fields; a centred button stood half a label too high (T2.30). Only for a form
   whose fields have no hint: a hint under a field makes it taller, so a row with hints is aligned as before, or has its
   hint outside the row (the living budget's new row). */
.ui-actions-filter {
  align-items: flex-end;
}
/* A filter beside actions (T2.38): the filter form (ui-actions-filter) and a group of the actions that belong to the page
   (ui-actions-group: PDF, Timpriser, a link as a ghost button) in one row. The row is aligned at the bottom, so the
   buttons of the group have the bottom edge of the fields, and the actions stand as a group at the right when there is
   room (space-between). A row that wraps puts the group under the filter, at the left, since a lone item in a wrapped
   line starts at the left. The group itself is centred, so a link stands on the middle line of the buttons. */
.ui-actions-split {
  justify-content: space-between;
  align-items: flex-end;
}
.ui-actions-group {
  align-items: center;
}
/* The buttons of a group that is no flex row stand on one middle line (1g.11f.1): a button with only a sign, as minus
   and plus, has no text to stand on, so on the baseline it stood about 4 px higher than Ändra beside it. */
.ui-actions-group > .ui-button {
  vertical-align: middle;
}
/* The focused button over its neighbours, so that its ring shows whole where the buttons of the group lie close (G1 of
   1g.4c: the next button's edge covered a pixel of the ring of Urval) */
.ui-actions-group > :focus-visible {
  position: relative;
  z-index: 1;
}
/* A button beside fields (T2.120 and T2.121, K114): a button and a field are both drawn 36 px, so with a mouse they share
   their middle line in a row that is aligned at the bottom and the offset is 0. With touch the field's box is 44 px (its
   transparent edge, --input-reach) and the button's 36, so the button has the field's edge under it
   (--button-field-offset) in the filter row (T2.30, T2.47), the living budget's new row, a filter beside its group of
   actions (T2.38) and the page head's menu beside the period (WebKit as an iPad, 4 px off). The rule is the row's, so a
   view has none of its own, and a dense row (ui-actions-compact) has the same fields and so no value of its own; a row
   without a field keeps its alignment. */
.ui-actions-filter:has(.ui-input) > .ui-button,
.ui-actions-filter:has(.ui-input) > noscript > .ui-button,
.ui-actions-split:has(.ui-input) > .ui-actions-group,
.ui-page-head:has(> .ui-valuepicker-end) > .ui-actions-compact:not(.ui-valuepicker) {
  margin-bottom: var(--button-field-offset);
}
/* Two groups of buttons in one row (1g.9c.2, K35: the choice of schedule and Tidplan | Avstämning): the air between the
   groups is wider than the air inside a group, so that the chosen button of each does not read as one group. */
.ui-actions:has(> .ui-actions-group + .ui-actions-group) {
  column-gap: var(--actions-groups-gap);
}
/* A group with a text beside its button (1g.4, the schedule's status and Visa veckodagar): the air between them is the
   token, whether the text is long or short, and a group that does not fit breaks between them. */
.ui-actions-group-spaced {
  display: flex;
  flex-wrap: wrap;
  gap: var(--actions-group-gap);
}
/* A row of choices (G1 of #1173, Bör 4, pilotsessionen 12/11): a text first in the row (strong or span) is the label of
   the group of buttons after it, as a week of Projektets kalender and Papper in Skriv ut tidplanen. With room the label
   stands beside its buttons, as before. A label over its buttons is close to them (--space-2), also one that does not
   fit beside them on a wider surface. Under --bp-mobile (600 px, which a media query cannot read) the label always has
   a line of its own over its buttons, and a row after another row of choices has the air between a panel's parts
   (--stack-gap) over it, so that a label is nearer its own buttons than the row's before it: the label stood 8 px over
   its own buttons and touched those above. By the surface's width, never by the kind of device. The rule is the
   pattern's, so a view has no rule of its own for it. A group of checkboxes under its label has each box at the top
   of its tap target (--target-min, the rest of it under the box), so that the label is as near the boxes as a label is
   its buttons: centred in the target the box stood 18 px under the label, which stood 12 px under the buttons before it
   (the pilot session 12/11, round 8 of #1173, Kolumner in Skriv ut tidplanen). The rest of the target is then the air
   to a row of choices right after it, which has no margin of its own. Beside its label a box stays centred. Under
   --bp-mobile the checkboxes of such a group stand one per line under their label, as in card K61 (the pilot session
   12/11, round 9 of #1173): side by side a box stood a few px from the word of the box before it. */
.ui-actions-split:has(> :is(strong, span):first-child) {
  row-gap: var(--space-2);
}
/* A signal's row on its button's middle line (K58 question 1 B, 1g.8c.5b, D-NAV-15): beside Stämmer, låt stå or Ångra
   the row of a gathered signal, and of Visa kvitterade, is read as one line with its button. Only the signals' rows: the
   other rows of choices keep their bottom edge (the rest of question 1 is not built here). Over its button (a line of
   its own) nothing moves. */
.ui-signals-group > .ui-actions-split:has(> :is(strong, span):first-child) {
  align-items: center;
}
/* The air of a row of choices (a bug of #1181, Björn 14/11: Ledig and Arbetar lay against the rows over and under them
   and looked as if they overlapped): the buttons of its group stand --actions-group-gap apart, where they stood as far
   apart as a space between two words (about 3 px), and a row after another row of choices has the air between a panel's
   parts (--stack-gap) over it in every width, where it had none with the label beside its buttons. Only the group of a
   row of choices: the groups that sit close, as the choice of columns, are as before. */
.ui-actions-split:has(> :is(strong, span):first-child) > .ui-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--actions-group-gap);
}
.ui-actions-split:has(> :is(strong, span):first-child) ~ .ui-actions-split:has(> :is(strong, span):first-child) {
  margin-top: var(--stack-gap);
}
@media (max-width: 599px) {
  .ui-actions-split > :is(strong, span):first-child {
    flex: 1 1 100%;
  }
  .ui-actions-split:has(> :is(strong, span):first-child) > .ui-actions-group > .ui-check {
    align-items: flex-start;
  }
  .ui-actions-split:has(> :is(strong, span):first-child) > .ui-actions-group:has(> .ui-check) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .ui-actions-split:has(> :is(strong, span):first-child):has(> .ui-actions-group > .ui-check)
    + .ui-actions-split:has(> :is(strong, span):first-child) {
    margin-top: 0;
  }
}
/* The closing row of a box that works as a dialog in the page (1g.16 round 9, card K61, the pilot session 12/11: Avbryt
   and Visa förhandsvisningen in Skriv ut tidplanen): at the right, as a dialog's row (.ui-dialog .ui-actions), with
   the main action last, at the right edge. Under --bp-mobile its buttons have a little less side padding
   (--actions-closing-pad-narrow), so that the two stand on one line at 390 px. A row that does not fit breaks from the right. */
.ui-actions-closing {
  justify-content: flex-end;
}
@media (max-width: 599px) {
  .ui-actions-closing > .ui-button {
    padding-inline: var(--actions-closing-pad-narrow);
  }
}
/* The discreet actions of a row set apart at its right end (1c.P round 3, an ÄTA's Makulera and Ta bort, the button's
   quiet), and at the left of their own line when the row wraps. */
.ui-actions-end {
  margin-left: auto;
}

/* The row of buttons under a field (Avbryt, Spara revision, T2.93, Björn 7/11: the buttons were too tight to the row above): the air
   between the field and the row IS the token --actions-after-field, for every such row, whether it stands straight after a
   field or is marked (G1 of #799: the token was a margin on top of the parent's gap). In a flow of its own the margin is the
   token; in a parent that has a gap between its parts (the panel and the dialog's body, --stack-gap) the margin is the token
   less that gap, as --actions-after-head is less the page's gap, so that the air is the token in all three. */
.ui-field + .ui-actions,
.ui-fields + .ui-actions,
.ui-formgrid + .ui-actions,
.ui-actions-after-field {
  margin-top: var(--actions-after-field);
}
:is(.ui-panel, .ui-dialog-body) > :is(.ui-field, .ui-fields, .ui-formgrid) + .ui-actions,
:is(.ui-panel, .ui-dialog-body) > .ui-actions-after-field {
  margin-top: calc(var(--actions-after-field) - var(--stack-gap));
}

/* The mark of a system before the text of a button or a link (button.html system, T2.117, K109) and the arrow out after it
   (external): a square on the second surface with a thin line and the neutral symbol, the arrow in the text's colour. All
   of it is --system-mark-*; the link has the smaller square, and so has a small button. Dimmed with the button when it
   waits (aria-disabled: the mark's own colours are mixed with transparent as the button's are, never opacity, which would dim a focus ring; the arrow is in the button's text colour and follows it), and with the button as a whole when it is disabled; the name keeps its words. */
.ui-system-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--system-mark-size);
  height: var(--system-mark-size);
  border: var(--line-thin) solid var(--system-mark-border);
  border-radius: var(--system-mark-radius);
  background: var(--system-mark-bg);
  color: var(--system-mark-color);
}
.ui-system-mark svg {
  width: var(--system-mark-symbol);
  height: var(--system-mark-symbol);
}
.ui-system-arrow {
  flex: none;
  width: var(--system-arrow-size);
  height: var(--system-arrow-size);
}
.ui-button-system {
  gap: var(--system-mark-gap);
  /* a text that does not fit its row breaks between its words (Ord bryts aldrig mitt i, docs/granskningslista.md): the mark
     stays at the left and the arrow at the right, and no word is cut */
  white-space: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-align: start;
}
/* the mark is 24 px and the button's padding over and under it would make it 38 px: a button with a mark has the padding
   that keeps it --button-visible-min high, as the button beside it without one (T2.120); a link and a small button have
   the smaller mark and keep their own */
.ui-button-system:not(.ui-button-link, .ui-button-small) {
  padding-block: var(--system-mark-pad-block);
}
.ui-button-link .ui-system-mark,
.ui-button-small .ui-system-mark {
  width: var(--system-mark-size-link);
  height: var(--system-mark-size-link);
}
.ui-button-link .ui-system-mark svg,
.ui-button-small .ui-system-mark svg {
  width: var(--system-mark-symbol-link);
  height: var(--system-mark-symbol-link);
}
.ui-button-link .ui-system-arrow,
.ui-button-small .ui-system-arrow {
  width: var(--system-arrow-size-link);
  height: var(--system-arrow-size-link);
}
.ui-button:not(.ui-button-secondary, .ui-button-ghost, .ui-button-link) .ui-system-mark {
  background: var(--system-mark-primary-bg);
  border-color: var(--system-mark-primary-border);
  color: var(--system-mark-primary-color);
}
.ui-button[aria-disabled="true"] .ui-system-mark {
  background: color-mix(in srgb, var(--system-mark-bg) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--system-mark-border) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--system-mark-color) var(--button-wait-share), transparent);
}
.ui-button[aria-disabled="true"]:not(.ui-button-secondary, .ui-button-ghost, .ui-button-link) .ui-system-mark {
  background: color-mix(in srgb, var(--system-mark-primary-bg) var(--button-wait-share), transparent);
  border-color: color-mix(in srgb, var(--system-mark-primary-border) var(--button-wait-share), transparent);
  color: color-mix(in srgb, var(--system-mark-primary-color) var(--button-wait-share), transparent);
}

/* The mark with the name beside it, with no button (the catalogue's example of the system card in a row of states, K101) */
.ui-system-card {
  display: inline-flex;
  align-items: center;
  gap: var(--system-mark-gap);
  color: var(--color-text);
}
/* The plus of the variant create (T2.47): a sign of its own before the label, with the same space and line in every such button. */
.ui-button-plus {
  display: inline-block;
  color: var(--button-create-icon);
  margin-right: var(--space-3);
  line-height: 1;
  font-weight: var(--weight-heading);
}
/* A row of actions as dense as the prototype's (P.0.2, the pilot session 1/11, level 2; the prototype's .head .bar): its
   fields and pickers are every field's 36 px, with the tap target in their box with touch (T2.121), and its buttons the
   button's 36 px (T2.120). A field's label in it is a plain word in the second text colour beside its field, as the
   prototype's span.period, not a field's heading. */
.ui-actions-compact .ui-field-label {
  font-weight: var(--weight-regular);
  color: var(--color-text-2);
}

/* ---- Fields ---- */
.ui-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  position: relative;
}
.ui-field-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-label); /* a label 12/500 in grey (M10, T2.191, D-ALLA-35) */
  color: var(--label-color);
}
.ui-field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-3);
  margin: 0;
}
.ui-field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  font-weight: var(--weight-medium);
  margin: 0;
}
/* A field is drawn --input-min high with a mouse and with touch (T2.121, K114, Björn's yes 13/11, D-FALT-11). Its tap
   target is its own box: with touch it has a transparent edge of --input-reach above and below, since an input, a text
   area and a select cannot have a ::after, so the frame is an inner shadow in --input-edge and the surface stops at the
   edge (padding-box). The box is then 44 px and takes the touch on its edge, and nothing beside it moves; with a mouse
   the edge is 0 and the box is the field. The frame's line is inside the padding, so the padding has the line added,
   and the corners have the edge added in height only, so that the corner drawn is --radius-md. A state changes
   --input-edge and background-color, never the border or the background's shorthand. */
.ui-input {
  --input-edge: var(--field-border);
  width: 100%;
  min-width: var(--field-min);
  min-height: var(--input-box);
  padding: calc(var(--space-3) + var(--line-thin)) calc(var(--space-4) + var(--line-thin));
  border: 0 solid transparent;
  border-block-width: var(--input-reach);
  border-radius: var(--field-radius) / calc(var(--field-radius) + var(--input-reach));
  background: var(--color-surface) padding-box;
  box-shadow: inset 0 0 0 var(--line-thin) var(--input-edge);
  filter: var(--shadow-field); /* lager 1's light shadow (T2.191, D-KORT-10), round the field drawn */
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-field);
}
/* The focus ring goes round the field drawn, never round its tap target: with touch the page's ring stands the field's
   edge further in, so that it is as far from the field as with a mouse. */
@media (pointer: coarse), (any-pointer: coarse) {
  :is(.ui-input, .ui-valuepicker-field, .ui-date-open):focus-visible {
    outline-offset: calc(var(--line-medium) - var(--input-reach));
  }
}
/* A date field (T2.30). WebKit (Safari, and every browser on an iPad) draws it with a look of its own: the text centred, a
   height of its own and a width of its own that runs into the next field. So it is drawn as the other fields: the same
   appearance and text alignment, the height of the field's box (T2.121), and never narrower than its content, so that a row of
   fields wraps instead of the fields standing over each other. The format of the date (30 Oct 2026 or 2026-10-30) is the
   device's, not the page's: lang does not change it. */
.ui-field > .ui-input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  height: var(--input-box);
  text-align: left;
}
/* A time field draws its parts higher than a line of text with touch, so it has the box's height too (T2.121). */
.ui-field > .ui-input[type="time"] {
  height: var(--input-box);
}
/* The compact date field (compact, 1g.11b, K48): half the width of its box instead of the whole, as the card draws the day
   the client signed beside the name's full width; never narrower than --date-min, so that it stays whole. */
.ui-field-compact {
  width: var(--field-compact-width);
  min-width: var(--date-min);
  max-width: 100%;
}
.ui-input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
.ui-field:has(> .ui-input[type="date"]) {
  min-width: var(--date-min);
}
/* The design system's date field and calendar (T2.114, K108, Björns ja 12/11; components/field_date.html with
   calendar, components.js setupDateField). The field is as wide as a date with the calendar's symbol at its left edge,
   a button on the second surface with a line to its right, in the action's colour; in a line of fields it keeps the
   date's width at the left edge of its column (T2.146), and the columns of the line stay equally wide. Without
   JavaScript it is the browser's date field. */
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field-date, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field-date) > .ui-date-box {
  justify-self: start;
}
/* Its two texts under the field, the error or the hint and the error of the format (data-date-format), share the
   line's third track in the field's one column, so that no column of their own comes into being; while the error of
   the format is shown, it is the only text there (T2.146). */
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field-date, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field-date) > :is(.ui-field-hint, .ui-field-error) {
  grid-column: 1;
}
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field-date, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field-date):has(> [data-date-format]:not([hidden])) > :is(.ui-field-hint, .ui-field-error):not([data-date-format]) {
  display: none;
}
.ui-date-box {
  position: relative;
  display: flex;
  align-items: stretch;
  width: var(--date-field-width);
  max-width: 100%;
  /* the width's 5.6em in the input's own size, 16 px with touch, or the hint is cut at its last letter */
  font-size: var(--text-field);
}
.ui-date-box > .ui-input {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--input-box);
  font-variant-numeric: tabular-nums;
}
.ui-date-box > .ui-input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: var(--date-min);
  text-align: left;
}
.ui-date-open {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--date-symbol-width);
  padding: 0;
  /* drawn as the field beside it (T2.121): the transparent edge with touch, and its frame an inner shadow on three
     sides, since the field's own left line is the line between them */
  --input-edge: var(--field-border);
  border: 0 solid transparent;
  border-block-width: var(--input-reach);
  border-radius: var(--field-radius) 0 0 var(--field-radius) / calc(var(--field-radius) + var(--input-reach)) 0 0 calc(var(--field-radius) + var(--input-reach));
  background: var(--date-symbol-surface) padding-box;
  box-shadow: inset var(--line-thin) 0 0 0 var(--input-edge), inset 0 var(--line-thin) 0 0 var(--input-edge), inset 0 calc(-1 * var(--line-thin)) 0 0 var(--input-edge);
  filter: var(--shadow-field); /* the field's light shadow under the symbol too, so that it does not stop at it (G2 of #3762) */
  color: var(--date-symbol-color);
  cursor: pointer;
}
.ui-date-open[hidden] {
  display: none;
}
/* the field's right corners as the symbol's left, --field-radius on both sides (G2 of #3762) */
.ui-date-open + .ui-input {
  border-radius: 0 var(--field-radius) var(--field-radius) 0 / 0 calc(var(--field-radius) + var(--input-reach)) calc(var(--field-radius) + var(--input-reach)) 0;
}
.ui-date-open svg,
.ui-date-cal-nav svg {
  width: var(--date-symbol-size);
  height: var(--date-symbol-size);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-date-open:disabled {
  color: var(--color-text-3);
  cursor: default;
}
.ui-date-box.is-open > .ui-date-open,
.ui-date-box.is-open > .ui-input {
  --input-edge: var(--color-action);
}
/* The calendar: under the field, placed by the common placement (placePop, ui-pop); on a phone at the foot of the
   screen as the value picker's sheet, with the field's label and Stäng. Six rows every month, so that its height never
   jumps; ISO weeks, Monday first. */
.ui-date-cal {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 40;
  display: grid;
  gap: var(--space-4);
  width: max-content;
  padding: var(--space-4) var(--date-cal-pad) var(--date-cal-pad);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-overlay);
  color: var(--color-text);
  font-family: var(--font-body);
}
.ui-date-cal[hidden] {
  display: none;
}
.ui-date-cal-sheet-head {
  display: none;
}
.ui-date-cal-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.ui-date-cal-nav,
.ui-date-cal-close {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--date-cal-nav);
  height: var(--date-cal-nav);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--color-action);
  cursor: pointer;
}
.ui-date-cal-month {
  flex: 0 1 calc(3.5 * var(--date-cal-day)); /* its room when there is any, less where the calendar is narrow (T2.114.1): the name wraps then */
  min-width: 0;
  text-wrap: balance;
  margin: 0;
  font-size: var(--date-cal-month);
  font-weight: var(--weight-bold);
  text-align: center;
}
.ui-date-cal-today {
  flex: none;
  min-width: var(--date-cal-nav);
  min-height: var(--date-cal-nav);
  margin-left: auto;
  padding: 0 var(--space-2);
  border: 0;
  background: none;
  color: var(--color-action);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  text-decoration: underline;
  text-underline-offset: var(--date-cal-underline);
  cursor: pointer;
}
.ui-date-cal-grid {
  margin: calc(-1 * var(--date-cal-gap));
  border-collapse: separate;
  border-spacing: var(--date-cal-gap);
}
.ui-date-cal-grid th,
.ui-date-cal-grid td {
  padding: 0;
  text-align: center;
  vertical-align: middle;
}
.ui-date-cal-grid thead th {
  height: var(--date-cal-head-row);
  font-size: var(--date-cal-small);
  font-weight: var(--weight-strong);
  color: var(--color-text-2);
}
.ui-date-cal-grid tbody th {
  width: var(--date-cal-week);
  font-size: var(--date-cal-small);
  font-weight: var(--weight-regular);
  color: var(--color-text-3);
}
.ui-date-cal-day {
  display: grid;
  place-items: center;
  width: var(--date-cal-day);
  height: var(--date-cal-day-height);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: var(--date-cal-text);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ui-date-cal-day.is-other {
  color: var(--date-cal-other);
}
.ui-date-cal-day.is-off {
  background: var(--date-cal-off);
}
.ui-date-cal-day.is-free {
  background: repeating-linear-gradient(
    -45deg,
    var(--date-cal-free-line) 0 var(--line-thin),
    transparent var(--line-thin) var(--date-cal-hatch)
  );
  box-shadow: inset 0 0 0 var(--line-thin) var(--date-cal-free-line);
}
.ui-date-cal-day.is-today {
  box-shadow: inset 0 0 0 var(--date-cal-ring) var(--date-cal-today-ring);
  font-weight: var(--weight-bold);
}
.ui-date-cal-day[aria-pressed="true"] {
  background: var(--date-cal-chosen-surface);
  color: var(--date-cal-chosen-text);
  font-weight: var(--weight-bold);
  box-shadow: inset 0 0 0 var(--line-thin) var(--date-cal-chosen-edge);
}
.ui-date-cal-day[aria-disabled="true"],
.ui-date-quick[aria-disabled="true"] {
  color: var(--date-cal-disabled);
  cursor: default;
}
@media (hover: hover) {
  .ui-date-cal-day:hover:not([aria-disabled="true"], [aria-pressed="true"]) {
    outline: var(--line-thin) solid var(--color-action);
  }
}
.ui-date-cal-note {
  max-width: var(--date-cal-names-max);
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-left: var(--date-cal-note-line) solid var(--date-cal-note-edge);
  background: var(--date-cal-note-surface);
  font-size: var(--date-cal-names);
}
.ui-date-cal-note:empty,
.ui-date-cal-quick:empty {
  display: none;
}
.ui-date-cal-quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: var(--line-thin) solid var(--color-border-soft);
}
.ui-date-quick {
  display: inline-flex;
  align-items: center;
  min-height: var(--date-cal-quick-min);
  padding: 0 var(--space-5);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  cursor: pointer;
}
.ui-date-quick[aria-pressed="true"] {
  border-color: var(--toggle-on-border);
  background: var(--toggle-on-surface);
  color: var(--toggle-on-text);
  font-weight: var(--toggle-on-weight);
}
.ui-date-cal-names {
  display: grid;
  gap: var(--space-2);
  max-width: var(--date-cal-names-max);
  font-size: var(--date-cal-names);
  color: var(--color-text-2);
}
.ui-date-cal-names p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin: 0;
}
.ui-date-cal-names p::before {
  content: "";
  flex: none;
  width: var(--date-cal-swatch);
  height: var(--date-cal-swatch);
  margin-top: var(--space-1);
  border-radius: var(--radius-sm);
}
.ui-date-cal-names .is-today::before {
  box-shadow: inset 0 0 0 var(--date-cal-ring) var(--date-cal-today-ring);
}
.ui-date-cal-names .is-off::before {
  background: var(--date-cal-off);
}
.ui-date-cal-names .is-free::before {
  background: repeating-linear-gradient(
    -45deg,
    var(--date-cal-free-line) 0 var(--line-thin),
    transparent var(--line-thin) var(--space-2)
  );
  box-shadow: inset 0 0 0 var(--line-thin) var(--date-cal-free-line);
}
/* Where the calendar has a room of its own, the open one in the catalogue and the phone's sheet, the columns of the days
   shrink to what fits (T2.114.1): the table is never wider than the room, and a day is its token's size or the
   column's, whichever is less. Only on a phone: from 600 px the open one scrolls in its box, as before, and its days keep
   44 px. The popup under the field has no room to measure and keeps its tokens' sizes. */
@media (max-width: 599px) {
  .ui-field-date[data-date-inline] .ui-date-cal-grid {
    max-width: calc(100% + 2 * var(--date-cal-gap));
  }
  .ui-field-date[data-date-inline] .ui-date-cal-grid td {
    width: var(--date-cal-day);
  }
  .ui-field-date[data-date-inline] .ui-date-cal-day {
    width: 100%;
    max-width: var(--date-cal-day);
  }
}
/* In the catalogue (open) it stands in the flow under its field, so that every mark is seen without a click; in a
   phone narrower than the calendar with its 44 px days it scrolls in its own box and the page never sideways. */
.ui-field-date[data-date-inline] .ui-date-box {
  display: grid;
  grid-template-columns: var(--date-symbol-width) calc(var(--date-field-width) - var(--date-symbol-width)) minmax(0, 1fr);
  width: auto;
}
.ui-field-date[data-date-inline] .ui-date-cal {
  --pop-place: none;
  position: static;
  grid-column: 1 / -1;
  max-width: 100%;
  margin-top: var(--space-2);
  overflow-x: auto;
  box-shadow: none;
}
@media (max-width: 599px) {
  .ui-field-date:not([data-date-inline]) .ui-date-cal {
    --pop-place: none;
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    width: auto;
    max-height: var(--sheet-max-height);
    overflow: auto;
    padding: var(--space-3) var(--space-6) var(--space-6);
    border-width: var(--line-thin) 0 0;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    animation: ui-sheet-in var(--sheet-glide) var(--ease-grow);
  }
  .ui-field-date:not([data-date-inline]) .ui-date-cal::before {
    content: "";
    justify-self: center;
    width: var(--sheet-grip-width);
    height: var(--sheet-grip-height);
    border-radius: var(--sheet-grip-height);
    background: var(--sheet-grip);
  }
  .ui-field-date:not([data-date-inline]) .ui-date-box:has(> .ui-date-cal:not([hidden]))::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 58;
    background: var(--sheet-scrim);
  }
  .ui-field-date:not([data-date-inline]) .ui-date-cal-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
  }
  .ui-date-cal-sheet-head p {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
  }
  .ui-date-cal-close {
    width: auto;
    padding: 0 var(--space-2);
    font: inherit;
    font-size: var(--date-cal-month);
    font-weight: var(--weight-strong);
  }
  .ui-field-date:not([data-date-inline]) .ui-date-cal-grid {
    max-width: calc(100% + 2 * var(--date-cal-gap));
    margin-inline: auto;
  }
  .ui-field-date:not([data-date-inline]) .ui-date-cal-grid td {
    width: var(--date-cal-day);
  }
  .ui-field-date:not([data-date-inline]) .ui-date-cal-day {
    position: relative;
    width: 100%;
    max-width: var(--date-cal-day);
  }
  /* the day's tap target reaches over the gap to its neighbours, so it is 44 px wide where the drawn day is narrower (41 px at 360 px) */
  .ui-field-date:not([data-date-inline]) .ui-date-cal-day::after {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--date-cal-gap));
  }
}
@media (prefers-reduced-motion: reduce) {
  /* as specific as the phone's sheet above, which glides in, so that reduced motion wins there too */
  .ui-date-cal,
  .ui-field-date:not([data-date-inline]) .ui-date-cal {
    animation: none;
  }
}
textarea.ui-input {
  resize: vertical;
  field-sizing: content;
}
.ui-input-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ui-input.ui-neg {
  color: var(--color-negative-amount);
}
.ui-field-editable .ui-input {
  --input-edge: var(--color-action);
  background-color: var(--color-editable);
}
.ui-field-invalid .ui-input {
  --input-edge: var(--color-error);
  background-color: var(--color-error-soft);
}
.ui-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ui-input[readonly] {
  --input-edge: transparent;
  background-color: transparent;
  padding-left: var(--line-thin);
  padding-right: var(--line-thin);
}
/* A field in its read mode (read, ui-field-read; 1c.P, the pilot session 1/11): the value as text, without a form
   control, a frame or a grip to resize, for a reader who may not change it. It is text and not a control, so it takes
   one line of text with a little air (--field-read-min, --field-read-pad; T2.63) and not the height of a control,
   which has room for a frame, a tick or an arrow that is not there; a form to read is thereby denser than one to
   write. An empty value is "-", as in the tables, a text keeps its line breaks, a date stays on one line and an amount
   is right-aligned in tabular figures, red when negative. */
.ui-field-read .ui-field-value {
  margin: 0;
  min-height: var(--field-read-min);
  padding: var(--field-read-pad) 0;
  color: var(--color-text);
  font-size: var(--text-field);
  line-height: var(--leading-normal);
  white-space: pre-line;
  overflow-wrap: break-word;
}
.ui-field-read .ui-field-value-date {
  white-space: nowrap;
}
.ui-field-read .ui-field-value-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-field-read .ui-field-value.ui-neg {
  color: var(--color-negative-amount);
}
/* A grid of fields with at least one control (an input, a select or a text area; T2.63, round 2, the pilot session
   1/11): a field to read there takes the control's height at least, and its value stands on the same line as the
   text of the controls beside it, so that a form to write has its values on one line. The first line of the
   value stands there (its padding above is half of what the control's height has over a line of text) and a value of
   several lines grows downwards, so that a long project name does not stand higher than the controls' text. A control
   here is a field with a box for text that is as high as the others: a hidden field is none, nor is a tick box or a radio
   button, which have a size of their own and no text to stand on a line with, nor is a button of the type submit or
   button. A grid with fields to read only, or with only such things beside them, stays dense. */
:is(.ui-fields, .ui-formgrid):has(
    input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="submit"], [type="button"]),
    select,
    textarea
  )
  .ui-field-read
  .ui-field-value {
  display: grid;
  align-content: start;
  min-height: var(--field-read-control-min);
  padding-top: var(--field-read-control-pad);
  padding-bottom: var(--field-read-pad);
}
/* Unsaved: a discreet corner flag and dot, not coloured rows (granskningslistan). */
.ui-field-unsaved .ui-field-label::after {
  content: "";
  display: inline-block;
  width: var(--dot);
  height: var(--dot);
  margin-left: var(--space-3);
  border-radius: var(--radius-round);
  background: var(--color-unsaved);
}
.ui-field-unsaved .ui-input {
  background-image: linear-gradient(225deg, var(--color-unsaved) var(--corner-flag), transparent var(--corner-flag));
}

/* The value picker in a form with a changed value (T19.2.2, K84): the same corner flag as the other fields. */
.ui-field-unsaved .ui-valuepicker-field {
  background-image: linear-gradient(225deg, var(--color-unsaved) var(--corner-flag), transparent var(--corner-flag));
}
/* A field with a warning (T19.2.2, K84 c): the warning's edge and its line under the field, an account that is missing
   from the chart; the field can still be saved as it is. */
.ui-field-warned .ui-valuepicker-field {
  --input-edge: var(--field-warn-edge);
}
.ui-field-warn {
  font-size: var(--text-xs);
  color: var(--field-warn-text);
  font-weight: var(--weight-medium);
  margin: 0;
}

/* Checkbox: never field width, the label sits next to the box. */
.ui-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--target-min);
  width: auto;
  cursor: pointer;
}
.ui-check input {
  width: var(--check);
  height: var(--check);
  margin: 0;
  accent-color: var(--color-action);
  flex: none;
}
/* A tick box in a filter row (T2.121, K114): its label is the tap target's height and the row is aligned at the bottom,
   so it stands on the middle line of the fields or the buttons beside it by the token's margin above and below, and
   the row keeps their height. The rule is the row's, so a view has none of its own. */
.ui-actions-filter > .ui-check {
  margin-block: var(--check-button-offset);
}
.ui-actions-filter:has(.ui-input) > .ui-check {
  margin-block: var(--check-field-offset);
}
/* Fields in a grid (T2.47), as the prototype's form: four on a row from an iPad in landscape, two between a phone and
   that, and one on a phone. A field that is wide (ui-formgrid-wide), such as a note, takes the whole row. The fields are
   aligned at the top, since a hint under one makes it taller. */
.ui-formgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--space-7);
}
.ui-formgrid > * {
  min-width: 0;
}
@media (min-width: 600px) {
  .ui-formgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1180px) {
  .ui-formgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ui-formgrid > .ui-formgrid-wide {
  grid-column: 1 / -1;
}
@media (min-width: 1180px) {
  .ui-formgrid > .ui-formgrid-half {
    grid-column: span 2;
  }
}
/* A group of fields in a form, such as one contact person: a line over it and a heading of its own. */
.ui-formgrid-lines {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-9);
  row-gap: var(--space-2);
}
.ui-formgrid-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border-top: var(--line-thin) solid var(--color-border-soft);
  padding-top: var(--space-5);
}
.ui-formgrid-group > h3 {
  font-size: var(--text-md);
}
/* One field per row (ui-formgrid-stack, T19.2.2, K84 fråga 4): the label in a column at the left and the fields as wide
   as each other under each other, as a default per category. The rows share the columns (subgrid), so that the fields
   line up whatever the labels' lengths; a field's line under it (a warning, a hint) stands under the field and the row
   grows downwards. A cell of the grid is the field itself or a wrapper around it (with its hidden inputs). Under 600 px
   the label stands above its field. */
.ui-formgrid-stack {
  gap: var(--formgrid-stack-gap-y) var(--formgrid-stack-gap-x);
  align-items: start; /* the stack keeps its own layout, outside the three tracks of a line (T2.146) */
}
.ui-formgrid-stack > .ui-field > .ui-field-label,
.ui-formgrid-stack > * > .ui-field > .ui-field-label {
  font-size: var(--formgrid-stack-label-size);
  font-weight: var(--formgrid-stack-label-weight);
}
.ui-formgrid-stack > .ui-field > :is(.ui-input, .ui-valuepicker-field),
.ui-formgrid-stack > * > .ui-field > :is(.ui-input, .ui-valuepicker-field) {
  width: 100%;
  max-width: var(--formgrid-stack-field);
}
@media (min-width: 600px) {
  .ui-formgrid-stack {
    grid-template-columns: fit-content(var(--formgrid-stack-label-max)) var(--formgrid-stack-field);
  }
  .ui-formgrid-stack > *,
  .ui-formgrid-stack > * > .ui-field {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: start;
    row-gap: var(--space-2);
  }
  .ui-formgrid-stack > .ui-field > *,
  .ui-formgrid-stack > * > .ui-field > * {
    grid-column: 2;
  }
  .ui-formgrid-stack > .ui-field > .ui-field-label,
  .ui-formgrid-stack > * > .ui-field > .ui-field-label {
    grid-area: 1 / 1;
    align-self: center;
  }
}
/* A field that is only read, as "label: value" (T2.47), with where it is changed beside it, discreet, on the same line. */
.ui-field-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-4);
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
}
.ui-field-line-label {
  color: var(--color-text-3);
}
.ui-field-line-value {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}
.ui-field-line-source {
  font-size: var(--text-xs);
  color: var(--color-text-3);
}
/* A group of boxes to tick or choose among in a grid (T2.47), six on a row from an iPad in landscape, as the prototype's
   categories. Each box keeps the tap target's height. */
.ui-check-grid {
  min-width: 0;
}
.ui-check-grid-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin: 0;
}
.ui-check-grid-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-7);
}
@media (min-width: 600px) {
  .ui-check-grid-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 820px) {
  .ui-check-grid-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1180px) {
  .ui-check-grid-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.ui-check-grid-list .ui-check {
  min-width: 0;
}
/* The header of a form's panel: the name at the left and where the record comes from, discreet, at the right. */
.ui-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-7);
}
.ui-panel-head > h2 {
  font-size: var(--text-xl);
}
.ui-panel-status {
  font-size: var(--text-sm);
  color: var(--color-text-3);
}

/* The text of an empty field is grey (T2.47): the accounting system's value under a field that the customer's own replaces. A
   value that is the customer's own has a small grey "eget" at its label, with a dot, so that it is seen without colour alone. */
.ui-field .ui-input::placeholder {
  color: var(--color-text-3);
  opacity: 1;
}
.ui-field-own {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-3);
}
.ui-field-own::before {
  content: "";
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-round);
  background: currentcolor;
}

/* ---- Picker ---- */
.ui-picker {
  position: relative;
}
/* A field with its label beside it on the same row (beside, P.0: the compact project row), from 600 px, in two columns;
   on a phone the label stays above, as the living budget's Version (a rule further down); after .ui-field, which it changes. */
@media (min-width: 600px) {
  .ui-field-beside {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2) var(--space-4);
  }
  .ui-field-beside > .ui-field-label {
    white-space: nowrap;
  }
  /* The field, its list and a hint stand in the second column, so that the list opens under the field and not under the
     label: an absolutely placed child of a grid has its column as its frame. */
  .ui-field-beside > :not(.ui-field-label) {
    grid-column: 2;
  }
}
/* The field and the arrow (T2.30): a down arrow at the right shows that it is a list, and a click on it opens and closes
   the list. The arrow fills the field's box (36 px with a mouse, 44 x 44 px with touch, T2.121) and is shown when the
   script is there. */
.ui-picker-box {
  position: relative;
  display: flex;
}
.ui-picker-box .ui-input {
  padding-right: var(--input-box);
  text-overflow: ellipsis;
}
/* A picker whose width follows its options (fit, P.0.2): as many characters as the longest (--picker-chars, which the
   component sets), the field's padding and the arrow, and at most --picker-fit-max, as the prototype's select. */
.ui-picker-fit .ui-input {
  width: calc(var(--picker-chars) * 1ch + var(--space-4) + var(--line-thin) + var(--input-box));
  min-width: 0;
  max-width: var(--picker-fit-max);
}
.ui-picker-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--input-box);
  color: var(--color-text-2);
  cursor: pointer;
}
.ui-picker[data-live] .ui-picker-toggle {
  display: flex;
}
.ui-picker-toggle svg {
  width: var(--icon);
  height: var(--icon);
  transition: transform var(--motion-fast);
}
.ui-picker-box .ui-input[aria-expanded="true"] ~ .ui-picker-toggle svg {
  transform: rotate(180deg);
}
.ui-picker-box .ui-input:disabled ~ .ui-picker-toggle {
  opacity: 0.55;
}
.ui-picker-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: max(100%, var(--picker-min));
  max-width: min(90vw, calc(var(--picker-min) * 2));
  overflow: auto;
  margin: var(--space-1) 0 0;
  padding: var(--space-2) 0;
  list-style: none;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
}
.ui-picker-option {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  min-height: var(--target-min);
  padding: var(--space-2) var(--space-6);
  font-size: var(--text-sm);
  cursor: pointer;
}
.ui-picker-option b {
  font-variant-numeric: tabular-nums;
}
.ui-picker-option[aria-selected="true"] {
  font-weight: var(--weight-medium);
}
.ui-picker-option.is-active {
  background: var(--color-action-soft);
}
.ui-picker-none {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-3);
}
/* A picker in a table's cell (1c.11), as an ÄTA line's account: as wide as the other fields of the row, with the
   number first and the name cut short, while its list opens as wide as a picker's; as wide as the card's value where
   the table is cards. */
.ui-picker-cell {
  min-width: calc(var(--field-min) * 1.25);
  flex: 1 1 auto;
}
.ui-table .ui-cell-editable .ui-picker-cell .ui-input {
  padding-right: var(--input-box); /* the text ends before the arrow, as in a picker outside a table */
}
/* The name of the code chosen, under the field, smaller and grey (1c.11), as the prototype's account name. */
.ui-picker-name {
  display: block;
  max-width: calc(var(--field-min) * 1.5);
  font-size: var(--text-2xs);
  line-height: var(--leading-tight);
  color: var(--color-text-3);
  white-space: normal;
}
.ui-picker-name:empty {
  display: none;
}

/* ---- Cards ---- */
.ui-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--picker-min) / 2)), 1fr));
  gap: var(--cards-gap);
}
/* A card has the thin frame all round and no top edge of its own (T2.70, Björn 1/11): the top edge says only a state,
   below. */
.ui-card {
  container: ui-card / inline-size;
  --card-figure: var(--text-figure);
  background: var(--color-surface);
  border: var(--line-thin) solid var(--card-edge);
  border-radius: var(--card-radius); /* lager 1's form (T2.191, D-KORT-10) */
  box-shadow: var(--shadow-card);
  padding: var(--card-pad-top) var(--card-pad-side) var(--card-pad-bottom);
  min-width: 0;
}
.ui-card-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-label); /* 12/500 in grey (M10, T2.191, D-ALLA-35) */
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--label-color);
  margin: 0 0 var(--card-label-gap);
}
.ui-card-value {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--card-figure);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* The value fits the card (T2.132): the card is a container, and the value's size is counted from the card's width,
   never above the size of the card's kind (--card-figure) and never below the floor. The figure and its unit are two
   words that never break; where they do not fit at the floor the unit goes to a line of its own. */
.ui-card-number,
.ui-card-unit {
  white-space: nowrap;
}
@container ui-card (width > 0) {
  .ui-card-value {
    font-size: clamp(var(--text-figure-floor), calc(100cqw / var(--figure-fit)), var(--card-figure));
  }
}
.ui-card-detail {
  font-size: var(--text-xs);
  color: var(--color-text-2);
  margin: var(--card-detail-gap) 0 0;
}
/* Aligned cards (Björn 31/10 kväll, P.0): in a row of cards the big figures stand at exactly the same height. The heading
   area holds two lines in every card, so a heading that wraps never moves its figure, and the text under the figure
   follows it. Short headings first; this is the guard. */
.ui-card-aligned .ui-card-label {
  min-height: var(--card-label-min);
}
/* The compact card (compact, Björn 1/11 via the pilot session): about half the height of the standard one, with the label,
   the figure and a short line under it and less air, as the project overview's key figures and the ÄTA's cards. Aligned,
   its heading area is one line, since the labels of a compact row are short; the figures still stand at one height. */
.ui-card-compact {
  --card-pad-top: var(--card-compact-pad-top);
  --card-pad-side: var(--card-compact-pad-side);
  --card-pad-bottom: var(--card-compact-pad-bottom);
  --card-label-gap: var(--card-compact-gap);
  --card-detail-gap: var(--card-compact-gap);
  --card-label-min: var(--card-compact-label-min);
}
.ui-card-compact .ui-card-label {
  line-height: var(--leading-tight);
}
.ui-card-compact .ui-card-detail {
  line-height: var(--card-compact-leading);
}
.ui-card-compact,
.ui-cards-compact .ui-card-compact {
  --card-figure: var(--text-figure-compact);
}
.ui-card-compact.ui-card-hero {
  --card-figure: var(--text-hero-compact);
}
/* The main figure is seen by its width and its size, with no top edge of its own (T2.70, Björn 1/11; marin had a navy
   one). */
.ui-card-hero {
  --card-figure: var(--text-hero);
}
/* The card's state is the parameter tone (T2.70, Björn 1/11): the top edge means only a state, yellow a warning and red
   something that has to be done, in --line-card. The edge is drawn in the frame's place, and the room over the label
   is less by as much, so that a card with a state is as high as the others and its figure stands at the same height in
   a row of aligned cards. */
.ui-card-warning {
  border-top: var(--line-card) solid var(--card-tone-warning);
  padding-top: calc(var(--card-pad-top) - var(--line-card) + var(--line-thin));
}
.ui-card-critical {
  border-top: var(--line-card) solid var(--card-tone-critical);
  padding-top: calc(var(--card-pad-top) - var(--line-card) + var(--line-thin));
}
/* More figures under the main one (T2.14): terms to the left and values to the right, and the way to the figure's page. */
.ui-card-lines {
  display: grid;
  gap: var(--space-1);
  margin: var(--card-detail-gap) 0 0;
  font-size: var(--text-xs);
}
.ui-card-lines div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}
.ui-card-lines dt {
  color: var(--color-text-2);
}
.ui-card-lines dd {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A figure that opens what it is made of (1a.19): the main figure and a line's value are links at a tap target's height,
   in the figure's own colour, and the underline says it is a link. */
.ui-card-value a {
  display: inline-flex;
  flex-wrap: wrap; /* the figure and its unit are two items that may wrap, the space between them is the gap (T2.132) */
  column-gap: var(--space-3);
  max-width: 100%;
  align-items: center;
  min-height: var(--target-min);
  color: inherit;
  text-decoration: underline;
}
.ui-card-lines dd a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--target-min);
  min-width: var(--target-min);
  color: inherit;
  text-decoration: underline;
}
.ui-card-lines div:has(dd a) {
  align-items: center;
}
.ui-card-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
/* A card that is one link (T2.43, Jesper 31/10): the whole card is the tap target and the name for a screen reader is its
   label and value. A chevron at the corner says it leads on, a frame in the action's colour and its soft surface mark
   hover and focus, and the focus ring is the page's. Nothing in it is underlined, since nothing in it is a link. */
.ui-card-to {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.ui-card-to:hover {
  background: var(--color-action-soft);
  box-shadow: inset 0 0 0 var(--line-thin) var(--color-action);
}
.ui-card-to:focus-visible {
  background: var(--color-action-soft);
  box-shadow: inset 0 0 0 var(--line-thin) var(--color-action);
}
.ui-card-to .ui-card-label {
  padding-right: var(--space-7);
}
/* The card whose filter the list under it shows (current, P.0.17a, K13, the prototype's tile with on): a ring inside the
   frame in the action's colour, kept at hover and focus; aria-current says it to a screen reader. */
.ui-card-to.ui-card-current,
.ui-card-to.ui-card-current:hover,
.ui-card-to.ui-card-current:focus-visible {
  box-shadow: inset 0 0 0 var(--line-card) var(--card-current-ring);
}
.ui-card-chevron {
  position: absolute;
  top: var(--card-pad-top);
  right: var(--card-pad-side);
  font-size: var(--text-xl);
  font-weight: var(--weight-strong);
  line-height: 1;
  color: var(--color-text-2);
}
.ui-card-chevron::before {
  content: "›";
}
.ui-card-to:hover .ui-card-chevron,
.ui-card-to:focus-visible .ui-card-chevron {
  color: var(--color-action);
}
/* The main figure in the compact density is twice as wide as the others (the prototype's hero tile), from an iPad in
   landscape; the other cards share the rest. Under it the cards are as wide as each other. */
@media (min-width: 1180px) {
  .ui-page-compact .ui-cards:has(> .ui-card-hero) {
    grid-template-columns: var(--cards-hero-share) minmax(0, 1fr);
  }
  .ui-page-compact .ui-cards:has(> .ui-card-hero):has(> :nth-child(3)) {
    grid-template-columns: var(--cards-hero-share) minmax(0, 1fr) minmax(0, 1fr);
  }
}
/* A title that is a link (T2.43): the text in the title's own colour and a chevron in the action's, so it shows it leads
   on without an underline; hover and focus underline it and colour it. At the height and at least the width of a tap
   target, so that a short title such as ÄTA is no smaller than 44 px wide. */
.ui-title-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--target-min);
  min-width: var(--target-min);
  color: inherit;
  text-decoration: none;
}
.ui-title-more {
  color: var(--color-action);
  font-weight: var(--weight-bold);
}
.ui-title-link:hover,
.ui-title-link:focus-visible {
  color: var(--color-action);
  text-decoration: underline;
  text-underline-offset: var(--space-2);
}
/* The way to the rest of a box's list under its table (P.0, the pilot session 1/11): a link to another view, with the
   title link's look and chevron, as the overview's Visa alla (N) to Attest. */
.ui-panel-more {
  margin: var(--space-4) 0 0;
}
/* A list's foot (T2.85, K14, components/list_foot.html): under the table of a list in a panel, "Visar 10 av 46" at the left and
   the number of rows, Visa 10 till and Visa alla 46 at the right, on a line that wraps on a narrow screen. The picker is the
   value picker's variant that hangs from its right edge (align end), whose list is narrower here and is moved by
   components.js when the line has wrapped and the picker stands further left. */
.ui-list-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--list-foot-gap);
  margin-top: var(--space-3);
  padding-top: var(--list-foot-pad-y);
  border-top: var(--line-thin) solid var(--list-foot-line);
}
.ui-list-foot-count {
  margin: 0;
  color: var(--list-foot-text);
  font-size: var(--text-sm);
}
.ui-list-foot-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  /* buttons side by side keep --space-4 between them, so that their tap targets never overlap (T2.120) */
  gap: var(--space-4) var(--list-foot-gap);
  margin-left: auto;
}
.ui-list-foot .ui-valuepicker-end .ui-valuepicker-pop {
  width: min(var(--valuepicker-foot-pop), calc(100vw - 2 * var(--page-side)));
}
/* Cards in a box of half the page (T2.14): two by two, with a smaller figure. */
.ui-cards-compact .ui-card:not(.ui-card-compact) {
  --card-figure: var(--text-2xl);
}
.ui-cards-compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-compact-min)), 1fr));
  gap: var(--space-5);
}
/* Fields in rows with a width after their content (1c.P, the prototype's fgrid): each field takes at least
   --field-row-min and the row shares what is left, so that a date, an amount and a phone number stand two or three
   in a row and a field in a form is never alone in the whole width unless the row is narrow. A long text (a
   description, a heading) stands under the rows, outside the block, in the whole width. The columns are as many as fit
   at --field-row-min each (T2.146: a grid, so that the fields of a line share its tracks). A line of fewer fields than
   fit keeps the columns' width, also the first or only line (auto-fill, T2.177; T2.91, Björn 6/11: "Ett ensamt fält
   på en rad behåller sin naturliga bredd och sträcks inte ut"), as a field alone on a later line already did. */
.ui-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--field-row-min)), 1fr));
  column-gap: var(--space-7);
}
.ui-fields > * {
  min-width: 0;
}
/* At most two or three fields in a row (T2.177, D-FALT-28; the prototype's np-row and np-row3 in Nytt projekt). Two
   (ui-fields-two on ui-fields): a column is at least half the row, so that a form in half a column, such as the
   project's panels, stands two in a row whatever the screen, and one when two do not fit at --field-row-min. Three
   choices (ui-fields-three around a ui-fields, the pilot session 25/11): all columns of one width, as wide as the
   widest value chosen in them (--picker-need-max, which components.js measures and sets, in px, when a picker starts
   and when a value is chosen or set, and not while one writes in it), so that no choice is cut short. Three stand in
   a row when the row is wide enough for three of that width, else two and one, and the room left is shared evenly;
   never wider than a third, so never more than three. Narrower than 560 px the choices stand as in ui-fields. */
.ui-fields-two {
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(100%, max(var(--field-row-min), (100% - var(--space-7)) / 2 - var(--line-thin))), 1fr)
  );
}
.ui-fields-three {
  container-type: inline-size;
}
@container (min-width: 560px) {
  .ui-fields-three > .ui-fields {
    grid-template-columns: repeat(
      auto-fill,
      minmax(
        min(100%, max(var(--picker-need-max, var(--line-thin)), (100% - 2 * var(--space-7)) / 3 - var(--line-thin))),
        1fr
      )
    );
  }
}
/* A line of fields in three tracks (T2.146, the pilot session 14/11 after #2012; the rule of T2.97, Björn 7/11): every
   line of a grid of fields (ui-fields, ui-formgrid) has a track for the labels, one for the fields and one for the
   text under them (an error or a hint), and each field lays its parts in the line's tracks (subgrid). So the labels
   share a track and stand on one line at their last line, beside their own field also when another label wraps; the
   fields share a track and have the same upper edge; and the errors and hints share a track and start on one line. An
   error or a long label in one field gives the whole line more height downwards, and no field or label of the line
   moves upwards. The third track is at least the air between two lines (--space-6, the row gap of before), and a text
   in it has that air under it, so that the air between the lines is the same as before; the grid gives back the
   last line's air with a margin of as much under it, so that what follows stands where it stood. A part that is no
   field (a button, a box to tick) spans the three tracks at the top, as before; one in ui-formgrid-end stands at the
   field track's lower edge. A value picker and a field with its label beside it (beside) keep their own layout,
   since a part of theirs opens under them. When a text under a field comes or goes without a reload, the grid glides
   to its new height (components.js, glide), as the field did. */
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) {
  grid-auto-rows: auto auto minmax(var(--space-6), auto);
  row-gap: 0;
  align-items: start;
  margin-bottom: calc(var(--space-6) * -1);
}
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > * {
  grid-row: span 3;
}
/* A part that does not lay itself in the tracks (a button, a box to tick, a value picker) has the air under it as
   its margin, so that the air after it is the line's also when it is the highest part of its line. */
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :not(.ui-formgrid-end, :has(> .ui-field:only-child), .ui-field:not(.ui-valuepicker, .ui-field-beside)) {
  margin-bottom: var(--space-6);
}
/* A field of the line (the line's own, or alone in a part of it, as ui-formgrid-half), a part that holds one, and
   ui-formgrid-end lay their parts in the line's three tracks: the label in the first, at its foot, a text under the
   field in the third, and the rest (the field, its list) in the second, where an absolutely placed list has the field
   track as its frame and opens under the field. The air between the parts is their margins, since the line's own gap
   is none. */
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :is(.ui-formgrid-end, :has(> .ui-field:only-child)):not(.ui-field),
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field):not(.ui-valuepicker, .ui-field-beside) {
  display: grid;
  grid-template-rows: subgrid;
  gap: 0;
}
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child):not(.ui-field) > .ui-field {
  grid-row: 1 / -1;
}
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field):not(.ui-valuepicker, .ui-field-beside) > *,
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-formgrid-end:not(.ui-field) > * {
  grid-row: 2;
  align-self: start; /* a field keeps its own height in a track that a higher one makes higher */
}
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field):not(.ui-valuepicker, .ui-field-beside) > .ui-field-label {
  grid-row: 1;
  align-self: end;
  margin-bottom: var(--space-2);
}
:is(:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-field, :is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > :has(> .ui-field:only-child) > .ui-field):not(.ui-valuepicker, .ui-field-beside) > :is(.ui-field-hint, .ui-field-error) {
  grid-row: 3;
  align-self: start;
  margin-top: var(--space-2);
  margin-bottom: var(--space-6);
}
:is(.ui-fields, .ui-formgrid:not(.ui-formgrid-stack)) > .ui-formgrid-end:not(.ui-field) > * {
  align-self: end;
}
/* A part of a panel, such as one of the two columns of a form in ui-columns (1c.P): its heading and fields with the
   panel's own space between them, without an edge of its own. */
.ui-panel-part {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}
/* Two boxes next to each other from an iPad in landscape, one over the other under it (T2.14). */
.ui-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  align-items: stretch;
}
.ui-columns > * {
  min-width: 0;
}
/* Two small boxes, as the forecast's adjustments, next to each other already from an iPad standing up (P.0). */
@media (min-width: 820px) {
  .ui-columns-early {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Two boxes from an iPad lying down (--bp-ipad-landscape) where the second has twice the room of the first
   (--columns-third), as Använda and Tillgängliga of Händelsetyper i projektet (1g.11f.1, K96 v7, the pilot session
   16/11); under it one over the other, the first on top, each the whole width. */
@media (min-width: 1180px) {
  .ui-columns.ui-columns-third {
    grid-template-columns: var(--columns-third);
  }
}
/* Boxes side by side that together fill the width, as many as fit, such as the living budget's three lists of income
   adjustments while one edits (P.0, round 3): no empty space at the right at 1180 and 1366 px. */
.ui-columns-fill {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--picker-min), 1fr));
  gap: var(--space-7);
}
.ui-columns-fill > * {
  min-width: 0;
}
/* The page's grid (T2.70, Björn 1/11 via the pilot session, the layout sketch): a container query on the content area,
   not on the screen, so the side menu's width is counted. One column under 900 px of content, four from 900 px and six
   from 1500 px (--page-grid-four and --page-grid-six; a container query cannot read them, so the widths are repeated
   here and tests/test_design.py keeps them equal). The key figures and the content are blocks in the same tracks, so
   their edges line up: a block spans with ui-span-1 to ui-span-4 or ui-span-all from four columns, and with
   ui-span-wide-1 to ui-span-wide-6 or ui-span-wide-all from six (without one it spans as many tracks as at four, so
   ui-span-4 is four of six there; only ui-span-all is the whole row at every width). A row of key figures with another number of cards than the tracks, as
   the ÄTA's four, is ui-page-grid-kpis: the whole row, shared evenly on one row from 900 px, two by two under it from
   two wide under it, also on a phone, an odd last card with the whole row. ui-page-grid is the container and holds the grid,
   ui-page-grid-tracks. */
.ui-page-grid {
  container-type: inline-size;
}
.ui-page-grid-tracks,
.ui-page-grid-kpis {
  display: grid;
  gap: var(--page-grid-gap);
  grid-template-columns: minmax(0, 1fr);
}
.ui-page-grid-tracks > *,
.ui-page-grid-kpis > * {
  min-width: 0;
}
/* A card alone in a block fills the block's height, so the cards of a row are as high as each other; so does Att göra
   (1c.3c: without the note and the badge it is shorter than the invoices beside it). */
.ui-page-grid-tracks > * > .ui-card:only-child,
.ui-page-grid-tracks > * > .ui-todo:only-child {
  height: 100%;
}
/* Key figures are two wide under four tracks (under 900 px of content), also on a phone (P.0.17c, K13: "nyckeltalen två i
   bredd"), and an odd last card has the whole row: one is the whole row, two are two wide, three are two and the third over
   the whole row, five are two and two and the fifth over the whole row, as the fifth of five (P.0.17d omgång 3), at 820,
   600 and 390 px (the pilot session 12/11, answer 1). One rule for the row, not one per number of cards. From four tracks
   the variants below lay the row out as the layout's grid 1/4/6 (Björn 1/11), never three and one. */
.ui-page-grid-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ui-page-grid-kpis > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
@container (min-width: 900px) {
  .ui-page-grid-tracks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ui-span-1 {
    grid-column: span 1;
  }
  .ui-span-2 {
    grid-column: span 2;
  }
  .ui-span-3 {
    grid-column: span 3;
  }
  .ui-span-4 {
    grid-column: span 4;
  }
  .ui-span-all,
  .ui-page-grid-kpis {
    grid-column: 1 / -1;
  }
  .ui-page-grid-kpis {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  /* A row of up to six key figures (ui-page-grid-kpis-six, P.0.17a, K13: the start page and Portfölj): three to a row
     at four tracks, and the whole row shared evenly at six, so that six stand in one row only where the page has room
     for them. Five key figures (ui-page-grid-kpis-five, the management's on the start page) are laid out the same way
     (P.0.17d omgång 3, the pilot session 4/11, as the sketch's "två rader om tre"): the cards are as wide as in the
     row of three, so the second row is two cards of that width and an empty place, never two stretched cards. */
  .ui-page-grid-kpis.ui-page-grid-kpis-six,
  .ui-page-grid-kpis.ui-page-grid-kpis-five {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ui-page-grid-kpis > :last-child:nth-child(odd) {
    grid-column: auto;
  }
  .ui-page-grid-kpis.ui-page-grid-kpis-four {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@container (min-width: 1500px) {
  .ui-page-grid-tracks {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .ui-page-grid-kpis.ui-page-grid-kpis-six,
  .ui-page-grid-kpis.ui-page-grid-kpis-five {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  .ui-span-wide-1 {
    grid-column: span 1;
  }
  .ui-span-wide-2 {
    grid-column: span 2;
  }
  .ui-span-wide-3 {
    grid-column: span 3;
  }
  .ui-span-wide-4 {
    grid-column: span 4;
  }
  .ui-span-wide-5 {
    grid-column: span 5;
  }
  .ui-span-wide-6,
  .ui-span-wide-all {
    grid-column: 1 / -1;
  }
}
/* A list card in the page's grid (ui-panel-list-thirds, D-KORT-8, T2.179b, Björn 25/11: "smart visning av 3 eller 2
   kolumner beroende på bredd"): the whole row under six tracks, and from six tracks two of the three columns, as the
   project overview's panels, so that the list is not stretched over a large screen. The third column is the room of the
   post that opens beside the list (layout="panel", T2.105): while a post is open the card has the whole row, the list
   keeps its two columns and the panel stands in the third (--more-panel-share-thirds), and from six tracks the list
   always opens the post there (--more-panel-from-thirds), never under its row. */
@container (min-width: 1500px) {
  .ui-page-grid-tracks > .ui-panel-list-thirds {
    grid-column: span 4;
  }
  .ui-page-grid-tracks > .ui-panel-list-thirds:has(.ui-more-split.is-open[data-more-mode="panel"]) {
    grid-column: 1 / -1;
  }
  .ui-panel-list-thirds .ui-more-split {
    --more-panel-from: var(--more-panel-from-thirds);
    --more-panel-share: var(--more-panel-share-thirds);
  }
}
/* The list and a part beside it (ui-page-grid-tracks-beside, P.0.17c, K13: "Stor skärm (från 1700): projektlistan och
   ÄTA-uppföljningen sida vid sida"): from --page-grid-beside of content, a window of 1700 px with the side menu open and the scroll bar's room (T2.179),
   the main part (ui-page-grid-main) has two thirds of the row and the part beside it (ui-page-grid-aside) one third,
   the list at the left. Two of three tracks end where the fourth of six key figures ends, so the edges line up with
   the key figures' at four tracks (three to a row) and at six. Under it both have the whole row, one under the other,
   as every ui-span-all. A query cannot read a token, so tests/test_design.py keeps the width equal to it. */
@container (min-width: 1421px) {
  .ui-page-grid-tracks.ui-page-grid-tracks-beside {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-main {
    grid-column: span 2;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside {
    grid-column: span 1;
  }
}
/* The part beside the list has the compact card of a phone (compact, T2.42), since it is a third of the row (P.0.17c,
   the pilot session 12/11, K13 hel-1920: "ÄTA på två rader per post"): the variant of compact that the part's width
   decides, without a header row, each row a post of the lines its columns have, as the phone's card, and card_end at
   the right of its line. The same rules as the phone's under 600 px, which a container query cannot share with it. */
@container (min-width: 1421px) {
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact,
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tbody,
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td {
    display: block;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact thead,
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td:not([data-line]),
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td:empty {
    display: none;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: var(--line-thin) solid var(--color-border);
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr::before,
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr::after {
    content: "";
    flex: 0 0 100%;
    height: 0;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr::before {
    order: 15;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr::after {
    order: 25;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td {
    padding: 0;
    border: 0;
    text-align: left;
    overflow-wrap: break-word;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td[data-line="1"] {
    order: 10;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td[data-line="2"] {
    order: 20;
    color: var(--color-text-3);
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td[data-line="3"] {
    order: 30;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td.ui-cc-sep::before {
    content: "\00b7";
    margin-right: var(--space-3);
    color: var(--color-text-3);
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td[data-suffix]::after {
    content: attr(data-suffix);
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact td.ui-cc-end {
    margin-left: auto;
  }
  .ui-page-grid-tracks-beside > .ui-page-grid-aside .ui-table-compact tr:has(> td.ui-cc-end) > td.ui-text-wrap[data-line] {
    flex: 1 1 0;
    min-width: 0;
  }
}
@media (min-width: 1180px) {
  .ui-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-9);
  }
  /* The compact density has the prototype's 20 px between the boxes (.grid2, P.0), as between the rows of the page. */
  .ui-page-compact .ui-columns {
    gap: var(--space-8);
  }
}
.ui-panel-title {
  font-size: var(--text-title);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
/* The heading row (P.0.3, components/heading_row.html): the panel's heading with the controls of what is under it at
   the right, on the heading's middle line, as the prototype's panel heading with its buttons. When the row is too
   narrow the controls go under the heading and stay at the right. */
.ui-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
}
.ui-heading-row > .ui-panel-title {
  margin: 0;
  padding: 0;
}
.ui-heading-row > .ui-actions {
  margin-left: auto;
}
/* A list's filters in its card's heading row (P.0.14, the pilot session 2/11): value pickers ("Status Alla") right after
   the heading, and the table's actions at the right as before. */
.ui-heading-row > .ui-heading-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
}
.ui-heading-row > .ui-heading-filters + .ui-actions {
  margin-left: auto;
}
/* A heading row whose filters split where the card is narrow (split in components/heading_row.html, K64, the pilot
   session's side by side 13/11): the heading and the filter that opens towards the left (align end) stay on the heading's
   line, the one at the right edge, and the other filters go under them, as the card's phone ("Att fördela 3" and Visa on
   one line, Vecka and Typ under it). By the card's width and never the kind of device: the card is the container, and
   where there is room every filter stands on the heading's line as before. 600 px is --bp-mobile, which a container query
   cannot read. The line break is a box of no height, so that the rows are the same distance apart as the row's gap. */
.ui-panel:has(> .ui-heading-row-split) {
  container-type: inline-size;
}
@container (max-width: 599px) {
  .ui-heading-row-split {
    row-gap: 0;
  }
  .ui-heading-row-split::after {
    content: "";
    order: 1;
    flex: 1 1 100%;
    height: 0;
  }
  .ui-heading-row-split > .ui-heading-filters {
    display: contents;
  }
  .ui-heading-row-split > .ui-heading-filters > .ui-valuepicker-end {
    order: 1;
    margin-left: auto;
  }
  .ui-heading-row-split > .ui-heading-filters > .ui-valuepicker:not(.ui-valuepicker-end) {
    order: 2;
    margin-top: var(--space-4);
  }
}
/* Status badges right after the heading that count what the part shows (badges, P.0.17a, K13: the ÄTA's follow-up). */
.ui-heading-row > .ui-heading-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
/* A ledger's sub heading over its table, as Kostnader and Prognos per rad: the prototype's h3 in bold. */
.ui-heading-row-ledger > .ui-panel-title {
  font-size: var(--text-grid-heading);
  font-weight: var(--weight-bold);
}
/* A disclosure (utfällning, P.0, the pilot session 1/11): a button that shows more in the same place, with a muted
   chevron that points right and turns down when it is open, as a row that folds out (1c.P). Never a link's look: a
   link goes to another view (docs/design.md). The button's text says what it shows; at a tap target's height. Without
   JavaScript (no data-js on html) the part is shown and the button is not, so nothing is out of reach. */
.ui-disclosure {
  margin-top: var(--disclosure-space);
}
.ui-disclosure-toggle {
  display: none;
  align-items: center;
  gap: var(--disclosure-gap);
  min-height: var(--target-min);
  padding: 0 var(--space-2) 0 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--disclosure-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
}
html[data-js] .ui-disclosure-toggle {
  display: inline-flex;
}
.ui-disclosure-icon {
  flex: none;
  width: var(--disclosure-icon);
  height: var(--disclosure-icon);
  fill: none;
  stroke: var(--disclosure-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast);
}
.ui-disclosure-toggle[aria-expanded="true"] .ui-disclosure-icon {
  transform: rotate(90deg);
}
.ui-disclosure-toggle[aria-expanded="true"] .ui-disclosure-show,
.ui-disclosure-toggle[aria-expanded="false"] .ui-disclosure-hide {
  display: none;
}
html[data-js] .ui-disclosure-toggle[aria-expanded="false"] + .ui-disclosure-body {
  display: none;
}
.ui-disclosure-toggle[aria-expanded="true"] + .ui-disclosure-body {
  margin-top: var(--disclosure-space);
}
@media (prefers-reduced-motion: reduce) {
  .ui-disclosure-icon {
    transition: none;
  }
}
/* A disclosure whose button makes something new (variant create, 1g.8b2, K30: "+ Lägg till veckor" and "+ Lägg till dag
   eller period"): the button is the create button (ui-button-create) with its plus, and no chevron; while it is open it
   says how to shut it, without the plus. The rest is the disclosure's: without JavaScript the part is shown and the
   button is not. */
.ui-disclosure-add {
  display: none;
}
html[data-js] .ui-disclosure-add {
  display: inline-flex;
}
.ui-disclosure-add[aria-expanded="true"] .ui-button-plus,
.ui-disclosure-add[aria-expanded="true"] .ui-disclosure-show,
.ui-disclosure-add[aria-expanded="false"] .ui-disclosure-hide {
  display: none;
}
html[data-js] .ui-disclosure-add[aria-expanded="false"] + .ui-disclosure-body {
  display: none;
}
.ui-disclosure-add[aria-expanded="true"] + .ui-disclosure-body {
  margin-top: var(--disclosure-space);
}
/* Chips (chips, 1g.8b2, K30): short values chosen in a list, each with a cross that takes it away, side by side and
   wrapping. The chip is as high as a row's controls (--chip-height: 28 px with a mouse, 44 px with touch), and its
   cross a square of the same height drawn, with a tap target of --target-min, a submit button of the form, grey and
   red under the mouse as the quiet button. */
.ui-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--chip-gap);
  margin: 0 0 var(--chip-gap);
  padding: 0;
  list-style: none;
}
.ui-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--chip-height);
  padding-left: var(--chip-pad);
  border: var(--line-thin) solid var(--chip-edge);
  border-radius: var(--chip-radius);
  background: var(--chip-surface);
  color: var(--chip-text);
  font-size: var(--text-sm);
  white-space: nowrap;
}
/* The button is the cross's tap target, --chip-x-target square (at least --target-min), and its margin takes back the
   reach, so the chip keeps its height; the square drawn under the mouse and the focus ring are its ::before, as high
   as the chip. */
.ui-chip-x {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: var(--chip-x-target);
  height: var(--chip-x-target);
  margin: calc(-1 * var(--chip-x-reach));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--chip-x-text);
  cursor: pointer;
}
.ui-chip-x::before {
  content: "";
  position: absolute;
  inset: var(--chip-x-reach);
  border-radius: var(--chip-radius);
}
.ui-chip-x svg {
  position: relative;
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
}
.ui-chip-x:hover,
.ui-chip-x:focus-visible {
  color: var(--chip-x-hover);
}
.ui-chip-x:hover::before,
.ui-chip-x:focus-visible::before {
  background: var(--chip-x-hover-surface);
}
.ui-chip-x:focus-visible {
  outline: none;
}
.ui-chip-x:focus-visible::before {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}

/* The parts of the period that the value picker's Egen period has (T2.44, T2.71a): the dash between the two dates, and
   the discreet word Laddar while the page for a new period loads. The period of two dates and a quick choice is gone
   since P.0.15; every project page has the value picker. */
.ui-period-dash {
  color: var(--color-text-3);
}
.ui-period-loading {
  margin: var(--space-2) 0 0;
  white-space: nowrap;
  color: var(--color-text-3);
  font-size: var(--text-xs);
  font-style: italic;
}
.ui-period-loading[hidden] {
  display: none;
}
/* ---- Value picker (T2.71a, Björn 1/11 via the pilot session) ---- */
/* The value is the button, with a small arrow in the accent's colour, and the list opens under it and applies at once:
   the project in the heading and the period at the right edge of the page's head. As dense as a compact row of
   actions with a mouse, the tap target with touch (ui-actions-compact on the root). */
.ui-valuepicker {
  position: relative;
  min-width: 0;
}
.ui-valuepicker-title {
  display: flex;
  flex-wrap: nowrap; /* the heading is one line (T2.172, D-NAV-11): the prefix and the name never wrap */
  align-items: center;
  min-width: 0;
}
.ui-valuepicker-value {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-min);
  max-width: 100%;
  padding: var(--valuepicker-pad-y) var(--valuepicker-pad-x);
  border: 0;
  border-radius: var(--valuepicker-radius);
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
/* The heading is ONE line (T2.172, Björn 18/11: "26 funkar inte bra - är projektnamnet längre än så får det visas med
   punkter, ingen radbrytning", D-NAV-11): the button is a row of the name and the arrow, and a name that does not fit is cut
   with an ellipsis (the text's nowrap, overflow and text-overflow, min-width 0 on the text, the button, the heading and
   the head's first part), so that the arrow is always shown; the whole name is the button's title. */
.ui-valuepicker-heading .ui-valuepicker-value {
  flex: 0 1 auto;
  min-width: 0;
}
.ui-valuepicker-heading .ui-valuepicker-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* the cut clips under the baseline: the room for the letters that go below it (g, j, p, y) */
  padding-bottom: var(--valuepicker-descender);
  margin-bottom: calc(-1 * var(--valuepicker-descender));
}
.ui-valuepicker-heading .ui-valuepicker-arrow {
  margin-left: 0;
}
.ui-valuepicker-title > .ui-valuepicker-prefix {
  flex: none;
  white-space: nowrap;
}
.ui-page-head > :first-child:has(.ui-valuepicker-heading) {
  min-width: 0;
  max-width: 100%;
}
/* The heading's text starts at the content's edge, as the tabs and the cards do; the air is at the right only. */
.ui-valuepicker-title > .ui-valuepicker-value:first-child {
  margin-left: calc(-1 * var(--valuepicker-pad-x));
}
/* So does a name after a prefix (Levande budget - , ÄTA - ) when it wraps under the prefix, as on a phone, so that every
   line of the heading starts at the same edge (P.0.7 round 3, 390 px); beside the prefix, the prefix's air on its right
   keeps the gap the button's air gave. */
.ui-valuepicker-title > .ui-valuepicker-prefix {
  margin-right: var(--valuepicker-pad-x);
}
.ui-valuepicker-title > .ui-valuepicker-prefix + .ui-valuepicker-value {
  margin-left: calc(-1 * var(--valuepicker-pad-x));
}
/* Hover, open and the keyboard's focus look the same in every value picker (P.0.14, Björn 2/11): the soft surface, and
   with the keyboard the page's focus ring round it as well. */
.ui-valuepicker-value:hover,
.ui-valuepicker-value:focus-visible,
.ui-valuepicker-value[aria-expanded="true"] {
  background: var(--valuepicker-open-bg);
}
/* The fields in a dense table (1c.14, the ÄTA's form with its 14 columns): the table is the sum of its columns' least
   widths, so a field has the least width of its sort and not --field-min: the short ones (KS, Mängd, Enh, Arvode %)
   --field-min-dense, the prices --field-chars-price, the category --field-chars-category and the account picker
   --field-min-account, and Specifikation, the only free text, takes what is left (ui-col-grow), so that the table fits a
   page of 1366 px with the side menu open and no value is cut. Derived from the prototype's #ata-rader (the tokens). Only a
   table that has fields in its cells. */
@media (min-width: 600px) {
  .ui-table-dense td.ui-cell-field .ui-input {
    min-width: var(--field-min-dense);
  }
  .ui-table-dense td.ui-cell-size-price .ui-input {
    min-width: calc(var(--field-chars-price) + 2 * var(--space-3) + 2 * var(--line-thin));
  }
  .ui-table-dense td.ui-cell-size-category .ui-input {
    min-width: calc(var(--field-chars-category) + 2 * var(--space-3) + 2 * var(--line-thin));
  }
  .ui-table-dense td.ui-cell-field .ui-picker-cell {
    min-width: var(--field-min-account);
  }
  .ui-table-dense th.ui-col-grow,
  .ui-table-dense td.ui-col-grow {
    width: 100%;
  }
}
/* The form table (form, ui-table-form, #3619, the customer's feedback 25/11): a short form as a table, as a project's
   hourly rates and fees for ÄTA. It is as wide as its columns and never stretched to the page's width: a column is
   as wide as its header or its field's least width, whichever is wider, and the field fills it. A name field has room
   for a name (--field-chars-name), a number field is narrow (size short, --field-min-dense, a percent) or has room for
   a price (size price, --field-chars-price), right aligned as numbers are (ui-input-amount); the fields keep their own
   height (--input-min, T2.121), so that the rows are of a normal height. On a phone the rows are cards, as every
   table's. */
@media (min-width: 600px) {
  .ui-table.ui-table-form {
    width: auto;
    align-self: flex-start; /* and not stretched by a panel that lays its parts out as a column (ui-panel); after .ui-table in the file, hence two classes */
  }
  /* the field's width is its sort's, which the column counts, and at least the column's, so that it fills a column
     whose header is wider (a width of 100 % would count the field's 20 characters, size, in the column) */
  .ui-table-form td.ui-cell-field .ui-input {
    width: calc(var(--field-chars-name) + 2 * var(--space-3) + 2 * var(--line-thin));
    min-width: 100%;
  }
  .ui-table-form td.ui-cell-size-short .ui-input {
    width: var(--field-min-dense);
  }
  .ui-table-form td.ui-cell-size-price .ui-input {
    width: calc(var(--field-chars-price) + 2 * var(--space-3) + 2 * var(--line-thin));
  }
}
/* The fields in a row stand on one line (T2.97, Björn 7/11): in a table's row with fields every cell stands at the top, so
   that the fields have the same upper edge whether a text stands under one of them or not, such as the account's name
   under Konto; a centred cell moved its field up when the text came. A text or an amount beside the fields starts on
   the fields' line of text (--cell-field-line-pad). A text under a field, a hint, a note or a warning, is in the field's
   flow: the row grows downwards and the rows under it move down, and the field never moves up. On a phone the row is a
   card and its cells are lines of their own, and so is a table that works out its lines (calc) below 1180 px. */
@media (min-width: 600px) {
  .ui-table:not([data-calc]) tr:has(> td.ui-cell-field) > :is(td, th[scope="row"]) {
    vertical-align: top;
  }
  .ui-table:not([data-calc]) tr:has(> td.ui-cell-field) > :is(td, th[scope="row"]):not(.ui-cell-field) {
    padding-top: var(--cell-field-line-pad);
    padding-bottom: var(--cell-field-line-pad); /* as much air under the text as over it, so that a cell with one line is the field's box high (T2.121) */
  }
}
@media (min-width: 1180px) {
  .ui-table[data-calc] tr:has(> td.ui-cell-field) > :is(td, th[scope="row"]) {
    vertical-align: top;
  }
  .ui-table[data-calc] tr:has(> td.ui-cell-field) > :is(td, th[scope="row"]):not(.ui-cell-field) {
    padding-top: var(--cell-field-line-pad);
    padding-bottom: var(--cell-field-line-pad); /* as much air under the text as over it, so that a cell with one line is the field's box high (T2.121) */
  }
}
/* A text in a table's cell is never cut (T2.97, docs/granskningslista.md): a field of free text in a column that wraps
   (wrap), such as an ÄTA line's Kategori and Specifikation, is a text area of one line that breaks its text within the
   cell and grows downwards, as high as its text. A word is never broken in the middle: the text breaks between its
   words (break-word, which leaves the column's least width alone, where anywhere lowered it to one letter), and the
   column is at least as wide as its longest word, since the text area's text is mirrored in the cell
   (ui-input-wrap-mirror), where the table's layout sees it. Nor is a word hyphenated (hyphens: manual, round 2 of #816):
   Safari on an iPad hyphenates Swedish, which breaks a word in the middle too. Only a word longer than the whole table
   is broken; a table that is then wider than its room scrolls in its own box, never the page. It is one line of text, so Enter does not make a
   new line and a pasted line break is a space (components.js). */
.ui-table td.ui-cell-field textarea.ui-input-wrap {
  display: block;
  min-height: var(--input-box);
  padding-top: calc(var(--cell-field-line-pad) - var(--input-reach)); /* one line stands where an input's text does */
  padding-bottom: calc(var(--cell-field-line-pad) - var(--input-reach));
  resize: none;
  overflow: hidden;
  overflow-wrap: break-word;
  hyphens: manual; /* a word is never hyphenated, so it is never broken in the middle */
  white-space: pre-wrap;
  width: 100%; /* the cell's width, which the mirror below decides, */
  contain: inline-size; /* and not its own text's: field-sizing: content (textarea.ui-input) gives a text area the width of its text, with hyphens: manual its longest whole word, and the cell would then take that word's width from the text area as well as from the mirror, so the table's least width counted a word the fields do not need (T2.97 round 2 made the words whole, and the form of an ÄTA no longer fitted 1366 px with the menu open, 1c.14); the height still follows the text */
}
/* The mirror of the text area's text: as wide as its longest word with the text area's air and frame, and no height, so
   that it only gives the column its least width. It is not read by a screen reader. In a card, where the cell is a line
   of its own and no column widens, there is none. */
.ui-table td.ui-cell-field .ui-input-wrap-mirror {
  display: none;
}
@media (min-width: 600px) {
  .ui-table:not([data-calc]) td.ui-cell-field .ui-input-wrap-mirror {
    display: block;
  }
}
@media (min-width: 1180px) {
  .ui-table[data-calc] td.ui-cell-field .ui-input-wrap-mirror {
    display: block;
  }
}
.ui-table td.ui-cell-field .ui-input-wrap-mirror {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  padding: 0 var(--space-3); /* the air of a field in a cell (.ui-cell-editable .ui-input) */
  border: var(--line-thin) solid transparent;
  border-block-width: 0;
  font-family: var(--font-body);
  font-size: var(--text-field);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  hyphens: manual; /* never hyphenated, so that its least width is the longest whole word (auto lowers it to a syllable) */
}
/* When a text under a field comes or goes without a reload, or a text in a cell takes a new line, the field's box glides
   to its new height (components.js, glide): the time and the curve are tokens, and with reduced motion there is none. */
.ui-glide {
  overflow: clip; /* while it glides, a text that comes is shown as the box grows, never drawn over the row under it */
  transition: height var(--motion-grow) var(--ease-grow);
}
@media (prefers-reduced-motion: reduce) {
  .ui-glide {
    transition: none;
  }
}
/* The form mode (field, T2.80, K11): the button is a field of the form, as the other fields are drawn (ui-input): the
   frame, the field's height and text size, the placeholder in the field's grey, the arrow inside at the right; open, the
   accent's frame. The list under it is as wide as the field, at least --valuepicker-form-pop-min and never wider than
   the page; components.js moves it left when the field stands too near the right edge for it. */
.ui-valuepicker-field {
  --input-edge: var(--valuepicker-field-border);
  width: 100%;
  min-width: var(--field-min);
  min-height: var(--input-box);
  justify-content: space-between;
  /* less air above and below than .ui-input: a badge or a symbol in the value is higher than a line of text, and the
     field is still drawn 36 px (T2.121) */
  padding: calc(var(--space-2) + var(--line-thin)) calc(var(--space-4) + var(--line-thin));
  border: 0 solid transparent;
  border-block-width: var(--input-reach); /* the field's tap target in its box, as .ui-input (T2.121) */
  border-radius: var(--field-radius) / calc(var(--field-radius) + var(--input-reach));
  background: var(--color-surface) padding-box;
  box-shadow: inset 0 0 0 var(--line-thin) var(--input-edge);
  filter: var(--shadow-field);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-field);
}
.ui-valuepicker-field:hover,
.ui-valuepicker-field:focus-visible {
  background-color: var(--color-surface);
}
.ui-valuepicker-field[aria-expanded="true"] {
  --input-edge: var(--valuepicker-field-open-border);
  background-color: var(--color-surface);
  box-shadow: inset 0 0 0 calc(2 * var(--line-thin)) var(--input-edge);
}
/* A long name wraps and the button grows, so that the badge avslutat is never cut off. */
.ui-valuepicker-field .ui-valuepicker-text {
  min-width: 0;
  overflow-wrap: break-word;
}
.ui-valuepicker-field .ui-valuepicker-text.is-empty {
  color: var(--valuepicker-field-placeholder);
}
.ui-valuepicker-field .ui-valuepicker-arrow {
  width: var(--icon);
  height: var(--icon);
}
/* The row that adds something (plus, 1g.11g.1, K55, the pilot session 11/11): the form mode's button as a row, a plus
   and the name in the action's colour, with no frame, no placeholder and no arrow; the label and the placeholder are
   kept for a screen reader. The row has the value picker's soft surface under the pointer, with the keyboard's focus
   and while its list is open. */
.ui-valuepicker-plus > .ui-field-label {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ui-valuepicker-plus .ui-valuepicker-field {
  justify-content: flex-start;
  gap: var(--valuepicker-plus-gap);
  min-height: var(--valuepicker-plus-min);
  padding-inline: calc(var(--valuepicker-plus-pad) + var(--line-thin));
  border-block-width: 0; /* a row, not a field: its surface is the whole row */
  box-shadow: none;
  background: transparent;
  color: var(--valuepicker-plus-text);
  font-size: inherit;
  font-weight: var(--weight-strong);
}
.ui-valuepicker-plus .ui-valuepicker-field:hover,
.ui-valuepicker-plus .ui-valuepicker-field:focus-visible,
.ui-valuepicker-plus .ui-valuepicker-field[aria-expanded="true"] {
  background: var(--valuepicker-open-bg);
  box-shadow: none;
}
.ui-valuepicker-plus .ui-valuepicker-text,
.ui-valuepicker-plus .ui-valuepicker-arrow {
  display: none;
}
.ui-valuepicker-form .ui-valuepicker-pop {
  width: max(100%, var(--valuepicker-form-pop-min));
  max-width: calc(100vw - 2 * var(--page-side));
}
/* The label beside the field (inline, 1g.11, K48, pilotsessionen 9/11): the label to the left on the button's line and
   the button as wide as its value; on a surface where the row has no room for both, the row breaks and the label stands
   above, as the form's other labels. The list opens under the row as the form mode's. */
.ui-valuepicker-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-5);
}
.ui-valuepicker-inline .ui-valuepicker-field {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
}
/* The field's error, warning and hint stand on a line of their own under the field, as in the form's other fields
   (D-FALT-6, docs/granskningslista.md: the field has its error under it), and never as a part of the row beside the
   button (G2 delta of #3410). */
.ui-valuepicker-inline > .ui-field-error,
.ui-valuepicker-inline > .ui-field-warn,
.ui-valuepicker-inline > .ui-field-hint {
  flex-basis: 100%;
}
/* In a row of actions (a list's filter, Reskontra) the field is not as narrow as its text but as wide as a picker's, so
   that its list is not narrower than a project's name needs. */
.ui-actions .ui-valuepicker-form {
  flex: 1 1 var(--picker-min);
  max-width: var(--valuepicker-pop-width);
}
.ui-valuepicker-lead {
  color: var(--color-text-2);
  font-weight: var(--weight-regular);
}
.ui-valuepicker-arrow {
  flex: none;
  width: var(--valuepicker-arrow-size);
  height: var(--valuepicker-arrow-size);
  color: var(--valuepicker-arrow);
  transition: transform var(--motion-fast);
}
.ui-valuepicker-value[aria-expanded="true"] .ui-valuepicker-arrow {
  transform: rotate(180deg);
}
/* The period: a button in the page's head, at the right edge on the height of the line under the heading. */
.ui-valuepicker-end .ui-valuepicker-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}
/* A filter in a heading row that opens towards the left (align end, P.0.17d omgång 3) looks as the heading row's other
   filters: align end says the direction only, and the period's look above is the page head's. */
.ui-heading-filters .ui-valuepicker-end .ui-valuepicker-value {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.ui-page-head:has(> .ui-valuepicker-end) > :first-child {
  flex: 1 1 var(--picker-min);
  min-width: 0;
}
/* D-NAV-17 (T2.179d, the pilot session 26/11): under 1366 px of screen the project head's tools (block head_tools, as
   the overview's Ändra uppgifter and Period) always stand on a line of their own under the meta row and the signals.
   Beside the meta row they fitted with the reserve face and broke under it when Source Sans 3 came (713 px of meta in
   706 at 1180 px), so the page moved 54 px. The line is the width's, never the text's: the heading's column takes the
   whole line, so the font, a long name or a long meta row never moves the tools. From 1366 px they stand at the
   head's right edge as before. After the rule above, which it overrides with the same weight. */
@media (max-width: 1365px) {
  .ui-page-head:has(> .ui-page-head-project) > .ui-page-head-project {
    flex-basis: 100%;
  }
}
/* What opens over the page (T2.94, Björn 7/11): "Popups anpassar sig till utrymmet på sidan, inte tvärtom". The page never
   changes for a popup: it does not slide sideways, get wider or get a scroll. components.js (placePop) measures what opens
   where its own rules put it and, where it has no room there, moves it (is-pop-moved, to --pop-left and --pop-top with its
   width, --pop-width) to the side of its button where there is room and inside the window, --pop-edge from its edges,
   also when its content or the window changes. A list has no height of its own: it rolls in itself (is-pop-rolls, at
   most the room, --pop-max-width and --pop-max-height) only when it is wider than the window or higher than the room the
   screen has on the side it opens towards ("egen rullning bara när innehållet är större än hela skärmen", Björn 7/11).
   The value picker's list, the menus, Mer in the tabs, the picker's list, the user menus, the help of Hämtat, the
   schedule's box and the folded menu's label all have it. The place wins over the component's own (and over the
   picker's, which the script sets on the element), and it is set only while the popup is open and has no room. */
.ui-pop.is-pop-moved {
  top: var(--pop-top) !important;
  right: auto !important;
  bottom: auto !important;
  left: var(--pop-left) !important;
  width: var(--pop-width);
}
.ui-pop.is-pop-rolls {
  max-width: var(--pop-max-width);
  max-height: var(--pop-max-height);
  overflow: auto;
  /* The hint that there is more (T2.94.1): a thin scrollbar that stays, as in the side menu's list. */
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
/* And, in the lists that stand on the surface colour, a shade at the edge where more lies hidden, so that the cut row at the
   foot is read as "more" also where the scrollbar is the overlay of a touch screen. The surface colour is laid over it
   where the list is rolled to that end (local, it follows the content) and the shade stays (scroll). */
:is(.ui-menu-list, .ui-tab-menu, .ui-sidenav-usermenu, .ui-picker-list, .ui-valuepicker-pop).ui-pop.is-pop-rolls {
  background-image:
    linear-gradient(var(--color-surface), var(--color-surface)),
    linear-gradient(var(--color-surface), var(--color-surface)),
    linear-gradient(to bottom, color-mix(in srgb, var(--color-border-strong) 28%, transparent), transparent),
    linear-gradient(to top, color-mix(in srgb, var(--color-border-strong) 28%, transparent), transparent);
  background-position: 0 0, 0 100%, 0 0, 0 100%;
  background-repeat: no-repeat;
  background-size: 100% var(--space-9), 100% var(--space-9), 100% var(--space-7), 100% var(--space-7);
  background-attachment: local, local, scroll, scroll;
}
/* In the value picker it is the list that rolls, so that the search and the filters stay in sight; it keeps
   --valuepicker-list-min, and in a window lower than that the popup rolls as a whole. */
.ui-valuepicker-pop.is-pop-rolls .ui-valuepicker-list {
  min-height: var(--valuepicker-list-min);
}
/* The list under the value, over the page. It hangs from the button's left edge, and the common placement (T2.94, ui-pop)
   moves it where that would take it past the page's side air: else it went past the edge of the screen, and on a touch
   screen the page slid sideways while it was open (V45-5). */
.ui-valuepicker-pop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: min(var(--valuepicker-pop-width), calc(100vw - 2 * var(--page-side)));
  margin-top: var(--space-1);
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  letter-spacing: normal;
  line-height: var(--leading-normal);
}
.ui-valuepicker-pop[hidden] {
  display: none;
}
.ui-valuepicker-end .ui-valuepicker-pop {
  left: auto;
  right: 0;
  width: min(var(--valuepicker-pop-narrow), calc(100vw - 2 * var(--page-side)));
}
.ui-valuepicker-filters {
  display: flex;
  flex-wrap: wrap;
  /* the filters' tap targets reach 4 px over and under them with touch (T2.120): --space-4 between the buttons, side by
     side and over each other, so that the targets meet and never overlap */
  gap: var(--space-4);
}
.ui-valuepicker-list {
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-valuepicker-list > li[hidden],
.ui-valuepicker-group-list > li[hidden] {
  display: none;
}
/* A group's own options under its heading (1g.11f.1, pilotsessionen 16/11): the list's rows, in a list for the group. */
.ui-valuepicker-group-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-valuepicker-option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--control-min);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
}
/* A choice that is posted is a button and looks as the link does (T2.85): the form's submit button, over the whole width. */
button.ui-valuepicker-option {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ui-valuepicker-post {
  margin: 0;
}
.ui-valuepicker-option b {
  font-variant-numeric: tabular-nums;
}
.ui-valuepicker-option:hover,
.ui-valuepicker-option.is-active {
  background: var(--valuepicker-hover);
}
/* The value now: the accent's line at the left, inside the option so that it costs no width. */
.ui-valuepicker-option.is-current {
  box-shadow: inset var(--valuepicker-current-width) 0 0 var(--valuepicker-current);
  font-weight: var(--weight-medium);
}
.ui-valuepicker-sub {
  display: block;
  color: var(--color-text-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}
.ui-valuepicker-signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.ui-valuepicker-signal::before {
  content: "";
  flex: none;
  width: var(--valuepicker-dot);
  height: var(--valuepicker-dot);
  border-radius: var(--radius-round);
  background: var(--valuepicker-signal);
}
/* The person's own choice (T2.85, K14): the dot before the value of the button and of the chosen option, and the small
   grey word after an option; the dot has a text for a screen reader on the button (mark) and the word is the option's own. */
.ui-valuepicker-mark {
  display: inline-block;
  flex: none;
  width: var(--valuepicker-own-size);
  height: var(--valuepicker-own-size);
  margin-right: var(--space-2);
  border-radius: var(--radius-round);
  background: var(--valuepicker-own);
  vertical-align: middle;
}
.ui-valuepicker-tag {
  margin-left: var(--space-4);
  color: var(--valuepicker-tag);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}
/* The last option, Återställ till standard, set apart from the choices by a line above it, in the link's colour. */
.ui-valuepicker-reset {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: var(--line-thin) solid var(--valuepicker-reset-line);
}
.ui-valuepicker-reset .ui-valuepicker-option {
  color: var(--color-action);
}
/* The row that adds, last in a list or a dropdown (list_add, ui-list-add, K96 v7, T2.154): a quiet row set apart by a
   line above it, with the words in the action's colour, never the button create, so that the same action looks the
   same. The dropdown's + Ny beställare "<text>" (1c.15b.2, K63 punkt 2), the last row of a search that found no option
   with the text, is the same row around the dropdown's own option (components.js); in a list the action is a link or a
   button over the row's width with the option's height and padding (components/list_add.html). */
.ui-list-add {
  margin-top: var(--list-add-gap);
  padding-top: var(--list-add-gap);
  border-top: var(--line-thin) solid var(--list-add-line);
  list-style: none;
}
.ui-list-add-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--control-min);
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ui-list-add .ui-list-add-action,
.ui-list-add .ui-valuepicker-option {
  color: var(--list-add-text);
  font-weight: var(--list-add-weight);
}
.ui-list-add .ui-list-add-action:hover,
.ui-list-add .ui-valuepicker-option:hover,
.ui-list-add .ui-valuepicker-option.is-active {
  background: var(--list-add-hover);
}
.ui-list-add-plus {
  margin-right: var(--space-2);
}
/* The small form it opens under the field: a box on the second surface with its heading, the fields in a row, the
   note and the buttons (Lägg till och välj, Avbryt). */
.ui-valuepicker-add-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border: var(--line-thin) solid var(--valuepicker-add-edge);
  border-radius: var(--radius-md);
  background: var(--valuepicker-add-surface);
}
.ui-valuepicker-add-box .ui-actions {
  margin-top: 0;
}
.ui-valuepicker-add-title {
  margin: 0;
  font-weight: var(--weight-heading);
}
.ui-valuepicker-none,
.ui-valuepicker-note,
.ui-valuepicker-keys {
  margin: 0;
  color: var(--color-text-3);
  font-size: var(--text-xs);
}
.ui-valuepicker-none[hidden],
.ui-valuepicker-note[hidden] {
  display: none;
}
/* Senast öppnade (T2.71b, decision 0033): the projects opened last under the list, with a heading as Egen period's, in
   a list of their own that rolls at --valuepicker-recent-max, so that the list over it keeps its height. Hidden while
   the search field has a text (components.js, setupValuePicker). */
.ui-valuepicker-recent {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: var(--line-thin) solid var(--color-border-soft);
}
.ui-valuepicker-recent[hidden] {
  display: none;
}
.ui-valuepicker-recent .ui-valuepicker-group {
  padding: 0 var(--space-4);
}
.ui-valuepicker-recent-list {
  max-height: var(--valuepicker-recent-max);
}
/* Egen period: two dates under the choices, applied when they are changed (the period's, T2.44). */
.ui-valuepicker-custom {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4) var(--space-4) 0;
  border-top: var(--line-thin) solid var(--color-border-soft);
}
.ui-valuepicker-custom.is-current {
  box-shadow: inset var(--valuepicker-current-width) 0 0 var(--valuepicker-current);
}
.ui-valuepicker-heading-row .ui-valuepicker-group {
  padding: var(--space-3) var(--space-4) var(--space-1);
}
.ui-valuepicker-group {
  margin: 0;
  color: var(--color-text-3);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.ui-valuepicker-dates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}
.ui-valuepicker-dates .ui-input[type="date"] {
  padding-inline: var(--space-3);
}
/* On a phone the two dates stand one over the other, each as wide as the list. */
@media (max-width: 599px) {
  .ui-valuepicker-dates {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui-valuepicker-dates .ui-period-dash {
    display: none;
  }
}
.ui-valuepicker-error {
  margin: 0;
}
.ui-valuepicker-fallback {
  margin-left: var(--space-4);
}
/* An area's project picker without JavaScript (T2.183.1): the select of the projects and Visa on one line under the
   heading, at the content's left edge, the select as wide as its longest project. */
form.ui-valuepicker-fallback {
  margin-left: 0;
  flex-wrap: nowrap;
}
.ui-valuepicker-fallback > .ui-valuepicker-select {
  width: auto;
  min-width: 0;
  max-width: 100%;
}
/* The line about the keys is for a keyboard, which a mouse has beside it; with touch it is not shown. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-valuepicker-keys {
    display: none;
  }
}

/* The planned list Att göra (T2.14): unticked and disabled, each with when it will tick or remind. */
/* The points one under the other, and side by side in columns of at least --todo-column where the box is wide enough
   for two (P.0.13: Att göra over the whole width at six tracks, as the layout sketch), so that the box is not tall and
   empty at the right. */
/* An ÄTA's attachments (1c.3a.3, K97 a): the heading, the photos as file cards in a grid and the other files as a list,
   each group with its heading and count, and the upload under them (file_card and file_drop). */
.ui-attachments {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
  min-width: 0;
}
.ui-attachments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.ui-attachments-head .ui-panel-title {
  margin: 0;
}
.ui-attachments-cards {
  display: flex;
  flex-direction: column;
  gap: var(--attachments-group-gap);
  min-width: 0;
}
.ui-attachments-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.ui-attachments-group-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-heading);
  color: var(--color-text);
}
.ui-attachments-empty {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--todo-column)), 1fr));
  gap: var(--todo-row-gap) var(--space-9);
}
/* A list in columns (1g.11f.1, K96 v7, the pilot session 16/11): its rows side by side in as many columns of at least
   --list-column as the box has room for, and one under the other where it has room for one, as Tillgängliga's types.
   The width is the box's, never the screen's, so a box beside another counts as narrow. */
.ui-list-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--list-column)), 1fr));
  gap: var(--list-column-gap);
}
/* Under an iPad lying down, where such a list stands the whole width under the box beside it (ui-columns-third), at
   most two columns: each at least --list-column-stacked of the list, more than a third (K96 v7: two at 820 px). */
@media (max-width: 1179px) {
  .ui-list-columns {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--list-column), var(--list-column-stacked))), 1fr));
  }
}
/* On a phone one under the other, also where the box would have room for two narrow columns: a row there is the
   whole width of the screen, as every list on the phone (K96 v7: three, two and one). */
@media (max-width: 599px) {
  .ui-list-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ui-list-columns > *,
.ui-list-rows > * {
  min-width: 0;
}
/* The same list in one column (ui-list-rows), as Använda beside Tillgängliga: its rows one under the other with the
   list's air, so that both areas have the same rhythm. */
.ui-list-rows {
  display: grid;
  gap: var(--list-column-gap);
}
/* A row of such a list with its buttons at its end (the pilot session 16/11): one line, the symbol, the name and the
   buttons, where the name's longest word and the buttons fit; the name wraps between its words, never inside one, and
   where even one word and the buttons do not fit the buttons go under it at the right end (ui-actions-end), never over
   the name. The name (the row's first span, after a form's hidden fields) takes the room left (basis 0), so the row
   only breaks before the buttons at its longest word. */
:is(.ui-list-columns, .ui-list-rows) > .ui-actions > span:first-of-type {
  flex: 1 1 0;
  /* the symbol stays first on the name's line, and a name of more than one line wraps beside it, never under it */
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
/* A point and its line of when directly under it, as the layout sketch's; no box to tick while the watch is planned
   (a control is shown only when it does something, P.0.13 round 2). */
.ui-todo-list li {
  display: flex;
  flex-direction: column;
  gap: var(--todo-when-gap);
}
.ui-todo-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--todo-badge-gap);
  color: var(--color-text);
}
/* A point that leads to what it is about (1c.3c, K97): the whole words are a link and a tap target. */
.ui-todo-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--todo-link-min);
  color: var(--color-link);
  text-decoration: none;
}
.ui-todo-link:hover,
.ui-todo-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: var(--space-2);
}
.ui-todo-when {
  font-size: var(--text-xs);
  color: var(--color-text-3);
}
.ui-panel {
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--card-radius); /* a panel is a card: lager 1's form and density (T2.191, D-KORT-10) */
  box-shadow: var(--shadow-card);
  padding: var(--panel-pad);
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
/* A list in a card of its own (P.0.14, the layout sketch): the heading row with the list's filters and actions, and the
   table under it, with less air inside than a panel of text and fields (--panel-list-pad), so that the table has room. */
.ui-panel.ui-panel-list {
  padding: var(--panel-list-pad);
}
/* The card is the list's frame: the table's box (where it scrolls sideways, or a dense table's) has no edge of its own. */
.ui-panel-list .ui-table-scroll {
  border: 0;
  background: none;
}
/* The sentence about what a setting controls, under the panel's heading (D-INST-6, T19.3.1c): no margin under it, since
   the panel's gap and the disclosure's own space are the air before Mer om inställningen (34 px became 20 px, so that
   the button's text stands about 33 px under the sentence at 1366 px). */
.ui-setting-sentence {
  margin-bottom: 0;
}
/* A panel of running text with lists, such as the instruction (T2.16): the paragraphs and the lists have no margin of
   their own, since the panel's gap is the space between them, and a list in a list sits close under its step. */
.ui-panel-text > p,
.ui-panel-text > ul,
.ui-panel-text > ol {
  margin: 0;
}
.ui-panel-text li + li {
  margin-top: var(--space-3);
}
.ui-panel-text li > ul {
  margin: var(--space-3) 0 0;
}
/* Panels in two columns from an iPad in landscape, one over the other under it (T2.16): the panels run down the first
   column and go on in the second, each whole, so that none of them is stretched to its neighbour's height and leaves a
   hole. Where the two boxes are a pair, as on the project overview, ui-columns is the layout. */
.ui-flow > * {
  break-inside: avoid;
  margin-bottom: var(--space-8);
}
@media (min-width: 1180px) {
  .ui-flow {
    column-count: 2;
    column-gap: var(--space-9);
  }
}

/* ---- Status badges ---- */
.ui-badge {
  /* the short badge's whole name (full, 1c.P round 5) is visually hidden inside it, and must not reach outside a box
     that scrolls, such as the ÄTA list's */
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  /* Never outside its box (V46-6): on one line where it fits, as wide as its words (max-content, so that a table, a
     grid or a row gives it its whole width as before, and it never shrinks in a row), and never wider than its box.
     A badge that does not fit beside what is before it goes down to the next line, as an inline box does and a row
     of badges with flex-wrap; one wider than its box breaks its words onto a next line inside it. */
  width: max-content;
  max-width: 100%;
  flex-shrink: 0;
  padding: var(--space-1) var(--space-5);
  border: var(--line-badge) solid currentColor; /* an edge in the status's own colour, or its tone's (below) */
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  white-space: normal; /* also in a cell or a row that keeps its text on one line: the badge's width says it */
  overflow-wrap: break-word; /* only a word longer than its whole box (T2.97) */
  background: var(--color-surface-2);
  color: var(--color-text-2);
}
.ui-badge::before {
  content: "";
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-round);
  background: currentColor;
}
/* Each tone's surface, text and edge are tokens of their own (T2.73), so that the dark theme can mute them; the dot
   is the text's colour. */
.ui-badge-info {
  border-color: var(--badge-info-edge);
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}
.ui-badge-positive {
  border-color: var(--badge-positive-edge);
  background: var(--badge-positive-bg);
  color: var(--badge-positive-text);
}
.ui-badge-warning {
  border-color: var(--badge-warning-edge);
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}
.ui-badge-critical {
  border-color: var(--badge-critical-edge);
  background: var(--badge-critical-bg);
  color: var(--badge-critical-text);
}
/* The signal chip (T2.191, lager 1 F2, Björn 26/11 20.4x: A, D-MARK-23): a critical badge and one to watch are an
   economic signal, a toned capsule with no edge, the light surface in the tone and the text and its symbol in a darker
   one. The symbol says what it is (components/parts/signal_symbol.html: a falling line for Underskott, a percent for
   Låg marginal, a clock for what is past its day and a document for Ej fakturerat); a badge without one keeps the dot. */
.ui-badge-warning,
.ui-badge-critical,
.ui-signal {
  gap: var(--signal-chip-gap);
  padding: var(--signal-chip-pad-y) var(--signal-chip-pad-end) var(--signal-chip-pad-y) var(--signal-chip-pad-start);
  border-color: transparent;
  border-radius: var(--signal-chip-radius);
  font-size: var(--signal-chip-size);
  font-weight: var(--signal-chip-weight);
  line-height: var(--leading-tight);
}
.ui-badge-warning,
.ui-signal-warning {
  background: var(--signal-chip-warning-bg);
  color: var(--signal-chip-warning-text);
}
.ui-badge-critical,
.ui-signal-critical {
  background: var(--signal-chip-critical-bg);
  color: var(--signal-chip-critical-text);
}
.ui-signal-symbol {
  flex: none;
  width: var(--signal-chip-symbol);
  height: var(--signal-chip-symbol);
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--signal-chip-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-badge:has(> .ui-signal-symbol)::before,
.ui-signal:has(> .ui-signal-symbol)::before {
  content: none;
}

/* ---- Messages and empty states ---- */
.ui-message {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-7);
  border-left: var(--line-thick) solid var(--color-action);
  background: var(--color-action-soft);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.ui-message p {
  margin: 0;
}
/* The variant with content (more, table): a table in the box under its text, on the box's own surface, with air above */
.ui-message-table {
  margin-top: var(--space-4);
  min-width: 0;
}
.ui-message-table .ui-table {
  width: auto;
  max-width: 100%;
  background: transparent;
}
/* The ways on from the box (ways, 1g.8d.1, K95 b): what to do, then one row per calendar, its label and the link variant
   of the button in the small size. A row is as high as the link (--control-min: 36 px with a mouse, the tap target with
   touch), with or without a link, and the rows stand one under the other at every width. The link breaks whole to the
   line under its label when they do not fit (the button does not wrap), and its padding is taken back so that its text
   stands in line with the box's text. */
.ui-message .ui-message-ways {
  display: grid;
  margin-top: var(--space-4);
  min-width: 0;
}
.ui-message-way {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-4);
  min-height: var(--control-min);
}
.ui-message-way .ui-button {
  min-height: var(--control-min);
  margin-left: calc(-1 * var(--space-5));
}
.ui-message-positive {
  border-color: var(--color-positive);
  background: var(--color-positive-soft);
}
.ui-message-warning {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
}
.ui-message-critical {
  border-color: var(--color-error);
  background: var(--color-error-soft);
}
/* The variant beside a field or an upload (inline, T2.98, Björn 7/11 om K23): a symbol for the tone and the text in
   the tone's colour on its soft surface, with a line per file. Never the plain black text for an error. */
.ui-message-inline {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--message-inline-gap);
  padding: var(--message-inline-pad);
  border: var(--message-inline-border-width) solid var(--message-inline-info-border);
  border-radius: var(--message-inline-radius);
  font-weight: var(--weight-medium);
}
.ui-message-inline[hidden] {
  display: none;
}
.ui-message-inline.ui-message-critical {
  color: var(--message-inline-critical-text);
  background: var(--message-inline-critical-surface);
  border-color: var(--message-inline-critical-border);
}
.ui-message-inline.ui-message-warning {
  color: var(--message-inline-warning-text);
  background: var(--message-inline-warning-surface);
  border-color: var(--message-inline-warning-border);
}
.ui-message-inline.ui-message-positive {
  color: var(--message-inline-positive-text);
  background: var(--message-inline-positive-surface);
  border-color: var(--message-inline-positive-border);
}
.ui-message-inline.ui-message-info {
  color: var(--message-inline-info-text);
  background: var(--message-inline-info-surface);
  border-color: var(--message-inline-info-border);
}
.ui-message-icon {
  flex: none;
  width: var(--message-inline-icon);
  height: var(--message-inline-icon);
  margin-top: var(--space-1);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-message-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.ui-message-title {
  font-weight: var(--weight-heading);
}
.ui-message-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-wrap: break-word; /* a line starts with a file's name, which breaks at a space and after _ (name_breaks) */
}
.ui-message-lines:empty {
  display: none;
}

/* ---- Files: the file card and the upload (T2.98, Björn 7/11 om K23) ---- */
/* A file is a card of its own, never in a link's style: the type icon or the thumbnail, the name as plain text that
   breaks but is never cut, the size, the day and who, the statuses as badges and the built in ×. The whole card opens
   the file (the name's link covers it), and the × lies above it. */
.ui-file-cards {
  container: file-cards / inline-size; /* the card's layout from the list's own width, never the device (K82 d) */
  display: flex;
  flex-direction: column;
  gap: var(--file-card-list-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-file-cards-grid {
  display: grid;
  /* at least two side by side, also in a phone at 390 (1c.3a.3, K97, the pilot session 15/11) */
  grid-template-columns: repeat(auto-fill, minmax(min(calc((100% - var(--file-card-gap)) / 2), var(--file-card-grid-min)), 1fr));
  gap: var(--file-card-gap);
}
.ui-file-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--file-card-gap);
  min-width: 0;
  min-height: var(--target-min);
  padding: var(--file-card-pad);
  background: var(--file-card-surface);
  border: var(--line-thin) solid var(--file-card-border);
  border-radius: var(--file-card-radius);
  font-size: var(--text-sm);
}
.ui-file-card:has(.ui-file-card-open:hover) {
  border-color: var(--file-card-hover-border);
}
.ui-file-card:has(.ui-file-card-open:focus-visible) {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
.ui-file-card:not(.ui-file-card-grid) .ui-file-card-face {
  width: auto;
  height: auto;
  background: none;
}
.ui-file-card-face {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--file-card-face);
  height: var(--file-card-face);
  border-radius: var(--file-card-radius);
  background: var(--file-card-face-surface);
  color: var(--file-card-icon-color);
}
.ui-file-icon {
  width: var(--file-card-icon);
  height: var(--file-card-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-file-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
/* The link holds the name and the facts under it, and Öppna (Visa for a picture) at the right, so that it shows how the
   file opens (G1 Bör 4); at least a tap target high, and its ::after covers the card. */
.ui-file-card-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name go" "meta go";
  align-content: center;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-height: var(--target-min);
  color: var(--file-card-name);
  text-decoration: none;
}
/* The name breaks only at a space and after _ (name_breaks puts a <wbr> there, Björn 7/11), never between the last
   word and the ending (T2.106), and is never cut; a part longer than the whole line is the only one broken inside. */
.ui-file-card-name {
  grid-area: name;
  font-weight: var(--weight-medium);
  overflow-wrap: break-word;
}
.ui-file-card-go {
  grid-area: go;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--file-card-go-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.ui-file-card-go svg {
  width: var(--file-card-go-icon);
  height: var(--file-card-go-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* In a list narrower than 600 px, as on a phone, the card's lines stand under each other, and the mark stands at the
   top of the card with the name, never in the middle of the lines (K82 d); the surface decides, not the device */
@container file-cards (max-width: 599px) {
  .ui-file-card:not(.ui-file-card-dense, .ui-file-card-grid) {
    align-items: start;
  }
}
/* On a phone the name has the whole width, and Öppna stands under the facts */
@media (max-width: 599px) {
  .ui-file-card-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "meta" "go";
  }
}
.ui-file-card-open:hover .ui-file-card-go {
  text-decoration: underline;
  text-underline-offset: var(--file-card-go-under);
}
.ui-file-card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--file-card-radius);
}
.ui-file-card-open:focus-visible {
  outline: none;
}
.ui-file-card-meta,
.ui-file-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
}
/* The facts as patterns, never running text with dots between them (T2.106, K82 a): the size, the stamp and the
   state side by side; a stamp that does not fit goes whole to the next line at the name's left edge and never breaks
   inside (K82 d, fråga 5). */
.ui-file-card-meta {
  grid-area: meta;
  align-items: center;
  column-gap: var(--file-card-meta-gap);
  color: var(--file-card-meta);
  font-size: var(--text-xs);
}
.ui-file-card-stamp {
  display: inline-flex;
  max-width: 100%;
}
.ui-file-card-stamp .ui-source-stamp-by {
  margin: 0;
  padding: 0;
  border: 0;
}
/* A button in the card's body, as a diary photo's Försök igen (static/diary/photos.js, 1g.12b): above the cover of the
   name, as the × is, so that it takes the tap. */
.ui-file-card-body > .ui-button {
  position: relative;
  z-index: 1;
  align-self: flex-start; /* as wide as its words, never across the card (Knappar efter sammanhang) */
}
.ui-file-card-remove {
  position: relative; /* above the link that covers the card */
  z-index: 1;
  display: flex;
  align-self: flex-start;
}
.ui-file-card-x {
  display: grid;
  place-items: center;
  width: var(--target-min);
  height: var(--target-min);
  padding: 0;
  border: 0;
  border-radius: var(--file-card-radius);
  background: transparent;
  color: var(--file-card-x-text);
  cursor: pointer;
}
.ui-file-card-x svg {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
}
.ui-file-card-x:hover,
.ui-file-card-x:focus-visible {
  color: var(--file-card-x-hover);
  background: var(--file-card-face-surface);
}
/* The picture viewer (T2.96, K31, D-FIL-7, components/image_viewer.html): the photo large over the whole window on a
   dark ground, "N av M" and the tools at the top, the arrows at the sides and the caption under it. The stage leaves a
   sideways swipe to the script and keeps pinching. The catalogue's open one stands in its post. */
.ui-viewer {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--viewer-pad);
  border: 0;
  background: var(--viewer-ground);
  color: var(--viewer-text);
}
/* The photo and its caption together in the middle of the room under the top, the caption always straight under the
   photo and inside the window: the photo's row takes its height but never more than what is left (pilot 22/11, #3201) */
.ui-viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr minmax(0, auto) auto 1fr;
  row-gap: 0;
}
.ui-viewer:not(:modal) {
  position: relative;
  height: var(--viewer-sample-height);
}
.ui-viewer::backdrop {
  background: transparent;
}
.ui-viewer [hidden] {
  display: none;
}
.ui-viewer :focus-visible {
  outline-color: var(--viewer-focus);
}
.ui-viewer-top {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--viewer-gap);
  margin-bottom: var(--viewer-gap);
}
.ui-viewer-position {
  margin: 0;
  font-size: var(--text-sm);
}
.ui-viewer-tools {
  display: flex;
  gap: var(--space-4);
}
.ui-viewer-tools form {
  display: contents;
}
.ui-viewer-control {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: var(--target-min);
  min-height: var(--target-min);
  padding: 0 var(--space-5);
  border: var(--line-thin) solid var(--viewer-control-border);
  border-radius: var(--radius-md);
  background: var(--viewer-control-bg);
  color: var(--viewer-text);
  font: inherit;
  font-family: var(--font-display);
  font-weight: var(--weight-strong);
  text-decoration: none;
  cursor: pointer;
}
.ui-viewer-control:hover {
  background: var(--viewer-control-hover);
}
.ui-viewer-control svg {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-viewer-close {
  padding: 0;
}
.ui-viewer-stage {
  grid-row: 3;
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  touch-action: pan-y pinch-zoom;
}
.ui-viewer-image {
  display: block;
  max-width: min(100%, var(--viewer-image-max));
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.ui-viewer-step {
  position: absolute;
  top: 50%;
  width: var(--viewer-step-size);
  height: var(--viewer-step-size);
  padding: 0;
  border-radius: var(--radius-round);
  transform: translateY(-50%);
}
.ui-viewer-prev {
  left: 0;
}
.ui-viewer-next {
  right: 0;
}
.ui-viewer-caption {
  grid-row: 4;
  justify-self: center;
  margin-top: var(--viewer-gap);
  max-width: var(--viewer-caption-max);
  text-align: center;
}
.ui-viewer-caption p {
  margin: 0;
  text-wrap: balance;
}
.ui-viewer-meta {
  color: var(--viewer-text-2);
}
/* Till händelsen is a tap target of its own, 44 px high and wide, on the text's line */
.ui-viewer-caption a {
  display: inline-flex;
  align-items: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  color: var(--viewer-link);
}
/* The grid: the thumbnail over the text. */
.ui-file-card-grid {
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-3);
}
.ui-file-card-grid .ui-file-card-face {
  width: 100%;
  height: auto;
  aspect-ratio: var(--file-card-thumb-ratio);
  overflow: hidden;
}
.ui-file-card-grid .ui-file-card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ui-file-card-grid .ui-file-type {
  width: auto;
  height: auto;
  background: none;
}
.ui-file-card-grid .ui-file-type-ending {
  display: none;
}
.ui-file-card-grid .ui-file-icon {
  width: var(--file-card-icon-large);
  height: var(--file-card-icon-large);
}
/* The × stands beside the name, under the picture, so that it is the symbol alone and never a box over a photo (K83):
   in the text's cell at its top right, with the name kept clear of it, so that the facts under the name have the card's
   whole width and a time is never cut, and Öppna stands under the facts, as on a phone (1c.3a.3). */
.ui-file-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
.ui-file-card-grid .ui-file-card-body,
.ui-file-card-grid .ui-file-card-remove {
  grid-row: 2;
  grid-column: 1;
}
.ui-file-card-grid .ui-file-card-remove {
  justify-self: end;
  align-self: start;
  margin-block-start: var(--file-card-remove-lift);
}
.ui-file-card-grid .ui-file-card-open {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "name" "meta" "go";
}
.ui-file-card-grid:has(.ui-file-card-remove) .ui-file-card-name {
  padding-inline-end: var(--target-min);
}
/* The dense grid (1g.12b, K31, pilotsessionen 11/11): small tiles side by side, the picture over its state; the name,
   the facts and Visa are read by a screen reader but not drawn, and the link's cover still opens the file. */
.ui-file-cards-tiles {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--file-card-tile-min)), 1fr));
  gap: var(--file-card-tile-gap);
}
.ui-file-cards-tiles .ui-file-card-grid {
  gap: var(--file-card-tile-gap);
  padding: var(--file-card-tile-pad);
}
.ui-file-cards-tiles .ui-file-card-open {
  min-height: 0;
}
.ui-file-cards-tiles .ui-file-card-open > * {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ui-file-cards-tiles .ui-file-card-grid .ui-file-card-remove {
  position: absolute; /* in the picture's corner, out of the grid card's rows (1c.3a.3) */
  grid-area: auto; /* placed in row 2 its box would be that row, not the card's padding box */
  top: 0;
  right: 0;
  margin-block-start: 0;
}
/* The × in a tile (K31): a small round mark in the picture's corner, the 44 px target around it. */
.ui-file-cards-tiles .ui-file-card-grid .ui-file-card-x {
  place-items: start end;
  padding: var(--file-card-tile-pad);
  border: 0;
  background: transparent;
}
.ui-file-cards-tiles .ui-file-card-x svg {
  box-sizing: border-box;
  width: var(--file-card-tile-x);
  height: var(--file-card-tile-x);
  padding: var(--space-2);
  border-radius: var(--radius-round);
  background: var(--file-card-tile-x-bg);
  color: var(--file-card-tile-x-text);
}
.ui-file-cards-tiles .ui-file-card-x:hover svg,
.ui-file-cards-tiles .ui-file-card-x:focus-visible svg {
  background: var(--file-card-x-hover);
  color: var(--file-card-tile-x-hover-text);
}
.ui-file-cards-tiles .ui-file-card-x:hover,
.ui-file-cards-tiles .ui-file-card-x:focus-visible {
  background: transparent;
}
/* The state under a tile is small (K31) and the file's own (K82, never a badge). */
.ui-file-cards-tiles .ui-file-state {
  font-size: var(--file-card-tile-state-size);
}
/* The dashed tile after the photos that adds more (K31): as high as a picture, a + in the action's colour. */
.ui-file-card-add {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: var(--target-min);
  aspect-ratio: var(--file-card-thumb-ratio);
  padding: 0;
  border: var(--line-thin) dashed var(--file-card-add-border);
  border-radius: var(--file-card-radius);
  background: transparent;
  color: var(--file-card-add-text);
  font-size: var(--file-card-add-size);
  cursor: pointer;
}
.ui-file-card-add:hover,
.ui-file-card-add:focus-visible {
  background: var(--file-card-face-surface);
}
/* The upload: the secondary button, and with a mouse the dashed box to drop files on, with its words; the hint under it
   in the help pattern, the upload list and the errors in the inline message. */
.ui-file-drop {
  /* the container of the upload's list: a container query cannot style the container itself, so the list's grid of
     shared columns (subgrid) asks the whole upload for its width */
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.ui-file-drop-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding: var(--file-drop-pad);
  border: var(--line-thin) dashed var(--file-drop-border);
  border-radius: var(--file-drop-radius);
}
.ui-file-drop-zone.is-over {
  border-color: var(--file-drop-over-border);
  background: var(--file-drop-over-surface);
}
.ui-file-drop-or {
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
/* The file input stays in the page, so that every phone opens it from the button. */
.ui-file-drop-input {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ui-file-drop-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-file-drop-list[hidden] {
  display: none;
}
.ui-file-drop-list:not([hidden]) ~ .ui-message-inline {
  margin-top: var(--file-drop-list-after);
}
/* A row of the upload list (T2.106, K82 b): the type's small mark, the name, the size, the state with Försök igen and
   the cross, in the same columns in every row, so that the names, the sizes and the states line up; Försök igen always
   stands in the file's row and never by the error box under the list (G1 Bör 5). On a phone the state goes under the
   name and the progress takes the row's width (K82 d). */
.ui-file-drop-item {
  display: grid;
  grid-template-columns: var(--file-drop-mark-col) minmax(0, 1fr) auto var(--target-min);
  grid-template-areas: "mark name size x" ". state state x";
  align-items: center;
  column-gap: var(--space-5);
  row-gap: var(--space-1);
  min-height: var(--control-min-fine);
  padding-block: var(--file-drop-item-pad);
  font-size: var(--text-sm);
}
.ui-file-drop-item > .ui-file-type {
  grid-area: mark;
}
.ui-file-drop-size {
  grid-area: size;
}
.ui-file-drop-state {
  grid-area: state;
}
.ui-file-drop-x {
  grid-area: x;
}
/* A list wide enough has the columns of K82 b, shared by every row (subgrid) */
@container (min-width: 600px) {
  .ui-file-drop-list:not([hidden]) {
    display: grid;
    grid-template-columns: var(--file-drop-mark-col) minmax(0, 1fr) auto minmax(var(--file-drop-state-min), auto) var(--target-min);
    column-gap: var(--space-6);
  }
  .ui-file-drop-item {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    grid-template-areas: "mark name size state x";
  }
}
.ui-file-drop-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  min-width: 0;
}
.ui-file-drop-x {
  display: grid;
  place-items: center;
  align-self: start; /* at the top of the row, also when the state goes under the name (K82 d) */
  width: var(--target-min);
  height: var(--control-min-fine);
  padding: 0;
  border: 0;
  border-radius: var(--file-card-radius);
  background: transparent;
  color: var(--file-card-x-text);
  cursor: pointer;
}
/* Uppladdad and Kontrolleras have no cross (K82 b): the row's state hides it, out of the tab order too, and its column
   stays, so that the states line up */
.ui-file-drop-item:is([data-state="done"], [data-state="checking"]) .ui-file-drop-x {
  visibility: hidden;
}
.ui-file-drop-x svg {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
}
.ui-file-drop-x:hover,
.ui-file-drop-x:focus-visible {
  color: var(--file-card-x-hover);
  background: var(--file-card-face-surface);
}

.ui-file-drop-item + .ui-file-drop-item {
  border-top: var(--line-thin) solid var(--file-drop-item-divider);
}
.ui-file-drop-name {
  grid-area: name;
  min-width: 0;
  overflow-wrap: break-word;
}
.ui-file-drop-size {
  text-align: right;
}
/* The file's size: muted metadata without a frame, the figures in even width, and the number and the unit never
   part (T2.106, K82 e). */
.ui-file-size {
  color: var(--file-size-color);
  font-size: var(--file-size-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* The type mark (T2.106, K82 a): the type's shape and the name's ending in the same neutral box for every type, and
   small, the shape alone, in a row or a list. The type is never said by colour. */
.ui-file-type {
  flex: none;
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: var(--space-1);
  width: var(--file-type-box);
  height: var(--file-type-box);
  border-radius: var(--file-card-radius);
  background: var(--file-type-surface);
  color: var(--file-type-color);
}
.ui-file-type .ui-file-icon {
  width: var(--file-type-icon);
  height: var(--file-type-icon);
}
.ui-file-type-ending {
  font-size: var(--file-type-ending-size);
  font-weight: var(--file-type-ending-weight);
  line-height: 1;
  letter-spacing: var(--file-type-ending-tracking);
}
.ui-file-type-small {
  width: var(--file-type-small);
  height: var(--file-type-small);
  background: none;
}
.ui-file-type-small .ui-file-icon {
  width: var(--file-type-small);
  height: var(--file-type-small);
}
/* The file's state (T2.106, K82 b and e): never a badge. Väntar and Kontrolleras neutral with the clock and the
   hourglass, Uppladdad the check of yes and no, Misslyckades the cross with the cause in the row. */
.ui-file-state {
  display: inline-flex;
  align-items: center;
  gap: var(--file-state-gap);
  min-width: 0;
  color: var(--file-state-text);
}
.ui-file-state-icon {
  flex: none;
  width: var(--file-state-icon);
  height: var(--file-state-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--file-state-icon-quiet);
}
.ui-file-state .ui-yes-no {
  white-space: normal;
}
.ui-file-state .ui-yes-no > span {
  white-space: normal;
}
.ui-file-state-failed-word {
  color: var(--file-state-failed);
  font-weight: var(--weight-strong);
}
.ui-file-state-sending {
  flex: 1;
}
/* The progress bar (T2.106, K82 b): a 6 px track with the fill to the share and the share as text beside it;
   role progressbar. Without a known share the track is empty and the text says only the word (fråga 13). */
.ui-progress {
  display: inline-flex;
  align-items: center;
  gap: var(--progress-gap);
  width: 100%;
  min-width: min(100%, var(--progress-min));
}
.ui-progress-track {
  flex: 1;
  height: var(--progress-track-height);
  overflow: hidden;
  border-radius: var(--progress-radius);
  background: var(--progress-track);
}
.ui-progress-fill {
  display: block;
  width: var(--progress-share, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--progress-fill);
}
.ui-progress-text {
  color: var(--progress-text);
  font-size: var(--progress-text-size);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* The dense file list (T2.106, K82 c, fråga 16): the small mark before the name, the size right aligned in its own
   column and the stamp in its own when the list is 600 px wide or more, as a full width list is from 820 px; in a
   narrower list the stamp is not in the row (as the table's Ändrad). */
.ui-file-cards-dense {
  container-type: inline-size;
  gap: 0;
}
.ui-file-card-dense {
  min-height: var(--file-list-row-min);
  padding-block: var(--file-list-row-pad);
  border-width: 0 0 var(--line-thin);
  border-radius: 0;
}
.ui-file-card-dense .ui-file-card-open {
  min-height: var(--file-list-row-min);
}
.ui-file-card-dense .ui-file-card-x {
  height: var(--file-list-row-min);
}
.ui-file-card-dense .ui-file-card-remove {
  align-self: center;
}
/* The heading row (K82 c): Namn over the mark and the name, Storlek over the size and Uppladdad over the stamp, in the
   cards' own columns, since it is drawn as a card whose Öppna and cross are hidden; plain writing in grey (T2.122). */
.ui-file-card-head {
  min-height: var(--file-list-head-min);
  border-bottom-color: var(--file-list-head-divider);
  color: var(--file-list-head-text);
}
.ui-file-card-head:has(.ui-file-card-open:hover) {
  border-color: var(--file-list-head-divider); /* the head is no target: no hover */
}
.ui-file-card-head .ui-file-card-open {
  min-height: var(--file-list-head-min);
  color: inherit;
}
/* the size on the words only: the columns are in em of the row's own size, as the cards' */
.ui-file-card-head :is(.ui-file-card-name, .ui-file-size, .ui-file-card-stamp) {
  color: inherit;
  font-size: var(--file-list-head-size);
  font-weight: var(--file-list-head-weight);
}
.ui-file-card-head :is(.ui-file-card-go, .ui-file-card-x) {
  visibility: hidden;
}
.ui-file-card-head .ui-file-card-x {
  height: auto;
}
.ui-file-card-dense .ui-file-card-open {
  grid-template-columns: minmax(0, 1fr) var(--file-list-size-col) auto;
  grid-template-areas: "name meta go";
}
.ui-file-card-dense .ui-file-card-meta {
  display: contents;
}
.ui-file-card-dense .ui-file-size {
  grid-column: 2;
  text-align: right;
}
/* The state (Kontrolleras, Misslyckades) has a place of its own: the row under the name, over the whole width. The
   second row exists only for a file that has a state (G1 Kan 2). */
.ui-file-card-dense .ui-file-state {
  grid-column: 1 / -1;
  grid-row: 2;
}
.ui-file-card-dense .ui-file-card-stamp {
  display: none;
}
@container (min-width: 600px) {
  .ui-file-card-dense .ui-file-card-open {
    grid-template-columns: minmax(0, 1fr) var(--file-list-size-col) minmax(0, var(--file-list-stamp-col)) auto;
    grid-template-areas: "name size stamp go";
  }
  .ui-file-card-dense .ui-file-card-stamp {
    display: inline-flex;
    grid-column: 3;
  }
}
/* Ta foto (1c.3a.3, K97 question 2): the camera's button beside Lägg till bilaga, only with touch, where a camera is. */
.ui-file-drop-camera {
  display: none;
}
/* The short hint with the info button (i) after it (components/info_button.html). */
.ui-file-drop-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
/* The info button (i), components/info_button.html: its text opens as the tap tip (T2.100) on a tap, on the keyboard's
focus and on hover, never only on hover; one place for every info button until K113 decides its form. */
.ui-info-button {
  display: inline-grid;
  place-items: center;
  width: var(--info-button);
  height: var(--info-button);
  padding: 0;
  border: 0;
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--info-button-text);
  cursor: pointer;
}
.ui-info-button svg {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
}
.ui-info-button:hover,
.ui-info-button:focus-visible {
  color: var(--info-button-hover);
}
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-file-drop-zone {
    padding: 0;
    border: 0;
  }
  .ui-file-drop-camera {
    display: inline-flex;
  }
  .ui-info-button {
    width: var(--target-min);
    height: var(--target-min);
  }
  .ui-file-drop-or {
    display: none;
  }
  .ui-file-drop-item {
    min-height: var(--target-min);
  }
  .ui-file-drop-x {
    height: var(--target-min);
  }
  .ui-file-card-dense:not(.ui-file-card-head),
  .ui-file-card-dense:not(.ui-file-card-head) :is(.ui-file-card-open, .ui-file-card-x) {
    min-height: var(--target-min);
  }
  .ui-file-card-dense:not(.ui-file-card-head) .ui-file-card-x {
    height: var(--target-min);
  }
  .ui-file-drop-retry .ui-button {
    min-height: var(--target-min);
  }
}
@media print {
  .ui-file-card-remove,
  .ui-file-drop {
    display: none;
  }
}
/* The contacts at the client (contact_list, 1c.15b.3, K63 punkt 3): the title as a field's label, two lines per contact
   (the name half bold and ", role", then e-mail · phone), the × at the right of the row, the question before a removal
   in the row on the warning's surface, and the box of a change, the same kind as the value picker's small form of a new
   client. The contact is a button that opens the box; without the right to change it is text and there is no ×. */
.ui-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--contacts-gap);
  min-width: 0;
}
.ui-contacts-title {
  margin: 0;
  color: var(--contacts-title-text);
  font-size: var(--contacts-title-size);
  font-weight: var(--contacts-title-weight);
}
.ui-contacts-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-contact {
  border-bottom: var(--line-thin) solid var(--contacts-divider);
}
.ui-contact-row {
  display: flex;
  align-items: center;
  gap: var(--contacts-row-gap);
}
.ui-contact-open {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: var(--contacts-x-size);
  margin: 0;
  padding: var(--contacts-row-pad) 0;
  border: 0;
  border-radius: var(--contacts-radius);
  background: transparent;
  color: var(--contacts-name-text);
  font: inherit;
  text-align: left;
}
/* With the right to change it, the name is a button whose surface (::after) covers the whole contact, so that a tap
   anywhere on it opens the change, while the e-mail and phone links lie above that surface (a link is never inside a
   button). */
.ui-contact-open-change {
  position: relative;
}
.ui-contact-open-change:hover {
  background: var(--contacts-hover-surface);
}
.ui-contact-change {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ui-contact-change::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--contacts-radius);
}
.ui-contact-change:focus-visible {
  outline: none;
}
.ui-contact-change:focus-visible::after {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
.ui-contact-name {
  color: var(--contacts-name-text);
  font-size: var(--contacts-name-size);
}
.ui-contact-who {
  font-weight: var(--contacts-name-weight);
}
/* E-mail · phone: each its own piece with the · in the gap before it, and the one first on a line has it outside the box,
   where it is clipped, as the file card's facts. The phone keeps its line; the e-mail breaks only after its @. */
.ui-contact-reach {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--contacts-reach-gap);
  max-width: 100%;
  overflow: hidden;
  color: var(--contacts-reach-text);
  font-size: var(--contacts-reach-size);
}
.ui-contact-reach > a {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  color: var(--contacts-reach-text);
  text-decoration: none;
}
.ui-contact-reach > a:hover,
.ui-contact-reach > a:focus-visible {
  text-decoration: var(--contacts-reach-hover-line);
}
.ui-contact-reach > a + a::before {
  content: "\00b7";
  position: absolute;
  right: 100%;
  width: var(--contacts-reach-gap);
  text-align: center;
}
.ui-contact-phone {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* With touch the e-mail and the phone are tap targets of their own (G2 of #962, A2): each link is at least as high and as
   wide as --contacts-reach-step-touch, its line in the middle (padding of half what the target has over a line, 1lh,
   as the fact list's rows), and lies above the change's surface, so that a tap beside the number calls and does not
   open the change. Two links on one line keep the gap with the · between them, and on two lines (390) each line is a
   target high, so their targets never meet. The link stays a block and not a flex box, so the pieces of an e-mail
   address still break after the @ (address_breaks). With a mouse they are the drawn text, as the fact list's link
   (T2.103). */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-contact-reach > a {
    min-width: var(--contacts-reach-step-touch);
    min-height: var(--contacts-reach-step-touch);
    padding-block: calc((var(--contacts-reach-step-touch) - 1lh) / 2);
  }
}
.ui-contact-x {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--contacts-x-size);
  height: var(--contacts-x-size);
  padding: 0;
  border: 0;
  border-radius: var(--contacts-radius);
  background: transparent;
  color: var(--contacts-x-text);
  cursor: pointer;
}
.ui-contact-x svg {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
}
.ui-contact-x:hover,
.ui-contact-x:focus-visible,
.ui-contact-x[aria-expanded="true"] {
  color: var(--contacts-x-hover);
  background: var(--contacts-x-hover-surface);
}
/* The question in the row: the text and the buttons Avbryt and Ta bort beside it, under it when the row is narrow. */
.ui-contact-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--contacts-confirm-gap);
  margin-bottom: var(--contacts-row-pad);
  padding: var(--contacts-confirm-pad);
  border-radius: var(--contacts-radius);
  background: var(--contacts-confirm-surface);
  color: var(--contacts-confirm-text);
}
.ui-contact-confirm-text {
  flex: 1 1 var(--contacts-confirm-measure);
  margin: 0;
  font-size: var(--contacts-name-size);
}
.ui-contact-confirm-actions {
  flex: none;
}
/* The box of a change or a new contact, in the contact's place or at the list's end. */
.ui-contact-edit {
  display: flex;
  flex-direction: column;
  gap: var(--contacts-edit-gap);
  margin: var(--contacts-row-pad) 0;
  padding: var(--contacts-edit-pad);
  border: var(--line-thin) solid var(--contacts-edit-edge);
  border-radius: var(--contacts-radius);
  background: var(--contacts-edit-surface);
}
.ui-contact-edit .ui-actions {
  margin-top: 0;
}
.ui-contact-edit-title {
  margin: 0;
  font-weight: var(--contacts-title-weight);
}
.ui-contacts-empty,
.ui-contacts-note {
  margin: 0;
  color: var(--contacts-note-text);
  font-size: var(--contacts-note-size);
}
@media print {
  .ui-contact-x,
  .ui-contacts-add,
  .ui-contact-confirm,
  .ui-contact-edit {
    display: none;
  }
}
.ui-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-11) var(--space-7);
  text-align: center;
  border: var(--line-thin) dashed var(--color-border);
  color: var(--color-text-2);
}
.ui-empty p {
  margin: 0;
}

/* Where touch does not suit, for example exact measuring in a drawing or a very wide table, the view says so briefly
   (granskningslistan, Björn 10/10). Shown only on a touch screen, whose primary pointer is coarse; preview shows it on
   every screen, for the catalogue and the export only. */
.ui-touch-note {
  display: none;
  margin: 0;
  padding: var(--space-3) var(--space-6);
  border-left: var(--line-thick) solid var(--color-border);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-touch-note-preview {
  display: block;
}
@media (pointer: coarse) {
  .ui-touch-note {
    display: block;
  }
}

/* A rating (rating, T2.160, K103 v5, D-MARK-17): the figure with one decimal and one step per level of the scale, filled
   up to the rating, the last to a quarter, a half or three quarters; under the limit the figure bold and red and the
   steps red, so the sign is the figure and the form. The same in a cell and in the box beside it. */
.ui-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--rating-gap);
  white-space: nowrap;
  line-height: var(--leading-tight);
}
.ui-rating-number {
  font-variant-numeric: tabular-nums;
  color: var(--rating-number);
}
.ui-rating-none {
  color: var(--rating-none);
}
.ui-rating-steps {
  display: inline-flex;
  gap: var(--rating-step-gap);
}
.ui-rating-step {
  display: block;
  width: var(--rating-step);
  height: var(--rating-step-height);
  border-radius: var(--rating-step-radius);
  background: var(--rating-track);
}
.ui-rating-step-on {
  background: var(--rating-fill);
}
.ui-rating-step-p25 {
  background: linear-gradient(to right, var(--rating-fill) 25%, var(--rating-track) 25%);
}
.ui-rating-step-p50 {
  background: linear-gradient(to right, var(--rating-fill) 50%, var(--rating-track) 50%);
}
.ui-rating-step-p75 {
  background: linear-gradient(to right, var(--rating-fill) 75%, var(--rating-track) 75%);
}
.ui-rating-low {
  --rating-fill: var(--rating-low);
}
.ui-rating-low .ui-rating-number {
  color: var(--rating-low);
  font-weight: var(--rating-low-weight);
}
/* The day value (day_value, T2.160, D-MARK-18; K93 B, 1c.3.0a): the days as a figure, past the day in a red mark and
   within the customer's limit for soon in a yellow one, as a badge looks but its own (--day-value-*), apart from the
   signal chip; later days only the figure. The minus is in the figure, so the colour is never the only sign. */
.ui-day-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-day-value-late,
.ui-day-value-soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-5);
  border: var(--line-badge) solid;
  border-radius: var(--radius-sm);
  font-size: var(--day-value-mark-size);
  vertical-align: middle;
}
.ui-day-value-late::before,
.ui-day-value-soon::before {
  content: "";
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-round);
  background: currentColor;
}
.ui-day-value-late {
  border-color: var(--day-value-late-edge);
  background: var(--day-value-late-bg);
  color: var(--day-value-late);
  font-weight: var(--day-value-late-weight);
}
.ui-day-value-soon {
  border-color: var(--day-value-soon-edge);
  background: var(--day-value-soon-bg);
  color: var(--day-value-soon);
  font-weight: var(--day-value-soon-weight);
}

/* Yes and no as a pattern (yes_no, T2.102, Björn's rule 5 of K39): the symbol, in a ring as the sketch's (K45), says the
   state and the text is short; an unknown is an empty ring with the word "okänt" after the name; the state is also said
   to a screen reader. With touch a link is tapped on at least --target-min, a hit area that may be
   larger than the symbol and the text (the ::after), and only with a coarse pointer. */
.ui-yes-no {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--yes-no-gap);
  white-space: nowrap;
  color: var(--yes-no-text);
}
.ui-yes-no-symbol {
  flex: none;
  width: var(--yes-no-icon);
  height: var(--yes-no-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-yes-no-yes .ui-yes-no-symbol {
  color: var(--yes-no-yes);
}
.ui-yes-no-no .ui-yes-no-symbol {
  color: var(--yes-no-no);
}
.ui-yes-no-bad .ui-yes-no-symbol {
  color: var(--yes-no-bad);
}
.ui-yes-no-unknown .ui-yes-no-symbol {
  color: var(--yes-no-unknown);
}
.ui-yes-no-unknown-text {
  color: var(--yes-no-unknown-text);
  font-size: var(--yes-no-unknown-text-size);
}
a.ui-yes-no {
  color: var(--color-link);
}
.ui-yes-no-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--yes-no-row-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* With touch, and on a computer that also has a touch screen (any-pointer: coarse, as every tap target since #499). A row
   that wraps gives each of its items the height of a tap target, with the link in its middle, so that the centres of two
   links on rows under each other are --target-min apart and their tap areas (the ::after) meet and never overlap
   (G1 of #862, Bör 3). The area is also at least --target-min wide, centred on the link: a link with no label says only
   "Ja" and is about 36 px wide (rättningsrunda DY, Kan 1). */
@media (pointer: coarse), (any-pointer: coarse) {
  a.ui-yes-no::after {
    content: "";
    position: absolute;
    inset-block: calc((100% - var(--target-min)) / 2);
    left: 50%;
    width: 100%;
    min-width: var(--target-min);
    min-height: var(--target-min);
    transform: translateX(-50%);
  }
  .ui-yes-no-row {
    row-gap: var(--yes-no-row-gap-touch);
  }
  .ui-yes-no-row > * {
    display: flex;
    align-items: center;
    min-height: var(--yes-no-row-item-touch);
  }
}

/* A job's state and a done step (T2.107, K81): the hourglass of a job that waits or runs (yes_no with wait), a step whose
   label is the state itself (step), with the word of a failed one in the error colour, and a removed one as quiet text
   (job_state). The state's line (ui-job-line) holds the state and what goes with it, such as Hämta PDF and the period, and
   wraps between its parts, never inside the state. A job's row (ui-job-row) has a thin line above it, also the first (K81:
   the line under the button that starts the job), and has the state in a column of its own from
   --bp-mobile, so that the facts and the buttons of the rows line up; on a phone they stand under each other. */
.ui-yes-no-wait .ui-yes-no-symbol {
  color: var(--yes-no-wait);
}
.ui-yes-no-wait {
  color: var(--yes-no-wait-text);
}
.ui-yes-no-step.ui-yes-no-bad > .ui-yes-no-state {
  color: var(--yes-no-bad-text);
}
.ui-job-state {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.ui-job-state-reason {
  margin-inline-start: var(--yes-no-gap);
}
.ui-job-state-removed {
  color: var(--job-state-removed);
}
.ui-job-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--job-line-gap);
  margin: 0;
}
.ui-job-line[hidden] {
  display: none;
}
.ui-job-row {
  display: grid;
  gap: var(--job-row-gap);
  align-items: center;
  min-width: 0;
}
.ui-job-row > * {
  margin: 0;
  min-width: 0;
}
.ui-job-row {
  padding-top: var(--job-row-gap-between);
  border-top: var(--line-thin) solid var(--job-row-rule);
}
:not(.ui-job-row) + .ui-job-row {
  margin-top: var(--job-row-gap-between);
}
@media (min-width: 600px) {
  .ui-job-row {
    grid-template-columns: var(--job-row-state) minmax(0, 1fr);
  }
  .ui-job-row > :nth-child(n + 3) {
    grid-column: 2;
  }
}

/* ---- Hover ---- */
/* Hover only adds emphasis where there is a mouse; nothing is reached only by hovering (granskningslistan). On a touch
   screen a hover state stays after the tap, so it is left out there. */
@media (hover: hover) {
  .ui-button:hover {
    filter: brightness(1.06);
  }
  .ui-button-create:hover {
    background: var(--button-create-hover-bg);
    filter: none;
  }
  /* A create button that waits (T2.143) keeps its dimmed surface under the mouse: this rule beats the one above, which
     would give it the hover surface whole. */
  .ui-button-create[aria-disabled="true"]:hover {
    background: color-mix(in srgb, var(--button-create-hover-bg) var(--button-wait-share), transparent);
  }
  .ui-button:disabled:hover,
  .ui-button[aria-disabled="true"]:hover {
    filter: none;
  }
  .ui-button-quiet:not(:disabled, [aria-disabled="true"]):hover {
    color: var(--color-error);
    filter: none;
  }
  .ui-band-menu a:hover {
    color: var(--color-band-text);
  }
  .ui-table tbody tr:hover td {
    background: var(--color-surface-2);
  }
}
/* A row is a phone's card under 600 px (the table's own block below), a flex box with air between its cells, so the tone
   of the row under the pointer is on the whole card and not on each cell, which left it behind the text alone; the whole
   row is toned as in a table from 600 px (the pilot's side by side 22/11, 1f.13). The row under keeps its own surface. */
@media (hover: hover) and (max-width: 599px) {
  .ui-table tbody tr:not(.ui-row-more):hover {
    background: var(--color-surface-2);
  }
  .ui-table tbody tr:not(.ui-row-more):hover > td {
    background: none;
  }
}

/* ---- Dialog ---- */
.ui-dialog {
  width: min(90vw, var(--dialog-max));
  padding: 0;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-overlay);
}
/* On a phone a dialog that is not modal, the catalogue's open one, stands in its post, which is narrower than 90vw (286 px of 324 at 360 px): it never
   reaches past it, and so the page does not slide sideways (T2.114.1). From 600 px it reaches past, inside the window. */
@media (max-width: 599px) {
  .ui-dialog:not(:modal) {
    max-width: 100%;
  }
}
.ui-dialog::backdrop {
  background: var(--color-overlay);
}
.ui-dialog-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
.ui-dialog-body p {
  margin: 0;
}
.ui-dialog .ui-actions {
  justify-content: flex-end;
}
/* The dialog with a form (1g.11f.1, K96 v7: the box Ny typ för projektet): as high as the visible screen at most, and
   the form rolls inside it, so that its buttons are always reached. A grid of boxes in it has two columns on a phone
   and three from 600 px, whatever the window's width, since the dialog is never wider than --dialog-max. */
.ui-dialog-form .ui-dialog-body {
  max-height: var(--dialog-frame-max);
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
}
.ui-dialog-form .ui-check-grid-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 600px) {
  .ui-dialog-form .ui-check-grid-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* The dialog with content (content, 1c.3b.2, K97 b): a template in the dialog's content area, such as the choice of the
   files of Skapa mejl i Outlook. As high as the visible screen at most, and only the content area scrolls, so that the
   heading and the buttons always stand where they are; on a phone it takes the width less the gutter. */
.ui-dialog-with-content {
  max-height: var(--dialog-frame-max);
  overflow: hidden;
}
.ui-dialog-with-content[open] {
  display: flex;
  flex-direction: column;
}
.ui-dialog-with-content .ui-dialog-body {
  flex: 0 1 auto;
  min-height: 0;
  box-sizing: border-box;
}
.ui-dialog-with-content .ui-dialog-content {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.ui-dialog-fetched {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  min-width: 0;
}
@media (max-width: 599px) {
  .ui-dialog-with-content .ui-dialog-body {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}
/* The choice of files (components/file_choice.html, 1c.3b.2, K97 b): a group per ÄTA with its heading, a row per file
   with its box, the type's small mark, the name, which breaks after _ (name_breaks) and never in a word, and the size, muted, at the
   right; a file that cannot be chosen is its name and why, without a box; and the sum under a thin line. */
.ui-file-choice {
  display: flex;
  flex-direction: column;
  gap: var(--file-choice-group-gap);
  min-width: 0;
}
.ui-file-choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.ui-file-choice-heading {
  padding: 0;
  font-weight: var(--file-choice-heading-weight);
}
.ui-file-choice-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-file-choice-row {
  display: flex;
  width: 100%;
  min-height: var(--file-choice-row-min);
  box-sizing: border-box;
  min-width: 0;
}
.ui-file-choice-name {
  flex: 1;
  min-width: 0;
}
.ui-file-choice-note {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-4);
  align-items: center;
  min-height: var(--file-choice-row-min);
  color: var(--file-choice-note-text);
}
.ui-file-choice-note .ui-file-choice-name {
  flex: 0 1 auto;
  color: var(--color-text);
}
.ui-file-choice-report {
  margin: 0;
  color: var(--file-choice-note-text);
}
.ui-file-choice-sum {
  margin: 0;
  padding-top: var(--space-4);
  border-top: var(--line-thin) solid var(--file-choice-sum-line);
  font-weight: var(--file-choice-sum-weight);
}
/* A row of buttons in a message (ui-message-actions, 1c.3b.2, K97 b), such as Öppna utkastet i Outlook, Försök igen and
   Hämta som fil, put there by the page's script, with air over it as the ways have. */
.ui-message .ui-message-actions {
  margin-top: var(--message-actions-gap);
}
/* The detail dialog (1b.3): what an amount is made of, wide enough for its list, and as high as the screen at most.
   One surface scrolls, the list (.ui-detail-scroll, T2.87): the frame never scrolls itself (overflow hidden), the body
   and the content only hand the height on (min-height 0), and the heading, the lead and Stäng stay where they are. The
   list's header row stays at the top of that surface. On a phone it takes the width less the gutter. */
.ui-dialog-detail {
  width: min(calc(100vw - 2 * var(--space-7)), var(--dialog-wide-max));
  max-width: none;
  max-height: var(--dialog-frame-max);
  overflow: hidden;
}
.ui-dialog-detail[open] {
  display: flex;
  flex-direction: column;
}
.ui-dialog-detail .ui-dialog-body {
  flex: 0 1 auto;
  min-height: 0;
  box-sizing: border-box;
  padding-bottom: 0;
}
.ui-dialog-detail .ui-dialog-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
/* On the page of its own (page=True) the surface is no box: the message, the list and the note are the page's own
   children with the page's gap, as before T2.87. */
.ui-detail-scroll {
  display: contents;
}
.ui-dialog-detail .ui-detail-scroll {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain; /* a finger at the end of the list does not scroll the view behind */
  -webkit-overflow-scrolling: touch;
}
.ui-dialog-detail .ui-detail-scroll > * {
  flex: none; /* the list is as high as its rows, and the surface scrolls it; it is never squeezed */
}
.ui-dialog-detail .ui-dialog-body > .ui-actions {
  padding: var(--space-6) 0 var(--space-8);
  background: var(--color-surface);
}
/* The list's header row stays at the top of the scrolling surface, not under the tabs (--sticky-top). */
.ui-dialog-detail .ui-table th {
  top: 0;
}
.ui-detail-title {
  margin: 0;
}
.ui-detail-title:focus {
  outline: none;
}
.ui-detail-lead {
  color: var(--color-text-2);
}
@media (max-width: 599px) {
  .ui-dialog-detail .ui-dialog-body {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* ---- Tables ---- */
/* The header row follows when scrolling (sticky), so the table is never inside a box that scrolls, except a table with
   many columns between a phone and a computer (fixed, below), whose box scrolls sideways only.
   Headers may wrap, amounts and dates may not. */
.ui-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-body); /* 13 px (M10, T2.191) */
  font-variant-numeric: tabular-nums;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border); /* marin: a frame around the table, as the cards have */
}
/* A table is never stretched to air (D-TAB-34, T2.179, Björn 25/11: the project report at 2000 px had 900 px between
   Benämning and Intäkter, and Reskontra's Faktura, three digits, was 260 px wide at 1366 px). A table that stands in the
   page's own column, not in a panel, a card, the page's grid, a pair of boxes, a dialog or a message, is as wide as its
   columns need at every width, at the page's left edge with the room to its right left empty, and never wider than the
   page; a table whose columns need the whole page fills it. The selector weighs as .ui-table alone, so a table's own
   least width (in a box that scrolls, --table-wide-min) still wins. From 600 px: under it a table is a list of cards
   over the whole width, as before. */
@media (min-width: 600px) {
  .ui-table:where(:not(.ui-panel *, .ui-card *, .ui-page-grid *, .ui-columns *, .ui-dialog *, .ui-message-table *)) {
    width: auto;
    max-width: 100%;
    align-self: flex-start; /* in the page's column, a flex column, it is not stretched either */
  }
}
.ui-table caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-xl);
  padding-bottom: var(--space-5);
}
.ui-table th {
  position: sticky;
  top: calc(var(--sticky-top) + var(--sticky-bar-height)); /* under the page's own sticky rows when the page measures them (T2.14), and under the edit bar of its own form (T2.140.1) */
  z-index: 2;
  background: var(--color-surface);
  text-align: left;
  vertical-align: bottom;
  font-size: var(--text-col-head);
  font-weight: var(--weight-label);
  letter-spacing: normal; /* plain writing, never capitals (T2.122, Björn 13/11): the heading is at most two lines from 1180 px (docs/design.md) */
  text-transform: none;
  color: var(--color-text-3); /* the grey text of a heading; marin v1 */
  padding: var(--table-cell-pad-y) var(--space-5) var(--table-cell-pad-y) 0;
  border-bottom: var(--line-medium) solid var(--color-border-strong);
}
.ui-table th.ui-num {
  text-align: right;
  white-space: normal;
}
/* A column of kind remove (1g.8b2) has its label only for a screen reader (ui-visually-hidden, out of the flow), and
   the header a line with nothing seen on it, a zero width space, so that the label stands on the bottom line of the
   other headers' text and not under it */
.ui-table th.ui-col-remove::before {
  content: "\200b";
}
/* A row's heading (T2.139, a column with row_head: th scope="row" for a screen reader) is drawn as the row's other cells:
   the header cell's own look (sticky, grey, small, bold, a medium line) is taken off it, and the rules of the cell
   below that are about its place (padding, line, card) have the heading beside them. */
.ui-table td,
.ui-table :where(tbody) th[scope="row"] {
  padding: var(--table-cell-pad-y) var(--space-5) var(--table-cell-pad-y) 0; /* tight rows (T2.191) */
  border-bottom: var(--line-thin) solid var(--color-border-soft);
  vertical-align: middle;
}
.ui-table :where(tbody) th[scope="row"] {
  position: static;
  top: auto;
  z-index: auto;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}
.ui-table :where(tbody) th[scope="row"].ui-num {
  white-space: nowrap;
}
.ui-table td:first-child,
.ui-table th:first-child {
  padding-left: var(--space-6);
}
.ui-table td.ui-text-wrap {
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: manual; /* never hyphenated, so a word is never broken in the middle (T2.97) */
}
/* A text column that keeps its words whole (T12.3), such as the reason of a status: a word is broken only at a space, so
   in a table the column is at least as wide as its longest word, and a table that then is wider than the page scrolls
   in its box (scroll="fit") and the page does not. In the cards of a phone there is no column to widen, so a word
   wider than the card breaks there where it must (break-word, in the rule for cards). A date, a time and an amount hold together (the keep_whole filter and ui-date), so that they stand on one line. */
.ui-table td.ui-text-whole {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
/* A table with many columns, whose words are kept whole (dense, the ÄTA list, 1c.10): less air between the columns, so that
   the sixteen columns with their least widths fit a page from 1280 px with some room to spare (the fonts of another machine are a few pixels wider), so that the box does not scroll at 1280 px with ordinary data. In the cards
   of a phone the cells are as they are. */
@media (min-width: 600px) {
  .ui-table-dense th,
  .ui-table-dense td {
    padding-right: var(--space-2);
  }
  /* but a figure before a status badge keeps the air of a column, so that it never touches the badge's frame (1c.P
     round 2's rule, kept in the dense ÄTA list of P.0.14) */
  .ui-table-dense td:has(+ td > .ui-badge),
  .ui-table-dense td:has(+ td > * > .ui-badge) {
    padding-right: var(--space-6);
  }
  /* in a dense table of fields, two figure columns side by side, in the header and the sums, have at least
     --table-num-gap between them (#825, the pilot session 7/11: PRIS FAKTISKT and ARVODE % nearly touched), from the
     token and never by hand; in the rows the fields' frames part them, so the air is the header's and the column is no
     wider for it. Only a table with fields: a dense table to read, as the ÄTA list, keeps the air of --space-2, so that
     its least width is as measured (e2e/ata-fits-1440.spec.ts) */
  .ui-table-dense:has(> tbody .ui-cell-field) th.ui-num + th.ui-num,
  .ui-table-dense:has(> tbody .ui-cell-field) tfoot td.ui-num + td.ui-num {
    padding-left: calc(var(--table-num-gap) - var(--space-2));
  }
}
/* A left-aligned column straight after a right-aligned one (T2.122 round 2, the pilot session 13/11): a figure or a date
   ends at the cell's right edge and the text after it starts at the next cell's left edge, so that the two are read as one
   row, as "Ersättningskrav Kostnadsbedömning" in the ÄTA list. The left-aligned cell has a least air of --space-3 before it,
   in the header and in the rows, in every table. In the cards of a phone there is no column. A row's heading (th) joins
   through :where, so that the rule weighs what it did with td alone and the sheet's sum rows (tfoot td.ui-num, T2.51c)
   still win over it. */
@media (min-width: 600px) {
  .ui-table th.ui-num + th:not(.ui-num),
  .ui-table :is(td, :where(th[scope="row"])).ui-num + td:not(.ui-num) {
    padding-left: var(--space-3);
  }
}
/* A short text that keeps to one line in a narrow column, such as "Med oss" (1a.4). */
.ui-table td.ui-nowrap {
  white-space: nowrap;
}
/* A link alone in a cell fills the cell's height, so that it is a tap target of --target-min (T2.7): the row then
   opens with a finger also where the text is short. The cell's air moves into the link, so that a name that wraps
   keeps its distance to the lines. A cell with more than one link keeps them as text. */
.ui-table td > a:only-child {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  min-width: var(--target-min);
  margin: calc(-1 * var(--space-4)) 0;
  padding: var(--space-4) 0;
}
.ui-table td.ui-num > a:only-child {
  justify-content: flex-end;
}
/* Begär ändring under its lead (Grundinställning or Inställd av, the settings' column Ändras, where, D-INST-1) is a tap target
   of --target-min as a link alone in a cell is, but laid over the line: the target reaches half of what is over the line
   (--target-min less 1lh) above and below it and adds no height to the cell, so that the cell is two lines as before. */
.ui-table td.ui-cell-where > .ui-cell-lead ~ a {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  min-width: var(--target-min);
  margin-block: calc((1lh - var(--target-min)) / 2);
  padding: 0;
}
/* The number link (T2.42; the ÄTA list can use the same class, 1c.P): the project number and the ÄTA number are links in
   the link's colour without an underline, which comes at hover and focus. A column that fits its content (fit) is as wide
   as its number, so the number starts at the cell's own air, and the link does not push it right. */
.ui-table a.ui-number-link {
  color: var(--color-link);
  font-weight: var(--number-link-weight);
  text-decoration: none;
}
.ui-table a.ui-number-link:hover,
.ui-table a.ui-number-link:focus-visible {
  text-decoration: underline;
}
/* The number link as the link variant (number_link="nav", 1f.13, D-TAB-27): where the rest of the row folds the post
   out and the number goes to its own page, the number is underlined at rest with the link variant's tokens
   (--nav-link-*, components/nav_link.html), and the line is thicker at hover and focus; with touch too, since the line
   is what says that the number leads elsewhere. */
.ui-table a.ui-number-link.ui-number-link-nav {
  text-decoration-line: underline;
  text-decoration-thickness: var(--nav-link-line);
  text-underline-offset: var(--nav-link-underline-offset);
}
.ui-table a.ui-number-link.ui-number-link-nav:is(:hover, :focus, :focus-visible) {
  text-decoration-line: underline;
  text-decoration-thickness: var(--nav-link-line-hover);
}
/* A code before a cell's text (codes, P.0.17a, K13): the project's or the ÄTA's number in bold, and with a link the code
   and the text are one link, the code in the link's colour and the text in the text's, underlined at hover and focus. */
.ui-table .ui-cell-code {
  font-weight: var(--number-link-weight);
}
.ui-table a.ui-code-link {
  color: var(--color-text);
  text-decoration: none;
}
.ui-table a.ui-code-link .ui-cell-code {
  color: var(--color-link);
}
.ui-table a.ui-code-link:hover,
.ui-table a.ui-code-link:focus-visible {
  text-decoration: underline;
}
/* With touch the code link is a tap target of --target-min, 44 px, the same as a row's identity (.ui-row-id, which is
   --row-control-min since T2.67: 28 px with a mouse and 44 px with touch), so that a tap in the cell's air reaches it,
   the project's and the ÄTA's number alike (G2 of P.0.17a, B1). With a mouse the code link keeps the height of its
   text; only the row's identity and its chevron take the row control's 28 px. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-table a.ui-code-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    min-width: var(--target-min);
  }
}
/* Status badges in a text cell, one per status (tags, P.0.17a, K13): side by side, and one under the other in a narrow
   column. After a text they stand --space-3 from it and in the middle of its line, and a badge keeps its words on one
   line; a cell with nothing before them (-first, an empty text such as the status column) has no air before the
   first badge (D-MARK-21, G1 of K129). */
.ui-table .ui-cell-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-inline-start: var(--space-3);
  vertical-align: middle;
  align-self: center;
}
.ui-table .ui-cell-badges.ui-cell-badges-first {
  margin-inline-start: 0;
}
.ui-table .ui-cell-badges .ui-badge {
  white-space: nowrap;
  align-self: center;
}
.ui-table th.ui-col-fit,
.ui-table td.ui-col-fit {
  width: 1%;
  white-space: nowrap;
}
.ui-table td.ui-col-fit > a:only-child {
  justify-content: flex-start;
}
/* A negative amount in a link is red like the others (1h.6). */
.ui-table td.ui-neg > a,
.ui-table td.ui-better > a {
  color: inherit;
}
/* A text kept on one line and cut with an ellipsis (clip, 1c.P round 3, the prototype's ÄTA list): the notes at
   --col-clip (110 px since T2.191) and the title at --col-clip-wide (180 px), with the whole text in the cell's title
   and in the row that folds out (round 7), so that it is never only for the mouse. A fixed column (600-1279 px) is
   narrower, so the text is cut at its width. On a phone's card the text wraps as every text does. */
.ui-table .ui-clip {
  display: block;
  max-width: var(--col-clip);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ui-table .ui-clip-wide {
  max-width: var(--col-clip-wide);
}
/* The table with a shorter title (ui-table-short-title, D-TAB-23, 1c.3.0a): the ÄTA list's title is cut at its own
   --table-short-title-clip, and its fixed Rubrik column (600-1279 px) has its own --table-short-title-fixed, so that the
   list with K93's whole headings fits as before, on two lines; the shared --col-clip-wide and --table-fixed-2 are the other tables'. */
.ui-table-short-title {
  --col-clip-wide: var(--table-short-title-clip);
  --table-fixed-2: var(--table-short-title-fixed);
}
/* and its title breaks over at most --table-short-title-lines lines and is cut with an ellipsis only after the last one
   (never one cut line; a word is never broken, the wrap is the cell's own), the same clamp as the side menu's labels, from 600 px (a phone's card wraps as every text does).
   width: max-content keeps the column's least width at the title's cut width, as when the title stood on one line. */
@media screen and (min-width: 600px) {
  .ui-table-short-title .ui-clip-wide {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--table-short-title-lines);
    white-space: normal;
    width: max-content;
  }
}
/* (a column is fixed only from 600 to 1279 px; from 1280 px the clip's own width holds, round 6) */
@media screen and (min-width: 600px) and (max-width: 1279px) {
  .ui-table td.ui-table-fixed .ui-clip {
    max-width: 100%;
  }
}
/* A text in at most --cell-lines lines (lines, K39 v3: the supplier's note): cut at a word with an ellipsis by
   components.js, never inside a word, with the whole text in the cell's title and in the post that folds out, so that
   it is reached without hovering; without JavaScript the lines are only cut. */
.ui-table .ui-lines {
  display: block;
  max-height: calc(var(--cell-lines) * 1lh);
  overflow: hidden;
}
/* A part of a cell's second line (|cell_parts, K39 v3): an organisation number, a phone number or an e-mail address is
   never broken inside it, the line breaks between the parts, and a part wider than its room is cut with an ellipsis;
   an e-mail address (ui-cell-email) has itself whole in its title and in the post that folds out (T2.178). */
.ui-table .ui-cell-part {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: top;
}
.ui-table .ui-cell-address {
  display: inline;
  white-space: normal;
}
.ui-table .ui-cell-piece {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: top;
}
/* Below iPad landscape the second line under a name, and one with an address, does not widen its column: the column
   is as wide as the rest of its content gives, and a part that does not fit is cut (the page never scrolls sideways). */
@media (max-width: 1179px) {
  .ui-table td.ui-cell-identity > .ui-cell-detail,
  .ui-table .ui-cell-sub:has(> .ui-cell-address),
  .ui-table .ui-cell-sub:has(> .ui-cell-email) {
    contain: inline-size;
  }
  /* A text in at most --cell-lines lines gives its room to the columns beside it (the pilot session 11/11: the stamp of
     who changed it stays whole and the note is cut): its column is --cell-lines-min wide where the table is short of
     room, and the text is cut at a word with an ellipsis as before. */
  .ui-table .ui-lines {
    contain: inline-size;
    min-width: var(--cell-lines-min);
  }
}
/* The second line of a column kept on one line (nowrap, as the supplier's Kategori) breaks between its parts. */
.ui-table td.ui-nowrap .ui-cell-sub {
  white-space: normal;
}
/* A badge under a name (the identity's tags, such as "Ny · ej i <system>") below iPad landscape: as wide as its words
   where the column has room, and else on two lines between its words, so that it never widens the list beyond the page
   (K39 v3, 820 px: the page never scrolls sideways). A word is never broken. */
@media (max-width: 1179px) {
  .ui-table td.ui-cell-identity .ui-cell-tags .ui-badge {
    width: fit-content;
    overflow-wrap: normal;
  }
}
/* The stamp of who changed it in a cell (an entry's stamp, the source stamp's variant by, Björn 11/11, K39 v3): a box
   that is never broken inside its name or its date (the pilot session 11/11): on one line, symbol, name and date, and
   when the column's width from its content does not hold that, on two lines in the same box, the name on the first and
   the date on the second, never three. The symbol stands on the first line. */
.ui-table .ui-cell-entry > .ui-source-stamp {
  align-items: flex-start;
  white-space: normal;
  text-align: left;
  vertical-align: top;
}
/* An entry's text for a phone's card only (card), such as the stamp's line in place of the date and the name. */
.ui-table .ui-cell-card {
  display: none;
}
/* A value that no longer is watched, in grey, as the prototype's Svar senast of an ÄTA that is not sent (quiet). */
.ui-table td.ui-text-quiet {
  color: var(--color-text-3);
}
/* A choice in a table's cell (a column of kind buttons, 1g.8c.5c, K58 question 2 B, D-TAB-31): Ledig and Arbetar side
   by side and never broken, on the row's middle line, as every cell of the row is (vertical-align: middle, K58 question
   1 B); a row without a choice has its value as plain text in the second text colour. */
.ui-table .ui-cell-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--cell-buttons-gap);
}
.ui-table .ui-cell-buttons-text {
  color: var(--cell-buttons-text);
}
/* A row that applies under the row above it (T19.7, K117): a setting under the one it depends on, its first cell
   indented, on a phone's card too. */
.ui-table td.ui-cell-child,
.ui-table th.ui-cell-child {
  padding-inline-start: var(--table-child-indent);
}
/* A short text on a line of its own before a cell's link (leads, D-INST-1): Grundinställning or Inställd av over the
   link Begär ändring in the settings' column Ändras, so that the column says where a setting is changed. */
.ui-table .ui-cell-lead {
  display: block;
}
/* The items of a row that folds out that only a phone's card needs, since the card leaves their columns out (phone). */
.ui-row-more-phone {
  display: none;
}
/* An amount that is a link (1b.3, ui-amount-link) has the grid's rule (P.0 Prognos, #493): a small arrow before it in
   the link's colour, as the prototype's ▸, the figure in the text's colour (a negative one red) and no underline; the
   link's colour when the pointer is over it or it has the focus. The arrow is seen without hovering, so that it holds
   with a finger on an iPad. The same values as .ui-grid-link, so that the two can become one class (T2.45). A name or
   a number that leads on keeps the link's look. */
.ui-table td > a.ui-amount-link {
  color: inherit;
  text-decoration: none;
}
.ui-table td > a.ui-amount-link::before {
  content: "";
  display: inline-block;
  flex: none;
  margin-right: var(--space-3);
  border-top: var(--space-2) solid transparent;
  border-bottom: var(--space-2) solid transparent;
  border-left: var(--space-3) solid var(--color-link);
}
.ui-table td:not(.ui-neg, .ui-better) > a.ui-amount-link:hover,
.ui-table td:not(.ui-neg, .ui-better) > a.ui-amount-link:focus-visible {
  color: var(--color-link);
}
/* A ledger table (ledger, ui-table-ledger, T2.45 omgång 5), the bookkeeping's tables as the project report and its detail
   list: an amount that opens has no mark at rest, no arrow and no line, as the prototype's rapportTable (its dotted line
   means the source, not a link; the pilot session 1/11), and is underlined when the pointer is over it or it has the
   focus, with the pointer's hand; the focus ring shows with the keyboard. A short figure is still a tap target. The
   arrow stays in cards and lists. With a mouse the rows are as low as the prototype's (--table-row-min-fine); with touch
   they keep the tap target (T2.7, pointer: coarse). */
.ui-table-ledger td > a.ui-amount-link::before {
  content: none;
}
.ui-table-ledger td > a.ui-amount-link {
  min-width: var(--target-min);
  cursor: pointer;
}
.ui-table-ledger td > a.ui-amount-link:hover,
.ui-table-ledger td > a.ui-amount-link:focus-visible {
  text-decoration: underline;
}
@media (pointer: fine) {
  /* A link no longer makes its row higher than the text and the cell's own air: a summary row as the prototype's td
     (8 px over and under), a detail row as its tr.det (4 px). */
  .ui-table-ledger td > a:only-child {
    min-height: var(--table-row-min-fine);
  }
  .ui-table-ledger tr.ui-row-minor td > a:only-child {
    margin: calc(-1 * var(--space-2)) 0;
    padding: var(--space-2) 0;
  }
}
/* With touch, and on a computer that also has a touch screen (any-pointer: coarse, G1 of #499): every link keeps the tap
   target, and a row of detail gets the air of an ordinary row, so that its link of 44 px fills the row and the links
   of two rows in a row never overlap (Bör 1). An amount that opens has the colour of a link (--drill-marker-touch),
   without a line and without the arrow, since there is no hover to show it (the pilot session 1/11, level 2, Bör 2). */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-table-ledger td > a:only-child {
    min-height: var(--target-min);
  }
  /* tbody: before the rule for a row of detail further down, whatever their order */
  .ui-table tbody tr.ui-row-minor td {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }
  .ui-table-ledger tr.ui-row-minor td > a:only-child {
    margin: calc(-1 * var(--space-4)) 0;
    padding: var(--space-4) 0;
  }
  .ui-table-ledger td > a.ui-amount-link {
    color: var(--drill-marker-touch);
  }
  /* A negative amount stays red, and a saving green, as every such amount (P.0.17a omgång 2: the portfolio's list). */
  .ui-table-ledger td.ui-neg > a.ui-amount-link,
  .ui-table-ledger td.ui-better > a.ui-amount-link {
    color: inherit;
  }
}
/* An amount with a second line under it (ui-cell-stack): the arrow stands left of the two, in their middle. */
.ui-table td > a.ui-amount-link.ui-cell-stack {
  position: relative;
}
.ui-table td > a.ui-amount-link.ui-cell-stack::before {
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: calc(-1 * var(--space-2));
}
/* A row of detail (minor, T2.45), as the project report's voucher rows, the prototype's tr.det: smaller and grey, closer,
   with a dotted line under it and the first column a step in; a negative amount stays red. A subtotal with indent has
   its first column empty, as the detail list's Summa konto. A link in such a row keeps its tap target (T2.7). */
.ui-table tr.ui-row-minor td {
  font-size: var(--text-sm);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: var(--line-thin) dotted var(--color-border-soft);
}
.ui-table tr.ui-row-minor td:not(.ui-neg) {
  color: var(--color-text-2);
}
.ui-table tr.ui-row-minor td:first-child {
  padding-left: calc(2 * var(--space-6));
}
/* A column whose figures carry the table, in bold, as the living budget's Levande budget (P.0) and the start page's
   Resultat (P.0.17a). Only its cells: the header keeps the head row's weight, as every header cell does
   (docs/granskningslista.md, Dokument och tabeller). */
.ui-table td.ui-col-strong {
  font-weight: var(--weight-bold);
}
/* A second line under an amount, smaller and grey, such as the forecast's version (1h.6); in a link the two lines are
   one tap target. */
.ui-table .ui-cell-detail {
  display: block;
  white-space: normal; /* a reason under an amount wraps in a narrow column, such as "23 258,95 när godkänd" (1c.P) */
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-3);
}
/* The second line as a warning (detail_tones, 1c.12b): the warning's text with the signals' dot before it, as
   "12 089 kr över · 300 %" under Fakturor mot ÄTA; the words say it, so the colour is never the only sign, and the
   amount over it keeps its place at the right. */
.ui-table .ui-cell-detail-warning {
  color: var(--color-warning-text);
}
.ui-table .ui-cell-detail-warning::before {
  content: "";
  display: inline-block;
  width: var(--signal-dot);
  height: var(--signal-dot);
  margin-right: var(--space-2);
  border-radius: var(--radius-round);
  background: var(--signal-warning);
  vertical-align: middle;
}
.ui-table td > a.ui-cell-stack {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
/* A text with a second line in its link (stack, P.0.19.1): the lines at the left, the number first and the name, whole
   and wrapping, under it. The link is one tap target of --target-min as the amount's. */
.ui-table td:not(.ui-num) > a.ui-cell-stack {
  align-items: flex-start;
}
/* A cell with a main line and a second line (T2.47), as the prototype's supplier list: the main line in the text's weight (only
   the name that is the row's link is in bold, below), an optional
   status badge after it and the second line under it, smaller and grey. Several entries in a cell, such as the contact
   people, stand one under the other with a little air between. */
.ui-cell-entry + .ui-cell-entry {
  margin-top: var(--space-3);
}
.ui-cell-main {
  font-weight: var(--weight-regular);
  color: var(--color-text);
}
.ui-cell-note {
  font-weight: var(--weight-regular);
  color: var(--color-text-3);
}
.ui-cell-entry .ui-badge {
  margin-left: var(--space-3);
  vertical-align: middle;
}
/* An entry that is only a badge (Kontroll, K39 v3) has no air before it: the column is as wide as the badge. */
.ui-cell-entry > .ui-cell-main:empty + .ui-badge {
  margin-left: 0;
}
.ui-cell-sub {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-3);
}
/* An identity whose name is its main line (main on the column, T2.47) is in bold, as the main line of the other cells. */
.ui-table a.ui-row-id.ui-cell-main {
  font-weight: var(--weight-strong);
}
/* A link in a cell is used only where the cell leads somewhere else than the row's own page, and then it is discreet
   (quiet, T2.47): the text's colour with a thin line in the border's colour, and the action colour when the pointer is
   over it or it has the focus. */
.ui-table-quiet td a:not(.ui-row-id, .ui-number-link) {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: var(--line-thin);
  text-decoration-color: var(--color-border-strong);
}
.ui-table-quiet td a:not(.ui-row-id, .ui-number-link):focus-visible {
  color: var(--color-action);
  text-decoration-color: currentcolor;
}
@media (hover: hover) {
  .ui-table-quiet td a:not(.ui-row-id, .ui-number-link):hover {
    color: var(--color-action);
    text-decoration-color: currentcolor;
  }
}
/* A row that folds out (1c.P, Björn 31/10, the tables' rule that replaces the pencil). The row's identity is its
   number in a column of its own, such as an ÄTA's Ä1, the number link (number_link, T2.42: the link's colour, underlined
   at hover and focus, not bold; 1c.P round 3), which leads to the row's own page; the name beside it is plain text, and only where there is no number,
   as for a supplier, is the name the link. Never the arrow, which is an amount's (1b.3). The chevron before the
   number, in muted grey, folds out the row under it with what has no column, and turns a quarter when it is out; a
   click or tap anywhere else on the row does the same (components.js). Never a ▸, which says "open what the amount is
   made of". The chevron and the link are --row-control-min, as the box that chooses the row (.ui-row-select): the
   prototype's size with a mouse and the tap target, 44 px, with touch (tokens.css, T2.67), so that they hold with a
   finger on an iPad, and nothing hangs on hovering: the background under a pointer is a hint only. In a number column the chevron
   stands at the row's start and the number at the column's right edge. A cancelled row is grey, its identity too. */
.ui-table .ui-row-lead {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: calc(-1 * var(--space-4)) 0;
}
.ui-table td.ui-num .ui-row-lead {
  justify-content: space-between;
}
.ui-table .ui-row-id {
  display: inline-flex;
  align-items: center;
  min-height: var(--row-control-min);
  min-width: var(--row-control-min);
}
.ui-table td.ui-num .ui-row-id {
  justify-content: flex-end;
}
/* Air between the number and the column after it in a dense table, with its heading in line; in a table with the
   ordinary air (the ÄTA list since 1c.P round 3) the column's own 10 px is enough (round 5: the list fits 1366). */
.ui-table-dense th.ui-col-identity,
.ui-table-dense td.ui-cell-identity {
  padding-right: var(--space-7);
}
/* A row chosen for a form (P.0.4, the table's select_form): the box before the row's identity, as the prototype's in
   Sammanställning ÄTA. The label around it is the tap target, --row-control-min as the chevron's and the number's: the
   prototype's size with a mouse and 44 px with touch (tokens.css, P.0.4). A row that cannot be chosen keeps the room
   empty, so that the numbers stand in line. Never field width (granskningslistan). */
.ui-row-select {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: var(--row-control-min);
  min-height: var(--row-control-min);
  cursor: pointer;
}
.ui-row-select input {
  width: var(--check);
  height: var(--check);
  margin: 0;
  accent-color: var(--color-action);
  cursor: pointer;
}
span.ui-row-select {
  cursor: auto;
}
@media print {
  .ui-row-select {
    display: none;
  }
}
.ui-row-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: var(--row-control-min);
  min-height: var(--row-control-min);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-3);
  cursor: pointer;
}
.ui-row-toggle-icon {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast);
}
.ui-row-toggle[aria-expanded="true"] .ui-row-toggle-icon {
  transform: rotate(90deg);
}
/* The chevron with a visible label (a column of kind toggle, 1c.14b, D-FALT-5, K37 B and its model K43 in #825): the
   arrow and the column's label, such as Belopp, first in the row, for a table of fields whose worked out values stand
   under the row and in the sum row. The label is seen, never only on hover, 28 px high with a mouse and 44 px with
   touch (--row-control-min), the open one in the colour of action, and the values under it begin at the first field
   (--row-toggle-width). */
.ui-table th.ui-col-toggle,
.ui-table td.ui-cell-toggle {
  width: var(--row-toggle-width);
  white-space: nowrap;
}
.ui-table th.ui-col-toggle:first-child,
.ui-table td.ui-cell-toggle:first-child {
  padding-left: var(--space-2); /* the arrow's own air inside its symbol is the rest */
}
.ui-row-toggle.ui-row-toggle-labelled {
  justify-content: flex-start;
  box-sizing: border-box;
  gap: var(--space-2);
  width: var(--row-toggle-width);
  min-width: 0;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-row-toggle.ui-row-toggle-labelled[aria-expanded="true"] {
  color: var(--color-action);
  font-weight: var(--weight-strong);
}
/* The head of a row's folded card (card_head, 1c.14b, the model K43 in #825): only below 1180 px, where the table is
   cards; from 1180 px the arrow is its label. */
.ui-row-card-head,
.ui-row-card-figure {
  display: none;
}
/* What is worked out, under the arrow and in the sum row: figures that keep their digits in columns and on one line,
   with the margin's share after the margin. The sum row (facts) is its heading and the same grid of values, larger. */
.ui-row-more-figure {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* the worked out values stand in one row, a column each, at least --row-more-figure-min wide, so that the values under
   a row's arrow and the sums under them line up; in the cards below 1180 px they wrap into as many columns as fit */
.ui-row-more-list.ui-row-more-figures {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(var(--row-more-figure-min), max-content);
  justify-content: start;
}
@media (max-width: 1179px) {
  .ui-row-more-list.ui-row-more-figures {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(var(--row-more-figure-min), 1fr));
  }
}
.ui-table .ui-row-more-figure .ui-cell-detail {
  display: inline;
  margin-left: var(--space-2);
}
.ui-table tfoot .ui-row-total-facts td {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: var(--weight-regular);
}
.ui-sum-facts-title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
}
.ui-row-more-list.ui-sum-facts dt {
  font-weight: var(--weight-strong);
}
.ui-row-more-list.ui-sum-facts dd {
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
}
.ui-table tr.ui-row-add > td {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  padding-left: var(--row-more-indent);
}
/* The chevron, and the box that chooses the row, stand in a column of their own before the row's identity, and the
   badges and the second line under it begin in the name's left edge and never to the left of it (Björn 11/11, K39 v3,
   the rule of 7/11 point 1; docs/granskningslista.md): each control before the name moves them in by its own width and
   the lead's gap. Measured in the catalogue (e2e/catalog.spec.ts, at most 2 px). In a number column the number stands
   at the right and its second line with it. */
.ui-table td.ui-cell-identity:has(> .ui-row-lead > .ui-row-toggle),
.ui-table td.ui-cell-identity:has(> .ui-row-lead > .ui-row-select) {
  --row-lead-controls: 1;
}
.ui-table td.ui-cell-identity:has(> .ui-row-lead > .ui-row-select):has(> .ui-row-lead > .ui-row-toggle) {
  --row-lead-controls: 2;
}
/* The badges after a name (tags, Björn 11/11, K39 v3: Inaktiv): on the name's line, after it, and when they do not fit
   there, under the name in its left edge; the name and its badges are one box beside the chevron. */
.ui-table .ui-row-name {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-3);
  min-width: 0;
}
/* A post's state after its name (a tag with fact, Björn 11/11, K39 v3, punkt 10): a fact about the post, muted text
   without box or dot, so that it never looks like a judgement's badge (Ok, Varning, Risk). */
.ui-table .ui-row-fact {
  color: var(--row-fact-text);
  font-size: var(--row-fact-size);
  font-weight: var(--weight-regular);
}
.ui-table .ui-row-name > .ui-cell-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: 100%;
}
.ui-table td.ui-cell-identity:not(.ui-num) > :is(.ui-cell-tags, .ui-cell-detail) {
  margin-left: calc(var(--row-lead-controls, 0) * (var(--row-control-min) + var(--space-1)));
}
.ui-table tr[data-expands] {
  cursor: pointer;
}
@media (hover: hover) {
  .ui-table tbody tr[data-expands]:not(.ui-row-expanded):hover > td {
    background: var(--color-surface-2);
  }
}
.ui-table tr.ui-row-expanded > td {
  border-bottom-color: transparent;
}
/* A table without rows, with the text empty_row (P.0.18, the prototype's muted "Inga."): one row over the whole width. */
.ui-table tr.ui-table-empty > td {
  color: var(--color-text-2);
  text-align: left;
}
/* The row under (T2.105, Björn's rules 1, 2 and 4 of K39 7/11): what has no column stands on the row's own surface and
   is never greyed, in a card with a thin line, and begins at the left edge of the row's name, after the chevron and the
   box that chooses the row (--row-more-indent; components.js measures it when the row folds out, so that it holds in
   every table, and the value here is the one without JavaScript). Each label is in grey over its value, in rows of at
   least --field-row-min, a list (the changes of Svar senast) in the whole width. The open post has a line at its left
   in the colour of action, on the row and on the row under. It keeps to the left of the box when the table scrolls
   sideways, as wide as the screen at most. The heading is the panel's (layout="panel") and is not shown in a row.
   On a surface narrower than --more-full-below (components.js sets ui-row-more-full, and a phone always) the card
   begins at the row's left edge and takes its whole width, since after the chevron it would be too narrow
   (pilotsessionen 9/11). */
.ui-table-expands {
  --row-more-indent: calc(var(--space-6) + var(--row-control-min) + var(--space-1));
}
.ui-table-expands.ui-table-chooses {
  --row-more-indent: calc(var(--space-6) + 2 * var(--row-control-min) + 2 * var(--space-1));
}
/* after a labelled chevron (kind toggle, 1c.14b) the values begin at the first field, as the model K43 */
.ui-table-expands:has(> thead .ui-col-toggle) {
  --row-more-indent: calc(var(--space-2) + var(--row-toggle-width) + var(--space-2));
}
.ui-table tr.ui-row-more > td {
  padding: 0;
  background: var(--more-surface);
  cursor: auto;
}
.ui-table tr.ui-row-expanded > td:first-child,
.ui-table tr.ui-row-expanded + tr.ui-row-more > td {
  box-shadow: inset var(--more-open-line) 0 0 var(--more-open-edge);
}
.ui-row-more-body {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  max-width: var(--row-more-max, min(100%, calc(100vw - var(--space-11))));
  padding: var(--more-air);
  padding-left: var(--row-more-indent);
  white-space: normal;
}
.ui-table tr.ui-row-more.ui-row-more-full .ui-row-more-body {
  padding-left: var(--more-full-edge);
}
.ui-row-more-title {
  display: none;
}
.ui-row-more-card {
  padding: var(--more-card-pad);
  border: var(--line-thin) solid var(--more-card-border);
  border-radius: var(--more-card-radius);
  background: var(--more-surface);
}
.ui-row-more-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--field-row-min), 1fr));
  gap: var(--space-4) var(--space-9);
  margin: 0;
  padding: 0;
}
.ui-row-more-item {
  min-width: 0;
}
.ui-row-more-wide {
  grid-column: 1 / -1;
}
.ui-row-more-list dt {
  font-size: var(--text-xs);
  color: var(--color-text-3);
}
.ui-row-more-list dd {
  margin: 0;
  overflow-wrap: break-word;
}
.ui-row-more-list ul {
  margin: 0;
  padding-left: var(--space-7);
}
/* The row that folds out in a panel (layout="panel", T2.105, K39 v2 B): where the list's surface is at least
   --more-panel-from wide (components.js sets data-more-mode), the chosen post stands in a panel to the right of the
   list, one at a time, with its name as the panel's heading, and the list keeps only its columns with beside; the
   chosen row is lifted with the soft colour of action and has the line at its left, and the panel has the line too.
   The panel stays in sight while the list scrolls, and scrolls in itself only when it is higher than the screen.
   Under the width, and on a phone, the row folds out under itself as above. */
.ui-more-split.is-open[data-more-mode="panel"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--more-panel-share));
  gap: var(--more-panel-gap);
  align-items: start;
}
.ui-more-split.is-open[data-more-mode="panel"] .ui-col-aside {
  display: none;
}
/* With the panel open the list fills its column, so that the list and the panel stand beside each other with
   --more-panel-gap between them and never an empty field (D-KORT-7, T2.178): a table in the page's own column keeps
   its columns' width (D-TAB-32), but here the column is the list's share of the split. */
.ui-more-split.is-open[data-more-mode="panel"] > .ui-more-list {
  min-width: 0;
}
.ui-more-split.is-open[data-more-mode="panel"] > .ui-more-list .ui-table {
  width: 100%;
}
.ui-more-split[data-more-mode="panel"] .ui-table tr.ui-row-expanded > td {
  background: var(--more-chosen-surface);
  border-bottom-color: var(--color-border-soft);
}
.ui-more-panel {
  position: sticky;
  top: var(--more-panel-top);
  min-width: 0;
  max-height: calc(100vh - 2 * var(--more-panel-top));
  overflow-y: auto;
  padding: var(--more-panel-pad);
  border: var(--line-thin) solid var(--more-card-border);
  border-left: var(--more-open-line) solid var(--more-open-edge);
  background: var(--more-surface);
}
.ui-more-panel[hidden] {
  display: none;
}
.ui-more-panel:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}
.ui-more-panel .ui-row-more-body {
  position: static;
  max-width: none;
  padding: 0;
}
.ui-more-panel .ui-row-more-title {
  display: block;
  margin: 0 0 var(--space-6);
  padding-right: var(--target-min);
  font-family: var(--font-display);
  font-size: var(--more-panel-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
}
.ui-more-panel .ui-row-more-phone {
  display: block;
}
/* In the panel the post's fields stand directly on the panel's surface, with no card of their own inside it: the
   panel is the card (pilotsessionen 9/11, no frame inside the frame). */
.ui-more-panel .ui-row-more-card {
  padding: 0;
  border: 0;
  border-radius: 0;
}
/* The files under the post's list (more_files, 1f.13, D-TAB-28): in the same list, the file cards after the facts with
   the list's own gap, never a card of their own. */
.ui-row-more-files {
  margin-top: var(--more-files-gap);
}
/* The post in sections (more_cards, 1f.L.1, K39 v2 B): the section cards stand on the row's own surface with no frame
   around them (no frame inside a frame), under the post's second line; Ring and Mejla stand first where the post folds
   out under its row under a phone's width only (D-KNAPP-7, T2.178), and never in the panel: from 600 px, and in the
   panel, the card Kontakt has the phones and addresses as links (D-POST-12). */
.ui-row-more-sections {
  display: grid;
  gap: var(--space-6);
}
.ui-row-more-lead {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-more-panel .ui-row-more-call {
  display: none;
}
/* Under its row the post's Ring and Mejla stand without the contact person's name and role over them: the row shows
   the first contact in Kontaktperson at every width, a phone's card too, so the name stands in one place (Björn 11/11,
   K39 v3 rule (5), the pilot session's finding at 390 px). The buttons still say the name to a screen reader. */
.ui-row-more-call .ui-section-card-call-name {
  display: none;
}
/* Every item stands in one place (Björn 11/11, K39 v3; docs/granskningslista.md): where the post folds out under its
   row, the row has the name, the badge and Ändrad, and from 600 px the second line too, so the post draws them only in
   the panel, beside a list of the name and Kontroll, and the second line on a phone's card. The category after it
   (lead_panel) is the row's on a phone too. */
.ui-row-more-lead-panel {
  display: none;
}
.ui-more-panel .ui-row-more-lead-panel {
  display: inline;
}
@media (min-width: 600px) {
  .ui-table tr.ui-row-more .ui-row-more-lead,
  .ui-table tr.ui-row-more .ui-row-more-call,
  .ui-table tr.ui-row-more .ui-section-card-phone {
    display: none;
  }
}
/* In the panel the section cards stand in one column (D-POST-12, T2.178): side by side from 560 px a card is too narrow
   for an e-mail address on one line, and the panel is a column beside the list. */
.ui-more-panel .ui-section-cards-grid {
  grid-template-columns: minmax(0, 1fr);
}
/* The panel's head (Björn 11/11, K39 v3): the name, the badge after it on the name's line, where the badge stands in the
   row too, and the stamp of who changed it (more_stamp, the source stamp's variant by: a person's or a system's symbol,
   the name and the date, Björn 11/11) at the right before the close button. Under its row the post has no head: the row
   has all three. */
.ui-row-more-head {
  display: none;
}
.ui-more-panel .ui-row-more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-6);
  padding-right: var(--target-min);
}
.ui-row-more-head > .ui-source-stamp {
  flex: 0 1 auto;
  margin-left: auto;
}
.ui-more-panel .ui-row-more-head > .ui-row-more-title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding-right: 0;
}
/* The post's items as a fact list (layout="panel", |more_facts): an item with phone is drawn only on a phone's card
   and in the panel, where the list has no column for it, and one with cut only in the row under a row from 600 px,
   where the list cuts the cell it repeats (the whole title); the panel's heading and a phone's card have it whole. */
.ui-facts-row.ui-facts-phone,
.ui-facts-row.ui-facts-cut,
.ui-facts-row.ui-facts-panel {
  display: none;
}
.ui-more-panel .ui-facts-row.ui-facts-phone,
.ui-more-panel .ui-facts-row.ui-facts-panel {
  display: contents;
}
@media (min-width: 600px) {
  .ui-table tr.ui-row-more .ui-facts-row.ui-facts-cut {
    display: contents;
  }
}
@media (max-width: 599px) {
  .ui-table tr.ui-row-more .ui-facts-row.ui-facts-phone {
    display: contents;
  }
}
/* An item with portrait (fold on a column with wide_only="portrait", P.0.17c, the pilot session 13/11) is drawn only
   under iPad portrait, --bp-ipad-portrait (820 px), where its column is hidden; tests/test_design.py keeps the width
   equal to the token. */
@media (min-width: 820px) {
  .ui-facts-row.ui-facts-portrait {
    display: none;
  }
}
.ui-facts-lines {
  margin: 0;
  padding-left: var(--space-7);
}
.ui-more-panel-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-2);
  cursor: pointer;
}
.ui-more-panel-close-icon {
  width: var(--icon);
  height: var(--icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
/* In print the panel is not used (G1 on T2.105): components.js takes the open post back under its row when the page
   is printed, and here the list is one column again with every column back, so that nothing is left out and no
   right column is empty, also if the script has not run. */
@media print {
  .ui-more-panel {
    display: none;
  }
  .ui-more-split.is-open[data-more-mode="panel"] {
    display: block;
  }
  .ui-more-split.is-open[data-more-mode="panel"] .ui-col-aside {
    display: table-cell;
  }
}
/* Without JavaScript the chevron cannot fold anything: the rows under are shown and the chevrons are not, by
   noscript.css, which base.html loads in noscript (the media feature scripting is not set by every browser that has
   scripts off). */
@media print {
  .ui-row-toggle {
    display: none;
  }
}
.ui-table tr.ui-row-muted > td,
.ui-table tr.ui-row-muted .ui-row-id {
  color: var(--color-text-3);
}
/* A row the links moved after its predecessors in the schedule's edit mode (1g.5b, the prototype's tr.tpflytt), with the
   line under the table that names the rows, so that the tone is never the only sign; and a field with an error there
   (the prototype's input.fel), with aria-invalid and the warning under the table. The row's fields take the tone too,
   as the prototype's fields on a tr.tpflytt, whose own surface is transparent, so the row reads as one. */
.ui-table tr.ui-row-moved > td,
.ui-table tr.ui-row-moved .ui-input {
  background-color: var(--table-row-moved-surface);
}
.ui-table td.ui-cell-invalid .ui-input {
  --input-edge: var(--table-cell-invalid-border);
  background-color: var(--table-cell-invalid-surface);
}
/* and its badge toned down, as the prototype's makulerad .chip (dashboard_mall.html, opacity .7, 1c.P round 7) */
.ui-table tr.ui-row-muted .ui-badge {
  opacity: var(--opacity-muted);
}
/* The heading over a run of columns (group, 1c.P), such as Prognos over Intäkt and Kostnad: a row of its own above the
   header row, with a line under the heading as wide as its columns. It does not stay at the top when the page scrolls;
   the header row under it does. */
.ui-table .ui-table-groups > th,
.ui-table .ui-table-groups > td {
  position: static;
  border-bottom: 0;
  padding-bottom: var(--space-2);
}
.ui-table .ui-table-groups > td.ui-table-fixed {
  position: sticky;
}
.ui-table .ui-table-groups > th.ui-table-group {
  text-align: center;
  border-bottom: var(--line-thin) solid var(--color-border-strong);
}
/* The way into a row (T2.47): a column with only a pen, the row's own link of the tap target's size. */
.ui-table th.ui-col-open,
.ui-table td.ui-cell-open {
  width: var(--target-min);
}
.ui-table td.ui-cell-open {
  padding-right: var(--space-4);
}
.ui-table td.ui-cell-open > a.ui-row-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--target-min);
  min-width: var(--target-min);
  height: var(--target-min);
  margin: calc(-1 * var(--space-4)) 0;
  padding: 0;
  color: var(--color-action);
  border-radius: var(--radius-sm);
}
@media (hover: hover) {
  .ui-table td.ui-cell-open > a.ui-row-open:hover {
    background: var(--color-action-soft);
  }
}
/* A link in a cell is used only where the cell leads somewhere else than the row's own page, and then it is discreet
   (quiet, T2.47): the text's colour with a thin line in the border's colour, and the action colour when the pointer is
   over it or it has the focus. */
.ui-table-quiet td a:not(.ui-row-open) {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: var(--line-thin);
  text-decoration-color: var(--color-border-strong);
}
.ui-table-quiet td a:not(.ui-row-open):focus-visible {
  color: var(--color-action);
  text-decoration-color: currentcolor;
}
@media (hover: hover) {
  .ui-table-quiet td a:not(.ui-row-open):hover {
    color: var(--color-action);
    text-decoration-color: currentcolor;
  }
}
/* The accumulated result month by month in a cell (1h.6), drawn on the server: as high as a line of the table's text
   and the air around it, and as wide as its drawing. */
.ui-table .ui-trend {
  display: block;
  height: var(--space-10);
  width: auto;
}
/* A column header that sorts the table (1h.5): a link in the header, at a tap target's height like a link in a cell,
   with a mark for the order. The marks are two small triangles, grey while the column is not the sorted one, and in
   the action colour on the side the order goes; aria-sort on the header says the same to a screen reader. The mark
   stands where the label ends (T2.88a, the owner 4/11): after the last word, which it keeps on its line
   (ui-sort-end), so that a label on two lines has the mark after its last word, in a column aligned left or right. */
.ui-table th .ui-sort {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  margin: calc(-1 * var(--space-4)) 0;
  padding: var(--space-4) 0;
  color: inherit;
  text-decoration: none;
}
/* With touch, and on a computer that also has a touch screen (any-pointer: coarse), a short header's link, as Marg. for
   Marginal, is a tap target of --target-min in width too, as it is in height; with a mouse it keeps the width of its
   label, so that no header moves on a computer. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-table th .ui-sort {
    min-width: var(--target-min);
  }
}
/* In a table with sorting the headers stand in the middle of the row, as the links do, so that a header that is not
   a link is on the same line. */
.ui-table thead:has(.ui-sort) th {
  vertical-align: middle;
}
.ui-table th .ui-sort:hover,
.ui-table th[aria-sort] .ui-sort {
  color: var(--color-text);
}
.ui-sort-end {
  white-space: nowrap;
}
.ui-sort-mark {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-inline-start: var(--space-3);
  vertical-align: middle;
}
.ui-sort-mark::before,
.ui-sort-mark::after {
  content: "";
  width: var(--space-4);
  height: var(--space-3);
  background: var(--color-border-strong);
}
.ui-sort-mark::before {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.ui-sort-mark::after {
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.ui-table th[aria-sort="ascending"] .ui-sort-mark::before,
.ui-table th[aria-sort="descending"] .ui-sort-mark::after {
  background: var(--color-action);
}
.ui-table th[aria-sort="ascending"] .ui-sort-mark::after,
.ui-table th[aria-sort="descending"] .ui-sort-mark::before {
  visibility: hidden;
}
/* The bar Sortera efter above a sortable table (1h.7): on mobile the rows are cards without the header row, so the
   order is chosen here, with the picker and a button that turns it. Hidden from 600 px, where the headers sort. */
.ui-table-sortbar {
  display: none;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.ui-table-sortbar .ui-picker {
  flex: 1 1 auto;
}
.ui-table-sortbar-preview {
  display: flex;
}
.ui-table .ui-row-group td {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  padding-top: var(--space-7);
  border-bottom-color: var(--color-border);
}
.ui-table tfoot td {
  font-weight: var(--weight-heading);
  border-top: var(--line-thin) solid var(--color-border-strong);
  border-bottom: 0;
}
.ui-table tfoot .ui-row-total td {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  border-top-width: var(--line-medium);
}
.ui-table .ui-row-subtotal td {
  font-weight: var(--weight-heading);
  border-bottom: var(--line-thin) solid var(--color-border-strong);
}
.ui-table .ui-col-reference {
  color: var(--color-text-3);
}
.ui-table .ui-cell-editable {
  background: var(--color-cell-editable);
}
/* A field in a cell keeps the tap target's height: the heavy views are edited with a finger on an iPad (T2.7). */
.ui-table .ui-cell-editable .ui-input {
  padding: calc(var(--space-1) + var(--line-thin)) calc(var(--space-3) + var(--line-thin));
}
/* The placeholder of a box in a table is written like the headers (T2.9, T2.122): plain writing, never capitals, with
   the same size and weight, grey (Ks, Konto, Specifikation, Enh, Samma). The box fills the cell's content width, so its
   edge is the same as the header's text edge on the side the column is aligned to. */
.ui-table .ui-input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-size: var(--text-col-head);
  font-weight: var(--weight-strong);
  color: var(--color-text-3);
  opacity: 1;
}
/* A cell with a field has no air of its own above and below, so that the row is the field's height. */
.ui-table td.ui-cell-field {
  padding-top: 0;
  padding-bottom: 0;
}

/* Mobile: the table becomes cards in the same order as the list, with the bar Sortera efter above them. */
@media (max-width: 599px) {
  .ui-table-sortbar {
    display: flex;
  }
  .ui-table,
  .ui-table tbody,
  .ui-table tfoot,
  .ui-table tr,
  .ui-table td,
  .ui-table :where(tbody) th[scope="row"] {
    display: block;
  }
  .ui-table thead {
    display: none;
  }
  .ui-table tr {
    border-bottom: var(--line-thin) solid var(--color-border);
    padding: var(--space-4) 0;
  }
  .ui-table td,
  .ui-table td:first-child,
  .ui-table :where(tbody) th[scope="row"],
  .ui-table :where(tbody) th[scope="row"]:first-child {
    display: flex;
    justify-content: space-between;
    gap: var(--space-6);
    border: 0;
    padding: var(--space-1) var(--space-4);
    overflow-wrap: break-word;
  }
  .ui-table td.ui-text-whole {
    overflow-wrap: break-word; /* a card has no column to widen: a word wider than it breaks, as before (T12.3) */
  }
  /* Grundinställning or Inställd av over the link Begär ändring (leads, D-INST-1): beside the label on the card, and the
     link on a line of its own under it, both at the card's right as the other values */
  .ui-table td:has(> .ui-cell-lead) {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .ui-table td > .ui-cell-lead {
    flex: 1 1 auto;
    text-align: end;
  }
  .ui-table td > .ui-cell-lead ~ a {
    flex-basis: 100%;
    text-align: end;
  }
  /* A text with badges after it (ui-cell-badges, G1 of K129; not a cell where the badges stand first, ui-cell-badges-first,
     such as the status column, which is left as it was): the label, the text and the badges on one line, from the
     left, and the second line (ui-cell-detail) on a line of its own, so that the badge never grows the card's height.
     The card's gap is the air before the badges, so the margin of the desktop rule is not added to it. */
  .ui-table td:has(> .ui-cell-badges:not(.ui-cell-badges-first)) {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    row-gap: 0;
  }
  .ui-table td:has(> .ui-cell-badges:not(.ui-cell-badges-first)) > .ui-cell-detail {
    flex-basis: 100%;
    margin-top: var(--space-1);
  }
  .ui-table td > .ui-cell-badges {
    margin-inline-start: 0;
  }
  /* A row under another (child, T19.7) keeps its indent on the card, after the card's own edge */
  .ui-table td.ui-cell-child:first-child {
    padding-inline-start: calc(var(--space-4) + var(--table-child-indent));
  }
  .ui-table td::before,
  .ui-table :where(tbody) th[scope="row"]::before {
    content: attr(data-label);
    color: var(--color-text-3);
    font-size: var(--text-xs);
    text-align: left;
    flex: 0 0 auto; /* the label keeps its width beside a long value, which wraps instead */
    max-width: 45%;
  }
  .ui-table td:first-child::before,
  .ui-table :where(tbody) th[scope="row"]:first-child::before {
    content: none;
  }
  /* A row's cross (a column of kind remove, 1g.8b2) stands at the card's right, without its label, which is only read */
  .ui-table td.ui-cell-remove {
    width: auto;
    justify-content: flex-end;
  }
  .ui-table td.ui-cell-remove::before,
  .ui-table td.ui-cell-toggle::before {
    content: none; /* the chevron's own label (Mer) is the only Mer on the card */
  }
  /* An amount with a second line, such as the margin and its percent (1c.11), stands together at the right. */
  .ui-table td:has(> .ui-cell-detail)::before {
    margin-right: auto;
  }
  .ui-table td > a:only-child {
    margin: calc(-1 * var(--space-1)) 0;
    padding: var(--space-1) 0;
  }
  /* The link of the column Ändras (where, D-INST-1), Här or Begär ändring: at the card's right as the other values, a tap
     target of --target-min that is laid over the line and adds no height of its own, so that a row with Här alone is as
     high as its label and its value and has no air under the link (Pilot-14 10.1x). The line's own height (1lh) is what
     the row keeps, and the target reaches half the rest above and below it. */
  .ui-table td.ui-cell-where > a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: var(--target-min);
    min-width: var(--target-min);
    margin-block: calc((1lh - var(--target-min)) / 2);
    padding: 0;
  }
  .ui-table td.ui-cell-field {
    align-items: center;
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
  }
  /* A cell with lines stands with its label over the lines, and the lines at the left. */
  .ui-table td.ui-cell-lines {
    flex-direction: column;
    gap: 0;
    text-align: left;
  }
  .ui-table caption {
    display: block;
  }
  .ui-table td:empty,
  .ui-table tfoot td:not(:first-child, .ui-num) {
    display: none;
  }
  .ui-table tfoot td,
  .ui-table tfoot .ui-row-total td {
    border: 0;
  }
  .ui-table tfoot tr {
    border-top: var(--line-medium) solid var(--color-border-strong);
    border-bottom: 0;
  }
  /* A row that folds out (1c.P): the identity and its chevron at the left of the card's first line, and the row under
     as the end of its card, with no line between them. */
  .ui-table td.ui-cell-identity {
    justify-content: flex-start;
  }
  .ui-table td.ui-num .ui-row-id {
    justify-content: flex-start;
  }
  .ui-table tr.ui-row-expanded {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .ui-table tr.ui-row-more {
    padding-top: 0;
  }
  .ui-table tr.ui-row-more > td {
    display: block;
    padding: 0;
  }
  .ui-table tr.ui-row-more > td::before {
    content: none;
  }
  .ui-row-more-body,
  .ui-table tr.ui-row-more.ui-row-more-full .ui-row-more-body {
    position: static;
    max-width: none;
    padding: 0 var(--space-4) var(--space-4);
  }
  /* the open post's line along the whole card, the row and the row under (T2.105) */
  .ui-table tr.ui-row-expanded,
  .ui-table tr.ui-row-expanded + tr.ui-row-more {
    box-shadow: inset var(--more-open-line) 0 0 var(--more-open-edge);
  }
  .ui-table tr.ui-row-expanded > td:first-child,
  .ui-table tr.ui-row-expanded + tr.ui-row-more > td {
    box-shadow: none;
  }
  .ui-row-more-phone {
    display: block;
  }
  .ui-table .ui-clip,
  .ui-table .ui-clip-wide {
    max-width: none;
    white-space: normal;
  }
}

/* A compact card on a phone (T2.42, compact): at most three lines, each a row of the cells that have that line, in the
   order of the columns, and a column without a line is left out. The first line leads with a number link and the text
   beside it; sep puts a dot before a cell, card_label the column's label before its value and a suffix stands after it
   ("44 d"). A negative amount is red as in the table, and the label and the dot stay grey.
   A line wraps and is never cut (D-TAB-36, Pilot-44 27/11, #3800): a line whose cells do not fit in the card goes on
   at the next visual line with whole cells (flex-wrap), and the card grows in height; no rule of the card hides its
   overflow, cuts a cell with an ellipsis or clamps its lines, and a cell without a value is empty and not drawn, nor its
   dot. The part beside the list (the @container rule from 1421 px above) wraps its lines the same way, and there a
   clip column keeps its decided ellipsis (D-TAB-15); on a phone the clip is lifted (.ui-table .ui-clip above). */
@media (max-width: 599px) {
  .ui-table-compact tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--space-3);
    padding: var(--space-4);
  }
  .ui-table-compact tr::before,
  .ui-table-compact tr::after {
    content: "";
    flex: 0 0 100%;
    height: 0;
  }
  .ui-table-compact tr::before {
    order: 15;
  }
  .ui-table-compact tr::after {
    order: 25;
  }
  .ui-table-compact td,
  .ui-table-compact td:first-child {
    display: block;
    padding: 0;
    width: auto;
    justify-content: flex-start;
    text-align: left;
    overflow-wrap: break-word;
  }
  .ui-table-compact td:not([data-line]) {
    display: none;
  }
  .ui-table-compact td[data-line="1"] {
    order: 10;
  }
  .ui-table-compact td[data-line="2"] {
    order: 20;
    color: var(--color-text-3);
  }
  .ui-table-compact td[data-line="3"] {
    order: 30;
  }
  .ui-table-compact td::before {
    content: none;
  }
  .ui-table-compact td:empty {
    display: none;
  }
  /* the row under has the card's own side padding already, so the post's card has the row's content edges (T2.105) */
  .ui-table-compact tr.ui-row-more .ui-row-more-body,
  .ui-table.ui-table-compact tr.ui-row-more.ui-row-more-full .ui-row-more-body {
    padding-right: 0;
    padding-left: 0;
  }
  /* A cell with lines in a compact card (T2.47): the first entry's main line only, on the card's line, with its note after
     it; the second lines and further entries are in the row that folds out. */
  .ui-table-compact td .ui-cell-entry {
    display: inline;
  }
  .ui-table-compact td .ui-cell-entry + .ui-cell-entry,
  .ui-table-compact td .ui-cell-sub,
  .ui-table-compact td.ui-cell-identity > .ui-cell-detail {
    display: none;
  }
  .ui-table-compact td.ui-cell-identity > .ui-cell-tags {
    padding-left: 0;
  }
  .ui-table-compact td.ui-cc-sep::before {
    content: "\00b7";
    margin-right: var(--space-3);
    color: var(--color-text-3);
  }
  .ui-table-compact td.ui-cc-label::before {
    content: attr(data-label);
    margin-right: var(--space-3);
    max-width: none;
    font-size: inherit;
    font-weight: var(--weight-regular);
    color: var(--color-text-3);
  }
  .ui-table-compact td[data-suffix]::after {
    content: attr(data-suffix);
  }
  /* The number link is a tap target of 44 x 44 px: the box is wider than a four-digit number, and the cell gives the width
     back to the text beside it with a negative margin, so that the number stays on the text's line and the name follows
     it closely. */
  .ui-table-compact td > a:only-child {
    min-width: var(--target-min);
    margin: calc(-1 * var(--space-2)) 0;
    padding: var(--space-2) 0;
  }
  /* The cell at the right end of its line (card_end, P.0.17c, K13's phone): it and what follows it on the line stand at
     the right, and a text that wraps on a line with such a cell takes the rest of the line and wraps in it, as the
     project's name beside its result and the ÄTA's title beside its status. */
  .ui-table-compact td.ui-cc-end {
    margin-left: auto;
  }
  .ui-table-compact tr:has(> td.ui-cc-end) > td.ui-text-wrap[data-line] {
    flex: 1 1 0;
    min-width: 0;
  }
  /* The first cell of a line (card_first, 1c.P round 3: the ÄTA's status before its date and amount). */
  .ui-table-compact td[data-line="1"].ui-cc-first {
    order: 9;
  }
  .ui-table-compact td[data-line="2"].ui-cc-first {
    order: 19;
  }
  .ui-table-compact td[data-line="3"].ui-cc-first {
    order: 29;
  }
  /* The chevron stands alone in its column on a phone's card too (Björn 11/11, K39 v3, punkt 4 in every width): the
     card's lines under the name, and the post that folds out under it, begin in the name's left edge, and the
     identity takes the chevron's width back to the card's edge. */
  .ui-table-compact tr[data-expands],
  .ui-table-compact tr[data-expands] + tr.ui-row-more {
    --card-lead: calc(var(--row-control-min) + var(--space-1));
    padding-left: calc(var(--space-4) + var(--card-lead));
  }
  .ui-table-compact tr[data-expands] > td.ui-cell-identity {
    margin-left: calc(-1 * var(--card-lead));
  }
  /* A row that is also chosen for a form (select_form, the ÄTA list) has the box before the chevron: both stand in the
     column, so that the lines under the name begin in the name's left edge there too (1f.L.1, e2e/ata-row-more.spec.ts). */
  .ui-table-compact.ui-table-chooses tr[data-expands],
  .ui-table-compact.ui-table-chooses tr[data-expands] + tr.ui-row-more {
    --card-lead: calc(2 * (var(--row-control-min) + var(--space-1)));
  }
  /* The last cell of a line at its right end (card_end, K39 v3: the supplier's Kontroll on the name's line, where the
     column stands in the list), also when it takes the rest of the line beside the identity. */
  .ui-table-compact td.ui-cc-end,
  .ui-table-compact tr > td.ui-cell-identity[data-line="1"] + td.ui-cc-end {
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
  }
  /* Beside such a cell the identity takes the rest of the line and its name breaks between its words, so that a long
     name, or the post's state after it, never pushes the badge off the name's line (1f.L.1, docs/granskningslista.md
     11/11 (4), measured in e2e/catalog.spec.ts at 390 px). */
  .ui-table-compact tr > td.ui-cell-identity[data-line="1"]:has(+ td.ui-cc-end) {
    flex: 1 1 0;
    min-width: 0;
  }
  /* A cell shown on a phone's card only when its row is folded out (card_open, Björn 11/11, K39 v3, punkt 9: the stamp of
     the latest change); the table keeps its column. */
  .ui-table-compact tr[data-expands]:not(.ui-row-expanded) > td.ui-cc-open {
    display: none;
  }
  /* An entry's text for a phone's card (card, K39 v3: the stamp's "Ändrad 8 nov av ..."), in place of its lines. */
  .ui-table-compact td .ui-cell-entry:has(> .ui-cell-card) > :not(.ui-cell-card) {
    display: none;
  }
  .ui-table-compact td .ui-cell-entry > .ui-cell-card {
    display: inline;
    color: var(--source-stamp-text);
    font-size: var(--source-stamp-by-size);
  }
  /* A row that folds out under a compact card (1c.P round 3): the row under is the end of its card, hidden until it
     folds out, and its one cell holds all the rest of the columns. */
  .ui-table-compact tr[hidden] {
    display: none;
  }
  .ui-table-compact tr.ui-row-more > td {
    display: block;
    flex: 1 1 100%;
    padding: 0;
    background: none;
  }
  /* The post under a card begins in the name's left edge, also after the box and the chevron of a chosen row (1f.L.1), so
     it has less width than the card, and a list of label and value beside each other did not fit it with a long word in a
     value (a side scroll at 390 px, e2e/ata-round-3.spec.ts). The card is its own container: its width is its room and not
     its content's, and where the label and the longest word do not fit beside each other the label stands over its value.
     A word is never broken for it (T2.97). */
  .ui-table-compact tr.ui-row-more .ui-row-more-card {
    container-type: inline-size;
  }
  @container (max-width: 230px) {
    .ui-table-compact tr.ui-row-more .ui-facts-list {
      grid-template-columns: minmax(0, 1fr);
      gap: 0;
    }
    .ui-table-compact tr.ui-row-more .ui-facts-value {
      padding-bottom: var(--facts-gap-y);
    }
  }
  .ui-table-compact td:has(> a.ui-number-link:only-child) {
    margin-right: calc(-1 * var(--space-7));
  }
  /* The text beside the identity on the card's first line (the ÄTA's title) takes the rest of the line and wraps at
     its words in it, so that every card has the same head, a short text and a long one, folded out or not
     (pilotsessionen 9/11 on T2.105); it goes under the identity only when its longest word does not fit beside it. */
  .ui-table-compact td.ui-cell-identity[data-line="1"] + td[data-line="1"] {
    flex: 1 1 0;
  }
  /* and stands on the number's line: the lead's baseline is the number's (an item in baseline alignment gives its
     flex container the baseline), not the box's that chooses the row, which sat the text a few pixels low */
  .ui-table-compact .ui-row-lead > .ui-row-id,
  .ui-table-compact .ui-row-lead > .ui-row-name {
    align-self: baseline;
  }
}

/* A table that works out its lines while one types (calc, 1c.0) has a field in most columns: below iPad landscape it
   becomes cards as every table does on mobile, so that its fields keep their width on an iPad held upright. Every
   field has its label, also the first. */
@media (max-width: 1179px) {
  .ui-table[data-calc],
  .ui-table[data-calc] tbody,
  .ui-table[data-calc] tfoot,
  .ui-table[data-calc] tr,
  .ui-table[data-calc] td {
    display: block;
  }
  .ui-table[data-calc] thead {
    display: none;
  }
  .ui-table[data-calc] tr {
    border-bottom: var(--line-thin) solid var(--color-border);
    padding: var(--space-4) 0;
  }
  .ui-table[data-calc] td,
  .ui-table[data-calc] td:first-child {
    display: flex;
    justify-content: space-between;
    gap: var(--space-6);
    border: 0;
    padding: var(--space-1) var(--space-4);
    overflow-wrap: break-word;
  }
  .ui-table[data-calc] td::before {
    content: attr(data-label);
    color: var(--color-text-3);
    font-size: var(--text-xs);
    text-align: left;
    flex: 0 0 auto;
    max-width: 45%;
  }
  .ui-table[data-calc] tfoot td:first-child::before,
  .ui-table[data-calc] td.ui-cell-toggle::before,
  .ui-table[data-calc] tr.ui-row-more > td::before,
  .ui-table[data-calc] tr.ui-row-add > td::before {
    content: none;
  }
  /* the row's values under the arrow Belopp belong to its card (1c.14b): no line between them */
  .ui-table[data-calc] tr[data-expands]:has(+ tr.ui-row-more:not([hidden])) {
    border-bottom: 0;
  }
  .ui-table[data-calc] tr.ui-row-more,
  .ui-table[data-calc] tr.ui-row-add {
    padding-top: 0;
  }
  .ui-table[data-calc] tr.ui-row-more > td,
  .ui-table[data-calc] tr.ui-row-add > td,
  .ui-table[data-calc] tfoot .ui-row-total-facts td {
    display: block;
  }
  .ui-table[data-calc] tr.ui-row-more .ui-row-more-body,
  .ui-table[data-calc] tr.ui-row-add > td {
    padding-left: var(--space-4);
  }
  /* The folded card (card_head, 1c.14b, the model K43 in #825): the arrow is the card's head, its category small and
     grey over its text, cut after --cell-lines lines, and its gross at the right under its label, with the arrow last;
     a tap on it, or anywhere on the card, folds it out to the fields and the amounts. A row with card_open (an empty
     row, a refused form) keeps its fields shown. Only on a screen: on paper every field stands. */
  .ui-table[data-calc] td.ui-cell-toggle {
    display: block;
    width: auto;
  }
  /* folded out, its fields stand two by two with the label over the field, and the head, Kategori and Specifikation
     (the texts that wrap) over the whole card, as the model */
  .ui-table[data-calc] tr[data-expands]:has(.ui-row-toggle-card) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .ui-table[data-calc] tr[data-expands]:has(.ui-row-toggle-card) > td.ui-cell-field {
    /* the folded-out card has the row's surface and white fields, as the model K43: the editable cell's tone stays in
       the wide table, where the field has no fill of its own */
    background: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-1);
  }
  .ui-table[data-calc] tr[data-expands]:has(.ui-row-toggle-card) > td::before {
    max-width: none;
  }
  .ui-table[data-calc] tr[data-expands]:has(.ui-row-toggle-card) > td:is(.ui-cell-toggle, .ui-text-wrap) {
    grid-column: 1 / -1;
  }
  .ui-row-toggle.ui-row-toggle-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    min-height: var(--row-control-min);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    color: var(--color-text);
    text-align: left;
  }
  .ui-row-toggle.ui-row-toggle-card[aria-expanded="true"] {
    color: var(--color-text);
    font-weight: var(--weight-regular);
  }
  .ui-row-toggle-card .ui-row-toggle-label,
  .ui-row-toggle-card .ui-row-toggle-name {
    display: none;
  }
  .ui-row-toggle-card .ui-row-toggle-icon {
    order: 3;
    flex: none;
  }
  .ui-row-toggle-card .ui-row-card-head {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
    white-space: normal;
  }
  .ui-row-card-lead {
    color: var(--color-text-3);
    font-size: var(--text-xs);
  }
  .ui-row-card-lead:empty {
    display: none;
  }
  .ui-row-card-main {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--cell-lines);
    overflow: hidden;
    overflow-wrap: break-word;
  }
  .ui-row-toggle-card .ui-row-card-figure {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-1);
  }
  .ui-row-card-figure-label {
    color: var(--color-text-3);
    font-size: var(--text-xs);
  }
  .ui-row-card-figure-value {
    font-weight: var(--weight-strong);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .ui-table[data-calc] td:has(> .ui-cell-detail)::before {
    margin-right: auto;
  }
  .ui-table[data-calc] td.ui-cell-field {
    align-items: center;
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
  }
  .ui-table[data-calc] caption {
    display: block;
  }
  .ui-table[data-calc] td:empty,
  .ui-table[data-calc] tfoot td:not(:first-child, .ui-num) {
    display: none;
  }
  .ui-table[data-calc] tfoot td {
    border: 0;
  }
  .ui-table[data-calc] tfoot tr {
    border-top: var(--line-medium) solid var(--color-border-strong);
    border-bottom: 0;
  }
  /* Its cards need no box (scroll="wide", 1c.11): the box is for the table from iPad landscape. */
  .ui-table-scroll:has(> .ui-table[data-calc]) {
    overflow-x: visible;
    border: 0;
    background: none;
  }
  .ui-table-scroll:has(> .ui-table[data-calc]) .ui-table caption {
    padding: 0 0 var(--space-5);
  }
}
/* The values worked out under a card's fields and the sum under the cards stand in two columns, label over value, with
   no frame, a thin line over them as in the model K43 (1c.14b.1): the cards are the page's own surface, and a box inside
   a card was a frame inside a frame. From iPad landscape the values stand in one row under the arrow, as before. */
@media (max-width: 1179px) {
  /* the amounts begin where the fields do: the cell's own air is their edge */
  .ui-table[data-calc] tr.ui-row-more .ui-row-more-body {
    padding-inline: 0;
  }
  .ui-table[data-calc] tr.ui-row-more .ui-row-more-card {
    padding: var(--space-6) 0 0;
    border: 0;
    border-top: var(--line-thin) solid var(--more-card-border);
    border-radius: 0;
    background: none;
  }
  .ui-table[data-calc] .ui-row-more-list.ui-row-more-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4) var(--space-6);
  }
}
/* the folded card shows its head only, on a screen (card_head, 1c.14b) */
@media screen and (max-width: 1179px) {
  .ui-table[data-calc] tr[data-expands]:has(.ui-row-toggle-card):not(.ui-row-expanded, [data-card-open]) > td:not(.ui-cell-toggle) {
    display: none;
  }
}


/* A table with many columns (fixed, the ÄTA list with its 14, 1c.7) does not fit between a phone and a computer, 600 to
   1279 px: there it scrolls sideways in a box of its own, that a finger scrolls too, with the first one to three
   columns kept at the left and an edge against what scrolls under them. The box is a region a key reaches (tabindex,
   role and name in the template). It scrolls sideways only, with no height of its own, so that the list scrolls with the
   page; but a box that scrolls sideways is a scroll port up and down too, so the header row sticks to the box and does
   not stay when the page scrolls (top 0 in the box, not the page's --sticky-top). From 1280 px there is no box with
   overflow (but a dense table, below), the table fits and its header row stays under the page's, as every table's does. On a phone, under 600 px,
   it is cards. Only on a screen: on paper no column is cut. */
@media screen and (min-width: 600px) and (max-width: 1279px) {
  .ui-table-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: var(--line-thin) solid var(--color-border);
    background: var(--color-surface);
  }
  .ui-table-scroll:focus-visible {
    outline: var(--line-medium) solid var(--color-focus);
    outline-offset: calc(-1 * var(--line-medium));
  }
  .ui-table-scroll .ui-table {
    min-width: var(--table-wide-min);
  }
  /* A table made to fit an iPad in landscape (fits, the ÄTA list, P.0.14): its content's least width, so that it
     scrolls only where the content does not fit. */
  .ui-table-scroll .ui-table.ui-table-fits {
    min-width: 0;
  }
  .ui-table-scroll .ui-table th {
    top: 0;
  }
  /* The table's name stands inside the box, so it has air to the box's edge and to the header row's edge (1c.10). */
  .ui-table-scroll .ui-table caption {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
  /* scroll="fit" (the statuses, T12.3): the table keeps its own width, so the box scrolls only when a word that is kept
     whole is wider than the page leaves, and the page never does. */
  .ui-table-scroll-fit .ui-table {
    min-width: 0;
  }
  .ui-table .ui-table-fixed {
    position: sticky;
    z-index: 1;
    box-sizing: border-box;
    background: var(--color-surface);
  }
  .ui-table thead .ui-table-fixed {
    z-index: 3;
  }
  /* A table whose rows fold out (1c.P): the first fixed column holds the chevron and the identity, each
     --row-control-min (T2.67), with the cell's air. */
  .ui-table-expands {
    --table-fixed-1: calc(var(--space-6) + 2 * var(--row-control-min) + var(--space-1) + var(--space-7));
  }
  /* and with a box that chooses the row for a form (P.0.4, select_form), one tap target more */
  .ui-table-expands.ui-table-chooses {
    --table-fixed-1: calc(var(--space-6) + 3 * var(--row-control-min) + 2 * var(--space-1) + var(--space-7));
  }
  .ui-table .ui-table-fixed-1 {
    left: 0;
  }
  .ui-table .ui-table-fixed-1:not([colspan]) {
    width: var(--table-fixed-1);
    min-width: var(--table-fixed-1);
    max-width: var(--table-fixed-1);
  }
  .ui-table .ui-table-fixed-2 {
    left: var(--table-fixed-1);
    width: var(--table-fixed-2);
    min-width: var(--table-fixed-2);
    max-width: var(--table-fixed-2);
  }
  .ui-table .ui-table-fixed-3 {
    left: calc(var(--table-fixed-1) + var(--table-fixed-2));
    width: var(--table-fixed-3);
    min-width: var(--table-fixed-3);
    max-width: var(--table-fixed-3);
  }
  /* A word wider than the fixed Rubrik column (1c.10, G1) breaks inside it, as it did before the words were kept whole:
     the other choices were to draw it over the next column or to cut it. Only a word that does not fit is broken. */
  .ui-table td.ui-table-fixed.ui-text-whole {
    overflow-wrap: break-word;
  }
  /* The edge where the fixed columns end shows only while the box is scrolled sideways (is-scrolled-x, components.js,
     P.0.14): never on a table that fits, and never without JavaScript. */
  .ui-table-scroll.is-scrolled-x .ui-table .ui-table-fixed-end {
    box-shadow: var(--grid-fixed-edge);
  }
  .ui-table .ui-table-fixed-end + th,
  .ui-table .ui-table-fixed-end + td {
    padding-left: var(--space-5); /* air between the edge and what scrolls under it */
  }
}

/* The ledger table (the portfolio's list) in that box under 1180 px (T2.88b, the owner 5/11): the first column keeps to a
   width of its own and breaks its names, and the table has its content's least width, not the 1200 px of the other
   tables with fixed columns (P.0.17c, the pilot session 12/11: the widths from the content and the surface), so that
   the columns up to Marg. are on the screen at 600 and 820 px, with Kostnader and Ack. resultat in the row that folds
   out (wide_only="landscape"), and the ones after Marg. (Prognos, Status) are what the box scrolls to. */
@media screen and (min-width: 600px) and (max-width: 1179px) {
  .ui-table-scroll-portrait .ui-table-ledger {
    min-width: 0;
  }
  .ui-table-scroll-portrait .ui-table-ledger th:first-child {
    width: var(--table-lead-wrap);
  }
  .ui-table-scroll-portrait .ui-table-ledger td:first-child {
    max-width: var(--table-lead-wrap);
  }
}

/* A table that scrolls in the box without fixed columns (scroll, the portfolio, 1h.6) fits from an iPad in landscape:
   from 1180 px it is an ordinary table, without the box, so that its header row stays when the page scrolls. */
@media screen and (min-width: 1180px) and (max-width: 1279px) {
  .ui-table-scroll-portrait {
    overflow-x: visible;
    border: 0;
    background: none;
  }
  .ui-table-scroll-portrait .ui-table {
    min-width: 0;
  }
  .ui-table-scroll-portrait .ui-table th {
    top: var(--sticky-top, 0);
  }
  /* The box has no edge here, so the table's name has the air it has outside a box (1c.10). */
  .ui-table-scroll-portrait .ui-table caption {
    padding: 0 0 var(--space-5);
  }
}

/* A dense table (the ÄTA list, 1c.10) stays in its box from 1280 px too, with the edge, so that the table scrolls sideways
   when a word that is kept whole makes it wider than the page, and the page never does (the customer's rule on no
   sideways scroll goes first, pilotsessionen 28/10; the same principle as scroll="fit", T12.3). The table keeps its own
   width, so the box scrolls only when it must. There are no fixed columns here, and the header row sticks to the box and
   not to the page, as it does below 1280 px. */
@media screen and (min-width: 1280px) {
  .ui-table-scroll-wide {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: var(--line-thin) solid var(--color-border);
    background: var(--color-surface);
  }
  .ui-table-scroll-wide:focus-visible {
    outline: var(--line-medium) solid var(--color-focus);
    outline-offset: calc(-1 * var(--line-medium));
  }
  .ui-table-scroll-wide .ui-table th {
    top: 0;
  }
  .ui-table-scroll-wide .ui-table caption {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
}

/* D-TAB-35 (the pilot session 27/11): a table or a sheet whose least width does not fit scrolls in its own box, never
   the page, with its first column kept at the left and a shadow at the box's right edge while there is more to scroll.
   The dense table's box from 1280 px (the ÄTA list) keeps its first fixed column (fixed, ui-table-fixed-1) at the left
   as it does below 1280 px, with the edge while it is scrolled; only stuck, with no width of its own, so that the
   table's widths are the same as before. The summary's sheet keeps Nr, Ansv and Namn (ui-grid-fixed, above). */
@media screen and (min-width: 1280px) {
  .ui-table-scroll-wide .ui-table .ui-table-fixed-1 {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--color-surface);
  }
  .ui-table-scroll-wide .ui-table thead .ui-table-fixed-1 {
    z-index: 3;
  }
  .ui-table-scroll-wide.is-scrolled-x .ui-table .ui-table-fixed-1 {
    box-shadow: var(--grid-fixed-edge);
  }
}
/* The shadow where there is more (is-more-x, components.js, set while the box has more to the right): a block after the
   table, as high as the box's visible part (--scroll-more-height, measured by components.js) and pulled back over it by
   the same, kept at the right and the bottom of what shows (sticky), so that it lies over the rows and the header row
   wherever the box is scrolled, without a width or a height of its own in the layout. Never on paper. */
@media screen {
  :is(.ui-grid-scroll, .ui-table-scroll).is-more-x::after {
    content: "";
    display: block;
    position: sticky;
    left: calc(100% - var(--scroll-more-width));
    bottom: 0;
    z-index: 4;
    box-sizing: border-box;
    width: var(--scroll-more-width);
    height: var(--scroll-more-height);
    margin: calc(-1 * var(--scroll-more-height)) 0 0 auto;
    background: var(--scroll-more-edge);
    pointer-events: none;
  }
}

/* A table that works out its lines (scroll="wide", the ÄTA's lines) has no box from 1280 px, but scrolls in its box while
   it is wider than its room (is-wider, components.js, T2.97): a column is at least as wide as its longest word, and the
   page never scrolls sideways. */
@media screen and (min-width: 1280px) {
  .ui-table-scroll-calc.is-wider {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .ui-table-scroll-calc.is-wider .ui-table th {
    top: 0;
  }
}

@media print {
  .ui-table-scroll {
    overflow: visible;
  }
  .ui-table-scroll .ui-table {
    min-width: 0;
  }
}

/* ---- Charts ---- */
/* Drawn as SVG on the server (apps/printing/charts.py), with the chart colours in a fixed order. */
.ui-chart-figure {
  margin: 0;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
  padding: var(--space-7);
}
.ui-chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4) var(--space-7);
  margin-bottom: var(--space-4);
}
.ui-chart-caption {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-title);
}
.ui-chart-legend {
  display: flex;
  gap: var(--space-7);
  font-size: var(--text-xs);
  color: var(--color-text-2);
}
.ui-chart-key::before {
  content: "";
  display: inline-block;
  width: var(--space-5);
  height: var(--space-5);
  margin-right: var(--space-3);
  border-radius: var(--radius-sm);
}
.ui-chart-key-1::before {
  background: var(--color-chart-1);
}
.ui-chart-key-2::before {
  background: var(--color-chart-2);
}
.ui-chart {
  display: block;
  width: 100%;
  height: auto;
}
/* The drawing scales with its width, text and all, so the screen has it at four sizes and shows the one for the
   width of its own box (T2.14: next to another box it is half the page): the text is then at least --text-2xs at every
   width, a phone gets fewer month labels, and half a laptop's page has a drawing as low as the prototype's (T2.43). */
.ui-chart-figure {
  container-type: inline-size;
}
.ui-chart-medium,
.ui-chart-small,
.ui-chart-narrow {
  display: none;
}
@container (max-width: 759px) {
  .ui-chart-wide {
    display: none;
  }
  .ui-chart-medium {
    display: block;
  }
}
@container (max-width: 519px) {
  .ui-chart-medium {
    display: none;
  }
  .ui-chart-small {
    display: block;
  }
}
@container (max-width: 399px) {
  .ui-chart-small {
    display: none;
  }
  .ui-chart-narrow {
    display: block;
  }
}
/* A chart with its table (P.0.12, Björn 1/11: "utan att kortet växer"): Diagram | Tabell in the heading row, with the
   legend after the caption. A choice of view in a box changes what the box shows in the same place (docs/design.md):
   the table stands over the chart, which keeps its place hidden, so the box keeps the chart's height, and the table
   scrolls inside it with its header row and its sum row kept. Without JavaScript (no data-js on html) the switch is
   not shown and the table stands under the chart, so nothing is out of reach. */
.ui-chart-head > .ui-heading-row {
  flex: 1 1 auto;
}
.ui-chart-views {
  position: relative;
}
.ui-chart-table {
  margin-top: var(--space-7);
}
html[data-js] .ui-chart-switch .ui-chart-table {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--color-surface);
}
html[data-js] .ui-chart-switch[data-view-shown="table"] .ui-chart-table {
  display: block;
}
html[data-js] .ui-chart-switch[data-view-shown="table"] .ui-chart-pane,
html[data-js] .ui-chart-switch[data-view-shown="table"] .ui-chart-legend {
  visibility: hidden;
}
html:not([data-js]) .ui-chart-switch .ui-heading-row > .ui-actions {
  display: none;
}
/* A chart that fills its box (fill, P.0.13): in a row of the page's grid the boxes are as high as each other, and the
   chart's box is as high as the row. The drawing keeps its proportions, so that its text is never stretched, and stands
   at the foot of the box, its axis level with the foot of the boxes beside it; the table, in its place, fills the whole
   height and scrolls inside it. */
.ui-chart-fill {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ui-chart-fill > .ui-chart-views {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.ui-chart-fill > .ui-chart {
  margin-top: auto;
}
.ui-chart-table:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}
/* In the box the header row sticks to the box's top, not under the page's sticky rows, and the sum row to its foot. */
html[data-js] .ui-chart-switch .ui-chart-table .ui-table th {
  top: 0;
}
@media (min-width: 600px) {
  html[data-js] .ui-chart-switch .ui-chart-table .ui-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: var(--color-surface);
  }
}

/* ---- The box over a chart (T2.92, chart_tip, the prototype's #tip) ---- */
/* One component for every chart: the chart hands over a model (a title, rows of a series' colour square, a label and a
   value, and an optional sum row; apps/printing/charts.py chart_tip) as data on its hit areas, and components.js builds
   the box from it with textContent only. With a mouse it shows on hover and snaps to the month (T2.113, K24 v2; the
   pilot 13/11): beside the drawing when it and --chart-tip-chart-min fit in the window, else under it (above it when
   the window has no room under), to the right of the month as soon as it fits there and else to the left, never over
   it, and it does not follow the pointer. The mode follows the surface, never the device. With touch it stands
   from a tap on the month until a tap elsewhere, Esc or a scroll, and with the keyboard the drawing is focused and the
   arrow keys go from month to month. The box is aria-hidden, its text said in a live region instead, and it is never
   printed. components.js places it with --tip-x and --tip-y in pixels; the catalog shows it in place. */
.ui-chart-tip {
  position: fixed;
  top: var(--tip-y, 0);
  left: var(--tip-x, 0);
  z-index: 30;
  max-width: min(var(--chart-tip-max), calc(100vw - 2 * var(--chart-tip-margin)));
  padding: var(--chart-tip-pad-y) var(--chart-tip-pad-x);
  border: var(--line-thin) solid var(--chart-tip-border);
  border-radius: var(--chart-tip-radius);
  background: var(--chart-tip-bg);
  color: var(--chart-tip-fg);
  box-shadow: var(--chart-tip-shadow);
  font-family: var(--font-body);
  font-size: var(--chart-tip-size);
  line-height: var(--chart-tip-leading);
  pointer-events: none;
}
.ui-chart-tip[hidden] {
  display: none;
}
.ui-chart-tip-static {
  position: static;
  display: inline-block;
}
.ui-chart-tip-title {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: var(--chart-tip-weight-title);
}
/* A text only (T2.100): a short heading's whole name or a cut cell's whole text, which was a title for the mouse. The box has
   the title alone, so it has no room under it; the target is quiet on a tap (no grey flash), as the schedule's names. */
.ui-chart-tip-text .ui-chart-tip-title:last-child {
  margin-bottom: 0;
  font-weight: var(--weight-regular);
}
[data-tap-tip] {
  -webkit-tap-highlight-color: transparent;
}
/* The tap target of a text with a box is --target-min (44 px) with touch, and the drawn text is not changed (T2.100, the
   pilot session 8/11 and 9/11; pattern 10 of docs/granskning/svep-inventering.md, PR #853: the target is 44 px and the
   visible part may be denser). With touch, and on a computer that also has a touch screen (any-pointer: coarse), a short
   heading's abbr and a mark reach 44 x 44 px round their text with an ::after nobody sees and that takes no room (the
   badge's ::before is its dot); a cut text (ui-clip, which clips what is inside it, so a pseudo element would be cut) has
   the same air on every side as padding that a negative margin takes back, so the line stands where it did. The air is
   outside its width (content-box), so the text is cut where it was, and since it is the same on every side, the
   keyboard's ring stands round the text at the usual distance on every side (G1 of the round, Bör 1). With a mouse the
   text is as dense as it is, and the box opens on hover. */
@media (pointer: coarse), (any-pointer: coarse) {
  abbr[data-tap-tip] {
    position: relative;
  }
  abbr[data-tap-tip]::after,
  .ui-badge[data-tap-tip]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: var(--target-min);
    min-height: var(--target-min);
    transform: translate(-50%, -50%);
  }
  .ui-clip[data-tap-tip] {
    --tap-tip-reach: calc((var(--target-min) - 1lh) / 2);
    box-sizing: content-box;
    padding: var(--tap-tip-reach);
    margin: calc(-1 * var(--tap-tip-reach));
  }
  .ui-clip[data-tap-tip]:focus-visible {
    outline-offset: calc(var(--line-medium) - var(--tap-tip-reach));
  }
}
.ui-chart-tip-row {
  display: flex;
  justify-content: space-between;
  gap: var(--chart-tip-gap);
  font-variant-numeric: tabular-nums;
}
.ui-chart-tip-value {
  text-align: right;
  white-space: nowrap;
}
/* A value under 0, as the server says (tone negative): the box's own negative tone, which holds on its surface */
.ui-chart-tip-negative {
  color: var(--chart-tip-negative);
}
/* A day of the year strip in the box (K78 v2 b): its own box before the name, on the box's surface, and the kind under */
.ui-chart-tip-day {
  --year-strip-day-surface: var(--chart-tip-bg);
  display: inline-block;
  margin-right: var(--chart-tip-swatch-gap);
  vertical-align: calc(-1 * var(--line-thin));
}
.ui-chart-tip-note {
  display: block;
}
.ui-chart-tip-swatch {
  display: inline-block;
  width: var(--chart-tip-swatch);
  height: var(--chart-tip-swatch);
  margin-right: var(--chart-tip-swatch-gap);
  border: var(--line-thin) solid var(--chart-tip-swatch-border);
  border-radius: var(--chart-tip-swatch-radius);
  vertical-align: calc(-1 * var(--line-thin));
}
.ui-chart-tip-swatch-1 {
  background: var(--chart-tip-series-1);
}
.ui-chart-tip-swatch-2 {
  background: var(--chart-tip-series-2);
}
.ui-chart-tip-swatch-3 {
  background: var(--chart-tip-series-3);
}
.ui-chart-tip-swatch-4 {
  background: var(--chart-tip-series-4);
}
.ui-chart-tip-swatch-5 {
  background: var(--chart-tip-series-5);
}
.ui-chart-tip-swatch-6 {
  background: var(--chart-tip-series-6);
}
/* A month's hit area over its bars, the whole height of the plot: no fill, and the pointer all the same */
.ui-chart-hit {
  fill: transparent;
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
}
.ui-chart-hit.is-current {
  fill: var(--chart-tip-hit-current);
}
@media (hover: hover) {
  .ui-chart-hit:hover {
    fill: var(--chart-tip-hit-current);
  }
}
/* The ring on the drawing only after the keyboard, as on the grid's active cell: a tap shows the box and nothing else */
svg[data-chart-tips]:focus {
  outline: none;
}
:root[data-last-input="keyboard"] svg[data-chart-tips]:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
@media print {
  .ui-chart-tip {
    display: none !important;
  }
}

/* ---- The view switch (T2.70, Björn 1/11 via the pilot session, the layout sketch) ---- */
/* Views of the same content, as Diagram and Tabell in Per månad, are chosen with buttons of symbols that sit together:
   one frame with a divider between the buttons. Each button has its name as aria-label and title and says with
   aria-pressed whether it is the one shown; the chosen one has the toggles' dark fill and light symbol (--toggle-on-*, T2.93). The
   buttons are as dense as a row of actions with a mouse and the tap target with touch (--control-min), square. The
   symbols are drawn in the component as the side menu's icons (24 x 24, lines only, round ends). More views are more
   buttons. components.js sets aria-pressed and the view on the nearest [data-view-shown] round the switch. */
.ui-viewswitch {
  display: inline-flex;
  flex: none;
  border: var(--line-thin) solid var(--viewswitch-edge);
  border-radius: var(--viewswitch-radius);
  overflow: hidden;
  background: var(--viewswitch-surface);
}
/* Without JavaScript the buttons would do nothing, so the switch is not shown (G1 of #535); the content stands as its
   own rules say, as the chart's table under the chart. */
html:not([data-js]) .ui-viewswitch {
  display: none;
}
.ui-viewswitch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--control-min);
  min-height: var(--control-min);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--viewswitch-symbol);
  cursor: pointer;
}
.ui-viewswitch-button + .ui-viewswitch-button {
  border-left: var(--line-thin) solid var(--viewswitch-edge);
}
.ui-viewswitch-button:hover {
  color: var(--viewswitch-symbol-hover);
}
.ui-viewswitch-button[aria-pressed="true"] {
  background: var(--viewswitch-on-surface);
  color: var(--viewswitch-on-symbol);
  box-shadow: inset 0 calc(-1 * var(--toggle-on-underline)) 0 var(--viewswitch-on-symbol);
}
.ui-viewswitch-button:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}
.ui-viewswitch-symbol {
  width: var(--viewswitch-size);
  height: var(--viewswitch-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Signals (T2.70, Björn 1/11 via the pilot session, the layout sketch's "Egen rad under") ---- */
/* What in a project needs attention, on a row of its own under the page's meta row: a reminder and not an alarm, so a
   coloured dot (yellow a warning, grey information) and calm text in the second colour of text, with no frame and no
   fill; a chip never shows a date (D-MARK-16). Each is a link to what it is about, underlined at hover and focus. The text
   says what it is, and the tone is also said to a screen reader, so the colour is never the only sign. The tap target
   is the signals' own, --signal-target: 24 px with a mouse and 44 px with touch, and the rows are --signal-row-gap
   apart when they wrap. With touch, where there is no hover, a signal that is a link is underlined at rest
   (--signal-marker-touch, G1 of #535). */
.ui-signals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--signal-row-gap) var(--signal-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-signals > li {
  display: flex;
  min-width: 0;
}
/* A signal with its button (1g.8c.5b, K58 question 3, D-NAV-15): Stämmer, låt stå after the text, on the text's middle
   line, and under it when the row does not fit. The button is the compact row's (--control-min), so that a signal's row
   is no taller than a row of choices with a mouse, and the tap target with touch. */
/* A signal's day and its person stamp after the chip, never in it (D-MARK-16, the pilot session 26/11): the same air as
   before the button, and under the chip when the row does not fit. */
.ui-signals > li:has(> .ui-actions-group, > .ui-signal-day, > .ui-source-stamp-by) {
  flex-wrap: wrap;
  align-items: center;
  gap: var(--signal-row-gap) var(--signal-act-gap);
}
.ui-signals > li > .ui-actions-group .ui-button {
  min-height: var(--control-min);
  min-width: var(--control-min);
}
.ui-signal {
  display: inline-flex;
  align-items: center;
  border: var(--line-badge) solid transparent;
  text-decoration: none;
}
/* Only a signal that is a link is a tap target: a signal that is only text keeps its own line, as a row of text in the fact
   list does (the pilot session 9/11, T2.104). */
a.ui-signal {
  min-height: var(--signal-target);
  min-width: var(--signal-target);
}
.ui-signal::before {
  content: "";
  flex: none;
  width: var(--signal-dot);
  height: var(--signal-dot);
  border-radius: var(--radius-round);
  background: var(--signal-info);
}
.ui-signal-info {
  background: var(--signal-chip-info-bg);
  color: var(--signal-chip-info-text);
}
.ui-signal-info::before {
  background: var(--signal-info);
}
.ui-signal-warning::before {
  background: currentColor;
}
.ui-signals > li > .ui-signal-day {
  white-space: nowrap; /* "23/7 2027" stays one line */
}
.ui-signals > li > .ui-source-stamp-by {
  margin: 0;
  padding: 0;
  border: 0;
  white-space: nowrap; /* "Ändrad 15 nov" stays one line, the label breaks instead */
}
a.ui-signal:hover,
a.ui-signal:focus-visible {
  text-decoration: underline;
  text-underline-offset: var(--space-1);
}
@media (any-pointer: coarse) {
  a.ui-signal {
    text-decoration-line: var(--signal-marker-touch);
    text-underline-offset: var(--space-1);
  }
}
a.ui-signal:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--space-1);
}
/* Gathered signals (1g.8c.2, K58, Björn 10/11): more than two of one kind are one signal and their rows are in a disclosure
   under the list, a group per schedule with its title and its rows (components/parts/signal_rows.html). The groups are
   --stack-gap apart, as the project's calendar's groups are; everything else in them is the heading row and the rows of
   choices of the calendar, with their own tokens. */
.ui-signals-group + .ui-signals-group {
  margin-top: var(--stack-gap);
}

/* ---- Edit bar (1b.1): what is edited, and Spara and Avbryt, which follow at the top when the view scrolls ---- */
.ui-editbar {
  position: sticky;
  top: var(--sticky-top);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-7);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border: var(--line-thin) solid var(--color-border);
}
.ui-editbar-editing {
  border-color: var(--color-action);
  border-top-width: var(--line-thick);
  box-shadow: var(--shadow-overlay);
}
.ui-editbar-status {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}
/* A row of the view's own in the edit bar (P.0, the summary as the prototype's): the period's picker and Visa with the
   groups of columns, each with a word before it, beside the buttons. The picker's label is for a screen reader. */
.ui-editbar-period,
.ui-editbar-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}
.ui-editbar-word {
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
/* The bar's field of text before its buttons (1g.5a, the prototype's tpspar): its label beside it, and the field takes
   the row's room; the row wraps, so that on a narrow screen the buttons go under it, and the label wraps too, so that
   where the label and the field's least width do not fit beside each other (320 px, 1g.5b) the field goes under it
   and the page has no scroll to the side. */
.ui-editbar-comment {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 var(--editbar-comment-basis);
  align-items: center;
  gap: var(--space-4);
  margin: 0;
}
.ui-editbar-comment > .ui-input {
  flex: 1;
  min-width: var(--editbar-comment-min);
}
/* A status without text (the summary's open period, P.0) takes no place in the row. */
.ui-editbar-status:empty {
  display: none;
}
/* A plain bar (P.0, round 4): the actions as one row under the page's head, as the prototype's .bar, without the
   box, and the status for a screen reader only, since the head's line says it. Editing draws the box again. */
.ui-editbar-plain {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  justify-content: flex-start;
}
/* Version beside its picker in the plain bar, as the prototype's "Version [Aktuell (levande)]" (P.0, round 5), and in
   the page's head the forecast's Bokfört t.o.m. beside its field, as the prototype's .head .bar (P.0, the forecast's
   round 5); on a phone the label stays above. The head's Version is a value picker since P.0.15, and the living
   budget's Lås som a menu button. */
@media (min-width: 600px) {
  .ui-editbar-plain [data-version-form] > .ui-picker,
  .ui-page-head [data-version-form] > .ui-field {
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
  }
  .ui-editbar-plain [data-version-form] .ui-field-label,
  .ui-page-head [data-version-form] .ui-field-label {
    white-space: nowrap;
  }
}
.ui-editbar-plain > .ui-editbar-status {
  position: absolute;
  width: var(--line-thin);
  height: var(--line-thin);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The plain bar with its status shown (plain and status_visible, T19.2.2, K84 fråga 4): as the plain bar, no frame and
   no shadow also while editing, and the status after the buttons, visible, as the count of unsaved changes with a dot in
   the unsaved colour. An empty status keeps its place in the tree, so that a screen reader hears the count when it
   comes. In a long part the bar is pinned at the window's lower edge (ui-editbar-pinned, below). */
.ui-editbar.ui-editbar-plain-status {
  border: 0;
  box-shadow: none;
}
.ui-editbar-plain.ui-editbar-plain-status > .ui-editbar-status {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: var(--editbar-status-shown-gap);
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  font-size: var(--editbar-status-shown-size);
  color: var(--editbar-status-shown-text);
}
.ui-editbar-plain-status > .ui-editbar-status:not(:empty)::before {
  content: "";
  flex: none;
  width: var(--editbar-status-shown-dot);
  height: var(--editbar-status-shown-dot);
  border-radius: 50%;
  background: var(--editbar-status-shown-dot-color);
}
/* The pinned bar (pinned, T2.159, K118 v6, Björn 14/11): last in a long part or a long form, it lies fixed at the
   window's lower edge while the part is seen and stands in its place at the part's end, so that Spara is where one
   stops, in a short part and a long one. It keeps its box and its surface also when plain, so that the rows under it
   do not show through, and a line and a shadow against what scrolls under it (--editbar-pinned-*). */
.ui-editbar.ui-editbar-pinned {
  position: sticky;
  top: auto;
  bottom: var(--editbar-pinned-bottom);
  padding: var(--editbar-pinned-pad-y) var(--editbar-pinned-pad-x);
  background: var(--editbar-pinned-bg);
  border: 0;
  border-top: var(--editbar-pinned-edge) solid var(--editbar-pinned-edge-color);
  box-shadow: var(--editbar-pinned-shadow);
}

/* ---- Grid (1b.1, decision 0005): the heavy views' spreadsheet ---- */
/* The grid scrolls in a box of its own, so that the header row stays at the top and the first column at the left
   when it scrolls in both directions (decision 0005, Krav på vyerna). Not on a phone: the heavy views show the sums
   there (granskningslistan, Mobil, iPad och pekskärm). */
.ui-grid-scroll {
  max-height: var(--grid-frame-max);
  overflow: auto;
  overscroll-behavior: contain;
  border: var(--line-thin) solid var(--color-border);
  background: var(--color-surface);
}
.ui-grid-table td,
.ui-grid-table th {
  white-space: nowrap;
}
/* The grid's header row sticks in the grid's own box, which the tabs are not over. */
.ui-grid-table th {
  top: 0;
}
.ui-grid-table th.ui-num {
  white-space: normal;
}
.ui-grid-table td:first-child,
.ui-grid-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--color-surface);
  white-space: normal;
}
.ui-grid-table thead th:first-child {
  z-index: 3;
}
.ui-grid-table td.ui-grid-cell {
  position: relative;
  box-sizing: border-box;
  height: var(--target-min); /* a tap target of 44 px in every width (T2.7), with a mouse too */
  padding-top: 0;
  padding-bottom: 0;
  cursor: default;
}
/* A cell one may write in, while editing and, in the forecast, while reading too (P.0): the cell's own token, which the
   living budget shares. */
.ui-grid-table td.ui-grid-cell-editable {
  background: var(--color-cell-editable);
}
/* An amount that opens what it is made of (1b.3): a link over the whole cell, so that a tap anywhere in it opens it
   with a finger, underlined so that it is seen without hovering. A negative one stays red. */
.ui-grid-table td > a.ui-grid-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  height: 100%;
  min-height: var(--target-min);
  min-width: var(--target-min); /* a short amount in a ledger's narrow column is a tap target too (T2.7) */
  color: inherit;
  text-decoration: none;
  -webkit-user-drag: none;
}
/* That the amount opens is said by a small arrow before it in the link's colour, as the prototype's ▸, and not by an
   underlined figure (the table's rule, P.0 round 2); seen without hovering, so that it holds on an iPad too. The
   figure takes the link's colour when the pointer is over it or the cell has the focus. */
.ui-grid-table td > a.ui-grid-link::before {
  content: "";
  flex: none;
  border-top: var(--space-2) solid transparent;
  border-bottom: var(--space-2) solid transparent;
  border-left: var(--space-3) solid var(--color-link);
}
.ui-grid-table td > a.ui-grid-link:hover,
.ui-grid-table td.ui-grid-cell-active > a.ui-grid-link {
  color: var(--color-link);
}
.ui-grid-table td.ui-neg > a.ui-grid-link {
  color: inherit;
}
/* In the dense variants, the ledger and the summary's sheet, an amount that opens has no mark at rest, neither the arrow
   nor a line, since nearly every cell opens and a mark there would say nothing (the pilot session 1/11, round 5); the
   pointer is a hand, and a line comes under the figure at hover and on the active cell after the keyboard (round 8)
   (--drill-marker). The arrow stays in cards, lists and the grids that are not dense (T2.43). A line at rest in the
   summary says where a figure comes from (--source-marker), as the prototype's. */
.ui-grid-dense .ui-grid-table td > a.ui-grid-link::before,
.ui-grid-ledger .ui-grid-table td > a.ui-grid-link::before {
  content: none;
}
.ui-grid-dense .ui-grid-table td > a.ui-grid-link,
.ui-grid-ledger .ui-grid-table td > a.ui-grid-link {
  min-width: var(--target-min); /* a short figure, as "5 000", is still a tap target without the arrow (T2.7) */
  cursor: pointer;
  text-underline-offset: var(--drill-marker-offset);
}
.ui-grid-dense .ui-grid-table td > a.ui-grid-link:hover,
.ui-grid-dense .ui-grid-table td > a.ui-grid-link:focus-visible,
:root[data-last-input="keyboard"] .ui-grid-dense .ui-grid-table:focus-within td.ui-grid-cell-active > a.ui-grid-link,
.ui-grid-ledger .ui-grid-table td > a.ui-grid-link:hover,
.ui-grid-ledger .ui-grid-table td > a.ui-grid-link:focus-visible,
:root[data-last-input="keyboard"] .ui-grid-ledger .ui-grid-table:focus-within td.ui-grid-cell-active > a.ui-grid-link {
  text-decoration: var(--drill-marker);
}
/* With touch, and on a computer that also has a touch screen (pointer: coarse or any-pointer: coarse, as #499's table):
   an amount that opens has the colour of a link (--drill-marker-touch), without a line and without the arrow, in every
   grid, since there is no hover to show it (the pilot session 1/11, level 2). A negative amount stays red. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-grid-table td > a.ui-grid-link,
  .ui-grid-dense .ui-grid-table td > a.ui-grid-link:hover,
  .ui-grid-ledger .ui-grid-table td > a.ui-grid-link:hover {
    color: var(--drill-marker-touch);
    text-decoration: none;
  }
  .ui-grid-table td > a.ui-grid-link::before {
    content: none;
  }
}
/* A sum row's link is in the tab order: its own focus ring, as a cell's. */
.ui-grid-table td > a.ui-grid-link:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}
/* A comment under the amount (P.0, the living budget's 3 Manuellt while one reads), as the prototype's, which wraps. */
.ui-grid-table td.ui-grid-cell-sub {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.ui-grid-table td.ui-grid-cell-sub .ui-grid-note {
  display: block;
  max-width: var(--grid-sub-max);
  margin-left: auto;
  white-space: normal;
  text-align: right;
}
.ui-grid-table td.ui-grid-cell-selected {
  background: var(--color-action-soft);
}
/* The page's own ring (:focus-visible) is not drawn on a grid's cells or table, which take the focus by script. */
.ui-grid-table:focus-visible,
.ui-grid-table td.ui-grid-cell:focus-visible {
  outline: none;
}
/* The active cell's ring, only after the keyboard and while the grid has the focus (P.0 round 8): data-last-input on <html>
   is the design system's own record of the last input (components.js), since :focus-visible is not reliable on a
   cell the grid focuses by script. After the page has loaded or a cell is clicked there is no ring. */
:root[data-last-input="keyboard"] .ui-grid-table:focus-within td.ui-grid-cell-active {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}
/* Not saved yet: a corner flag, as an unsaved field has (granskningslistan: hörnflik och prick). */
.ui-grid-table td.ui-grid-cell-unsaved::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 var(--corner-flag) var(--corner-flag) 0;
  border-color: transparent var(--color-unsaved) transparent transparent;
}
/* An adjusted amount with a note (1d.1.2, #430): a corner in the cell's lower right, by its own amount and away from
   the neighbouring column's figure (G2 of 1d.1.2, B3), under the unsaved flag's upper right and in another colour, so
   that it is told by its place and shape and never by colour alone. The note itself stands in Kommentar on the same
   row, so nothing needs hovering; a screen reader reads the grid's description of the mark (aria-describedby). */
.ui-grid-table td.ui-grid-cell-noted::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  border-style: solid;
  border-width: var(--corner-flag) var(--corner-flag) 0 0;
  border-color: transparent var(--color-text-2) transparent transparent;
}
.ui-grid-table td.ui-grid-cell-editing {
  padding-right: 0;
}
.ui-grid-editor {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: var(--target-min);
}
/* In a ledger the columns are narrow (the prototype's rhythm): the editor never widens its column, which would move the
   rows under the finger between the tap that opens it and the mouse event that follows (P.0, round 3). Its width is
   the cell's, and it adds nothing to the column's width (width 0 and min-width 100 %). */
.ui-grid-ledger .ui-grid-editor {
  width: 0;
  min-width: 100%;
}
.ui-grid-table .ui-grid-forecast {
  font-weight: var(--weight-heading);
}
.ui-grid-table .ui-grid-under {
  color: var(--color-positive-text);
  font-weight: var(--weight-strong); /* marin: a positive deviation as clear as a negative one */
}
.ui-grid-table .ui-grid-reference {
  color: var(--color-text-3);
}
.ui-grid-table .ui-grid-auto td {
  color: var(--color-text-2);
}
/* A group row's heading (P.0) stays at the left when the grid scrolls sideways, as the prototype's: the cell spans every
   column, so its text sticks in it. */
.ui-grid-group-name {
  position: sticky;
  left: var(--space-6);
}
.ui-grid-table .ui-grid-group td {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-md); /* marin: a size smaller, the weight carries it */
  padding-top: var(--space-7);
  border-bottom-color: var(--color-border);
}
.ui-grid-table .ui-grid-subtotal td {
  font-weight: var(--weight-heading);
  border-bottom: var(--line-thin) solid var(--color-border-strong);
}
.ui-grid-table .ui-grid-total td {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
  border-top: var(--line-medium) solid var(--color-border-strong);
}
.ui-grid-note {
  margin-left: var(--space-4);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-xs);
  color: var(--color-text-3);
}
/* The source of a row in the summary's name column (1e.3, marin): a small mark that floats right on the first line,
   so that the name wraps under it and the mark never stands on a line of its own. Only the note in the fixed name
   column; notes in group rows are as before. */
.ui-grid-table td.ui-grid-fixed-3 .ui-grid-note {
  float: right;
  margin-left: var(--space-4);
  margin-top: var(--space-1);
  padding: 0 var(--space-2);
  border: var(--line-badge) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: var(--text-col-head); /* as the column headings */
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--color-text-2);
  white-space: nowrap;
}
/* The source's colour, from data-source on the note (prognos, lb, inlast, excel, utkast or angivet). Not by colour
   alone: the text says the source, and a draft has a dashed edge. Without the attribute the mark is neutral. The td in
   the selectors gives them the name column rule's weight, which they follow and so win over. */
.ui-grid-table td .ui-grid-note[data-source="prognos"] {
  border-color: var(--color-positive-text);
  color: var(--color-positive-text);
  background: var(--color-positive-soft);
}
.ui-grid-table td .ui-grid-note[data-source="lb"] {
  border-color: var(--color-action);
  color: var(--color-action);
  background: var(--color-action-soft);
}
.ui-grid-table td .ui-grid-note[data-source="utkast"] {
  border-style: dashed;
  border-color: var(--color-warning-text);
  color: var(--color-warning-text);
  background: var(--color-warning-soft);
}
.ui-grid-table td .ui-grid-note[data-source="angivet"] {
  border-color: transparent;
  color: var(--color-action);
  background: var(--color-editable);
}
/* excel and inlast: the neutral mark, with a darker edge and text */
.ui-grid-table td .ui-grid-note[data-source="excel"],
.ui-grid-table td .ui-grid-note[data-source="inlast"] {
  border-color: var(--color-text-2);
  color: var(--color-text);
}
/* A status badge in the grid, small in a dense grid. */
.ui-grid-table .ui-badge {
  margin-left: var(--space-4);
  font-size: var(--text-col-head); /* as the column headings */
  letter-spacing: var(--tracking-caps);
  vertical-align: middle;
}
.ui-grid-row-actions {
  display: inline-flex;
  gap: var(--space-2);
  margin-left: var(--space-3);
  vertical-align: middle;
}
.ui-grid-row-actions .ui-button {
  min-width: var(--target-min);
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}
.ui-grid-table .ui-grid-adding td {
  background: var(--color-surface-2);
  white-space: normal;
}
/* The leading columns that stay at the left beside the first when the grid scrolls sideways (1e.6, the summary's Nr,
   Ansv and Namn): fixed widths, so that each one's offset is the sum of those before it. */
.ui-grid-table td.ui-grid-fixed,
.ui-grid-table th.ui-grid-fixed {
  position: sticky; /* also on a cell of a data row, which is otherwise relative (td.ui-grid-cell) */
  z-index: 1;
  box-sizing: border-box;
  background: var(--color-surface);
}
.ui-grid-table thead .ui-grid-fixed {
  z-index: 3;
}
.ui-grid-table .ui-grid-fixed-1 {
  left: 0;
}
.ui-grid-table .ui-grid-fixed-1:not([colspan]) {
  width: var(--grid-fixed-1);
  min-width: var(--grid-fixed-1);
  max-width: var(--grid-fixed-1);
}
.ui-grid-table .ui-grid-fixed-2 {
  left: var(--grid-fixed-1);
  width: var(--grid-fixed-2);
  min-width: var(--grid-fixed-2);
  max-width: var(--grid-fixed-2);
  white-space: normal;
}
.ui-grid-table .ui-grid-fixed-3 {
  left: calc(var(--grid-fixed-1) + var(--grid-fixed-2));
  width: var(--grid-fixed-3);
  min-width: var(--grid-fixed-3);
  max-width: var(--grid-fixed-3);
}
/* The edge where the grid's fixed part ends (P.0.14, Björn 2/11): after the last fixed column (Namn, the summary's
   ui-grid-fixed-3), or after the first column of a grid without fixed ones (the forecast's and the living budget's),
   only while the box is scrolled sideways (is-scrolled-x, components.js), so that it marks what lies under it and is
   never a line of its own on a grid that has not scrolled. */
.ui-grid-scroll.is-scrolled-x .ui-grid-table .ui-grid-fixed-3,
.ui-grid-scroll.is-scrolled-x .ui-grid-table:not(:has(.ui-grid-fixed)) :is(td, th):first-child {
  box-shadow: var(--grid-fixed-edge);
}
.ui-grid-table td.ui-grid-cell-editable.ui-grid-fixed {
  background: var(--color-cell-editable);
}
.ui-grid-table td.ui-grid-cell-selected.ui-grid-fixed {
  background: var(--color-action-soft);
}
/* A long text in a cell wraps and the row grows (the summary's Namn and Anmärkning). */
.ui-grid-table td.ui-grid-wrap {
  white-space: normal;
  overflow-wrap: break-word;
}
.ui-grid-table .ui-grid-wide {
  min-width: var(--grid-remark-min);
}
/* A dense grid: the smaller text and air of a sheet with many columns (the summary, 1e.6), which fits 1440 px without
   scrolling sideways; the cells keep the tap target's height. */
.ui-grid-dense .ui-grid-table {
  font-size: var(--text-xs);
}
.ui-grid-dense .ui-grid-table td,
.ui-grid-dense .ui-grid-table th {
  padding-right: var(--space-3);
}
.ui-grid-dense .ui-grid-table .ui-grid-group td,
.ui-grid-dense .ui-grid-table .ui-grid-total td {
  font-size: var(--text-sm);
}
/* A ledger (P.0): the prototype's levande budget, row for row. A cost centre is a heading row in bold with its number
   and name and no amounts, with air over it; its accounts stand indented under it, where a name wraps; its sum is bold
   with a line over it. A zero is grey, and a mark after an amount says where it comes from, in capitals as the
   prototype's. The sizes are the grid's rhythm tokens (tokens.css, --grid-*), for the forecast to take as well. */
.ui-grid-ledger .ui-grid-table {
  font-size: var(--text-grid);
}
.ui-grid-ledger .ui-grid-table td,
.ui-grid-ledger .ui-grid-table th {
  padding-right: var(--grid-cell-pad-x);
}
.ui-grid-ledger .ui-grid-table td.ui-grid-cell {
  height: var(--grid-row-min);
}
/* With a mouse the rows of a dense variant are as low as the prototype's (--grid-row-min-fine, Björn 31/10); with touch
   they keep the tap target (T2.7, pointer: coarse). The link fills the cell, as with a finger. */
@media (pointer: fine) {
  .ui-grid-dense .ui-grid-table td.ui-grid-cell,
  .ui-grid-ledger .ui-grid-table td.ui-grid-cell {
    height: var(--grid-row-min-fine);
  }
  .ui-grid-dense .ui-grid-table td > a.ui-grid-link,
  .ui-grid-ledger .ui-grid-table td > a.ui-grid-link {
    min-height: var(--grid-row-min-fine);
  }
  .ui-grid-dense .ui-grid-editor,
  .ui-grid-ledger .ui-grid-editor {
    height: var(--grid-row-min-fine); /* the row keeps its height while a cell is written in */
  }
}
.ui-grid-ledger .ui-grid-table td:first-child {
  min-width: var(--grid-name-min);
}
.ui-grid-ledger .ui-grid-table .ui-grid-group td {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-grid-group);
  padding-top: var(--grid-group-space);
  padding-bottom: var(--grid-cell-pad-y);
  border-bottom: var(--line-thin) solid var(--color-border);
}
/* A heading row that opens a part of the ledger, as the forecast's Kostnader per kostnadsställe: more air over it and a
   heavier line under it, as the prototype's tr.grp with padding-top 26 px and border-bottom 2 px (P.0, round 3). */
.ui-grid-ledger .ui-grid-table .ui-grid-section td {
  padding-top: calc(var(--grid-group-space) + var(--space-4));
  border-bottom: var(--line-medium) solid var(--color-border-strong);
}
.ui-grid-ledger .ui-grid-table td.ui-grid-indent {
  padding-left: calc(var(--space-6) + var(--grid-indent));
  color: var(--color-text-2);
}
/* The air between two sums in the ledger (the living budget and the forecast) is at least --grid-sum-gap (P.0 round 6): the
   cell's own air after the figure and the rest before it, so that the right edge stays under the heading's. The summary's
   sheet has --grid-sheet-sum-gap (T2.51c). */
.ui-grid-ledger .ui-grid-table .ui-grid-subtotal td.ui-num,
.ui-grid-ledger .ui-grid-table .ui-grid-total td.ui-num {
  padding-left: calc(var(--grid-sum-gap) - var(--grid-cell-pad-x));
}
.ui-grid-ledger .ui-grid-table .ui-grid-subtotal td,
.ui-grid-ledger .ui-grid-table .ui-grid-total td {
  font-weight: var(--weight-bold);
  padding-top: var(--grid-cell-pad-y);
  padding-bottom: var(--grid-cell-pad-y);
  border-top: var(--line-thin) solid var(--color-border-strong);
  border-bottom: var(--line-thin) solid var(--color-border);
}
.ui-grid-ledger .ui-grid-table .ui-grid-total td {
  border-top-width: var(--line-medium);
}
/* Senaste on a total is small and regular in its grey, as the prototype's muted 13 px beside the forecast (P.0). */
.ui-grid-ledger .ui-grid-table .ui-grid-total td.ui-grid-reference {
  font-weight: var(--weight-regular);
  font-size: var(--text-sm);
}
/* The line over a sum is the only one: the row over it has none, as in the prototype's collapsed borders. */
.ui-grid-ledger .ui-grid-table tr:has(+ .ui-grid-subtotal) td {
  border-bottom-color: transparent;
}
.ui-grid-ledger .ui-grid-table td.ui-grid-zero {
  color: var(--color-text-3);
}
.ui-grid-ledger .ui-grid-table .ui-grid-note {
  font-size: var(--text-grid-sub);
}
.ui-grid-ledger .ui-grid-table td.ui-grid-cell-sub .ui-grid-note {
  margin-left: auto;
}
/* A mark after an amount or a name (auto, 1 inköp, tillagd), as the prototype's: capitals without the badge's dot and
   edge; the words say it, never the colour alone. A linked amount with a mark keeps the mark on its line. */
.ui-grid-ledger .ui-grid-table .ui-badge,
.ui-ledger-section .ui-table .ui-badge {
  margin-left: var(--space-3);
  padding: 0 var(--space-3);
  border-color: transparent;
  font-size: var(--text-col-head);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.ui-grid-ledger .ui-grid-table .ui-badge::before,
.ui-ledger-section .ui-table .ui-badge::before {
  content: none;
}
/* Rows folded out under a row (ui-grid-sub, D-TAB-29, 1c.12d.2, K128): the labelled arrow after the row's
   name with the count as text ("2 ÄTA", the labelled chevron of K43), closed at first and open in the colour of
   action; the rows under it in the smaller grey text, their names one step further in than the row's, and a
   comparison that is outside every sum as a text over the columns after the amount, its label quiet and its share or
   warning on the same line. The rows are outside the keyboard's rows and the sums. */
.ui-grid-table .ui-row-toggle.ui-grid-toggle {
  width: auto;
  margin-left: var(--space-3);
  padding-right: var(--space-2);
  vertical-align: middle;
  min-height: var(--row-control-min);
}
.ui-grid-table tr.ui-grid-sub > td {
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-grid-ledger .ui-grid-table td.ui-grid-indent.ui-grid-sub-name {
  padding-left: calc(var(--grid-indent) * 2);
}
.ui-grid-table td.ui-grid-sub-name > .ui-number-link {
  display: inline;
  margin-right: var(--space-3);
}
/* With touch the number of a row under the row (Ä3) is a tap target of 44 by 44 px, as every other (catalog smoke:
   every tap target is at least 44 by 44 px); with a mouse it stays inline in the dense row. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-grid-table td.ui-grid-sub-name > .ui-number-link {
    display: inline-flex;
    align-items: center;
    min-width: var(--target-min);
    min-height: var(--target-min);
    vertical-align: middle;
  }
}
.ui-grid-table td.ui-grid-sub-ref {
  text-align: left;
  white-space: nowrap;
}
.ui-grid-table .ui-grid-sub-label,
.ui-grid-table .ui-grid-sub-none {
  color: var(--color-text-3);
}
.ui-grid-table .ui-grid-sub-label {
  margin-right: var(--space-3);
}
.ui-grid-table td.ui-grid-sub-ref > .ui-cell-detail {
  display: inline;
  margin-left: var(--space-6);
}
.ui-grid-table td.ui-grid-cell-badged > a.ui-grid-link {
  display: inline-flex;
  vertical-align: middle;
}
/* A mark after the amount goes under it, at the cell's right edge, when the column does not have room for both, and
   the cell grows with it (Pilot-42 27/11 03.1x, A: a line break in the variant, T2.191): with IBM Plex Sans the living
   budget's AUTO and "2 inköp" beside their amounts made the grid wider than its box at 1366 px with the side menu open. */
.ui-grid-table td.ui-grid-cell-badged {
  white-space: normal;
}
.ui-grid-table td.ui-grid-cell-badged > a.ui-grid-link {
  height: auto;
}
/* A mark under the amount, at the cell's right edge. */
.ui-grid-table td.ui-grid-cell-stacked {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
/* The link keeps the tap target's height (T2.7), and the cell grows with the text under it. */
.ui-grid-table td.ui-grid-cell-stacked > a.ui-grid-link,
.ui-grid-table td.ui-grid-cell-sub > a.ui-grid-link {
  height: auto;
}
.ui-grid-table td.ui-grid-cell-stacked > .ui-badge {
  display: flex;
  width: max-content;
  margin-left: auto;
}
/* An amount that waits for attestation, as the prototype's td.ejatt: the warning's tone, and its mark says it. */
.ui-grid-table td.ui-grid-cell-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning-text);
}
/* A sub heading of a ledger's page, as Intäkter and Kostnader: air over it and a little under, as the prototype's h3. */
.ui-ledger-section {
  margin-top: calc(var(--grid-heading-before) - var(--space-7)); /* over the island's gap between its parts */
}
.ui-ledger-section > h2,
.ui-ledger-section .ui-table > caption {
  margin: 0;
  padding-bottom: var(--grid-heading-after);
}
/* The prototype's h3 over its tables, in bold: Intäkter, Kostnader and Inköp mot budget. */
.ui-ledger-section > h2,
.ui-ledger-section .ui-table > caption,
.ui-ledger-panel .ui-panel > h2,
h2.ui-ledger-heading {
  font-size: var(--text-grid-heading);
  font-weight: var(--weight-bold);
}
/* The smaller sub headings of a ledger's page, as the forecast's Justeringar intäkter, Justeringar kostnader and
   Försättsblad (P.0, round 3): the prototype's h3 in 16 px, with what it does after it in a smaller, regular grey
   (ui-heading-note), air over and a little under; a short text under it is small and grey, as the prototype's note. */
.ui-ledger-minor h3 {
  font-size: var(--text-lg);
  padding-bottom: var(--grid-heading-after);
}
.ui-ledger-minor > * + * {
  margin-top: var(--grid-heading-before);
}
.ui-ledger-minor p {
  margin: 0;
  font-size: var(--text-sm);
}
.ui-ledger-minor .ui-actions {
  margin-top: var(--grid-heading-after);
}
.ui-heading-note {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-xs);
  letter-spacing: normal;
  color: var(--color-text-2);
}
/* In a view of the island the heading and its grid are parts with the island's gap: the gap is the air under it. */
.ui-island > .ui-ledger-section[data-view]:not([hidden]) {
  gap: var(--grid-heading-after);
}
.ui-island > .ui-ledger-section[data-view] > h2 {
  padding-bottom: 0;
}
/* Where a figure comes from (the prototype's in, auto, fromprog and draft): written by the management, counted because
   nothing is written, from the project's version, or a draft's that is not locked. Not by colour alone. */
.ui-grid-table td.ui-grid-given {
  background: var(--color-editable);
  font-weight: var(--weight-medium);
}
.ui-grid-table td.ui-grid-derived {
  font-style: italic;
  color: var(--color-text-2);
}
/* A negative figure that is counted stays red on the screen, as every negative amount (G2 on #319); the printout's
   figures are black (the pilot session 24/10). */
.ui-grid-table td.ui-grid-derived.ui-neg {
  color: var(--color-negative-amount);
}
/* Where a figure comes from, as the prototype's td.fromprog and td.draft (P.0 round 5, --source-marker): a figure from
   the project's forecast dotted, a draft's dashed and in the warning's text colour (a negative one stays red). */
.ui-grid-table td.ui-grid-from-version {
  text-decoration: var(--source-marker);
  text-underline-offset: var(--source-marker-offset);
}
.ui-grid-table td.ui-grid-draft {
  color: var(--color-warning-text);
  text-decoration: var(--source-marker-draft);
  text-underline-offset: var(--source-marker-offset);
}
.ui-grid-table td.ui-grid-draft.ui-neg {
  color: var(--color-negative-amount);
}
.ui-grid-table .ui-grid-changed td:first-child {
  box-shadow: inset var(--line-thick) 0 0 0 var(--color-warning);
}
/* A heading over a run of columns (groups, P.0): the summary's Hela projektet, Omsättning per år, Successiv
   vinstavräkning and Jämförelse, as the customer's sheet and the prototype have them, in a row of its own above the
   column headings. The row scrolls away with the grid, and the column headings stay at the top. Each heading is a band
   over its columns, with air between the bands, so that the groups are seen apart. */
.ui-grid-table .ui-grid-groups > th,
.ui-grid-table .ui-grid-groups > td {
  position: static;
  padding: var(--space-3) 0 0 0;
  border-bottom: 0;
}
.ui-grid-table .ui-grid-groups > td.ui-grid-fixed {
  position: sticky;
}
.ui-grid-table .ui-grid-groups > th.ui-grid-group-head {
  text-align: center;
  vertical-align: bottom;
}
.ui-grid-group-label {
  display: block;
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--line-medium) solid var(--color-border-strong);
  background: var(--color-surface-2);
  color: var(--color-text-2);
  white-space: normal; /* a long heading wraps rather than widen its columns */
}
/* In the summary's sheet a negative figure in the column that is only there to compare with (ui-grid-reference) stays
   red, as every negative amount there. */
.ui-grid-dense .ui-grid-table td.ui-grid-reference.ui-neg {
  color: var(--color-negative-amount);
}
/* The summary's closing row, Slutlig omsättning och resultat (P.0): the year's figures, set apart from the sums above
   them by a band and a thick line in the colour of action, as the prototype's last row. */
.ui-grid-table .ui-grid-closing td,
.ui-grid-table .ui-grid-closing td.ui-grid-fixed {
  background: var(--color-surface-2);
  border-top: var(--line-thick) solid var(--color-action);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}
/* The summary's sheet (ui-grid-sheet, P.0): the prototype's table.sva, ported (dashboard_mall.html ba101fe, Björn 31/10
   "portera, tolka inte"). The bands over the groups of columns in the colour of action's soft surface, the column
   headings over a thick line, the headings Kommande projekt and Interna projekt in bold with the tag "anges här", the
   remark small and grey, Diff as a green or red cell with its sign, the sum row on the second surface under a thick
   line, and the closing row on action's soft surface under a thick line in action's colour, with the sheet's reminder
   after the figures. */
/* Less air after a cell than the dense grid's, so that the sheet with Källa still fits 1440 px without scrolling sideways
   (1e.6, P.0 round 4), --grid-sheet-cell-gap (tokens.css). */
.ui-grid-sheet .ui-grid-table td,
.ui-grid-sheet .ui-grid-table th {
  padding-right: var(--grid-sheet-cell-gap);
}
.ui-grid-sheet .ui-grid-table .ui-grid-groups > th,
.ui-grid-sheet .ui-grid-table .ui-grid-groups > td {
  padding: 0 0 var(--space-3) 0;
}
.ui-grid-sheet .ui-grid-group-label {
  margin-right: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 0;
  border-radius: var(--radius-sm);
  background: var(--color-action-soft);
  color: var(--color-text);
}
.ui-grid-sheet .ui-grid-group-label {
  white-space: nowrap; /* on one line over its columns, as the prototype's */
}
/* A heading breaks only where the view says (a line break in its label, as the prototype's <br>), so that it is at
   most two lines in every width (Björn 31/10 kväll). */
.ui-grid-sheet .ui-grid-table thead tr:last-child th {
  letter-spacing: var(--tracking-sheet-head); /* round 10: room for 1440 px */
  white-space: pre;
  border-bottom: var(--line-medium) solid var(--color-border-strong);
}
/* A thin line between the column headings (--grid-head-divider), inside the cell's own air and so without width; not after
   the last heading, nor after Namn, which has its own line (--grid-fixed-3), and not on the bands or the data cells. */
.ui-grid-sheet .ui-grid-table thead tr:last-child th:not(:last-child, .ui-grid-fixed-3) {
  box-shadow: inset calc(-1 * var(--line-thin)) 0 0 0 var(--grid-head-divider);
}
/* Air before a left-aligned column heading (--grid-head-indent), in the heading row only; those columns' widths are fixed or set by their content. The first column keeps a table's own air. */
.ui-grid-sheet .ui-grid-table thead tr:last-child th:not(.ui-num, :first-child) {
  padding-left: var(--grid-head-indent);
}
.ui-grid-sheet .ui-grid-table .ui-grid-group td {
  padding-top: var(--space-7);
  font-size: var(--text-sheet-group);
  font-weight: var(--weight-bold);
  border-bottom: var(--line-thin) solid var(--color-border);
}
.ui-grid-sheet .ui-grid-table .ui-grid-group .ui-grid-note {
  display: inline-block;
  margin-left: var(--space-4);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-action-soft);
  color: var(--color-action);
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  vertical-align: var(--space-1);
}
/* A group's note that is a source's mark (data-source="excel"): the upcoming rows of a version read in from the
   customer's sheet, which are not written here, in the neutral tone of Källa's Excel and not the action's (1e.1a). */
.ui-grid-sheet .ui-grid-table .ui-grid-group .ui-grid-note[data-source="excel"] {
  background: var(--color-surface-2);
  color: var(--color-text);
  box-shadow: inset 0 0 0 var(--line-badge) var(--color-text-2);
}
/* A name on one line, clipped with an ellipsis at its column's fixed width, the whole name in the cell's title (round 8). */
.ui-grid-sheet .ui-grid-table td.ui-grid-clip {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* A wide sheet yields in its text columns (T2.69): Namn and Anmärkning, which are clipped with an ellipsis, shrink from
   their widths (--grid-fixed-3, --grid-remark-max) to their floors (--grid-name-floor, --grid-remark-floor) before
   anything scrolls sideways. An amount or a percentage is never clipped: its column keeps its content's width. A clipped
   cell has max-width 0, so that its text does not count for the width the table needs; its width and floor decide. */
.ui-grid-sheet .ui-grid-table td.ui-grid-clip.ui-grid-fixed-3,
.ui-grid-sheet .ui-grid-table th.ui-grid-fixed-3 {
  min-width: var(--grid-name-floor);
}
.ui-grid-sheet .ui-grid-table td.ui-grid-clip.ui-grid-fixed-3 {
  max-width: 0;
}
.ui-grid-sheet .ui-grid-table th.ui-grid-fixed-3 {
  max-width: none;
}
/* Anmärkning's wanted width sits on its heading (ui-grid-remark-head, which the sheet's model gives the column of COL.remark),
   because a cell with max-width 0 has no width of its own. */
.ui-grid-sheet .ui-grid-table thead th.ui-grid-remark-head {
  width: var(--grid-remark-max);
  min-width: var(--grid-remark-floor);
}
.ui-grid-sheet .ui-grid-table td.ui-grid-remark {
  min-width: var(--grid-remark-floor);
  max-width: 0;
  overflow: hidden;
  font-size: var(--text-2xs);
  color: var(--color-text-2);
  white-space: nowrap;
  text-overflow: ellipsis; /* the whole text in the cell's title, as the prototype's td.anm (round 7) */
}
.ui-grid-sheet .ui-grid-table td.ui-grid-diff.ui-grid-under {
  background: var(--color-positive-soft);
  color: var(--color-positive-text);
  font-weight: var(--weight-bold);
}
.ui-grid-sheet .ui-grid-table td.ui-grid-diff.ui-neg {
  background: var(--color-error-soft);
  color: var(--color-negative-amount);
  font-weight: var(--weight-bold);
}
.ui-grid-sheet .ui-grid-table tfoot td {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
/* The sums in bold are wide: air before each figure, so that with its neighbour's air after (--grid-sheet-cell-gap) two figures
   stand at least --grid-sheet-sum-gap apart (round 6, T2.51c), while its right edge stays under its heading's (round 7). */
.ui-grid-sheet .ui-grid-table tfoot td.ui-num,
.ui-grid-sheet .ui-grid-table tfoot td.ui-grid-mute {
  padding-left: calc(var(--grid-sheet-sum-gap) - var(--grid-sheet-cell-gap));
}
.ui-grid-sheet .ui-grid-table tfoot tr[data-total="sums"] td {
  border-top: var(--line-medium) solid var(--color-border-strong);
  background: var(--color-surface-2);
}
.ui-grid-sheet .ui-grid-table .ui-grid-closing td,
.ui-grid-sheet .ui-grid-table .ui-grid-closing td.ui-grid-fixed {
  background: var(--color-action-soft);
  font-size: var(--text-md); /* the prototype's 15 px; --text-lg does not fit 1440 px with the rest (round 7) */
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.ui-grid-sheet .ui-grid-table td.ui-grid-mute {
  color: var(--color-text-3);
  white-space: normal;
}
/* A number in a column of its own that opens its page (P.0), as the table's number link (T2.42): the link's colour, and
   the underline at hover and focus. */
.ui-grid-table a.ui-number-link {
  color: var(--color-link);
  font-weight: var(--number-link-weight);
  text-decoration: none;
}
.ui-grid-table a.ui-number-link:hover,
.ui-grid-table a.ui-number-link:focus-visible {
  text-decoration: underline;
}
/* What the rows of a sheet are based on, under its row of buttons (the summary's, the prototype's svaund, P.0): a
   line of small text, with the part that warns in bold in the warning's text colour. */
.ui-grid-basis {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-grid-basis-warning {
  color: var(--color-warning-text);
}
/* The marks of a sheet's sources under it, each with its name (the prototype's legend2, P.0): the mark as the rows
   show it, and the version's figure with its dotted line. What they mean is said in a note, never only at hover. */
.ui-grid-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-7);
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-2);
}
.ui-grid-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
/* A legend's sample, as the prototype's .lgs: the word of the column Källa in a small frame, a draft's in the warning's
   colour with a dashed line under it, and the version's figure with its dotted line. */
.ui-grid-legend-mark {
  padding: 0 var(--space-2);
  border: var(--line-badge) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums;
}
.ui-grid-legend-mark[data-source="utkast"] {
  color: var(--color-warning-text);
  text-decoration: var(--source-marker-draft);
  text-underline-offset: var(--source-marker-offset);
}
.ui-grid-legend-mark[data-source="version"] {
  text-decoration: var(--source-marker);
  text-underline-offset: var(--source-marker-offset);
}
/* Källa, a column of its own after Namn (P.0 round 4), as the prototype's td.src: small grey text on one line, and a
   draft's in the warning's text colour and bold. */
.ui-grid-table td.ui-grid-source {
  font-size: var(--text-2xs);
  color: var(--color-text-2);
  white-space: nowrap;
}
.ui-grid-table td.ui-grid-source.ui-grid-source-draft {
  color: var(--color-warning-text);
  font-weight: var(--weight-bold);
}
/* Every other row of a dense sheet tinted, so that a row is followed across eighteen columns (the prototype's, Jesper
   22/10). The cells a figure is written in, the selected and the given keep their own surface. */
.ui-grid-dense :where(tbody > tr:nth-child(even)) > td {
  background: var(--color-surface-2);
}
.ui-grid-dense :where(tbody > tr:nth-child(even)) > td.ui-grid-fixed:where(:not(.ui-grid-given, .ui-grid-cell-editable, .ui-grid-cell-selected)) {
  background: var(--color-surface-2);
}
/* The keyboard on an iPad opens only for a field focused in the tap itself (frontend/forecast/dom.ts). */
.ui-grid-keyboard-catcher {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--space-1);
  height: var(--space-1);
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: var(--text-field);
  pointer-events: none;
}
/* The interactive chart of a heavy view (ECharts, loaded when shown, decision 0005). Every touch lands on the
   chart's own element, never on a bar, so that two fingers on two bars zoom (found in trial PV2). */
.ui-chart-box {
  width: 100%;
  height: calc(var(--space-11) * 9);
  background: var(--color-surface);
}
.ui-chart-box svg {
  pointer-events: none;
}
.ui-grid-phone {
  display: none;
}
/* An island of a heavy view: its parts one under the other. */
.ui-island {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
/* The island's controls in the page's head (P.0.3): a place in the head's row of actions that the island fills, Lås
   and Lås upp beside Version, as parts of that row; on a phone, where the island is not shown, neither are they. */
.ui-island-tools {
  display: contents;
}
/* The table's heading row and its views, the grid and the chart, under it with the air of a sub heading (P.0.3). */
.ui-ledger-views {
  display: flex;
  flex-direction: column;
  gap: var(--grid-heading-after);
}
.ui-ledger-views > div[data-view]:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
/* A view of the island, the grid or the chart, with its parts one under the other as the island's: the grid, and the
   note and the keys under it, as the prototype's (P.0). */
.ui-island > [data-view]:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
/* An iPad standing up: the columns the grid's model marks are left out, as Senaste, as the island does (the core's
   hidden columns; frontend/forecast/model.ts, narrowColumns). Kommentar is shown, also while one edits, so that a note
   can be written beside its amount (1d.1.2). */
@media (max-width: 1179px) {
  .ui-grid-table .ui-grid-col-narrow {
    display: none;
  }
}
@media (max-width: 599px) {
  .ui-grid,
  .ui-island,
  .ui-island-tools {
    display: none;
  }
  .ui-grid-phone {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
}

/* ---- Print ---- */
.ui-print {
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--print-text);
  padding: var(--print-margin);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
.ui-print-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-7);
  border-bottom: var(--line-medium) solid var(--color-border-strong);
  padding-bottom: var(--space-4);
}
.ui-print-head h1,
.ui-print-title {
  font-size: var(--print-heading);
}
/* The paper heading is a paragraph without a heading role (P.0.15b) and looks as the h1 of the printout does. */
.ui-print-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
}
/* The heading of a page printed from the browser (paper, P.0.15): only on paper, where it stands in place of the
   page's head with its pickers. */
@media screen {
  .ui-print-head-paper {
    display: none;
  }
}
@media print {
  .ui-page:has(.ui-print-head-paper) .ui-page-head {
    display: none;
  }
}
/* The mark beside the heading (the variant mark, P.0.5), as doc-mark in print.css: what the document is for, "Intern". */
.ui-print-mark {
  display: inline-block;
  margin-left: var(--space-5);
  padding: var(--print-mark-pad-block) var(--print-mark-pad-inline);
  border: var(--line-thin) solid var(--print-mark-border);
  border-radius: var(--radius-sm);
  color: var(--print-mark-text);
  font-family: var(--font-body);
  font-size: var(--print-mark-size);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  vertical-align: middle;
}
.ui-print-meta {
  margin: 0;
  font-size: var(--print-text-small);
  color: var(--color-text-2);
  text-align: right;
}
.ui-print .ui-table th {
  position: static;
}
.ui-print-landscape {
  page: landscape;
}
/* A row only the paper has (P.0.17h2, F2 a): a list's foot shows the first rows on the screen, and the paper has every row
   of the selection, as the prototype prints its list. The table draws the rest after the shown rows (paper_rows), and the
   row is not shown on the screen, so it is out of the tab order and the accessibility tree there; the print block below
   makes it a row of the table. The sum row's text on paper says "Summa, 12 flaggade", where every row stands, and the
   screen's "Summa, alla 12 flaggade". */
.ui-table tr.ui-row-paper,
.ui-sum-label-paper {
  display: none;
}
.ui-signatures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--picker-min)), 1fr));
  gap: var(--space-10);
  margin-top: var(--space-9);
}
.ui-signature {
  border-top: var(--line-thin) solid var(--color-border-strong);
  padding-top: var(--space-2);
  margin-top: var(--print-signature-height);
  font-size: var(--print-text-small);
  color: var(--color-text-2);
}
@media print {
  .ui-band,
  .ui-sidenav,
  .ui-sidenav-bar,
  .ui-sidenav-scrim,
  .ui-shell > .ui-sidenav,
  .ui-shell > .ui-sidenav-bar,
  .ui-shell[data-sidenav-open] > .ui-sidenav-scrim,
  .ui-tabs,
  .ui-projectbar,
  .ui-actions,
  .ui-valuepicker .ui-valuepicker-arrow,
  .ui-table-sortbar,
  .ui-theme {
    display: none;
  }
  /* A heading row's choice of list (Visa Sammanställning) is a control, and paper has no controls (P.0.15c), on a
     page whose paper heading already says which list it is (the report); elsewhere the choice stays, as text without
     its arrow, since it says which part of the list the paper shows (a portfolio's Flaggade, a list's status). */
  .ui-page:has(.ui-print-head-paper) .ui-heading-filters {
    display: none;
  }
  /* the side menu's room (T2.27) is not kept on paper either */
  .ui-shell > .ui-shell-main {
    margin-left: 0;
  }
  body {
    background: var(--color-surface);
  }
  .ui-print {
    padding: 0;
  }
  .ui-table thead {
    display: table-header-group;
  }
  .ui-table tr {
    break-inside: avoid;
  }
  /* P.0.17h (granskningslistan 14): a list's foot (Visar N av M, Rader, Visa N till, Visa alla M) is a control, and
     paper has no controls; the sum row stands once, on the last sheet, as the header row stands on every sheet. A
     value picker that only chooses how the screen shows the list (screen_only, the ÄTA's order on the start page) is
     not printed either, while one that says which part of the list the paper shows (Period, Visa, Projektledare)
     stays as text without its arrow. */
  .ui-list-foot,
  .ui-valuepicker-screen-only {
    display: none;
  }
  .ui-table tfoot {
    display: table-row-group;
  }
  /* P.0.17h2 (the pilot 18/11): what can only be clicked is not printed: the chevron of a key figure card and the
     sort mark in a header row; the chosen card's frame stays. The rows only the paper has are rows of the table, and the
     sum row says "Summa, N flaggade" on paper. */
  .ui-card-chevron,
  .ui-sort-mark,
  .ui-sum-label-screen {
    display: none;
  }
  .ui-table tr.ui-row-paper {
    display: table-row;
  }
  .ui-sum-label-paper {
    display: inline;
  }
  /* P.0.17h2 (the pilot 18/11): the mouse and the focus a click leaves behind are not printed. A key figure card that
     was clicked shows its hover and focus frame on the screen only; on paper it is a card like the others, and only the
     chosen card (ui-card-current) has its ring. A row of a table is not shaded where the pointer last was, and a link
     in a table is not underlined for the same reason. The focus ring (the page's :focus-visible outline) is not printed
     either: it is what drew the second frame round the card the keyboard last was on. */
  :focus,
  :focus-visible {
    outline: none;
  }
  .ui-card-to:not(.ui-card-current):is(:hover, :focus, :focus-visible) {
    background: var(--color-surface);
    box-shadow: var(--shadow-card); /* the others' light shadow (D-KORT-10, T2.191), not the hover's inner frame */
  }
  .ui-card-to:is(:hover, :focus, :focus-visible) .ui-card-chevron {
    color: var(--color-text-2);
  }
  .ui-table tbody tr:hover td,
  .ui-table tbody tr[data-expands]:not(.ui-row-expanded):hover > td {
    background: none;
  }
  .ui-table a.ui-number-link:is(:hover, :focus, :focus-visible),
  .ui-table a.ui-code-link:is(:hover, :focus, :focus-visible) {
    text-decoration: none;
  }
}

/* ---- A column shown only on a wide screen (P.0.14, the pilot session 2/11) ---- */
/* wide_only on a table's column (components/table.html): under 1366 px of screen the column is not shown, and what it
   says stands in the row that folds out under its row, as the ÄTA list's Anteckningar, so that the list fits an iPad in
   landscape without scrolling sideways. On a phone the card decides, as before. */
@media (min-width: 600px) and (max-width: 1365px) {
  .ui-table .ui-col-wide-only {
    display: none;
  }
}
/* With the side menu open (T2.179c, Björn's decision A 25/11: no page folds it by itself) the column comes from
   --sidenav-open-min (1440 px), where the room beside the open menu holds the list (measured 26/11: at 1366 px with the
   menu open the list was 13 px wider than its box), so that it never scrolls sideways in its box from 1366 px with the
   menu open; what the column says stands in the post, as under 1366 px. A media query cannot read the
   token; tests/test_design.py keeps the width equal to it. */
@media (min-width: 1366px) and (max-width: 1439px) {
  html[data-sidenav-state="open"] .ui-table .ui-col-wide-only {
    display: none;
  }
}
/* wide_only="landscape" (P.0.17c, K13: "sekundära kolumner till utfällningen"): the same from iPad landscape,
   --bp-ipad-landscape (1180 px), as the portfolio's Kostnader and Ack. resultat, so that the list's first columns fit
   at 600 and 820 px and all of them from 1180 px. A media query cannot read the token; tests/test_design.py keeps the
   width equal to it. The rows fold out only there (more_below="landscape"): on a phone the compact card decides, and
   from 1180 px every column stands, so the chevron and the row under are not shown and a click on the row folds
   nothing (components.js reads whether the chevron is shown). On paper every column stands, as the prototype prints
   them (P.0.17h): the query is the screen's, since Chromium lays a printout out on the paper's width (about 1032 px
   on A4 landscape), and print hides the chevron and the row under below. */
@media screen and (min-width: 600px) and (max-width: 1179px) {
  .ui-table .ui-col-wide-only-landscape {
    display: none;
  }
}
/* wide_only="portrait" (the pilot session 13/11 on P.0.17c): the same only up to iPad portrait, --bp-ipad-portrait
   (820 px), as the portfolio's Projektledare and Prognos slutresultat, so that Projekt, Intäkter, Resultat, Marg. and
   Status fit from 600 px without scrolling sideways; from 820 px they stand. */
/* A sum row's label over such a column (|sum_narrow) is drawn twice, and the width shows one: over the whole span
   (ui-sum-wide), and from 600 to 819 px over the columns shown there (ui-sum-narrow), so that the sums stay under their
   columns. */
.ui-table tfoot td.ui-sum-narrow {
  display: none;
}
@media screen and (min-width: 600px) and (max-width: 819px) {
  .ui-table .ui-col-wide-only-portrait,
  .ui-table tfoot td.ui-sum-wide {
    display: none;
  }
  .ui-table tfoot td.ui-sum-narrow {
    display: table-cell;
    padding-left: var(--space-6);
  }
}
@media (max-width: 599px), (min-width: 1180px), print {
  .ui-table-more-below-landscape .ui-row-toggle,
  .ui-table-more-below-landscape tr.ui-row-more {
    display: none;
  }
  .ui-table.ui-table-more-below-landscape tr[data-expands] {
    cursor: auto;
  }
  .ui-table.ui-table-more-below-landscape tbody tr[data-expands]:not(.ui-row-expanded):hover > td {
    background: none;
  }
}

/* ---- The floating header row (ui-float, 1g.4c; the pilot session 12/11, for T2.60 as well) ----
   A wide thing that scrolls sideways in its own frame while the page scrolls up and down, as the prototype's pages do: never a
   box that scrolls in both directions. ui-float holds the head (ui-float-head) and the frame (ui-float-body, overflow-x only).
   With the script (components.js, setupFloatHead) the head floats at the top of the window under the page's sticky tabs
   (--float-head-top) while the frame passes under it, and the part of it that is as wide as the frame (ui-float-track) follows
   the frame's scroll sideways. It floats only while it is at most --float-head-share of the window's height (a phone in
   landscape keeps room for the rows), measured; else, and without the script, it is the page's own row. Its height is given as
   --float-head-height, so that what the keyboard reaches in the frame, with its focus ring, is never under it (scroll-margin-top). */
.ui-float {
  container-type: inline-size; /* what the head holds is as wide as the frame, not the drawing: a menu fits a phone */
}
.ui-float-head {
  background: var(--float-head-surface);
  box-shadow: var(--float-head-shadow);
}
html[data-js] .ui-float-floats > .ui-float-head {
  position: sticky;
  top: calc(var(--float-head-top) + var(--sticky-bar-height)); /* and under the edit bar of its own form (T2.140.1) */
  z-index: 4;
}
.ui-float-track {
  overflow-x: auto; /* without the script it scrolls by itself */
}
html[data-js] .ui-float-ready .ui-float-track {
  overflow-x: hidden; /* the frame moves it (scrollLeft), so it has no scroll bar of its own */
  overflow-y: hidden; /* and never one up and down: a hidden x alone makes y auto, a region axe wants the keyboard to reach (T2.138) */
}
.ui-float-body {
  overflow-x: auto;
  overflow-y: hidden;
}
.ui-float-body [tabindex],
.ui-float-body a {
  scroll-margin-top: calc(var(--float-head-height) + var(--float-head-ring-room)); /* the page's scroll-padding-top is what is above it (T2.140) */
}

/* ---- The schedule with its Gantt chart (1g.4, components/schedule_gantt.html): the SVG from the server, read only ---- */
.ui-gantt-svg {
  display: block;
  font-variant-numeric: tabular-nums;
}
/* The drawing in pieces (1g.4c, K29 B): the inner box is the width the drawing has, the top row sticks to the top of the frame, and
   the pictures of the columns Rad, Kod and Namn stick to its left, each a zero-high box with the picture overflowing, in the share of
   the width that those columns have of the whole drawing (--gantt-share). The table's own cells are drawn under them. */
.ui-gantt-inner {
  width: max-content;
  min-width: 100%;
}
.ui-gantt-inner-fit {
  width: 100%;
  min-width: var(--gantt-min);
  max-width: var(--gantt-max);
}
.ui-gantt-columns {
  position: relative; /* the menu's list hangs from the buttons' row */
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5) var(--space-3);
}
.ui-gantt-menu {
  position: static; /* the list hangs from the buttons' row, not from the button, so that it fits a phone */
}
.ui-gantt-menu-list {
  left: var(--space-5);
  right: auto;
  width: max-content;
  min-width: var(--gantt-menu-width-min);
  max-width: calc(100cqw - 2 * var(--space-5));
  max-height: calc(100dvh - var(--space-11));
  overflow-y: auto;
  display: none;
}
.ui-gantt-menu[open] > .ui-gantt-menu-list {
  display: block;
}
html[data-js] .ui-gantt-menu-apply {
  display: none;
}
.ui-gantt-menu-text,
.ui-gantt-menu-fixed,
.ui-gantt-menu-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
/* The note wraps within the menu, between words, and adds nothing to the menu's width: the rows set it (K29 B, the
   pilot session's comparison 12/11). */
.ui-gantt-menu-text {
  width: 0;
  min-width: 100%;
  padding: 0 var(--space-3) var(--space-3);
  white-space: normal;
  overflow-wrap: normal;
}
.ui-gantt-menu-fixed {
  display: flex;
  align-items: center;
  min-height: var(--gantt-menu-row-min);
  padding: 0 var(--space-3);
  font-size: var(--text-md);
  color: var(--color-text);
}
.ui-gantt-menu-always {
  margin-left: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-gantt-menu-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-5);
}
.ui-gantt-menu-item .ui-check {
  display: flex;
  align-items: center;
  min-height: var(--gantt-menu-row-min);
  padding: 0 var(--space-3);
}
.ui-gantt-head,
.ui-gantt-plate {
  position: relative;
}
.ui-gantt-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  width: calc(var(--gantt-share) * 100%);
  height: 0;
}
.ui-gantt-inner:not(.ui-gantt-inner-fit) .ui-gantt-sticky {
  width: max-content;
}
.ui-gantt-sticky .ui-gantt-svg {
  width: 100%;
  height: auto;
}
.ui-gantt-inner:not(.ui-gantt-inner-fit) .ui-gantt-sticky .ui-gantt-svg {
  width: auto;
}
.ui-gantt-head > .ui-gantt-sticky {
  z-index: 5;
}
/* The edge where the fixed columns end shows only while the frame is scrolled sideways (is-scrolled-x on ui-float-body,
   components.js), as every fixed column's edge (--grid-fixed-edge, granskningslistan 7): soft, and never without the script. */
.ui-float:has(.ui-float-body.is-scrolled-x) .ui-gantt-sticky .ui-gantt-svg {
  box-shadow: var(--grid-fixed-edge);
}
/* In a frame narrower than --bp-mobile (600 px) the fixed columns would be most of it (Rad and Namn are about 257 px of the 358
   px of a phone, G1 of 1g.4c), leaving the axis a sliver: there they scroll with the rest, as the drawing under them does. */
@container (max-width: 599px) {
  .ui-gantt-sticky {
    position: static;
  }
  .ui-float:has(.ui-float-body.is-scrolled-x) .ui-gantt-sticky .ui-gantt-svg {
    box-shadow: none;
  }
}
.ui-gantt-plate-touch {
  display: none;
}
/* The edit mode's drawing (chart.edit, 1g.5b) is whole, in a region of its own without the floating header row's frame: the
   region scrolls sideways by itself, and of the drawings of a mouse and of touch it shows the one that fits the pointer, as the
   plates do in the read view. Under --bp-mobile the narrow drawing is shown instead (below). */
.ui-gantt-scroll:not(.ui-float-body) {
  overflow-x: auto;
}
.ui-gantt-scroll:not(.ui-float-body) .ui-gantt-svg-touch {
  display: none;
}
@media (min-width: 600px) and (pointer: coarse), (min-width: 600px) and (any-pointer: coarse) {
  .ui-gantt-scroll:not(.ui-float-body) .ui-gantt-svg:not(.ui-gantt-svg-touch, .ui-gantt-svg-narrow) {
    display: none;
  }
  .ui-gantt-scroll:not(.ui-float-body) .ui-gantt-svg-touch {
    display: block;
  }
}
/* The drawing with the rows of touch (--gantt-row-touch) is the one that pointer: coarse shows, and with a mouse the one with the
   rows of --gantt-row; what is not shown is display: none, so a screen reader reads one table. As the other rules in this file,
   a computer that also has a touch screen (any-pointer: coarse) is given touch's. */

/* The year as a strip, one box per day (components/year_strip.html, 1g.8b1, K30): a week per column and a weekday per row,
   read only. A building day is an empty box with an edge, a weekend or holiday the Gantt chart's shade without an edge and
   a day off or vacation week hatched with an edge, so a state is never only a colour. The strip scrolls in its own region
   when it is wider than its box, with the weekdays' column standing still, and the page never does. */
.ui-year-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the frame is as wide as the box, never the table */
  gap: var(--space-5);
  min-width: 0;
}
.ui-year-strip-legend,
.ui-year-strip-totals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--year-strip-legend-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}
.ui-year-strip-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.ui-year-strip-legend .ui-year-strip-day {
  display: inline-block;
  flex: none;
}
.ui-year-strip-legend-week {
  font-size: var(--year-strip-week);
  font-weight: var(--year-strip-vacation-weight);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.ui-year-strip-totals strong {
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.ui-year-strip-frame {
  position: relative; /* the boxes' words for a screen reader stay inside the frame, never beyond the page */
  max-width: 100%;
  overflow-x: auto;
}
.ui-year-strip-table {
  border-collapse: separate;
  border-spacing: var(--year-strip-gap);
  font-size: var(--year-strip-week);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--year-strip-week-text);
}
.ui-year-strip-table th {
  padding: 0;
  font-weight: var(--weight-regular);
  text-align: center;
  white-space: nowrap;
}
.ui-year-strip-months th {
  padding-bottom: var(--space-2);
  font-weight: var(--weight-strong);
  text-align: left;
  color: var(--color-text);
}
.ui-year-strip-weeks th {
  padding-bottom: var(--space-2);
}
.ui-year-strip-weeks th.is-vacation {
  font-weight: var(--year-strip-vacation-weight);
  color: var(--color-text);
}
/* The weekdays' column and the corners stand still when the strip scrolls, with the colour of what the strip stands on,
   so that no box shows through them: the panel's surface, or the page's ground (ui-year-strip-on-ground, K78 v2 c) */
.ui-year-strip-table tbody th,
.ui-year-strip-corner {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0 var(--year-strip-label-gap) 0 0;
  text-align: left;
  background: var(--year-strip-weekday-bg);
}
.ui-year-strip-on-ground {
  background: var(--year-strip-weekday-bg-ground);
}
.ui-year-strip-on-ground .ui-year-strip-table tbody th,
.ui-year-strip-on-ground .ui-year-strip-corner {
  background: var(--year-strip-weekday-bg-ground);
}
.ui-year-strip-day,
.ui-year-strip-outside {
  box-sizing: border-box;
  width: var(--year-strip-cell);
  min-width: var(--year-strip-cell);
  height: var(--year-strip-cell);
  padding: 0;
}
.ui-year-strip-day.is-work {
  border: var(--line-thin) solid var(--year-strip-day-edge);
  background: var(--year-strip-day-surface);
}
.ui-year-strip-day.is-weekend,
.ui-year-strip-day.is-holiday {
  background: var(--year-strip-off);
}
.ui-year-strip-day.is-vacation,
.ui-year-strip-day.is-day_off {
  border: var(--line-thin) solid var(--year-strip-free-line);
  background: repeating-linear-gradient(
    135deg,
    var(--year-strip-free-line) 0 var(--line-thin),
    var(--year-strip-day-surface) var(--line-thin) var(--year-strip-hatch)
  );
}
/* A day with a name has the chart's box (K78 v2 b): no flash on a tap, and the day whose box is shown has the ring */
.ui-year-strip-day[data-chart-tip] {
  -webkit-tap-highlight-color: transparent;
}
.ui-year-strip-day.is-current {
  outline: var(--line-medium) solid var(--year-strip-current);
  outline-offset: var(--space-1);
}
/* The frame's ring only after the keyboard: the ring of the day is what a tap shows */
.ui-year-strip-frame:focus:not(:focus-visible) {
  outline: none;
}
/* The names as a list under a strip that stands alone (names, K78 v2 c): the date in bold, then the name and kind */
.ui-year-strip-names {
  display: grid;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.ui-year-strip-names-title {
  margin: 0;
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.ui-year-strip-names-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-text-2);
}
.ui-year-strip-names-list strong {
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-gantt-plate:not(.ui-gantt-plate-touch) {
    display: none;
  }
  .ui-gantt-plate-touch {
    display: block;
  }
}
/* Under --bp-mobile (600 px) the narrow drawing (K107 A, Björn 12/11) is the one shown, after the surface's width and
   whatever the pointer: drawn a unit to a pixel and never scaled (no --gantt-min), with tighter cells, without Kod and
   with Namn as wide as its names and narrowed by the script to what the region leaves (fitGanttNarrow), so that Start and Slut are in view at every width down to 320 px; its rows are --target-min (44 px). The
   bars and Föreg. are reached with a scroll to the side in the region, as before. */
.ui-gantt-svg.ui-gantt-svg-narrow {
  display: none;
}
@media (max-width: 599px) {
  .ui-gantt-svg.ui-gantt-svg-narrow {
    display: block;
  }
  .ui-gantt-svg:not(.ui-gantt-svg-narrow) {
    display: none;
  }
}
/* The schedule's edit mode (1g.5b, Björn 12/11): the plan as the read view draws it, and an open row's fields laid over its
   cells by components.js, which gives each field its cell's place, size, text size, weight and indent from the drawing
   (--cell-*), so the row never changes its height. Under the drawing, which is transparent, the marks of the cells whose
   value changed (Björn 12/11): a cell written in, clearly (ui-cell-written), a cell moved after its predecessor, a soft
   tone (ui-cell-followed), the Rad cell of a changed row, an edge at its start (ui-row-changed), and a Föreg. with an
   error (ui-cell-invalid); over it the open row's fields and the
   line of a row with an error, over the plan, or directly under the row over the table's width in view where the
   plan's part in view is too narrow for it (data-under, #2391). The fields are transparent, so the row reads as one in its tone, plain, changed or with an
   error (the pilot session 12/11); only the field with focus has an edge. Without the script the fields stand as rows
   under the drawing. */
.ui-gantt-edit {
  position: relative;
}
.ui-gantt-edit-live .ui-gantt-edit-drawing {
  position: relative;
  z-index: 1;
}
.ui-gantt-edit-under,
.ui-gantt-edit-live .ui-gantt-edit-fields {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ui-gantt-edit-live .ui-gantt-edit-fields {
  z-index: 2;
}
.ui-gantt-edit-live .ui-gantt-edit-row {
  display: none;
}
/* Without the script a row's fields stand in a line under the drawing, each with its column's name over it (G1 of
   #1450, Bör 5); with it the name is the drawing's heading and the label lets its field lie over the cell. */
.ui-gantt-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
}
.ui-gantt-field-label {
  display: grid;
  gap: var(--space-1);
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-gantt-edit-live .ui-gantt-field-label {
  display: contents;
}
.ui-gantt-edit-live .ui-gantt-field-name {
  display: none;
}
.ui-gantt-edit-live .ui-gantt-edit-row-open {
  display: contents;
}
.ui-gantt-edit-live .ui-gantt-cell-covered {
  visibility: hidden;
}
.ui-gantt-edit-live .ui-gantt-svg-edit {
  cursor: text;
}
.ui-gantt-edit-live .ui-gantt-field,
.ui-gantt-edit-mark,
.ui-gantt-row-error {
  position: absolute;
  left: var(--cell-left);
  top: var(--cell-top);
  width: var(--cell-width);
  height: var(--cell-height);
  margin: 0;
  box-sizing: border-box;
}
.ui-gantt-edit-live .ui-gantt-field {
  padding: 0 var(--cell-pad-end) 0 var(--cell-pad-start);
  border: 0;
  border-radius: 0;
  background: var(--gantt-field-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--cell-font);
  font-weight: var(--cell-weight);
  line-height: var(--cell-height);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis; /* a value its cell cuts ends in "…", as the read view's names; the name's whole is in the box */
  pointer-events: auto;
}
/* A field over a cell narrower than a tap target (Insats, #2391) reaches back over the cell before it by what it lacks,
   with a transparent border at its start, so that its target is --gantt-field-target wide with touch while its text,
   padding and inset focus edge (drawn inside the border) stay in its cell, which is drawn as dense as before. It reaches
   back, never forward: the field before it comes earlier in the row, so the reach lies over it and takes the tap, and
   the field after it keeps its own cell whole. */
.ui-gantt-edit-live .ui-gantt-field {
  --field-reach: calc(max(var(--cell-width), var(--gantt-field-target)) - var(--cell-width));
  left: calc(var(--cell-left) - var(--field-reach));
  width: calc(var(--cell-width) + var(--field-reach));
  border-left: var(--field-reach) solid transparent;
  background-clip: padding-box;
}
/* The one of Insats and Slut that is counted from the other (1g.5c, the prototype's tpber): grey, with and without the
   script, while the one written is plain. */
.ui-gantt-field.ui-gantt-field-counted {
  color: var(--gantt-field-counted-text);
}
.ui-gantt-edit-live .ui-gantt-field[data-align="end"] {
  text-align: end;
}
.ui-gantt-edit-live .ui-gantt-field:focus {
  outline: none;
  box-shadow: inset 0 0 0 var(--gantt-field-focus-line) var(--gantt-field-focus);
}
.ui-gantt-edit-mark.ui-cell-written {
  background: var(--gantt-cell-written-surface);
  box-shadow: inset 0 0 0 var(--line-thin) var(--gantt-cell-written-edge);
}
.ui-gantt-edit-mark.ui-cell-followed {
  background: var(--gantt-cell-followed-surface);
}
.ui-gantt-edit-mark.ui-row-changed {
  background: var(--gantt-cell-followed-surface);
  box-shadow: inset var(--gantt-row-changed-line) 0 0 0 var(--gantt-row-changed-edge);
}
.ui-gantt-edit-mark.ui-cell-invalid {
  background: var(--table-cell-invalid-surface);
  box-shadow: inset 0 0 0 var(--line-thin) var(--table-cell-invalid-border);
}
/* The active row (1g.5d.2, D-DIAG-28): the open row is the active one, with an edge over its width in view
   (ui-gantt-row-active, in the fields' layer, never taking a tap) and the one row menu over its Rad cell
   (ui-gantt-row-menu, components/menu.html with icon), which components.js lays there; both have the row's height, so
   that the row never grows. With touch the button is --gantt-row-menu-target wide: it reaches back from the Rad cell by
   what it lacks, with a border nobody sees (as Insats, #2391), so that Namn's text is never under it. The list opens
   under the row or above it (placePop), never on it. */
.ui-gantt-row-active {
  position: absolute;
  left: var(--cell-left);
  top: var(--cell-top);
  width: var(--cell-width);
  height: var(--cell-height);
  box-sizing: border-box;
  box-shadow: inset 0 0 0 var(--gantt-row-active-line) var(--gantt-row-active-edge);
  pointer-events: none;
}
.ui-gantt-row-menu {
  --menu-reach: calc(max(var(--cell-width), var(--gantt-row-menu-target)) - var(--cell-width));
  position: absolute;
  z-index: 2;
  left: calc(var(--cell-left) - var(--menu-reach));
  top: var(--cell-top);
  height: var(--cell-height);
}
.ui-gantt-row-menu .ui-menu {
  height: 100%;
}
.ui-gantt-row-menu .ui-menu-button {
  justify-content: center;
  width: calc(var(--cell-width) + var(--menu-reach));
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: var(--menu-reach) solid transparent;
  border-radius: 0;
  background: var(--gantt-row-menu-surface);
  background-clip: padding-box;
  box-shadow: inset 0 0 0 var(--gantt-row-active-line) var(--gantt-row-active-edge);
  color: var(--gantt-row-menu-text);
}
.ui-gantt-row-menu .ui-menu-button:hover,
.ui-gantt-row-menu .ui-menu-button:focus-visible,
.ui-gantt-row-menu .ui-menu[open] > .ui-menu-button {
  background: var(--gantt-row-menu-hover);
}
.ui-gantt-row-menu .ui-menu-list {
  right: auto;
  left: 0;
}
/* A menu's button that is a sign (menu.html icon, 1g.5d.2): three dots over each other in the text's colour, no box. */
.ui-menu-button-icon {
  border-color: transparent;
  background: none;
}
.ui-menu-icon {
  display: block;
  width: var(--menu-icon-dot);
  height: calc(var(--menu-icon-step) * 3);
  background: radial-gradient(circle closest-side, currentColor 98%, transparent) 0 0 / var(--menu-icon-dot) var(--menu-icon-step) repeat-y;
}
/* The frozen heading (decision 0005, 1g.5b round 15 A5 and A6): a copy of the drawing's head that components.js
   (ganttHead) lays at the line that sticks at the top (--head-top), the edit bar's lower edge in the edit mode and the
   page's sticky line in the read view, over the region's width while the drawing's own head is under it, and moves
   with the region's scroll to the side (--head-shift), so that the columns' names and the axis are never hidden. It
   lies over the open row's fields and takes their taps, as a table's header row that sticks. The read view lays it in
   the region's parent, which the script marks ui-gantt-head-home. */
.ui-gantt-head-home {
  position: relative;
}
.ui-gantt-edit-head {
  position: absolute;
  z-index: 3;
  left: var(--head-left);
  top: var(--head-top);
  width: var(--head-width);
  height: var(--head-height);
  overflow: hidden;
  background: var(--color-surface);
  font-variant-numeric: tabular-nums;
}
.ui-gantt-edit-head-drawing {
  position: absolute;
  top: 0;
  left: var(--head-shift);
  display: block;
}
.ui-gantt-row-error {
  padding: 0 var(--cell-pad-start);
  overflow: hidden;
  background: var(--table-cell-invalid-surface);
  color: var(--gantt-row-error-text);
  font-size: var(--cell-font);
  line-height: var(--cell-height);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-gantt-svg-fit {
  width: 100%;
  height: auto;
}
.ui-gantt-fold,
.ui-gantt-svg [data-full-name],
.ui-gantt-name-hit {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* The ring on a name only after the keyboard, as on the grid's active cell: a tap shows the box and nothing else */
:root:not([data-last-input="keyboard"]) .ui-gantt-svg [data-full-name]:focus {
  outline: none;
}
/* The focused name's ring, drawn on its twin in the picture of the fixed columns that lies over it (components.js,
   setupGanttNames; G1 of 1g.4c): the same ring as every focus, so that it shows whole */
.ui-gantt-sticky [data-full-name].is-focus-ring {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: var(--line-medium);
}
.ui-gantt-status {
  font-size: var(--text-xs);
  color: var(--color-text-2);
}
/* No generous air on a phone (Björn, 1g.5b round 15 A5): the calendar's line over the drawing has no margins of its own,
   only the panel's gap, and its link Projektets kalender keeps its tap target of --target-min but takes only its text's
   height in the line, the rest standing over the air beside it. */
@media (max-width: 599px) {
  .ui-gantt-status {
    margin-block: 0;
  }
  .ui-gantt-status > .ui-button-link {
    margin-block: calc((var(--text-lg) * var(--leading-tight) - var(--target-min)) / 2);
  }
}
/* The key under the drawing with the band (1g.8c, K30), as the sketch's: small italic text in a row that wraps, a swatch beside
   the shade's and the band's text (the drawing's shade and stripes), and every item says its meaning in words. */
.ui-gantt-key {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-7);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-2);
}
.ui-gantt-key-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.ui-gantt-swatch {
  flex: none;
  width: var(--gantt-key-swatch);
  height: var(--gantt-key-swatch);
  border: var(--line-thin) solid var(--gantt-line);
  background: var(--color-surface);
}
.ui-gantt-swatch-shade {
  background: var(--gantt-shade);
}
.ui-gantt-swatch-band {
  background: repeating-linear-gradient(
    135deg,
    var(--gantt-band-line) 0 var(--gantt-key-stripe),
    transparent var(--gantt-key-stripe) var(--gantt-key-step)
  );
}
/* A wait in calendar days (1g.25.1, K90 A): the dashes of the drawing as a short line in the link's tone, twice a swatch
   wide, and the term before its words in bold, upright in the italic key. */
.ui-gantt-swatch-wait {
  width: calc(2 * var(--gantt-key-swatch));
  height: 0;
  border: 0;
  border-top: var(--line-medium) dashed var(--gantt-link);
  background: none;
}
.ui-gantt-key-term {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
}
/* The edit mode's old place (K107 B): the drawing's light surface, stripes at 45 degrees and thin edge in the old
   place's tokens, as the striped place behind a moved bar. */
.ui-gantt-swatch-before {
  border-color: var(--gantt-bar-before-line);
  background:
    repeating-linear-gradient(
      135deg,
      var(--gantt-bar-before-line) 0 var(--gantt-key-stripe),
      transparent var(--gantt-key-stripe) var(--gantt-key-step)
    ),
    var(--gantt-bar-before-surface);
}

/* Event list (1g.11, K48): the site diary's events in the order written, time, type and author on one line and the text
   under it. The author goes to the right, and under the type when the line is too narrow. */
.ui-events {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ui-event {
  padding: var(--event-gap) 0;
  border-bottom: var(--event-divider);
}
.ui-event:first-child {
  padding-top: 0;
}
.ui-event-pending {
  padding-left: var(--space-4);
  border-left: var(--event-pending-edge);
}
.ui-event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font-size: var(--text-sm);
}
.ui-event-time {
  color: var(--color-text-2);
  font-variant-numeric: tabular-nums;
}
.ui-event-type {
  font-weight: var(--weight-strong);
}
.ui-event-author {
  margin-left: auto;
  color: var(--color-text-2);
}
.ui-event-note {
  margin: var(--space-1) 0 0;
  color: var(--color-text-2);
  font-size: var(--text-xs);
}
.ui-event-text {
  margin: var(--space-2) 0 0;
  overflow-wrap: break-word;
}
.ui-event-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}
/* A mark that is words and not a status badge (1g.11i, K48): the count of an event's photos, in the muted text. */
.ui-event-mark-text {
  color: var(--color-text-2);
  font-size: var(--text-xs);
}
/* A row that opens (rows_open, the field notes' list, 1g.11h.2, #2835): the head and the text are one link with a tap
   target of at least 44 px, in the text's colour, and the one open in the side panel has the accent's line at the left
   (aria-current). Where the note went is a soft mark of its own that links (K64's chip dn), outside the row's link. */
.ui-event-open {
  display: block;
  min-height: var(--target-min);
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-3));
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}
.ui-event-open:hover {
  background: var(--event-open-hover);
}
.ui-event-open[aria-current="true"] {
  box-shadow: inset var(--event-open-current-width) 0 0 var(--event-open-current);
}
.ui-event-mark-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--event-target-pad);
  border-radius: var(--event-target-radius);
  /* the soft surface as high as the words, in a tap target of 44 px */
  background: linear-gradient(var(--event-target-bg), var(--event-target-bg)) center / 100% var(--event-target-height)
    no-repeat;
  color: var(--event-target-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  text-decoration: none;
}
.ui-event-mark-link:hover {
  text-decoration: underline;
}
/* The signal of an event (Foto saknas., K31): the signals' dot and calm text, with Ta foto on the same line. */
.ui-event-signal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--signal-dot-gap);
  margin: var(--space-2) 0 0;
  color: var(--event-signal);
  font-size: var(--signal-size);
}
.ui-event-signal::before {
  content: "";
  flex: none;
  width: var(--signal-dot);
  height: var(--signal-dot);
  border-radius: var(--radius-round);
  background: var(--event-signal-dot);
}
.ui-event-head .ui-option-symbol {
  align-self: center;
}
/* The field notes' row (K64, the pilot session's side by side 13/11; type_first in components/event_list.html): the type
   in bold first, then "when · who" together in the muted text, one unit that goes under the type when the row is too
   narrow. The author does not go to the right as in the diary's row. */
.ui-events-typed .ui-event-meta {
  color: var(--color-text-2);
  font-size: var(--text-xs);
}
.ui-events-typed .ui-event-author {
  margin-left: 0;
}
/* Who sees an event (1g.11.5, K57; components/parts/event_share.html): on a phone the toggle Intern | Till beställaren,
   or its words for one who only reads, stands under the event, and from 600 px to the right of it, at its top, with
   the event's lines in the column beside it. The toggle is the secondary button's (aria-pressed, --toggle-on-*) in a
   compact row of actions, 36 px with a mouse and the tap target with touch. The person stamp of a change after the
   signing stands under the event without the card foot's line. */
.ui-event-share {
  margin: var(--space-3) 0 0;
}
.ui-event-share-text {
  margin: 0;
  color: var(--color-text-2);
  font-size: var(--text-xs);
}
.ui-event .ui-source-stamp-by {
  margin: var(--space-2) 0 0;
  padding: 0;
  border: 0;
}
@media (min-width: 600px) {
  .ui-event-shared {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--space-6);
  }
  .ui-event-shared > * {
    grid-column: 1;
  }
  .ui-event-shared > .ui-event-share {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: start;
    margin: 0;
  }
}

/* The symbol of an option and of an event (1g.11, K48; components/parts/option_symbol.html): lines only with round ends
   in a little box with the tone's surface and edge, beside the name and never alone (aria-hidden). The tone is the
   badge's (warning, critical) or the salvia's (accent), and neutral without one, so that a form says the kind and the
   colour only adds to it. */
.ui-option-symbol {
  flex: none;
  box-sizing: content-box;
  width: var(--option-symbol-size);
  height: var(--option-symbol-size);
  padding: var(--option-symbol-pad);
  border: var(--line-thin) solid var(--option-symbol-edge);
  border-radius: var(--option-symbol-radius);
  background: var(--option-symbol-bg);
  color: var(--option-symbol-text);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--option-symbol-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.ui-option-symbol-dot {
  fill: currentColor;
  stroke: none;
}
.ui-option-symbol-warning {
  border-color: var(--option-symbol-warning-edge);
  background: var(--option-symbol-warning-bg);
  color: var(--option-symbol-warning-text);
}
.ui-option-symbol-critical {
  border-color: var(--option-symbol-critical-edge);
  background: var(--option-symbol-critical-bg);
  color: var(--option-symbol-critical-text);
}
.ui-option-symbol-accent {
  border-color: var(--option-symbol-accent-edge);
  background: var(--option-symbol-accent-bg);
  color: var(--option-symbol-accent-text);
}
/* In an option the symbol stands at the left of both lines, the name and the small line under it, as in the sketch. */
.ui-valuepicker-option:has(.ui-option-symbol) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-4);
}
.ui-valuepicker-option:has(.ui-option-symbol) .ui-valuepicker-name {
  display: contents;
}
.ui-valuepicker-option .ui-option-symbol {
  grid-row: span 2;
}
.ui-valuepicker-option:has(.ui-option-symbol) .ui-valuepicker-sub {
  grid-column: 2;
}
.ui-valuepicker-text .ui-option-symbol {
  margin-right: var(--space-3);
}

/* The value picker's sheet (1g.11, K48, pilotsessionen 9/11): on a phone's surface, under --bp-mobile, the list glides up
   from the foot of the screen over the page, as wide as the screen, with its label as a heading, Stäng and the little
   bar at the top, over a scrim that closes it with a tap. It is placed by its own rules and not by the common placement
   (--pop-place: none, components.js, placePop), and the page never changes for it: it does not move, widen or roll. The
   list rolls inside the sheet when it is higher than --sheet-max-height. On a wider surface it is the form mode's list
   under the field, as before, without the heading: the surface decides, never the kind of device. */
.ui-valuepicker-sheet-head {
  display: none;
}
@media (max-width: 599px) {
  .ui-valuepicker-sheet .ui-valuepicker-pop {
    --pop-place: none;
    position: fixed;
    inset: auto 0 0;
    width: auto;
    max-width: none;
    max-height: var(--sheet-max-height);
    margin: 0;
    padding: var(--space-3) 0 var(--space-5);
    gap: var(--space-2);
    border-width: var(--line-thin) 0 0;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    animation: ui-sheet-in var(--sheet-glide) var(--ease-grow);
  }
  .ui-valuepicker-sheet .ui-valuepicker-pop::before {
    content: "";
    align-self: center;
    flex: none;
    width: var(--sheet-grip-width);
    height: var(--sheet-grip-height);
    border-radius: var(--sheet-grip-height);
    background: var(--sheet-grip);
  }
  .ui-valuepicker-sheet:has(> .ui-valuepicker-pop:not([hidden]))::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 58;
    background: var(--sheet-scrim);
  }
  /* The top bar is never dimmed (the sketch K48, pilotsessionen 9/11): while a sheet is open it stands over the scrim
     and under the sheet, and a tap on it closes the sheet as a tap outside does. */
  body:has(.ui-valuepicker-sheet > .ui-valuepicker-pop:not([hidden])) :is(.ui-sidenav-bar, .ui-band) {
    position: relative;
    z-index: 59;
  }
  /* In the app the bar is sticky (T2.19b), and it stays so while a sheet is open: relative would let it scroll away from the top. */
  @media (display-mode: standalone) {
    body:has(.ui-valuepicker-sheet > .ui-valuepicker-pop:not([hidden])) .ui-shell > .ui-sidenav-bar {
      position: sticky;
    }
  }
  html[data-display="standalone"] body:has(.ui-valuepicker-sheet > .ui-valuepicker-pop:not([hidden])) .ui-shell > .ui-sidenav-bar {
    position: sticky;
  }
  .ui-valuepicker-sheet .ui-valuepicker-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0 var(--space-3) 0 var(--space-6);
  }
  .ui-valuepicker-sheet .ui-valuepicker-list {
    min-height: 0;
    padding: 0 var(--space-3);
  }
  .ui-valuepicker-sheet .ui-valuepicker-list > li + li,
  .ui-valuepicker-sheet .ui-valuepicker-group-list > li {
    border-top: var(--line-thin) solid var(--color-border-soft);
  }
  .ui-valuepicker-sheet .ui-valuepicker-option {
    padding-block: var(--space-3);
  }
  .ui-valuepicker-sheet .ui-valuepicker-keys {
    display: none;
  }
}
.ui-valuepicker-sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.ui-valuepicker-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  padding: 0;
  border: 0;
  border-radius: var(--valuepicker-radius);
  background: none;
  color: var(--color-text-2);
  cursor: pointer;
}
.ui-valuepicker-close svg {
  width: var(--icon-nav);
  height: var(--icon-nav);
}
.ui-valuepicker-close:hover,
.ui-valuepicker-close:focus-visible {
  background: var(--valuepicker-open-bg);
  color: var(--color-text);
}
@keyframes ui-sheet-in {
  from {
    transform: translateY(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ui-valuepicker-sheet .ui-valuepicker-pop {
    animation: none;
  }
}

/* The row of days (1g.11, K48; components/day_nav.html): the day before at the left, the day and its week with the day's
   state in the middle and the day after at the right, each arrow a tap target; a side without a day has its room kept,
   so that the day stays in the middle. */
.ui-day-nav {
  display: grid;
  grid-template-columns: var(--target-min) minmax(0, 1fr) var(--target-min);
  align-items: center;
  gap: var(--space-4);
}
.ui-day-nav-step {
  min-width: var(--target-min);
  padding-inline: 0;
}
.ui-day-nav-step svg {
  width: var(--icon-nav);
  height: var(--icon-nav);
}
.ui-day-nav-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  text-align: center;
}
.ui-day-nav-date {
  font-family: var(--font-display);
  font-size: var(--day-nav-date);
  font-weight: var(--weight-strong);
}
.ui-day-nav-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-2);
  font-size: var(--text-xs);
}

/* The life mark (1g.11i, K48, K43; K120 B, 1c.3.0a, D-MARK-10; components/life_state.html): a thing's state in its
   life as a small symbol and the word in the grey text, with no surface and no edge, the same for every state and in
   both themes (--life-*), and never a tone of the status badge: a reply that is late is a mark of its own beside it.
   It is not tapped. The words stay whole on one line: it is as wide as its words. */
.ui-life {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  max-width: 100%;
  flex-shrink: 0;
  vertical-align: middle;
  color: var(--life-text);
  font-size: var(--life-size);
  font-weight: var(--life-weight);
  line-height: var(--leading-tight);
  white-space: nowrap;
}
/* The small life mark (K93 F3 B): in a line of facts in the small text, as the diary's row of days, the words keep the
   size and weight they had before K120; only the edge and the surface are gone. */
.ui-life-small {
  font-size: var(--life-small-size);
  font-weight: var(--life-small-weight);
}
/* The life mark in a note under a heading (K120, 1c.3.0a.1): the note's small size, and the regular weight of the mark in
   a list (the ÄTA list's Skickad), in the grey of every life mark. */
.ui-life-note {
  font-size: var(--life-note-size);
  font-weight: var(--life-note-weight);
}
.ui-life svg {
  flex: none;
  width: var(--life-symbol);
  height: var(--life-symbol);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--life-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A row of actions whose one button fills it where the surface is narrow (ui-actions-fill), as Signera dagen in its own
   box at the foot of the diary's day (pilotsessionen 9/11): over the whole width under --bp-mobile (600 px, which a
   media query cannot read), so that it is easy to reach, and as wide as its text on a larger surface, as the other
   secondary buttons. By the surface's width, never by the kind of device (Björn 7/11). Never the page's main action. */
@media (max-width: 599px) {
  .ui-actions-fill > .ui-button,
  .ui-actions-fill > form {
    flex: 1 1 100%;
  }
  .ui-actions-fill > form > .ui-button {
    width: 100%;
  }
  /* A button to another system (T2.117, K109): the mark first at the left, the text after it and the arrow out at the far right */
  .ui-actions-fill > .ui-button-system,
  .ui-actions-fill > form > .ui-button-system {
    justify-content: flex-start;
  }
  .ui-actions-fill > .ui-button-system .ui-system-arrow,
  .ui-actions-fill > form > .ui-button-system .ui-system-arrow {
    margin-inline-start: auto;
  }
}

/* The diary's day (1g.11, K48): the phone's column, one part under the other, and never wider than --diary-max on a
   larger surface, so that the lines of the events stay short enough to read. */
.ui-diary {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  max-width: var(--diary-max);
}
.ui-diary-form {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  margin: 0;
}
.ui-diary-form[hidden] {
  display: none;
}
.ui-diary-empty {
  margin: 0;
  color: var(--color-text-2);
}
/* The box of the signing (pilotsessionen 9/11, a): its heading the panel's title, and its parts the panel's usual
   air apart and no paragraph's own margin, with the signals' row right under the day's count. */
.ui-diary-sign p {
  margin: 0;
}
.ui-diary-sign-count {
  display: flex;
  flex-direction: column;
  gap: var(--diary-count-gap);
}
/* The line that the day is locked and the button under it: a paragraph's usual air apart, as the panel's parts. */
.ui-diary-sign-ready {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
.ui-diary-sign-ready[hidden] {
  display: none;
}
.ui-day-today {
  justify-content: center;
}

/* Signerad av beställaren (client, K53, D-MARK-19; pilotens precisering 15/11 mot K120): one step stronger than Signerad
   within the same mark, still with no surface and no edge: the word in the ordinary text colour instead of the grey,
   and a filled check in the dark salvia. */
.ui-life-client {
  color: var(--life-client-text);
}
.ui-life-client .ui-life-fill {
  fill: var(--life-client-symbol);
  stroke: none;
}
.ui-life-client .ui-life-tick {
  stroke: var(--life-client-tick);
}

/* A chip that is a choice (chips choices, ui-chip-choice; 1g.11d, K53, D-VAL-20): the period's quick choices, each a
   link that applies at once, without a button Visa. As high as a tap target with a mouse too (--chip-choice-height),
   round, and the chosen one (aria-current) in the action's soft surface with its edge and text, so that it is told by
   more than the colour: the edge and the weight too. */
.ui-chip.ui-chip-choice {
  justify-content: center;
  min-height: var(--chip-choice-height);
  padding: 0 var(--chip-choice-pad);
  border-radius: var(--chip-choice-radius);
  font-weight: var(--weight-strong);
  text-decoration: none;
}
.ui-chip.ui-chip-choice:hover {
  background: var(--chip-choice-hover);
}
.ui-chip.ui-chip-choice[aria-current="true"] {
  border-color: var(--chip-choice-on-edge);
  background: var(--chip-choice-on-surface);
  color: var(--chip-choice-on-text);
}

/* The side panel (components/side_panel.html, ui-side-layout and ui-side-panel; 1g.11d, K53, D-KORT-7): a panel beside
   the content, such as Skriv ut och signering beside the diary's day. From --bp-ipad-landscape (1180 px, which a media
   query cannot read) the content and the panel stand side by side, the content as wide as its own and the panel between
   --side-panel-min and --side-panel-max, staying in view when the page rolls, with a cross that closes it. Under it the
   panel is the page: the content is not drawn, and the way back is the back button over the panel's heading. Its parts
   are the panel's parts: separated by a line in the panel, and each a box of its own where the panel is the page. */
.ui-side-layout {
  display: grid;
  gap: var(--side-panel-gap);
}
.ui-side-panel {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  min-width: 0;
}
.ui-side-panel-head,
.ui-side-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.ui-side-panel-title,
.ui-side-sheet-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}
.ui-side-panel-meta {
  margin: 0;
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-side-panel-close-form {
  display: contents;
}
.ui-side-panel-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--side-panel-close);
  height: var(--side-panel-close);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.ui-side-panel-close:hover {
  background: var(--color-surface-2);
}
.ui-side-panel-close svg {
  width: var(--icon-nav);
  height: var(--icon-nav);
}
.ui-side-panel-sum {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-side-panel-sum strong {
  color: var(--color-text);
}
.ui-side-panel-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-side-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--side-panel-row-min);
  padding: var(--side-panel-row-pad) 0;
  border-top: var(--line-thin) solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
}
.ui-side-panel-row:hover .ui-side-panel-row-day {
  text-decoration: underline;
}
.ui-side-panel-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ui-side-panel-row-day {
  font-weight: var(--weight-strong);
}
.ui-side-panel-row-line {
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-side-panel-row-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}
/* A field note's panel (1g.11h.2, #2835, K64; diary/parts/field_note_panel.html): the note's text, the links to where
   it went, and Fördela till, a row per kind with its box first and its line and choices under it, indented to the box's
   label. */
.ui-side-panel-text {
  margin: 0;
  overflow-wrap: break-word;
}
.ui-side-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ui-side-panel-links a,
.ui-side-panel-choice-done a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
}
.ui-side-panel-choice {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: var(--event-divider);
}
.ui-side-panel-choice-done {
  margin: 0;
}
.ui-side-panel-choice-more {
  display: grid;
  gap: var(--space-3);
  padding-left: var(--space-8);
}
.ui-side-panel-choice-line {
  margin: 0;
  color: var(--color-text-2);
  font-size: var(--text-sm);
}
.ui-side-panel-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  padding: 0;
  border: 0;
}
.ui-side-panel-hint {
  margin: 0;
  color: var(--color-text-2);
  font-size: var(--text-sm);
  text-align: center;
}
/* The form of the panel (ui-side-sheet): in the panel it folds out as a part under the actions; under 1180 px it glides
   up from the foot as the value picker's and the date's sheets do (--sheet-*, ui-sheet-in), over a scrim that is a link
   back, and Avbryt and the cross close it. */
.ui-side-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
.ui-side-sheet-scrim {
  display: none;
}
@media (min-width: 1180px) {
  .ui-side-layout:has(> .ui-side-panel) {
    grid-template-columns: minmax(0, auto) minmax(var(--side-panel-min), var(--side-panel-max));
    justify-content: start;
    align-items: start;
  }
  .ui-side-panel {
    position: sticky;
    top: var(--side-panel-top);
    max-height: calc(100dvh - var(--side-panel-top) - var(--side-panel-foot));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--side-panel-pad);
    border: var(--line-thin) solid var(--side-panel-edge);
    border-radius: var(--radius-md);
    background: var(--side-panel-surface);
    box-shadow: var(--side-panel-shadow);
  }
  /* The heading and the cross stay in view when the panel itself rolls (a long list or the registration), so the way
     out is always there: the head is stuck to the panel's top edge, over the panel's own padding. */
  .ui-side-panel-head {
    position: sticky;
    top: calc(-1 * var(--side-panel-pad));
    z-index: 1;
    margin: calc(-1 * var(--side-panel-pad)) calc(-1 * var(--side-panel-pad)) 0;
    padding: var(--side-panel-pad) var(--side-panel-pad) var(--space-2);
    background: var(--side-panel-surface);
  }
  .ui-side-panel-back {
    display: none;
  }
  .ui-side-panel > .ui-panel {
    padding: var(--stack-gap) 0 0;
    border-width: var(--line-thin) 0 0;
  }
  .ui-side-sheet .ui-side-panel-close-form {
    display: none;
  }
}
@media (max-width: 1179px) {
  .ui-side-layout:has(> .ui-side-panel) > .ui-side-layout-main {
    display: none;
  }
  .ui-side-panel-head .ui-side-panel-close-form {
    display: none;
  }
  .ui-side-sheet {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    max-height: var(--sheet-max-height);
    overflow: auto;
    padding: var(--space-3) var(--space-8) var(--space-8);
    border: var(--line-thin) solid var(--color-border);
    border-width: var(--line-thin) 0 0;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    background: var(--color-surface);
    animation: ui-sheet-in var(--sheet-glide) var(--ease-grow);
  }
  .ui-side-sheet::before {
    content: "";
    align-self: center;
    width: var(--sheet-grip-width);
    height: var(--sheet-grip-height);
    border-radius: var(--sheet-grip-height);
    background: var(--sheet-grip);
  }
  .ui-side-sheet-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 58;
    background: var(--sheet-scrim);
  }
}

/* The wide side layout (ui-side-layout-wide, 1g.11h.2, K64, D-TAB-30): a list whose rows open in the side panel, as the
   field notes, is the wide left column and the panel the right one in the card's proportions
   (--side-layout-wide-main and --side-layout-wide-panel), so that no empty room is left at the right of the panel. The
   diary's column inside it is not capped at --diary-max there; without the panel the list keeps the diary's width. */
@media (min-width: 1180px) {
  .ui-side-layout.ui-side-layout-wide:has(> .ui-side-panel) {
    grid-template-columns:
      minmax(0, var(--side-layout-wide-main))
      minmax(var(--side-panel-min), var(--side-layout-wide-panel));
    justify-content: stretch;
  }
  .ui-side-layout-wide:has(> .ui-side-panel) > .ui-side-layout-main > .ui-diary {
    max-width: none;
  }
}

/* The number field with steps (field_text steps, 1g.11g, K55, G2 of #911 B4; the diary's staffing first): a row per
   count, its label with the line under it at the left and the steps - and + around the number field at the right, each a
   tap target (--field-steps-button), and the total last in bold (steps_total) with its sum under
   the numbers (ui-field-steps-sum). The number field
   is as wide as a short dense field (--field-steps-input) and its digits stand in the middle, in bold
   (--field-steps-number-weight). The steps are shown by components.js; without the script the number field alone.
   The rows, the row that adds one (steps_add) and the total stand in the inner box with rounded corners (K55, the
   pilot session 11/11): a thin line between the rows, a stronger one over the total, and no line free on the page.
   The box clips nothing, so that the list of the row that adds one opens over what stands under it. */
.ui-field-steps {
  display: flex;
  flex-direction: column;
  border: var(--line-thin) solid var(--field-steps-box-border);
  border-radius: var(--field-steps-box-radius);
}
.ui-field-steps > * + * {
  border-top: var(--line-thin) solid var(--field-steps-divider);
}
.ui-field-steps > .ui-field-steps-row {
  padding-inline: var(--field-steps-box-pad);
}
.ui-field-steps > .ui-field-steps-total {
  border-top-color: var(--field-steps-total-divider);
}
.ui-field-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--field-steps-gap);
  min-height: var(--field-steps-row-min);
  margin: 0;
  padding-block: var(--field-steps-row-pad);
}
.ui-field-steps-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-weight: var(--weight-strong);
}
.ui-field-steps-label .ui-field-hint {
  font-weight: normal;
}
.ui-field-steps-control {
  display: flex;
  align-items: center;
  gap: var(--field-steps-control-gap);
  flex: none;
}
.ui-field-steps-control [hidden] {
  display: none;
}
.ui-field-steps-control .ui-button {
  min-width: var(--field-steps-button);
  min-height: var(--field-steps-button);
  padding-inline: 0;
}
/* The signs of the steps are the button's symbols minus and plus (parts/button_icon.html), never a character. */
.ui-field-steps-control .ui-button-icon {
  width: var(--field-steps-icon-size);
  height: var(--field-steps-icon-size);
}
.ui-field-steps-control .ui-input {
  /* .ui-input's least width (--field-min) would hold it wider than the total's sum under it (round 3 of #911) */
  min-width: var(--field-steps-input);
  width: var(--field-steps-input);
  min-height: var(--input-box); /* a field as every field (T2.121); the steps beside it keep their size */
  text-align: center;
  font-weight: var(--field-steps-number-weight);
  font-variant-numeric: tabular-nums;
}
/* The quiet row (K55, 1g.11g.1): a count of 0 stays in the list, with the name, the line and the number in the quiet
   text colour. The whole row is quiet (the pilot session 11/11): the field's frame is the soft line and its number
   is not bold, and the step - is out of use (the inactive button's look, components.js). The step + stays as it is. */
.ui-field-steps-row-quiet .ui-field-steps-label,
.ui-field-steps-row-quiet .ui-input {
  color: var(--field-steps-quiet-text);
}
.ui-field-steps-row-quiet .ui-input {
  --input-edge: var(--field-steps-quiet-border);
  font-weight: var(--field-steps-quiet-weight);
}
/* The row that adds one (steps_add, the value picker's plus): as wide as the box, so that the whole row is the button. */
.ui-field-steps-add {
  display: flex;
  flex-direction: column;
}
.ui-field-steps-total {
  font-weight: var(--weight-strong);
}
/* The total's sum in the number column: as wide as the number field and centred as its digits, with a pad as wide as a
   step on each side once the steps are shown, so that 13 stands under 7, 2, 1 and 3. */
.ui-field-steps-sum {
  display: flex;
  align-items: center;
  gap: var(--field-steps-control-gap);
  flex: none;
}
.ui-field-steps-sum [hidden] {
  display: none;
}
.ui-field-steps-pad {
  width: var(--field-steps-button);
}
.ui-field-steps-sum output {
  box-sizing: border-box;
  width: var(--field-steps-input);
  text-align: center;
  font-size: var(--text-field);
  font-weight: var(--field-steps-number-weight);
  font-variant-numeric: tabular-nums;
}

/* ---- Fact list (T2.103, Björn 7/11 K39): label and value in the same track, two columns also on a phone ---- */
.ui-facts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  min-height: var(--control-min); /* as high with the button as without it, so that the rows start at one height */
  margin-bottom: var(--facts-head-gap);
}
.ui-facts-title {
  margin: 0;
  font-size: var(--facts-title-size);
}
.ui-facts-head > :last-child:not(.ui-facts-title) {
  margin-left: auto;
}
/* The label column is as wide as its longest label and gives way before the value does: a phone, an address and a date
   keep their line (ui-facts-whole), an e-mail address breaks only after its own marks (address_breaks), and a label of
   more than one word breaks at its words, never inside one (E-post is one word, keep_hyphenated). */
.ui-facts-list {
  display: grid;
  grid-template-columns: minmax(min-content, max-content) minmax(min-content, 1fr);
  align-items: start;
  gap: var(--facts-gap-y) var(--facts-gap-x);
  margin: 0;
}
.ui-facts-row {
  display: contents;
}
.ui-facts-label {
  padding-top: var(--facts-label-pad);
  color: var(--facts-label-text);
  font-size: var(--facts-label-size);
}
.ui-facts-label .ui-keep {
  white-space: nowrap;
}
.ui-facts-value {
  min-width: 0;
  margin: 0;
  color: var(--facts-value-text);
}
.ui-facts-whole {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A value's strong part first (strong, T19.2.2, K84 fråga 3): the account's number in bold with table digits, and the
   name after it in the body's weight. */
.ui-facts-strong {
  margin-inline-end: var(--facts-strong-gap);
  font-weight: var(--facts-strong-weight);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-facts-link {
  position: relative;
  color: var(--color-link);
}
/* A folded column's negative amount is red, also as a link, as the column's own cell (ui-neg, 1h.6; P.0.17c). */
.ui-facts-value.ui-neg > .ui-facts-link,
.ui-facts-value.ui-better > .ui-facts-link {
  color: inherit;
}
.ui-facts-value.ui-neg {
  color: var(--color-negative-amount);
  font-weight: var(--weight-strong);
}
.ui-facts-value.ui-better {
  color: var(--color-positive-text);
  font-weight: var(--weight-medium);
}
.ui-facts-empty {
  margin: 0;
  color: var(--facts-empty-text);
}
/* The list in a narrow column, as in a side card (measure narrow): where an address breaks at its @ or / or is cut. */
.ui-facts-narrow {
  max-width: var(--facts-measure-narrow);
}
/* A count per row (tally, 1g.11g, K55): the label in the body's text with its note after it in the weaker text, the
   value at the right in bold with table digits, and the total last in bold under a line that runs unbroken under both
   columns (no column gap: the value keeps its distance with its own padding). */
.ui-facts-tally .ui-facts-list {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0;
}
.ui-facts-tally .ui-facts-label {
  padding-top: 0;
  color: var(--facts-value-text);
  font-size: inherit;
}
.ui-facts-tally .ui-facts-value {
  padding-left: var(--facts-gap-x);
  text-align: right;
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
/* A column of figures (figures, pilotsessionen 11/11, K39), as a section's key figures: the label as in the list, and the
   value at the right in a column of its own, as wide as its widest value, right-aligned with table digits, so that the
   figures stand under each other and their ones line up. The label column takes the rest of the room. */
.ui-facts-figures .ui-facts-list {
  grid-template-columns: minmax(min-content, 1fr) max-content;
}
.ui-facts-figures .ui-facts-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ui-facts-note {
  margin-left: var(--facts-note-gap);
  color: var(--facts-label-text);
  font-size: var(--facts-label-size);
}
.ui-facts-total > .ui-facts-label,
.ui-facts-total > .ui-facts-value {
  padding-top: var(--facts-total-pad);
  border-top: var(--line-thin) solid var(--facts-total-border);
  font-weight: var(--weight-strong);
}
/* An e-mail or web address (K47, Björn 9/11): it breaks only after its @ or / (address_breaks makes a piece of each, and
   a piece is never broken), and what does not fit even so is cut with an ellipsis, the only thing the fact list cuts. The
   cell does not widen the column for it (contain: inline-size), so the column is as wide as the room and a long address is
   cut and not pushed out of the card. components.js marks a cut address (data-cut) and a tap, or Enter, shows it whole in
   a box (ui-facts-pop). */
.ui-facts-value-address {
  contain: inline-size;
}
.ui-facts-piece {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
  /* an inline-block does not take its link's underline from it, so it takes the link's own, in rest and on hover */
  text-decoration: inherit;
  text-underline-offset: inherit;
}
/* The box of a cut address: the whole address and the one action (Skriv e-post or Öppna), over the page and placed by the
   common placement (placePop), so that the page never changes for it. Here the pieces are whole, and a piece that is wider
   than the box (the window) breaks inside itself as a last resort (break-word), so that the whole address can always be read. */
/* A cut address is one line, cut once at its end, and never pieces with an ellipsis each (pilotsessionen 11/11, K39 v3
   at 390 px): components.js marks it (data-cut) where a piece does not fit, and a tap shows it whole. Clipped only in
   the inline direction, so that the link's tap target with touch (::after) is not. */
.ui-facts-address[data-cut] {
  display: block;
  overflow-x: clip;
  overflow-y: visible;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ui-facts-address[data-cut] .ui-facts-piece {
  display: inline;
  max-width: none;
  overflow: visible;
}
/* a <wbr> breaks a line in Chrome also where nothing else may (nowrap) */
.ui-facts-address[data-cut] wbr {
  display: none;
}
.ui-facts-pop {
  position: fixed;
  top: var(--facts-pop-y, 0);
  left: var(--facts-pop-x, 0);
  z-index: var(--facts-address-pop-layer);
  display: flex;
  flex-direction: column;
  gap: var(--facts-address-pop-gap);
  width: max-content;
  max-width: min(var(--facts-address-pop-max), calc(100vw - 2 * var(--facts-address-pop-margin)));
  padding: var(--facts-address-pop-pad-y) var(--facts-address-pop-pad-x);
  border: var(--line-thin) solid var(--facts-address-pop-border);
  border-radius: var(--facts-address-pop-radius);
  background: var(--facts-address-pop-bg);
  color: var(--facts-address-pop-text);
  box-shadow: var(--facts-address-pop-shadow);
  font-size: var(--facts-address-pop-size);
  line-height: var(--facts-address-pop-leading);
}
.ui-facts-pop[hidden] {
  display: none;
}
.ui-facts-pop-address {
  margin: 0;
}
.ui-facts-pop-address .ui-facts-piece {
  max-width: none;
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}
.ui-facts-pop-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: var(--control-min-fine);
  color: var(--facts-address-pop-action);
  font-weight: var(--weight-medium);
}
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-facts-pop-action {
    min-height: var(--target-min);
  }
}
@media print {
  .ui-facts-pop {
    display: none;
  }
  .ui-facts-piece {
    overflow: visible;
    white-space: normal;
    overflow-wrap: break-word;
  }
}
/* With touch the drawn text stays as small as it is, and the tap target is the row: as high as --target-min, the link's
   ::after the whole row's height, so that two rows never share a target. Only a row that can be tapped (ui-facts-tall: a
   link, a phone, an e-mail address, a web address) is that high: a row of text keeps the list's own dense rhythm
   (--facts-gap-y) in every width and is never given the air of a tap target, as the key figures and the company data
   (the pilot session 9/11, T2.104, and 15/11 after the side by side of #819: 44 px is the tap target, not what is drawn).
   The label stands at the top of its row, also
   when the value runs over several lines (K46, Björn 9/11): both cells start at the top and are pushed down so that
   the FIRST line of each is centred in the target (its own line height, 1lh), and the label's text is then on the same
   line as the value's first line. A label is never centred against the whole value. The cells stay blocks (rättningsrunda
   DX2): as flex containers they made the words of a label with a hyphen (keep_hyphenated, E-post) separate flex items
   that lost the space between them ("FakturaE-post") and could not break between the words. The target is at least as
   wide as it is high: the containing block of a link that breaks over lines ends at its LAST line, so an address whose
   last piece is short (".test") got a target of 22 px. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-facts-label.ui-facts-tall,
  .ui-facts-value.ui-facts-tall {
    min-height: var(--facts-row-step-touch);
    padding-top: calc((var(--facts-row-step-touch) - 1lh) / 2);
  }
  .ui-facts-link::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    min-width: var(--target-min);
    height: var(--target-min);
    transform: translateY(-50%);
  }
}
@media (max-width: 599px) {
  .ui-facts-list {
    column-gap: var(--facts-gap-x-narrow);
  }
  .ui-facts-title {
    font-size: var(--facts-title-size-narrow);
  }
}

/* The source stamp (source_stamp, T2.101, Björn 7/11 kväll, rule 7, built as K44 Rekommenderat, Björn 9/11): where a fact
   was fetched from is a small label in the upper right corner of the card, and who changed it and when is a grey line at
   the foot of the card, never running text under a badge. The stamp holds its words for a screen reader (position,
   ui-visually-hidden "Ändrad av"), so that they stay in a table's box that scrolls sideways and never widen the page
   (1f.L.1: the supplier list at 600-639 px). */
.ui-source-stamp {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--source-stamp-gap);
  min-width: 0;
  max-width: 100%;
  padding: var(--source-stamp-pad);
  border: var(--line-thin) solid var(--source-stamp-border);
  border-radius: var(--source-stamp-radius);
  background: var(--source-stamp-surface);
  color: var(--source-stamp-text);
  font-size: var(--source-stamp-size);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  /* the text takes a second line between words when the room is short and never leaves its card; the date is one word
     (ui-date) and no word is broken in the middle (T2.101, round DR) */
  hyphens: manual;
  overflow-wrap: normal;
}
.ui-source-stamp-icon {
  flex: none;
  width: var(--source-stamp-icon);
  height: var(--source-stamp-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The name in the stamp of who changed it (by) is one word, as the date: the label breaks only between them. */
.ui-source-stamp-name {
  white-space: nowrap;
}
/* The person (K44): a grey line of text last in the card, after its content, with a thin line above it, in the weakest
   text colour. It is no label and has no symbol: the words say what it is. */
.ui-source-stamp-by {
  margin-top: auto;
  padding-top: var(--source-stamp-by-pad);
  border-top: var(--line-thin) solid var(--source-stamp-by-line);
  color: var(--source-stamp-text);
  font-size: var(--source-stamp-by-size);
  line-height: var(--leading-tight);
  hyphens: manual;
  overflow-wrap: normal;
}
/* The label in a heading row: at the right edge, on the heading's line, and when it does not fit there, on a line of its
   own under the heading at the content's left edge (K44, Björn 9/11 about T2.101 at 390: never indented, never right
   aligned, never somewhere in between). The item that stands right before the label (the heading, or the badges, the
   filters or the aside that stand between them) has the auto margin on its right, so the label is pushed to the right
   while it fits on that line, and, alone on a line of its own, has no margin to be pushed by and starts at the left edge.
   One rule, whatever stands between the heading and the label. Stamped rows keep the stamp's gaps, a post's name is
   larger, and with touch the row is a tap target high so that a fold that is added later has room. */
.ui-heading-row-stamped {
  gap: var(--source-stamp-head-gap);
}
.ui-heading-row > .ui-source-stamp {
  flex: 0 1 auto;
  margin-left: 0;
}
.ui-heading-row > :has(+ .ui-source-stamp) {
  margin-right: auto;
}
.ui-heading-row > .ui-source-stamp + .ui-actions {
  margin-left: 0;
}
.ui-heading-row-post > .ui-panel-title {
  font-size: var(--text-xl);
}
/* The small heading (size small, 1g.11b, K48): the card's own heading with its status beside it, a step under the panel's
   (--text-title-small: 14 px under the panel's 15 since lager 1, D-ALLA-35, T2.191; it was 16 under 20). */
.ui-heading-row-small > .ui-panel-title {
  font-size: var(--text-title-small);
}
.ui-source-stamp-body {
  margin: 0;
}
.ui-source-stamp-card-narrow {
  max-width: var(--source-stamp-narrow);
}
.ui-source-stamp-card-tight {
  max-width: var(--source-stamp-tight);
}
@media (pointer: coarse) {
  .ui-heading-row-stamped {
    min-height: var(--source-stamp-head-min);
  }
}

/* The source mark (source_mark, T2.156, K111 v5, Björn 14/11 18.47, D-VEM-10 to D-VEM-14): the mark of the system a
   column's values come from, after the column's name, 16 px and grey in the name's colour with --source-mark-gap before
   it, never the source stamp with its name in a header. The name and the day stand in the box (ui-source-tip), with the
   mark in colour. The mark takes no more height than a line of the header: its margin box is the line's height, so the
   header row is not higher with it than without it (e2e/source-mark.spec.ts). With touch its tap target is
   --source-mark-reach (44 px) round the drawn mark, out of the flow, as the short heading's (T2.100). */
.ui-source-head {
  display: inline-flex;
  align-items: last baseline;
  max-width: 100%;
}
.ui-source-head > :first-child {
  min-width: 0;
}
.ui-source-mark {
  position: relative;
  display: inline-flex;
  flex: none;
  align-self: center;
  width: var(--source-mark-size);
  height: var(--source-mark-size);
  margin-block: calc((1lh - var(--source-mark-size)) / 2);
  margin-inline-start: var(--source-mark-gap);
  vertical-align: middle;
  color: inherit;
  border-radius: var(--source-mark-letter-radius);
}
.ui-source-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--source-mark-reach-fine);
  height: var(--source-mark-reach-fine);
  transform: translate(-50%, -50%);
}
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-source-mark::after {
    width: var(--source-mark-reach);
    height: var(--source-mark-reach);
  }
}
/* The table's card layout (under 600 px, where the header row is hidden): the column's mark is not on the phone, and no
   card has a mark after its label (K111 v5: the phone shows the sums, and the attestation's cards have the mark after
   the word in Väntar på only on a row whose source differs from the rest). Such a row's mark stands directly after its
   word, on the same line: the label gives the room to the value's side, and the mark's own margin takes the cell's gap
   back to --source-mark-gap (e2e/source-mark.spec.ts). */
@media (max-width: 599px) {
  .ui-table td:has(> .ui-source-mark)::before {
    margin-right: auto;
  }
  .ui-table td > .ui-source-mark {
    margin-inline-start: calc(var(--source-mark-gap) - var(--space-6));
  }
}
/* One logo: grey (the form of the mark in --source-mark-ink, white made see-through) in a table and a source line,
   in colour in the box. Each system is one rule here and one file in static/design/source-marks/. */
.ui-source-logo {
  display: inline-block;
  flex: none;
  width: var(--source-mark-size);
  height: var(--source-mark-size);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.ui-source-logo-fortnox,
.ui-source-logo-bidcon {
  background-color: var(--source-mark-ink);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.ui-source-logo-fortnox {
  -webkit-mask-image: -webkit-image-set(url("source-marks/fortnox-16-mask.a9eebbe4ecc2.png") 1x, url("source-marks/fortnox-mask.14c05b041986.png") 2x);
  mask-image: image-set(url("source-marks/fortnox-16-mask.a9eebbe4ecc2.png") 1x, url("source-marks/fortnox-mask.14c05b041986.png") 2x);
}
/* BidCon has no grey file: its favicon's own shape is the mask, filled with --source-mark-ink */
.ui-source-logo-bidcon {
  -webkit-mask-image: url("source-marks/bidcon.492eba7e62d3.png");
  mask-image: url("source-marks/bidcon.492eba7e62d3.png");
}
.ui-source-logo-product .ui-source-logo-face {
  fill: var(--source-mark-ink);
  fill-opacity: var(--source-mark-face-opacity);
}
.ui-source-logo-product .ui-source-logo-line {
  stroke: var(--source-mark-ink);
}
.ui-source-logo-database {
  fill: none;
  stroke: var(--source-mark-ink);
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Bluebeam until its connection is built: a neutral letter in a box, the same form in grey and in colour */
.ui-source-logo-bluebeam {
  box-sizing: border-box;
  border: var(--source-mark-letter-edge) solid var(--source-mark-ink);
  border-radius: var(--source-mark-letter-radius);
  font-size: var(--source-mark-letter-size);
  font-weight: var(--source-mark-letter-weight);
  line-height: calc(var(--source-mark-size) - 2 * var(--source-mark-letter-edge));
  text-align: center;
}
.ui-source-logo-bluebeam::before {
  content: "B";
}
/* The box: the mark in colour, the system's name and the day */
.ui-source-tip {
  display: flex;
  align-items: center;
  gap: var(--source-tip-gap);
  width: fit-content;
}
.ui-source-tip .ui-source-logo-fortnox {
  background-color: transparent;
  background-image: image-set(url("source-marks/fortnox-16.b40ab11b8051.png") 1x, url("source-marks/fortnox.79a2f9e08a92.png") 2x);
  background-size: 100% 100%;
  -webkit-mask-image: none;
  mask-image: none;
}
.ui-source-tip .ui-source-logo-bidcon {
  background-color: transparent;
  background-image: url("source-marks/bidcon.492eba7e62d3.png");
  background-size: 100% 100%;
  -webkit-mask-image: none;
  mask-image: none;
}
.ui-source-tip .ui-source-logo-product .ui-source-logo-face {
  fill: var(--source-tip-product-face);
  fill-opacity: var(--source-tip-face-opacity);
}
.ui-source-tip .ui-source-logo-product .ui-source-logo-line {
  stroke: var(--source-tip-product-line);
}
.ui-source-tip .ui-source-logo-bluebeam {
  border-color: var(--source-mark-letter-border);
  background: var(--source-mark-letter-surface);
  color: var(--source-mark-letter-text);
}
/* The source line under a printed table (the box is never printed): the mark, the system and the day per system. On
   screen only in the catalogue and on a paper (ui-source-legend-screen). */
.ui-source-legend {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--source-legend-gap);
  margin: 0;
  padding-top: var(--source-legend-pad);
  color: var(--source-legend-text);
  font-size: var(--source-legend-size);
}
.ui-source-legend-screen {
  display: flex;
}
.ui-source-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--source-mark-gap);
}
@media print {
  .ui-source-legend {
    display: flex;
  }
  .ui-source-mark {
    pointer-events: none;
  }
}

/* The section card (section_card, T2.104, Björn 7/11 K39 rules 2, 3, 6 and 7): each section of a post is a card of its own
   with a frame (the card's own: --card-edge and the surface), the source's stamp in its corner and, where its group is
   narrow, a fold that shows the section's main value on the heading row. The surface decides, never the device: the
   group (ui-section-cards, the container named section-cards) is narrow under 560 px, which is a phone's width and a
   narrow column's, and the container query cannot read a token. Without the group, or without JavaScript, nothing
   folds and everything is shown. */
.ui-section-cards {
  container: section-cards / inline-size;
}
.ui-section-cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--section-cards-gap);
  align-items: start;
}
.ui-section-cards-narrow {
  max-width: var(--section-cards-narrow);
}
.ui-section-card {
  min-width: 0;
}
.ui-section-card-frame {
  display: flex;
  flex-direction: column;
  gap: var(--section-card-gap);
  min-width: 0;
  background: var(--color-surface);
  border: var(--line-thin) solid var(--card-edge);
  padding: var(--section-card-pad-top) var(--section-card-pad-side) var(--section-card-pad-bottom);
}
/* The state is the top edge and nothing else, in the card's own width of it and with the room over the heading less by
   as much, so that a card with a state is as high as the others (as ui-card-warning). */
.ui-section-card-warning > .ui-section-card-frame {
  border-top: var(--line-card) solid var(--card-tone-warning);
  padding-top: calc(var(--section-card-pad-top) - var(--line-card) + var(--line-thin));
}
.ui-section-card-critical > .ui-section-card-frame {
  border-top: var(--line-card) solid var(--card-tone-critical);
  padding-top: calc(var(--section-card-pad-top) - var(--line-card) + var(--line-thin));
}
.ui-section-card-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--section-card-head-gap);
  min-width: 0;
}
.ui-section-card-head > .ui-heading-row {
  flex: 1 1 auto;
  min-width: 0;
}
.ui-section-card-head .ui-panel-title {
  font-size: var(--section-card-title-size);
}
.ui-section-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--section-card-body-gap);
  min-width: 0;
}
/* the person's line is the last in the card and has no gap of its own to keep (source_stamp) */
.ui-section-card-body > .ui-source-stamp-by {
  margin-top: 0;
}
.ui-section-card-peek,
.ui-section-card-toggle {
  display: none;
}
/* A yes or no as the main value of a folded card ("Finns i ekonomisystemet") breaks between its words where the head is
   narrow, and never runs in under the chevron (1f.L.1, K39 v3 at 390 px). */
.ui-section-card-peek .ui-yes-no {
  min-width: 0;
  white-space: normal;
}
.ui-section-card-chevron {
  flex: none;
  width: var(--section-card-chevron-size);
  height: var(--section-card-chevron-size);
  fill: none;
  stroke: var(--section-card-chevron);
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast);
}
.ui-section-card-toggle[aria-expanded="true"] .ui-section-card-chevron {
  transform: rotate(90deg);
}
/* Ring and Mejla (Björn's rule 6): two large buttons side by side, the width shared, a tap target high with a mouse too
   (--section-card-call-min); the name over them with the role after it. */
.ui-section-card-call {
  display: grid;
  gap: var(--section-card-call-name-gap);
}
.ui-section-card-call-name {
  margin: 0;
  font-weight: var(--weight-heading);
}
.ui-section-card-call-role {
  margin-left: var(--space-3);
  color: var(--color-text-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
}
.ui-section-card-call-buttons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--section-card-call-gap);
}
.ui-section-card-call-button.ui-button {
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--section-card-call-min);
  font-weight: var(--weight-heading);
}
.ui-section-card-call-icon {
  flex: none;
  width: var(--section-card-call-icon);
  height: var(--section-card-call-icon);
  fill: none;
  stroke: var(--color-action);
  stroke-width: var(--icon-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Wide: the cards side by side, and one that spans the whole row where it says so (the control). */
@container section-cards (width >= 560px) {
  .ui-section-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ui-section-card-wide {
    grid-column: 1 / -1;
  }
}
/* Narrow with JavaScript: the head is the button, a tap target high and the whole row (the button covers it, and the
   chevron stands at its right edge, so the target can be larger than what is drawn), and a shut card shows its main value
   where the source's label stood. A shut card's frame is the head and nothing more.
   Only on a screen (the pilot session 9/11, G1 of #896): a printout has no fold, so every card is open and shown whole, the
   button and the main value on the head are not drawn (the base rules above hide them) and the Lägg till button is not
   drawn either (.ui-actions in the print rules). */
@media screen {
  @container section-cards (width < 560px) {
    html[data-js] .ui-section-card-frame {
      padding: 0 var(--section-card-pad-side-narrow);
    }
    html[data-js] .ui-section-card-warning > .ui-section-card-frame,
    html[data-js] .ui-section-card-critical > .ui-section-card-frame {
      padding-top: 0;
    }
    /* The main value of a shut card stands beside the heading where both fit on one line, and under it where they do
       not, never broken beside it (pilotsessionen 11/11, K39 v3: "Finns i ekonomisystemet" at 390 px), as the source's
       label does (T2.101). */
    html[data-js] .ui-section-card-head {
      flex-wrap: wrap;
      min-height: var(--section-card-head-min);
      padding-right: var(--section-card-chevron-room);
    }
    html[data-js] .ui-section-card-head .ui-panel-title {
      font-size: var(--section-card-title-size-narrow);
    }
    html[data-js] .ui-section-card-toggle {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0;
      border: 0;
      border-radius: var(--radius-sm);
      background: none;
      cursor: pointer;
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="true"]) {
      padding-bottom: var(--section-card-pad-bottom);
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="false"]) > .ui-section-card-body {
      display: none;
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="false"]) .ui-source-stamp {
      display: none;
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="false"]) .ui-section-card-peek {
      display: inline-flex;
      align-items: center;
      flex: 1 1 auto;
      gap: var(--space-2);
      min-width: 0;
      color: var(--section-card-peek-text);
      font-size: var(--section-card-peek-size);
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="false"]) .ui-heading-row {
      flex: 0 1 auto;
    }
    /* Lägg till stands on the head, at the right beside the source's label (the pilot session 9/11, K46): above the button
       that covers the head, so that it can be tapped, and hidden while the card is folded, as its body is. */
    html[data-js] .ui-section-card-head .ui-heading-add {
      position: relative;
      z-index: 1;
    }
    html[data-js] .ui-section-card-frame:has(> .ui-section-card-head .ui-section-card-toggle[aria-expanded="false"]) .ui-heading-add {
      display: none;
    }
  }
}
/* The navigation variant (T2.108, K85 A, Björn 12/11; components/nav_link.html): everything that only takes the user to
   another page. Text in the link's colour, underlined at rest so that nothing hangs on hover, with no fill, no edge and
   no box; the line is thicker under the mouse and with the keyboard's focus, and focus has the page's ring
   (:focus-visible). In a row of actions it has the height and the font of the row's buttons, in a compact row theirs too
   (--control-min). Back has the arrow before the words; small is the text's size of a card, with a tap target of 44 px
   with touch that does not make the row higher; in running text it takes the text's own size and weight. The values
   are the tokens --nav-link-*. Placed before the block for reduced motion, which stays last. */
.ui-nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--nav-link-arrow-gap);
  min-height: var(--nav-link-height);
  box-sizing: border-box;
  padding: 0 var(--nav-link-pad);
  color: var(--nav-link-text);
  font-family: var(--nav-link-font);
  font-weight: var(--nav-link-weight);
  font-size: var(--nav-link-size);
  line-height: var(--leading-tight);
  text-decoration-line: underline;
  text-decoration-thickness: var(--nav-link-line);
  text-underline-offset: var(--nav-link-underline-offset);
  white-space: nowrap;
}
.ui-nav-link:hover,
.ui-nav-link:focus-visible {
  text-decoration-thickness: var(--nav-link-line-hover);
}
.ui-nav-link:focus-visible {
  border-radius: var(--radius-md);
}
.ui-nav-link-arrow {
  flex: none;
  width: var(--nav-link-arrow);
  height: var(--nav-link-arrow);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--nav-link-arrow-line);
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* in a row of actions, also a dense one, the buttons' drawn height (T2.120): 36 px with a mouse and with touch, and with
   touch a tap target of 44 px round it in its ::before, centred and outside the flow, as a button's ::after */
:is(.ui-actions, .ui-actions-compact) > .ui-nav-link:not(.ui-nav-link-small, .ui-nav-link-in-text) {
  min-height: var(--nav-link-height-row);
}
@media (pointer: coarse), (any-pointer: coarse) {
  :is(.ui-actions, .ui-actions-compact) > .ui-nav-link:not(.ui-nav-link-small, .ui-nav-link-in-text) {
    position: relative;
  }
  :is(.ui-actions, .ui-actions-compact) > .ui-nav-link:not(.ui-nav-link-small, .ui-nav-link-in-text)::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, var(--button-target));
    height: max(100%, var(--button-target));
    transform: translate(-50%, -50%);
  }
}
.ui-nav-link-small {
  position: relative;
  min-height: 0;
  padding: 0;
  font-size: var(--nav-link-size-small);
}
.ui-nav-link-in-text {
  position: relative;
  display: inline;
  min-height: 0;
  padding: 0;
  font: inherit;
  white-space: normal;
}
/* With touch, and on a computer that also has a touch screen: the small one and the one in running text keep a tap target
   of 44 px, drawn round them and outside the flow, so that the row of a card stays a line of text and a sentence keeps
   its lines (pattern 1 of the review list: the tap height only for what can be tapped). With a mouse they are their
   text. */
@media (pointer: coarse), (any-pointer: coarse) {
  .ui-nav-link-small::before,
  .ui-nav-link-in-text::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: var(--target-min);
    transform: translateY(-50%);
  }
}
/* A chevron or arrow that turns when its control opens turns at once under prefers-reduced-motion (T2.112): the state
   changes and nothing moves. One block for all of them, last in the file, so that no later rule gives a transition back
   (the value picker's arrow and the row's expander are defined after the disclosure's icon). A new turning chevron with
   a transition on transform belongs in this list; e2e/reduced-motion.spec.ts sweeps the catalogue for every element with
   such a transition and fails if one still moves under reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .ui-disclosure-icon,
  .ui-valuepicker-arrow,
  .ui-picker-toggle svg,
  .ui-row-toggle-icon,
  .ui-section-card-chevron {
    transition: none;
  }
}

/* The progress bar (1g.9b, K35): the fill is what is reported, the mark where the plan is today; both are set by the
   custom properties --progress and --progress-plan (whole percent, no unit) on the element. */
.ui-progress-bar {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  height: var(--progress-bar-height);
  background: var(--progress-bar-track);
  border-radius: var(--progress-bar-radius);
}
.ui-progress-bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--progress, 0) * 1%);
  background: var(--progress-bar-fill);
  border-radius: var(--progress-bar-radius);
}
.ui-progress-bar-plan {
  position: absolute;
  top: 50%;
  left: calc(var(--progress-plan, 0) * 1%);
  width: var(--progress-bar-mark-width);
  height: var(--progress-bar-mark-height);
  background: var(--progress-bar-mark);
  transform: translate(-50%, -50%);
}
/* The bar in a table's cell (1g.9c.2, K35, components/table.html with bars): the bar a fixed width and the share after it
   on the same line, so that the bars of a column stand under each other and the shares too. */
.ui-cell-bar {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.ui-cell-bar > .ui-progress-bar {
  flex: 0 0 var(--progress-bar-cell-width);
}

/* The five steps (1g.9b, K35): a group of buttons, a tap on one chooses it. Each step is --steps-height high (--control-min:
   36 px with a mouse, the tap target of 44 px with touch) and shares the width; the chosen one is on the dark surface and is also marked for a screen reader (aria-pressed). */
.ui-steps {
  display: flex;
  border: var(--line-thin) solid var(--steps-edge);
  border-radius: var(--steps-radius);
  overflow: hidden;
  background: var(--steps-bg);
}
.ui-step {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--steps-height);
  padding: 0 var(--space-2);
  border: 0;
  border-left: var(--line-thin) solid var(--steps-edge);
  background: var(--steps-bg);
  color: var(--steps-text);
  font: inherit;
  cursor: pointer;
}
.ui-step:first-child {
  border-left: 0;
}
.ui-step[aria-pressed="true"] {
  background: var(--steps-on-bg);
  color: var(--steps-on-text);
  font-weight: var(--weight-bold);
}
.ui-step:focus-visible {
  outline: var(--line-medium) solid var(--color-focus);
  outline-offset: calc(-1 * var(--line-medium));
}

/* The phone's progress page (1g.9b, K35): a list of rows, each a stack with the bar, the steps and the foot. */
.ui-progress-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ui-progress-row {
  display: flex;
  flex-direction: column;
  gap: var(--progress-row-gap);
  padding: var(--progress-row-pad) 0;
  border-top: var(--line-thin) solid var(--color-border);
}
.ui-progress-row:first-child {
  border-top: 0;
}
.ui-progress-row p {
  margin: 0;
}
.ui-progress-name {
  font-weight: var(--weight-bold);
}
.ui-progress-line {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.ui-progress-value {
  flex: 0 0 var(--progress-value-width);
  text-align: right;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}
.ui-progress-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
.ui-progress-fact {
  color: var(--color-text-2);
}
.ui-more-button,
.ui-progress-undo {
  margin-left: auto;
  min-height: var(--control-min); /* T2.120: 36 px with a mouse, the tap target (44 px) with touch */
  min-width: var(--control-min);
  padding: 0 var(--space-4);
  border: 0;
  background: none;
  color: var(--color-action);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.ui-progress-saved {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.ui-progress-saved[hidden],
.ui-progress-form[hidden] {
  display: none;
}
.ui-progress-mark {
  display: flex;
  align-items: center;
  min-height: var(--target-min);
}
.ui-progress-mark:empty {
  display: none;
}
.ui-progress-form {
  display: flex;
  flex-direction: column;
  gap: var(--progress-row-gap);
}

/* The diary's row Färdiggrad v. N (1g.9b, K35): a whole tap target that leads to the phone's progress page, the title and the
   line about what is not reported under it. */
.ui-diary-progress {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--target-min);
  padding: var(--space-4) var(--space-7);
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.ui-diary-progress-label {
  font-weight: var(--weight-bold);
  color: var(--color-action);
  text-decoration: underline;
}
