/*
 * Sumline's layout and screens. Colours come from the theme (wwwroot/themes/<line of business>.css, loaded after this
 * file) and the shared components from components.css; both are copied from the brand kit, brandkit. Mobile first.
 */

:root {
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --planned-bg: #eef3fb; --planned-fg: #2c4d8f; --done-bg: #f0f0f0; --soon-accent: #bfdcf7;
}
:root[data-theme="dark"] { --planned-bg: #1c2638; --planned-fg: #9db8ec; --done-bg: #1a2636; --soon-accent: #234a72; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --planned-bg: #1c2638; --planned-fg: #9db8ec; --done-bg: #1a2636; --soon-accent: #234a72; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
}

a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.6rem; margin: 0 0 0.35rem; }
h1, h2, h3 { color: var(--ink); }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
code { font-size: 0.85em; background: var(--tint); padding: 0.05em 0.35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1:focus { outline: none; } /* Blazor moves focus to the h1 on navigation, for screen readers. */

.skip-link { position: absolute; left: -999px; top: 0.5rem; z-index: 100; padding: 0.5rem 1rem; background: var(--focus); color: var(--ink); }
.skip-link:focus { left: 0.5rem; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); padding: 0 1rem; max-width: 90rem; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.brand svg { display: block; width: 28px; height: 28px; }
/* The drawn mark (the brand kit's sumline/mark/drawn): on the sign-in page the sum line is drawn under the S, one rule and
   then the other, once; with reduced motion it stands as it is. */
.brand--draw .brand__rule { transform-box: fill-box; transform-origin: 0 50%; animation: brand-draw 0.35s cubic-bezier(0.3, 0.6, 0.4, 1) 0.3s both; }
.brand--draw .brand__rule--2 { animation-delay: 0.6s; }
@keyframes brand-draw { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .brand--draw .brand__rule { animation: none; } }
.site-header__product { display: none; padding-left: 1rem; border-left: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.site-header__tools { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
@media (min-width: 48rem) { .site-header__product { display: block; } }

.language { display: flex; padding: 3px; border-radius: 999px; background: var(--page); border: 1px solid var(--line); }
.language button { min-width: 2.5rem; min-height: 2rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 0.75rem/1 var(--font); letter-spacing: 0.06em; cursor: pointer; }
.language button[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); }

.who { display: none; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tint); color: var(--accent-text); font-size: 0.75rem; font-weight: 600; }
@media (min-width: 40rem) { .who { display: flex; } }
.sign-out { margin: 0; }
.sign-out .btn { white-space: nowrap; }
.sign-out svg { display: none; width: 18px; height: 18px; }
/* A phone has no room for "Sign out" in words: the button shows its icon, and the words stay for screen readers. */
@media (max-width: 40rem) {
  .sign-out svg { display: block; }
  .sign-out .btn { width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--page); }
  .sign-out__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* The tools keep their size; the mark stands for the name, and the company's name gives way (with its "…"). */
  .brand__name { display: none; }
  .site-header__tools { flex: none; }
  .company-switch { min-width: 0; }
}
@media (max-width: 30rem) {
  .site-header__inner { gap: 0.5rem; padding: 0 0.75rem; }
  .site-header__tools { gap: 0.35rem; }
  .brand svg { width: 24px; height: 24px; }
  .language button { min-width: 2.1rem; }
}

/* ---- shell ---- */
.shell { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 90rem; margin: 0 auto; }
/* Narrow screens: the menu is a panel under the header, opened by the burger (menu.js). */
.sidenav { display: none; position: fixed; z-index: 15; left: 0; right: 0; flex-direction: column; gap: 0.15rem;
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto; padding: 0.5rem 0.75rem 1rem;
  border-bottom: 1px solid var(--line); background: var(--card); box-shadow: 0 12px 24px rgb(0 0 0 / 0.18); }
.sidenav[data-open] { display: flex; }
.sidenav[data-open] .sidenav__section { display: block; }
.sidenav a { min-height: 2.75rem; white-space: nowrap; }
/* NavLink marks the current page with a class: it gets the kit's underscore under its word. */
.sidenav a.active { color: var(--ink); font-weight: 600; }
.sidenav a.active .sidenav__label::after { content: ""; position: absolute; left: 0; bottom: -0.3rem; width: 1.25rem; height: 3px; border-radius: 2px; background: var(--accent); }
.menu-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-left: -0.5rem; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle:hover { background: var(--tint); }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.15s, opacity 0.15s; }
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
.sidenav__section { display: none; }
.sidenav--arranging .sidenav__section { display: block; }
/* The starred items are the menu; each theme opens its items under it (menu.js), and is open anyway on one of its pages. */
.sidenav__more { all: unset; box-sizing: border-box; display: flex; gap: 0.6rem; align-items: center; min-height: 2.5rem; padding: 0.45rem 0.7rem; border-radius: var(--radius-small);
  color: var(--muted); font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.sidenav__more:hover { color: var(--ink); background: var(--page); }
.sidenav__more:focus-visible { outline: 3px solid var(--focus); }
.sidenav__chevron { flex: none; width: 18px; height: 18px; transition: transform 0.15s; }
.sidenav__more[aria-expanded="true"] .sidenav__chevron { transform: rotate(90deg); }
/* The sum of the numbers under a theme, on its button while closed. */
.sidenav__more-count { margin-left: auto; }
.sidenav__more[aria-expanded="true"] .sidenav__more-count { display: none; }
/* A theme's items stand a little in from it, so they read as its own and not as items of the menu. */
.sidenav__more-items { display: none; flex-direction: column; gap: 0.15rem; padding-left: 1rem; }
.sidenav__group { display: flex; flex-direction: column; gap: 0.15rem; }
.sidenav__group[data-group-open] .sidenav__more-items, .sidenav__group:not([data-group-shut]) .sidenav__more-items:has(a.active) { display: flex; }
.sidenav__item { display: flex; align-items: center; gap: 0.1rem; }
.sidenav__item > a { flex: 1; min-width: 0; }
/* A long name is cut with "…", never under the star beside it; the room below keeps the current page's underscore. */
.sidenav__item > a .sidenav__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-bottom: 0.55rem; margin-bottom: -0.55rem; }
.sidenav__item > a.active .sidenav__label::after { bottom: 0.25rem; }
/* With a mouse, a name cut with "…" floats out to the right in full while pointed at, over the number and the star. */
@media (hover: hover) and (min-width: 60rem) {
  .sidenav a:hover .sidenav__label { position: relative; z-index: 4; flex: none; width: max-content; overflow: visible; text-overflow: clip;
    margin-block: -0.45rem; padding: 0.45rem 0.7rem 0.45rem 0; margin-right: -0.7rem; border-radius: 0 var(--radius-small) var(--radius-small) 0; background: var(--page); }
  .sidenav a.active:hover .sidenav__label::after { bottom: 0.15rem; }
}
/* A star to put an item in the menu: seen on hover and focus, so a theme stays a quiet list. */
.sidenav__star { opacity: 0; }
.sidenav__item:hover .sidenav__star, .sidenav__star:focus-visible { opacity: 1; }
@media (hover: none) { .sidenav__star { opacity: 1; } }
/* The setup's own links: in the menu for the keyboard and the palette, never seen (Settings shows them as cards). */
.sidenav__setup { display: none !important; }
/* Settings: a card for each setup page, under the module it belongs to. */
.settings-group { margin-top: 1.75rem; }
.settings-group h2 { margin: 0 0 0.6rem; font-size: 1rem; }
.company-choice__emblem--setup { display: grid; place-items: center; width: 36px; height: 36px; background: var(--tint); color: var(--accent-text); }
.company-choice__emblem--setup .i { width: 20px; height: 20px; }
/* The person's own menu (docs/adr/0022): Arrange menu, then the starred rows to drag, move and unstar, and More's to star. */
.sidenav__arrange { align-self: flex-start; gap: 0.4rem; margin-top: 0.75rem; }
.sidenav__arrange svg { width: 16px; height: 16px; }
.sidenav__hint, .sidenav__empty { margin: 0 0 0.25rem; padding: 0 0.7rem; color: var(--muted); font-size: 0.8125rem; }
.sidenav__empty { font-style: italic; padding-block: 0.4rem; }
.sidenav__hint:focus { outline: none; }
.sidenav__row[draggable="false"] { cursor: default; }
span.sidenav__grip { display: inline-block; }
.sidenav__row { display: flex; gap: 0.5rem; align-items: center; min-height: 2.5rem; padding: 0.2rem 0.25rem 0.2rem 0.35rem; border: 1px dashed transparent; border-radius: var(--radius-small);
  color: var(--ink); font-size: 0.875rem; font-weight: 500; background: var(--card); cursor: grab; }
.sidenav__row:hover { border-color: var(--line); }
.sidenav__row.is-drop { border-color: var(--accent); background: var(--tint); }
.sidenav__row .sidenav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav__grip { flex: none; width: 14px; height: 14px; fill: var(--muted); }
.sidenav__tools { display: flex; flex: none; gap: 0.1rem; }
.sidenav__tool { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.sidenav__tool svg { width: 16px; height: 16px; fill: none; }
.sidenav__tool:hover:not(:disabled) { color: var(--ink); background: var(--tint); }
.sidenav__tool:disabled { opacity: 0.3; cursor: default; }
.sidenav__tool.is-on { color: var(--accent-text); }
.sidenav__tool.is-on[data-menu-tool$=" star"] svg { fill: currentColor; }
.sidenav__arrange-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; padding: 0 0.35rem; }
/* The phone's bottom bar: the first items of the person's order, and Menu for the rest. */
:root { --bottombar-h: 3.75rem; }
.bottombar { position: fixed; z-index: 14; left: 0; right: 0; bottom: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column;
  height: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); background: var(--header-bg); backdrop-filter: saturate(1.4) blur(8px); }
.bottombar a, .bottombar__menu { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-width: 0; padding: 0 0.25rem;
  border: 0; background: transparent; color: var(--muted); font: 500 0.6875rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.bottombar .i { width: 22px; height: 22px; }
.bottombar a.active { color: var(--ink); font-weight: 600; }
.bottombar a.active::after { content: ""; position: absolute; top: 0; width: 1.25rem; height: 3px; border-radius: 0 0 2px 2px; background: var(--accent); }
.bottombar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottombar__menu .menu-toggle__bars { margin: 0.55rem 0 0.4rem; }
/* The number waiting there, as on the side menu (never in the accent: the underscore is the only thing in it). */
.bottombar__count { position: absolute; top: 0.3rem; left: calc(50% + 0.35rem); min-width: 1.1rem; height: 1.1rem; padding: 0 0.3rem; box-sizing: border-box; border-radius: 999px;
  background: var(--blue-dark); color: #fff; font-size: 0.625rem; font-weight: 700; line-height: 1.1rem; text-align: center; font-variant-numeric: tabular-nums; }
.sidenav__account { display: none; }
@media (max-width: 59.99rem) {
  body:has(.bottombar) { padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); }
  /* One menu button is enough: with the bottom bar, its Menu opens the menu, and the header's goes. */
  body:has(.bottombar) .menu-toggle { display: none; }
  .sidenav { max-height: calc(100dvh - var(--header-h) - var(--bottombar-h) - env(safe-area-inset-bottom)); }
  /* The open menu hangs from the header wherever the page is scrolled to, scrolls itself without moving the page under
     it, and the page stays put while it is open. */
  .sidenav[data-open] { top: var(--header-h); overscroll-behavior: contain; }
  html:has(.sidenav[data-open]) { overflow: hidden; }
  /* The header keeps the company (and our staff's Admin); help, theme, language, the account and Sign out are at the
     bottom of the menu. Chat has its place in the bottom bar. */
  .site-header__tools > :not(a.btn) { display: none; }
  .sidenav__account { display: grid; gap: 0.15rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
  .sidenav__account .avatar { flex: none; }
  .sidenav__switches { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.45rem 0.7rem; }
  .sidenav__account .sign-out { padding: 0.25rem 0.7rem 0.5rem; }
  /* Here it is words, not the round icon the header's button becomes on a phone. */
  .sidenav__account .sign-out .btn { width: auto; height: auto; min-height: 2.25rem; padding: 0.35rem 0.8rem; border: 0; border-radius: var(--radius-small); background: var(--page); }
}
.content { flex: 1; min-width: 0; padding: 1.25rem 1rem 3rem; overflow-wrap: anywhere; }
@media (min-width: 60rem) {
  .shell { flex-direction: row; }
  .sidenav, .sidenav[data-open] { display: flex; position: static; flex-direction: column; width: 15rem; flex-shrink: 0; max-height: none; border-bottom: 0; border-right: 1px solid var(--line); padding: 1.25rem 0.75rem; overflow: visible; box-shadow: none; }
  .sidenav a { min-height: 0; }
  .menu-toggle { display: none; }
  .sidenav__section { display: block; }
  .sidenav--arranging, .sidenav--arranging[data-open] { width: 21rem; }
  .bottombar { display: none; }
  .content { padding: 2rem 2.5rem 4rem; }
}

.footer { padding: 1rem; color: var(--muted); font-size: 0.8rem; text-align: center; border-top: 1px solid var(--line); background: var(--card); }
.footer p { margin: 0; }

/* ---- building blocks ---- */
.page-head { margin-bottom: 1.5rem; }
.page-head p { margin: 0; color: var(--muted); max-width: 48rem; }
/* Where the page sits (the layout's trail, above its heading): Indstillinger, the menu item, the record. */
.crumbs-bar { margin: 0 0 0.6rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }


/* A notice without an icon is a plain block (a card, a message, a list of errors). */
.notice:not(:has(> .i)) { display: block; }
.card.notice { background: var(--tint); border-color: transparent; }
.notice--error { color: var(--red); }
ul.notice--error { padding: 0.75rem 1rem 0.75rem 2rem; border-radius: var(--radius-small); background: var(--red-tint); }
.badge { margin: 0 0.25rem 0.25rem 0; }
/* A total and what it is made of (Breakdown): the total alone, a small button beside it opens the parts in place. */
.breakdown { position: relative; display: inline-block; text-align: inherit; }
.breakdown summary { color: inherit; display: inline-flex; gap: 0.35rem; align-items: center; cursor: pointer; list-style: none; border-radius: 4px; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.breakdown__icon { flex: none; width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; color: var(--muted); }
.breakdown summary:hover .breakdown__icon, .breakdown[open] .breakdown__icon { color: var(--accent); }
.breakdown__total { font-variant-numeric: tabular-nums; }
/* A total with nothing to break down stands where the others' numbers stand, not under their icon. */
.breakdown__total--alone { padding-right: 1.3rem; }
/* Over the table, under the total: opening it changes no column's width nor any row's height. */
.breakdown__parts { position: absolute; z-index: 10; top: calc(100% + 0.3rem); right: 0; display: grid; gap: 0.15rem; min-width: 9rem; margin: 0;
  padding: 0.5rem 0.7rem; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-small); box-shadow: 0 8px 24px var(--shadow);
  white-space: nowrap; font-size: 0.8125rem; color: var(--muted); }
.breakdown__parts div { display: flex; justify-content: flex-end; gap: 0.6rem; }
.breakdown__parts dt { font-weight: 400; }
.breakdown__parts dd { min-width: 2.5rem; margin: 0; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* ---- forms ---- */
input, select, textarea { font: inherit; color: var(--ink); min-height: 2.5rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--input-bg); }
/* Native selects (macOS above all) ignore height and padding: draw our own, the same size as text fields. */
select {
  -webkit-appearance: none; appearance: none; padding-right: 2.2rem; cursor: pointer; background-color: var(--input-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a8f87' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center;
}
select[multiple] { background-image: none; padding-right: 0.7rem; }
/* Radios and checkboxes keep their own size: the field padding above is for text. */
input[type="radio"], input[type="checkbox"] { min-height: 0; padding: 0; }
input:focus, select:focus { border-color: var(--accent-text); outline: 2px solid var(--focus); }
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.filters, .inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; }
/* Room under a filter row and a table, as a card has, so what follows them never touches them. */
.filters { margin-bottom: 1rem; }
.table-scroll:not(:last-child) { margin-bottom: 1rem; }
/* And above it when something stands right before it (a field, a line of text), whatever that is. */
.table-scroll:not(:first-child) { margin-top: 1rem; }
.inline-form { margin-top: 1rem; }
.check { flex-direction: row; align-items: baseline; gap: 0.5rem; padding: 0.3rem 0; color: var(--ink); font-weight: 400; }
.check input { min-height: auto; }

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.875rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--page); }
.table th, .table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.table .is-disabled td { color: var(--muted); }
.card .table { border: 0; }
.table-scroll { overflow-x: auto; }
.filters input[type="search"] { min-width: min(22rem, 100%); }
/* A page whose filter row is its search alone: the field takes the room, up to a readable width; on a phone, the width there is. */
.filters__wide { flex: 1 1 22rem; max-width: 40rem; }
.filters__wide input[type="search"] { width: 100%; }
/* On a phone each row becomes a card: the first cell is its heading, the others carry their column's name,
   which tables.js copies from the table head. */
@media (max-width: 40rem) {
  .table { display: block; border: 0; border-radius: 0; background: none; overflow: visible; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table tbody, .table tfoot { display: grid; gap: 0.6rem; }
  .table tr { display: block; }
  .table tbody tr { padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
  /* The column's name stands in its own column beside the value and wraps there, and the cell grows with whichever is
     taller: a long heading (a period, "1. jan. 2026 – 30. nov. 2026") never runs over the figure. */
  .table td { display: flow-root; position: relative; padding: 0.15rem 0 0.15rem 7.5rem; border: 0; text-align: left; min-height: 1.6rem; }
  .table td::before { content: attr(data-label); float: left; width: 7rem; margin: 0.15rem 0 0 -7.5rem; color: var(--muted); font-size: 0.6875rem; font-weight: 600; line-height: 1.35; letter-spacing: 0.04em; text-transform: uppercase; white-space: normal; overflow-wrap: break-word; }
  .table td:first-child, .table td[data-label=""], .table td.row-actions { padding-left: 0; }
  .table td:first-child::before, .table td[data-label=""]::before, .table td.row-actions::before { content: none; }
  /* The chosen card's underscore under its heading, which has no label column here. */
  .table tbody tr[aria-selected="true"] td:first-child::after { left: 0; bottom: 0.15rem; }
  .table td:first-child:not(:only-child) { padding-bottom: 0.45rem; margin-bottom: 0.35rem; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
  .table td:empty { display: none; }
  /* Stronger than the later .table td.num, which puts numbers right on a wide screen. */
  .table .right, .table th.right, .table tbody td.num { text-align: left; }
  .table td::before { text-align: left; }
  /* A heading or group row (the chart of accounts' 1000 RESULTATOPGØRELSE) is a heading line between the cards, not a card. */
  .table tr.chart__heading, .table tr.chart__group { display: flex; gap: 0.6rem; padding: 0.9rem 0 0.1rem; background: none; border: 0; border-radius: 0; }
  .table tr.chart__heading td, .table tr.chart__group td { padding: 0; margin: 0; border: 0; min-height: 0; font-size: inherit; }
  .table tr.chart__heading td::before, .table tr.chart__group td::before { content: none; }
  .table td.row-actions { display: flex; flex-wrap: wrap; gap: 0.25rem; padding-top: 0.4rem; white-space: normal; }
  .table tfoot { gap: 0; padding: 0.25rem 1rem; }
  .table tfoot tr { display: flex; justify-content: space-between; gap: 1rem; }
  .table tfoot td, .table tfoot td:first-child:not(:only-child) { padding: 0.25rem 0; margin: 0; border: 0; font-size: inherit; }
  .table tfoot .total td { border-top: 2px solid var(--accent); }
  .card .table tbody { gap: 0; }
  .card .table tbody tr { padding: 0.75rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
  .card .table tbody tr:last-child { border-bottom: 0; }
  .card .table tfoot { padding-inline: 0; }
  /* A total row is one card: its line above and the underscore below are the card's, not each cell's. */
  .table tbody tr.table__total td { border-top: 0; }
  .table tbody tr.table__total td.num { box-shadow: none; }
  .table tbody tr.table__total, .card .table tbody tr.table__total { border-top: 1.5px solid var(--ink); border-bottom: 3px solid var(--accent); }
  .table input, .table select { max-width: 100%; }
}

/* ---- pages ---- */
.role-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

.sign-in { max-width: 28rem; margin: 3rem auto; text-align: center; }
.sign-in .btn--primary { margin: 1rem 0; }
.sign-in__story { max-width: 28rem; margin: -1.5rem auto 3rem; text-align: center; color: var(--muted); font-size: 0.8125rem; }
.dev-users { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.dev-users form { margin: 0; }
.dev-users .btn { width: 100%; justify-content: space-between; }

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0 0; z-index: 1000; padding: 0.75rem 1rem; background: var(--amber-tint); color: var(--ink); box-shadow: 0 -1px 4px rgb(0 0 0 / 15%); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ---- registers ---- */
.page-head--actions { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
.form-grid { display: grid; gap: 0.9rem 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { font: inherit; min-height: 5rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1rem; }
.field-error { color: var(--red); font-size: 0.75rem; font-weight: 500; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem 1.25rem; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.8125rem; }
.facts dd { margin: 0; }
.columns { display: grid; gap: 1rem; }
@media (min-width: 70rem) { .columns { grid-template-columns: 2fr 1fr; align-items: start; } }
.toggle { flex-direction: row; align-items: center; gap: 0.4rem; color: var(--ink); }
.toggle input { min-height: auto; }
.pager { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; color: var(--muted); font-size: 0.875rem; }

.typeahead { position: relative; }
.typeahead input { width: 100%; padding-right: 2rem; }
.typeahead__clear { position: absolute; right: 0.4rem; top: 0.45rem; border: 0; background: none; font-size: 1.1rem; color: var(--muted); cursor: pointer; }
.typeahead__list { position: absolute; z-index: 30; left: 0; right: 0; margin: 0.25rem 0 0; padding: 0.25rem; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px var(--shadow); max-height: 18rem; overflow: auto; }
.typeahead__list li { padding: 0.45rem 0.6rem; border-radius: 6px; cursor: pointer; font-size: 0.875rem; }
.typeahead__list li.is-active, .typeahead__list li:hover { background: var(--tint); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history__head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
fieldset.form-grid { border: 0; padding: 0; margin: 0; min-width: 0; }
/* A few choices side by side in a table cell (the locations a person works at). */
fieldset.checks { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; column-gap: 0.9rem; }


/* ---- theme switch ---- */
.theme { margin: 0; }
.theme button { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--page); color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--accent-text); border-color: var(--accent-text); }
.theme svg { width: 16px; height: 16px; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.link-button:hover { color: var(--accent-text); text-decoration: underline; }
input[type="file"] { padding: 0.4rem; }
.nowrap { white-space: nowrap; }

/* ---- phones ---- */
@media (max-width: 40rem) {
  /* iOS zooms into any field with text under 16px when it gets focus. */
  input, select, textarea { font-size: 16px; }
  h1 { font-size: 1.4rem; }
  .page-head { margin-bottom: 1.1rem; }
  .page-head--actions { flex-direction: column; align-items: flex-start; }
  .page-head--actions .form-actions { margin-top: 0; gap: 0.5rem; }
  .card { padding: 1rem; }
  .filters > label:not(.toggle):not(.check), .inline-form > label:not(.toggle):not(.check) { flex: 1 1 100%; }
  .filters select, .filters input:not([type="checkbox"]):not([type="radio"]), .inline-form select, .inline-form input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .facts dd { margin-bottom: 0.5rem; }
}

.table .right, .table th.right { text-align: right; }
.table-wrap { overflow-x: auto; }
.table tfoot .total td { color: var(--ink); font-weight: 600; border-top: 2px solid var(--accent); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { padding-inline: 0.5rem; }
.num-input { width: 7rem; text-align: right; }
.small-input { width: 6rem; }
/* A product edited in its row: a form across the table, its stock and card fields under a heading of their own. */
.product-edit { padding: 1rem; }
.product-edit__name { grid-column: span 2; }
.product-edit__more { margin: 1.5rem 0 0; padding: 1rem 0 0; border: 0; border-top: 1px solid var(--line); }
.product-edit__more legend { float: left; grid-column: 1 / -1; width: 100%; padding: 0 0 0.25rem; font-size: 0.875rem; font-weight: 600; }
.product-edit__stock { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; font-size: 0.8125rem; }
.product-edit__stock b { font-size: 1rem; font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) { .product-edit__name { grid-column: auto; } }
.inline-form .grow { flex: 1 1 16rem; }
.new-job,
.new-invoice { margin-top: 1rem; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent-text); }
.sums { display: grid; grid-template-columns: max-content auto; gap: 0.25rem 1.5rem; margin: 0 0 1rem; }
.sums dt { color: var(--muted); }
.sums dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; text-align: left; }
button.link:hover { text-decoration: underline; }
.pre { white-space: pre-line; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Added for the finance application ---- */
.stack { display: grid; gap: 0.75rem; text-align: left; }
.btn--wide { width: 100%; justify-content: center; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8125rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.4rem; list-style: none; padding: 0; }
.authenticator { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.qr { width: 11rem; color: var(--ink); background: var(--card); }
.qr svg { width: 100%; height: auto; display: block; }
.company-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.company-list .card { padding: 0; display: flex; }
/* The choice fills its card, which the grid stretches to its row: the hover tint covers the whole card. */
.company-list .card > form { display: flex; flex: 1; }
.company-list form { margin: 0; }
.company-choice { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 0.9rem; width: 100%; padding: 1rem 1.25rem; cursor: pointer; border-radius: var(--radius); }
.company-choice__emblem { flex: none; border-radius: 8px; }
/* An organisation in the list: the brand tile with the team icon, where a company has its line's emblem. */
.company-choice__emblem--organisation { display: grid; place-items: center; width: 36px; height: 36px; background: var(--brand-tile); color: #fff; }
.company-choice__emblem--organisation .i { width: 20px; height: 20px; }
.company-choice__text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.company-choice:hover { background: var(--tint); }
.company-choice:focus-visible { outline: 3px solid var(--focus); }
.company-choice__name { font-weight: 600; }
.company-switch { display: flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem 0.3rem 0.35rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.875rem; max-width: 16rem; }
.company-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switch:hover { background: var(--tint); }
.company-switch img { flex: none; border-radius: 6px; }
.emblem { vertical-align: -0.3rem; border-radius: 5px; }
.choices--lines { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.choice b { display: flex; gap: 0.45rem; align-items: center; }
.choice__emblem { flex: none; border-radius: 5px; }
.radio-group .muted { margin: 0 0 0.6rem; }
/* Support access is never quiet: the customer and our staff both see it on every page while it lasts. */
.support-banner a { color: inherit; font-weight: 600; }
.support-grant { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.support-grant p { margin: 0; }
.history { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.history li.card { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); }
.history li { padding-left: 0; }
.history li::before, .history li::after { content: none; }
.history li.history--staff { background: var(--amber-tint); }
/* ---- Ledger ---- */
.num, .table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart__heading td { font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.8125rem; padding-top: 1.1rem; }
.chart__group td { font-weight: 600; }
.chart__total td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.chart__blocked td { color: var(--muted); }
/* The cash journal: a dense, keyboard-first grid, a deliberate exception to the paper-like screens. */
.journal td { padding: 0.2rem 0.25rem; vertical-align: top; }
.journal input, .journal select { width: 100%; min-height: 2.1rem; padding: 0.25rem 0.4rem; font: inherit; font-size: 0.875rem; }
.journal .journal__voucher { width: 4.5rem; }
.journal .journal__account { width: 5.5rem; }
.journal .journal__amount { width: 8rem; text-align: right; font-variant-numeric: tabular-nums; }
.journal .journal__text { min-width: 14rem; }
.journal .journal__currency { width: 3.5rem; text-transform: uppercase; }
.journal .journal__rate { width: 5.5rem; text-align: right; }
.journal .journal__date { width: 7.5rem; }
.journal .journal__vat { width: 5rem; }
.journal__name { display: block; color: var(--muted); font-size: 0.75rem; line-height: 1.2; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal__open { background: var(--amber-tint); }
.journal__foot { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center; margin: 0.75rem 0 1.5rem; }
.journal__status { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.segmented { margin-bottom: 1rem; }
/* ---- Sales: the invoice editor is the invoice. The paper stays white in dark mode: it is a document. ---- */
.invoice-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .invoice-workspace { grid-template-columns: minmax(0, 1fr); } }
.invoice-side { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.invoice-side .card { margin: 0; }
.invoice-side label { margin-bottom: 0.6rem; }
.paper {
  --paper-ink: #0b1929; --paper-muted: #55667a; --paper-line: #d7dee6; --paper-tint: #eef4fa;
  /* White paper in either theme: the browser draws its own controls on it (dates, lists) light too. */
  color-scheme: light;
  max-width: 210mm; min-height: 297mm; margin: 0 auto; padding: 18mm 18mm 16mm; background: #fff; color: var(--paper-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 12px 32px rgb(11 25 41 / 12%); border-radius: 3px; font-size: 0.875rem; color-scheme: light;
  display: flex; flex-direction: column;
}
.paper a { color: #1676c4; }
.paper__head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.paper__sender { font-size: 0.6875rem; color: var(--paper-muted); margin: 3.2rem 0 0.4rem; }
.paper__address { font-style: normal; line-height: 1.45; font-size: 0.9375rem; }
.paper__seller { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.75rem; color: var(--paper-muted); line-height: 1.5; }
.paper__seller strong { font-size: 1.1rem; color: var(--paper-ink); }
.paper__titlebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 2.5rem 0 1.5rem; }
.paper__titlebar h1 { font-size: 1.9rem; margin: 0; color: var(--paper-ink); }
.paper__facts { display: grid; grid-template-columns: auto auto; gap: 0.15rem 1rem; margin: 0; font-size: 0.8125rem; }
.paper__facts dt { color: var(--paper-muted); font-size: 0.75rem; }
.paper__facts dd { margin: 0; text-align: right; }
/* Fixed columns: the figures get the room they need, the description the rest (and wraps), so a line never runs off the paper. */
.paper__lines { width: 100%; border-collapse: collapse; table-layout: fixed; }
.paper__lines .col-handle { width: 1.1rem; }
/* The other columns as narrow as what they hold (12 345,00 in a price, 1 234 567,00 in an amount, "måned" in a unit), so
   the description, with the product's number before it, keeps the room. */
.paper__lines .col-qty { width: 2.8rem; }
.paper__lines .col-unit { width: 3.8rem; }
.paper__lines .col-price { width: 5.2rem; }
.paper__lines .col-discount { width: 3.2rem; }
.paper__lines .col-vat { width: 4.2rem; }
.paper__lines .col-amount { width: 5.8rem; }
.paper__lines .col-remove { width: 1.6rem; }
.paper__lines td { overflow: hidden; }
/* But a picker's list (a product, a VAT code) reaches out of its cell while open. */
.paper__lines td:has(.picker__list) { overflow: visible; }
/* With products: the product number before the description, in the same cell. */
.paper__describe { display: flex; gap: 0.3rem; align-items: flex-start; }
.paper__describe > .picker { flex: none; position: relative; }
.paper__lines .paper__field.paper__product { flex: 0 0 3.6rem; width: 3.6rem; }
.paper__lines th { font-size: 0.6875rem; font-weight: 500; color: var(--paper-muted); text-align: left; border-bottom: 1.2px solid var(--paper-ink); padding: 0.35rem 0.3rem; }
.paper__lines td { border-bottom: 1px solid var(--paper-line); padding: 0.25rem 0.3rem; vertical-align: top; }
.paper__lines .num { text-align: right; }
.paper__handle { width: 1rem; color: var(--paper-line); cursor: grab; user-select: none; padding-top: 0.55rem !important; }
.paper__lines tr:hover .paper__handle { color: var(--paper-muted); }
.paper__dragging { opacity: 0.4; }
.paper__amount { padding-top: 0.55rem !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Fields look like printed text until you point at them. */
.paper__field { width: 100%; min-height: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--paper-ink); font: inherit; padding: 0.25rem 0.35rem; }
.paper__field:hover { border-color: var(--paper-line); }
.paper__field:focus { outline: none; border-color: #2e9ef4; background: #f6fbff; box-shadow: 0 0 0 3px rgb(46 158 244 / 18%); }
.paper__field::placeholder { color: #9aa9b8; }
.paper__field.num { text-align: right; font-variant-numeric: tabular-nums; }
.paper select.paper__field { -webkit-appearance: none; appearance: none; padding-right: 0.35rem; cursor: pointer; }
.paper__text { resize: vertical; min-width: 0; field-sizing: content; }
.paper__lines .paper__field { width: 100%; box-sizing: border-box; }
.paper__discount { width: 100% !important; }
.paper__days { width: 3.2rem; display: inline-block; text-align: center; }
.paper__facts .paper__field { text-align: right; }
.paper__remove { border: 0; background: none; color: var(--paper-line); font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem; }
.paper__lines tr:hover .paper__remove { color: #b42318; }
.paper__add { align-self: flex-start; margin-top: 0.4rem; border: 1px dashed var(--paper-line); background: none; color: var(--paper-muted); border-radius: 4px; padding: 0.4rem 0.8rem; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.paper__add:hover { border-color: #2e9ef4; color: #1676c4; }
.paper__totals { margin: 1.2rem 0 0 auto; min-width: 55%; border-collapse: collapse; font-size: 0.875rem; }
.paper__totals td { padding: 0.2rem 0.3rem; }
.paper__totals .muted { color: var(--paper-muted); }
.paper__grand td { border-top: 1.2px solid var(--paper-ink); font-weight: 700; font-size: 1rem; padding-top: 0.45rem; }
.paper__note { margin-top: 1.5rem; resize: vertical; }
.paper__note-static { margin-top: 1.5rem; white-space: pre-line; }
.paper__text-static { white-space: pre-line; }
.paper__payment { margin-top: auto; padding: 0.8rem 1rem; background: var(--paper-tint); border-radius: 4px; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.8125rem; }
.paper__missing { color: #b26a00; }
/* Which of the company's accounts the customer pays to: chosen on the sheet, not printed as a field. */
.paper__account { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; color: var(--paper-muted); }
.picker { position: relative; max-width: 22rem; }
.picker__input { border-color: var(--paper-line); font-size: 0.9375rem; }
.paper .picker__list { position: absolute; z-index: 5; left: 0; right: auto; min-width: max(100%, 20rem); top: 100%; margin: 0.2rem 0 0; padding: 0.25rem; list-style: none; background: #fff; border: 1px solid var(--paper-line); border-radius: 6px; box-shadow: 0 8px 24px rgb(11 25 41 / 14%); }
.picker__list li:has(> button) { padding: 0; }
.picker__list button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 0.45rem 0.6rem; border-radius: 4px; cursor: pointer; color: inherit; }
.paper .picker__list button { color: var(--paper-ink); }
/* The app's picker on the paper takes the paper's colours whatever the theme (a product, a VAT code on a line). */
.paper .picker__list li { color: var(--paper-ink); }
.paper .picker__list li small { color: var(--paper-muted); }
.paper .picker__list li[aria-selected="true"] { background: var(--paper-tint); }
.paper .picker__list mark { color: #1470bb; }
.picker__list button:hover, .picker__list button:focus { background: var(--tint); }
.paper .picker__list button:hover, .paper .picker__list button:focus { background: var(--paper-tint); }
@media (max-width: 720px) {
  .paper { padding: 1.2rem; min-height: 0; }
  .paper__head { grid-template-columns: 1fr; }
  .paper__seller { align-items: flex-start; order: -1; }
  .paper__sender { margin-top: 0.5rem; }
}
.paper__lines th { white-space: nowrap; }
.paper select.paper__field { min-width: 0; text-overflow: ellipsis; }
/* A paper narrower than the line table (the side panel beside it, a small screen): each line wraps, the description
   on its own row and the figures below it, each with its label. */
.paper { container: paper / inline-size; width: 100%; box-sizing: border-box; }
@container paper (max-width: 40rem) {
  .paper__lines thead { display: none; }
  .paper__lines tr[data-row] { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--paper-line); }
  .paper__lines tr[data-row] > td { border: 0; padding: 0; }
  .paper__lines tr[data-row] > td:nth-child(2) { flex: 1 1 calc(100% - 4rem); }
  .paper__lines tr[data-row] > td[data-label] { flex: 1 1 4.5rem; }
  .paper__lines tr[data-row] > td[data-label]::before { content: attr(data-label); display: block; padding: 0 0.35rem; color: var(--paper-muted); font-size: 0.6875rem; text-align: left; }
  .paper__lines tr[data-row] > .paper__handle { order: -3; padding-top: 0.35rem !important; }
  .paper__lines tr[data-row] > td:nth-child(2) { order: -2; }
  .paper__lines tr[data-row] > td:last-child { order: -1; }
  .paper__lines tr[data-row] > td.num[data-label]::before { text-align: right; }
  .paper__lines tr[data-row] > .paper__amount { flex: 1 0 6rem; padding: 0 0 0.3rem !important; }
  .paper__lines tr[data-row] > .paper__amount::before { padding-bottom: 0.3rem; }
  .paper__text { min-width: 0; }
  .paper select.paper__field { min-width: 0; }
  .paper__lines td:nth-child(3) .paper__field, .paper__lines td:nth-child(5) .paper__field, .paper__discount { width: 100% !important; }
}
.demo-banner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; padding: 0.45rem 1rem; background: var(--navy); color: #fff; font-size: 0.8125rem; }
.demo-banner { background: var(--brand-tile); }
.demo-banner strong { letter-spacing: 0.08em; color: var(--accent); }

/* ---- Purchases: the bill beside its voucher (the drop zone, voucher cards, split view and line cards are the kit's) ---- */
.split-view { margin-top: 0.75rem; }
/* A card under the two panes (the VAT page's connection to SKAT): the panes carry no bottom margin of their own. */
.split-view + .card { margin-top: 1rem; }
.einvoice { margin: 0; }
.einvoice h2 { display: flex; gap: 0.5rem; align-items: center; }
/* A received e-invoice as it reads: the parties, number and dates, the lines, VAT and total, how to pay. */
.einvoice-view { display: grid; gap: 0.9rem; }
.einvoice-view__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.einvoice-view__parties > div { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.875rem; }
.einvoice-view__facts, .einvoice-view__totals { display: grid; grid-template-columns: auto auto; gap: 0.2rem 1rem; margin: 0; font-size: 0.875rem; }
.einvoice-view__facts { justify-content: start; }
.einvoice-view__totals { justify-content: end; }
.einvoice-view dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.einvoice-view__facts dd { text-align: left; }
.einvoice-view__lines { font-size: 0.875rem; }
.bill-card { display: grid; gap: 1rem; margin: 0; }
.bill-card__head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bill-card__head h1 { margin: 0; }
.bill-card .segmented { margin: 0; justify-self: start; }
.supplier-chosen { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.supplier-picker .picker__list { position: static; margin-top: 4px; }
.bill-lines--read td { vertical-align: middle; }
.bill-sums { margin: 0; justify-self: end; min-width: 14rem; }
.pay-form { display: grid; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pay-form .btn, .bill-card > .btn { justify-self: start; }
.pay-form h2, .bill-card > h2 { margin: 0; }

/* ---- The logo's story (an easter egg: hold the logo, or type "sumline") ---- */
.brand svg { touch-action: none; -webkit-touch-callout: none; user-select: none; }
.brand-story { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; padding: calc(var(--header-h) + 1rem) 16px 16px;
  background: rgb(0 0 0 / 25%); }
.brand-story[hidden] { display: none; }
.brand-story__card { display: grid; gap: 0.75rem; justify-items: start; max-width: 30rem; padding: 1.5rem 1.6rem; border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: 0 20px 50px rgb(0 0 0 / 30%); animation: brand-story-in 0.25s ease-out; }
.brand-story__card h2 { margin: 0; font-size: 1.3rem; }
.brand-story__card p { margin: 0; line-height: 1.6; }
.brand-story__mark { width: 56px; height: 56px; }
.brand-story__card .brand-story__say { margin-top: -0.5rem; color: var(--muted); font-size: 0.875rem; }
@keyframes brand-story-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .brand-story__card { animation: none; } }

/* ---- Bank: statement lines beside the selected line's panel (selectable rows and suggestions are the kit's) ---- */
.bank-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); margin-top: 0; }
@media (max-width: 1100px) { .bank-split { grid-template-columns: minmax(0, 1fr); } }
.bank-lines { margin: 0; }
.bank-panel { display: grid; gap: 1rem; margin: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
.bank-panel__head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.bank-panel__head h2 { margin: 0.1rem 0 0; font-size: 1.05rem; }
.bank-panel__amount { font-size: 1.3rem; font-weight: 600; }
.bank-panel__title { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bank-post { display: grid; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.bank-post .btn { justify-self: start; }
@media (max-width: 1100px) { .bank-panel { position: static; } }


/* Documents: folders beside the list. */
.documents { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 48rem) { .documents { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; } }
/* The company's own folders under Sumline's, each indented under the one it is in; the underscore follows the indent. */
.folders__title { margin: 0.9rem 0 0.25rem; padding: 0 0.7rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.folder--own { padding-left: calc(0.7rem + var(--depth, 0) * 1rem); }
.folder--own[aria-current="page"]::after { left: calc(0.7rem + var(--depth, 0) * 1rem + 18px + 0.6rem); }
.folder--add { width: 100%; border: 0; background: none; font: inherit; font-size: 0.875rem; text-align: left; cursor: pointer; }
.folder-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.folder-head h2 { margin: 0; font-size: 1.05rem; }
.folder-form { margin: 0 0 1rem; }
.document__folder { display: block; font-size: 0.75rem; }
.document__move { width: auto; max-width: 12rem; min-height: 2rem; padding: 0.2rem 0.5rem; font-size: 0.8125rem; }
.document__confirm { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.8125rem; }
@media (max-width: 48rem) {
  .folders__title { display: none; }
  .folder--own { padding-left: 0.7rem; }
  .folder--own[aria-current="page"]::after { left: calc(0.7rem + 18px + 0.6rem); }
  .folder--add { width: auto; }
}

/* A list with the chosen row's work beside it (VAT returns; the bank page has its own). */
.work-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); margin-top: 0; }
@media (max-width: 1100px) { .work-split { grid-template-columns: minmax(0, 1fr); } }
.work-panel { display: grid; gap: 1rem; margin: 0; align-content: start; }
.work-panel__head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.work-panel__head h2 { margin: 0.1rem 0 0; font-size: 1.05rem; }
.work-panel__amount { font-size: 1.3rem; font-weight: 600; }
.work-form { display: grid; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.work-form .btn { justify-self: start; }
.vat-boxes td:first-child { white-space: normal; }

/* Statements: account numbers in a quiet column, subtotals set apart from accounts. */
.statement__no { display: inline-block; min-width: 3.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.statement .statement__subtotal td { font-weight: 600; }
.statement td.num { white-space: nowrap; }
.saft { display: grid; gap: 0.6rem; margin-top: 1rem; }
.saft h2 { margin: 0; font-size: 1.05rem; }
.saft p { margin: 0; max-width: 65ch; }
.saft .btn { justify-self: start; gap: 0.6rem; }

/* Posting guidance on an account: ours, then the company's own. */
.guidance { display: grid; gap: 0.5rem; margin-bottom: 1rem; max-width: 70ch; }
.guidance h2 { margin: 0; font-size: 1rem; }
.guidance p { margin: 0; }
.guidance .btn, .guidance .button-row { justify-self: start; }
.guidance__own { padding: 0.5rem 0.75rem; border-radius: var(--radius-small); background: var(--tint); }
.invoice-mail { display: grid; gap: 0.6rem; }
.invoice-mail h2 { margin: 0; font-size: 1rem; }
.reminder-charges { border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.7rem 0.5rem; margin: 0; min-width: 0; }
.reminder-charges legend { padding: 0 0.3rem; color: var(--muted); }
.reminder-charges .check .num { margin-left: 0.3rem; font-variant-numeric: tabular-nums; }
.charges li { display: flex; justify-content: space-between; gap: 0.5rem; }
.charges .num { font-variant-numeric: tabular-nums; }

/* ---- An import: rows that still need a choice ---- */
.table tr.row--attention td { background: var(--amber-tint); }

/* ---- The company's modules: a switch each ---- */
.module-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.module-list li { padding: 0.55rem 0; border-top: 1px solid var(--line); }
.module-list li:first-child { border-top: 0; }
.module-list .toggle { align-items: flex-start; }
.module-list .toggle input { margin-top: 0.25rem; }
.module-list .badge { margin-left: 0.4rem; }
.module-addon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.module-addon > span:first-child { flex: 1 1 16rem; min-width: 0; }
.badge--addon { background: var(--amber-tint); color: var(--amber); }

/* ---- Feature flags (docs/adr/0033): the Beta badge, and "Nyt i Sumline" on the overview ---- */
.badge--beta { background: var(--blue-dark); color: #fff; letter-spacing: 0.02em; }
.beta-badge { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; }
.release-notes ul { margin: 0.5rem 0 1rem; padding-left: 1.2rem; }
.release-notes li + li { margin-top: 0.4rem; }

/* ---- The company's colour theme: a card per theme, with a swatch of its tile, accent and tint ---- */
.choices--themes { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.choices--themes .choice input { grid-row: span 3; }
.theme-swatch { display: flex; height: 1.25rem; margin: 0.25rem 0 0.1rem; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.theme-swatch span { flex: 1; }
.theme-swatch span:nth-child(1) { flex: 2; background: var(--swatch-navy); }
.theme-swatch span:nth-child(2) { background: var(--swatch-accent); }
.theme-swatch span:nth-child(3) { background: var(--swatch-tint); }

/* ---- Invoice design: a setting per row (name, control, back to standard), the sample invoice beside them ---- */
.design-group { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.design-group:last-child { margin-bottom: 0; }
.design-group legend { padding: 0; margin-bottom: 0.35rem; font-size: 1rem; font-weight: 600; }
.design-group > p { margin: 0; }
.design-setting { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 1.4fr) auto; gap: 0.25rem 0.75rem; align-items: center; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.design-setting--choices { align-items: start; }
.design-setting__label { font-size: 0.875rem; font-weight: 500; }
.design-setting__reset { justify-self: end; white-space: nowrap; }
.design-setting__error { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.design-setting__error:empty { display: none; }
.colour-field { display: flex; gap: 0.5rem; align-items: center; }
.colour-field input[type="color"] { flex: none; width: 2.5rem; height: 2.5rem; padding: 0.15rem; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--input-bg); cursor: pointer; }
.colour-field .input { max-width: 7.5rem; font-variant-numeric: tabular-nums; text-transform: lowercase; }
.colour-dot { display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.35rem; border-radius: 50%; border: 1px solid var(--line-strong); vertical-align: -0.1em; }
.invoice-preview > img { box-shadow: 0 4px 18px var(--shadow); transition: opacity 0.15s; }
.invoice-preview > img.is-busy { opacity: 0.6; }
@media (max-width: 40rem) { .design-setting { grid-template-columns: minmax(0, 1fr) auto; } .design-setting__control { grid-column: 1 / -1; grid-row: 2; } }

/* ---- Bookings: the week as columns of time, the chosen appointment beside it; a list per day on phones ---- */
.booking-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 0.75rem; }
.booking-toolbar h2 { margin: 0; font-size: 1.05rem; }
.booking-toolbar .segmented { margin: 0 0 0 auto; }
.booking { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.booking-week { --hour: 4rem; overflow-x: auto; margin-bottom: 0; }
.booking-week__head, .booking-week__body { display: grid; grid-template-columns: 3rem repeat(var(--columns), minmax(7.5rem, 1fr)); min-width: calc(3rem + var(--columns) * 7.5rem); }
.booking-week__head span { padding: 0.55rem 0.5rem; font-size: 0.8125rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.booking-week__head b { display: inline-block; color: var(--ink); font-weight: 600; }
/* Day names start with a capital in a heading, but only the first letter ("Mandag 26. oktober"). */
.booking-week__head b::first-letter, .booking-agenda h3::first-letter { text-transform: uppercase; }
.booking-week__head .is-today, .booking-agenda h3.is-today { color: var(--accent-text); }
.booking-week__head .is-today b { color: var(--accent-text); }
.booking-week__hours span { display: block; height: var(--hour); padding: 0.1rem 0.4rem 0 0; text-align: right; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* An hour per --hour, a faint line each hour and a fainter one at the half. */
.booking-day { position: relative; height: calc(var(--hours) * var(--hour)); border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.booking-day.is-today { background-color: color-mix(in srgb, var(--tint) 45%, transparent); }
/* An appointment is drawn like a menu item: the menu's type, radius and hover; its customer's name carries the brand's
   underscore, coloured by status (booked, attended, didn't come, cancelled), and the chosen one is set like the current page. */
.slot { all: unset; box-sizing: border-box; position: absolute; display: grid; align-content: start; gap: 0.35rem; overflow: hidden; padding: 0.3rem 0.5rem;
  border-radius: var(--radius-small, 8px); background: var(--page); color: var(--muted); font-size: 0.75rem; font-weight: 500; line-height: 1.25; cursor: pointer; --mark: var(--accent); }
/* The name keeps room for its underscore inside its own box, as it clips for the ellipsis. */
.slot b { position: relative; justify-self: start; max-width: 100%; padding-bottom: 6px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot b::after, .slot-row b::after { content: ""; position: absolute; left: 0; bottom: 0; width: 1.25rem; height: 3px; border-radius: 2px; background: var(--mark); }
.slot-row b { padding-bottom: 6px; }
.slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot:hover { color: var(--ink); background: var(--tint); }
.slot.is-chosen { color: var(--ink); background: var(--tint); }
.slot.is-chosen b { font-weight: 600; }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Done: quiet, like a menu item that isn't the current page. */
/* A short appointment: the time, then the name, on one line; the status mark along the bottom instead of under the name. */
.slot--short { display: flex; align-items: center; gap: 0.4rem; padding: 0 0.45rem; }
/* Processing time (ADR 0066): the slot lighter while the colour develops, so the appointment within it reads on top. */
.slot--gap { background: linear-gradient(to bottom, var(--page) var(--gap-from), color-mix(in srgb, var(--page) 35%, transparent) var(--gap-from) var(--gap-to), var(--page) var(--gap-to)); }
/* A visit of several services on the booking page (ADR 0067): those added, and those that can be. */
.visitor-extras p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; margin: 0.25rem 0; }
.visitor-extra { white-space: nowrap; }
.visitor-extra a { margin-left: 0.25rem; text-decoration: none; }
.slot--short b { padding-bottom: 0; }
.slot--short b::after { display: none; }
/* On the inner span, not the slot itself, so a narrow lane (below) can move the mark under the name. */
.slot--short .slot__in::after { content: ""; position: absolute; left: 0.45rem; bottom: 2px; width: 1.25rem; height: 2px; border-radius: 1px; background: var(--mark); }
.slot__time { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
/* A slot knows its own width: with all calendars side by side at desktop width a lane is narrow, so the first name comes
   first and may wrap to two lines, the time goes under it in small, and the rest of the name gives way. */
.slot { container-type: inline-size; }
.slot__in { display: contents; }
@container (max-width: 7rem) {
  .slot .slot__in { display: grid; align-content: start; gap: 0.1rem; min-width: 0; font-size: 0.75rem; line-height: 1.15; overflow: visible; white-space: normal; }
  .slot__last { display: none; }
  .slot b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; padding-bottom: 4px; }
  .slot--short .slot__in { padding-top: 0.15rem; }
  .slot--short .slot__time { order: 2; font-size: 0.6875rem; }
  .slot--short .slot__in::after { display: none; }
  .slot--short b { padding-bottom: 4px; }
  .slot--short b::after { display: block; height: 2px; }
  .slot .slot__what { font-size: 0.6875rem; white-space: normal; }
}
.slot--attended, .slot-row.slot--attended { --mark: var(--green); }
.slot--attended b, .slot-row.slot--attended b { color: var(--muted); }
.slot--noshow, .slot-row.slot--noshow { --mark: var(--amber); }
.slot--cancelled, .slot-row.slot--cancelled { --mark: var(--line-strong); opacity: 0.7; }
.slot--cancelled b, .slot-row.slot--cancelled b { text-decoration: line-through; }
.booking-agenda { display: none; }
.booking-agenda section { margin-bottom: 0.75rem; }
.booking-agenda h3 { margin: 0 0 0.4rem; font-size: 0.9375rem; }
.booking-agenda__earlier { margin-bottom: 0.75rem; }
.booking-agenda__earlier summary { padding: 0.6rem 0.25rem; font-size: 0.875rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.booking-agenda__earlier[open] summary { margin-bottom: 0.5rem; }
.slot-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; width: 100%; padding: 0.5rem 0.6rem 0.6rem; border-radius: var(--radius-small, 8px);
  color: var(--muted); font-size: 0.875rem; font-weight: 500; text-align: left; text-decoration: none; --mark: var(--accent); }
.slot-row b { position: relative; color: var(--ink); font-weight: 500; }
.slot-row:hover { color: var(--ink); background: var(--page); }
/* The shift plan: the days in equal columns, a shift with its delete beside its time, room before the form below. */
.shifts__table { table-layout: fixed; min-width: 52rem; }
.shifts__table th:first-child { width: 10rem; }
.shifts__table th:last-child { width: 4.5rem; }
.shift { display: grid; gap: 0.05rem; margin-bottom: 0.45rem; }
.shift:last-child { margin-bottom: 0; }
.shift__time { display: inline-flex; align-items: center; gap: 0.15rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shift__delete { padding: 0 0.35rem; min-height: 0; line-height: 1.4; }
@media (max-width: 40rem) { .shifts__table { table-layout: auto; min-width: 0; } }
/* A panel over the page, not beside it (a booking, a card's history): what is under it keeps its width. */
.overlay-panel { position: fixed; z-index: 18; top: calc(var(--header-bottom, var(--header-h)) + 1rem); right: 1rem; width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100vh - var(--header-bottom, var(--header-h)) - 2rem); overflow-y: auto; box-shadow: 0 12px 32px var(--shadow); }
.booking-panel .work-panel__head h2 { margin-top: 0.4rem; }
.booking-mails li { display: flex; justify-content: space-between; gap: 0.75rem; }
.booking-invoice { margin-top: 1rem; }
@media (max-width: 1100px) { .overlay-panel { position: static; order: -1; width: auto; max-height: none; box-shadow: none; } }
@media (max-width: 48rem) {
  .booking-week { display: none; }
  .booking-agenda { display: block; }
  .booking-toolbar .segmented { margin-left: 0; }
}

/* ---- A company's public pages (online booking): its name and theme, one card in the middle, big touch targets ---- */
.visitor { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--page); }
.visitor__head { display: flex; align-items: center; justify-content: center; padding: 1rem max(16px, env(safe-area-inset-left, 0px)); background: var(--brand-tile, var(--navy)); color: #fff; }
.visitor__company { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.visitor__main { width: 100%; max-width: 40rem; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-left, 0px)) 2rem; box-sizing: border-box; }
.visitor__foot { padding: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted); }
/* With a published website (ADR 0049) the visitor pages take its look: the site's warm colours here, its light or dark
   ones from .site--light and .site--dark further down, its own colour from --site-accent, and the app's tokens are
   taken from them, so the booking page's cards, fields and buttons follow. Its name and logo lead back to the site. */
.visitor--site { --site-bg: #fbf7f2; --site-surface: #fff; --site-ink: #2a1f1a; --site-muted: #6b5d55; --site-line: #ebe2d9;
  --site-accent: #8a2f6c; --site-on-accent: #fff;
  --page: var(--site-bg); --card: var(--site-surface); --input-bg: var(--site-surface); --ink: var(--site-ink); --muted: var(--site-muted);
  --line: var(--site-line); --line-strong: color-mix(in srgb, var(--site-ink) 28%, var(--site-bg));
  --accent: var(--site-accent); --accent-text: var(--site-accent); --tint: color-mix(in srgb, var(--site-accent) 12%, var(--site-surface));
  --primary: var(--site-accent); --primary-text: var(--site-on-accent); --brand-tile: var(--site-accent);
  color: var(--ink); color-scheme: light; }
.visitor--site .visitor__head { justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; background: var(--site-surface); color: var(--site-ink);
  border-bottom: 1px solid var(--site-line); }
.visitor__home { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; }
.visitor__logo { height: 2.25rem; width: auto; max-width: 9rem; object-fit: contain; }
.visitor__back { font-size: 0.875rem; font-weight: 600; color: var(--site-accent); }
.visitor-card h1 { margin: 0 0 0.4rem; font-size: 1.35rem; text-wrap: balance; }
.visitor-when { font-size: 1rem; line-height: 1.5; }
.visitor-when b::first-letter, .visitor-day::first-letter { text-transform: uppercase; }
.visitor-services { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.visitor-services a { display: grid; gap: 0.15rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-small, 10px); color: var(--ink); text-decoration: none; }
.visitor-services a:hover, .visitor-services a:focus-visible { border-color: var(--accent); background: var(--tint); }
.visitor-weeks { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 1rem 0 0.5rem; font-size: 0.875rem; }
.visitor-day { margin: 1rem 0 0.4rem; font-size: 0.9375rem; }
.visitor-times { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: 0.4rem; }
.visitor-times .btn { width: 100%; justify-content: center; font-variant-numeric: tabular-nums; }
.visitor-form { margin-top: 0.75rem; }
.visitor-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.visitor-days { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; border: 0; padding: 0; margin: 0.75rem 0; }
.visitor-days legend { margin-bottom: 0.3rem; }

/* ---- A calendar's working hours: a row per weekday; the public page's "with whom" and the website button ---- */
.working-hours { display: grid; gap: 0.45rem; margin: 0.75rem 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-small, 10px); }
.working-hours legend { padding: 0 0.3rem; font-weight: 600; font-size: 0.875rem; }
.working-hours__row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 7rem) auto minmax(0, 7rem); gap: 0.5rem; align-items: center; }
.working-hours__row .check span::first-letter { text-transform: uppercase; }
.service-who__row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 8rem) minmax(0, 6rem); gap: 0.5rem; align-items: center; }
.service-variant__row { grid-template-columns: minmax(7rem, 1fr) minmax(0, 8rem) minmax(0, 6rem) auto; }
.service-who__row--kind { padding-left: 1.75rem; }
@media (max-width: 30rem) { .working-hours__row { grid-template-columns: 1fr 1fr auto 1fr; } .working-hours__row .check { grid-column: 1 / -1; } }
.visitor-who { margin: 0.75rem 0 0; }
.visitor-who a { border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.8125rem; color: var(--muted); text-decoration: none; }
.visitor-who a[aria-current="true"] { background: var(--tint); color: var(--accent-text); font-weight: 600; }
.visitor-snippet { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }

/* ---- Bookings: closed days and holidays in the calendar's day headers, and their list ---- */
.booking-closed { display: block; margin-top: 0.15rem; font-size: 0.6875rem; font-weight: 600; color: var(--amber); text-transform: none; }
.booking-agenda h3 .booking-closed { display: inline; margin-left: 0.4rem; }
.closed-days li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }

/* ---- Bookings: a series' dates before booking (free, or what each collides with), the series in the panel, the feeds ---- */
.series-dates { margin: 0.5rem 0; }
/* The panel beside the week is narrow at every screen width: the date and time on one line, what it collides with and
   "skip" below. ".list li" lays rows out as flex, so these name the list too. */
.list li.series-date { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 6.5rem);
  grid-template-areas: "day date time" ". state skip"; gap: 0.25rem 0.4rem; align-items: center; padding: 0.4rem 0; }
.series-date__day { grid-area: day; }
.series-date > input[type="date"] { grid-area: date; }
.series-date > input[type="time"] { grid-area: time; }
.series-date__state { grid-area: state; }
.series-date > .check { grid-area: skip; white-space: nowrap; }
.series-date__day { color: var(--muted); font-size: 0.75rem; text-transform: capitalize; }
.series-date__state { font-size: 0.75rem; color: var(--green); }
.series-date.is-clash .series-date__state { color: var(--amber); font-weight: 600; }
/* A closed day booked anyway: the closed day stays as a warning, amber but not bold; "book anyway" on its own line. */
.series-date.is-warning .series-date__state { color: var(--amber); }
.series-date > .check.series-date__anyway { grid-area: auto / 2 / auto / -1; white-space: normal; }
.series-warning { color: var(--amber); font-weight: 600; }
.series-date.is-skipped { opacity: 0.6; }
.series-date.is-skipped .series-date__state { color: var(--muted); }
/* The series in the appointment's panel: rows like the agenda's, the open one set like the menu's current page. */
.booking-series { margin: 0.75rem 0; }
.booking-series h3 { margin: 0 0 0.25rem; }
.booking-series .slot-row { padding: 0.35rem 0.6rem 0.45rem; font-size: 0.8125rem; }
.booking-series .slot-row b::first-letter { text-transform: uppercase; }
.booking-series .slot-row.is-chosen { color: var(--ink); background: var(--tint); }
.booking-series .slot-row.is-chosen b { font-weight: 600; }
.feeds li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 0.75rem; }
.feed-made { margin: 0.75rem 0; padding: 0.75rem 1rem; border-radius: var(--radius-small, 10px); background: var(--tint); }
.feed-address { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }
.visitor-wait { margin-top: 1rem; }

/* A short tagline under a page's title ("Bring your own AI"), in the brand's accent. */
.lead-tag { margin: -0.4rem 0 0.4rem; color: var(--accent-text); font-weight: 600; font-size: 0.9375rem; }

/* A checkbox among fields: at the bottom of its row, as tall as a field and centred on it, beside the field it goes with. */
.form-grid > .check, .inline-form > .check, .filters > .check { align-self: end; align-items: center; min-height: 2.5rem; padding: 0; }
.form-grid > .check input, .inline-form > .check input, .filters > .check input { margin: 0; }

/* ---- Setup: the organisation's people across its companies, and its roles' permissions by module ---- */
.setup-organisation { max-width: 22rem; margin-bottom: 0.75rem; }
.setup-tabs { margin-bottom: 1rem; }
.setup-matrix td .input { min-width: 9rem; }
.permission-groups { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); margin: 0.75rem 0; }
.permission-group { margin: 0; padding: 0.6rem 0.9rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-small, 10px); min-width: 0; }
.permission-group legend { padding: 0 0.3rem; font-weight: 600; font-size: 0.875rem; }
.permission-group .check { align-items: flex-start; }
.permission-group .check small { display: block; }

/* ---- Keyboard (keyboard.js): the row cursor drawn like the chosen menu item, the shortcuts and the command palette ---- */
.table > tbody > tr.kb-cursor > td { background: var(--tint); }
.table > tbody > tr.kb-cursor { outline: 1px solid var(--line-strong); outline-offset: -1px; }
kbd { font: 600 0.75rem/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); padding: 0.2em 0.45em; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--ink); white-space: nowrap; }
.kb-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: calc(var(--header-h) + 1rem) 16px 16px;
  background: rgb(0 0 0 / 25%); }
.kb-overlay[hidden] { display: none; }
.kb-card { display: grid; gap: 0.75rem; width: min(34rem, 100%); max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto; padding: 1.25rem 1.4rem;
  border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: 0 20px 50px rgb(0 0 0 / 30%); }
.kb-card h2 { margin: 0; font-size: 1.15rem; }
.kb-card > .btn { justify-self: start; }
.kb-keys { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 1rem; margin: 0; align-items: baseline; }
.kb-keys dd { margin: 0; }
.kb-card h3 { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.kb-keys--go { grid-template-columns: repeat(2, max-content minmax(0, 1fr)); }
@media (max-width: 30rem) { .kb-keys--go { grid-template-columns: max-content minmax(0, 1fr); } }
.kb-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kb-results li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 0.45rem 0.6rem; border-radius: 8px; cursor: pointer; }
.kb-results li[aria-selected="true"] { background: var(--tint); font-weight: 600; }

/*
 * The overview: key figures, the work waiting and income against costs month by month. The chart's two colours are
 * checked for colour-blind readers on the card in both modes (blue and orange; a grey for costs read too close).
 */
:root { --chart-income: #1676c4; --chart-costs: #eb6834; }
:root[data-theme="dark"] { --chart-income: #3987e5; --chart-costs: #d95926; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-income: #3987e5; --chart-costs: #d95926; } }

/* Two to a row on a phone, all four in a row on a wide screen. */
.figures { display: grid; gap: 0.75rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); margin-bottom: 1rem; }
/* The brand kit's key figure (components.css), here a link to where the figure comes from. */
.figure--link { position: relative; }
.figure__label { margin: 0; }
.figure__label a { color: inherit; text-decoration: none; }
.figure__label a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.figure__label a:focus-visible { outline: none; }
.figure__label a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.figure--link:hover { border-color: var(--accent-text); box-shadow: 0 2px 10px var(--shadow); }
.figure__note--good { color: var(--green); }
.figure__note--warning { color: var(--amber); font-weight: 600; }
/* The VAT return, which has a deadline: the brand tile. */
.figure--highlight { background: var(--brand-tile); border-color: var(--brand-tile); }
.figure--highlight .figure__value { color: #fff; }
.figure--highlight .figure__label, .figure--highlight .figure__note, .figure--highlight .figure__value small { color: color-mix(in srgb, var(--slate) 55%, #fff); }
.figure--highlight .figure__note--warning { color: color-mix(in srgb, var(--amber) 45%, #fff); }

.overview { display: grid; gap: 1rem; }
@media (min-width: 64rem) { .overview { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; } }
.overview h2 { margin: 0; font-size: 1rem; }
.overview__work h2 { margin-bottom: 0.5rem; }
.overview__done { display: flex; gap: 0.5rem; margin: 0; color: var(--muted); }
.overview__done > span { color: var(--green); font-weight: 700; }
.work { list-style: none; margin: 0; padding: 0; }
.work li { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.work li:first-child { border-top: 0; }
.work li > .i { flex: none; width: 1.15rem; height: 1.15rem; color: var(--accent-text); }
.work li > span { flex: 1; min-width: 0; }
.work li > a { font-weight: 600; white-space: nowrap; text-decoration: none; }
.work li > a:hover { text-decoration: underline; }

.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.35rem 1rem; margin-bottom: 0.9rem; }
.chart-legend { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; color: var(--muted); }
.chart-legend li { display: flex; align-items: center; gap: 0.35rem; }
.chart-key { display: inline-block; flex: none; width: 0.65rem; height: 0.65rem; border-radius: 2px; }
.chart-key--income { background: var(--chart-income); }
.chart-key--costs { background: var(--chart-costs); }
/* The overview's income and costs by month; not .chart, which the account tables use. */
.result-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; height: 13rem; }
/* The axis labels sit on the grid lines: top, middle and the baseline, above the month names. */
.result-chart__axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 1.4rem; font-size: 0.6875rem; line-height: 0; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.result-chart__plot { display: flex; min-width: 0; }
.result-chart__month { position: relative; flex: 1; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) 1.4rem; }
.result-chart__bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.result-chart__bar { width: min(0.6rem, 34%); border-radius: 4px 4px 0 0; }
.result-chart__bar--income { background: var(--chart-income); }
.result-chart__bar--costs { background: var(--chart-costs); }
.result-chart__label { align-self: end; font-size: 0.6875rem; color: var(--muted); text-align: center; }
.result-chart__month--current .result-chart__label { color: var(--ink); font-weight: 600; }
.result-chart__month--later .result-chart__label { opacity: 0.55; }
.result-chart__month:hover .result-chart__bars { background-color: var(--tint); }
.result-chart__tip { display: none; position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); gap: 0.15rem; padding: 0.5rem 0.65rem;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-small); box-shadow: 0 4px 14px var(--shadow); font-size: 0.75rem; white-space: nowrap; }
.result-chart__tip > span { display: flex; align-items: center; gap: 0.35rem; }
.result-chart__tip .num { margin-left: auto; padding-left: 0.75rem; font-weight: 600; }
.result-chart__month:nth-child(-n+3) .result-chart__tip { left: 0; transform: none; }
.result-chart__month:nth-last-child(-n+3) .result-chart__tip { left: auto; right: 0; transform: none; }
.result-chart__month:hover .result-chart__tip { display: grid; }

/* ---- Likviditet (docs/adr/0057) ----
 * The forecast: the bank as a stepped line over 13 weeks on the result chart's colours, the limit dashed, the lowest
 * point a dot (red when it is under the limit). The budget's difference is a word's colour, never a bar. */
.forecast-chart { margin: 0 0 1rem; }
.forecast-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.forecast-chart__grid { stroke: var(--line); stroke-width: 1; }
.forecast-chart__grid--zero { stroke: var(--line-strong); }
.forecast-chart__axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.forecast-chart__area { fill: color-mix(in srgb, var(--chart-income) 12%, transparent); stroke: none; }
.forecast-chart__line { fill: none; stroke: var(--chart-income); stroke-width: 2; stroke-linejoin: round; }
.forecast-chart__limit { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 4; }
.forecast-chart__lowest { fill: var(--card); stroke: var(--chart-income); stroke-width: 2.5; }
.forecast-chart__lowest--below { stroke: var(--red); }
.forecast-chart__label { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget__difference--worse { color: var(--red); }
.budget__difference--better { color: var(--green); }
.budget__why td { background: var(--tint); }

/* ---- Inside the iPhone and Android apps (docs/adr/0028) ----
 * App.razor marks <html> with .app and lets the page reach under the status bar and the rounded corners
 * (viewport-fit=cover); the header and the sides keep the content clear of them. sumline-app.js asks the app what it can
 * do and marks <html> with data-app-<name>; buttons for those (.app-only--<name>) show only then. */
.app-only { display: none !important; }
html[data-app-scan] .app-only--scan { display: inline-flex !important; }
html[data-app-tap] .app-only--tap { display: inline-flex !important; }
/* Files shared into the app (sumline-app.js): "voucher inbox or a chat?", then, for a chat, what waits until the person
 * picks the conversation. Built from .confirm and .toast. */
dialog.app-share-choice { max-width: min(26rem, calc(100vw - 2rem)); margin: auto; color: var(--ink); }
dialog.app-share-choice::backdrop { background: rgb(0 0 0 / 0.35); }
.app-share-pending, .app-notice { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(5rem + env(safe-area-inset-bottom));
  max-width: calc(100vw - 2rem); }
.app-share-pending .btn { color: #fff; }
.app { --header-h: calc(64px + env(safe-area-inset-top)); }
.app .site-header { padding-top: env(safe-area-inset-top); }
.app .site-header__inner { height: 64px; }
.app body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.app .footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
/* iOS zooms into a field whose text is smaller than 16px when it gets focus; in the app that only disorients. */
.app input, .app select, .app textarea { font-size: max(16px, 1em); }
.scan-button { gap: 0.5rem; width: 100%; justify-content: center; margin: -0.25rem 0 1rem; min-height: 3rem; }

/* ---- Signed-in devices (the security page) ---- */
#devices .list__main b .badge { margin-left: 0.5rem; vertical-align: 0.1em; }
#devices > .inline-form { margin-top: 0.75rem; }

/* ---- CRM: the pipeline as columns of cards, one per stage; dragged between columns, or moved with the card's select ---- */
.board { display: grid; grid-template-columns: repeat(var(--columns), minmax(13rem, 1fr)); gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; align-items: start; }
.board__column { display: grid; gap: 0.5rem; align-content: start; min-height: 8rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--page); }
.board__column.is-drop { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.board__head h2 { margin: 0; font-size: 0.9375rem; }
.board__head small { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.board__card { display: grid; gap: 0.2rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); cursor: grab; }
.board__card a { color: var(--ink); font-weight: 600; text-decoration: none; }
.board__card a:hover { text-decoration: underline; }
.board__value, .board__date { margin: 0; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.board__date.is-late { color: var(--red); font-weight: 600; }
.board__move select { width: 100%; margin-top: 0.25rem; font-size: 0.75rem; padding: 0.2rem 0.3rem; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.board__empty { margin: 0; color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 40rem) { .board { grid-template-columns: repeat(var(--columns), minmax(80vw, 1fr)); scroll-snap-type: x mandatory; } .board__column { scroll-snap-align: start; } }
/* A list of activities: a line each, done ones muted. */
.activity-list { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.activity-list li { padding: 0.45rem 0; border-top: 1px solid var(--line); }
.activity-list li:first-child { border-top: 0; }
/* ---- The admin suite (docs/adr/0034): our own back office, never quiet about being it ---- */
.admin-banner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; padding: 0.45rem 1rem; background: var(--amber-tint); color: var(--ink); font-size: 0.8125rem; border-bottom: 1px solid var(--line); }
.admin-banner strong { letter-spacing: 0.08em; color: var(--amber); text-transform: uppercase; }
.admin-figures { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 1rem 0 1.5rem; }
.admin-figures .figure b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.usage-bar { display: block; height: 0.5rem; min-width: 2px; border-radius: 999px; background: var(--accent); }
.usage-bars td:last-child { width: 40%; }
.admin-actions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
/* Who sold an invoice line (ADR 0042): small, under the text, never on the printed invoice. */
.paper__lines .paper__field.paper__seller { display: block; width: auto; margin-top: 0.2rem; font-size: 0.8rem; color: var(--muted); }
.paper__text-static small { display: block; }

/* Gift cards and punch cards as the client holds them (ADR 0048): a payment card's proportions, the paper's own light
   palette (a thing in the hand, the same in dark mode), used clips punched through. */
/* The Billeder folder: a client's row opens to its photos as a grid of thumbnails (square, cut to fit), a plain tile for
   one that has none (HEIC). */
.photo-clients__open { all: unset; display: inline-flex; gap: 0.4rem; align-items: center; cursor: pointer; font-weight: 500; color: var(--ink); border-radius: 4px; }
.photo-clients__open:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.photo-clients__chevron { width: 1rem; height: 1rem; flex: none; color: var(--muted); transition: transform 0.15s; }
.photo-clients__open[aria-expanded="true"] .photo-clients__chevron { transform: rotate(90deg); }
.photo-clients__photos > td { background: var(--page); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.75rem; margin: 0.25rem 0 0.75rem; padding: 0; list-style: none; }
.photo-grid li { display: grid; gap: 0.2rem; font-size: 0.75rem; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-small); border: 1px solid var(--line); background: var(--card); }
.photo-grid a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.photo-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid__none { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }
/* A card face that opens its history: a button over the whole face, its focus ring on the face. */
.cardface-pick { position: relative; border-radius: 14px; }
.cardface-pick > button { all: unset; position: absolute; inset: 0; border-radius: inherit; cursor: pointer; }
.cardface-pick:has(> button:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.cardface-pick.is-chosen { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-uses li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: baseline; }
/* The messages in the company's own words: the placeholders to put in, and the text as a client gets it. */
.message-placeholders { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.message-preview { padding: 0.9rem 1rem; border-radius: var(--radius-small); background: var(--page); }
.message-preview p { margin: 0 0 0.4rem; }
.message-preview__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.card-uses__what { font-variant-numeric: tabular-nums; }
.cardfaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 0; padding: 0; }
.cardface {
  --face-ink: #0b1929; --face-muted: #55667a; --face-ring: #b9c6d3;
  position: relative; aspect-ratio: 85.6 / 54; margin: 0; padding: 0.9rem 1rem; box-sizing: border-box; border-radius: 12px;
  display: flex; flex-direction: column; gap: 0.35rem; color: var(--face-ink); color-scheme: light; overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 0 8px 22px rgb(11 25 41 / 14%);
}
.cardface--gift { background: linear-gradient(135deg, #fdf6e9 0%, #f3e2c4 100%); }
.cardface--punch { background: #fbf8f2; }
.cardface--gone { opacity: 0.55; box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.cardface__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.cardface__issuer { font-weight: 600; font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardface__kind { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--face-muted); white-space: nowrap; }
.cardface__name { font-size: 0.8125rem; color: var(--face-muted); }
.cardface__amount { margin-top: auto; font-size: 1.6rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cardface__amount small { font-size: 0.9rem; font-weight: 500; }
.cardface__of { font-size: 0.75rem; color: var(--face-muted); }
.cardface__clips { list-style: none; margin: auto 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.2rem; justify-items: center; }
.cardface__clips li { width: 1.3rem; height: 1.3rem; box-sizing: border-box; border-radius: 50%; border: 1.5px dashed var(--face-ring); display: grid; place-items: center;
  font-size: 0.625rem; color: var(--face-muted); font-variant-numeric: tabular-nums; }
/* A clip to use is a dashed ring; a used one carries the salon's stamp over it, in ink, each pressed a little askew. */
.cardface__clips li.is-stamped { position: relative; }
.cardface__clips li.is-stamped::after {
  content: attr(data-stamp); position: absolute; inset: -0.2rem; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid rgb(178 34 34 / 72%); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 55%), inset 0 0 0 3px rgb(178 34 34 / 55%);
  color: rgb(178 34 34 / 80%); font: 800 0.5rem/1 var(--font, system-ui); letter-spacing: 0.02em; transform: rotate(-14deg);
}
.cardface__clips li.is-stamped:nth-child(3n + 2)::after { transform: rotate(9deg); }
.cardface__clips li.is-stamped:nth-child(3n)::after { transform: rotate(-4deg) translate(1px, -1px); }
.cardface__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem 0.5rem; margin-top: auto; }
.cardface__clips + .cardface__bottom { margin-top: 0.25rem; }
.cardface--punch { gap: 0.25rem; }
.cardface__code { white-space: nowrap; font: 600 0.75rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.06em; background: none; padding: 0; color: var(--face-ink); }
.cardface__valid { font-size: 0.6875rem; color: var(--face-muted); white-space: nowrap; margin-left: auto; }
.paper__cards { margin: 1.25rem 0 0; grid-template-columns: repeat(auto-fill, minmax(13rem, 16rem)); }
.paper__card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--paper-muted); }
.paper__card label { display: flex; flex-direction: column; gap: 0.2rem; }

/* The company's website (ADR 0049): its own theme (warm, light or dark) whatever the visitor's, the company's colour
   for buttons and links; one column on a phone. */
.site { --site-bg: #fbf7f2; --site-surface: #fff; --site-ink: #2a1f1a; --site-muted: #6b5d55; --site-line: #ebe2d9;
  --site-accent: #8a2f6c; --site-on-accent: #fff;
  min-height: 100vh; display: flex; flex-direction: column; background: var(--site-bg); color: var(--site-ink); color-scheme: light;
  font: 400 16px/1.6 var(--font); }
.site--light { --site-bg: #fff; --site-surface: #f6f8fa; --site-ink: #0b1929; --site-muted: #55667a; --site-line: #e1e7ee; --site-accent: #1676c4; }
.site--dark { --site-bg: #17131a; --site-surface: #221d26; --site-ink: #f3eef2; --site-muted: #b7aab4; --site-line: #3a3240; --site-accent: #ee7aa0;
  --site-on-accent: #17131a; color-scheme: dark; }
.site a { color: var(--site-accent); }
.site__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem;
  padding: 1rem clamp(1rem, 5vw, 3rem); border-bottom: 1px solid var(--site-line); }
.site__brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--site-ink) !important; font-weight: 700; font-size: 1.1rem; }
.site__logo { height: 2.5rem; width: auto; max-width: 10rem; object-fit: contain; }
.site__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.site__nav a { text-decoration: none; color: var(--site-ink); }
.site__nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.site__book, .site__cta { display: inline-block; padding: 0.55rem 1.1rem; border-radius: 999px; background: var(--site-accent);
  color: var(--site-on-accent) !important; font-weight: 600; text-decoration: none; }
.site__main { flex: 1; width: 100%; max-width: 52rem; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2rem) 3rem; box-sizing: border-box; }
.site__hero { padding: clamp(2.5rem, 8vw, 5rem) 0 2rem; }
.site__hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; color: var(--site-ink); }
.site__tagline { margin: 0.75rem 0 1.5rem; font-size: 1.2rem; color: var(--site-muted); }
.site__section { padding: 1.75rem 0; border-top: 1px solid var(--site-line); }
.site__section h2, .site__page h1 { margin: 0 0 0.75rem; color: var(--site-ink); }
.site__page { padding-top: 2.5rem; }
.site__services, .site__team { list-style: none; margin: 0 0 1rem; padding: 0; }
.site__services li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--site-line); }
.site__services small { color: var(--site-muted); margin-left: 0.35rem; }
.site__price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.site__team { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.site__team li { padding: 0.35rem 0.85rem; border-radius: 999px; background: var(--site-surface); border: 1px solid var(--site-line); }
.site__visits { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.site__visits address, .site__hours { font-style: normal; margin: 0; padding: 1rem; border-radius: 12px; background: var(--site-surface); border: 1px solid var(--site-line); }
.site__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 1.25rem clamp(1rem, 5vw, 3rem);
  border-top: 1px solid var(--site-line); font-size: 0.85rem; color: var(--site-muted); }

/* The website's settings, with the site beside them as visitors will see it. */
.website { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 72rem) { .website { grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); align-items: start; }
  .website__preview { position: sticky; top: calc(var(--header-h) + 1rem); } }
.website__frame { max-height: 80vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.website__frame .site { min-height: 0; }
.website__sections { list-style: none; margin: 0; padding: 0; }
.website__sections li { display: flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0; }
.website__sections li label { flex: 1; }
.website__colour { display: flex; align-items: center; gap: 0.5rem; }

/* ---- The company's privacy notice (ADR 0050): plain reading, a heading per part, its facts as terms beside their answers ---- */
.notice-page h2 { margin: 1.4rem 0 0.4rem; font-size: 1rem; }
.notice-page__lead { color: var(--muted); }
.notice-page__facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.9375rem; }
.notice-page__facts dt { color: var(--muted); }
.notice-page__facts dd { margin: 0; }
@media (max-width: 30rem) {
  .notice-page__facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .notice-page__facts dd { margin-bottom: 0.5rem; }
}
.notice-preview { padding: 1rem 1.25rem; background: var(--card); }

/* The admin suite's project status (sumlinehq/sumline-server#281): the stages with their progress, and the board by status. */
.status-epics { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-bottom: 1.5rem; }
.status-epic { display: grid; gap: 0.35rem; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; color: var(--ink); font: inherit; cursor: pointer; }
.status-epic:hover, .status-epic.is-current { border-color: var(--accent-text); background: var(--tint); }
.status-epic__title { font-weight: 600; }
.status-bar { display: block; height: 0.4rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.status-bar > span { display: block; height: 100%; background: var(--accent-text); }
.status-board { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); align-items: start; margin-top: 1rem; }
.status-column { display: grid; gap: 0.5rem; }
.status-column h3 { margin: 0; font-size: 0.875rem; }
.status-card { display: grid; gap: 0.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-small); padding: 0.65rem 0.8rem; color: var(--ink); text-decoration: none; }
.status-card:hover { border-color: var(--accent-text); }
.status-card__title { font-weight: 500; }

/* The company list, one group per organisation (docs/adr/0021): its name, and Setup for those the person administers. */
.company-group { margin-block: 1.5rem; }
.company-group__head { display: flex; gap: 0.75rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin-bottom: 0.5rem; }
.company-group__head h2 { margin: 0; font-size: 1rem; }

/* The patient journal (ADR 0062): a note's Markdown, its headings and lists close together; a corrected one struck
   through, still readable; a value beside its face or colour. */
.journal-text > :first-child, .md-text > :first-child { margin-top: 0; }
.journal-text > :last-child, .md-text > :last-child { margin-bottom: 0; }
.journal-text p, .journal-text ul, .journal-text ol, .md-text p, .md-text ul, .md-text ol { margin: 0 0 0.5rem; }
.journal-text h3, .md-text h3 { margin: 0.75rem 0 0.25rem; font-size: 0.9375rem; }
.md-text h3, .md-text strong { font-weight: 600; }
.md-text li > p { margin: 0; }
.md-text ol > li + li, .md-text ul > li + li { margin-top: 0.3rem; }
/* The editor as a form's Markdown question (Sumline Forms, markdown: yes). */
sf-markdown-editor { display: block; }
.journal-text--struck { text-decoration: line-through; color: var(--muted); }
.measure { display: inline-flex; align-items: center; gap: 0.35rem; vertical-align: middle; }
/* The note editor: a page with a few buttons above it. */
.md-editor { border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--input-bg); }
.md-editor:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.md-editor__tools { display: flex; gap: 0.15rem; padding: 0.25rem; border-bottom: 1px solid var(--line-strong); }
.md-editor__tool { all: unset; box-sizing: border-box; min-width: 2rem; height: 2rem; padding: 0 0.4rem; border-radius: var(--radius-small); text-align: center; cursor: pointer; color: var(--ink); }
.md-editor__tool:hover { background: var(--page); }
.md-editor__tool:focus-visible { outline: 3px solid var(--focus); }
.md-editor__page { padding: 0.6rem 0.75rem; }
.md-editor__prose { min-height: 11rem; outline: none; white-space: pre-wrap; }
.md-editor__prose h3, .journal-text h3 { font-weight: 600; }
.md-editor__prose h3 { margin: 0.75rem 0 0.25rem; font-size: 0.9375rem; }
.md-editor__prose strong, .journal-text strong { font-weight: 600; }
.md-editor__prose li > p, .journal-text li > p { margin: 0; }
.md-editor__prose p, .md-editor__prose ul, .md-editor__prose ol { margin: 0 0 0.5rem; }
.md-editor__tool[aria-pressed="true"] { background: var(--tint); }
.md-editor__expand { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
.md-editor__expand .md-editor__expand-close, .md-editor__expand[aria-pressed="true"] .md-editor__expand-open { display: none; }
.md-editor__expand[aria-pressed="true"] .md-editor__expand-close { display: block; }
/* Expanded: the note's form fills the window, the page behind it still; the page to write on takes what is left. */
.md-focus-open { overflow: hidden; }
.md-focus { position: fixed; inset: 0; z-index: 60; margin: 0; padding: 1.5rem max(1rem, calc((100vw - 60rem) / 2)); overflow: auto;
  background: var(--page); align-content: start; }
.md-focus .md-editor__page { font-size: 1.0625rem; line-height: 1.6; }
.md-focus .md-editor__prose { min-height: 65vh; }
/* On a phone, expanded is the note alone: the buttons at the top, the page filling the screen and scrolling by itself,
   and saving at the bottom; the other fields wait in the form. */
@media (max-width: 60rem) {
  .md-focus { display: flex; flex-direction: column; gap: 0.5rem; height: 100dvh; padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)); }
  .md-focus > :not(.journal-note):not(.journal-note-actions) { display: none; }
  .md-focus .journal-note { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .md-focus .journal-note > .field__label { display: none; }
  .md-focus .md-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .md-focus .md-editor__page { flex: 1; overflow: auto; }
  .md-focus .md-editor__prose { min-height: 100%; }
  .md-focus .journal-note-actions { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
  .md-focus .journal-note-actions .btn { padding-inline: 0.75rem; }
}
/* The client's consents (ADR 0041): folded to one line of icons, one for each yes; unfolded, the ticks to change them. */
.consents { margin: 0 0 1rem; }
.consents > summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; }
.consents > summary::-webkit-details-marker { display: none; }
.consents > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-small); }
.consents__label { font-weight: 600; font-size: 0.875rem; }
.consents__icon { display: inline-flex; color: var(--ink); }
.consents__change { font-size: 0.8125rem; color: var(--muted); text-decoration: underline; }
.consents[open] .consents__change { display: none; }
.consents fieldset { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0.5rem 0 0; padding: 0; border: 0; }
/* A card that folds: its heading is the button, with a chevron that turns; the heading stays where it is. */
.card--fold > summary { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; }
.card--fold > summary::-webkit-details-marker { display: none; }
.card--fold > summary > h2 { margin: 0; flex: 1; }
.fold-summary { display: inline-flex; align-items: center; gap: 0.4rem; }
.fold-summary .fodmap-badge { margin-inline-start: 0; }
.card--fold > summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s; margin-right: 0.25rem; }
.card--fold:not([open]) > summary::after { transform: rotate(-45deg); }
.card--fold[open] > summary { margin-bottom: 1rem; }
.card--fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-small); }
/* A child's parents' consent to treatment, inside the consents (ADR 0063). */
.consents .parental { margin-top: 0.75rem; }
.consents .parental h3 { margin: 0 0 0.25rem; font-size: 0.875rem; font-weight: 600; }
/* A recipe's photo above its form (ADR 0064). */
.recipe-edit__photo { display: grid; gap: 0.75rem; justify-items: start; }
