/* Plain, quiet layout. No framework, no build step. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5f6b7a;
  --line: #dde2e8;
  --accent: #1f5f8b;
  --accent-dark: #174a6d;
  --ok-bg: #e3f4e8;
  --ok-text: #1d6b37;
  --off-bg: #eceff2;
  --off-text: #5f6b7a;
  --error: #b3261e;
  --error-bg: #fbeae9;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }

/* --- Top bar --- */

.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.mainnav { display: flex; gap: 1rem; }
.mainnav a { text-decoration: none; }
.mainnav a:hover { text-decoration: underline; }

/* The search field. In a narrow window it moves to a line of its own, below the menu. */
.search { display: flex; align-items: center; gap: 0.4rem; flex: 1 1 13rem; min-width: 12rem; max-width: 22rem; margin: 0; }
.search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid #b9c1cb;
  border-radius: 6px;
  background: #fff;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search .button { padding: 0.35rem 0.8rem; font-size: 0.9rem; }

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9rem;
}
.account form { margin: 0; }
.account-name { color: var(--muted); }

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Page --- */

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card.narrow { max-width: 30rem; margin: 1.5rem auto; }
.card.table-card { padding: 0; overflow-x: auto; }
.card.empty-state { text-align: center; padding: 3rem 1.5rem; }
.card.empty-state p { margin: 0.25rem 0; }

.hint, .intro { color: var(--muted); font-size: 0.9rem; }

/* --- Messages --- */

.messages { list-style: none; margin: 0 0 1rem; padding: 0; }
.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--ok-bg);
  color: var(--ok-text);
  margin-bottom: 0.5rem;
}
.message.error { background: var(--error-bg); color: var(--error); }

/* --- Forms --- */

.field { margin-bottom: 1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  border: 1px solid #b9c1cb;
  border-radius: 6px;
  background: #fff;
}
.field input:focus,
.field textarea:focus,
.field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field textarea { resize: vertical; }
/* File upload: the browser's own button is hidden (but still reachable by keyboard)
   and replaced by an English one. */
.file-field { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; position: relative; }
.file-field input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.field .file-field label.button { display: inline-block; font-weight: 400; margin: 0; }
.file-field:focus-within label.button { outline: 2px solid var(--accent); outline-offset: 1px; }
.file-chosen { color: var(--muted); overflow-wrap: anywhere; }
.field-checkbox label { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; }
.field .help { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.field .help ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--error); }
.error { color: var(--error); font-size: 0.9rem; margin: 0.25rem 0 0; }

.form-errors {
  background: var(--error-bg);
  color: var(--error);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.form-errors p { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.push-right { margin-left: auto; }

/* Whatever is marked as hidden stays hidden, also where a rule below sets a display of its own. */
[hidden] { display: none !important; }

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  font: inherit;
  border: 1px solid #b9c1cb;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #f0f3f6; color: var(--text); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); color: #fff; }

/* --- Tables --- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.muted td { color: var(--muted); }
.row-actions { text-align: right; white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.off { background: var(--off-bg); color: var(--off-text); }
.badge.removed { background: var(--error-bg); color: var(--error); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Detail pages --- */

h2 { font-size: 1.15rem; margin: 0; }
h3 { font-size: 1.05rem; margin: 0; }
h4 { font-size: 0.9rem; margin: 0; color: var(--muted); }
h1 .badge, h3 .badge { vertical-align: middle; margin-left: 0.4rem; }

.breadcrumb { margin: 0 0 0.5rem; font-size: 0.9rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.actions.centered { justify-content: center; }
.inline-form { display: inline; margin: 0; }

.section { margin-top: 2rem; }
.section-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.section > .card + .card { margin-top: 0.75rem; }
.subsection { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.card .hint { margin: 0; }
.address-text { margin: 0 0 0.5rem; }
.row-actions a, .row-actions .inline-form,
.file-actions a, .file-actions .inline-form { margin-left: 0.75rem; white-space: nowrap; }
.file-actions a:first-child { margin-left: 0; }

.facts { display: grid; grid-template-columns: 9rem 1fr; gap: 0.4rem 1rem; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0; }

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--error-bg);
  color: var(--error);
}

/* --- Tabs (current / removed) --- */

.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

tr.group-row th {
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

/* --- Files --- */

.documents, .versions ul, .removed-list { list-style: none; margin: 0; padding: 0; }
.document { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.document:first-child { padding-top: 0; }
.document:last-child { border-bottom: 0; padding-bottom: 0; }
.document-main { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: 0.85rem; }
.file-actions { font-size: 0.9rem; margin-top: 0.15rem; }
.versions { margin-top: 0.5rem; font-size: 0.95rem; }
.versions summary { cursor: pointer; color: var(--accent); }
.versions li { padding: 0.5rem 0 0.5rem 1rem; margin-top: 0.5rem; border-left: 3px solid var(--line); }
.versions .file-name { font-weight: 400; }

.removed-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.removed-list li:last-child { border-bottom: 0; }

/* --- Projects --- */

.nowrap { white-space: nowrap; }
.project-number { color: var(--muted); font-weight: 600; margin-right: 0.25rem; }

/* Colour mark: an active project without a recent message to the customer. */
.badge.mark-yellow { background: #fff1b8; color: #7a5600; }
.badge.mark-red { background: var(--error-bg); color: var(--error); }
tr.marked-yellow td:first-child { box-shadow: inset 4px 0 0 #e0b100; }
tr.marked-red td:first-child { box-shadow: inset 4px 0 0 var(--error); }
.card.marked-yellow { border-left: 4px solid #e0b100; }
.card.marked-red { border-left: 4px solid var(--error); }
.last-contact .hint { margin-left: 0.25rem; }
.legend { margin-top: 0.75rem; }

/* --- Dashboard --- */

/* The dashboard and the project list have many columns, so they may use the whole width of the window. */
.page.wide { max-width: 100rem; }

/* The own to-dos stand beside the projects in a wide window, above them in a narrow one. */
.dashboard-layout { display: grid; gap: 1rem; align-items: start; }
.dashboard-layout > * { min-width: 0; }
@media (min-width: 84rem) {
  .dashboard-layout { grid-template-columns: minmax(0, 1fr) 20rem; }
  .dashboard-layout .my-todos { grid-column: 2; grid-row: 1; }
  .dashboard-layout .active-projects { grid-column: 1; grid-row: 1; }
}
.my-todos { padding: 1rem 1.25rem; }
.todo-list { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.todo-list li { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.todo-list li:last-child { padding-bottom: 0; }
.todo-text { font-weight: 600; overflow-wrap: anywhere; }
.todo-project { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.todo-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin-top: 0.2rem; font-size: 0.85rem; }
.todo-meta .linklike { font-size: 0.85rem; }

/* The project list: one block per year. */
table.project-list tr.group-row th { font-size: 0.95rem; border-top: 1px solid var(--line); }
table.project-list tr.group-row:first-child th { border-top: 0; }
table.project-list tr.group-row .hint { margin-left: 0.5rem; font-weight: 400; }
table.project-list .col-name { min-width: 11rem; }
/* Why the search found a project: one term per line, below the name. */
.found-by { margin-top: 0.15rem; overflow-wrap: anywhere; }
.found-by span { display: block; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.filter { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.filter label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.filter select {
  max-width: 16rem;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid #b9c1cb;
  border-radius: 6px;
  background: #fff;
}
.filter select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-actions { display: flex; align-items: center; gap: 0.75rem; min-height: 2.2rem; font-size: 0.9rem; }
.filter-actions .button { padding: 0.35rem 0.9rem; }

.dashboard-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; margin: 0 0 0.75rem; font-size: 0.9rem; }
.overdue-invoices { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.4rem; }
.overdue-sum { color: var(--error); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.overdue-sum + .overdue-sum::before { content: "\00B7\00A0"; }

table.dashboard { font-size: 0.9rem; }
table.dashboard th, table.dashboard td { padding: 0.6rem 0.6rem; vertical-align: top; }
table.dashboard th:first-child, table.dashboard td:first-child { padding-left: 1rem; }
table.dashboard th:last-child, table.dashboard td:last-child { padding-right: 1rem; }
table.dashboard .hint { font-size: 0.8rem; }
table.dashboard .badge, .dashboard-summary .badge { white-space: nowrap; }
table.dashboard .col-project { min-width: 11rem; }
table.dashboard .col-project a { text-decoration: none; }
table.dashboard .col-project a:hover .dashboard-name { text-decoration: underline; }
.dashboard-number { display: block; font-weight: 600; white-space: nowrap; }
.dashboard-name { display: block; color: var(--text); }
table.dashboard .col-customer { min-width: 9rem; }
table.dashboard .col-waiting { min-width: 8rem; max-width: 16rem; overflow-wrap: anywhere; }
table.dashboard .col-contact, table.dashboard .col-payment, table.dashboard .col-shipment { min-width: 7.5rem; }
table.dashboard .col-next { min-width: 8.5rem; }
table.dashboard .col-contact .last-contact .badge,
table.dashboard .col-contact .last-contact .hint { display: block; width: fit-content; margin: 0.15rem 0 0; }
/* What is overdue stands one below the other, so the column can be read from top to bottom. */
table.dashboard .col-overdue { min-width: 8.5rem; }
table.dashboard .col-overdue > .badge,
table.dashboard .col-overdue > .overdue-invoices { display: flex; width: fit-content; margin-bottom: 0.25rem; }
table.dashboard .col-overdue .overdue-invoices { flex-direction: column; align-items: flex-start; }
table.dashboard .col-overdue .overdue-sum + .overdue-sum::before { content: none; }

.settings-form { max-width: 30rem; }
.section-head.subsection { border-top: 0; }

/* Country orders */
.total-quantity { margin: 0 0 0.75rem; }
.total-quantity .hint { margin-left: 0.5rem; }
.country-card > summary { cursor: pointer; list-style: none; margin-bottom: 0; flex-wrap: nowrap; }
.country-card > summary::-webkit-details-marker { display: none; }
.country-card > summary::before { content: "\25B8"; color: var(--muted); width: 0.9rem; flex: none; }
.country-card[open] > summary::before { content: "\25BE"; }
.country-card[open] > summary { margin-bottom: 0.75rem; }
.country-card > summary h3 { flex: none; }
.country-summary { flex: 1; min-width: 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.country-card > summary .row-actions { flex: none; }
.badge.country { background: #e3edf9; color: #1d4f8c; }
.tabs.file-filter { flex-wrap: wrap; }

/* Invoices */
.badge.payment-no_invoice { background: var(--off-bg); color: var(--off-text); }
.badge.payment-open, .badge.payment-partially_paid { background: #fff1b8; color: #7a5600; }
.badge.payment-paid_so_far { background: #e3edf9; color: #1d4f8c; }
.badge.payment-paid { background: var(--ok-bg); color: var(--ok-text); }
.payment-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.6rem; margin: 0 0 0.5rem; }
dd.payment-line { margin: 0; }
.invoice-totals { margin: 0 0 0.75rem; }
.invoice-totals .hint, .invoice-group-total .hint { margin-left: 0.15rem; }
.country-payment { flex: none; }
th.amount, td.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.invoices td { vertical-align: top; }
table.invoices th, table.invoices td { padding-left: 0.6rem; padding-right: 0.6rem; }
table.invoices th:first-child, table.invoices td:first-child { padding-left: 1rem; }
table.invoices th:last-child, table.invoices td:last-child { padding-right: 1rem; }
.invoice-number { white-space: nowrap; }
table.invoices tr.group-row th { white-space: normal; border-top: 1px solid var(--line); }
.invoice-group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.6rem; font-weight: 400; }
.invoice-group-name { font-weight: 700; font-size: 0.95rem; }
.invoice-group-head .row-actions { font-size: 0.9rem; }

/* A whole part of a page that can be folded away. Its heading line stays visible. */
.fold > summary { cursor: pointer; list-style: none; flex-wrap: nowrap; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "\25B8"; color: var(--muted); width: 0.9rem; flex: none; margin-right: -0.5rem; }
.fold[open] > summary::before { content: "\25BE"; }
.fold:not([open]) > summary { margin-bottom: 0; }
.fold > summary h2, .fold > summary .head-actions { flex: none; }
.fold-summary { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.6rem; font-size: 0.9rem; }

/* Shipments */
.badge.shipment-not_shipped { background: var(--off-bg); color: var(--off-text); }
.badge.shipment-in_transit { background: #fff1b8; color: #7a5600; }
.badge.shipment-arrived_in_germany { background: #e3edf9; color: #1d4f8c; }
.badge.shipment-delivered { background: var(--ok-bg); color: var(--ok-text); }
.shipment-countries { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0 0 0.75rem; font-size: 0.9rem; }
.card.shipment { padding: 1rem 1.5rem; }
.fold > .card + .card { margin-top: 0.75rem; }
.card.shipment .card-head { flex-wrap: nowrap; }
.card.shipment .card-head h3, .card.shipment .card-head .row-actions { flex: none; }
/* The same column widths in every shipment, so the tables line up below each other. */
table.deliveries { margin-top: 0.75rem; border-top: 1px solid var(--line); table-layout: fixed; }
table.deliveries th:nth-child(1) { width: 18%; }
table.deliveries th:nth-child(2) { width: 21%; }
table.deliveries th:nth-child(3) { width: 26%; }
table.deliveries th:nth-child(4) { width: 19%; }
table.deliveries td { overflow-wrap: anywhere; }
/* On a narrow screen the mark "Overdue" moves below its date instead of running into the next column. */
.expected-date { white-space: nowrap; }
table.deliveries th, table.deliveries td { padding: 0.5rem 0.6rem; vertical-align: top; }
table.deliveries th:first-child, table.deliveries td:first-child { padding-left: 0; }
table.deliveries th:last-child, table.deliveries td:last-child { padding-right: 0; }
.shipment-empty { margin-top: 0.75rem !important; }
.shipment-contact { margin: 0 0 0.75rem; font-size: 0.9rem; }
table.deliveries tr.has-contact td { border-bottom: 0; padding-bottom: 0; }
table.deliveries tr.contact-row td { padding-top: 0.15rem; color: var(--muted); font-size: 0.85rem; }
/* The freight documents of a shipment, below its dates and its countries. */
.shipment-documents { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.documents-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.documents-head h4 { font-size: 0.95rem; color: var(--text); }
.documents-head .document-count { color: var(--muted); font-weight: 400; }
.documents-head .button { padding: 0.25rem 0.75rem; font-size: 0.9rem; }
.shipment-documents .document { padding: 0.55rem 0; }
.shipment-documents .document:first-child { padding-top: 0; }
.shipment-documents .document:last-child { padding-bottom: 0; }
/* In the files of the project: the shipment a freight document belongs to, as a link to it. */
a.badge.shipment-link { background: #fff; border: 1px solid #b9c1cb; color: var(--text); text-decoration: none; }
a.badge.shipment-link:hover { background: #f0f3f6; }
.country-payment { display: flex; align-items: center; gap: 0.35rem; }

/* A list of tick boxes in a form, for example the countries of a shipment. */
.field div[id] > div > label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin: 0.15rem 0; }

.log { list-style: none; margin: 0; padding: 0; }
.log-entry { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.log-entry:first-child { padding-top: 0; }
.log-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.log-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.log-date { font-weight: 600; }
.log-text { margin-top: 0.35rem; overflow-wrap: anywhere; }
.log-file { margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted); }

/* --- Repeat project: the form of "New project from this one" --- */

.card.narrow.roomy { max-width: 44rem; }
.card .repeat-rules { margin: 0 0 1.25rem; }
.field-group { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0 0; padding: 1rem 0 0; min-width: 0; }
.field-group legend { font-weight: 600; padding: 0 0.5rem 0 0; }
.field-group .help { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
/* One line per country: its name on the left, the field on the right. Below each other in a narrow window. */
.field.po-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
.field.po-row label { font-weight: 400; margin: 0; overflow-wrap: anywhere; }
.field.po-row .error { grid-column: 1 / -1; }
.check-group { font-size: 0.95rem; margin: 0.9rem 0 0.25rem; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list label { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; padding: 0.2rem 0; cursor: pointer; }
.check-list .check-name { overflow-wrap: anywhere; }
@media (max-width: 34rem) {
  .field.po-row { grid-template-columns: minmax(0, 1fr); }
}

/* The head of the project page has four buttons. If they do not fit beside the name, they move
   below it as one row instead of breaking apart. */
.page-head.roomy { flex-wrap: wrap; }
.page-head.roomy .head-actions { margin-left: auto; }

/* The offer to archive the old project, shown once on the page of a new repeat project. */
.notice.offer { background: #e3edf9; color: #1d4f8c; }
.offer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; }

/* --- Change history --- */

.history-link { margin-top: 0.35rem; }
.history-intro { margin: -0.5rem 0 1rem; }
table.history td { vertical-align: top; }
table.history td:nth-child(2) { white-space: nowrap; }
table.history .history-entry { overflow-wrap: anywhere; min-width: 12rem; }
table.history .history-change { min-width: 14rem; }
table.history .change { overflow-wrap: anywhere; }
table.history .change + .change, table.history .badge + .change { margin-top: 0.2rem; }
.change-field { color: var(--muted); }
.change-old { color: var(--muted); }
.change-new { font-weight: 600; }
.change-arrow { color: var(--muted); margin: 0 0.15rem; }
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1rem; }

/* --- Backup --- */

/* The line on the dashboard, for administrators: when the last backup was made and downloaded. */
.backup-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  margin: -0.25rem 0 1rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.backup-line .hint { margin: 0; }
.backup-line .hint ~ .hint { margin-left: 0.6rem; }
.backup-line a { margin-left: auto; }
/* Red: no backup yet, the last one is too long ago, or the last attempt failed. */
.backup-line.alert { background: var(--error-bg); border-color: #efc4c0; }
.card.backup-alert { border-color: #efc4c0; background: #fffafa; }
.backup-facts { grid-template-columns: 12rem 1fr; }
.backup-error { margin-top: 0.3rem; color: var(--error); font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .backup-facts { grid-template-columns: 1fr; gap: 0.1rem 1rem; }
  .backup-facts dd { margin-bottom: 0.5rem; }
  .backup-line a { margin-left: 0; }
}
