:root {
  --ink: #17171a;
  --ink-soft: #5f5f6b;
  --ink-faint: #8b8b98;

  --line: #e4e4ea;
  --line-strong: #d0d0da;

  --paper: #ffffff;
  --ground: #f7f7f9;
  --hover: #f2f2f6;

  --accent: #1f5fd0;
  --accent-soft: #edf3fd;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --ok: #1a6b40;
  --ok-soft: #eaf5ee;

  --radius: 10px;
  --radius-sm: 6px;
  --ring: 0 0 0 3px rgba(31, 95, 208, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { color: #17479c; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* Header ------------------------------------------------------------------ */

.app-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 3.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.app-header__brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.app-header__brand:hover { color: var(--ink); }

.app-header__nav {
  display: flex;
  gap: 0.25rem;
  margin-right: auto;
}

.app-header__nav a {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
}

.app-header__nav a:hover {
  background: var(--hover);
  color: var(--ink);
}

.app-header__nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-faint);
  font-size: 0.875rem;
}

/* Layout ------------------------------------------------------------------ */

.app-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 { margin: 0; }

.section-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 2.5rem 0 0.25rem;
}

.section-intro {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* Flashes ----------------------------------------------------------------- */

.flashes {
  max-width: 56rem;
  margin: 1.25rem auto -0.75rem;
  padding: 0 1.5rem;
}

.flash {
  margin: 0 0 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.flash--notice { background: var(--ok-soft);     color: var(--ok); }
.flash--alert  { background: var(--danger-soft); color: var(--danger); }

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.button:hover {
  background: var(--hover);
  border-color: var(--ink-faint);
  color: var(--ink);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button--primary:hover {
  background: #17479c;
  border-color: #17479c;
  color: #fff;
}

/* Quiet actions in a table row. No border until you point at them, so a row
   with three actions does not read as a row of buttons. */
.button--plain {
  padding: 0.35rem 0.6rem;
  border-color: transparent;
  background: none;
  color: var(--ink-soft);
}

.button--plain:hover {
  background: var(--hover);
  border-color: transparent;
  color: var(--ink);
}

.button--danger:hover { color: var(--danger); }

/* Table ------------------------------------------------------------------- */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table td {
  padding: 0.6rem 0.75rem 0.6rem 1rem;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:first-child td { border-top: 0; }
.table tr:hover td { background: #fafafc; }

.table__main {
  font-weight: 500;
  width: 100%;
}

/* Only as wide as the icon: the name beside it keeps the whole row. */
.table__icon {
  width: 1px;
  padding-right: 0;
  vertical-align: top;
}

/* A favicon, or the tool's initial when the web has none — which is every
   system of our own. Both take the same square, so a list stays a column.
   Inline, so that next to a heading it stands on the same line the letters do
   rather than hanging above it. */
.tool-icon {
  display: inline-block;
  vertical-align: baseline;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  object-fit: contain;
}

/* A solid square needs more air against a heading than a logo with its own
   white space around it does. */
h1 .tool-icon { margin-right: 0.2rem; }

/* overflow: hidden is what makes this sit on the baseline like the image does.
   Without it the letter inside would be the baseline, and the square would hang
   below the line. */
.tool-icon--monogram {
  overflow: hidden;
  text-align: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25rem;
}


/* A plain table cell, not a flex container: a flex td does not stretch to the
   height of its row, which leaves a strip of the table background showing
   whenever the row next to it is taller. */
.table__actions {
  text-align: right;
  white-space: nowrap;
}

.table__actions form { display: inline-flex; margin: 0; }

/* Chips in a row, unlike the actions next to them, do wrap: somebody can hold
   several rights for several reasons and the row has to grow for that. They
   start at the same place in every row rather than ending at the same place,
   because a ragged left edge is harder to read down a column. */
.table__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
  padding-left: 1.5rem;
}

/* The name takes only the width it needs, so the chips get the rest. */
.table--people .table__main {
  width: 1%;
  white-space: nowrap;
}

/* A quiet glyph in a row: no chrome until you point at it, so a table of ten
   rows does not read as a wall of buttons. */
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-faint);
  line-height: 0;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.icon-action:hover { background: var(--hover); color: var(--ink); }
.icon-action--danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Forms ------------------------------------------------------------------- */

.form {
  max-width: 26rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* A tool has more to fill in than a name: chips with long names, and a list
   to pick them from. At the width of the other forms that became a column. */
.form--wide { max-width: 40rem; }

.form__field { margin-bottom: 1.25rem; }

.form__field label,
.form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.form__field input[type="text"],
.form__field input[type="email"],
.form__field input[type="url"],
.form__field input[type="date"],
.form__field select,
.form__field textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.12s;
}

/* A textarea comes with a width in columns and a grab handle of its own. The
   width is the field's, and it grows downwards or not at all — sideways it
   would step out of the form. */
.form__field textarea {
  display: block;
  resize: vertical;
  min-height: 4.5rem;
  line-height: 1.45;
}

.form__field input:disabled {
  background: var(--ground);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form__errors {
  margin-bottom: 1.25rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9375rem;
}

.form__errors p { margin: 0.15rem 0; }

.form__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Empty state and sign-in ------------------------------------------------- */

.placeholder {
  padding: 2rem 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-align: center;
}

.sign-in {
  max-width: 22rem;
  margin: 5rem auto;
  padding: 2.25rem 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.sign-in h1 { margin-bottom: 0.5rem; }

.sign-in__intro {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.sign-in__development {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line-strong);
  text-align: left;
}

.sign-in__development-title {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

/* One sentence about a thing, wherever it stands: under the name, quieter than
   it, and never stretched the full width of a page. */
/* One sentence about a thing, under its name and quieter than it. */
.page-header__about,
.access-list__about {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* A whole row of the header, so it runs under the buttons instead of being
   squeezed into the column beside them. */
.page-header__about { flex-basis: 100%; }

/* On the tool page it holds two lines: what the tool is for, and where its
   shared account is. */
.page-header__about p { margin: 0; }
.page-header__about p + p { margin-top: 0.3rem; }
.page-header__about strong { font-weight: 500; color: var(--ink); }

.access-list__about { margin-top: 0.1rem; }

.table__links {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 400;
}

.table__links a { color: var(--ink-soft); }
.table__links a:hover { color: var(--accent); }

/* The parts of a tool in the list of tools: counted beside its addresses,
   named once opened, a line each. Quiet like the reasons on "Mijn toegang". */
.tool-parts { color: var(--ink-faint); }

.tool-parts summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  list-style: none;
}

.tool-parts summary::-webkit-details-marker { display: none; }
.tool-parts summary:hover { color: var(--ink-soft); }

.tool-parts .chevron { transition: transform 0.15s; }
.tool-parts[open] .chevron { transform: rotate(180deg); }

.tool-parts__list {
  display: grid;
  gap: 0.2rem;
  margin: 0.5rem 0 0.1rem;
  padding: 0 0 0 0.9rem;
  border-left: 2px solid var(--line);
  list-style: none;
  font-size: 0.875rem;
}

.table__main:not(:has(.tool-parts[open])) .tool-parts__list { display: none; }

/* Text, not a flex box. In a flex box a name that ran onto a second line took
   the full width, and the arrow stood at the far edge instead of after it. */
.external-link svg {
  vertical-align: -0.05em;
  opacity: 0.65;
}
.external-link:hover svg { opacity: 1; }

.form__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.breadcrumb {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
}

.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--accent); }

.page-header__actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.notice-box {
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* How we sign in, in the line with the tool's links. Red when it falls short
   of the supplier policy; the notice under the header says why. */
.login-method { color: var(--ink-soft); }
.login-method--unknown { color: var(--ink-faint); }
.login-method--insecure { color: var(--danger); font-weight: 500; }

/* A tool that breaks a rule Moneybird set itself. Red like the confidential
   tag: it asks the reader to do something. */
.notice-box--danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}

.table__links { align-items: baseline; }

.access {
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}

/* The name of the right, with the two actions that belong to it. */
.access__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.access__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.access__actions {
  display: flex;
  flex: none;
  gap: 0.15rem;
}

.access__actions form { display: contents; }

.access__row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

/* The gap above is within a row. Two rows need room of their own, all the more
   when the chips in the first one wrap. */
.access__row + .access__row {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.access__label {
  flex: 0 0 4.5rem;
  padding-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.access__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 18rem;
}

.access__empty {
  padding-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.3rem 0.15rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.875rem;
  white-space: nowrap;
}

.chip form { display: inline-flex; margin: 0; }

.chip__remove {
  border: 0;
  background: none;
  padding: 0 0.25rem;
  color: var(--ink-faint);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}

.chip__remove:hover { color: var(--danger); background: var(--danger-soft); }

/* A chip sets its own display, which beats what the hidden attribute does. */
.chip[hidden] { display: none; }

/* The chips a form picks from a list, above the list itself. */
.picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0.6rem;
}

/* The names in this list run long and the form is narrow, so a chip may break
   onto a second line rather than run out of the card. */
.picker__chips .chip { white-space: normal; max-width: 100%; }
.picker__chips .tag,
.picker__chips .chip__remove { flex: none; }

/* A date input carries its own idea of how tall it should be, and it is not the
   same as a select's. Letting the row set the height keeps the three of them
   siblings. */
.access__add {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}

.access__add select,
.access__add input[type="date"],
.access__add input[type="submit"],
.access__add button {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.access__add input[type="submit"],
.access__add button {
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}

.access__add input[type="submit"]:hover,
.access__add button:hover {
  background: var(--hover);
  border-color: var(--ink-faint);
}

/* The browser's own arrow sits against the edge and ignores the padding. This
   one keeps the same distance from the edge as the text keeps from the other
   side. After the rules above, because their background shorthand would wipe
   the image. */
.form__field select,
.access__add select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%235f5f6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.7rem auto;
  cursor: pointer;
}

/* The picker in a form. After the rules for .access__add, which it narrows.

   The longest option sets how wide a select wants to be, and here that is
   wider than the form. A fieldset gives in to whatever is inside it unless it
   is told not to. */
.form__choices:has(.picker__add) { min-width: 0; }
.picker__add select { flex: 1 1 0; min-width: 0; padding-left: 0.7rem; }

/* Inside a form the list is as tall as the fields around it, not as small as
   the one beside a right. */
.picker__add select,
.picker__add button {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: inherit;
}



/* The form that button_to wraps around a button is what sits in the flex row,
   so it has to stretch and the button has to fill it. That keeps an icon button
   exactly as tall as a text button without pinning a height anywhere. */
.page-header__actions { align-items: stretch; }

/* The form a button_to wraps its button in takes no part in the layout, so the
   buttons themselves are the items the row spaces and stretches. Wrapped, a
   square button grew wider than the form shrink-wrapped to and stuck out of its
   own item, leaving 6px of gap on one side against 9px on the other. */
.page-header__actions form { display: contents; }

/* Square, and the same height as the text buttons beside it. Not aspect-ratio:
   in a flex row the width comes from the content, so the ratio never gets to
   decide anything. There is a test on this. */
.button--icon {
  justify-content: center;
  width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  line-height: 0;
}

.button--danger-outline {
  color: var(--danger);
  border-color: var(--line-strong);
}

.button--danger-outline:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.muted { color: var(--ink-faint); font-size: 0.8125rem; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 0.25rem;
}

.section-header .section-heading { margin: 0; }

/* An action that belongs to a section, not to the page. A filled button here
   would outweigh everything it sits above. */
.section-action {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.section-action span { font-weight: 400; }

/* "Mijn toegang": one row per tool, all in one card. Three columns: the logo,
   the tool, and what you have there. The last one has a width of its own, so
   the rights start at the same place in every row and you can read down them
   as you read down the names. */
.access-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Start, not centre: opening the reasons makes a row taller, and the tool
   beside them should stay where it was rather than drift to the middle. The
   cells below each centre themselves within one icon's height instead, which
   lines up a name of one line with its logo as well as a name with a
   description under it. */
.access-list__item {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 16rem;
  align-items: start;
  gap: 0.5rem 0.9rem;
  padding: 0.85rem 1.25rem 0.85rem 1rem;
  transition: background-color 0.12s;
}

.access-list__item + .access-list__item { border-top: 1px solid var(--line); }

/* The two columns are far apart, and a tint under the whole row keeps your
   eye on the right one on its way across. */
.access-list__item:hover { background: #fafafc; }

.access-list__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.access-list__tool,
.access-list__line {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.25rem;
  margin: 0;
}

/* A long name runs onto a second line in two lines of about the same length. */
.access-list__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

/* The arrow after it already says it leads somewhere. A column of blue names
   shouted louder than the rights they are there for. */
.access-list__name a { color: var(--ink); }
.access-list__name a:hover { color: var(--accent); }

.access-list__rights {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.access-list__reason {
  color: var(--ink-faint);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Several reasons are counted under the rights, and the count opens the list.
   The browser's own triangle would stand in front of the rights, so the
   chevron after the count takes its place. */
.access-list__more summary {
  cursor: pointer;
  list-style: none;
}

.access-list__more summary::-webkit-details-marker { display: none; }

.access-list__more summary .access-list__reason {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.25rem;
}

.access-list__more summary:hover .access-list__reason { color: var(--ink-soft); }

.access-list__more .chevron { transition: transform 0.15s; }
.access-list__more[open] .chevron { transform: rotate(180deg); }

/* Opened, in the same column as what it explains: each right with its own
   reason after it. */
.access-list__grants {
  display: grid;
  gap: 0.3rem;
  margin: 0.55rem 0 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.access-list__grants li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
}

/* The parts of a tool, opened from the reason. Under the whole row and in the
   row's own two columns, so a part sits under the tool and its right under the
   rights. Nine of them in the narrow column became a column of fragments. The
   details element holds only the line that opens it, as with .my-roles. */
.access-list__parts {
  grid-column: 2 / -1;
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.access-list__item:not(:has(.access-list__more[open])) .access-list__parts { display: none; }

.access-list__parts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 0 0.9rem;
  align-items: baseline;
}

.access-list__part { color: var(--ink-soft); }

/* On a phone the rights go under the name, in the name's column, instead of
   squeezing it into a column of a few words. */
@media (max-width: 40rem) {
  .access-list__item { grid-template-columns: 2.25rem minmax(0, 1fr); }

  .access-list__line,
  .access-list__more,
  .access-list__parts { grid-column: 2; }

  .access-list__line { min-height: 0; }

  .access-list__parts li {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.35rem;
  }
}

/* The roles on "Mijn toegang", next to the address: as quiet as the reason in
   the list, and opened the same way, with the chevron after the count. */
.my-roles { color: var(--ink-faint); }

.my-roles summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  list-style: none;
}

.my-roles summary::-webkit-details-marker { display: none; }
.my-roles summary:hover { color: var(--ink-soft); }

.my-roles .chevron { transition: transform 0.15s; }
.my-roles[open] .chevron { transform: rotate(180deg); }

/* Outside the details element, so they get a line of their own under the
   address, but they still show only while it is open. A browser without :has
   shows them always: still true, only louder. */
.my-roles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.page-header:not(:has(.my-roles[open])) .my-roles__list { display: none; }

/* The size of the line beside the address, so a single role there does not
   make it taller. Nothing to take away here, so no room for a ×. */
.my-roles__role {
  padding: 0 0.55rem;
  font-size: 0.8125rem;
}

.tag {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--hover);
  color: var(--ink-soft);
  font-size: 0.75rem;
  vertical-align: middle;
}

/* Confidential is the one level that asks something of the reader, so it is
   the one that stands out. The other two keep the quiet tag. */
.tag--confidential {
  background: var(--danger-soft);
  color: var(--danger);
}

/* All four margins: a fieldset brings 2px of its own on either side, which
   moved its contents out of line with the fields above. */
.form__choices {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}

.form__choices legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Deliberately not inside .form__field: that would make ".form__field label"
   win on specificity and lay the radio out above its own text. */
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  cursor: pointer;
}

.choice:hover { background: var(--hover); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.choice input {
  flex: none;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

.choice > span { display: block; }
.choice strong { font-weight: 600; }

.choice__hint {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* Many yes-or-no choices in one list. Rows, not cards: fifteen cards would be
   a page of their own, and each row is one name and one level. */
.form__checklist {
  display: grid;
  gap: 0.15rem;
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
}

.checklist__item:hover { background: var(--hover); }
.checklist__item input { flex: none; margin: 0.2rem 0 0; accent-color: var(--accent); }

/* The level follows the name rather than being pushed to the far edge: in a
   form this narrow, a column of its own squeezes long names into three lines. */
.checklist__item .tag { flex: none; margin-top: 0.15rem; }

.form__check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.form__check input {
  flex: none;
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

/* A label here is often a whole sentence, and at the weight of a field label
   it outweighed everything around it. */
.form__check label { font-weight: 400; }

/* The margin above lines the box up with the first line when a hint follows
   the label. With the label alone, the box sits in the middle of it. */
.form__check:has(> label) { align-items: center; }
.form__check:has(> label) input { margin-top: 0; }

/* A field that only matters once the box above it is ticked. CSS and not
   Stimulus: nothing has to happen but showing it. */
.form__reveal:not(:has(input[type="checkbox"]:checked)) .form__revealed { display: none; }

/* A part takes its account from its tool: once a tool is chosen under
   "Onderdeel van", the fields that describe an account go, and the hints
   for a part come. The form still sends what is hidden; the model clears it. */
.form:has(.form__part-of option:checked:not([value=""])) .form__for-tool,
.form:not(:has(.form__part-of option:checked:not([value=""]))) .form__for-part { display: none; }

.form__inherited {
  margin: 0 0 1.25rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--hover);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Close to the box it belongs to, and in line with its label. */
.form__reveal .form__check:has(input:checked) { margin-bottom: 0.6rem; }
.form__revealed { padding-left: 1.4rem; }

.chip--planned { border-style: dashed; }

/* Asked for and waiting: further away than a plan, and nothing to take back
   here, so the room for the × goes to the text. */
.chip--requested { border-style: dotted; padding-right: 0.6rem; }

/* Requests --------------------------------------------------------------- */

/* How many requests wait for somebody who decides. Without e-mail this is how
   they find out, so it stands out a little. */
.nav-count {
  display: inline-block;
  min-width: 1.2rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.2rem;
  text-align: center;
}

/* A role or an exception, side by side. A link each, so switching works
   without JavaScript, like picking the person above it. */
.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
}

.segmented a {
  padding: 0.4rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

.segmented a + a { border-left: 1px solid var(--line-strong); }
.segmented a:hover { background: var(--hover); color: var(--ink); }
.segmented a[aria-current] { background: var(--accent-soft); color: var(--accent); }

/* In the card instead of the form, when there is nothing to fill in: nobody
   could approve, or nothing is left to ask for. */
.form__notice {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* A button only needed when JavaScript does not run; the page hides it when it
   does. A button sets its own display, which beats what the hidden attribute
   does. */
.form__fallback { margin-top: 0.5rem; }
.form__fallback[hidden] { display: none; }

/* In the words of whoever asked, so their line breaks stay. */
.requests__reason {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 400;
  white-space: pre-line;
}

/* Two buttons side by side in a row. */
.requests .table__actions form + form { margin-left: 0.3rem; }
.requests .table__actions .tag + form { margin-left: 0.3rem; }

.chip__note {
  margin-left: 0.2rem;
  color: var(--ink-faint);
  font-size: 0.8125rem;
}



/* Log --------------------------------------------------------------------- */

/* Five fields in one card, side by side while there is room. They are form
   fields, so they look like the ones in a form. */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filters__field { margin: 0; }

/* A date field comes out a little taller than a select, which showed in a row
   of them side by side. */
.filters__field select,
.filters__field input { height: 2.625rem; }

/* A row of its own under the fields, and only when there is something in it:
   the button is hidden once JavaScript runs. */
.filters__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.6rem;
}

.filters__actions:not(:has(> :not([hidden]))) { display: none; }
.filters__actions .form__fallback { margin-top: 0; }

/* Baselines, so the time stands on the line of the sentence beside it. */
.log td { vertical-align: baseline; }

.log__time {
  width: 1px;
  padding-right: 0;
  white-space: nowrap;
  color: var(--ink-faint);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* A sentence to read, with names in it that link. At the weight of a name in
   a list it was all bold. */
.log .table__main { font-weight: 400; }

.log__line {
  margin-top: 0.1rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.pager {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}
