/*
 * Everything frontend/src renders: the shapes the pages repeat — tables, page
 * headers, action links, sections, forms, banners — and the furniture of the
 * individual screens. application.css keeps the chrome that came over from the
 * ERB views and the rules a Stimulus controller drives.
 *
 * Unlayered on purpose. origin.css is entirely inside @layer, so every rule
 * here outranks the Origin utility of the same name whatever the file order —
 * which is equally the reason an Origin utility can never override one of these.
 */

/* Index and report tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.4rem;
}
/* Below desktop a table wider than its column scrolls inside itself rather
   than the whole page. On desktop it spills past the column as before: the
   viewport still has room, and an inner scrollbar would hide columns. */
@media (max-width: 63.9em) {
  .data-table-scroll {
    overflow-x: auto;
  }
}
.data-table th,
.data-table td {
  padding: 0.8rem;
}
.data-table thead tr {
  border-bottom: 2px solid #e7e7e7;
  text-align: left;
}
.data-table tbody tr {
  border-bottom: 1px solid #e7e7e7;
}
.data-table tfoot tr {
  border-top: 2px solid #e7e7e7;
  font-weight: 700;
}
.data-table a {
  text-decoration: none;
}

/* The last column, holding what the row can be done to. */
.data-table__actions {
  text-align: right;
}
.data-table__actions .button_to {
  display: inline-block;
}
/* The gap hangs off the earlier link rather than the later one: the cell wraps
   at 390px, and a margin-left on a link that starts its own line paints
   nothing, which moved the pair against the right edge. */
.data-table__actions > *:not(:last-child) {
  margin-right: 1.2rem;
}
.data-table__actions.-nowrap {
  white-space: nowrap;
}

/* A label column followed by figure columns; figures read right-aligned. */
.data-table.-figures th:not(:first-child),
.data-table.-figures td:not(:first-child) {
  text-align: right;
}

/* The denser variant the settings screen lists API tokens in. */
.data-table.-compact {
  margin-bottom: 1.6rem;
  font-size: 1.3rem;
}
.data-table.-compact th,
.data-table.-compact td {
  padding: 0.6rem;
}
.data-table.-compact thead tr {
  border-bottom-width: 1px;
}
.data-table.-compact tbody tr {
  border-bottom-color: #f1f1f1;
}

/* Answer tables: the matrices an extracted answer is edited and read as.
   A different table from .data-table — denser, boxed, and with the column names
   running down the side in the single-object form. */
.answer-table {
  border-collapse: collapse;
  font-size: 1.3rem;
  border: 1px solid #e4e4e4;
}
/* The array form fills the answer column; the single-object form is only as
   wide as the two columns it holds. */
.answer-table.-full-width {
  width: 100%;
}
.answer-table th {
  text-align: left;
  border-bottom: 1px solid #e4e4e4;
  font-weight: 600;
  color: #3a3a3a;
}
/* Every header but the remove column's, which holds nothing and whose padding
   would widen the column past the button it exists for. */
.answer-table th:not(.answer-table__remove) {
  padding: 0.5rem 0.8rem;
}
/* The single-object form turns the columns on their side, so its headers are
   row headers: lighter rule, and never wrapped. */
.answer-table tbody th {
  border-bottom-color: #efefef;
  white-space: nowrap;
}
.answer-table td {
  padding: 0.2rem 0.4rem;
  border-bottom: 1px solid #efefef;
}
.answer-table__remove {
  width: 3.2rem;
}
.answer-table td.answer-table__remove {
  text-align: center;
}

/* Page header: the title, and what the page as a whole can be asked to do */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.4rem;
}
.page-title {
  font-size: 2.4rem;
  margin-bottom: 2.4rem;
}
/* The header row carries the spacing; the title inside it must not add to it. */
.page-header > .page-title {
  margin-bottom: 0;
}

/* The orange anchor that reads as the page's primary button */
.action-link {
  padding: 0.8rem 1.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 1.4rem;
}
.action-link.-small {
  padding: 0.4rem 1.2rem;
  font-size: 1.3rem;
}

/* The muted link out of a screen, back to whatever the reader came from */
.back-link {
  font-size: 1.4rem;
  text-decoration: none;
}
/* The one that opens a page rather than closing it, so it needs the gap below. */
.back-link.-block {
  display: inline-block;
  margin-bottom: 1.6rem;
}

/* The line a list shows instead of itself when it has nothing to show */
.empty-state {
  font-size: 1.4rem;
}

/* Section: a titled block of a page */
.section {
  margin-bottom: 3.2rem;
}
.section__title {
  font-size: 1.8rem;
  margin-bottom: 1.6rem;
}
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
}
.section__header > .section__title {
  margin-bottom: 0;
}

/* Changelog: one line per change, under the day it went live */
.changelog {
  list-style: none;
  padding: 0;
  margin: 0;
}
.changelog__change {
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

/* A flat type scale. Origin's u-font--* utilities carry a line height, letter
   spacing and weight along with the size, and its headings change size at 48em;
   these steps change nothing but the size, which is all the screens asked for. */
.font--sm {
  font-size: 1.4rem;
}
.font--xs {
  font-size: 1.3rem;
}

/* Forms: the field, its label, its control, its submit */
.form-field {
  margin-bottom: 2.4rem;
}
/* The auth pages set their fields closer together than a full form does. */
.form-field.-tight {
  margin-bottom: 1.6rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
}
/* A file input's width is its button plus the browser's "no file chosen" text. */
.form-field input[type="file"] {
  max-width: 100%;
}
/* Two controls under one label; the upper one carries the gap. */
.form-control.-stacked {
  margin-bottom: 0.8rem;
}
/* The fields a "new client" choice reveals under the select it was made in. */
.form-field__revealed {
  margin-top: 0.8rem;
}
.form-hint {
  font-size: 1.2rem;
  color: #777;
  margin-top: 0.4rem;
}
/* What a search box found, listed under it until one is picked. */
.combobox-list {
  margin-top: 0.4rem;
  padding: 0;
  list-style: none;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  max-height: 24rem;
  overflow-y: auto;
}
.combobox-list__option {
  padding: 0.8rem;
  cursor: pointer;
}
button.combobox-list__option {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
}
.combobox-list__option:hover,
.combobox-list__option[aria-selected="true"] {
  background: #f0f0f0;
}
.combobox-list__detail {
  display: block;
  font-size: 1.2rem;
  color: #777;
}
button.combobox-list__option:disabled {
  cursor: not-allowed;
  color: #999;
  background: none;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
}
.form-submit {
  padding: 1.2rem 2.4rem;
  border: none;
  border-radius: 0.4rem;
  font-size: 1.6rem;
  cursor: pointer;
}
/* The auth pages stretch their button across the panel. */
.form-submit.-block {
  width: 100%;
}

/* The banner a screen answers with: a flash, or a form's error summary */
.notice-banner {
  padding: 1.2rem 1.6rem;
  border-radius: 0.4rem;
  margin-bottom: 2.4rem;
}
.notice-banner.-success {
  background: #e8f5e9;
  color: #2e7d32;
}
.notice-banner.-failure {
  background: #fce4ec;
  color: #c62828;
}
.notice-banner > ul {
  margin: 0;
  padding-left: 1.6rem;
}

/* Signing in: one centred panel on an otherwise empty screen */
.centred-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.auth-panel {
  max-width: 40rem;
  width: 100%;
  padding: 3.2rem;
}
.auth-panel > h2 {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}
.auth-divider {
  margin: 2.4rem 0;
  border: none;
  border-top: 1px solid #ddd;
}
.auth-provider {
  margin-bottom: 1.2rem;
}
.auth-message {
  color: #666;
  font-size: 1.4rem;
}
.auth-message.-spaced {
  margin-bottom: 2.4rem;
}
.auth-aside {
  color: #999;
  font-size: 1.2rem;
  margin-bottom: 1.6rem;
}
.auth-footnote {
  margin-top: 1.6rem;
  font-size: 1.4rem;
}

/* The home page's sign-in (#248): the agency's half beside the client's,
   stacked on a phone. The height leaves room for the head and the footer. */
.login-split {
  display: flex;
  min-height: calc(100vh - 11.4rem);
}
.login-split__half {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (max-width: 47.9em) {
  .login-split {
    flex-direction: column;
    min-height: 0;
  }
}
.auth-intro {
  color: #585858;
  margin-bottom: 2.4rem;
}
.client-link-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: client-link-step;
}
.client-link-steps > li {
  counter-increment: client-link-step;
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
}
.client-link-steps > li::before {
  content: counter(client-link-step);
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid #f77f00;
  border-radius: 50%;
  background: #fff;
  color: #f77f00;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The strip a flash sits in on the layouts that do not centre their body */
.flash-strip {
  padding: 1.6rem 1.6rem 0;
}

.question-item__caption {
  margin-top: 0.3rem;
  font-size: 1.1rem;
}

/* A family of questions the section draws as one list of cards. It sits in the
   card body where a question row would, so it carries the same chrome. */
.answer-family {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid #efefef;
  margin: 0 -1.6rem;
}
.answer-family__member + .answer-family__member {
  margin-top: 0.8rem;
}

/* One row of a family: the fields that carry it, and the qualifiers only some
   rows use. What replaced the ten-column strip that scrolled sideways. */
.answer-card {
  position: relative;
  padding: 0.8rem;
  border-bottom: 1px solid #efefef;
}
/* The gutter the remove button stands in, kept only by the card that draws one:
   read-only there is no button, and the room would read as a ragged margin. */
.answer-card:has(> .answer-card__remove) {
  padding-right: 3.2rem;
}
.answer-card:last-child {
  border-bottom: none;
}
.answer-card__primaries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.answer-card__primaries > .answer-card__field {
  flex: 1 1 12rem;
  min-width: 0;
}
.answer-card__qualifiers {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem;
}
/* Once anything under it is on show. On an editable row that includes the ＋
   menu, which is never hidden and needs the same room a revealed qualifier does;
   read-only, a row with nothing populated draws nothing here and takes none. */
.answer-card__qualifiers:has(> :not([hidden])) {
  margin-top: 0.6rem;
}
/* Toby: "a tiny label in front-of or above the additional property input …
   rendered as small, all-caps text, glued to the input". */
.answer-card__label {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6a6a;
}
.answer-card__required {
  color: #d05a30;
}
.answer-card__qualifier {
  position: relative;
}
/* Its × stands on the label line, ending where the control does; the label
   keeps clear of it, and so widens the field rather than running under it. */
.answer-card__qualifier:has(> .answer-card__qualifier-remove) > .answer-card__label {
  padding-right: 1.6rem;
}
/* An author rule beats the user agent's own [hidden], whatever its specificity,
   so every display this sheet gives a qualifier has to be taken back here. */
.answer-card__qualifier[hidden] {
  display: none;
}
.answer-card__qualifier-remove,
.answer-card__remove {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  border: none;
  background: transparent;
  color: #6a6a6a;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}
.answer-card__qualifier-remove {
  top: 0;
  right: 0;
  padding-right: 0;
  padding-left: 0.4rem;
}
.answer-card__add {
  font-size: 1.2rem;
  color: #3a3a3a;
  border: 1px solid #e4e4e4;
  border-radius: 0.2rem;
  background: #fff;
  padding: 0.3rem 0.4rem;
  height: 2.8rem;
}

/* A control inside an answer table's cell: the grid draws the borders, so it draws none */
.cell-control {
  box-sizing: border-box;
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  padding: 0.4rem 0.6rem;
}
/* A grid column squeezed below its longest value clips it silently — and that
   value may be the schaal_code the reviewer is approving. So each column is as
   wide as its value needs, and the grid scrolls inside .answer-table__scroll
   once they no longer fit. A percentage width counts for nothing when a table
   sizes its columns, so the control stretches to fill its column by min-width. */
.answer-table.-full-width td > .cell-control {
  field-sizing: content;
  width: auto;
  min-width: 100%;
}
/* #170: a text wraps once its column reaches half the box, so no column is
   wider than the box. A percentage counts for nothing where a table sizes its
   columns; a container unit resolves against .answer-table__scroll. */
.answer-table.-full-width td > textarea.cell-control {
  width: max-content;
  max-width: min(30em, 50cqi);
}
textarea.cell-control {
  font-family: inherit;
  resize: none;
  vertical-align: top;
}
/* A card draws no grid, so its controls have to say for themselves that they
   are controls — and each stands one line tall whatever its type. Left to
   themselves an input resets `line-height` to `normal` where a select inherits
   the document's, and Chrome's date picker indicator grows the box further
   still, so a row of them came out at three different heights. */
.answer-card .cell-control {
  border: 1px solid #e4e4e4;
  border-radius: 0.2rem;
  background: #fff;
  height: 2.8rem;
  line-height: 1.8rem;
}
/* Origin strips every select's native arrow in `@layer reset` and hangs its own
   chevron off the `.input__select` wrapper a bare cell control does without, so
   a card's select would otherwise read as a text input. `appearance` is restated
   rather than relied on: a select that kept its native arrow would draw two. */
.answer-card select.cell-control {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2010%206'%3E%3Cpath%20d='M1%201l4%204%204-4'%20fill='none'%20stroke='%23585858'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem 0.6rem;
}

/* The bedrag field: how much, in what unit, over what base, under one label.
   Its controls are full-width on their own, so they need a row to share. */
.answer-amount {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.answer-amount > * {
  min-width: 0;
}
/* A bedrag is a few characters where its unit and base are words, so the three
   share the cell in that proportion rather than evenly — every one of them
   clips its value silently. The number grows along with them up to the room a
   bedrag can use; past that the surplus belongs to the words. Below its own
   basis a control takes a line of its own rather than clipping. */
.answer-amount > input {
  flex: 1 1 6rem;
  max-width: 8rem;
}
.answer-amount > select {
  flex: 1 1 8rem;
}

/* The rest of the answer tables: what wraps them and what edits them */
.answer-table__scroll {
  overflow-x: auto;
  container-type: inline-size;
}
/* #173: a grid wider than its box fades out on each side that has more to
   scroll to, so its last visible column reads as cut off. A grid that fits has
   no scroll range, so its timeline is inactive and nothing fades. */
@property --answer-table-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --answer-table-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@keyframes answer-table-scroll-cue {
  0% { --answer-table-fade-start: 0px; --answer-table-fade-end: 4rem; }
  5% { --answer-table-fade-start: 4rem; }
  95% { --answer-table-fade-end: 4rem; }
  100% { --answer-table-fade-start: 4rem; --answer-table-fade-end: 0px; }
}
@supports (animation-timeline: scroll()) {
  .answer-table__scroll {
    mask-image: linear-gradient(to right, transparent, #000 var(--answer-table-fade-start), #000 calc(100% - var(--answer-table-fade-end)), transparent);
    animation: answer-table-scroll-cue linear both;
    animation-timeline: scroll(self inline);
  }
}
.answer-table__scroll.-spaced {
  margin-bottom: 0.8rem;
}
.answer-table__caption {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.answer-table__required {
  color: #d05a30;
}
.answer-table__add {
  margin-top: 0.6rem;
  padding: 0.4rem 0.8rem;
}
.answer-table__remove-btn {
  padding: 0.2rem 0.6rem;
}
.answer-table__wide-field {
  display: grid;
  gap: 0.2rem;
  margin: 0;
}
.answer-table__wide-field + .answer-table__wide-field {
  margin-top: 0.6rem;
}
.answer-table__wide-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #585858;
}
.answer-table__wide-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e4e4e4;
  border-radius: 0.2rem;
  font: inherit;
  field-sizing: content;
  resize: none;
}


.font--semibold {
  font-weight: 600;
}

/* Buttons that are not a form's submit */
.action-button {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
}
/* The screens that set a size rather than inherit the page's 1.6rem. */
.action-button.-small {
  font-size: 1.4rem;
}
.action-button.-spaced {
  margin-top: 1.2rem;
}
/* Lined up with the date inputs it filters by. */
.action-button.-filter {
  padding: 0.6rem 1.6rem;
  font-size: 1.4rem;
}
/* Destructive, and small enough to sit inside a table row. */
.action-button.-revoke {
  background: #c0392b;
  padding: 0.4rem 1rem;
  font-size: 1.2rem;
}
/* Outlined rather than filled: present, but not what the screen is for. */
.ghost-button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  padding: 0.4rem 1.2rem;
  cursor: pointer;
  font-size: 1.3rem;
}
/* A button that has to read as a link, because it posts what a link cannot. */
.link-button {
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}
/* A link that reads as one but is set apart from the running text. */
.text-link {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.4rem;
}
.action-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  align-items: center;
  margin: 0 0 1.2rem;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 2.4rem;
}
.action-row .button_to {
  margin: 0;
}
/* An action that opens into a form, which then takes a line of its own below the buttons. */
.action-row__expandable:has(form) {
  flex-basis: 100%;
  margin-top: 1.6rem;
}
/* Narrower than Origin's 1.6rem, so a taken-over request's four actions fit the content column in one row. */
.action-row .btn {
  margin: 0;
  padding-inline: 1rem;
  white-space: nowrap;
}
@media (max-width: 47.9em) {
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .action-row .btn {
    width: 100%;
  }
}

/* The small coloured chip a status is stated in */
.status-chip {
  padding: 0.2rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 1.3rem;
  font-weight: 600;
}
.status-chip.-roomy {
  padding: 0.4rem 1.2rem;
}
.status-chip.-approved {
  background: #e8f5e9;
  color: #2e7d32;
}
.status-chip.-rejected {
  background: #fce4ec;
  color: #c62828;
}

/* The portal header, and the column a page is set in under it */
.brand-mark {
  font-weight: 900;
  font-size: 1.8rem;
  text-transform: uppercase;
}
.brand-title {
  border-left: 1px solid #e7e7e7;
  padding-left: 1.6rem;
}
.brand-title > h1 {
  font-size: 1.8rem;
  line-height: 2.4rem;
}
.page-head__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* The stepper hangs off the row below, which carries the gap itself. */
.page-head__row.-flush {
  padding-bottom: 0;
}
.page-head__title {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.portal-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: 1.6rem;
  font-size: 1.4rem;
}
.portal-nav a {
  text-decoration: none;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 1.4rem;
}
/* Below desktop the nav no longer fits beside the brand: it takes a line of its
   own under the brand and the sign-out, and wraps there. Unwrapping the title
   lets the nav and the user block sit in the same row as siblings. */
@media (max-width: 63.9em) {
  .page-head__row {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.8rem;
  }
  .page-head__row:has(.portal-nav) {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
  .page-head__title {
    display: contents;
  }
  .portal-user {
    margin-left: auto;
  }
  .portal-nav {
    order: 1;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    margin-left: 0;
  }
}
.page-body {
  padding: 3.2rem;
  max-width: 80rem;
  margin: 0 auto;
}
/* The dead end the portal shows when there is nothing to work on. */
.portal-notice {
  text-align: center;
  max-width: 48rem;
  padding: 3.2rem;
}
.portal-notice > h2 {
  font-size: 2.4rem;
  margin-bottom: 1.6rem;
}
.portal-notice > p {
  color: #666;
  font-size: 1.6rem;
  line-height: 2.4rem;
}

.button_to.-flush {
  margin: 0;
}

/* The client's note keeps the line breaks they typed. */
.pane-header__note {
  white-space: pre-line;
}
.pane-header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pane-header__actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* The notice standing in for a document pane that has nothing to show */
.pdf-pane__empty {
  text-align: center;
}
/* The agency pane stretches, so its notice is centred in the height as well. */
.pdf-pane__empty.-filled {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: start;
}

/* A file, listed as a row */
.document-list {
  background: #f5f5f5;
  border-radius: 0.8rem;
  margin-bottom: 2.4rem;
  overflow: hidden;
}
.document-row {
  display: flex;
  align-items: center;
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid #e7e7e7;
}
.document-row.-compact {
  padding: 0.6rem 0;
  gap: 0.8rem;
  border-bottom: none;
}
.document-row__name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.4rem;
}
a.document-row__name {
  color: #333;
  text-decoration: none;
}
.document-row__open {
  text-decoration: none;
}
.document-row__size {
  font-size: 1.2rem;
}
.document-row__size.-spaced {
  margin-right: 1.6rem;
}
.file-type-badge {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin-right: 1.2rem;
}
/* Left off the one that sits on Origin's white, which would otherwise lose to this. */
.file-type-badge.-grey {
  background: #f5f5f5;
}
.file-type-badge.-tight {
  padding: 0.2rem 0.6rem;
  margin-right: 0;
}

/* A record read as a label column and a value column */
.detail-panel {
  background: #f5f5f5;
  border-radius: 0.8rem;
  padding: 2.4rem;
  margin-bottom: 2.4rem;
}
.detail-panel > dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.8rem 1.6rem;
  margin: 0;
}
.detail-panel dt {
  font-weight: 600;
}
.detail-panel dd {
  margin: 0;
}

/* The magic link, and the two buttons that send it */
.magic-link-panel {
  margin-bottom: 2.4rem;
}
.magic-link-panel__label-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.magic-link-panel__label {
  font-weight: 600;
  margin: 0;
}
.magic-link {
  display: flex;
  gap: 0.8rem;
}
.magic-link__url {
  flex: 1;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  font-family: monospace;
  font-size: 1.4rem;
}
.magic-link__copy {
  flex: none;
}
.magic-link__hint {
  color: #666;
  margin-top: 0.8rem;
}
/* One action per line, so each mail checkbox sits beside only the button it belongs to. */
.magic-link-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.magic-link-actions .button_to {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
}
.magic-link-actions .btn {
  white-space: nowrap;
}
.magic-link-actions .checkbox-label {
  font-weight: 400;
  font-size: 1.4rem;
}
@media (max-width: 47.9em) {
  .magic-link-actions,
  .magic-link-actions .button_to {
    align-items: stretch;
  }
  .magic-link-actions .button_to {
    flex-direction: column;
  }
}

/* One review's verdict on a request */
.review-card {
  background: #f5f5f5;
  border-radius: 0.8rem;
  padding: 1.6rem;
  margin-bottom: 1.6rem;
}
.review-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.review-card__reviewer {
  font-weight: 600;
  font-size: 1.4rem;
}
.review-card__verdict {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.review-card__comment {
  font-size: 1.4rem;
  color: #333;
  margin: 0.8rem 0 0;
}
.review-card__fields {
  margin: 0.4rem 0 0;
  padding-left: 1.6rem;
}

/* What the last push to Business Central did, in the card the blocks around it
   wear. Coloured where the push did not fully land: a reader who skims sees the
   container long before the adverb inside it. */
.push-panel {
  background: #f5f5f5;
  border-radius: 0.8rem;
  padding: 1.6rem;
}
.push-panel.-warning {
  background: #fff8e1;
  border-left: 0.4rem solid #f7c948;
}
.push-panel.-failure {
  background: #fce4ec;
  border-left: 0.4rem solid #c62828;
}
.push-panel__outcome {
  font-weight: 600;
}
.push-panel.-warning > .push-panel__outcome {
  color: #8a6100;
}
.push-panel.-failure > .push-panel__outcome {
  color: #c62828;
}
.push-panel__spinner {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.8rem;
  vertical-align: -0.1rem;
  border: 0.2rem solid #d0d0d0;
  border-top-color: #555;
  border-radius: 50%;
  animation: push-panel-spin 0.8s linear infinite;
}
@keyframes push-panel-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .push-panel__spinner {
    animation-duration: 2.4s;
  }
}

/* Figures: the cards they are set in and the grids they are set out on */
.stat-card {
  background: #f8f8f8;
  border-radius: 0.8rem;
  padding: 1.6rem;
  text-align: center;
}
.stat-card__value {
  font-size: 3.2rem;
  font-weight: 700;
}
/* A duration is a sentence rather than a number, so it is set smaller. */
.stat-card__value.-compact {
  font-size: 2.4rem;
}
.stat-card__label {
  font-size: 1.3rem;
  margin-top: 0.4rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
.stat-grid.-three {
  grid-template-columns: repeat(3, 1fr);
}
.stat-grid.-two {
  grid-template-columns: 1fr 1fr;
}
.stat-grid.-spaced {
  margin-bottom: 1.6rem;
}
@media (max-width: 47.9em) {
  .stat-grid,
  .stat-grid.-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card__value {
    font-size: 2.4rem;
    overflow-wrap: anywhere;
  }
}

/* What the dashboard says needs doing */
.action-card {
  border-width: 2px;
  border-style: solid;
  border-radius: 0.8rem;
  padding: 1.6rem;
}
.action-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.action-card__label {
  font-size: 1.4rem;
  font-weight: 600;
}
.action-card__count {
  font-size: 2.4rem;
  font-weight: 700;
}
.action-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.3rem;
}
.action-card__item {
  padding: 0.4rem 0;
  border-top: 1px solid #e7e7e7;
}
.action-card__empty {
  font-size: 1.3rem;
  margin: 0;
}
.action-card__link {
  text-decoration: none;
  font-weight: 600;
}
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity-list > li {
  padding: 1.2rem 0;
  border-bottom: 1px solid #e7e7e7;
  font-size: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.activity-list__time {
  white-space: nowrap;
  margin-left: 1.6rem;
  font-size: 1.3rem;
}
.date-input {
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  font-size: 1.4rem;
}

.receipt {
  min-height: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.2rem;
}

/* The settings screen: two documented APIs and the tokens that reach them */
.settings-title {
  font-size: 2.4rem;
  margin-bottom: 1.6rem;
}
.settings-section {
  border: 1px solid #e7e7e7;
  border-radius: 0.6rem;
  padding: 2.4rem;
  margin-bottom: 2.4rem;
}
.settings-section > h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
}
.settings-section > h3 {
  font-size: 1.4rem;
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}
/* A worked example stands further off the paragraph above it than a label does. */
.settings-section > h3.-example {
  margin-top: 2.4rem;
}
.settings-intro {
  margin-bottom: 1.6rem;
  line-height: 1.5;
}
.settings-hint {
  font-size: 1.2rem;
  margin-top: 0.4rem;
}
.settings-empty {
  margin-bottom: 1.2rem;
}
.code-block {
  background: #f5f5f5;
  padding: 1.2rem;
  border-radius: 0.4rem;
  overflow-x: auto;
  font-size: 1.3rem;
}
/* A token has no spaces to break at, so it is told where it may. */
.code-block.-wrapped {
  word-break: break-all;
  white-space: pre-wrap;
}
.shell-block {
  background: #1e1e1e;
  color: #dcdcdc;
  border-radius: 0.4rem;
  overflow-x: auto;
  font-size: 1.3rem;
}
.shell-block.-command {
  padding: 1.6rem;
  line-height: 1.5;
}
.shell-block.-token {
  padding: 1.2rem;
  word-break: break-all;
  white-space: pre-wrap;
}
.revealed-token {
  background: #fff8e6;
  border: 1px solid #f0c040;
  border-radius: 0.4rem;
  padding: 1.6rem;
  margin-bottom: 1.6rem;
}
.revealed-token > p {
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.token-form {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.token-form > label {
  display: flex;
  flex-direction: column;
  font-size: 1.3rem;
}
.token-form > label > input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  font-size: 1.4rem;
  margin-top: 0.4rem;
}

/* Document viewer: the page canvas frontend/src/docViewer renders a parsed PDF
   into — a scroll root holding one .doc-page per page, each a rendered image
   with a transparent text layer and a highlight layer on top.

   Ported from docextract, whose viewer keeps these rules in six .module.css
   files. This codebase has no CSS-modules build, so the local names became
   global ones under the doc- prefix. */

/* Scroll root, sized by its parent. overflow:auto so a page's offsetTop is
   measured within it, which docViewerCommands' scrollTo depends on. */
.doc-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: auto;
  position: relative;
  background: #525659;
  /* The gutter is reserved permanently so the fit derives can measure this
     scroller's clientWidth without a feedback loop: applying a fit-width scale
     would otherwise spawn a scrollbar that invalidates the measurement it was
     computed from. */
  scrollbar-gutter: stable;
}
/* .doc-viewer.-fit-page and .-fit-width carry no rules: the real fit is a
   measured uniform transform the bridge derive puts on each page. The classes
   stay because they are what a consumer reads back to see which intent is in
   force. Padding is likewise prop-driven, so that the component's render and
   docViewerFit's measurement cannot disagree about the available area. */

/* One page. flex:none, or a height-bounded scroll root shrinks every page to
   cram them all in instead of overflowing and scrolling. user-select:none
   inherits down the whole page; only the glyphs opt back in, so a drag can only
   ever select text. */
.doc-page {
  position: relative;
  flex: none;
  background: #fff;
  box-shadow: 0 0.3rem 1.6rem rgba(0, 0, 0, 0.4);
  user-select: none;
  -webkit-user-select: none;
}
.doc-page__scaled {
  position: absolute;
  inset: 0;
}
.doc-page__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* The text layer: a transparent copy of the page's text, positioned over the
   image so it can be selected and clicked. The full-page container is
   transparent to the pointer; only the span boxes re-enable it, or the layer
   itself becomes the hover target and a drag engulfs the page instead of
   following the text. */
.doc-text-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.doc-text-layer__box {
  position: absolute;
  transform-origin: left top;
  pointer-events: auto;
}
.doc-text-layer__glyphs {
  position: absolute;
  left: 0;
  top: 0;
  white-space: pre;
  line-height: 1;
  color: transparent;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  transform-origin: left top;
}

/* The highlight layer sits between image and text: the colour shows through
   while the text above it stays selectable. Same pointer discipline as the text
   layer — only the boxes take the pointer. */
.doc-highlight-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.doc-highlight-layer__box {
  position: absolute;
  transform-origin: left top;
  pointer-events: auto;
  cursor: pointer;
  mix-blend-mode: multiply;
}
.doc-highlight-layer__box.-highlight {
  background: rgba(255, 235, 59, 0.4);
}
.doc-highlight-layer__box.-primary {
  background: rgba(255, 152, 0, 0.45);
}

/* The tab strip over a multi-document viewer. Shrinkable, so long document
   labels scroll inside the strip instead of pushing the fit controls past the
   right edge of a narrow pane. */
.doc-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem 0.8rem 0;
  background: #2b2b2b;
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
}
.doc-tabs__tab {
  padding: 0.6rem 1.4rem;
  border: none;
  cursor: pointer;
  font: inherit;
  background: #3a3a3a;
  color: #ccc;
  border-radius: 0.6rem 0.6rem 0 0;
  flex: none;
  white-space: nowrap;
}
.doc-tabs__tab.-active {
  background: #525659;
  color: #fff;
}

/* Several documents in one viewport: a fixed tab bar above a height-bounded
   stack. The stack needs a definite height for each child viewer's 100% height
   and overflow:auto to scroll. */
.doc-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.doc-list__bar {
  display: flex;
  align-items: center;
  background: #2b2b2b;
}
.doc-list__controls {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0 0.8rem;
  /* flex:none — the controls must never shrink away; the tab strip is the side
     that gives. */
  flex: none;
}
.doc-list__fit-button {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 0.4rem;
  display: flex;
}
.doc-list__fit-button:hover {
  color: #fff;
}
.doc-list__fit-button[aria-pressed="true"] {
  background: #525659;
  color: #fff;
}
.doc-list__stack {
  position: relative;
  flex: 1;
  min-height: 0;
}
.doc-list__document {
  width: 100%;
  height: 100%;
}
/* Inactive documents stay mounted and hidden: the browser preserves their
   scrollTop across hide and show, so switching tabs keeps each document where
   the reader left it. */
.doc-list__document.-hidden {
  display: none;
}

/* The build a page was served by, for a user reporting a problem */
.release-footer {
  padding: 1.6rem;
  font-size: 1.2rem;
  text-align: center;
}
/* The wizard's 04b holds the screen from 48em (board DocViewer). Its
   document is at the left, so the footer floats over that pane's bottom corner,
   clear of the panel's text at the right. On a phone the page scrolls, and the
   footer ends it as it ends every wizard page. */
@media (min-width: 48em) {
  body:has(.wz.wz-source) .release-footer {
    position: fixed;
    bottom: 0.4rem;
    left: 1.6rem;
    padding: 0.2rem 0.8rem;
    border-radius: 0.4rem;
    background: rgb(255 255 255 / 0.85);
    pointer-events: none;
  }
}

/* A feedback report and its answers keep the line breaks their writer typed. */
.feedback-report__text {
  white-space: pre-line;
}
.feedback-report__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feedback-report__page-copy {
  display: block;
  width: 100%;
  height: 60rem;
  margin-bottom: 0.8rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.4rem;
}
.feedback-report__image {
  display: block;
  max-width: 32rem;
  max-height: 24rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.4rem;
}
